Friday, November 13, 2026

Revisiting Duqu variant 1: Research Notes

 

Revisiting Duqu variant 1: Research Notes

Technical Analysis and Design Insights and Learning

 

 

“To understand the immeasurable, the mind must be extraordinarily quiet, still.”
— Jiddu Krishnamurti

 

 

Seeker(李标明) · @clibm079    

China · Independent Malware Analyst & Researcher 

From 2026.08.28 to 2026.11.13


Prologue: Curiosity-driven, keep moving

In this report I will continue to move back in history to a very complicated malware called Duqu (Duqu 1.0 or Duqu 2.0). I picked one of the earlier variants in 2010 to do research and learn. Because its modularity means a new era for malware developers (The view or observation from the page 5 of the CrySyS’s report: Duqu: A Stuxnet-like malware found in the wild), I think it can help me understand the new features and design for modern malware development. and thanks to the threat architecture of variant 1 from Symantec’s report, it helped me grasp the brief thinking at first view as follows:

Figure 0: Threat architecture of variant 1 from Symantec’s report.

 

 

It took me more than one week to read the reference; they are 60 pages and 71 pages. Thanks for the great detail of their professional research reports.

 

It’s not easy to understand it completely. I had to analyze malware samples both in user mode and kernel mode. At the beginning, it’s hard for me to do that bacause of the payload Dll encrypted on the disk. So the first thing coming into my brain was to make them run, but it did not work well. And finally I noted a key kernel API, PsSetLoadImageNotifyRoutine, which made me excited to keep moving.

 

In the process of studying and preparing, thanks again to all the reference stuff, and I mainly read CrySyS and Symantec’s report, did static and manual debugging, expanded my personal research , and made a note for a stage of quiet exploration.

 

 

Duqu Variant 1

Rootkit jminet7.sys d17c6a9ed7299a8a55cd962bdb8a5a974d0cb660

Payload loader netp191.PNF 3ef572cd2b3886e92d1883e53d7c8f7c1c89a4b4

Configuration netp192.PNF c4e51498693cebf6d0cf22105f30bc104370b583



Technical Analysis

 

Exploring the API PsSetLoadImageNotifyRoutine

To be honest, it’s a little bit hard for me to find the API PsSetLoadImageNotifyRoutine with limited knowledge about rootkits and static analysis with string failed. I had to turn to read the related document carefully, and understanding that it would read an image, that’s enough to keep moving forward, and I wanted to verify my prediction, so I planned to debug with Windbg.

 

It’s worth understand what the API PsSetLoadImageNotifyRoutine can do. It is a legitimate Windows Kernel API used primarily by Endpoint Detection and Response (EDR) and Antivirus (AV) solutions to detect when a PE image (DLL, EXE, or Driver) is loaded into virtual memory.

 

A lot of work through static analysis and debugging, finally, an interesting attention of “call ecx”, guessing it would execute the API PsSetLoadImageNotifyRoutine.

Figure 1.1: Exploring the API PsSetLoadImageNotifyRoutine with static analysis.

 

 

Debug and verify with Windbg in the active mode as follows:

Figure 1.2: call API PsSetLoadImageNotifyRoutine with Windbg.

 

 

About the rootkit loader JMINET7.SYS and CSC algorithm

The size of the rootkit jminet7.sys is 24.3 KB (24,960 bytes); it is small, but it can do as follows:

1.      Loading the payload loader netp191.PNF encrypted from the physical disk into memory as a rootkit loader role.

2.      Decrypting the payload loader netp191.PNF in memory with a custom stream cipher (CSC) algorithm. The payload loader netp191.PNF was designed for double encryption, the two-layer data security on the physical disk. First encrypting with a common UPX and then doing with a CSC algorithm. So it must be decrypted in the opposite direction.

Figure 2.1: The payload loader Netp191.PNF is designed by two-layer data security.

 

 

First, let’s simply take a look at how the custom synchronous stream cipher (CSC) implementation works.

1.      Encrypts ‌byte-by-byte per iteration‌: *((_BYTE *)&dword_8C857190 + i) ^= v1.

2.      Uses the following formula as a ‌keystream generator‌ to produce a pseudo-random keystream:

v3 = __ROR4__(v1, 3);

v1 = (v3 * v3 / 0x87BBu + 74740371 * v3 + 1) ^ v3;

3.      Plaintext (or ciphertext) is combined with the keystream via ‌XOR‌, and the XOR only modifies the buffer dword_8C857190. The keystream depends only on the seed and the initial state 0x8471122 (and the evolving state), not on the plaintext or ciphertext, so it is a synchronous stream cipher.

