Host Discovery (nmap) - 5huckle/OFFICIALTECHJOURNAL GitHub Wiki

Important Ports:

Syntax Tips:

grep -Ev # (how to exclude code from grep)

nmap

nmap can scan a range of ip addresses

-sn is a portless scan of an ip address or a range of ip addresses

ACT-2 1-2

(How to ping a range of IP addresses and flush the important information to a file)

ACT-2 1-6

(Using nmap to scan 'alive' hosts)

Code Examples

sudo nmap x.x.x.x -p 3389

nmap useful options

-A: Enable OS detection, version detection, script scanning, and traceroute

-sL: List Scan - simply list targets to scan

-sn: Ping Scan - disable port scan

-Pn: Treat all hosts as online -- skip host discovery

-p : Only scan specified ports. Can scan multiple ports separated by a , (i.e 80,53,443,3389)

-O: Enable OS detection

-sV: Probe open ports to determine service/version info

-S <IP_Address>: Spoof source address

-oN/-oX/-oS/-oG : Output scan in normal, XML, s|<rIpt kIddi3, and Grepable format, respectively, to the given filename.

Troubleshooting

Everytime you reset your kali box, you must restart wireguard

  • sudo wg-quick up wg0

Reflection

Issues

I did not have too many issues with this lab. I had issues with cyber.local, however those issues were resolved after changing my password.

⚠️ **GitHub.com Fallback** ⚠️