Tag: nmap

  • How to find Operating System of a remote computer using nmap?

    How to find Operating System of a remote computer using nmap?

    Nmap is a network exploration and security auditing tool. It can be used to identify hosts and services on a network, as well as security issues. Nmap can be used to scan for vulnerable open ports on systems.

    To identify Operating System on a remote server or computer, you can use the command

    sudo nmap -O REMOTE_COMPUTER_IP
    

    Example

    boby@sok-01:~$ sudo nmap -O ok.serverok.in
    Starting Nmap 7.80 ( https://nmap.org ) at 2022-09-18 03:03 IST
    Nmap scan report for ok.serverok.in (51.38.246.115)
    Host is up (0.18s latency).
    rDNS record for 51.38.246.115: ok
    Not shown: 984 closed ports
    PORT      STATE    SERVICE
    23/tcp    filtered telnet
    25/tcp    filtered smtp
    80/tcp    open     http
    135/tcp   filtered msrpc
    139/tcp   filtered netbios-ssn
    443/tcp   open     https
    445/tcp   filtered microsoft-ds
    593/tcp   filtered http-rpc-epmap
    1900/tcp  filtered upnp
    2323/tcp  filtered 3d-nfsd
    3005/tcp  filtered deslogin
    3333/tcp  open     dec-notes
    5555/tcp  filtered freeciv
    10001/tcp open     scp-config
    50002/tcp filtered iiimsf
    52869/tcp filtered unknown
    Aggressive OS guesses: HP P2000 G3 NAS device (90%), Linux 2.6.32 (89%), Linux 2.6.32 - 3.1 (89%), Ubiquiti AirOS 5.5.9 (89%), Ubiquiti Pico Station WAP (AirOS 5.2.6) (88%), Linux 2.6.32 - 3.13 (88%), Linux 3.0 - 3.2 (88%), Infomir MAG-250 set-top box (88%), Linux 3.7 (88%), Netgear RAIDiator 4.2.21 (Linux 2.6.37) (88%)
    No exact OS matches for host (test conditions non-ideal).
    Network Distance: 18 hops
    
    OS detection performed. Please report any incorrect results at https://nmap.org/submit/ .
    Nmap done: 1 IP address (1 host up) scanned in 10.94 seconds
    boby@sok-01:~$ 
    

    See nmap

  • Find all open ports using nmap

    To find all open ports on a computer, run

    nmap -P0 -vv -sS -ff -r -n -p 1-65535 IP_ADDR_HERE
    

    -sS = SYN scan

    if you only need to scan most common ports, use

    nmap IP_ADDR_HERE
    

    Example

    nmap list ports

    To see open ports on your local computer, run

    nmap localhost
    
    nmap -p 22 IP_ADDR Scan a single port
    nmap -p 1-100 IP_ADDR Scan range of ports
    nmap -p- IP_ADDR Scan all 65535 ports
    nmap -F IP_ADDR Scan most popular 100 ports (fast scan)

    See nmap

  • Find all live hosts on your network

    nmap can be used to get list of all devices on your network.

    To scan IP range 192.168.1.1 to 192.168.1.255, run

    nmap -sP 192.168.1.1-255
    

    You can also use CIDR notation like

    nmap -sP 192.168.1.0/24
    

    nmap

    You can also use

    -sL: List Scan - simply list targets to scan
    -sn: Ping Scan - disable port scan
    

    To idenify the host OS and check if ports 80 and 8080 open, run

    sudo nmap -sS -O -p80,8080 192.168.1.1-255
    
  • Find all devices in your LAN using nmap

    Find all devices in your LAN using nmap

    Find all live hosts on your network
    Find all open ports using nmap
    How to find Operating System of a remote computer using nmap?

    Find all devices connected to your LAN network.

    nmap -sn 192.168.1.0/24
    

    Replace 192.168.1.0/24 with whatever subnet you use.

    nmap

    nmap -p 80 IP_ADDR Scan specific port
    nmap -p 100-1000 IP_ADDR Scan range of ports
    nmap -F IP_ADDR Scan most used 100 ports
    nmap -p- IP_ADDR Scan all ports

    Disable TLSv1 in Nginx