The truth is, either I don’t wax this or all of a sudden you even have me in the soup. Many of you know that I have been with a friend and colleague @Carol12Gory giving a talk called “Fishing Phishers” in which we explained on the one hand how to get information about phishings and how to link the information of these fake pages with possible groups and campaigns and on the other hand how to set up a Phising distribution system that works better than the botched jobs that we get in the mail every day.
In this first article we are going to focus on the tools and techniques to distinguish a false mail from the real one and to get as much information as possible about the attacker.
How many of you don’t wake up every morning and find the Mail full of mails that…?
- They call you ugly because they’re looking for a Chinese girlfriend?
- They insinuate that you are impotent by offering you the blue pill? (Not the one of Morpheus)
- Ehh! or is that you are very hot and half-worldly women want hot things with you…
- Amazon writes to you and it turns out you haven’t ordered anything?
- Oh my non-existent Netflix account now has problems with my card that I have never given?
These are several examples and the list would never end, but of course if you are somewhat restless minds and want to learn … why not a boring day we take our knowledge and put them to do “mischief”?
Of course … apart from because they are SPAM, how can I know that they are not LEGITIMATE emails?
WHERE DO WE START?
Well for the principle? is worth jokes apart depends on how we have configured the email account all this crap will reach us SPAM, rare is the one that sneaks into our “Inbox” but as a recommendation … put a filter that everything that is not known senders …. TO THE SPAM MAILBOX!
Okay, we already have a malicious email but … and now what? In this case you have in your mail the option to look at the headers of the mail?
- Mail header: Contains all the useful information from a security point of view
- Origin (From:)
- Destination (Delivered to: )
- Date (Date: )
- Subject (Subject:)
- Recieved From (Received: from ) =>This data is usually the most interesting because it brings all the jumps that has stuck this mail to us. In many cases is where we can detect that this is a mail that is not legitimate.
- Content Type (Content type)=>Sets the content type of the body of the HTML message, plain text, etc.
- ID del Mensaje (Message ID)
- Recieved (Received by)
- Send to (Reply to)
- Message Body (Message Body) => Contains the message that transports the mail
- The “interesting things that can contain an email in this part are the links or even “buttons” (which are still a nice link) and that later in the article we will also analyze.
The first thing we will analyze will be the language, since many phishings are so sloppy that they use automatic translators and what pretends to be Spanish or English ends up being a rare thing more similar to Swahili than what they intended:
Before clicking anything… BE QUIET DO NOT CLICK!, you must look at the content of the links because the hyperlinks they bring can look like one thing and be another:
If we right click on the button “GO TO APPLE ID ACCOUNT” and choose the option “Copy link address” we’ll see that apple nothing, but this is the link that takes us to
I don’t know about you but I don’t play the game by opening a link of these in my team so I throw miles with a tool that I already mentioned in my previous post and it’s none other than ANY.RUN .
- We create a machine with the link we got
- Let’s see what happens in the machine. What do I observe?
- New processes
- Changes in the registry
- Connections and requests you make (From here you can get new IPs ;P)
- Countries of origin
- Is there any download
In the case that we see that the web is innocuous and that it only looks for the theft of credentials it is interesting to open Burp and put it to see how it works underneath.
ANALIZING HIDDEN CONTENT
To analyze the headers we will use a couple of tools that are simple to use and that are available ONLINE :
- MR. TOOLBOX
- To see the content of the mail we are analyzing click HERE. Besides, the interesting thing about this tool is that it already has a Blacklist of servers and domains more or less updated, so you mark the reliability of the sender.
- GOOGLE TOOLBOX
- AZURE TOOLBOX
- KITTERMAN => SPF Analyzer Measures server reliability
Now we have data, don’t we?
What do we do with them? The first thing is to organize them because if we don’t organize them at the end it’s a gibberish without ton ni son and the second thing is to go looking for information about them
- Go to Shodan and see what information it has
- Review Alienvault OTX information
- Search for information you have in CISCO TALOS
- Tools like PENTEST TOOLS allow us to launch an nmap from the web, something limited but something is something
- If it’s lucky there’s something on WhoIs?
- In case the page is down (which can be normal) there are always tools like WAYBACK MACHINE to which we can turn to see what it was like and what it had
There are times when with such nonsense … we end up finding some panel of a C & C that is already sad but as well I say, there are bad … and bad bunglers and the latter abound in the network.
The vast majority of times are servers that have been compromised in some way by a bad configuration and have open RDP services for example that are vulnerable to attacks such as Bluekeep.
We leave here the part corresponding to the ppt that we use in our workshop both Black Knife and HoneyCon.
This is all for the first part of the workshop we offered in both events. See you in the next part!
“Zuretzat Ilargia Lapurtuko nuke Gauero” – Ken Zazpi