Posted on

Complete guide to Subfinder

Hello, aspiring ethical hackers. In our previous blogpost, you learnt what is footprinting and various techniques used for footprinting. In this blogpost, you will learn about subfinder, a tool that helps us in footprinting.

Subfinder is a sub domain discovery tool that queries and retrieves valid sub domains for a given domain or website. It is a simple tool that uses passive subdomain enumeration for this purpose.

Let’s see how to use this tool to perform subdomain enumeration. For this, we will be using Kali Linux as our attacker machine. Subfinder can be installed on Kali as shown below.

Subfinder 1

The simplest method to use subfinder to query a sub domain of a particular domain is as shown below.

Subfinder 2
Subfinder 3
Subfinder 4

Specify multiple domains at once (-dL)

This tool can also query multiple domains at once. You can supply these domains using a file. For example, let’s create a new file “Domains.txt” and add a domain as shown below.

Subfinder 5

This file can be provided as input to subfinder as shown below.

Subfinder 6

View all the sources of this tool (-ls)

Subfinder collects information from a number of sources like AlienVault, Anubis, Censys, Shodan etc. You can view all the sources the subfinder tool queries using the command given below.

Subfinder 7
Subfinder 8
Subfinder 9

Query a single source (-s)

You can specify subfinder to query just one source using (-s) option as shown below. For example, let’s just specify GitHub and Anubis as sources.

Subfinder 10
Subfinder 11

Query all the sources (-all)

We can also specify this tool to query all the sources using the “-all” option.

Subfinder 12

Exclude some sources (-es)

We can even exclude some sources as shown below. For example, let’s exclude GitHub.

Subfinder 13

Display the source this tool queried in results (-cs)

We can even display source information to be displayed in output using the “-cs” option as shown below.

Subfinder 14

Saving output (-o)

You can save the output of this tool to a file as shown below.

Subfinder 15

Silent mode

In this mode, sub finder just displays the sub domains it found and nothing else.

Subfinder 16

Posted on

Complete guide to sherlock tool

Hello aspiring ethical hackers. In our previous blogpost, you learnt what is OSINT and its importance in ethical hacking, different types of OSINT etc. In this blogpost, you will learn about Sherlock, a OSINT tool.

Sherlock’s role in OSINT comes while gathering information from social media. It works by hunting for a particular username across various social networks. It does this by relying on social media site’s design feature to provide a URL with the username when a user registers an account on the social network.

Sherlock queries that URL and determines if the user has an account on that particular social network. It works by querying that URL and then uses that response to determine if there is a username. Sherlock can search for users on over 300 social networks that include Apple Developer, Arduino, Docker Hub, GitHub, GitLab, Facebook, Bitcoin Forum, CNET, Instagram, PlayStore, PyPi, Scribd, Telegram, TikTok, Tinder etc.

Let’s see how this tool works. For this I will be using Kali Linux which has Sherlock in its repository. You can install sherlock on Kali as shown below.

Sherlock 1

The simplest way to query a username with sherlock is by just supplying a username.

Sherlock 2
Sherlock 3
Sherlock 4

Searching on a particular social media site

Instead of searching for a username on all the social media accounts, you can search for a username’s presence even on a single site as shown below. For example let’s search for a username on site Twitch.

Sherlock 5

Searching for similar usernames

Sometimes, a username can be slightly different to a person we are searching for. We can also search for similar usernames with this tool as shown below.

Sherlock 11

Here, {?} will be replaced with – or hyphen or period (.).

Searching for multiple usernames at once

You can even search for multiple usernames with this tool as shown below. For example, let’s search for “hackercoolmagazine” and “hackercool” on Instagram.

Sherlock 6

Using a proxy while searching

You can even route your query through a proxy to remain anonymous.

Sherlock 7

Dump the entire HTTP response

We can even see the HTTP response of the site while searching using this option.

Sherlock 8
Sherlock 9

Time to call

By default, while querying for usernames, this tool waits for 60 seconds for response to the request it made. With this timeout option, this time can be changed as shown below. The value should be set in seconds.

Sherlock 12

Print all the output

By default, Sherlock only prints out the social network where the username was found. Using the option, we can see all the social networks this tool queries for and also the reason why it was not found.

Sherlock 13
Sherlock 14

Print only positives found

This option prints out all the social networks on which the username is found.

Sherlock 15

Browse

By setting this option, we can use Sherlock to view the job result page on browser.

Sherlock 16
Sherlock 17

Search NSFW sites too

By default, sherlock doesn’t query NSFW sites while searching for a username. When we set this option, it even queries NSFW sites for the particular username.

Sherlock 18

Writing the output to a file

Like any other tool, we can use Sherlock too to save the output to a file of our choice using the “-o” option as shown below.

Sherlock 20
Sherlock 21

Posted on

Beginners guide to theHarvester tool

Hello, aspiring ethical hackers. In one of our previous blogposts, you learnt in detail about OSINT. In this blogpost, you will learn about a tool called theharvester that is used to gather open source intelligence (OSINT) on a company or domain.

Using theHavester tool, we can gather information like subdomain names, email addresses, virtual hosts, open ports, banners and employee names of an organization from different public sources like search engines, pgp key servers, IP addresses and URLs.

theHarvester is installed by default on almost all pen testing distros. For this tutorial, we will be using Kali Linux. theHarvester is very simple to use but very powerful during footprinting stage of a red team assessment or a penetration test. It can take a domain or an organization as target as shown below.

TheHarvester 1
TheHarvester 2

theHarvester can list a lot of entries as part of performing OSINT. You can specify the limit to the number of entries you want to be displayed.

