Posted on

Beginners guide to SpiderFoot

Hello, aspiring ethical hackers. In one of our previous blogposts, you learnt in detail about what is OSINT, types of OSINT etc. In this blogpost, you will learn about a tool named SpiderFoot. SpiderFoot is an open-source intelligence (OSINT) automation tool.

Spiderfoot is a python script and can be run on any machine with Python installed. Using spiderfoot, we can gather information from almost any open source data source available. For this tutorial, we will be using Kali Linux as spiderfoot is installed by default on it. Spiderfoot has an embedded web server and hence has a web-based interface.

To start spiderfoot on Kali, all you have to do is use the “-l” option and then specify a IP address and port on which you want the web server to listen on. The “-l” option stands for listen. Here we have configured spiderfoot to listen on the port 5500 of localhost.

Spiderfoot 1
Spiderfoot 2

Now, browse to the above highlighted URL using your favorite browser. You should see this.

Spiderfoot 3

Since we have not yet performed any scans yet. There is no scan history. To start a new scan, click on “New scan”.

Spiderfoot 4

Spiderfoot can gather information from domain name, IPV4 or IPV6 address, host names, sub-domains, subnet, Bitcoin address, E-mail address, phone number, human names, usernames and networks. Let’s start our search with a domain name first.

Spiderfoot 5 1024x637

After entering the name of the scan and the scan target scroll down a bit.

Spiderfoot 6 1024x569

There are various ways you can search with for any target using SpiderFoot. You can also search based on what you require about the target.

Spiderfoot 7 1024x566

You can also search based on required module (more about modules later).

Spiderfoot 8 1024x567

I select “All” and click on “Run scan now”. The scan starts and may look empty at the beginning.

Spiderfoot 9 1024x567

As the scan progresses, your screen will be filled with bars as shown below.

Spiderfoot 10 1024x639
Spiderfoot 11 1024x567

While the scan is still running, you can view the findings of the scan by going to the “Browse” tab as shown below.

Spiderfoot 12 1024x637

You can view each of the entries to find out what spiderfoot has detected.

Spiderfoot 13

For example, in this case, the target website is hosted in USA. Now, let’s search for a “Name” say “kalyan”. The good thing about spiderfoot is that it will automatically detect the type of target based on format of your input.

Spiderfoot 14
Spiderfoot 15 1024x635

Here’s the result.

Spiderfoot 16 1 1024x345
Spiderfoot 17 1
Spiderfoot 19 1024x371

You can see all the scans you performed in the “scans” section.

Spiderfoot 20

Another important tab here is the “settings” tab. It consists of settings for this tool. But just not that. Remember, I told you at the beginning of this article that Spiderfoot can collect information from almost all data sources. These data sources are listed here to the left in settings section.

Spiderfoot 21
Spiderfoot 22

Almost all sources are free, but some need APIs belonging to that particular service (Did you see the lock sign next to some services?).

Spiderfoot 23

Posted on

Beginners guide to Wireshark

Hello, aspiring ethical hackers. In one of our previous blogposts, you learnt in detail what is packet sniffing, types of sniffing, what are sniffers and types of sniffers? In this article, you will learn about Wireshark, the most popular sniffer used in cybersecurity.

What is Wireshark?

Wireshark is an open-source network packet analyzer that is used for network trouble shooting, network analysis etc. It runs on Linux, macOS, BSD, Solaris and even on Windows. It is installed by default in pen testing distros like Kali Linux and we are going to use the same for this tutorial. On Kali Linux, Wireshark sniffer can be started using the command “wireshark” in the terminal as shown below.

Wireshark 1

This will open the Wireshark GUI window as shown below.

Wireshark 2

In the newly opened Wireshark windows, all the network adapters attached to the system (in our case, virtual machine) on which Wireshark is running has are displayed. Select the network interface on which you want to capture packets (ours is eth0) and click on “Start capturing packets”.

Wireshark 3

Wireshark will start capturing live packets of the network. Here, it is time to learn about the interface of Wireshark. The interface of Wireshark can be divided into 5 primary parts. They are,

1. Menu bar: Common to all GUI applications and doesn’t need explanation.

2. The Main toolbar: The main toolbar consists of items for the operation of Wireshark. For example, like starting capture, stopping capture, restarting capture, saving capture to a file etc.

3. The Filter toolbar: The Filter toolbar is used to apply display filters for the captured packets. More about it later.

