Active Information Gathering
Manual benner checking
It is advised to check every port manually with nc.
nc <IP> <PORT>Nmap
Scan for open ports [TCP]
sudo nmap -sC -sV -p- <IP>nmap -sV -p- -oA output -Pn -A -T4 <IP>nmap -sV -p- -oA outputVuln -Pn --script vuln -T5 <IP>Scan for open ports [UDP]
nmap -sU -A -p- -oA outputUDP <IP>Run vuln scan
nmap <IP> -sV --script "vuln" -p<PORT>Nmap script listing
Import NSE script
Move script to nmap script folder:
Update the nmap script database:
Run script:
(PowerShell NMAP alternative)
Windows port scanning
Windows subtnetwork scanning
SMTP Enumeration (23, 465, 587)
Manual enumeration
Automatic enumeration
SNMP Enumeration (161, 162, 10161, 10162 / UDP)
Can be susceptible to IP spoofing and replay attacks.
SNMP protocols 1, 2, and 2c offer no traffic encryption, meaning that SNMP information and credentials can be easily intercepted over a local network (until SNMPv3).
It can be configured with default public and private community strings.
SNMP MIB Tree - SMTP database containing information related to the network management.
1.3.6.1.2.1.25.1.6.0
System Processes
1.3.6.1.2.1.25.4.2.1.2
Running Programs
1.3.6.1.2.1.25.4.2.1.4
Processes Path
1.3.6.1.2.1.25.2.3.1.4
Storage Units
1.3.6.1.2.1.25.6.3.1.2
Software Name
1.3.6.1.4.1.77.1.2.25
User Accounts
1.3.6.1.2.1.6.13.1.3
TCP Local Ports
Scanning the network with onesixtyone (u can also just use nmap):
Querying for a MIB data:
Querying for parameters
DNS Enumeration (53)
Banner grabbing
More information:
Zone transfer
Transfer DNS to another sercer.
Subdomain Enumeration
Whois Enumeration (43)
Basic information about a domain name.
FTP Enumeration (21)
Upload files
Download files
NBT Enumeration (137)
You can grab NetBIOS names - it can be useful in other areas of the hacking process.
SMB Enumeration (139, 445)
Despite providing blank user and blank password when you dont have credentials, you can also provide non existing user without password - it changes auth method and can reveal shares.
You can grab a lot of information from SMB.
Enumerate Users, Groups and Logged on Users
You can spray usernames as passwords when you provide users.txt file in -p parameter with --no-bruteforce and --continue-on-success.
Enumerate shares (alternative)
Sometimes crackmapexec does not return truthful output - it is advised to use other tools.
Connect to share
Download everything from share
Mount share (listing bypass, can search for hidden files)
Umount old mount:
Mount to kali's /mnt folder:
MSSQL
Crackmapexec user check:
Crackmapexec modules enumeration:
Log in through impacket:
NFS Enumeration (2049)
Show all mounts
Mount folder
LDAP (389, 636, 3268, 3269)
Ldapsearch:
Sample command
WEB (80, 443)
Information GatheringOracle TNS Listener (1521, 1522-1529)
Download the tool from here: https://github.com/quentinhardy/odat/releases/
Enumeration and exploitation
Last updated