My Pentesting Space
LinkedIn
  • Welcome to Hackjiji
  • 🕸️web pentesting
    • Basics
    • Web pentest cheatsheet
    • Burpsuite and browser tricks
    • cUrl cheatsheet
    • CVE exploitation
    • JavaScript Obfuscation/Deobfuscation
  • Network pentesting
    • Basics
    • Nmap favorites
    • Host discovery
    • Port scanning
    • Network Services
      • RPC-NFC
      • WINRM - 5895-5896
      • FTP - 21
      • SMB - 445
      • RDP - 3389
      • SSH - 22
      • SMTP - 25
    • Firewall evasion
    • Pivoting and double pivoting
  • Physical pentesting
    • Bad USB - Rubber Duckies
  • Linux pentesting
    • Usefull command's
    • Privilege escalation
  • windows pentesting
    • Windows useful commands
    • Windows Reverse shell codes
    • Privilege escalation
  • Active Directory pentesting
    • Basics
    • AD
    • AAD
  • General
    • Hash cracking
    • Wordlist
    • Encoding/decoding
    • Environment setup
      • Install a new OS on seperated boot sector
      • Hyper-V
      • Virtualbox
    • Reverse-shell-cheatsheet
    • Metasploit cheatsheet
    • Vulnerability research
    • My scanning methodology
  • Events
    • HackTheBox Meetup - LFI2RCE
    • Radio Equans - QR Code Awareness campaign
    • Cybersecurity job campaign
Powered by GitBook
On this page
  • Passive scanning
  • Active scanning
  • Nmap
  1. Network pentesting

Host discovery

Passive scanning

If you have internal access to the network, and only passive scanning is in scope, the following tools can be used to achieve passive scanning.

netdiscover -i [nic] -r [range] -p
ettercap -T -i [nic] -q -p

One of my favorite approaches during the host discovery, is to consult the arp cache in order to discover the hosts that my host on the network has connected to. I always discover some new host.

arp -a

Active scanning

Nmap

nmap -sn 192.168.0.0/24 
nmap –sP 192.168.0.0/24

The following nmap switch performs a full TCP scan. This scan is slower then the previous ones but can discover more hosts on the network and bypass the Firewall.

nmap -sT 192.168.0.0/24 

The following nmap switches are very useful in case you have a limited scope in your engagement and need to exclude some hosts that are not included in the scope. the "target.txt" is the file containing the ip's that you wan to scan and the "exclude.txt" is the file containing the ip's that you want to exclude.

nmap -sP -iL target.txt -excludefile exclude.txt

PreviousNmap favoritesNextPort scanning