
SmokeLoader Malware Analysis
Initial Analysis Overview
I conducted a comprehensive analysis of SmokeLoader malware over several days, primarily using dynamic analysis tools. The sample exhibits interesting packing behavior - the original file is approximately 100KB, but after self-unpacking, it reduces to around 30KB.
Memory Protection Analysis
Initial examination reveals that all memory regions are configured with Read/Write/Execute permissions, enabling the malware to perform extensive self-modification during runtime.

Debugging Methodology
Critical Breakpoint Placement
Dynamic debugging requires a hardware breakpoint at 0x401ae0. Software breakpoints must be avoided as they modify the malware's code by inserting CC bytes, which interferes with the unpacking process and can cause analysis failures.
Process Dumping Strategy
I dumped the process memory to Ghidra for combined static analysis. However, initial static analysis revealed that portions of the executable remain encoded even after the initial unpacking phase.
Polymorphic Code Analysis
Self-Modifying Behavior
Further investigation revealed SmokeLoader's sophisticated anti-analysis technique: polymorphic code execution. The malware follows this pattern:
- Decode → Execute → Re-encode
This continuous cycle makes traditional static analysis extremely challenging, as the code constantly changes its appearance in memory.

Dynamic Code Extraction
To overcome this limitation, I developed a technique to capture decoded instructions during execution. The process involves:
- Execute the malware until reaching the target function (e.g.,
0x40410a) - Capture the decoded bytes while they're in plaintext
- Patch the dumped executable with the decoded instructions
- Repeat for each polymorphic section
API Resolution Analysis
Dynamic Import Loading
The first major function at 0x40410a implements dynamic API resolution, loading function addresses from system DLLs into uninitialized data sections:

This function is significantly longer than shown and systematically resolves all required Windows APIs for the malware's operation.
Static Analysis Enhancement
After renaming the data variables to their corresponding function names in Ghidra, static analysis became considerably more manageable. However, many functions still utilize internal decoder() routines, requiring continued dynamic extraction of their true implementations.
Filename Detection Mechanism
Environment Awareness
One significant discovery involves the malware's filename detection capability:

The function checks the current executable's filename and returns different values based on the name. In my analysis with a randomized filename, it returned 0x10, but other predetermined names trigger different behavioral modes.
Implementation Details
The filename comparison mechanism is straightforward:

This suggests the malware can operate in multiple modes depending on how it's deployed or executed.
Persistence and Execution Flow
WinSrv32 Process Management
The malware implements a persistence mechanism involving a process named WinSrv32. The core functionality includes:
Process Termination: Locates and terminates any existing WinSrv32 processes
File Replacement: Deletes the existing WinSrv32 executable
Self-Replication: Writes a copy of itself (or a modified version) to the WinSrv32 location
Execution Transfer: Launches the new WinSrv32 process to continue execution
Analysis Limitations
Academic Constraints
Due to university final examinations, I had to suspend the analysis before completing a full behavioral breakdown. While I successfully decoded critical components and understood the core unpacking mechanisms, several areas remain unexplored:
Complete payload analysis Network communication protocols Full persistence mechanism details Command and control functionality
Research Artifacts
Available Resources
I'm providing the following analysis artifacts for future research:
Ghidra Project File: Complete project with renamed functions and decoded sections x32dbg Database: Contains breakpoint configurations and analysis notes Memory Dumps: Process dumps at various execution stages
These resources are available in the same directory as this analysis report.
Conclusion
SmokeLoader demonstrates sophisticated anti-analysis techniques through its polymorphic code structure and dynamic self-modification capabilities. The malware's ability to continuously encode and decode its own instructions presents significant challenges for traditional static analysis approaches.
The filename-based behavioral switching and WinSrv32 persistence mechanism indicate a well-designed loader capable of adapting to different deployment scenarios. Future analysis should focus on the complete payload delivery mechanism and network communication protocols to fully understand this threat's capabilities.
This analysis serves as a foundation for continued research into SmokeLoader's advanced evasion techniques and payload delivery mechanisms.