Let’s get fancy with false flags

A quick demonstration on how to appear as an APT28 related C2

A lot is going on today with APT28 (allegedly the Russian military intelligence agency GRU). Indeed, they are very prolific and quite good at spear phishing.

They recently targeted the Emmanuel Macron’s campaign and the #EMleaks were mostly attributed to Russia — which makes sense — but is it supported with any fool-proof evidence? No and here is why.

Anyone can add fake metadata

Just install a Russian version of Windows, add a Дмитрий user, setup Microsoft Office, open a new document and voilà! You can now create or edit any Word document that will look like it was written by Dmitry from Moscow. That also works very well with Visual Studio and malware.

Second option is to manually edit the raw document. Let’s take a random .docx document, extract it (it’s just a zipped archive) and then modify the docProps/core.xml file that contains the metadata with the author name and timestamps. Great succes, you are now a data tampering troll master.

Copycat attacks

Antivirus editors and cybersecurity vendors are giving public reports about the Tactics, Techniques, and Procedures (TTPs) of the most advanced APTs.

So what is preventing another group of impersonating the methodology of any known APT and mimic them? Nothing, and we’ve already seen in the past malware authors mimicking others people work. So that won’t work either as a proof.

Infrastructure reuse and fake DNS data

There are known lists of domain names used in cyberattacks by various groups. Every now and then antivirus editors will take over malicious domain names (because they ask nicely, or because the domain is available) in order to track victims. Guess what? APTs can also do that! I found several APT28 related domain names that were used in 2014 that are currently available: asisonlline[.]org, bostondyn[.]com, cublc[.]com, …

Anyone can use them now to confuse cyber analysts.

To go even further and as an experiment I setup my own domain mimicking some APT28 artefacts: totally-legit-cloud.email that has been registered using the same information as another APT28 phishing domain used during the attack on EM staff. Upon registering a domain name, registrars will ask you about your name, address, etc. These data are never verified and anyone can fake them so that’s what I did with my new domain name:

Spoofed Whois DNS data

This domain (that I own) is now linked with actual APT28 infrastructure according to some threat intelligence OSINT tools:

Almost anything can be spoofed that easily, really.

Who did it then?

We can only make assumptions so far. Now that everyone is aware of false flag attacks, APT28 strategists could choose to keep going on with attacks without giving a single f*ck about their fingerprints because they know anyone can impersonate them anyway. So why bother changing your TTPs? Dumb analysts will say “it’s too obvious so it can’t be the Russians”. Yes it can. Maybe it’s not? Only some intelligence agencies may really know what’s up and the Russians will play along that very well.

Metadata might only give us clues. It needs to be corroborated with other sources of intelligence or you’ll fail miserably at threat intel.

Clear attribution is nearly impossible based on metadata alone

Now more than ever, every byte that can be tempered with will be. We’ve seen through leaked documents that both the CIA (UMBRAGE project) and the NSA (Fourth Party team) are already doing so in order to cover their attacks and blame others.

Some people might think at this point “it’s okay because most of the APT IoCs are confidential and only TLP RED”: keep in mind that most APTs are state-sponsored and that all of them have governmental CERT that can access this data legitimately. For instance, the British doesn’t even make a difference when recruiting engineers for defending or attacking networks. Because they know these kinds of attacks are the future of covert CNE operations.

Parallel diplomacy

In addition to all that, we have to acknowledge that nowadays hacking is also a way of sending a message. The Russians might want to be seen to send a clear message to the next French president: “you know we can hack you easy peasy, you don’t like Putin ok, but don’t mess with us”.

In the military that is called a show of force. And the young Emmanuel Macron will surely remember that he was personally (him and its teams) targeted and somewhat successfully hacked. That’s like having a red dot from a laser of a sniper rifle pointing at you. Scary? Yes. Will it shoot? Maybe.

That’s yet another example of cyber as an instrument of deterrence (see also Stuxnet, Shadow Brokers, …).

Conclusion

Don’t rely solely on technical artefacts found here and there to base your opinions. Sometimes it’s not that easy to attribute a computer attack to a known threat actor, things can get a little more complex… Don’t get yourself easily manipulated: think about the implication of the hack and what may be the original intent of the threat actor.

Only high confidence concurring sources will help revealing who is behind an attack, otherwise it’s just plain speculation.

Feel free to debate anything I’ve shared on Twitter (@x0rz).