Formbook is an information stealer which has been around for the past few years. Formbook acts as a form grabber which harvests credentials, passwords, banking details, key strokes and network requests, by intercepting web browser and other clients such as email and IM. The particular sample discussed in this report came from a malicious Microsoft Excel document which is included as part of a phishing attack. A snippet of the Excel document is shown below.

Behavioral Summary
The TTP’s for this particular sample discussed in this report, are displayed within CB Defense as shown below.

Details
When the malicious Excel document is opened, and if the “Enable Content” button is clicked within Microsoft Excel, a malicious macro executes a PowerShell script (shown below) which runs in the background as a child process to wmiprvse.exe. The script uses a bitwise XOR to decode and convert the obfuscated payload.

It then makes an external request to an infected WordPress site, and downloads a further payload from “hxxp://insumoscerveceros.com.co/wp-admin/network/Purchase.exe“. The purchase.exe binary is obfuscated using DeepSea Obfuscator, and written in C#. The PE file is saved under “C:\Users\<user>\AppData\Roaming\e4386c.exe”, which is a statically named filename. Upon analyzing the original purchase.exe binary, it includes a newstub.dll file embedded within the PE. After deobfuscating this dll, there appears to be several WMI provider classes used to enumerate the system, such as: Win32_ComputerSystem, Win32_BIOS, Win32_MotherboardDevice, Win32_PnPEntity, Win32_DiskDrive. One particular function of interest is the “VirtualMachineDetector”, which looks for hard-coded strings representing service names of the following virtualization software products: “Microsoft Hyper-V”, “QEMU”, “VirtualBox”, “Microsoft Virtual PC” and “VMware”.

The downloaded file turns out to be a HTML file which contains further obfuscated code. The PowerShell command invokes the Microsoft Visual C# compiler (using the csc.exe command: “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe” /noconfig /fullpaths). The Microsoft Resource File To COFF Object Conversion Utility then executes the following command under cvtres.exe: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\cvtres.exe /NOLOGO /READONLY /MACHINE:IX86 “/OUT:C:\Users\<user>\AppData\Local\Temp\RES8713.tmp” “c:\Users\<user>\AppData\Local\Temp\cc2h5sry\CSC5C694D99DA38495197458127586E1A.TMP”). These commands are responsible for compiling two DLL files in the user’s temp folder: rt3p3n1j.dll and the5vigd.dll. The file names are dynamically generated each time the sample is run. The two DLL files are quickly deleted, and are likely to be contain modules that are loaded to add extra functionality to Formbook.
The CB ThreatHunter process diagram shows the process activity.

If you are a Carbon Black customer looking to learn how to defend against this attack, click here.
Remediation:
MITRE ATT&CK TIDs
| TID | Tactic | Description |
|---|---|---|
| T1193 | Initial Access | Spearphishing Attachment |
| T1059 | Execution | Command-Line Interface |
| T1106 | Execution | Execution Through API |
| T1086 | Execution | PowerShell |
| T1064 | Execution, Defense Evasion | Scripting |
| T1204 | Execution | User Execution |
| T1500 | Defense Evasion | Compile After Delivery |
| T1081 | Credential Access | Credentials In Files |
| T1105 | Lateral Movement, Command & Control | Remote File Copy |
Indicators of Compromise (IOCs)
| Indicator | Type | Context |
|---|---|---|
| 8865779fee523e28918da95a15c88c0f14ffc54d04b32c7a42a1fc2fdff4582d | SHA256 | Excel Document |
| eac39955e9c12314d1bee73e5878d88d | MD5 | Excel Document |
| hxxp://www.insumoscerveceros.com[.]co | URL | Infected WordPress Site |
| 69.175.87.74 | TCP/80 | IP address of infected WordPress Site |
| bed8975b537f5b9f205263a6dffe9a187290405cec2845e7f59d393d0ecc3bf8 | SHA256 | purchase.exe |
| c0192628600119942584ddcb680d27de | MD5 | purchase.exe |
The post CB TAU Threat Intelligence Notification: Formbook Harvests Data By Intercepting Clients appeared first on Carbon Black.
Article Link: https://www.carbonblack.com/2019/09/23/cb-tau-threat-intelligence-notification-formbook-harvests-data-by-intercepting-clients/