Site Links

Saturday, 14 June 2014

NMAP- The king of scanners

                               
 

Introduction : 

 

Nmap ("Network Mapper") is a free and open source  utility for network discovery and security auditing. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. It was designed to rapidly scan large networks, but works fine against single hosts. Nmap runs on all major computer operating systems, and official binary packages are available for Linux, Windows, and Mac OS X.



Testing Whether Nmap is Already Installed : 

 

The first step toward obtaining Nmap is to check whether you already have it. Many free operating system distributions (including most Linux and BSD systems) come with Nmap packages, although they may not be installed by default. On Unix systems, open a terminal window and try executing the command nmap --version. If Nmap exists and is in your PATH,you should see outputwhich shows the current version of nmap in your system.


If Nmap does not exist on the system (or if your PATH is incorrectly set), an error message such as "nmap: Command not found" is reported.



Command-line Interface of Nmap:

 

Nmap has traditionally been a command-line tool run from a Unix shell or (more recently) Windows command prompt. This allows experts to quickly execute a command that does exactly what they want without having to maneuver through a bunch of configuration panels and scattered option fields. This also makes Nmap easier to script and enables easy sharing of useful commands among the user community.



Linux/Unix Compilation and Installation from Source Code :

 

While binary packages (discussed in later sections) are available for most platforms, compilation and installation from source code is the traditional and most powerful way to install Nmap. This ensures that the latest version is available and allows Nmap to adapt to the library availability and directory structure of your system. For example, Nmap uses the OpenSSL cryptography libraries for version detection when available, but most binary packages do not include this functionality. On the other hand, binary packages are generally quicker and easier to install, and allow for consistent management (installation, removal, upgrading, etc.) of all packaged software on the system.
Source installation is usually a painless process—the build system is designed to auto-detect as much as possible. Here are the steps required for a default install:
  1. Download the latest version of Nmap in .tar.bz2 (bzip2 compression) or .tgz (gzip compression) format from http://nmap.org/download.html.
  2. Decompress the downloaded tarball with a command such as: bzip2 -cd nmap-<VERSION>.tar.bz2 | tar xvf -
    With GNU tar, the simpler command tar xvjf nmap-<VERSION>.tar.bz2 does the trick. If you downloaded the .tgz version, replace bzip2 with gzip in the decompression command.
  3. Change into the newly created directory: cd nmap-<VERSION>
  4. Configure the build system: ./configure
    If the configuration succeeds, an ASCII art dragon appears to congratulate you on successful configuration and warn you to be careful, as shown below.


    Example:  Successful configuration screen


    flog~/nmap> ./configure
    checking build system type... x86_64-unknown-linux-gnu
    [hundreds of lines cut]
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating nsock_config.h
    config.status: nsock_config.h is unchanged
       (  )   /\   _                 (
        \ |  (  \ ( \.(               )                      _____
      \  \ \  `  `   ) \             (  ___                 / _   \
     (_`    \+   . x  ( .\            \/   \____-----------/ (o)   \_
    - .-               \+  ;          (  O                           \____
    (__                +- .( -'.- <.   \_____________  `              \  /
    (_____            ._._: <_ - <- _- _  VVVVVVV VV V\                \/
      .    /./.+-  . .- /  +--  - .    (--_AAAAAAA__A_/                |
      (__ ' /x  / x _/ (                \______________//_              \_______
     , x / ( '  . / .  /                                  \___'          \     /
        /  /  _/ /    +                                       |           \   /
       '  (__/                                               /              \/
                                                           /                  \
                 NMAP IS A POWERFUL TOOL -- USE CAREFULLY AND RESPONSIBLY
    Configuration complete.  Type make (or gmake on some *BSD machines) to compile. 
      

    Nmap for Windows Platform : 

     

    While Nmap was once a Unix-only tool, a Windows version was released in 2000 and has since become the second most popular Nmap platform (behind Linux). Because of this popularity and the fact that many Windows users do not have a compiler, binary executables are distributed for each major Nmap release. Nmap supports Windows 7, Windows Server 2008 and 2003, Windows Vista, and Windows XP SP1 and later.




    Windows Self-installer :


    Every Nmap release includes a Windows self-installer named nmap-<version>-setup.exe (where <version> is the version number of the specific release). Most Nmap users choose this option since it is so easy. Another advantage of the self-installer is that it provides the option to install the Zenmap GUI and other tools. Simply run the installer file and let it walk you through panels for choosing an install path and installing WinPcap. After it completes, read the section called “Executing Nmap on Windows” for instructions on executing Nmap on the command-line or through Zenmap.

    Nmap Usage :

     1. TCP SYN SCAN  

    1. nmap  -sS  target ip 

     

     

    2. TCP CONNECT SCAN : 

    2. nmap  -sT  target ip

     

     

    3. XMAS SCAN :

    3. nmap  -sX  target ip

     

     

    4. FIN SCAN :

    4. nmap  -sF  target ip

     

     

    5. NULL SCAN :

    5. nmap  -sN  target ip

     

     

    6. UDP SCAN :

    6. nmap  -sU  target ip

     

     

    7. ACKNOWLEDGEMENT SCAN :

    7. nmap  -sA  target ip

     

     

     

     

    Nmap help in backtrack :

     

    If you want to read more about Nmap open the terminal window in your backtrack and typein there :  "man nmap" and press the enter button. You will see the detailed information about NMAP.

    For  getting help on usage and different on nmap typein the following command  in terminal to see it.

    "nmap --help" and press enter Key. 

     

THANKS FOR SUPPORT......KEEP VISITING FOR MORE UPDATES.











No comments:
Write comments
© 2020 ETHICAL HACKING. Designed by Vijay Patel
Powered by Blogger.