4. The “Packet List” name: This pane displays all the packets captured by Wireshark. These are separated by each line. By default, the “packet list” name consist of seven columns. They are,

  • Number: The number of the packet in the capture file.
  • Time: Time of capture of the packet.
  • Source: The source from where the packet originated.
  • Destination: The destination address where the packet went.
  • Protocol: The protocol information about the captured packet: ex: ARP, ICMP etc.
  • Length: Length of the captured packet.
  • Information: Additional information about the packet.

5. The “Packet details’ pane: This pane shows the current packet in a more detailed form.

6. The “Packet Bytes” pane: This name shows all the details of the selected packet in style.

Wireshark 4

By now, you are accustomed to the interface of Wireshark. Let’s move forward. In the “packet list” pane, you can see all the packets. You can select each packet to see information about it. You can right click on each packet, to open a new menu too. For example, you can follow TCP stream of each packets. Well, there is a packet belonging to Telnet protocol going from 192.168.40.169 IP to 192.168.40.162. Following its TCP stream can be interesting. But you will learn about this in password sniffing.

Wireshark 10

The important concept beginners should learn about Wireshark is the Wireshark filters. If you see the Wireshark packet capture, it will be overwhelming if not confusing. Wireshark filters allow us to bring some clarity to the captured traffic. Filters can be applied to Wireshark from the “Filter” toolbar. Wireshark has some mostly used filters which can be viewed as shown below.

Wireshark 8

Let’s learn about some common filters useful to beginners. In the filter column, add this filter.

ip.addr==192.168.40.168
ip.addr==192.168.40.168

The default syntax of Wireshark filter is “ip.addr = = value”. For example, if you want to view the traffic of a particular IP address, this filter is used. Let’s say we want to view traffic of only the system whose IP address is “192.168.40.168”.

Wireshark 6

Let’s make it better. You want to view all the traffic originating from IP address 192.168.40.168 then the below filter will help.

ip.src == 192.168.40.169

Wireshark 7

Similarly, we can use “ip.dst = = 192.168.40.169” filter to see all the packets coming to machine with IP address 192.168.40.169. We can also combine two filters using ampersand (&&). For example, you want to view the packets originating from IP 192.168.49.169 and coming to IP 192.168.40. 168.using the filter below.

ip.src==192.168.40.169 && ip.dst==192.168.40.168
Wireshark 9

You can view even traffic belonging to a specific port in the entire network. For example, let’s view the traffic belonging to TCP port 21. “tcp.port == 21“ using filter as shown below.

tcp.port==21
Wireshark 12

Those are some helpful filters for beginners. At any time, you can stop the capture from the “stop capture” option of Wireshark as shown below.

Wireshark 13

You can also save the captured packets in a file. By default, Wireshark saves the captured data in the pcap format.

Wireshark 14

Ignore the warnings (-w)

By default, while scanning, it avoids going into any directories that are listable. This makes common sense too. It displays the message saying “directories are testable”. If you want it to scan inside such directories, you can use this option (-w).

Dirb 4
Wireshark 15
Wireshark 16

We can once again open this pcap file using Wireshark again for analysis later. Learn how to use ettercap.

Posted on

Beginners guide to dirb tool

Hello, aspiring ethical hackers. In one of our previous blogposts, you learnt in detail about website footprinting. In this blogpost, you will learn in detail about dirb tool, a tool often used in website footprinting. DIRB is an open-source web content or directory scanner. It is used to scan for web objects.

DIRB achieves this by using a pre-configured wordlist to perform a dictionary attack on the web server specified as target. The default usage of DIRB is given below.

Dirb 1

Here is its output.

Netdiscover 2
Dirb 3

Ignore the warnings (-w)

By default, while scanning, it avoids going into any directories that are listable. This makes common sense too. It displays the message saying “directories are testable”. If you want it to scan inside such directories, you can use this option (-w).

Dirb 4

Use case-insensitive search (-i)

Usually, DIRB scans uses case-sensitive searches. Setting this option allows to perform case-insensitive searches.

Dirb 5

Saving the output (-o)

You can save the output of this tool to a file using the “-o” option.

Dirb 6
Dirb 7

Scan using a proxy (-p)

For all its awesome features, it produces a lot of noise which can raise suspicions on the target side. To beat this a bit, DIRB provides a option to use a proxy to perform directory busting.

Dirb 8

Don’t perform recursive searches (-r)

Setting this option will stop dirb from performing recursive scan of the directories.

Dirb 9

Interactive recursion (-R)

Similarly, this option is used to set Interactive Recursion while scanning.

Dirb 10

Show pages that don’t exist (-v)