Figure 2.2: The custom synchronous stream cipher (CSC) implementation.

 

 

Ok, Let's start to break down the process of decrypting the payload loader netp191.PNF in memory with a custom synchronous stream cipher (CSC) algorithm.

 

At first, it uses the CSC algorithm with the fixed seed 0x8471122 to decrypt static encrypted data in the binary and get another seed AE240682h, which will be used for subsequent data decryption, such as decrypting the registry key “FILTER” and the payload loader netp191.PNF.

Figure 2.3: The CSC algorithm for getting the seed ae240682h.

 

 

And then it uses the CSC algorithm variant with the preceding seed AE240682h as a paramter, passing this seed to perform the XOR with the fixed seed 0x8471122 to generate the new seed. It is worth noting that the CSC algorithm and its new variant are interrelated; this kind of design thinking is very rigorous.

Figure 2.4: The CSC algorithm with an initial seed AE240682h.

 

 

The above CSC algorihtm variant is used to decrypt both the registry key “FILTER” has hex data and the payload loader netp191.PNF.

 

1.      The CSC algorithm variant is for decrypting the registry key “FILTER,” which has hex data as follows.

Figure 2.5: The value of the key name “FILTER” was decrypted by the CSC algorithm variant.

 

 

2.      The CSC algorithm variant is for decrypting the payload loader netp191.PNF dll; the length remains the same hex 38c00h, decimal 232448 bytes before and after executing CSC algorithm as follows.

Figure 2.6: snippets of the netp191.PNF decrypted by the CSC algorithm variant.

 

 

 

Modular Design in new era for malware developers

When netp191.PNF is decrypted by jminet7.sys and then unpacked with UPX, We could get the payload loader (Resource 302) . This DLL file is contained within the main DLL, netp191.PNF.

 

Resources 302 was only one module as follows.

Figure 3.1:Duqu with one module resource 302.

 

 

This is similar to the Stuxnet version 1.4, but Stuxnet has highly modular design, the mindset and thinking were 16 years ago or earlier. In my view, this feature creates more possibilities and abilities through cooperation between different groups or organisations or even countries. At the same time it could be developed concurrently, making the outcome faster.

Figure 3.2:Stuxnet v1.4 with 13 module resources.

 

 

 

 

 

 

Cross-Layer Loaders and the Payload Protection Mindset

Duqu is designed by double loaders; they are both rootkit loader jminet7.sys in the kernel model and payload loader netp191.PNF in the user model.

 

The first: In my view, the rootkit loader jminet7.sys is designed for building a secret foothold in the system. It is responsible for loading,decrypting,executing and protecting the above-mentioned netp191.PNF encrypted in memory. If the analyst wants to do a further deep dive into the netp191.PNF encrypted and dumps the decrypted data, they have to debug at the kernel level.

Figure 4.1: The netp191.PNF was decrypted by CSC algorithm in memory with the size 38c00h.

 

 

The second: It’s worth paying attention to the preceding diagram Duqu’s resource 302, it is a payload loader that contains a zdata section compressed. Similary, if the analyst wants to dig deeper into the Resource 302 and extract the zdata section decompressed, they also would take time and patience to debug in the user mode. Resource 302 has 12 exports, the Export 15 exploration and discovery as follows:

Figure 4.2: the zdata section was decompressed.

 

 

As we know, rootkit design is used to implement various powerful functionalities in common, but the rootkit loader jminet7.sys is designed for small size; One important thing is to avoid detection, and to hide and build footage stealthily.

 

From the above analysis process, the following simplified cross-layer loaders mindset model doesn’t include complete details. And I will describe the techniques observed during the exploration process later on.

Figure 4.3: Simplified cross-layer loaders mindset model.

 

 

API hashing: evade static analysis and detection

In order to do anti-static analysis, the predefined DLL string obfuscated in the .rdata segment needs to be deobfuscated via a custom XOR with the magic value “0B31FB31Fh.”

Figure 5.1: Snippet code about the custom xor algorithm.

 

 

It retrieves a module handle for the specified module with the GetModuleHandleW function in memory, parses the PE header, and then calculates the hash value of the function name and compares it to them.

Figure 5.2: Snippet code about API hashing.

 

 

A skillful design for the API hashing value, here taking the hash value 6012A950h as an example, it passes the parameter to a function A and hides it on the stack without using it, and then using GetModuleHandleW to retrieve the name of the loaded module, finally in another function B, it uses the hash value 6012A950h. The analyst must be calm to observe the stack; if the analyst doesn’t know the API hashing technique beforehand, it might take times. This is an interesting and deliberately anti-analysis design.

Figure 5.3: Debug and observe the API hashing technique.

 

 

