githubEdit

Domain Enumeration

Domain Policy

ldeep ldap -u user1 -p password -d domain.local -s <LDAP_server_IP> domain_policy

Password Policy

nxc smb <targets> -u user1 -p password --pass-pol

Another Domain

ldeep ldap -u user1 -p password -d domain.local -s <remote_LDAP_server_IP> domain_policy

Domain Controller

nslookup domain.local
nxc smb <DC_IP> -u user1 -p password

Users Enumeration

List Users

ldeep ldap -u user1 -p password -d domain.local -s <LDAP_server_IP> users

User's properties

Search for a particular string in attributes

Actively logged users on a machine (Local Admin access)

User Hunting

Find machine where the user has admin privs

If a Pwned connection appears, admin rights are present. However, if the UAC is present it can block the detection.

Find local admins on a domain machine

https://gist.github.com/ropnop/7a41da7aabb8455d0898db362335e139

NXC

Computers Enumeration

Full info

Hostname enumeration

Groups Enumeration

Groups in the current domain

Full info

Search for a particular string in attributes

All users in a specific group

All groups of a user

Local groups enumeration

Members of a local group

Shares / Files

Find shares on the domain

A module for searching network shares:spider_plus. Running the module without any options (on a /24, for example) will produce a JSON output for each server, containing a list of all files (and some info), but without their contents. Then grep on extensions (conf, ini...) or names (password .. ) to identify an interesting file to search:

Then, when identifying a lot of interesting files, to speed up the search, dump this on the attacker machine by adding the -o READ_ONLY=False option after the -M spider_plus (but avoid /24, otherwise it'll take a long time). In this case, NetExec will create a folder with the machine's IP, and all the folders/files in it.

Manspider can also be used for this purpose. It permits to crawl all the shares or specific ones, and filter on file extensions, file names, and file contents.

https://github.com/blacklanternsecurity/MANSPIDER

Filter on file names

Search for content

Search for file extension

Parameters can be combined.

Find files with a specific pattern

Find files with sensitive data

https://github.com/skelsec/pysnaffler

GPO Enumeration

List of GPO in the domain

Organizational Units

OUs of the domain and their linked GPOs

Computers within an OU

DACLs

All ACLs associated with an object (inbound)

With samAccountName

With DN

With SID

Outbound ACLs of an object

These are the rights a principal has against another object

Trusts

Trusts for the current domain

Last updated