Technical

How to Get Away with Phishing - Part 1: Crafting the Lure

Phishing

Welcome back to our series on “How to get away with phishing,” where we’re diving deep into the world of phishing. In part 0, we covered the preliminary research. In this part, we’re going to use the research you’ve done to craft the perfect lure.

Step 1: The Initial Hook - Email

The research you’ve done in part 0 comes in handy here - tailoring your message to and referencing specific things about your target makes an effective hook, and makes it more likely that they’d engage with your email instead of throwing it straight into the junk folder.

Key parts of a custom lure

These are some details that are useful for crafting a targeted phishing email:

Assembling your lure

Now that you’ve gathered and analyzed the relevant information, it’s time to craft the email. Here’s are a few steps, along with some examples:

Stage 2: Setting Up a Convincing Phishing Website

Ok, so you’ve managed to get the target to open the email and click on the link. All as planned.

Now is a pivotal moment - will the target proceed to submit their credentials into your phishing site and/or download your malware, or will they realize the ruse and back out (and possibly report your email to their pesky security team)?

We’ll walk through some steps on creating a website that would convince the most vigilant targets to part with their lovely credentials.

Step 1: Register a convincing domain name

Your domain name is going to be one of the first things to give you away. If you’re pretending to be Apple, your obviously-evil.xyz domain isn’t going to convince anyone. But apple.com is already taken! What do you do?

1. Use Similar-Looking Domain Names

One simple way is to register a domain that closely resembles the legitimate site you are trying to impersonate. For example:

2. Use Punycode to Impersonate Websites

Punycode is a way to represent Unicode characters in a domain name using ASCII. This allows attackers to create domain names that appear visually identical to legitimate ones, even though the underlying characters are different.

Step 2: Set up TLS

You see that lock icon in the URL bar?

lock

Most legitimate websites have it. If you want to look legitimate, you’ll need it too.

This part is quite simple, you just need to set up a TLS Certificate for your website - if you’re short on budget, you can even get it for free from Let’s Encrypt.

Stage 3: Content

Now for the actual meat of your website. The content. Your target isn’t going to put their precious credentials into any random page. If they think they’re going to apple.com, then the website’s gotta look like apple.com, or the alarm bells are going off.

Approach 1: Imitation is the highest form of flattery

The simple way is to just copy the website. Tools like HTTrack or SiteSucker can help you download an entire website. You can then inspect the files and extract relevant parts to build a copycat version of their websites.

You’ll need to adjust certain parts of the cloned website to make it work for your nefarious purposes, such as changing form submission fields to point to your own backend.

Bonus tip: When cloning websites, strip out any elements that aren’t essential to the phishing attack, such as complex scripts that might break or raise suspicions in the cloned website.

The above can be tricky, as many modern websites can be very complex and it can be time-consuming to go through all of the code, extract the relevant parts, and modify it to work for you. But what if you could imitate a website without having to copy any of their code?

Approach 2: Instead of imitating, try intercepting

Enter…Evilginx.

Evilginx is a man-in-the-middle (MITM) attack framework that acts as a proxy between the victim and the legitimate website. Unlike traditional phishing, which focuses on stealing usernames and passwords, Evilginx can intercept login credentials along with session cookies, which in turn can allow the attacker to bypass 2-factor authentication protection.

How it Works:

Because Evilginx proxies the legitimate site, the content shown on the phishing site is nearly indistinguishable from the real one.

Stage 4: Testing - Eating your own fish food

You’ve put so much effort into your campaign; it would surely be a pity if it ends up flopping. So before you cast your lure, test it first:

Tools like Gophish can help you simulate campaigns and analyze responses.

Conclusion

And that’s it! The lure is prepared, and in the next part of the series, we’ll explore how to deliver it effectively and ensure that your hook reaches the intended audience.