← Reports

Ransomware · Ransomworm · Worm

WannaCry - invoice_greenanimals.pdf.exe

Author
Moise Medici
Updated
15 Feb 2026 · Completed
Difficulty
Medium
Platform
Windows
Capabilities
Command and Control C2 CommunicationCommand Execution via Powershell Cmd BashFile EncryptionPersistence Mechanisms
Tags
C++WannaCryptor

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.

GetTickCount
QueryPerformanceCounter

The 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.

SizeofResource
LockResource
LoadResource
FindResourceA

These are used to create a service:

StartServiceA
CloseServiceHandle
CreateServiceA
OpenSCManagerA
SetServiceStatus

And to get something from the internet:

InternetCloseHandle
InternetOpenUrlA
InternetOpenA

These might be the names of the resources extracted:

launcher.dll
mssecsvc.exe

Sometimes 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\%s
WINDOWS
mssecsvc.exe

Another anti-debugging technique:

IsDebuggerPresent

A suspicious path that should be kept in mind for the dynamic analysis:

C:\%s\qeriuwjhrf

Another suspicious executable name followed by CreateProcessA, which is used for starting executables.

tasksche.exe
CreateProcessA

A very suspicious domain:

http://www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com

Syscalls that allow the executable to write to the registry:

RegQueryValueExA
RegSetValueExA
RegCreateKeyW

And to encrypt data:

CryptDecrypt
CryptEncrypt
CryptDestroyKey
CryptImportKey
CryptAcquireContextA

In 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.wnry
icacls . /grant Everyone:F /T /C /Q
attrib +h .
WNcry@2ol7

The following are not necessarily dangerous but are a potential hint that some information might be translated:

msg/m_bulgarian.wnry
msg/m_chinese (simplified).wnry
msg/m_chinese (traditional).wnry
msg/m_croatian.wnry
msg/m_czech.wnryn
msg/m_danish.wnryo

Closer 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 2195
Windows 2000 5.0
\172.16.99.5\IPC$
Windows 2000 2195
Windows 2000 5.0
\192.168.56.20\IPC$
diskpart.exe

Lastly, 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.

WanaCrypt0r
Software\
.der
.pfx
.key
.crt
.csr
.p12
.pem
.odt
.ott

See 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.

The sample's version resource (left) next to the genuine C:\Windows\system32\lhdfrgui.exe (right), sharing InternalName and OriginalFilename but differing between Disk Defragmenter and Drive Optimizer.
Fig. 2: The sample's version resource (left) next to the genuine C:\Windows\system32\lhdfrgui.exe (right), sharing InternalName and OriginalFilename but differing between Disk Defragmenter and Drive Optimizer.

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.

pestudio's resources page, where the R entry is a 32-bit executable of 3,514,368 bytes starting at 0x000320A4.
Fig. 3: pestudio's resources page, where the R entry is a 32-bit executable of 3,514,368 bytes starting at 0x000320A4.

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.

pestudio's sections page, where .rsrc takes 94.50% of the file and begins at that same 0x000320A4.
Fig. 4: pestudio's sections page, where .rsrc takes 94.50% of the file and begins at that same 0x000320A4.

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 TacticATT&CK Technique
DEFENSE EVASIONObfuscated Files or Information::Indicator Removal from Tools [T1027.005]
DISCOVERYFile and Directory Discovery [T1083]
System Information Discovery [T1082]
System Network Configuration Discovery [T1016]
EXECUTIONShared Modules [T1129]
System Services::Service Execution [T1569.002]
PERSISTENCECreate or Modify System Process::Windows Service [T1543.003]
MBC ObjectiveMBC Behavior
ANTI-BEHAVIORAL ANALYSISConditional Execution::Runs as Service [B0025.007]
Debugger Detection::Timing/Delay Check QueryPerformanceCounter [B0001.033]
ANTI-STATIC ANALYSISExecutable Code Obfuscation::Argument Obfuscation [B0032.020]
Executable Code Obfuscation::Stack Strings [B0032.017]
COMMAND AND CONTROLC2 Communication::Receive Data [B0030.002]
C2 Communication::Send Data [B0030.001]
COMMUNICATIONHTTP 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]
CRYPTOGRAPHYGenerate Pseudo-random Sequence::Use API [C0021.003]
DATACompression Library [C0060]
DISCOVERYCode Discovery::Inspect Section Memory Permissions [B0046.002]
File and Directory Discovery [E1083]
EXECUTIONInstall Additional Program [B0023]
FILE SYSTEMMove File [C0063]
Read File [C0051]
PROCESSCreate Thread [C0038]
Terminate Process [C0018]
Terminate Thread [C0039]