Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CS Lab 2

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 10

Ex.

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.

This package replaces previous packages matlegoce and casefile.

Installed size: 231.26 MB


To install: sudo apt install maltego

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.

Note: The ipv4 address :192.168.139.1(This is the victim machine ip)

Step 2: First we need to check the system in live or dead.


nmap–PU victimip (ThiscommandcheckUDPHostinliveordead.)
nmap=PR victimip (This command checkARPhostin liveordead.)
nmap=PSvictimip (ThiscommandcheckTCPsynping hostinliveor dead.)
nmap=PA victimip (This command checkTCPackpinghostin liveordead.)
Step3:Check Firewall Protection is in or not for that type:nmap-SA192.168.139.1

Filtered tcp indicates firewall protection on this device.

Unfilteredtcpindicatesnofirewallprotection.

step4:To check version details: nmap-sV192.168.139.1

step5: To find OS:nmap –O 192.168.139.1


Result:
Thus the scanning process was successfully completed using nmap.

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.

Step to install Metasploitable2:

Step1:Download metasploitable2onyour windows by the link


https://information.rapid7.com/download-metasploitable-2017.html
Extract the zip file and install it into your virtual machine.eg(VBOX,Vmware).

Step2:
Add it in to virtual machine and open it.

Here the user name and password are in by default ''msfadmin''.

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.

You might also like