RPC vers WebClient
Les informations relatives à ce code sont disponibles dans cet article de blog. Lecture recommandée avant d'essayer d'utiliser quoi que ce soit ici.
Code permettant de déclencher WebClient via un appel RPC. Comme cela n'a finalement pas abouti, le code n'a jamais été véritablement nettoyé et est resté largement à l'état de preuve de concept.
Ces appels RPC peuvent atteindre le chemin de code qui démarre le service :
- EfsRpcDuplicateEncryptionInfoFile_Downlevel -> EfsDuplicateEncryptionInfoRPCClient -> EfsDuplicateEncryptionInfoClient -> EfspGetFullName -> EfspAttemptToGetWebDavPath -> WNetGetResourceInformaton
- EfsRpcEncryptFileSrv_Downlevel -> EfsEncryptFileClient -> LocateAndConnectToService -> EfspGetFullName -> EfspAttemptToGetWebDavPath -> WNetGetResourceInformaton
- EfsRpcDecryptFileSrv_Downlevel -> EfsDecryptFileClient -> LocateAndConnectToService -> EfspGetFullName -> EfspAttemptToGetWebDavPath -> WNetGetResourceInformaton
- EfsRpcAddUsersToFileEx_Downlevel -> EfsAddUsersClientEx -> LocateAndConnectToService -> EfspGetFullName -> EfspAttemptToGetWebDavPath -> WNetGetResourceInformaton
- EfsRpcRemoveUsersFromFile_Downlevel -> EfsRemoveUsersClient -> LocateAndConnectToService -> EfspGetFullName -> EfspAttemptToGetWebDavPath -> WNetGetResourceInformaton
- EfsRpcQueryRecoveryAgents_Downlevel -> EfsQueryRecoveryAgentsClient -> LocateAndConnectToService -> EfspGetFullName -> EfspAttemptToGetWebDavPath -> WNetGetResourceInformaton
- EfsRpcQueryUsersOnFile_Downlevel -> EfsQueryUsersClient -> LocateAndConnectToService -> EfspGetFullName -> EfspAttemptToGetWebDavPath -> WNetGetResourceInformaton
- EfsRpcFileKeyInfo_Downlevel -> EfsFileKeyInfoClient -> LocateAndConnectToService -> EfspGetFullName -> EfspAttemptToGetWebDavPath -> WNetGetResourceInformaton
Seul EfsRpcEncryptFileSrv_Downlevel existe dans le dépôt, les autres seront peut-être ajoutés à l'avenir.
WnfToWebClient est un code .NET qui démarre le service WebClient à l'aide d'un message WNF. Nécessite les privilèges NT AUTHORITY/SYSTEM, donc encore une fois, juste une preuve de concept.
L'appel RPC et le message WNF ne sont pas vraiment exploitables (actuellement) en raison des descripteurs de sécurité du consommateur d'événements ETW (UBPM) et du nom d'état WNF.