Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Network Enumeration

Ports 1 to 1023 are well-known ports reserved for privileged services, meaning you must be a superuser (root) to bind services to them. Port 0 is treated as a wildcard port and is typically used by applications to let the OS assign an ephemeral port automatically.

00. Networking Basics

## ------------------| Loopback Alternatives
ping localhost
ping 127.0.0.1
ping 127.1
ping 0x7F000001
ping 0x7f01
ping 2130706433
ping ①②⑦.⓪.⓪.⓪
ping 017700000001
ping 0177.0000.0000.0001
ping 00000177.00000000.00000000.00000001
  • IPV 6

## ------------------| Common
fe80::c2d9:184f:9f41:3c8d <==> fe80:0000:0000:0000:c2d9:184f:9f41:3c8d

## ------------------| Subneting
fe80::/10 - Unique Link-Local (169.254.4.x)
## fe80:0000:0000:0000:0000:0000:0000:0000
## febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff (mask)

fc00::/7 - Unique Local-Unicast (10.x.x.x, 172.16.x.x, 192.168.x.x)
## fc00:0000:0000:0000:0000:0000:0000:0000
## fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff (mask)

2000::/3 - Global Unicast
## 3fff:ffff:ffff:ffff:ffff:ffff:ffff:ffff (mask)

FF02::1 - Multicast All Nodes
FF02::2 - Multicast Router Nodes
  • Calculate Link-Local IPV6 Address Using Mac

  • Enumerate Network by ping multicast | atk6-alive6

  • ICMP Codes


01. Nmap

By default, Nmap scans the top 1000 TCP ports using a SYN scan (-sS) if run as root. If not, it defaults to a TCP connect scan (-sT) due to socket permission limits. If no scan type or ports are specified, Nmap sets them automatically. When using Nmap with proxychains, use -sT -n for full TCP scan and to skip DNS resolution.

Port State
Description

open

Port is accessible and actively listening for connections.

closed

Port is accessible but not listening for connections.

filtered

Nmap cannot determine if the port is open due to firewall or other network filters.

unfiltered

Port is accessible, but Nmap was unable to determine whether it is open or closed.

open | filtered

No response received; the port may be open or protected by a firewall.

closed | filtered

Seen only in idle scans; Nmap cannot determine if the port is closed or filtered.

Flag
Nmap Scan Technique
Description

-6

IPv6 Scan

Conducts scan over IPv6 addresses

-PR

ARP Scan

Local hosts identification via ARP requests

-sn

Ping Scan

Detects online hosts without scanning ports

-sS

TCP SYN Scan

Stealthy half-open scan using SYN packets

-sT

TCP Connect Scan (Default)

Full TCP handshake for open port detection

-sN

TCP NULL Scan

Uses no flags to find open ports on RFC systems

-sF

TCP FIN Scan

Uses FIN flag to bypass some firewalls

-sX

TCP Xmas Scan

Sets FIN, PSH, and URG flags to probe ports

-sA

TCP ACK Scan

Analyzes ACK packets to understand firewall rules

-sW

TCP Window Scan

Utilizes TCP window size variations

-sM

TCP Maimon Scan

Exploits BSD-based systems with FIN/ACK flags

-sO

IP Protocol Scan

Discovers supported IP protocols

-sY

SCTP INIT Scan

Checks open SCTP ports with INIT packets

-sI

Idle Scan

Stealthy scan using a zombie host

-b

FTP Bounce Scan

Uses FTP servers to scan on attacker's behalf

-sP

Protocol Discovery Scan

Checks for supported protocols

-sZ

SCTP COOKIE-ECHO Scan

Similar to TCP SYN for SCTP ports

Option
Description

-n

Skip DNS resolution

-F

Fast scan mode – scans fewer ports (the top 100 most common ones)

-Pn

Disable ICMP Echo requests

-vv

Extra verbosity

-sU

Performs a UDP scan

-p-

All 65535 TCP ports

-T0

Paranoid - Very slow, used to avoid detection (Timing template)

-T1

Sneaky - Slow, used for IDS evasion (Timing template)

-T2

Polite - Slower to reduce bandwidth usage (Timing template)

-T3

Normal - Default timing (Timing template)

-T4

Aggressive - Faster, assumes reliable network (Timing template)

-T5

Insane - Very fast, may overwhelm networks (Timing template)

-oN

Normal output (.nmap)

-oG

Grepable output (.gnmap)

-oX

XML output (.xml)

-oA

All formats (.nmap, .gnmap, .xml)

--open

Show only open ports

-e tun0

Use the tun0 network interface

-D RND:5

Use 5 random decoy IPs for stealth

--reason

Show port state reasons

--version-all

Tries to detect versions of services on open ports (Default)

--osscan-limit

Limits OS detection to avoid false positives (Default)

--min-rate 300

Send at least 300 packets per second (Default 0)

--packet-trace

Show packet trace

--max-retries 0

Do not retry probes (faster, stealthier) - Default 10

--script=default

Runs the default NSE scripts for basic service/version detection

--source-port 53

Set source port to 53 (commonly used for DNS, useful for evasion)

--stats-every=5s

Stats update every 5 seconds

--disable-arp-ping

Disable ARP ping

--max-rtt-timeout 100ms

Set maximum round-trip timeout to 100ms (Default 1000ms/1s)

--initial-rtt-timeout 50ms

Set initial round-trip timeout to 50ms before considering a probe lost (Default 100ms)


  • AV / Firewall Bypass

  • Nmap Scripting Engine (NSE)


02. Hping


03. Ncat

04. Tcpdump

  • Basic usage

  • Basic Filters

  • Advance Filters


05. Scripts

  • Port scan using netcat

  • Scan live hosts using bash

  • Scan live ports using bash


06. Advance

06.1 Send Packet [python]

source inc0x0.com

06.2 Wireshark

  • Create NTML hash using wireshark

06.3 Zeek

Last updated