Hands-On OSCP Prep Series · Lab 4

Email Phishing Attack
Using SET Toolkit on Kali Linux

A complete step-by-step lab: use the Social-Engineer Toolkit (SET) to clone a real website, set up a credential harvester, and capture login credentials — all inside a safe, isolated Kali Linux environment.

⏱ 30 Minutes
📶 Beginner–Intermediate
🛠 Kali Linux 2025.2
🎣 SET Toolkit
📅 March 2026
👤 Dr Pritam Gajkumar Shah
01

Lab Overview

📋

Lab at a Glance

Lab Title
Email Phishing Attack Using Social-Engineer Toolkit (SET)
Objective
Clone a real website (Google login), serve it from Kali, and capture credentials entered by a victim
Attacker
Kali Linux 2025.2 — VirtualBox VM
Tool
Social-Engineer Toolkit (SET) v8.0.3 — pre-installed in Kali Linux
Attack Type
Website Attack Vector → Credential Harvester → Site Cloner
Target
Cloned Google login page served at 192.168.30.46 (Kali VM IP)
MITRE ATT&CK
TA0001 Initial Access  /  T1566 Phishing  /  T1056 Input Capture
Difficulty
⭐⭐ Beginner–Intermediate
Time
~30 minutes end-to-end

In this lab we use the Social-Engineer Toolkit (SET) — one of the most powerful and widely used penetration testing tools for social engineering — to perform a credential harvesting attack. We clone the Google login page, serve it from our Kali Linux VM, and capture any username and password submitted through the fake page.

This is one of the most realistic demonstrations of how phishing attacks work in the real world. The victim sees what appears to be a legitimate Google login page — the only visible difference is the IP address in the browser's address bar instead of google.com.

⚠️
Legal & Ethical Notice

This lab must only be performed in an isolated, controlled lab environment on machines and accounts you own or have explicit written permission to test. Using SET against real users or live websites without authorisation is a criminal offence. All experiments here use a controlled victim device on a private lab network.

02

What is the Social-Engineer Toolkit (SET)?

The Social-Engineer Toolkit (SET) was created by David Kennedy (ReL1K) and is maintained by TrustedSec. It is an open-source Python-driven framework specifically designed for social engineering attacks. It automates complex attack scenarios that previously required deep technical knowledge — making it one of the most democratised and dangerous tools in a penetration tester's kit.

SET is pre-installed in Kali Linux and is listed under the Social Engineering category of tools. It covers attacks from spear-phishing and website cloning to wireless access point spoofing and PowerShell payloads.

SET Attack ModuleWhat It DoesReal-World Use
Spear-Phishing Attack VectorsSends targeted malicious emails with payloadsAPT initial access campaigns
Website Attack VectorsClones websites and harvests credentials or delivers exploitsCredential theft, phishing portals
Infectious Media GeneratorCreates malicious USB/CD autorun payloadsPhysical access attacks
Create a Payload and ListenerGenerates reverse shells and Meterpreter payloadsRemote access establishment
Wireless Access Point AttackCreates a rogue AP to intercept trafficMan-in-the-middle attacks
Powershell Attack VectorsExecutes PowerShell-based payloads in memoryFileless malware attacks
💡
Why SET Is So Effective

SET's power comes from automation. Cloning a website, setting up a listener, and capturing credentials would normally require hours of manual web development and server configuration. SET reduces this to a few menu selections and an IP address — which is exactly why defenders need to understand it deeply. You cannot defend against what you do not understand.

03

Step 1 — Launching the Social-Engineer Toolkit

Open a root terminal in Kali Linux and launch SET by typing setoolkit. SET requires root privileges to bind to port 80 and serve the cloned website.

bash — root@kali
setoolkit
Social-Engineer Toolkit SET main menu showing version 8.0.3 Maverick by David Kennedy TrustedSec with options 1 Spear-Phishing 2 Website Attack Vectors 3 Infectious Media Generator
Figure 1.1 — SET launches with its distinctive banner showing Version 8.0.3 "Maverick" by David Kennedy (ReL1K) of TrustedSec. The main menu presents the primary attack categories. For this lab we will use Option 2 — Website Attack Vectors.

