CS Lab 2
CS Lab 2
CS Lab 2
No: 3
Perform open source intelligence gathering using Netcraft, Whois Lookups, DNS
Date: Reconnaissance, Harvester and Maltego
Aim:
To Perform open source intelligence gathering using Netcraft, Whois Lookups, DNS
Reconnaissance, Harvester and Maltego in Kali Linux.
Procedure:
Netcraft:
Netcraft is web extension allows us to gather information about a target domain, such as
network block information, registrar information, email contacts, the operating system of the
hosting server,and the web platform.
Typethisurlinyourbrowserhttps://sitereport.netcraft.com/
For example, type the company url for Microsoft, Facebook, etc. It will display information
about the company.
Whois lookups:
Whois is the Command in Linux. It is also an information gathering tool.
To Run WHOIS
whois domain_name
DNS Reconnaissance:
DNS Reconnaisance is part of the information gather stage of hacking or penetration testing.
dnsenum.pl: multithread script to enumerate information on a domain and to discover non-
contiguous ip blocks.
1) Get the host's addresse.
2) Get the name servers (threaded).
3) get the MX record (threaded).
4) Perform axfr queries on name servers (threaded).
5) Get extra names via google scraping.
6) Brute force sub domains from file (threaded).
7) Calculate C class domain network ranges and perform whois
queries on them (threaded).
8) Perform reverse lookups on C class or/and whois
network ranges (threaded).
9) Write to domain_ips.txt file non-contiguous ip-blocks results.
Install DNSenum:
1. sudo apt install libtest-www-mechanize-perl libnet-whois-ip-perl
2. apt-get install cpanminus
3. Dnsenum msn.com
4. Don’t do a reverse lookup (-noreverse) and save the output to a file (-0 mydomain.xml) for
the domain example.com:
Dnsenum -noreverse -o mydomain.xml example.com
Advanced scan
dnsenum –enum hackthissite.org
ToolsusedforDNSReconnaissance:
nslookup
DIG
nslookup:
To gather ip address and Name service from the organization.
DIG:
HARVESTER:
The Harvester is a command-line tool included in Kali Linux that acts as
awrapperforavarietyofsearchenginesandisusedtofindemailaccounts,subdomainnames,virtualhos
ts,openports/banners,andemployeenames relatedto adomain fromdifferentpublicsource
openterminal
Type theHarvester-ddomainname-l300-bgoogle
MALTEGO:
Maltego is an open source intelligence and forensics application. It will offer timeous mining
and gathering of information as well as the representation of this information in a easy to
understand format.
Result:
Various data collection tools have been successfully tested on Kali Linux.
Ex.No: 4
Understand the nmap command and scan a target using nmap
Date:
Aim:
To Understand the nmap command d and scan a target using nmap.
Nmap:
Nmap is a network scanning tool—an open source Linux command-line tool—used for
network exploration, host discovery, and security auditing. It is a predefined tool in kali.
Uses:
TofindtheTargethostinliveorDead.
TofindOpenPort.
OpenServices.
Vulnerableinformation.
Versiondetails
OSdetails
Procedure:
Step1: Let as consider the victim machine as windows open windows cmdand
typeipconfigitwill displaytheip address.
Unfilteredtcpindicatesnofirewallprotection.
Ex.No: 5
Install metasploitable2 on the virtual box and search for unpatched
Date:
Aim:
To install metasploitable2 on the virtual box and search for unpatched.
Procedure:
Metasploitable2:
A test environment provides a secure place to perform penetration testing and security
research. For the test environment, we need a Metasploit instance that can access a vulnerable
target. The following sections describe the requirements and instructions for setting up a
vulnerable target.
Step2:
Add it in to virtual machine and open it.
Step3:
To check vulnerability of the machine Type ifconfig in Mertasploitable2, it will display ip
address.
Step4:
Open kali terminal Type nmap-sV-oipaddress it will display the version and ip.
Result:
The Metasploitable2 was installed and successfully showed the results of
scanned vulnerabilities.