If we read the “Duqu 2.0 Technical Paper (PDF)” by Kaspersky on 10 Jun 2015, we could see that System API functions are imported using hashes of export names; the hashing algorithm thinking for anti-analysis was used again about five years later.

 

 

Process hollowing: section-based injection

The traditional “process hollowing” uses NtUnmapViewOfSection to completely erase the legitimate code block. Then, it uses VirtualAllocEx to carve out a brand-new block of memory and then uses WriteProcessMemory to copy the malicious payload's PE headers and individual sections into that newly allocated memory block. they are heavily monitored APIs by endpoint detection and response (EDR) agents.

 

Duqu does “process hollowing”, which is more lightweight by section-based injection. At the beginning, it spawns a legitimate Windows process like svchost.exe, and it uses the value 0x8000000C instead of the common flag CREATE_SUSPENDED to create a process as follows.

Figure 6.1: Spawning a process with the value 0x8000000C.

 

 

And then it calls NtCreateSection to create a section of memory to share between processes in kernel memory.

Figure 6.2: The NtCreateSection Approach (Mapping).

 

 

After NtCreateSection calls, it uses NtMapViewOfSection twice, which the section-based approach bypasses the abovementioned traditional way by using memory mapping.

Figure 6.3: double-mapping mechanism for the stealth variant of the process hollowing.

 

 

The first step, it maps a view of the section into its own address space using NtMapViewOfSection  just for allocated space.

Figure 6.4: the first NtMapViewOfSection for allocated space.

 

 

The second step, it maps the exact section object directly into the target process svchost.exe’s memory space.

Figure 6.5: the second NtMapViewOfSection for mapping svchoste.exe’s memory space.

 

 

When the “call eax” instruction executed, using the tool “Process Hacker”, we could see in memory, the process svchost.exe was just partially hollowing through the 0xD70000 region. It was not "hollowing out the entire svchost.exe", but a small block, only the 28 kb payload (Note: no plan to dig into it) in svchost.exe. This approach was more covert and flexible than full replacement; this was a more subtle variant of process hollowing. We can observe and detect it by hollows_hunter and pe-sieve.

 

Here, special thanks to hasherezade. If we go back to the history, we might find that there hasn’t been such great detail of CrySyS and Symantec professional research reports like the sixty-page PDF online for a long time, even more than ten years, but in 2018, hasherezade and all contributors started to share these amazing tools, Hollows Hunter and Pesieve, for free. These tools helped the community understand how to perform memory scanning and analysis easier in user mode, and they gave me the opportunity to learn and expand knowledge in this area. Thank you very much again, I appreciate it from the bottom of my heart.

Figure 6.6: Observe the section-based injection for process hollowing.

 

Observation on my personal perspective

From the process of analysis, there are some main thoughts and techniques about the cross-layer loader used, as follows:

1.      Anti-analysis Technique and cryptography: Verifying the environment of running, the rootkit loader jminet7.sys will ensure the system is not in Safe Mode and no debuggers are running; using various encryption and decryption algorithms, such as custom synchronous stream cipher (CSC) algorithm and common UPX and compress alogorithm, to compress and obfuscate their payload loader and the zdata section; Addtionally, it uses the API hashing technique for anti-static analysis and detection. In all, they are highly proficient in cryptography.

2.      Process Hollowing: The section-based injection with a double-mapping mechanism is the core engine behind the stealth variant of process hollowing, especially since it covered the design thinking combing with the API hashing technique and deeper logic branches.

3.      Modular Design: This feature creates more possibilities and abilities through cooperation, and the design would be used for the special purpose.

4.      Cross-layer Loader: The loaders are designed for both the user-land mode and the kernel mode.

5.      Memory Technology: To get the payload loader netp191.PNF decrypted and the final payload that is a zdata section decompressed, the analyst has to dump the data from the kernel mode to the user mode in memory and even download fileless threats from the C2 server.

6.      Rigor Design: Verifying the specific feature like the “magic value 48747193h” of the PE file on the process of loading, and also verifying other PE features in the process of the process hollowing.

7.      The Mindset and Thinking: It combined the maturity technique like API hashing and the stealth variant of process hollowing and other techniques for anti-analysis and detection, and also understanding operating systems deeply, alongside forward-looking exploration and practical application, both mindsets for offensive and defensive thinking. If we observed carefully, several years later from that time, the community just started to share these techniques. In all, that’s system thinking and engineering. You have to become more professional and really understand “why”.

 

From the above limited observation and personal view, the first impression is professionalism, depth, rigor, maturity and architectural and engineering thinking. In my view, whatever the classical design thinking was 16 years ago or nowadays, it is still very advanced!

 