Type 2 and press Enter to enter the Website Attack Vectors module.

💡
Running SET as Root

SET must be run as root because the credential harvester needs to bind to port 80 — a privileged port below 1024 that only root can open on Linux. If you see a permission error, ensure you are in a root terminal (the prompt shows root@kali) not a regular user terminal.

04

Step 2 — Website Attack Vectors Module

After selecting option 2 from the main menu, SET displays the full Website Attack Vectors sub-menu with 10 different web-based attack methods.

SET Website Attack Vectors menu showing all 10 options including Java Applet Metasploit Credential Harvester Tabnabbing Web Jacking Multi-Attack HTA Attack
Figure 2.1 — The Website Attack Vectors sub-menu. Ten distinct attack methods are available. For credential harvesting we select Option 3 — Credential Harvester Attack Method. The HTA Attack method (Option 7) is highlighted at the top as it enables PowerShell injection through browser-delivered HTA files.

Type 3 and press Enter to enter the Credential Harvester Attack Method.

SET explains that the Web Attack module utilises multiple web-based attacks to compromise the intended victim. The Credential Harvester specifically uses website cloning combined with a POST request interceptor — every form submission on the cloned page is silently forwarded to our Kali machine before being redirected to the real website.

05

Step 3 — Credential Harvester Attack Method

Inside the Credential Harvester module, SET offers three methods for delivering the fake page to victims. We use Site Cloner which automatically downloads and replicates a real website.

SET Credential Harvester menu showing Web Templates Site Cloner and Custom Import options with option 2 selected
Figure 3.1 — The Credential Harvester Attack Method sub-menu. Three delivery options are available. Option 1 — Web Templates provides pre-built clones of popular sites. Option 2 — Site Cloner downloads any website you specify in real time. Option 3 — Custom Import lets you upload your own fake page. We select Option 2.
SET showing Credential Harvester description and webattack menu with option 1 selected and important information about POST back configuration
Figure 3.2 — After selecting the harvester method, SET provides a detailed explanation of how the credential harvester works, including the important note about configuring the HARVESTER_REDIRECT and HARVESTER_URL settings in /etc/setoolkit/set.config for proper post-credential redirection.
💡
How the Credential Harvester Actually Works

When a victim visits the cloned page and submits their login credentials, their browser sends an HTTP POST request — just like with the real website. SET intercepts this POST, extracts all the form fields (including the password), logs them to a local file, and then forwards the victim on to the real website. The victim typically notices nothing unusual — they see the real Google page load normally, assuming they simply need to try logging in again.

06

Step 4 — Enter IP Address and Clone Google

