1. PE File Triage
f58ee5a3eaae6b4139b7d1b2a4b407f15705dfd0727236469730e978d8d9d436
If we go through the "File Hdr" section in PEBear, we can also see the machine architecture of the malware, which is 32 bit. Additionally, if we go the Optional HDR, we can further see that the virus allows backwards compatibility all the way down to windows 95 / NT 4.0.
Compilation timestamp (raw + interpreted)
Compilation timestamp is metadata about the records that includes the exact date and time the programmer compiled the executable file. In our case its:
- 2023-04-18 22:40:23 UTC
(PE BEar => file hdr)
Subsystem (GUI / Console) / DLL characteristics flags (NX, ASLR, etc.
Is it signed or unsigned?
Using PE-Bear, we can see that the section names are defined as:
.text
.rdata
.rsrc
.data
Virtual size vs raw size of Section Headers
RAW VS VIRTUAL data size:
.text 61KB - 60KB
.rdata 4KB - 3KB
.data 8KB - 11MB ( the difference here is extremely suspicious, and we thought it was a definite sign of packing; however, after research, we think that it might be due to VirtualAlloc being connected.)
.rsrc 4KB - 16 bytes
Entropy
Permissions (R/W/X)
Each section has different permissions, using PE bear we found that:
-text r/x
-rdata r
.data rw
.rscr r
Pe bear - section hdrs
Imports
List of imported DLLs
Kernel32.dll
User32.dll
WINMM.dll
Anti-analysis indicators
11 security-relevant APIs:
Using PE Studio, we saw that 11 APIs were flagged, those being:
SetConsoleMode
SetConsoleCursorPosition
SetEnvironmentVariableA
GetCurrentProcess
WriteFile
GetEnvironmentStrings
GetEnvironmentStringsW
VirtualAllocCreateProcessA
GetDesktopWindow
SetWindowPos
Pestudio - imports
For this part, we also used (malapi.io). This website is extremely helpful when trying to understand what each of the API flagged in PEstudio do.
Required analysis
Which section likely contains core logic and why
Whether metadata appears legitimate or suspicious
The metadata (data of data) in this malware seems to be suspicious. This claim can be supported by PE Bear, since there we can see that all: Security directory = 0
2. Reputation & Context in Virus Total
Detection ratio => 22/72 antiviruses have claimed this malware as malicious.
3 AV vendors => CTX,KINGSOFT, Artic Wolf
Behavioral tags according to Virus Total => Persistance
Required analysis
When it comes to this virus, vendors agree on both behaviour and naming, since most of them classify it as a Trojan, and the behaviour is classified as "persistent" throughout all reports. Persistent behavior (when it comes to malware) means that the virus is able to maintain long-term access to a system, further ensuring that it survives interruptions like reboots or credential changes.
However, it is worth mentioning that VirusTotal does not show us all of the information we need. This page is missing important info like:
APIs that are flagged as security sensitive,
DLL characteristics,
String Analysis,
Other behaviour tags such as Discovery,
And important context from the batch file.
3. String Analysis
Loading. => this function may indicate that the malware might have a console output or a fake loading screen.
WindowTitle => This function gets or sets the title of the host Window or NavigationWindow of a Page. It can be used to guide the malware to a specific place.
GetTickCount. => Based on this link (https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-gettickcount) we can see that this returns the value of milliseconds since the system was started. This can mean that it is a anti-debugging method, since debuggers and VMs have a much smaller up-time, which the malware can detect and acknowledge if its being used in a sandbox environment.
VirtualAlloc / VirtualFree. => Mentioned beforehand, with this, we can confirm memory manipulation.
TerminateProcess (Confirms destructive capability). => Can be an artifact that further demonstrates the destructive capability of the malware. According to this post (https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess) this function terminates specified processes and all of its threads, Common thing for a CNA trojan malware.
93796 => The file size data expressed in bytes.
111111111 => Can potentially be a "go" method or "true" method
000000000 => Can potentially be a "stop" method or "false" method
Decoded/deobfuscated stringsThere is none.
File pathsfe.txt =>The malware likely creates or looks for this text file.
Registry keys / URLs /IPs
While searching through the .bat file manually, or after running floss and strings, we did not encounter any Registry keys, URLs or IPsCommand-line strings
/c =>Standard flag for cmd.exe to run a command and close.
del=>Delete command.
>nul=>Hides the output of a command so the user sees nothing.
Pause
cmd.exe
command.com
- none
Required analysis
Strings indicating execution:
- cmd.exe
- command.com
- /C
- CreateProcessA
- TerminateProcess
- ExitProcess
- GetCommandLineA
- WaitForSingleObject
- GetExitCodeProcess
- .exe
- .bat
- .cmd
- .com
Strings indicating persistence
There is no strings that indicate persistence, no registry run keys, schedules tasks or anything that looks like its service related.
Strings suggesting C2 or data exfiltrationStrings likely to be noise or decoys
These are standard parts of the compiler or libraries and should be ignored in your analysis report to avoid clutter.
%s%s%s%s%s=>Standard C formatting strings.
R6028, R6027, runtime error => These are standard Microsoft Visual C++ Runtime error messages. They are present in almost every program written in C++.
00000000, 11111111 => Memory padding or placeholders.
GetACP, GetOEMCP =>Code page settings, usually standard boilerplate.
CorExitProcess => A standard artifact of the .NET or Visual Studio runtime environment.
4. Capability Identification
CAPA is an open-source tool created by Mandiant. With this tool, we can analyze and compare the malware with the written rules that the tool has within. Capa maps analyzed behavior to the MITRE ATT&CK framework and uses predefined rules to identify capabilities through automatic static analysis. To use this tool we need to put the virus and capa in the same file, and then run this command :
.\capa.exe .\win32update.exe
By doing this we get this result:
Here we can see the MITRE ATT&CK Tactics and Techniques, as well as the capabilities the malware has. However, if we want to find the CAPA rule names, their capability categories and evidence properly, we need to run this command: .\capa.exe -v .\win32update.exe . The -v stands for verbose, where capa will simply list all the required information from the .exe file. Here are the results:
In order to sort the up-stated info, we created a simple table using Google Docs.
CAPA Rule: Manipulate Console Buffer
Why CAPA triggered this=> Capa identified this behaviour because our malware imports and uses SetCOnsoleMode and SetConsoleCursorPosition. These APIs allow the program to modify the how the CLI pops up (ex. changing colors, clearing the screen, etc)Confidence Level: High=> SetCOnsoleCursorPosition seems to be a very specific indicator of console manipulation. It is rarely imported unless the program specifically wants to control the CLI layout.
Possible False-Positive: Normal software like the normal CLI may also often use these APIs to create user-friendly text interfaces.
CAPA Rule: Write File on Windows
Confidence Level: High => if WriteFile is imported and used, the program has the capability to write data to the disk, so there is essentially zero ambiguity here.
Possible False-Positive: This is standard behavior for almost every legitimate software. By itself, this capability is neutral, however it can be malicious if the file written is a payload(like a virus).
CAPA Rule: Find Graphical Window
Why CAPA triggered this: .This was potentially triggered by GetDesktopWindow(retrieves a handle to the desktop window) or SetWindowPos (changes window size, position, tion or z-order). Malware often uses GetDesktopWindow as a start point to scroll through the windows on the computer.Confidence Level: Medium => Even though the APIs give us a strong hint, they can also be used just to get screen dimensions.
Possible False-Positive: A screen recording app or a presentation tool can would also need these same permission to function properly.
5. Packing & Obfuscation
Packing is the result of compressing or encrypting malicious .exe files. When malware gets packed, the file on the disk is not the actual malware, it is usually a wrapper. Packing is made possible by "packer" programs like UPX, which compress the data and add small pieces of code called stubs. Then, when the used double-clicks the packed file, the stub runs first. It decompreses the real malware into RAM and then hands control over it. Packing would essentially create high entropy (chaos) within the file, or said simply, make the file look like random noise mathematically.
Obfuscation on the other hand is the process of making the code hard to read for humans. This doesn't mean changing what the code does; rather, it just makes it messy and confusing. This can be achieved when the author uses tools to rename variables to random characters and/or inserts dead code. This can impact static analysis severly, especially if we try to do string analysis since we just simply cannot tell whats going on without a blueprint.
In order to see if we have Packing or Obfuscation, we need to run a DiE Entropy test.
93796(file data) - 77824(section data added together) = 15972 (overlay is present)
TLS callbacks
TLS (Thread Local Storage) callbacks are a simple mechanism in Windows that allows a program to define functionts that are called when a thread is created. These functions are executed automatically before the main entry point, and are technique that is used frequently by malware when trying to bypass security mechanisms.
In our case, we do not have any TLS callbacks, which can be seen from the 1A8 offset in PE Bear, where both address and size of the TLS Directory have a 0 value.
Pe bear optional hdr, data
Required analysis
We can conclude that there is no packing in the malware because:
DIE did not detect a packer with 76% certainity (medium confidence)
PE-bear: “Not packed (76% certain)”
Entropy: ~6 (normal)
Code sections: Normal
TLS: None
Overlay: Present, but not encrypted
6. Behavior Mapping
Further supporting evidence:
Each technique listed is based in concrete evidence from both our manual .bat file inspection and the CAPA analysis. By focusing on the main logic of the malware, we have also verified that the identified behaviours are not speculative, but they are well-supported and documented. We believe that this dual-layered approach helped us to accurately capture all of the most severe threats to the system.

No comments:
Post a Comment