By default, DIRB scans the web server and shows only pages or directories that are found on it. Setting this option will make it show non-existent objects also.

Dirb 11
Dirb 12

Search for files with a specific extension (-X)

You can use this option if you want to search for files with a particular extension. For example, to search for text files (.txt) extension, we can use dirb as shown below.

Dirb 13

You can also search for multiple file extensions using dirb. Just add all the file extensions you want to search for in a text file and use the (-x) option as shown below. For example, to search for all file extensions specified in a file named “ext_text”.

Dirb 14
Posted on

Beginners guide to netdiscover

Hello, aspiring ethical hackers. In one of our previous blogposts, you learnt about network scanning. In this blogpost, you will learn about netdiscover tool. It is an active/passive network address discovering tool that was actually developed to discover wireless networks during wardriving but can also detect addresses on switched networks. It used ARP packets to detect network addresses.

It is mostly used to find the target IP address in hack the box challenges. But it can also be used to scan for network addresses of a network in real-world pen testing. It is installed by default in Kali Linux and we are going to use same for this tutorial.

Netdiscover 1

The simplest way of using netdiscover to find out network addresses is to simply type the command “netdiscover” in the terminal as shown below.

Netdiscover 2

Then it slowly scans for network addresses as shown below. This is how most people use it.

Netdiscover 3

Fast mode

However, you don’t have to wait for netdiscover to finish scanning as long as it takes. You can scan faster with netdiscover too using the “-f” option.

Netdiscover 4
Netdiscover 5

Interface mode

Netdiscover can be set to scan network addresses on a specific network interface you want. For example, on Kali Linux, let’s use the command “ip a” to view all the network interfaces connected to it.

Netdiscover 6

Interface mode can be set with the “-i” option. For example, let’s scan the interface “eth0” as shown below.

Netdiscover 7
Netdiscover 8

Scan a specific range

Similarly, netdiscover can be used to scan a specific range as shown below. For example, let’s scan the range 192.168.248.0/24.

Netdiscover 9
Netdiscover 10
Netdiscover 11

Printable form (-p)

Netdiscover can also display its output in a way easy for printing using the “-p” option.

Netdiscover 12

Posted on

Beginners guide to Zenmap

Hello, aspiring ethical hackers. In one of our previous blogposts, you learnt in detail about Nmap, the popular port scanner. If you are like me, you thought all those commands, types of scans and options are very difficult to grasp. Well, maybe even the makers of Nmap also thought the same. Hence, they release a GUI version of Nmap called Zenmap.

Zenmap is the official GUI version of Nmap security scanner. It works on almost all platforms (Linux, Windows, mac OSX, BSD etc.). Just like Nmap it is also open-source. In this blogpost you will learn in detail about Zenmap. It can be downloaded from here. Kali Linux has Zenmap in its repository as part of kaboxer. For this tutorial, we will be using this only.

In Kali Linux, open a terminal in kali and type the command “Zenmap-kbx”. If Zenmap is not already installed, the system will prompt you if you want to install it.

Zenmap 1
Zenmap 2

Type “y” to install it, Otherwise, it will open Zenmap GUI as shown below.

Zenmap 3

The interface of Zenmap can be divided in to five sections.

  1. Target section
  2. Profile section
  3. Output section
  4. Host / services section
  5. Command section

    The target section is where we specify a target. The target can be specified in all the variety of ways Nmap allows. The profile section allows you to choose a type of scan. There are various scan options available.
Zenmap 4

Let’s select Quick scan for now. The command section shows the command for each scan type you select. Yes, you can type the command also directly and run Zenmap here. But if you want to do it, you would have been content with Nmap only. For now, let’s click on ‘scan’. Very soon, the results will be out and can be seen in output section as shown below.

Zenmap 5
Zenmap 6 1

The output section has many other tabs that provide additional information about the target scanned. The ports/hosts tabs show the open ports, type of protocol it uses and the service running on it separately and clearly.

Zenmap 7

The “Topology” sub-section shows that our attacker machine and target machine in visual form.

Zenmap 8

You can even zoom on the visual representation for a better view.

Zenmap 9

The “Host details” tab shows details about the target host separately.

Zenmap 10

The “scans” section shows all the scans you have performed.

Zenmap 11

Let’s select a “Regular scan” now.

Zenmap 15
Zenmap 16

The “Hosts/services” section provides information about the target host and services running on it.

Zenmap 12
Zenmap 13

That was all about Zenmap. See how simple it is to use Zenmap for port scanning.