Posted on

Beginners guide to Threat Hunting

Hello aspiring Ethical Hackers. In our previous blogpost, you learnt about Blue Teaming. In this article, you will learn about Threat Hunting, which plays a powerful role in Blue Teaming. In today’s digital landscape, cyber threats are becoming increasingly sophisticated. Attackers often hide deep within networks, evading traditional security tools like antivirus software and firewalls. So how do organizations detect these stealthy intrusions before they cause serious damage? That’s where threat hunting plays an important role.

If you’re new to cybersecurity or curious about how security professionals find hidden threats, this beginner’s guide to threat hunting will explain what it is, why it matters and how to get started.

What is Threat Hunting?

Threat hunting is the process in which a proactive search is performed to detect malicious activity or threats within a network or system that have evaded existing security defenses. Instead of waiting for automated alerts, threat hunters actively look for suspicious patterns, behaviors or anomalies that indicate an attacker might be lurking undetected.

Think of it as a detective searching for clues that a criminal has been in the building — even when alarms haven’t gone off. Unlike reactive approaches (such as responding to alerts), hunting threats focuses on finding what security tools might have missed by leveraging human intuition, knowledge, experience and analytical skills.

Why Is Threat Hunting Important?

1. Early Detection of Advanced Threats:

Many modern attackers use highly advanced techniques designed specifically to avoid detection. Threat hunting helps find these stealthy attackers early, reducing the attacker’s ‘dwell time’. ‘Dwell time’ is the time attackers spend inside a network they have compromised.

2. Improves Overall Security Posture:

By uncovering hidden threats and attack techniques, threat hunters provide valuable feedback to improve the organization’s detection rules, incident response processes etc.

3. Reduces Damage and Costs:

The sooner an attacker is detected, the less damage they can do — whether it’s stealing data, disrupting operations or installing ransomware. So it reduces damage and costs.

4. Empowers Security Teams:

Threat hunting encourages curiosity, creativity and deeper understanding of your environment, turning security analysts into proactive defenders.

Common Threat Hunting Techniques

Threat hunting blends data analysis, hypothesis-driven investigation and tool usage. Here are some popular approaches:

1. Hypothesis-Driven Hunting:

In this technique, Threat Hunters start with a theory or suspicion, like “What if an attacker already in our network is using PowerShell to run malicious scripts?” They then look for signs matching this hypothesis.

2. Anomaly Detection:

In this type of hunting, threat hunters search for unusual behavior that stands out, such as:

  • A user logging in at odd hours
  • Unexplained data transfers
  • Processes launching unexpectedly

3. Tactical Hunting based on Threat Intelligence:

In this technique, threat hunters use known Indicators of Compromise (IOCs) like IP addresses, domain names or file hashes linked to malware campaigns.

4. Behavioral Analysis:

In this technique, threat hunters focus on patterns of activity (e.g., lateral movement or privilege escalation) rather than specific malware signatures.

Keys for successful Threat Hunting

Successful threat hunting relies on access to good data and other factors. They are:

  • Security Information and Event Management (SIEM) platforms: These help in centralizing logs and provide search/query capabilities (e.g., Splunk, Elastic Stack, QRadar).
  • Endpoint Detection and Response (EDR) tools: These tools monitor endpoint behavior in real-time (e.g., CrowdStrike, Carbon Black).
  • Network Traffic Analysis: This helps in examining network packets for suspicious activity (e.g., Zeek, Wireshark)
  • Threat Intelligence Feeds: Provide updated information on attacker tactics and IOCs.
  • Scripting Languages: Python or PowerShell are used to automate data analysis and custom hunting queries.

Threat Hunting Process for beginners

Here’s a Step-by-step process you can follow to start threat hunting:

Step 1: Understand your network environment:

Before you can find anomalies or threats, you need to first know what “normal” looks like for your network. Study your network architecture, user behaviors, typical processes and baseline logs.

Step 2: Formulate a Hypothesis:

Once you have understood your environment, formulate a Hypothesis. Start with a focused question or theory relevant to your target network. For example:

  • “Are there signs of credential dumping?”
  • “Is anyone using PowerShell scripts outside of business hours?”
  • “Is there unusual DNS traffic indicating data exfiltration?”

Step 3: Collect and Analyze Data:

Once you have a hyposthesis, gather logs from endpoints, servers, firewalls and other relevant network devices. Use your SIEM or EDR tools to search for patterns that support or disprove your hypothesis.

