Scanning

AutoRecon

autorecon -ct 2 -cs 2 -vv -o outputdir 192.168.1.100 192.168.1.1/30 localhost
autorecon 10.200.97.200
autorecon -t targets.txt — only-scans-dir
  • -ct (concurrent targets)

  • -o custom output directory location.

  • -cs limits the number of concurent scans per target

  • Auto recon will create and store the results in the /results directory.

General Enumeration Figure out the Hosts and Services Running

NetDiscover

  • Netdiscover is an active/passive reconnaissance tool that uses ARP to find live hosts on a local network.

  • Netdiscover actively searches for live hosts on the network by broadcasting ARP requests like a router.

  • By default netdiscover operates in active mode, however you can use it in passive mode with -p. With passive move it will not broadcast anything.

  • Note: ARP is unable to cross network boundaries or over any VPN connection

netdiscover -r 10.11.1.0/24

Nmap

  • I have no time to read, just give me the nmap scanning meta.

Ping Scan -sn Option

  • -sn tells nmap to perform host discovery only without any additional port scanning and prints out details of any hosts that responded.

  • nmap also has the -Pn option which will disable the host discovery stage altogether on a scan. The -Pn option is best used in combination with other scans.

TCP Connect Scan

  • The TCP connect scan in Nmap is the alternative TCP scan to use when a SYN scan is not an option.

  • TCP connect scan should be used when nmap does not have raw packet privileges which is required for a SYN scan.

TCP SYN Scan

  • Does not complete the 3 way handshake

UDP Port Scanning

  • Always check for UDP ports will pick up DNS, NTP, SNMP

Fingerprint Services

  • To figure out what services are running on target ports we use:

  • The following command will use nmap port scan to detect the service and OS:

  • Can also use the -A option in Nmap. The A stands for aggressive scan options and enables OS detection, script scanning and traceroute.

Scanning port ranges with Nmap

  • By default nmap will only scan the most 1000 common ports. To override the default use the -p

NSE

  • Web Application Vulnerability scan:

  • Location of scripts

  • Scripts are sorted by protocol, can sort by service

  • Nmap script help

  • Nmap script execution

  • The following command executes a script names http-robots.txt on port 80:

Detecting Linux Version from nmap SSH output

  • If ssh is running on the target, and it can fingerprint the service you have a good chance of detecting the operating system version:

Vulnerability Scanning

  • Good nmap command

Last updated