Information gathering using nmap

            NMAP|PENETRATION TESTING TOOL


INTRODUCTION

Nmap (Network mapper) is a free and open source tool used for network discovery and security auditing. Nmap is a CLI(command line interface) based tool originally written by "Gordon Lyon". NmapFE is the GUI(Graphical user interface) based tool originally written by "Zach Smith" which was later replaced with Zenmap which is also a GUI based on UMIT, developed by "Adriano Monteiro Marques".To accomplish its goal, Nmap sends specially crafted packets to the target host(s) and then analyses the responses that it receives from the hosts(s).


FEATURES 
  • All the hosts present in the network along with their IP addresses can be discovered.
  • Scans all the ports and give information about all the open and closed ports along with the port numbers.
  • Determines the operating system of the hosts.
  • Determines the application name and version number of remote devices.
  • Finding and exploiting vulnerabilities in a network.


COMMANDS

       Target Specification
  • (-iL) input filename from list of hosts/networks.
  • (-iR) choose random hosts.
  • (--exclude) Exclude hosts/networks.

       Host discovery
  • (-sL) List scan used to scan the listed targets.
  • (-sn) Disable port scan.
  • (-Pn) Skip host discovery.

      Scan Techniques
  • (-sS) TCP SYN scan performs quick scanning.
  • (-sT) Connect scan is the default TCP scan when SYN scan is not in option.
  • (-sA) ACK scan is used to map out the firewall.
  • (-sW) Window scan
  • (-sM) Maimon scan
  • (-sU) UDP scan
  • (-sX) Xmas scan

    Port Specification
  • (-p) specifies the ports
  • (-F) Fast mode, scans few ports than the default scan
  • (-r) scan port consecutively

      Version detection
  • (-sV) probe open ports to determine the service/version info
  • (--version-all) try every single probe
  • (--version-trace) show detailed version scan

      Script scan
  • (-sC)  equivalent to --script
  • (--script-trace) shows all data sent and received
  • (--script-updatedb) update the script database
  • (--script-help) show help option about script

     OS Detection
  • (-O) Enables os detection
  • (--osscan-guess) Guess os more aggressively

      Nmap Output Option
  • (-oN) output normal
  • (-oX) output to XML
  • (--open) shows open ports
  • (--packet-trace) shows all packets sent/received
  • (--resume FILENAME) Resume an aborted scan

      Misc Nmap Options
  • (-6) enables IPv6 scanning
  • (-A) enables os detection, version detection
  • (--privileged) assume that user is fully privileged
  • (-V) show nmap version number
  • (-h) show nmap help screen



NMAP EXAMPLES


1.  ifconfig

    This command will show the private IP of the machine on which the user is working.
              



2. route -n

   This command will show the default gateway.

   



3. nmap -sP  192.168.32.2/24
    
    Ping scan the network to find all the hosts present in the network where (192.168.32.2) is the default gateway and (/24) means that the first 24 bit of the IP address will remain constant and the last 8 bit will change and the scan will proceed.

 

  

4. nmap -p 1-65535 -sV -sS -T4 Target

   This command scans all the 65535 ports along with the service versions detection



5. nmap -v -sS  -A -T4 Target
   
  This command runs the SYN scan, os and version detection, traceroute and script against target.

    
   


6. nmap -v -sV -O -sS -T5 Target

  This command runs the SYN scan, prints verbose output, os and version detection.

  
  


7. nmap -v -p 1-65535 -sV -O -sS -T4 Target

This command prints the verbose output, runs SYN scan, os and version detection along with the full port scan.

   
   


  







Comments

Popular posts from this blog

Is your email account safe?

New attraction for Hackers -GSTN(Goods and Service tax network)

Big Blow to Android lovers-Judy malware