Closed Bebzounette closed 1 year ago
Thanks for the PR, the pr is now merged on the last official repository of CrackMapExec
https://github.com/mpgn/CrackMapExec/commit/6c8edf2b7c35aa564aee7653a690f9518612fe24
Send me a DM on twitter to get your coin :)
Ported reg.py from Impacket to CME to add, delete, modify and query registry keys remotely. Can be useful to POC "CachedCredentialCount" on workstations or servers, for example.
Request registry key :
poetry run cme smb <IP> -d <DOMAIN> -u <USER> -p <PASS> -M reg-query -o path='HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon' key="CachedLogonsCount"
Modify registry key :
poetry run cme smb <IP> -d <DOMAIN> -u <USER> -p <PASS> -M reg-query -o path='HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon' key="CachedLogonsCount" value="5"
Delete registry key :
poetry run cme smb <IP> -d <DOMAIN> -u <USER> -p <PASS> -M reg-query -o path='HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon' key="CachedLogonsCount2" delete=true