Step 4. Investigate Anomalies:

If you spot any anomalies or unusual events while analyzing, dig deeper. Cross-reference with threat intelligence, check related logs and look for lateral movement or privilege escalation attempts.

Step 5. Document Findings and Take Action:

Record if you find anything suspicious including timelines, affected assets and attacker behavior. Alert your incident response team or take remediation steps as necessary.

Step 6: Refine and Repeat:

Always remember Threat hunting is an iterative process. Use lessons learned to update detection rules, improve data collection and form new hypotheses.

Conclusion

Threat hunting is a powerful, proactive approach to cybersecurity that complements automated defenses by leveraging human insight and analysis. Whether you’re a security analyst, IT professional or just passionate about cybersecurity, developing threat hunting skills will make you a valuable defender in today’s complex threat landscape.

Posted on

Beginners guide to bettercap

Hello, aspiring ethical hackers. In our previous blogpost, you learnt about Man in The Middle (MiTM) attack. In this article, you will learn about Bettercap, a network reconnaissance and MiTM attack tool.

What is Bettercap?

Bettercap is a powerful, easily extensible and portable framework written in GO programming language, that is useful to security researchers, Red teamers and reverse engineers in performing reconnaissance and MiTM attacks. It is known as Swiss Army knife for 802.11, BLE, IPV4 and IPV6 network reconnaissance and MiTM attacks. Its features include,

  • Performing WiFi network scanning, de-authentication attacks, clientless PMKID association attack and automatic WPA/WPA2/WPA3 client handshakes capture.
  • Bluetooth Low Energy devices scanning, characteristics enumeration, reading and writing.
  • 2.4Ghz wireless devices scanning and MouseJacking attacks with over-the-air HID frames injection (with DuckyScript support).
  • CAN-bus and DBC support for decoding, injecting and fuzzing frames.
  • Passive and active IP network hosts probing and recon.
  • ARP, DNS, NDP and DHCPv6 spoofers for MITM attacks on IPv4 and IPv6 based networks.
  • Proxies at packet level, TCP level and HTTP/HTTPS application level fully scriptable with easy to implement javascript plugins.
  • A powerful network sniffer for credentials harvesting which can also be used as a network protocol fuzzer.
  • A very fast port scanner.
  • A powerful REST API with support for asynchronous events notification on websocket to orchestrate your attacks easily.
  • A very convenient web UI.

Let’s see how this tool works. For this, we will be using Kali Linux as attacker system as bettercap is available by default in Kali Linux’s repositories. It can be installed using command shown below. As target we will be using Metasploitable 2 . Both the systems are installed as part of our Simple hacking Lab.

bettercap

After installation, bettercap can be started as shown below. Note that it requires SUDO privileges to run.

sudo bettercap

Type “help” on the bettercap interface to learn more about it.

For this tutorial, let’s learn about how to use modules in Bettercap. Bettercap has various modules. By default, only one module is always running. This is the “events.stream” module that shows all that’s happening in bettercap.

To learn about any module all you have to do is use command shown below. For example, let’s view the help details about ‘net.probe’ module.

help <module name>

As you can see in the above image, this module detects the new hosts on the network by sending UDP packets. To start a module in bettercap, the command is given below.

<module name> on

As soon as you turn it ON, it starts probing the network for any new machines. You can see all the active bettercap modules running by using command “active”.

