Technical

How to Get Away with Phishing - Part 2: Delivering the Lure

Phishing

Once you’ve crafted the perfect bait, the next step is to deliver it to your target. However, some obstacles lie in your way - many big companies employ pesky spam filters and email scanning tools to catch and block suspicious mails. In part 2 of the series, we’ll explore the techniques and strategies we can use to evade detection and deliver phishing emails to our targets.

Understanding Email Security Measures

Modern email systems use a combination of standards, signatures, and heuristics to detect and block phishing attempts. These include:

We’ll go through each of these measures and discuss ways to bypass them.

Techniques for Bypassing Spam Filters/Antivirus

1. Domain Reputation Management

Spam filters place a significant emphasis on the reputation of the sending domain. Emails sent from domains with a history of sending spam are more likely to be flagged, while domains with a clean reputation are often trusted. To avoid immediate detection:

2. Using Trusted Domains or Compromised Accounts

A highly effective method for bypassing spam filters is to use a trusted or compromised account with an established “clean” reputation.

Email scanners are trained to detect malicious URLs and attachments, but we can try to hide them:

4. Tailoring Email content

Of course, the actual email content matters as well. Here are some tips on how to avoid raising red flags with your phishing email.

Techniques for Bypassing Email Authentication Protocols

SPF, DKIM, DMARC - the backbone of email authentication, and essentially what prevents people from sending emails as anybody they want.

Properly configured SPF/DKIM/DMARC is highly difficult to bypass, but mistakes happen - this is where you strike. We’ll talk about how these work, how they can go wrong, and how we can take advantage of that.

1. SPF (Sender Policy Framework)

SPF is an email-validation system designed to prevent spoofing by verifying the sender’s IP address. SPF allows domain owners to define which IP addresses are authorized to send emails on their behalf by creating a DNS record containing this information.

How SPF Works:

Bypassing SPF:

2. DKIM (DomainKeys Identified Mail)

DKIM allows the recipient to verify that an email claiming to be from a specific domain was indeed authorized by the owner of that domain and was not altered in transit. DKIM uses public-key cryptography to sign certain parts of an email, typically the headers.

How DKIM Works:

Bypassing DKIM:

3. DMARC (Domain-Based Message Authentication, Reporting & Conformance)

DMARC builds on SPF and DKIM, allowing domain owners to enforce policies for how emails that fail SPF or DKIM checks should be handled. It also provides a reporting mechanism, allowing domain owners to receive reports on email authentication activity.

How DMARC Works:

Bypassing DMARC:

Conclusion

Delivering a phishing email is a complex process that goes beyond crafting convincing content. As with many areas of security, to increase your chance of success, you must understand the defenses employed by your target and exploit their weaknesses.

Now, after we evade the target’s defenses and deliver our carefully crafted email, what’s next? In the next installment, we’ll go beyond the phishing campaign, and talk about what happens after the target clicks on your link and runs your malicious payload.