Chapter 2 - Recon & Enumeration

Information Gathering

Resources

Recon-ng Tutorialarrow-up-right

Basic Information

Kali> whois domain.com
Kali> dig {a|txt|ns|mx} domain.com
Kali> dig {a|txt|ns|mx} domain.com @ns1.domain.com

Email

Kali> simplyemail.py -all -e domain.com

Initial Discovery

Resources

NMAP: A Practical Guidearrow-up-right

NMAP: Scanning the Internetarrow-up-right

Massively Scaling your Scansarrow-up-right

Finger Printing

TTL Fingerprinting

TTL can help us determine the operating system of the target machine. In a basic ping command, an output would look similar to the following:

The TTL drops 1 each time it passes through a router. If in the above example the ttl=127, then it is safe to assume (from this information alone) that the host, 10.10.10.10, is a Linux host.

TTL table and thier operating system listed below.

Operating System

TTL

Windows

128

Solaris

225

Cisco

225

Probing Neighbors

Network Scan

UDP Scan

UDP-Protocol-Scanner

Netcat

NMAP

TCP Scan

Netcat

NMAP

Masscan

A Masscan Tutorial and Primerarrow-up-right

Enumeration

FTP - 21 (TFTP - 69 UDP)

SSH - 22 TCP

Telnet - 25 TCP

HTTP - 80 TCP / 8080

Check source code.

If an NMAP script returns back a banner, google it to see what app it may belong to.

The http banner in the example NMAP scan above is Windows Device Portal.

CMSHunter

CMS-Hunter - GitHubarrow-up-right

Directory Fuzzing

cURL

LFI/RFI

WPScan

Joomscan

Nikto

BurpSuite

I don't care who you are or what you're doing but it's time to go poke the website with burp. Play with all the things, get params, post params, cookies, user agents, referrers in fact all the headers, change get requests to posts, take note of all error codes, fuzz parameter values, and names, etc.

SSL

DNS - 53 TCP/UDP

Zone Transfer

Enumerate Subdomains

POP3 - 110 TCP

DATABASES

MSSQL - 1433

ORACLE - 1521

ORACLE XML DB

MySQL - 3306

LDAP - 389/636(ssl)

Resources

Understanding the LDAParrow-up-right

Cups - 631 TCP

Common UNIX Printing System has become the standard for sharing printers on a linux-network. You will often see port 631 open in your priv-esc enumeration when you run netstat. You can log in to it here: http://localhost:631/admin

You authenticate with the OS-users. Find version. Test cups-config --version. If this does not work surf to http://localhost:631/printers and see the CUPS version in the title bar of your browser.

There are vulnerabilities for it so check your searchsploit.

NFS - 2049

RPC

Examples

RPCBind

RDP - 3389

Examples

SAMBA/SMB/Netbios - 137,138 UDP 139,445 TCP

Resources

Plundering Windows accounts through authenticated SMB sessionsarrow-up-right

Hacking windows shares through Samba with Linuxarrow-up-right

Examples

Resources

NBTScan Cheatsheetarrow-up-right

TechNet NBTStat Referencearrow-up-right

Examples

SMTP - 25 TCP

SNMP - 161/162 UDP

Resources

What is SNMP?arrow-up-right

How to get IPv6 Address through SNMParrow-up-right

SNMPv3Enumarrow-up-right

SNMP Enumerationarrow-up-right

Examples

Last updated

Was this helpful?