As you can see in the above image, these modules of bettercap are running. They are “events -stream” (which runs by default as soon as we start bettercap, “net.probe” module and “net.recon” modules.

Now, let’s do something useful with this tool. In our previous blogpost on packet sniffing, you learnt how network packets can be captured. Let’s try the same with bettercap.

For this, we start “net.sniff” module on bettercap.

Also, we will start ‘arp.spoof’ module. As you learnt in ARP spoofing, this will allow us to perform MiTM attacks.

For the novices, the “net.sniff” module performs packet sniffing while “arp-spoof” module performs ARP poisoning attack on the the target IP specified (that of Metasploitable 2).

Doing this captures all the network traffic going to or from our target system i.e Metasploitable 2. While bettercap does this, let’s login into Metasploitable 2 DVWA web app from our attacker system.

While we do this, Bettercap captures the credentials, as they are in plain text.

As you can see in the above images, both the password and username are clearly visible and successfully retrieved by this tool. Next, learn about Wireshark, a network analyzer.

Posted on

Beginners guide to wfuzz

Hello, aspiring ethical hackers. In our previous blogpost, you learnt what is fuzzing. In this article, you will learn about wfuzz, a web application fuzzer or brute forcer.

Wfuzz is a tool designed to bruteforce web applications and can be used to find directories, servlets, scripts etc. It can also be used to brutefoce GET and POST parameters for checking different kinds of injections like SQL, XSS, LDAP etc, bruteforce forms (usernames and password) etc. Its features include,

  • Multiple Injection points capability with multiple dictionaries
  • Recursion (When doing directory bruteforce)
  • POST, headers and authentication data brute forcing
  • Output to HTML
  • Colored output
  • Hide results by return code, word numbers, line numbers, regex.
  • Cookies fuzzing
  • Multi threading
  • Proxy support
  • SOCK support
  • Time delays between requests
  • Authentication support (NTLM, Basic)
  • All parameters bruteforcing (POST and GET)
  • Multiple encoders per payload
  • Payload combinations with iterators
  • Baseline request (to filter results against)
  • Brute force HTTP methods
  • Multiple proxy support (each request through a different proxy)
  • HEAD scan (faster for resource discovery)
  • Dictionaries tailored for known applications (Weblogic, Iplanet, Tomcat, Domino, Oracle 9i,
    Vignette, Coldfusion and many more.

Let’s see how this tool works. For this, we will be using Kali Linux as attacker machine as wfuzz is installed by default on it. As target system, we will be using Metasploitable 2. Both machines are installed as part of our Simple Hacking Lab.

Let’s scan for directories first. All you have to do to scan for directories with Wfuzz is as shown below. Just specify a wordlist to use and the URL to be fuzzed.

wfuzz -w <path to wordlist> <URL>

But remember that, the parameter that you are trying to fuzz should be specified with keyword “FUZZ” as shown below. For example, here, we are busting directories. So, we are have added the word “FUZZ” after the URL.

Get colored output (-c)

Sometimes the output of wfuzz can be monotonous and boring. This option can be used to get colored output.

Hide responses with specified HTTP codes (-hc)

In the above images, you can see that wfuzz displays results with all HTTP response codes 404,200,403,301 etc. Using this option, we can specify wfuzz to hide results with specific response code. For example, let’s hide results with response code 404.

As you can see in the above imagers, there are no results shown with response code 404.

Show responses with specific codes (–sc)

Apart from hiding responses of specific codes, we can also specify Wfuzz to show responses with specific codes with this option. For example, here we can specify to view only responses with 200, 301 requests.

Here’s the result.

Follow redirection (-L)

This option is used to specify wfuzz to follow redirections of URLs if specified.

Here’s the output.

Recursion (-R)

This option specifies the depth of recursion level with wfuzz. For example. let’s set recursion to “2”.

Number of connections (-t)

By default, Wfuzz makes 10 concurrent connections at once. This option is used to change that. For example, let’s set the number of concurrent connections to 19.

Time delay between each request (-s)

By default, wfuzz doesn’t add any delay between each request it makes. This can be noisy and raise suspicions on Blue team side. This option can be used to specify some delay in seconds. For example, let’s set delay of 10 seconds between each request.

Save the output to a file (-f)

This option can be used to save output of wfuzz to a file.

Next, learn how to fuzz with ffuf.

Posted on

Beginners guide to chntpw

Hello, aspiring ethical hackers. In our previous blogpost, you learnt how Windows authentication works. In this article, you will learn about chntpw, a offline Windows password and Registry Editor that can be used to reset or blank local passwords on Windows NT operating systems.

Chntpw or Change NT Password is a utility that does the above actions by editing the SAM database where Windows stores its hashes.

Let’s see how this tool works. We can use this tool in two ways. The first method is using it as a package installed in cybersecurity operating systems like Kali, Parrot Security etc. The second method is via a bootable CD/USB image. For this tutorial, we will be using the bootable CD/USB image. It can be downloaded from here.

Using chntpw, we can reset local account passwords of all NT Windows operating systems like Windows NT, 2000, XP, Vista , Windows 7 , windows 8, windows Server 2003 and 2008 etc. We will test this tool on Windows XP SP2.

After making a bootable USB from files downloaded, insert the bootable USB drive of chntpw and power on into BIOS. You should use the screen shown below.

Hit ENTER. You should see the screen shown below.

Then, it will show you all the steps to take (total 4 steps). In the first step, you have to select the disk you want to make changes to (The disk on which Windows is installed). In our case, it is disk “sdb”. It will automatically show you disk partitions. All you have to do is select. It will automatically also find Windows installations and show it to you. In this example, there is only one disk set.

Select ‘1’. The disk will be mounted. The second step is to select the registry files you want to make changes to. It will prompt you to select the part of registry you want to make changes to from the predefined choices listed. The options given are,
1. Password reset
2. Recovery/ console parameters (software).
3. Loading almost all registry files.

For this tutorial, let’s select the option of “password reset”. Then SAM file will be loaded to the /tmp directory. In the third step, more options are shown as shown below.

Let’s select the option of “Edit user data and passwords”. Then it will list all the users present on the local system.

Then it will ask you to select the “RID” of the user you want to make changes to. Let’s select the user with RID ‘rf4’, the Administrator user. Once you select the user, it will present the ‘User edit’ menu asking you to select what changes you want to make.

Let’s select the option to clear the password (making blank). Then, it will automatically blank the password of the user. Changes are made but not written to the disk yet. Type ‘q’ to quit the menu.

The fourth step is to write the changes to the disk. The tool will prompt you asking if you want to write changes to the disk. Select ‘Yes’ to do it.

That’s how you can use chntpw to change or blank passwords of local Windows users.  

Posted on

Beginners guide to Responder

Hello, aspiring ethical hackers. In this article, you will learn about Responder tool, a tool that is helpful in harvesting credentials and passwords on the target network. It is useful mostly in internal penetration testing of services.

What is Responder?

Responder is a LLMNR, NBT-NS and MDNS poisoner with a built in HTTP, SMB, MSSQL, FTP, LDAP rogue authentication servers. It harvests credentials and password hashes by answering to specific NBT-NS (NetBIOS Name Service queries). The goal of responder is to stay stealthy on the network without making much noise.

Let’s see how this tool works. For this, we will be using Kali Linux as attacker system as Responder is installed by default on it. We are performing this tutorial in an Active Directory Hacking Lab. In this lab, Windows 10 is a client system (although any other Windows OS will do), PFSense firewall acts as gateway and firewall and Windows Server 2016 is the server. To use Responder on Kali , Kali Linux needs to be connected to the LAN network in the Active Directory. i.e the internal network.

Kali Linux, the attacker system however need not be joined to the domain. But it will still collect password hashes below belong to users in the network. In real-world scenarios, Responder tool is uploaded to the target system or network.

Once Kali is connected to the internal network, all you have to do is to start Responder on the interface you want as shown below.

sudo responder -I <network_interface>

For example, here are are starting it on interface eth1 where our target domain network is connected.

It starts poisoners and servers as shown below.

Now, all we have to do is WAIT for any user in the network to do a mistake. For example, lets say a user of the organization tries to access a local network share “LOOKRECKAH” and makes a mistake while doing it as shown below. He wants to access network share “LOOKRECKAH” but hits ‘ENTER’ after only typing “LOOK”.

As soon as he does that, he is prompted for his network credentials. This is done by Responder tool.

However, there is no need for any credentials. Responder already logs lots of traffic on the attackers machine i.e. kali.

While we scroll down the traffic, we can see password hash of that user and his username.

While waiting patiently, we can also grab credentials of different users.

All this information is stored by Responder in the /usr/share/responder/logs directory on Kali.

In this directory, credentials and hashes are stored in text files.

Analysis mode

Responder has different modes of operation. Analysis mode is one such mode. In this mode, Responder allows users to see NBT-NS, BROWSER, LLMNR and DNS requests on the network but doesn’t perform any poisoning. Analysis mode can be started using command shown below.

sudo responder -I <interface_name> -A

This mode can still reveal some information about the network.

Using WPAD Proxy Server

WPAD stands for Web Proxy Auto-Discovery protocol. Organizations often make their users connect to a web server through proxies. WPAD allows web browsers and other clients to automatically discover the URL of a proxy server pac files. You can use responder tool to poison these web requests as shown below. WPAD proxy can be started on Responder using command show below.

sudo responder -I <interface_name> -wd

As you can see in the above image, WPAD proxy is on. Now, when a employee of an organization tries to access the internal website and mistypes it on a browser, he will be prompted with a credential screen as shown below.

When he enters his credentials assuming it to be a genuine prompt

We get the user’s password hashes as shown below.

That’s all in Responder tool for now.