M4RCG04M
  • 👨‍💻Welcome to my GitBook
  • WRITEUPS
    • HackTheBox
      • Windows
        • Remote
      • Linux
        • Jarvis
        • Tabby
    • Proving Grounds Play
      • BBScute
      • FunBoxEasyEnum
      • Monitoring
      • Loly
      • Pelican
      • Payday
      • Snookums
  • OSCP Preparation List
    • Hack The Box
    • Proving Grounds
  • NOTES
    • UTILS
      • Useful Files
      • Payloads
      • Lateral Movement
    • ENUMERATION
      • Port 79 (finger)
      • Port 80 (HTTP)
      • Port 111 (RPCBIND)
      • PORT 161/udp (SNMP)
      • PORT 389,636,3268,3269 (LDAP)
      • Port 6697 (IRCD)
      • Database Analysis
      • Grafana
    • FILE TRANSFERS
    • ACTIVE DIRECTORY
      • Known Vulnerabilities
      • Without Credentials
        • Classic Attacks
      • With Username
      • Valid Credentials
      • Lateral Move
      • ACLs/ACEs permissions
      • Active Directory Certificate Services (AD CS)
      • Administrator account
      • Domain Admin
    • EXPLOTATION
      • Port 53 (DNS)
      • Port 80 (HTTP)
        • CMS
        • SQL INJECTION
        • XXE
        • File Upload
        • Cross Site Scripting (XSS)
      • Port 3389 (RDP)
      • Password Attacks
        • Hash Cracking
    • PRIVILEGE ESCALATION
      • Windows
        • Enumeration
        • Windows User Privileges
        • Windows Group Privileges
        • Weak Permissions
        • Windows Vulnerabilities
        • Credential Hunting
        • Tools
      • Linux
        • Enumeration
Powered by GitBook
On this page
  • Host Discovery
  • Scan the network
  • Zone transfer
  • List guest access on smb share
  • Enumerate ldap
  • Find User List
  1. NOTES
  2. ACTIVE DIRECTORY

Without Credentials

Host Discovery

nmap -sn 192.168.2.0/24
fping -a -g 192.168.2.0/24 2>/dev/null

Scan the network

If we find a vulnerable host we can get easily access to a machine Classic Attacks

# Enumerate smb hosts
cme smb IP/CIDR

# Search smb vulns
nmap -PN --script smb-vuln* -p 139,445 IP

Zone transfer

dig axfr domain@nameserver

List guest access on smb share

Enumerate null session

smbmap -u "" -p "" -H <dc-ip>
smbmap -u "guest" -p "" -H <dc-ip>

To list all drives

smbmap -H -u -p -L

To list contents of C$

smbmap -H -u -p -r 'C$'

To upload files

smbmap -H -u -p --upload '/root/backdoor' 'C$\backdoor'

To download files

smbmap -H -u -p --download 'C$\flag.txt

To execute commands

smbmap -H -u -p -x 'ipconfig',ma  

Enumerate null session

smbclient -L <ip> -N
smbclient //<ip>/public -N

Enumerate with credentials

smbclient -L <ip> -U <user>
smbclient //<ip>/public -U <user>k

Enumerate null session

enum4linux -a -u "" -p "" <dc-ip>
enum4linux -a -u "guest" -p ""

Enumerate null session

cme smb -u "" -p ""

Enumerate anonymous access

cme smb -u "a" -p ""

Enumerate ldap

ldapsearch -x -h <ip> -s domain

Find User List

cme smb <ip> --users 
cme smb <ip> --users | grep -E '^\s*SMB\s' | awk '{print $5}'
crackmapexec smb <ip> -u "" -p "" --rid-brute > valid_ad
crackmapexec smb <ip> -u "guest" -p "" --rid-brute | grep -oP '(?<=: ).*(?= \(SidTypeUser\))' | awk -F'\\\\' '{print $2}' > valid_ad
enum4linux -U <dc-ip> | grep "user"
net rpc group members "Domain Users" -W "<domain>" -I "<ip>" -U "%"
rpcclient -U "" -N IP
rpcclient > enumdomusers

rpcclient -U "" -N -c "enumdomusers" 10.10.10.172 | grep "^user:" | awk '{print $1}' | cut -d: -f2 | sed 's/\[\|\]//g'
python windapsearch.py -u "" --dc-ip 10.10.10.172 -U --admin-objects
python windapsearch.py -u "" --dc-ip 10.10.10.172 -U -m "<group>"
PreviousKnown VulnerabilitiesNextClassic Attacks

Last updated 14 days ago