Sample

Metadata

SHA256
5bed39728e404838ecd679df65048abcb443f8c7a9484702a2ded60104b8c4a9
Difficulty
medium
Platform
Windows
Tags
api hashing anti-vm supply chain
Likes
1
Views
2
Submitter
humpty_tony

Analysis

Goal

This post’s goal is to teach someone how to take a “real-world” supply-chain DLL dropper/loader and turn it into a set of actionable reversing primitives:
- Reconstruct the full execution chain from NPM install hook → rundll32 execution of a shipped DLL export → staged loader → staged stealer, and understand where “initial access” ends and “payload logic” begins.
- Deobfuscate a modern loader’s internals efficiently by focusing on the repeatable patterns that matter:
- PEB-walking + import hashing
- Encrypted static strings
- Hook checks + indirect syscalls
- Extract a protocol/crypto story from messy networking code, even if you don’t fully reverse the C2

Description

Scavenger is a Windows-focused malware chain delivered through a compromised NPM package (eslint-config-prettier and others). On install, a malicious install.js runs on Windows only, spawning rundll32.exe to execute a bundled DLL (node-gyp.dll, acting as the Scavenger loader).

The loader (Visual Studio C++ DLL, compiled the same day as distribution) launches its main logic in a new thread and performs heavy anti-analysis and evasion:
- Anti-VM via SMBIOS enumeration (GetSystemFirmwareTable / “RSMB”) looking for VM vendor strings.
- Tool/AV detection by checking for known hook/debug/sandbox DLLs.
- Environment checks (CPU count, console presence, marker directory) and intentional crash behavior on suspicion.
- Runtime API resolution using CRC32-hashed function names by walking the PEB module list.
- Hook identification by sanity-checking prologue bytes of selected APIs.
- Indirect syscalls / syscall stub reconstruction to bypass userland EDR hooks (notably to hide threads / query system info).

For C2, Scavenger uses libcurl and encrypts traffic with XXTEA, wrapping blobs in base64 and performing a simple integrity/echo check during early comms. A second stage (“Scavenger Stealer”) shares the same obfuscation and comms patterns and contains strings strongly associated with Chromium data locations, suggesting browser data theft. A sloppy variant includes a direct curl command and a leftover PDB path that reinforces the “Scavenger” naming and helps link the activity to a related BeamNG-distributed campaign.

Recommended Tools

binary ninja

Image

Sample image

Comments

Please login to view and post comments.