From Linux

For credentialed enumeration, we must have a user's cleartext password, NTLM password hash, or SYSTEM access on a domain-joined host.

Once we have any of the above, we should start enumerating domain. We are interested in domain users and computers attributes, group membership, Group Policy Objects, permissions, ACLs, trusts and more.

  • Enumeration using crackmapexec and smbmap:

# getting password policy
crackmapexec smb $DC_IP -u username -p password --pass-pol

# getting usernames
crackmapexec smb $DC_IP -u username -p password --users

# getting groups
crackmapexec smb $DC_IP -u username -p password --groups

# getting loggin in users on a machine
crackmapexec smb $MACHINE_IP -u username -p password --loggedon-users

# getting shares info
crackmapexec smb $MACHINE_IP -u username -p password --shares
# getting list of readable files on a share
# results at /tmp/cme_spider_plus/<ip of host>
crackmapexec smb $MACHINE_IP -u username -p password -M spider_plus --share $SHARE_NAME

# getting shares info using SMBMap
smbmap -u username -p password -d $DOMAIN -H $MACHINE_IP
# Recursive list of all directories
smbmap -u username -p password -d $DOMAIN -H $MACHINE_IP -R $SHARE_NAME --dir-only
  • Enumeration using rpcclient:

Note:

  • A Relative Identifier (RID) is a unique identifier (represented in hexadecimal format) utilized by Windows to track and identify objects.

  • When an object is created within a domain, SID will be combined with a RID (RID at end) to make a unique value used to represent the object.

  • RID is unique for object only within its domain.

  • The built-in Administrator account will always have the RID value Hex 0x1f4, or 500.

  • Enumeration using Impacket Toolkit

SMBEXEC.py is caught by windows defender easily.

  • Automating search using Windapsearch and Bloodhound:

  • A handy cheatsheet: https://wadcoms.github.io/

  • Also check for vulnerabilities like: No Pac, PrintNightmare, PetitPotam

Last updated