Ransomware · Ransomworm · Worm
WannaCry - invoice_greenanimals.pdf.exe
- Author
- Moise Medici
- Updated
- 15 Feb 2026 · Completed
- Difficulty
- Medium
- Platform
- Capabilities
- Tags
Basic Static Analysis
The very first thing to notice is the double extension .pdf.exe, which on most user systems where file extensions are hidden will appear only as .pdf. This already raises suspicions about the nature of the file.
Starting with FLOSS, it was first run with -n 12, and then without any length filtering. Checking the filtered list first allows a quicker review of what is returned before proceeding to a more fine-grained review.
The first few lines of FLOSS already show some of the potential capabilities that the sample might use to avoid debugging, as both these system calls are used to track how much time it takes to go from two different lines of code. Usually they are followed by a jump to exit if the time is higher than a threshold.
GetTickCountQueryPerformanceCounterThe following are used to load a resource from within the program itself. A resource is usually a DLL or another EXE/script that is extracted from within the original sample and often executed. A more in-depth explanation can be found in the Learn section 1.
SizeofResourceLockResourceLoadResourceFindResourceAThese are used to create a service:
StartServiceACloseServiceHandleCreateServiceAOpenSCManagerASetServiceStatusAnd to get something from the internet:
InternetCloseHandleInternetOpenUrlAInternetOpenAThese might be the names of the resources extracted:
launcher.dllmssecsvc.exeSometimes when there are identifiers like %s or %d in a line, it might be that the next line is what fills that identifier (%s for strings and %d for digits like IP addresses). So in the case below it might be that the final string is going to be C:\WINDOWS\mssecsvc.exe.
C:\%s\%sWINDOWSmssecsvc.exeAnother anti-debugging technique:
IsDebuggerPresentA suspicious path that should be kept in mind for the dynamic analysis:
C:\%s\qeriuwjhrfAnother suspicious executable name followed by CreateProcessA, which is used for starting executables.
tasksche.exeCreateProcessAA very suspicious domain:
http://www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.comSyscalls that allow the executable to write to the registry:
RegQueryValueExARegSetValueExARegCreateKeyWAnd to encrypt data:
CryptDecryptCryptEncryptCryptDestroyKeyCryptImportKeyCryptAcquireContextAIn the next four lines there are two interesting strings, the first and last, and two Windows built-in commands: icacls 2 , which allows changing access levels on files and attrib 3 , which with +h sets the file as hidden.
t.wnryicacls . /grant Everyone:F /T /C /Qattrib +h .WNcry@2ol7The following are not necessarily dangerous but are a potential hint that some information might be translated:
msg/m_bulgarian.wnrymsg/m_chinese (simplified).wnrymsg/m_chinese (traditional).wnrymsg/m_croatian.wnrymsg/m_czech.wnrynmsg/m_danish.wnryoCloser to the end there are two internal IP addresses with \IPC$ at the end, which stands for Interprocess Communication 4 and is used for data sharing between applications.
Windows 2000 2195Windows 2000 5.0\172.16.99.5\IPC$Windows 2000 2195Windows 2000 5.0\192.168.56.20\IPC$diskpart.exeLastly, there is a WanaCrypt0r string that hints that the sample could be a WannaCry sample, followed by a list of extensions which are probably the file types targeted for the encryption process.
WanaCrypt0rSoftware\.der.pfx.key.crt.csr.p12.pem.odt.ottSee Appendix A for the whole list of file extensions used.
Loading the sample in pestudio reveals a few details.
On the landing page of pestudio, the names → versions → original-file-name is set to lhdfrgui.exe and the file → description is Microsoft® Disk Defragmenter, which are both legitimate values for the Windows “Defragment and Optimize Drives” utility. It is also interesting to compare the real lhdfrgui.exe file in C:\Windows\system32\lhdfrgui.exe (on the right side of the screenshot) with the sample from the pestudio version page and notice all the mirroring happening, which again increases suspicion about the sample, given that it was meant to be a PDF.
Also in the resources page there is indeed a resource entry as suspected by the resource-related entries in the FLOSS output. Note that the location starts from address 0x000320A4, which will be useful in a moment.
Moving to the sections page, which shows the different sections of the PE file, note the last column called .rsrc: it takes almost 95% of the size of the executable and at the very bottom you can see it starts from the same address found above. This means the resource will probably be extracted quite early in the program execution and will do all the heavy lifting, given that the vast majority of the code resides in that secondary file. The address helped confirm that the resource found in the resources page is the same analyzed in the sections page.
Also note that because of what has been mentioned above, it is very likely that most of the capabilities and Windows system calls observed so far are actually used and extracted by the resource code.
As a last step in the static analysis, capa was run to see if at a high level anything had been missed. In this case the results align with what has been found, but they might still be useful later on when going through the code with Ghidra.
| ATT&CK Tactic | ATT&CK Technique |
|---|---|
| DEFENSE EVASION | Obfuscated Files or Information::Indicator Removal from Tools [T1027.005] |
| DISCOVERY | File and Directory Discovery [T1083] |
| System Information Discovery [T1082] | |
| System Network Configuration Discovery [T1016] | |
| EXECUTION | Shared Modules [T1129] |
| System Services::Service Execution [T1569.002] | |
| PERSISTENCE | Create or Modify System Process::Windows Service [T1543.003] |
| MBC Objective | MBC Behavior |
|---|---|
| ANTI-BEHAVIORAL ANALYSIS | Conditional Execution::Runs as Service [B0025.007] |
| Debugger Detection::Timing/Delay Check QueryPerformanceCounter [B0001.033] | |
| ANTI-STATIC ANALYSIS | Executable Code Obfuscation::Argument Obfuscation [B0032.020] |
| Executable Code Obfuscation::Stack Strings [B0032.017] | |
| COMMAND AND CONTROL | C2 Communication::Receive Data [B0030.002] |
| C2 Communication::Send Data [B0030.001] | |
| COMMUNICATION | HTTP Communication::Create Request [C0002.012] |
| HTTP Communication::Open URL [C0002.004] | |
| Socket Communication::Connect Socket [C0001.004] | |
| Socket Communication::Create TCP Socket [C0001.011] | |
| Socket Communication::Create UDP Socket [C0001.010] | |
| Socket Communication::Get Socket Status [C0001.012] | |
| Socket Communication::Initialize Winsock Library [C0001.009] | |
| Socket Communication::Receive Data [C0001.006] | |
| Socket Communication::Send Data [C0001.007] | |
| Socket Communication::Set Socket Config [C0001.001] | |
| Socket Communication::TCP Client [C0001.008] | |
| CRYPTOGRAPHY | Generate Pseudo-random Sequence::Use API [C0021.003] |
| DATA | Compression Library [C0060] |
| DISCOVERY | Code Discovery::Inspect Section Memory Permissions [B0046.002] |
| File and Directory Discovery [E1083] | |
| EXECUTION | Install Additional Program [B0023] |
| FILE SYSTEM | Move File [C0063] |
| Read File [C0051] | |
| PROCESS | Create Thread [C0038] |
| Terminate Process [C0018] | |
| Terminate Thread [C0039] |