Phase 1: Reconnaissance
A lot of this phase focuses on information gathering using Social Engineering and Dumpster Diving and while I don't doubt that these are useful skills to know it is difficult to practice in a home/lab environment. I'm not going to try and sweet talk myself into giving me my passwords and I don't really fancy rummaging around in the bins, the neighbours might find that odd! There are other techniques described as well like interrogating DNS servers, Whois searches etc but they are not really relevant at the moment, I already have access to the network so I am going to concetrate on simulating an internal pen test.
Phase 2: Scanning
First I will attempt to discover what live machines there are on the network. The easiest way to do this is by sending an ICMP echo request or ping. I don't want to do this by hand so I am going to use one of the Network Scanning tools in Backtrack (BT5). The first one in the list is Autoscan, this is what I see when I fire it up:
Next I can specify the subnet I wish to scan. I have removed some of the default entries as I know what the network and subnet mask is in this case
I skip through the next few options without changing anything, I am surprised by the results for two reasons. One I wasn't expecting the tool to attempt to fingerprint (identify) the host systems as well as ICMP scanning them and two I wasn't expecting to see this many hosts on my network!
I started this quite late in the evening and I'd really like to go to bed now but I just know I won't be able to sleep until I've figured out what all these hosts are and if they all belong to me or not! I skip forward a few pages in the book and come to the section describing Nmap. I decide to see if Nmap will provide any more information about the hosts than Autoscan.
Although there is a GUI with Nmap I have decided to force myself to learn the command line. If there is a choice between GUI and CLI I always try to use the CLI as it gives you more flexibility and, I believe, a better understanding of the product. So I start scanning each host in order using 'nmap -O
ip address'.
Don't really need to go much further than the first line, 'my.router' kind of gives it away what this device is. The MAC address OUI at the bottom confirms that this is my ADSL router. Interestingly though on the Aggresive OS guesses it doesn't list Draytek at all.
192.168.1.10 has been identified correctly by AutoScan so I move onto .11. Nmap reports that the host seems down, I go back to AutoScan to check but it is reporting that it is still up. Nmap helpfully suggests using the -Pn option if you believe the host is really up, this option will treat all hosts as online and skip host discovery:
Ahhh, the iPhone! Had forgotten about that! To confirm I try to lookup the OUI (first 6 character of the mac address) on http://www.coffer.com/mac_find/ but it comes back as unknown. Mr Google, however, returns a result from hwaddress.com listing it as belonging to Apple Inc.
192.168.1.12 I know to be my Backtrack VM so I bypass that but .13 has now gone off the network. Bit worrying. I tried a simple ping and left it running, occasionaly the host responds and then goes unreachable again. I will keep the ping running and try a quick scan if it starts replying. Moving on to .14 this should be interesting as AutoScan identified this as a firewall. Nmap -O is taking a bit longer to come back this time round, eventually it reports that all 1000 scanned ports are filtered and it has no idea of the OS. I know this device to be my laptop running a personal firewall. It is good to know that it is doing its job well but I will return to this again and see if there are any other ways of identifying it with Nmap or another tool.
192.168.1.15 returns a few open ports including ftp, ssh, http, https and mysql. The OS is detected as Linux 2.6.X and the MAC address is a VMWare one. I believe this to be my DVWA (Damn Vulnerable Web Application) VM.
192.168.1.16 returns a single open port (SSH) but it is not sure which OS. From the agressive guesses it's pretty sure its Linux of some kind. And it is, this is a Redhat VM.
192.168.1.19 is the last one on the list which I know to be my VMWare host. Nmap picks up seven open ports but is unable to identify the operating system.
EDIT: with the Linux VMs and VMWare I need to spend some more time on trying to find out what they are using penetration testing tools and techniques rather than just utilising my knowledge of my network setup.
And just as I'm about to fall asleep on my keyboard the .13 host starts replying again. I quickly break the ping and run nmap -Pn:
Ninendo? Must be the Wii!! This has been switched off all day but it must periodically connect to the WiFi to check for updates or something. Nice and locked down though, no open ports!
Conclusions so far: Might not bother with AutoScan in the future. It has a nice GUI but from my initial findings Nmap appears to give more information. It looks like there are command line options for scanning subnets as well so I will try them next time.