Unit 2
Unit 2
“The more information you have about the target, the more is
the chance of successful exploitation.”
https://www.youtube.com/watch?v=tvE6C9OVisc
https://www.youtube.com/watch?v=tvE6C9OVisc
whois www.techlotips.com
You would see the following output after giving whois
command.
You can see that it has revealed some interesting information
such as the e-mail of the owner and the name servers, which
shows that hostagtor.com is hosting this website.
Finding Other Websites Hosted on the Same
Server
Reverse IP lookup method is used to find the domains
hosted on the same server.
ping www.techlotips.com
Just replace your IP with your target’s IP, and it will show you
the exact location of the webserver via Google Maps.
http://www.ip-address.com/ip_tracer/ 50.22.81.62
Traceroute
Traceroute is a very popular utility available in both
Windows and Linux.
Traceroute
https://www.youtube.com/watch?v=up3bcBLZS74
ICMP(Internet Control Message Protocol):
$ tcptraceroute www.google.com
UDP (User Datagram Protocol) Traceroute:
$traceroute www.google.co.in
Enumerating and Fingerprinting the
Webservers
The first thing you should probably try is to send an http request to
a webserver and intercept the response.
For that purpose, you would need a web proxy such as Burp Suite,
Let’s try to find out the name and version of the webserver running behind
www.google.co.in by using Burp Suite
Step 1—First, download the free version of Burp Suite from the following
website: http://portswigger.net/burp/
Under “website” type your desired website and click “Next” and it will
give you the exact version
of webserver.
WhatWeb
It has more than 900 plug-ins capable of identifying server version, e-mail
addresses, and SQL errors.
https://developers.google.com/search/docs/crawling-indexing/robots/create-robots-txt
Inurl: Inurl is a very useful search query. It can be used to return URLs with specific
keywords.
Site: www.techlotips.com inurl:ceo names
This query will return all URLs with the given keyword.
Filetype: Site: www.msn.com filetype:pdf You can also ask Google to return specific files
such as PDF and .docx by using the filetype query
Lots of Webmasters of websites that sell e-books and other products forget to block the URL
from being indexed. Using filetype, you can search for these files, and if you are lucky, you
may be able to download products for free.
Google Hacking Database:
Google hacking database has a list of many Google dorks that could be
used to find usernames, passwords, e-mail list, password hashes, and
other important information.
https://www.exploit-db.com/
From the above link we can download the program and run it and we
can read the purpose of the program with code.
Xcode Exploit Scanner:
Xcode exploit scanner is an automated tool that uses some common Google dorks to
scan for vulnerabilities such as SQLI(SQL Injection) and XSS(Cross-Site Scripting).
SQLI-Servers-side attack
XSS-Client-Side attack
(Chapter 12).
File Analysis:
Analyzing the files of the target could also reveal some interesting information such
as the metadata (data about data) of a particular target. (Chapter 8)
Foca:
Foca is a very effective tool that is capable of analyzing files without downloading
them. It can search a wide variety of extensions from all the three big search engines
(Google, Yahoo, and Bing). It’s also capable of finding some vulnerabilities such as
directory listing and DNS cache snooping.
Harvesting E-Mail Lists
Gathering information about e-mails of employees of an organization can give us a very broad attack
vector against the target.
These e-mail lists and usernames could be used later for social engineering attacks and other brute force
attacks.
Luckily, we have lots of built-in tools in BackTrack that can take care of this. One of those tools is
TheHarvester, written in Python (theHarvester.py).
Now, let’s say that we are performing a pentest on Microsoft.com and that we would like to gather e-
mail lists. We will issue the following command:
The -l parameter allows us to limit the number of search results; for example, here we have limited it to
500 by assigning –l 500 command.
https://www.youtube.com/watch?v=VytCL2ujjcA
Gathering Wordlist from a Target Website :
After we have gathered e-mail lists from search engines, it would be really
useful for us to gather a list of words that we would use for brute forcing
purposes.
A very common way of searching for subdomains is by using a simple Google dork.
Even though you won’t be able to find all the subdomains with this method, you can find some important ones.
http://msn.com -inurl:www (This query is telling the search engine to return results without www which are
normally subdomains).
TheHarvester can also be used for this task, which uses Google to search for subdomains.
Fierce is also an amazing tool for scanning subdomains. It is also capable of bypassing CloudFlare
protection.
To scan a host for subdomains, you need to issue the following command from the fierce directory.
Since an attacker on the local network could easily sniff the traffic, most highly sensitive communications such as
“login pages” use https (Port 443).
There are two versions for SSL, that is, SSL 2.0 and SSL 3.0. SSL 2.0 is known to be deprecated as an attacker can
easily decrypt the traffic between the client and the server by using various sniffing methods. Therefore, it is
highly recommended to use either SSL 3.0 or TLS 1.0 for web pages where highly confidential information is
being sent and received.
BackTrack has a great tool SSLSCAN preinstalled, which checks what version of SSL, 2.0 or 3.0, a server is
running.
$sslscan www.google.com
DNS Enumeration:
Without a domain name, Google.com would just be 173.194.35.144, which is it’s IP. Imagine having
to memorize the IPs of all the websites you visit—surfing the Internet would become really difficult.
That’s why DNS protocol was developed. It is responsible for translating an IP address to a domain
name. DNS is one of the most important sources of information on public and private servers of the
target.