Again, here it’s a very, very, very limited analysis and still incomplete and not covering all details; the analysis is my observation, not a conclusion. Thanks to all reference sources, especially CrySyS and Symantec’s report. Given my limited foundation, it’s hard to imagine the time and effort I would have needed to expand my research without their research findings, viewpoints, and sharing.

 

I very appricate CrySyS sharing the whole process of  “security incident," investigation, discovering, findings, “how to cooperate with the anti-virus industry," "how to handle malware detection," and sharing information. For more technique details, please check them out.

 

And finally, in the process of analyzing, I used the following tools for research and learning:

 

#PEBear: First view and modifying PE file.

#Hollows_Hunter and #PEsieve: To perform memory scanning and analysis.

#ResouceHacker: Extract resource 302.

#ProcessHacker: Observe and dump the process.

#PPT: powerpoint for drawing simple flow chart.

#HxD: Editing hex data.

#DiE, #XPEViewer, #IDA, #WinDbg and #X32dbg: not special, just static and dynamic analysis.

 

which helped me expand my observing and understanding from different perspectives. I even can’t do anything without them. Thank you very much!

 

 

References

[1]. Duqu: Analysis, Detection, and Lessons Learned

https://static.crysys.hu/v1/publications/files/BencsathPBF12eurosec

[2]. Duqu: A Stuxnet-like malware found in the wild

https://static.crysys.hu/publications/files/bencsathPBF11duqu.pdf

[3]. The precursor to the next Stuxnet

W32.Duqu Version 1.4 (November 23, 2011)

https://docs.broadcom.com/doc/w32-duqu-11-en

[4]. The Mystery of Duqu: Part Two

https://securelist.com/the-mystery-of-duqu-part-two/31445/

[5]. The Duqu Saga Continues: Enter Mr. B. Jason and TV’s Dexter

https://securelist.com/the-duqu-saga-continues-enter-mr-b-jason-and-tvs-dexter/31442/

[6]. Kaspersky perplexed by Duqu code

https://www.infosecurity-magazine.com/news/kaspersky-perplexed-by-duqu-code/

[7].The Mystery of the Duqu Framework

https://securelist.com/the-mystery-of-the-duqu-framework-6/32086/
[8].
Analyzing Malware Hollow Processes - May 16, 2011

https://www.levelblue.com/blogs/spiderlabs-blog/analyzing-malware-hollow-processes

[9]. Malware Launching - Process Hollowing – by Chuong Dong
https://www.chuongdong.com/malware%20development/2020/08/19/Process-Hollowing/

[10]. The Nightmare of Proc Hollow’s Exe - Written by Leo Bastidas
https://trustedsec.com/blog/the-nightmare-of-proc-hollows-exe

[11]. Process Hollowing – by Hrvoje Filaković
https://medium.com/cyberdnevnik/process-hollowing-9ebbdb788ff1
[12]. What Malware Authors Don't Want You to Know - Evasive Hollow Process Injection
https://blackhat.com/docs/asia-17/materials/asia-17-KA-What-Malware-Authors-Don't-Want-You-To-Know-Evasive-Hollow-Process-Injection-wp.pdf

[13]. Where Have All the Complex Windows Malware and Their Analyses Gone? – by R136a1
https://r136a1.dev/2026/05/07/where-have-all-the-complex-malware-and-their-analyses-gone/

[14]. New zero-day used for effective kernel memory injection and stealth

https://securelist.com/the-mystery-of-duqu-2-0-a-sophisticated-cyberespionage-actor-returns/70504/
[15]. Duqu 2.0 Technical Paper (PDF)

https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2018/03/07205202/

The_Mystery_of_Duqu_2_0_a_sophisticated_cyberespionage_actor_returns.pdf

 

 

Epilogue: What This Exploration Taught Me

1.      Although it took me more than two months and still left me with a very limited understanding about Duqu, this would be a long journey to exploration, but to be honest, I like the process of the growth from the original observation and perspective.

2.      There is no doubt that there are no shortcuts when facing complexity, and understanding it takes time and patience. For understanding, I learnt to accept the slowing rhythm, and even without any progress, I learnt to adjust my feelings and think about how to study new things, and it kept me going forward.

3.      I try to learn everything I need that was shared in the community. The reference stuff of history is valuable, especially when AI is now on fire.

Annotation: In all the sentences I wrote and used the word “you or your or yourself” in, it talked to me or “the malware sample itself, especially in my poem I did”, not the reader. I must clarify my motivation.

End of Report

──────────────────────

Seeker(李标明) · @clibm079    

China · Independent Malware Analyst & Researcher

Labels: , ,