Network in Security // Network Insecurity

| Subscribe via RSS

Showing posts with label network mapping. Show all posts
Showing posts with label network mapping. Show all posts

Sunday, May 31, 2009

p0f 2.0.8 Passive OS Fingerprinting

| 0 comments |

P0f v2 is a versatile passive OS fingerprinting tool to an attacker to determine an operating system on:

machines that connect to your box (SYN)
machines you connect to (SYN/ACK)
machines you cannot connect to (RST)
machines whose communications you can observe (MiTM?)
P0f can also do many other tricks, and can detect or measure the following:
firewall presence, NAT use (useful for policy enforcement)
existence of a load balancer setup
the distance to the remote system and its uptime
target's network hookup (DSL, OC3, avian carriers) and its ISP

All this can be performed even when the device in question is behind an overzealous firewall or packet filters, when our usual active scanner such as nmap can't do much. P0f does not generate ANY additional network traffic, direct or indirect. No name lookups, no mysterious probes, no ARIN queries, nothing.

Download p0f here:
p0f 2.0.8

A windows port of p0f can be found here:
p0f 2.0.4 Windows Port

And you can find out more about p0f here.

Saturday, May 30, 2009

How to Hide Your Nmap Scans

| 0 comments |

Network scans generate a lot of noise, and generally you may not want to get detected/caught while performing a network scan. Intrusion detection systems (IDS) such as Snort generally log the network activity and can therefore detect most network scans. The following guide suggests some of the possible methods used to reduce the noise generated by a network scan.


Option 1 - Use a Decoy Scan

This is generally the most effective method to hide your Nmap scans. Nmap has the -D option, which is known as decoy scan. With -D option it appears to the IDC on the remote target machine that there are several hosts scanning the target simultaneously. The target IDS might report 5-10 port scans from several unique IP addresses, but they won't know which is the IP that was actually scanning and which ones were decoys.

It is good practice to use actual IPs of existing machines for the decoys, not fictional and made-up ones, as it might result in a SYN flood due to the fact that the target machine will not get a RST.

However, a shortfall of this method is that it might generate large amounts of packets due to the decoys. Remember if we use 4 decoys, the traffic generating during the scan will be 4 times more compared to the usual SYN scan.

Use the following syntax to perform a Decoy scan, where IPs 192.168.1.1-4 are decoys and 127.0.0.1 is the target machine

nmap –sS –D 192.168.1.1,192.168.1.2,192.168.1.3,192.168.1.4 127.0.0.1


Option 2 - Changing the Time interval


Another possible method is to randomise the scan, which would involve changing the timing and scan interval. Nmap has a couple of timing options that controls the intervals between each packet sent. This way, the scans will be lost in all the other legitimate traffic and not as easily detected.

The timing options to be appended after the –T option :
1. Paranoid – one packet sent every 5 minutes
2. Sneaky – one packet sent every 15 seconds
3. Polite – one packet sent every 0.4 seconds
4. Normal – as quickly as possible
5. Aggressive – waits 1.25 seconds for a response
6. Insane – waits 0.3 seconds for a response
The syntax below highlights the example of a nmap scan which sends out a packet every 15 seconds when the Sneaky option is used:
nmap –sS –T Sneaky 127.0.0.1


Option 3 - Randomise Hosts

The –-randomize-hosts option rearranges the group of hosts in an nmap scan. Groups of 2,048 hosts at a time are randomly chosen, making the entire scan less conspicuous when examining traffic patterns. This can make the scans less obvious to various network monitoring systems and IDS, especially used in combination with slow timing options. But do note that this method only works if you are scanning several hosts at once.

The syntax below highlights a combination usage of random hosts and change of time interval between scans:
nmap -sS -T Sneaky --randomize-hosts 127.0.0.1-20


Option 4 - Using a Zombie


This method is also known as the "idle scan" method. This tells Nmap to do a ping sweep and show all hosts that are up in the given IP range. Once a zombie is found, nmap uses port 1234 on the IP 192.168.1.1 as a zombie to scan the target machine 127.0.0.1
nmap -P0 -sS 192.168.1.1:1234 127.0.0.1
Read more on idle scanning here


Note: IP Spoofing is another approach widely used in the network security industry, but it will not work in Nmap, ( even though nmap has the spoof IP function), due to the fact that the SYN/ACK reply packets from the target machine will not be sent to your machine, instead it will be sent to the spoof-ed IP address.

Thursday, May 28, 2009

Nmap 4.85 beta 9 port scanner released for download

| 0 comments |

Fyodor has recently released a new version of the popular security scanner.

Nmap is a "Network Mapper", which is used to discover computers and services on a computer network, thus creating a "map" of the network. Nmap is able to send IP packets different from the usual TCP/IP protocols used in order to get a response from the remote machine to determine what hosts are available on the network, what services and version are running on those machines, and also able to determine the operating system (OS) and also whether there is a firewall/packet filter in use.



Nmap can be run in both command line and graphical user interface (GUI) mode, which uses Zenmap, the official GUI frontend. Zenmap also features Topology, which is an interactive, animated visualization of the connections between hosts on a network. Hosts are shown as nodes on a graph that extends radially from the center. Click and drag to pan the display, and use the controls provided to zoom in and out. Click on a host and it becomes the new center. The graph rearranges itself in a smooth animation to reflect the new view of the network. Run a new scan and every new host and network path will be added to the topology automatically.



Several notable changes in this latest version are:

Multiple bugcrash fixes
Integrated 1,156 OS detection fingerprints
Detection includes Microsoft Windows 7 beta, Linux 2.6.28 etc
Improved SSL funtionality

For a complete list of changes, please visit here

Download the latest version of Nmap here:

Nmap 4.85 beta9

And you can find out more about Nmap here