Active Information Gathering



Active Information gathering

Viraj Dissanayake

  • The way of using the nmap, thehavester, dnsenum security tool packages
have been demonstrated in the lab session.


  1. Nmap(Network mapper) – A security scanner which use to discover hosts &
services on a network
  1. Netcat – A network analysis tool which use to open up TCP and UDP
connections between two hosts
  1. Thehavester – use to gather emails, subdomains, hosts, open ports details
  2. dnsenum – use to enumerate DNS information of a domain and to discover
non-contiguous IP blocks


  • Methodology


  • To represent two hosts, two virtual machines has been used which were
installed in the same pc/laptop. in this lab session.


  • Step 1 –  Establishing the connection between the two hosts
  • Step 2 -  Then used each of those mentioned packages for active
information gathering




1 – nmap 192.168.56.99/24 – this command scans a subnet

The results show that there are 12 open ports available in different services
2 – nmap 192.168.56.99-120 – This command scans a range of IPs.
3 – nmap –p 80 192.168.56.99 – Scans a single port
Displays the status of the port that has been scanned
4 – nmap –sS 192.168.56.99   (TCP SYN scan) – Determine whether the port is listening using the technique
called half-open scanning. Privilege level access will be needed to run this command.
If the privileges are not sufficient nmap –sT command can be used.
  
Difference of nmap –sS and nmap –sT
                      namp –sS                                                                                         nmap –sT
  • need privilege access                                                                            doesn’t need privilege access
  • doesn’t establish full TCP connection                                                need to establish full TCP connection
  • faster scans                                                                                             slower than SYN scans


5 – nmap –O 192.168.56.99 – use to detect the operating system of the target host


The scan results show that the target device use Windows 2000 server


6 – nmap –sV 192.168.56.99 – Use to scan for running services. This is equivalent to namp -A
Scan results display the running services and the version details
7 – nmap –sU 192.168.56.99 – use to perform UDP scans.
Scan results displays the UDP ports which are in open or filtered state


8 – nc –h – Use to display the netcat manual


9 – nc 192.168.56.99 80 – Use to connect to a web server on port 80
     This establish a TCP connection
10 – nc –l –p 80 – Use to listen to inbound connections from port 80
     
After establishing the TCP connection, two hosts can start communication by listening through the ports.
11 – nc 192.168.56.99 80
        HEAD /HTTP/1.0        - Use to identify the web server software of the target
Scanned results show that the target is using  Microsoft-IIS/5.0 Sever
12 – theharvester –d sliit.lk –l 10 –b google – use to search for email addresses from a domain by limiting
results to 10 using google as search engine


13 – dnsenum –h – displays the dnsennum manual


--dnsserver – use this option to translate the web address to IP address
--noreverce – Skip the operation of IP address to domain name translation


14 – dnsenum --dnsserver 8.8.8.8 --enum sliit.lk
Scan results shows the details of Name servers, Mail servers of the scanned domain
Zone transfer has been failed since the resend system is secured by SLIIT.
These scanned information are not getting saved.
To save the log, need to specify the path you want to save the file and use brute force to obtain all the sub
domains.
(Zone transfer – Use to replicate DNS databases across s set of DNS servers, by administrators)  


14 – dnsenum --dnsserver 8.8.8.8 --enum –f /usr/share/dnsenum/dns.txt --subfile /home/viraj/Documents
/AIA_Lab2.txt sliit.lk




Conclusion
  • These tools can be used to analyze assets, to prevent network attacks
  • Saving log files of the scans seems to be a good practice     


References –

Comments

Popular posts from this blog

Cross Site Request Forgery attacks mitigation

Splunk ES CI/CD pipeline