4 - Enumeration
Module 04 - Enumeration
Basic command
ping www.moviescope.com โf โl 1500
-> Frame sizetracert www.moviescope.com
-> Determining hop count
Ping Sweep
Nmap
nmap -sP <Target_IP>/<Subnet>
Bash
We can se the 'ping' command on a given subnet range to check host statuses. The goal is to produce a clean output, focusing solely on the IP addresses, by filtering out unnecessary information.
ping -c 3 <Target_IP>
Grabbing only IP addresses:
We can automate it creating a bash script (.sh):
pingsweep.sh
Save it, change the permissions and make executable:
SNMP Enumeration (161)
SNMP enumeration is the process of enumerating the users accounts and devices on a SNMP enabled computer.
SNMP service comes with two passwords, which are used to configure and access the SNMP agent from the management station. They are: Read community string and Read/Write community string. These strings (passwords) come with a default value, which is same for all the systems. They become easy entry points for attackers if left unchanged by administrator.
Enumerate SNMP using snmp-check
nmap -sU -p 161 <Target IP>
snmp-check <Target IP> -> Enumerates SNMP devices, displaying the output in a simple and reader-friendly format.
NetBIOS Enumeration (139)
nbtstat โa <Target_IP> -> Displays the NetBIOS name table of a remote machine
nbtstat โc <Target_IP> -> Lists the contents of the NetBIOS name cache of the remote machine
net use -> Connects or disconnects a computer from a shared resource
net use \10.10.10.16\e โโ\user:โโ
net use \10.10.10.16\e โโ/user:โโ
NetBIOS Enumerator
Enum4Linux Win Enumeration
Enum4linux is a tool for gathering information from Windows and Samba systems. Security professionals use it to identify vulnerabilities and potential attack vectors. During assessments, they establish connections with the target system to discover weaknesses and enhance system security.
enum4linux -u martin -p apple -U <Target_IP> -> Users Enumeration
enum4linux -u martin -p apple -o <Target_IP> -> OS Enumeration
enum4linux -u martin -p apple -P <Target_IP> -> Password Policy Information
enum4linux -u martin -p apple -G <Target_IP> -> Groups Information
enum4linux -u martin -p apple -S <Target_IP> -> Share Policy Information (SMB Shares Enumeration
Enumeration using Metasploit
msfdb init
service postgresql start
msfconsole
msf > db_status
nmap -Pn -sS -A -oX Test <Target_IP>24
db_import Test
hosts -> To show all available hosts in the subnet
db_nmap -sS -A <Target_IP>-> To extract services of particular machine
services -> to get all available services in a subnet
SMB Enumeration
SMB Version Enumeration using MSF
use scanner/smb/smb_version
set RHOSTS 10.10.10.8-16
set THREADS 100
run
hosts -> now exact os_flavor information has been updated
Nmap SMB Scripts
nmap --script smb-os-discovery.nse -p445 <ip> -> Enumerate os, domain name,etc)
nmap --script smb-enum-users.nse -p445 <ip> -> Used to enumerate all users on remote Windows system using SAMR enumeration and LSA bruteforcing
nmap -p 445 --script=smb-enum-shares.nse, smb-enum-users.nse 10.10.19.21 -> SMB users and shares
smbclient //10.10.19.21/anonymous -> Accessing SMB shares
smbget -R smb://10.10.19.21/anonymous -> Downloading SMB files
Active Directory LDAP Enumeration
ADExplorer
Active Directory Explorer (AD Explorer) is a robust tool for viewing and editing Active Directory (AD). With it, you can effortlessly navigate the AD database, bookmark preferred locations, inspect object properties and attributes without opening dialog boxes, modify permissions, examine an object's schema, and perform complex, saveable searches.
Hyena
Hyena offers comprehensive Active Directory (AD) reporting, featuring built-in tools for customizable queries, filtering, object property management, advanced attribute handling, and numerous other AD administration capabilities.
Other LDAP enumeration tools
Softerra
LDAP Administrator
LDAP Admin Tool
LDAP Account Manager
LDAP Search
JXplorer
Accessing Shared Files
Additional Resources
Last updated