Research by: Cybereason Nocturnus Team
Over the last several months, the Cybereason Nocturnus team has been tracking recent espionage campaigns targeting the Middle East. These campaigns are specifically directed at entities and individuals in the Palestinian territories. This investigation shows multiple similarities to previous attacks attributed to a group called MoleRATs (aka The Gaza Cybergang), an Arabic-speaking, politically motivated group that has operated in the Middle East since 2012.
In our analysis, we distinguish between two separate campaigns happening simultaneously. These campaigns differ in tools, server infrastructure, and nuances in decoy content and intended targets.
In part one of this research, we analyze the Spark campaign. This campaign is named after a rare backdoor used by the MoleRATs Group, dubbed Spark by Cybereason and previously reported by 360’s blog.
For a detailed report on the Pierogi campaign, please see part 2 of this research.
The creators of the Spark backdoor use several techniques to evade detection and stay under the radar. They pack the malware with a powerful commercial tool called Enigma Packer and implement language checks to ensure the victims are Arabic speaking. This minimizes the risk of detection and infection of unwanted victims.
For a synopsis of this research, check out the Molerats & Pierogis Threat Alert.
These attacks show significant similarities to previously documented attacks attributed to the Arabic-speaking threat actor, commonly referred to as the MoleRATs group (aka, The Gaza Cybergang, Moonlight, DustySky, Gaza Hacker Team). This group, which has been attributed by various security teams, is believed to be comprised of three subgroups:
A Note on Attribution
It is important to remember there are many threat actors operating in the Middle East, and often there are overlaps in TTPs, tools, motivation, and victimology. There have been cases in the past where a threat actor attempted to mimic another to thwart attribution efforts, and as such, attribution should rarely be taken as is, but instead with a grain of salt and critical thinking.
Themes of the Content Used to Lure Targets
In this attack, the targets are lured to open a document or a link attached to an email. There have been cases in the past where victims also downloaded malicious content from fake news websites. The names of the files and their content play a major part in luring victims to open them, as they usually relate to current topics pertaining to Hamas, the Palestinian National Authority, or other recent events in the Middle East. The lure documents analyzed by Cybereason in this attack concentrate on the following themes:
Spark Backdoor dropper named “Abu-Mazen and Kushner’s meeting” uploaded to VirusTotal from the Palestinian territories.
File Name |
SHA-256 |
لقاء ابو مازن و كوشنير.exe Translation: Meeting between Abu-Mazen and Kushner |
01887df1febdf6fdf85e870e8d87f4397a4854ffedeaffd2f8d21310306e50b0 |
محضر اجتماع قيادةالاجهزة الامنية في غزة من اجل افشال انطلاقة فتح.exe Translation: Minutes of the meeting of the leadership of the security services in Gaza in order to thwart the anniversary of Fatah.exe |
2268101c32989e7cfcb8b2ef47163f741850e7619edf0c0e8f365cfceb1b1e82 |
Details%20Ceasfire%20with%Israel.zip |
31b08c139b6fc3bdde0734d1b2c609550a03ca97ec941eaf24224bb449e17e26 |
هنية سيقيم في الخارج و حماس تصعد في غزة.pdf Translation: Haniyeh will remain abroad and Hamas steps up in Gaza.pdf |
5b476e05aacea9edc14f7e4bab1b724ef54915f30c39ac87503ed395feae611e |
تقرير معلومات فوري.exe Translation: Urgent Information Report.exe |
6e896099a3ceb563f43f49a255672cfd14d88799f29617aa362ecd2128446a47 |
Table that summarizes files observed in the Spark campaign.
In the Spark campaign, the lure documents and links point to one of two file sharing websites, Egnyte or Dropbox. The target is encouraged to download an archive file in a rar or zip format that contains an executable file masquerading as a Microsoft Word document.
The following file was downloaded from DropBox:
Malicious archive hosted on Dropbox.
Malicious archive with a name meant to lure targets.
One example of a lure document used in the Spark campaign is a PDF file that is used to deliver the Spark backdoor to the victim. The document includes a special report allegedly quoted from the Egyptian newspaper Al-Ahram. This document reports that Ismail Hanieyh, the political leader of Hamas, had notified the Egyptian government that he will remain abroad after his visit to Tehran to take part in Soleimani’s funeral, which sparked tension with the Egyptian authorities.
File Name |
SHA-256 |
هنية سيقيم في الخارج و حماس تصعد في غزة.pdf Translation: Haniyeh will remain abroad and Hamas rises in Gaza.pdf |
5b476e05aacea9edc14f7e4bab1b724ef54915f30c39ac87503ed395feae611e |
The document was submitted to VirusTotal on the 20/01/2020 from the Palestinian territories:
Document uploaded to VirusTotal on 20/01/2020 from the Palestinian territories.
Phishing document luring the readers to click on a malicious link.
The target is encouraged to click on the link to read the entire article. However, the document does not link to the Egyptian Newspaper website, but instead to a file sharing website called Egnyte. It prompts the user to download a file that supposedly contains the full article.
Link embedded in the PDF document: hxxps://csaasd.egnyte[.]com/dd/h5s7YHzOy5
The downloaded file is an archive file (.r23), that contains a Windows executable file with the same name as the PDF and with a fake Microsoft Word icon.
SHA-256 |
File Name |
e8d73a94d8ff18c7791bf4547bc4ee2d3f62082c594d3c3cf7d640f7bbd15614 |
هنية سيقيم في الخارج و حماس تصعد في غزة.r23 (Hanieh will remain abroad and Hamas steps up in Gaza.r23) |
7bb719f1c64d627ecb1f13c97dc050a7bb1441497f26578f7b2a9302adbbb128 |
هنية سيقيم في الخارج و حماس تصعد في غزة.exe (Hanieh will remain abroad and Hamas steps up in Gaza.exe) |
Spark backdoor dropper file masquerading as Word document using a fake icon.
When the victim double clicks on the executable file, it unpacks and installs the Spark backdoor, as shown in the attack tree screenshot below.
Installation process of the Spark backdoor, as shown in Cybereason’s attack tree.
The extracted executable file contains a compiled Autoit script, which can be seen in the RT_RCDATA section of the file.
Autoit indications found in the binary resources of the dropper (SHA-256: 7bb719f1c64d627ecb1f13c97dc050a7bb1441497f26578f7b2a9302adbbb128).
The decompiled code shows the decryption routine that unpacks the embedded Spark backdoor.
Excerpt from the decompiled Autoit script where it is unpacking the Spark backdoor.
Once the file is unpacked, the backdoor is dropped in two different locations on the infected operating system:
In addition, the Autoit code also creates the following scheduled task for persistence:
Excerpt from the decompiled Autoit script where it installs the backdoor and creates persistence.
During our investigation, we found the following executable file.
File name |
SHA-256 |
تقرير معلومات فوري.exe (Urgent Information Report.exe) |
6e896099a3ceb563f43f49a255672cfd14d88799f29617aa362ecd2128446a47 |
The executable has a Microsoft Word icon to trick victims into believing they are opening a Word document.
Spark backdoor dropper file masquerading as Word document using a fake icon
Once the user double-clicks on the executable file, the dropper drops a Word document in %AppData% and displays the following decoy document to the victim, while the dropper runs in the background and installs the backdoor.
Decoy Document Name and Path |
SHA-256 |
%appdata%\info.docx |
2c50eedc260c82dc176447aa4116ad37112864f4e1e3e95c4817499d9f18a90d |
The decoy document presents to the user titled “Urgent Information Report” in Arabic.
The dropper drops the Spark backdoor binary and a shortcut file used to initiate persistence in the following locations.
File name |
SHA-256 |
C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Blaster.lnk |
4254dc8c368cbc36c8a11035dcd0f4b05d587807fa9194d58f0ba411bfd65842 |
C:\Users\user\AppData\Roaming\Blaster.exe |
cf32479ed30ae959c4ec8a286bb039425d174062b26054c80572b4625646c551 |
Cybereason UI: The attack tree displaying the Spark backdoor infection chain.
The Spark payload is a custom backdoor likely developed by the MoleRATs group. In addition to known generic malware (such as: njRAT, Poison Ivy, XtremeRAT), the MoleRATs group has been known to develop its own custom tools such as DustySky, the MoleRAT Loader and Scote. We believe this backdoor is relatively new and seems to have appeared starting in the beginning of 2019.
The name Spark is derived from the PDB path left in a few of the backdoor binaries:
The Spark backdoor allows the attackers to:
The creators of the Spark backdoor use a few techniques that are intended to keep the backdoor under-the-radar, including:
All the the payloads observed by Cybereason in this campaign were packed by a powerful yet commercial packer called Enigma Packer. The MoleRATs group have been known to use this packer in previous attacks.
Enigma packer artifacts in file metadata (SHA-256: b08b8fddb9dd940a8ab91c9cb29db9bb611a5c533c9489fb99e36c43b4df1eca).
One common evasive mechanism used by the Spark backdoor is its ability to check for installed security products using WMI queries (WQL). If certain security products are installed, the backdoor does not carry out its malicious activity.
Another evasive mechanism used by the backdoor is how it checks whether an Arabic keyboard and Arabic language settings are used on the infected machine. If Arabic keyboard and language settings are not found on the machine, the backdoor will not carry out its malicious activity. This check serves two purposes:
Enumerating installed keyboards on the infected machine.
Obtaining locale information from the infected machine.
Comparing the results of the language checks with the word Arabic.
After unpacking itself, the Spark backdoor creates a hidden window where most of the malicious activity is handled.
Creation of the hidden window, using 0 value for the ShowWindow function to hide the window.
This behavior can be detected using a tool called WinLister, which enumerates hidden windows. The name of the window is Spark4.2.
The Spark backdoor communicates with the C2 servers over the HTTP protocol. The data is first encrypted and then encoded with Base64. In this instance, the backdoor posts the data to the domain Nysura[.]com (For more domains, please see the IOC section of this research).
It is interesting to see that the HTTP POST host header refers to a legitimate domain cnet.com, however, in acutality, the data is sent to nysura[.]com, as can be seen in the traffic screenshot below.
The Spark backdoor sends data to the C2 server.
The data sent to the C2 follows a structured pattern that uses a predefined keywords array, where each keyword is mapped to a certain subroutine. The keywords are comprised of the names of individuals. They are mostly Western names, but there were some Arabic names in a few of the samples.
Keywords comprised of names used by the backdoor.
Prior to sending the data to the server, the data is encrypted and staged in an array like this:
[27089,28618,9833,4170,25722,19977,2369,21426,3435,7442,30146,21719,16140,16280,16688,22550,19867,194,3298]
The data is then encoded with Base64:
"WzI3MDg5LDI4NjE4LDk4MzMsNDE3MCwyNTcyMiwxOTk3NywyMzY5LDIxNDI2LDM0MzUsNzQ0MiwzMDE0NiwyMTcxOSwxNjE0MCwxNjI4MCwxNjY4OCwyMjU1MCwxOTg2NywxOTQsMzI5OF0="
The Base64-encoded data is inserted into the following json object, which contains the individual names.
json object containing the Base64-encoded data.
Lastly, the entire json object is encoded with Base64 and undergoes another stage of encryption, and then sent to the server:
ZjRTc1dTTU9nVW5FaXM3bGgvbU90MTlVMHFkb1c5SFFuRXhhSVR5YytIQkZremk3bk5wY21BUEZRYitJenA1cnlJY1lxREJJZ1RrL0N4UzZWcVVQM0pTUWFISlhKWG8wN1BxWE1hYThHSUdEVnBFakYrNlp1bXBvdUZMRFNYQVhxYk9tSElWYTFOTlpJK0hFVVBmTG9CQUV3VCtqQ2FCVUE1aHQ2SzllSHREMUpOdkdBUXZ3TWgyLzhtVHpha2I0TE81ZlpURTQyUmVjdFY1M0ZpemlRR1FLL1gzNE9mcU0zR0JqQ1ZnN1hCSmFGaC94RHBDMkNBRmZaSTVoVlhsaTBtQW5SR3N5QzVRY2lMNkpZVFJuRTQrUzBjdjU4SjY4ejRCL2FNbW9IakRheHdQd1RPUElkOHNDbDRVbmp2ZDM0ZVZlZTB1QVA0UHo0YllyVHRMZVRnPT0="
Using names as keywords is an identical technique to that of the data structure logic previously documented by 360’s blog post. This post discusses an earlier variant of the backdoor attributed to the MoleRATs group. Using other individuals names for C2 communication has also been done by the two other Gaza Cybergang groups:
The Spark campaign detailed in this blog demonstrates how the tense geopolitical climate in the Middle East is used by threat actors to lure victims and infect them with the Spark backdoor for cyber espionage purposes.
The names of the files and decoy content seem to be carefully crafted, often referencing controversial and topical political issues. Cybereason estimates that the files are specifically meant to lure and appeal to victims from the Middle East, especially towards individuals and entities in the Palestinian territories likely related to the Palestinian government or the Fatah movement.
The techniques, tools, and procedures used in this campaign bear great resemblance to previous attacks attributed to the MoleRATs Group (aka Gaza Cybergang Group), an Arabic-speaking, politically motivated group that has operated in the Middle East since 2012.
Our research demonstrates the efforts used by attackers to reduce the risk of detection of the Spark backdoor by various security products. The backdoor checks for the existence of antivirus and firewall products before it initiates its malicious activity. Importantly, the backdoor simply will not reveal its malicious nature unless Arabic language keyboard and settings are found on the infected machine. This shows how the attackers use this backdoor in a surgical way to exclusively attack specific targets.
In addition, analysis of these backdoor delivery methods also highlights a trend by many threat actors where they use legitimate storage platforms to deliver the initial stages of the attack. By storing malicious content on trusted platforms like DropBox, attackers reduce the risk of detection by certain security solutions that are gaining popularity, like email filters.
Cybereason prevents and detects the attacks mentioned in this research.
Cybereason UI: The attack tree showing the installation of the Spark backdoor.
Cybereason’s Next-generation Antivirus can detect and prevent the Spark backdoor.
(SHA-256: 5139a334d5629c598325787fc43a2924d38d3c005bffd93afb7258a4a9a8d8b3)
The file (pdf.exe) was automatically blocked by NGAV.
Cybereason agent blocks the execution of the Spark Backdoor.
Click here to download the MoleRATs IOCs (PDF)
Initial Access |
Execution |
Persistence |
Privilege Escalation |
Defense Evasion |
Discovery |
Collection |
C&C |
Exfiltration |