SET asks for two pieces of information before starting the harvester server: the IP address that victims will connect to (our Kali machine's IP), and the URL of the website to clone.

SET asking for IP address for POST back in Harvester showing 192.168.30.46 and important information about templates and HARVESTER_REDIRECT configuration
Figure 4.1 — SET prompts for the IP address for POST back — this is our Kali Linux machine's IP address on the local network (192.168.30.46). This is the address that will appear in the victim's browser address bar instead of google.com. SET also displays the important configuration notice about redirect settings.
PromptWhat to EnterNotes
IP address for POST back192.168.30.46Your Kali machine's LAN IP — run ip addr to confirm yours
URL to clonehttp://www.google.comSET will download and replicate this page in seconds
Template selection2 (Google)SET offers Google as built-in template option 2

After entering the IP address, SET begins cloning the target website. For the Google login page, we select template 2. SET downloads the page, rewrites all form action attributes to POST back to our Kali machine, and launches a lightweight web server on port 80.

SET showing cloning website google.com Credential Harvester running on port 80 with incoming HTTP GET requests from 192.168.30 subnet showing access logs in real time
Figure 4.2 — SET confirms: "Cloning the website: http://www.google.com" and "The Social-Engineer Toolkit Credential Harvester is running on port 80." Real-time HTTP access logs immediately begin appearing as devices on the network access the fake page — GET requests for / and /favicon.ico from multiple IP addresses in the 192.168.30.x subnet.
Harvester Server is Live

The credential harvester is now running. Any device on the same network that navigates to http://192.168.30.46 will see what appears to be the Google login page. All form submissions are being captured by SET in real time.

07

Step 5 — Viewing the Fake Page and Capturing Credentials

The Victim's Perspective — The Fake Google Login Page

On any device connected to the same network, open a browser and navigate to http://192.168.30.46. The victim sees a pixel-perfect replica of the Google login page — complete with the Google logo, Sign in button, and "Create an account" link.

Fake Google login page served from 192.168.30.46 showing Sign in with your Google Account with Email and Password fields and blue Sign in button
Figure 5.1 — The fake Google login page as the victim sees it. The page is visually identical to the real Google login. The only tell-tale sign is the browser's address bar — 192.168.30.46 instead of accounts.google.com. The browser also shows "Not secure" because SET serves over HTTP, not HTTPS. In a real attack, a domain name and SSL certificate would make this near-impossible to detect without inspecting the URL carefully.

The Attacker's Perspective — Credentials Arrive in Real Time

When the victim enters their email and password and clicks Sign in, the credentials are immediately captured by SET and displayed in the terminal. Press Ctrl+C when finished to generate a full report.

SET terminal showing WE GOT A HIT with captured PARAM fields including POSSIBLE USERNAME FIELD FOUND Email niyhaguyogain@gmail.com and POSSIBLE PASSWORD FIELD FOUND Passwd=ashish7 along with all other POST parameters
Figure 5.2 — SET captures and displays the victim's credentials in real time. The output shows POSSIBLE USERNAME FIELD FOUND: Email=niyhaguyogain@gmail.com and POSSIBLE PASSWORD FIELD FOUND: Passwd=ashish7. SET also captures all other POST parameters including session tokens, cookies, and browser-specific fields. The message "[*] WE GOT A HIT! Printing the output" confirms successful credential capture.
🎯
Credentials Successfully Captured!

SET has captured the victim's Google account email and password in plain text. In this controlled lab, these are test credentials used specifically for demonstration. In a real attack, these would give the attacker full access to the victim's Google account — email, drive, photos, linked services, and any other accounts using the same password.

🔍
What the Output Tells Us

Notice SET captures all POST parameters — not just the password. This includes session tokens (GALX, dsh), browser fingerprinting data (bgresponse=js_disabled), and anti-CSRF tokens. In advanced attacks, these tokens can sometimes be used to replay authenticated sessions even after the victim changes their password.

08

Defensive Measures — How to Protect Against Phishing

Now that we understand how credential harvesting works, here are the most effective defences — both for individual users and organisations:

🔍 Always Check the URL — Not Just the Page Appearance

The only reliable indicator of a fake page is the URL in the address bar. Train users to always verify the domain before entering any credentials. 192.168.30.46 is not Google. Neither is googl3.com or accounts.google.com.login-secure.net. The real Google login is always at accounts.google.com with a padlock (HTTPS).

🔐 Enable Two-Factor Authentication (2FA) on All Accounts

Even if an attacker captures your password, 2FA stops them from logging in. They would also need your physical phone or authenticator app. This single measure defeats credential harvesting attacks completely — the stolen password is useless without the second factor.

🔑 Use a Password Manager

Password managers fill in credentials only on the exact legitimate domain — they will not auto-fill on a phishing page because the domain does not match. This provides automatic protection even for users who are not diligently checking URLs.

📧 Never Click Links in Emails — Type URLs Directly

Phishing attacks depend on victims clicking attacker-controlled links. Teach users to navigate to sensitive sites by typing the URL directly into the browser, or using a saved bookmark — never by following a link from an email, SMS, or social media message.

🛡 Deploy Anti-Phishing DNS and Email Filtering

At the organisational level, deploy DNS filtering (e.g., Cisco Umbrella, Cloudflare Gateway) to block access to known phishing domains. Configure email filters to quarantine messages with suspicious links and flag external emails with warning banners. Implement DMARC, DKIM, and SPF to prevent domain spoofing in phishing emails.

📚 Regular Security Awareness Training

Run simulated phishing exercises using tools like GoPhish to measure and improve user awareness. Statistics show organisations that run regular phishing simulations reduce successful phishing click rates by over 70% within 12 months. Awareness is the most cost-effective defence available.

09

Conclusion & Learning Outcomes

In this lab we successfully launched the Social-Engineer Toolkit, navigated to the Website Attack Vectors module, selected the Credential Harvester with Site Cloner, cloned the Google login page, served it from our Kali machine, and captured real credentials entered by a victim on our lab network — all in under 30 minutes.

This demonstrates one of the most important principles in cybersecurity: technical security controls are bypassed completely when the human is the target. No firewall, antivirus, or IDS/IPS can stop a user from willingly entering their password into a convincing fake page. This is why phishing remains the number one initial access vector in virtually every major cyberattack.

Attack Flow Summary

01
setoolkit
Launch SET as root — main menu appears
02
Select 2 → Website Attack Vectors
Enter the web-based attack module
03
Select 3 → Credential Harvester Attack Method
Choose the credential capture attack type
04
Select 2 → Site Cloner
Choose to clone a real website automatically
05
Enter IP: 192.168.30.46 → URL: google.com
SET clones Google and starts web server on port 80
06
[*] WE GOT A HIT! Email + Password captured
Victim's credentials appear in real time on attacker's terminal

After this lab, you can:

  • Explain what the Social-Engineer Toolkit (SET) is and what attack categories it covers
  • Launch SET and navigate its menu structure to the Website Attack Vectors module
  • Configure and run the Credential Harvester with Site Cloner against a target URL
  • Explain what the fake Google login page looks like from the victim's perspective
  • Interpret the SET terminal output when credentials are captured
  • Explain why 2FA completely defeats credential harvesting attacks
  • Implement at least 4 defences against phishing in an organisational context
  • Map this attack to the correct MITRE ATT&CK tactics and techniques

MITRE ATT&CK Mapping

Tactic
TA0001 — Initial Access
Technique
T1566 — Phishing (Spearphishing Link)
Sub-technique
T1566.002 — Phishing: Spearphishing Link
Credential Access
T1056.003 — Input Capture: Web Portal Capture
Tool
Social-Engineer Toolkit (SET) — S0608
Detection
Monitor DNS for lookalike domains; inspect HTTP POST traffic for credential-shaped data; deploy email URL sandboxing
🚀
Coming Up in Lab 5

In the next lab we explore Metasploit Framework — using it to scan for vulnerabilities, select exploit modules, gain a reverse shell on a target machine, and explore Meterpreter post-exploitation capabilities including privilege escalation and credential dumping.

🙏

Acknowledgements

This lab demonstration was made possible with the enthusiastic participation and support of the following students, who helped set up, test, and validate each step of the hands-on experiment. Their dedication to practical cybersecurity learning is truly commendable.

👩‍💻
Sana Munir
Lab Demonstrator
👨‍💻
Sagar Khanal
Lab Demonstrator
👩‍💻
Babita Jaishi
Lab Demonstrator
👨‍💻
Bipin Shestha
Lab Demonstrator
👨‍💻
Ashish Adhikari
Lab Demonstrator
👨‍💻
Rishav Ojha
Lab Demonstrator
👩‍💻
Varleen Kaur
Lab Demonstrator

— Dr Pritam Gajkumar Shah extends his sincere gratitude to all seven students for their time, effort, and commitment to making this practical cybersecurity resource possible.

Dr Pritam Gajkumar Shah
Dr Pritam Gajkumar Shah
Cybersecurity Academic & Researcher | PhD Information Sciences
AusJournal & CyberPritam  |  Australian Higher Education

Dr. Pritam Gajkumar Shah is an Australian-based computer science academic and cybersecurity specialist with extensive experience in teaching, research, and curriculum development in information technology and cyber security. He holds a Ph.D. in Information Sciences and Engineering from the University of Canberra, where his research focused on elliptic curve cryptography for resource-constrained wireless sensor networks. He is the founder of CyberPritam, a global cybersecurity learning platform that has provided free practical training to thousands of international students, and AusJournal, an academic publishing initiative supporting research dissemination and technical education. His work focuses on practical, lab-oriented cybersecurity education using tools such as Kali Linux, Metasploit, SET, Wireshark, and cloud security environments.