RPC a WebClient
La información para este código se puede encontrar en esta publicación de blog. Se recomienda leerla antes de intentar usar cualquier cosa de aquí.
Código para activar WebClient mediante una llamada RPC. Dado que no llegó a prosperar, el código nunca se limpió a fondo y quedó en gran medida en un estado de prueba de concepto.
Estas llamadas RPC son capaces de alcanzar la ruta de código que inicia el servicio:
- 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
Solo EfsRpcEncryptFileSrv_Downlevel existe en el repositorio, quizás los demás se añadan en el futuro.
WnfToWebClient es código .NET que iniciará el servicio WebClient con un mensaje WNF. Requiere privilegios de NT AUTHORITY/SYSTEM, así que nuevamente es solo una prueba de concepto.
La llamada RPC y el mensaje WNF no son realmente utilizables como arma (actualmente) debido a los descriptores de seguridad del consumidor de eventos ETW (UBPM) y el nombre de estado WNF.