Scanning Lab


In this lab, I needed to scan the 10.50.96.0/23 netblock to find all the live hosts and then enumerate which operating systems and services were running on them. The above picture shows that there were two subnets.

I started by using nmap to scan the netblock using ICMP ping and timestamp packets. I then scanned again using nmap's half-open SYN scan. Next, I scanned the most common UDP ports.




Next, I scanned the netblock again using port 53 as the source as well as the destination port. This is because sometimes machines are set up to only allow data coming from specific ports. This means that sometimes DNS requests will only be accepted from port 53. Using this method, I discovered one more host @ 10.50.97.25


My next job was to compile a concise list of live hosts based on the previous scans. I noticed as I was doing this that the hosts on the 10.50.96.0/24 subnet did not respond to the TCP packets, though they had responded to the ICMP traffic.


I then broke the next part of the enumeration into two main parts. I first of all scanned all the ports for a machine and saved the open port numbers as a variable and then into a .txt document. I then did a full service scan along with running OS discovery and default scripts for each open port on the machine. In this way, the process of service enumeration was faster than running the aggressive scans against every port. I noticed that the machines on the 10.50.96.0/24 subnet did not return any ports as being open when scanned in this way. This reinforced what I had discovered earlier and suggested that they were behind a firewall.




In order to attempt to scan the machines on the 10.50.96.0/24 subnet, I used hping3 to try to find a zombie machine in the 10.50.97.0/24 subnet.

I found that the machine @ 10.50.97.10 was not active on the network. This was easy to tell as the IPID number for each packet only increased by 1 whereas on the other machines I tested it increased by more than 1




Now that I had found a zombie machine, I was able to spoof its IP address and send packets to machines on the 10.50.96.0/24 subnet then observe the IPIDs on the packets of data I was receiving back from packets I was sending to the zombie machine. For some ports on some machines, the IPID only increased by 1 each time, which let me know that the remote machine on the 10.50.96.0/24 subnet was either closed or filtered as it had not sent a SYN / ACK packet back to the zombie machine in response to the spoofed packets. On some ports on some machines, the IPIDs increased by more than 1. This allowed me to deduce that those ports were open to connections from the zombie machine because it was likely to be sending RST packets of data in reply to the SYN / ACK packets which the targeted 10.50.96.0/24 machine was sending to it. This happens because the zombie machine is not expecting a SYN / ACK packet as it did not send a SYN packet - my attacking machine did but by spoofing the zombie machine's IP address.





To finish this lab, I wrote up a brief summary of my findings along with a document which listed clearly all that had been ascertained during the scanning.




Popular posts from this blog

Hacking Year of the Owl (thm)

Hacking Reset (thm)

Simple CTF (tryhackme)