Crafting Phishing Emails: Key Techniques for Evasion and Delivery

When operating within the landscape of authorized phishing simulations, crafting your emails to bypass security filters while maintaining engagement with the target is essential. Effective phishing email crafting goes beyond merely tricking users; it involves constructing a well-designed message that mirrors legitimate communication, ensuring high yield without triggering alarms. This approach brings attention to the subtle art of email crafting, focusing not just on aesthetics but also on psychological manipulation and technical evasion techniques.

This article is designed to enhance your understanding of phishing email crafting. We’ll delve into the specific techniques and step-by-step methodologies that can significantly boost the success rates of your simulated campaigns. By the end of this guide, you should be able to implement realistic phishing campaigns that exemplify both technical sophistication and social engineering finesse.


Prerequisites and Setup

Before you embark on crafting phishing emails, ensuring an effective environment and having the necessary tools in place is crucial. This includes not only procuring the right software but also preparing your environment for successful delivery and engagement.

Start by using a platform like GoPhish, which is an open-source tool that allows for crafting and sending phishing emails. You’ll need an SMTP server setup, which can be accomplished using a service like Mailgun or SendGrid for reliable delivery. Install GoPhish with the following command:


curl -sSL https://dl.gophish.io/gophish-v0.11.0-linux-64bit.zip -o gophish.zip && unzip gophish.zip && cd gophish && ./gophish

This command downloads and starts GoPhish, providing a platform to manage templates and campaigns.

Next, configure your sending domain with appropriate SPF, DKIM, and DMARC settings to improve deliverability and avoid having your emails marked as spam. While legitimate domain registration and setup are beyond this guide’s scope, ensuring proper DNS configurations adds a layer of believability and helps you bypass initial automated checks.

Finally, gather all necessary materials for the email content, including branding elements, login pages for redirection, and realistic domain pattern visuals. This setup ensures that all components of your phishing emails are in place for an authentic and seamless execution.


Step-by-Step Execution

Building the Email Template

Creating a believable email template is crucial for your phishing campaign’s success. Start by selecting an email theme resembling legitimate company announcements or security alerts. Utilize HTML and CSS to structure the email with a professional look. Here’s a basic example:


<html>
  <body style="font-family: Arial, sans-serif; background-color: #f9f9f9;">
    <h2>Important Security Update Required</h2>
    <p>Dear User,</p>
    <p>Our records indicate that your account has not been updated to the latest security standard. Please <a href="http://account.microsoft.com.verify-now.com">click here</a> to update your account information.</p>
    <p>Thank you,<br>Security Team</p>
  </body>
</html>

This

HTML

snippet generates a message that appears to be a security notification from an internal team, creating urgency and prompting action.

Crafting Compelling Subject Lines

The subject line acts as the bait for users to open your email. A well-crafted subject line increases the open rate significantly. Ensure it conveys urgency or relevance. Examples include:

  • Action Required: Verify Your Account Information
  • Urgent Security Notification
  • Your Invoice is Ready – Last Chance before Deletion

Each example leverages urgency or unique messaging to capture the target’s attention, compelling them to open and read the email.

Embedding Malicious Links

Once inside the email body, the next critical element is the links leading to your credential capture page. These links should appear legitimate and closely mimic actual URL patterns. Using a tool like Evilginx2 can enhance this process. Here’s a practical example:


http://secure.login.microsoft.com.attackserver.com

This URL employs a blend of subdomain spoofing and domain squatting, making it seem genuine while it directs users to a malicious server.


Advanced Variations

Using Homograph Attacks

Homograph attacks exploit the use of visually similar characters in domain names. They require knowledge of Unicode manipulations but can drastically enhance the effectiveness of phishing attempts. For instance, a domain like:


http://mícrosoft.com

appears identical to the legitimate domain but uses non-Latin characters for specific letters. Choosing these characters carefully can evade certain spam filters and increase the chances of evasive delivery.

Implementing Dynamic Content

Dynamic content, powered by scripts within the email body, can adjust messages based on user interactions or time. Implement a countdown timer to create urgency:


<script>
  // Simple countdown script
  var timeLeft = 30;
  var elem = document.getElementById('timer');

  var timerId = setInterval(function() {
    if (timeLeft == -1) {
      clearTimeout(timerId);
      // Redirect to credential capture page
      window.location.href = 'http://security-check.verify-site.com';
    } else {
      elem.innerHTML = 'Time remaining: ' + timeLeft + ' seconds';
      timeLeft--;
    }
  }, 1000);
</script>

This JavaScript snippet within your email increases the perceived urgency, prompting quicker user action, enhancing conversion to your phishing endpoint.


Good, Better, Best Techniques

  • Good: Use basic HTML and text formatting with a simple call-to-action.

    Example: “Update your account now to avoid disruption.”

  • Better: Incorporate professionally designed email templates with authentic logos and mimic legitimate email structures.

    Example: Include company branding such as, “ABC Security – Urgent Update Required.”

  • Best: Seamlessly integrate homographs, dynamic content, and server-side obfuscation for a flawless façade that bypasses even seasoned scrutiny.

    Example: Use personalized messages with dynamically populated data and a domain like “http://payápal.com/security-check” with an authentic-looking link path.


Related Concepts

Phishing email crafting intrinsically relates to other social engineering tactics such as spear phishing and whaling. While generic phishing attempts cast a wide net, spear phishing targets specific individuals within an organization using personalized information. Whaling further narrows the focus on high-profile targets like executives. Understanding the nuances between these tactics enables a more specialized approach to crafting emails that resonate with the target.


References

SANS Internet Storm Center – Phishing Diary

GoPhish Official Website

Evilginx2 Official Guide


Related Reading


Educational Purpose: This content is provided for awareness and defensive purposes only. Understanding attacker methodologies helps individuals and organizations protect themselves.