Basic Nmap Scans
This guide was created to provide a guide of what I have been doing when starting a new HackTheBox machine.
OverviewPermalink
This guide was created to help anyone who may want to get into HackTheBox hacking. Tis guide will go through multiple examples depending on certain common ports that may be open on the network as well as general things.
Starting the NMAP scanPermalink
When I start a machine I like to perform two different nmap scan.
The first is a lot shorter however it is possible that it may miss some useful information.
nmap -sC -sV -oA <ip>
- -sC will make the scan run with default scripts
- -sV will probe all open ports to attempt to determine the service and version info
- -oA will change how the results are outputted
The second is much longer however will result in more detailed infromation.
nmap -sC -sV -O -p- -Pn --script="safe" <ip>
- -sC will make the scan run with default scripts
- -sV will probe all open ports to attempt to determine the service and version info
- -O will enable OS detection
- -p- will make scan all ports even ones that are closed
- -Pn will treat all hosts as online
- –script=”safe” will run a set of scripts
Usually I run them both at the same time and work on the information found in the first scan whilst waiting for the second scan to finish.