TheHarvester 3

You can even start querying from particular entry form list of entries displayed. For example, you want to start querying from the 10th entry.

TheHarvester 4

–shodan

theHarvester also has a option called “–shodan” that queries the Shodan search engine for any open ports or banners from discovered hosts. However, this requires api keys.

TheHarvester 5

–screenshot

This command allows theHarvester to take screenshots of subdomains that are found.

TheHarvester 6

–dns-brute

As the command explains, you can brute force DNS servers using this option.

TheHarvester 7
TheHarvester 8

–source

theHarvester uses many public sources to collect information. Some of them are anubis, baidu, bing, brave, censys, etc. We can even ask it to use a specific source using the “–source” command.

TheHarvester 9
TheHarvester 10
TheHarvester 11

Learn how to perform OSINT using amass or Maltego or Spiderfoot.

Posted on

Beginners guide to amass

Hello, aspiring ethical hackers. In one of our previous blogposts, you learnt in detail about network footprinting. It is performed to discover assets of the organization that are exposed to the internet. In this blogpost, you will learn about a tool. amass that can discover majority of any organization’s exposed assets.

OWASP Amass used mainly to find assets mapped to a particular domain, perform sub-domain enumeration, autonomous system numbers (ASNs) etc. Although there are many other tools that can enumerate sub-domains etc. (for example gobuster), this tool as you can see is backed by OWASP. Let’s see how to use this tool to discover assets of an organization.

Amass is installed by default in almost all pen testing distros. For this blogpost, we will be using Kali Linux. It doesn’t have a man page yet, but we can see all the options it supports using the help option.

Amass 1 1

Amass has 5 subcommands as shown below.

Amass 2 1

Each subcommand has its own help section. For example, let’s see the “intel” subcommand first.

amass intel

Amass 3 1

The ‘intel’ subcommand is used to discover targets to perform enumeration later. We can specify an IP address, IP address range, domain etc as targets to this command.

Amass 4 1
Amass 5 1

Apart from these, even ASN can also be specified as target.

amass enum

This sub command is used to perform enumeration and network mapping of the discovered targets.

Amass 6

Using it, we can perform DNS enumeration too. All the findings of “amass enum” command are stored in a graph database, which is located in the amass’s default output folder. To enumerate subdomains of a domain using amass enum, this is the command.

amass enum -d owasp.org -whois
Amass 7

Adding, “-ip” option to the above command, we can also get IP addresses for the sub domains discovered.

Amass 8
Amass 9

Amass queries more than 80 sources to collect information. All the sources it queries can be seen using the list flag.

Amass 10

Learn how to perform OSINT with theharvester tool.

Posted on

Beginners guide to Maltego

Hello, aspiring ethical hackers. In one of our previous blogposts, you learnt what is OSINT in detail. In this blogpost, you will learn about Maltego, one of the most popular tools used to perform OSINT. Maltego is an open-source tool that is used for OSINT, forensics and other investigations. It is a link analysis software that offers real-time information gathering.

Maltego focuses on analyzing real world relationships between people, groups, webpages, domains, networks internet infrastructure and what not. Using maltego, we can extract information like DNS records, whois records, Phone numbers, email addresses, IP addresses and metadata etc.

Some of the most important data sources queried by Maltego include vulners, dorking, OpenPhish, Image Analyzer, Hunter, Censys, Google Social Network Tools, VirusTotal Premium, NIST, Pipl, Whois XML, Wayback machine, Phone Search, Shodan etc.

Maltego runs on Linux, MacOS and Windows. For this tutorial, we will be using Maltego on Kali Linux. Open terminal and type command “maltego”. The system will prompt you if you want to install maltego as shown below.

Maltego 1 1
Maltego 2 1

After the installation is finished, Maltego will prompt you to select a product. You need to have an account with Maltego to use it. Register for a free account. (Maltego CE (FREE) account by clicking on “Register”.

Maltego 3

Accept the terms and click on “Next”.

Maltego 4

(You can either create a account from this tool or create it from their website). Login into your account.

Maltego 5

You will be taken to the browser. Login into your account created earlier.

Maltego 6

After a few seconds, you will get a message that the authentication is complete.

Maltego 7
Maltego 8

Click on “Next”. Select “standard transform” option and click on “Next”.

Maltego 9

Click on “Next”.

Maltego 10

In the next window, make appropriate choice and click on “Next”.

Maltego 11

Choose a browser and click on “Next”.

Maltego 13

Click on “Next”.

Maltego 14

Select the option “Open a blank graph and let me play around” option and click on “Finish”.

Maltego 15

If you select the option “Open an example graph”. You will see this.

Maltego 16
Maltego 17

You will get to the interface of Maltego. Maltego calls the queries you search for as entities. These entities can be anything like name of a person, IP address, email address, domain etc. In the entity Palette, search for “email” as shown below and drag the result into the graph.

Maltego 18

Click on the entity in the graph to change it to the email address you want to search for.

Maltego 19

For example, let’s search for information related to our company.

Maltego 20

In order to search for anything related to this email, right click on the entity.

Maltego 21

There are various transforms you can search for like IP addresses, domains etc. Click on running on all transforms to see all the transforms available.

Maltego 22

From here, you can select any transform you want. For example, run “to domains”.

Maltego 23

As you can see, the domain related to this email is displayed. You have read just now that Maltego is a link building software. We can also run a transform on this resultant domain. For example, right click on the domain, and select To email addresses transform again.

Maltego 24

Like this, we can search for related email addresses, Phone number, domain, DNS entries, usernames, social media accounts, etc. using this tool. Learn how to perform OSINT using SpiderFoot.