If there's more than one user that needs to compromised before getting root, enumerate each user as they might have access to something new that was protected before.
Temporary account
If some info suggests that an account is only temporary, then they might have some misconfigurations or rights that other users don't have.
Especially if they're created by a user which is in a group that has higher privileges.
DNS
# Normal DNS requestdigA@<ip><domain># Get all available entriesdiganyserver.local@<DNS_IP># Zone transfer without domaindigaxfr@<DNS_IP># Zone transfer with domaindigaxfr@<DNS_IP><DOMAIN># Subdomain scangobusterdns-ddomain.local-t25-w<wordlist># Normal nmap scannmap-sSU-p53--scriptdns-nsec-enum--script-argsdns-nsec-enum.domains=paypal.com<domain># Metasploitauxiliary/gather/enum_dns
Attacks
Zone transfer attack
DNS servers contain a Zone file that replicates the map of the domain.
Only the server itself should have access to it, but if it's misconfigured anyone can request the file and get the list of all the sub-domains.
Ports
53 DNS
LDAP
# Normal enumerationnmap-sT-Pn-n--open<ip>-p389--scriptldap-rootdse# Anonymous accessldapsearch-Hldap://<ip>:<port>-b"dc=domain,dc=local"-xldapsearch-H<ip>-x-sbasenamingcontextsldapsearch-H<ip>-x-b"dc=domain,dc=local"ldapsearch-H<ip>-x-b"dc=domain,dc=local"'(objectClass=person)'ldapsearch-H<ip>-x-b"dc=domain,dc=local"'(objectClass=user)'ldapsearch-H<ip>-x-b"dc=domain,dc=local"'(objectClass=group)'# Connect and enumerate with username and passwordldapsearch-Hldap://<ip>-b"dc=domain,dc=local"-D"cn=username,dc=domain,dc=local"-w<password>-xldapsearch-H<domain.local>-D'user@domain.local'-w<password>-b"DC=domain,DC=local"# https://github.com/ropnop/windapsearchwindapsearch.py--dc-ip<ip>-ddomain.local-u""-U
Notes
Passwords in result
If an ldapsearch query comes back with users, try checking whether they have any password related options set.
Example(s)
cascadeLegacyPwd: BASE64 STRING
Info field
Log of a query might contain some info in the user.
In many CTF-s they put passwords there. ​
Ports
389 LDAP
636 LDAPS (LDAP over SSL/TLS)
SMB
Enumeration
# Get sharessmbmap-H<ip>smbmap-H<ip>-u<user>-p<password># More enumerationenum4linux-U-o<ip>enum4linux-a<ip>nmap--script"safe or smb-enum-*"-p445<ip># Enumerate userscrackmapexecsmb<ip>-u<user>-p<password>--userscrackmapexecsmb<ip>-u<user>-p<password>--rid-brutecrackmapexecsmb<ip>-u<user>-p<password>--groupscrackmapexecsmb<ip>-u<user>-p<password>--local-users# Null session attacksmbclient-N-L \\\\<ip>crackmapexecsmb<ip>-u""# Establishing connectionsmbclient//<ip>-U<user>smbclient.py<domain>/<username>:<password>@<ip>
Ports
139 SMB 1.0 session services
138 SMB over UDP
445 SMB main
Kerberos
GetNPUsers.py
Impacket's GetNPUsers.py will attempt to harvest the non-preauth AS_REP responses for a given list of usernames
Kerberoasting is a post-exploitation attack technique that attempts to obtain a password hash of an Active Directory account that has a Service Principal Name.
# Null authenticationrpcclient-U''-N<ip># With credsrpcclient-U<username><ip>
NIS
# Install NIS toolsapt-getinstallnis# Ping the NIS server to confirm its presenceypwhich-d<host><IP># Extract user credentialsypcat–d<host>–h<IP>passwd.byname
Ports
135 RPC EPM
445 SMB
593 RPC over HTTPS
Analyse office files
Modern Office documents are just zip archives with XML files so, just unzip it and look for data within the XML files.
Unzip
unzip<file>
oletools
oletools is a package of python tools to analyze Microsoft OLE2 files (also called Structured Storage, Compound File Binary Format or Compound Document File Format), such as Microsoft Office documents or Outlook messages