Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Meta Engineering 11 min read Deep dive mediumAdept

The malware threat landscape: NodeStealer, DuckTail, and more

NodeStealer is a custom JavaScript malware bundled with Node.js via pkg into 46-51 MB Windows executables disguised as PDF/XLSX files, which gave it near-zero antivirus detection. It persists through a Run registry key, decrypts Chromium browser cookies and saved logins (Base64-decoded encrypted_key from Local State, then AES), and proceeds only when it finds a Facebook session cookie. From the victim's own machine it enumerates ad accounts, then exfiltrates Base64-encoded JSON in the Authorization header of a GET request to its C2. Meta also tracks how Ducktail and ChatGPT-themed lures adapt to takedowns, for example by spreading across file hosts, cloaking ads and auto-granting business admin permissions.

Assumes: browser cookies and sessionsWindows registry basicsmalware analysis concepts

Related posts

  • Protecting user data through source code analysis at scale

    Meta Engineering mediumAdept

    Meta's Anti-Scraping team encodes known scraping attack vectors as taint-analysis rules in its in-house static analyzers, Zoncolan for Hack and Pysa for Python, so potential vectors are flagged before code ships. Rules define sources (user-controlled parameters such as a result count or target ID) and sinks (data returned to the user), and a possible flow between them is raised as an issue for triage. In a mock followers endpoint, an uncapped count lets scrapers pull entire follower lists in one request and slip past rate limiting. The fix clamps count to a maximum, forcing scrapers into many more requests that rate limits then catch. Static analysis cannot catch scrapers that mimic legitimate usage, so it is one part of a broader defense.

  • Exploiting vulnerabilities in Cellebrite UFED and Physical Analyzer from an app's perspective

    Signal easyNovice

    Cellebrite's UFED and Physical Analyzer, whose main job is parsing untrusted app data pulled from seized phones, lack standard exploit mitigations and bundle FFmpeg DLLs from 2012 that miss over a hundred security fixes. A specially formatted file placed in any app on a scanned device can run arbitrary code on the Cellebrite machine. That code could silently alter past and future forensic reports without timestamp or checksum changes. The software also appears to redistribute Apple-signed iTunes DLLs without a license, and Signal hints that future versions will place such files in app storage.

  • From single pull requests to full software packages: Detecting malicious code at scale

    Datadog Engineering mediumAdept

    Datadog extended BewAIre, its LLM-based malicious code detector, from pull requests to full dependency packages by stacking a cheap filter model in front of an agentic investigation model. The agent uses GitHub APIs, osv.dev and SCA to check context such as author history and reverted commits. On 690 test diffs the two-stage design raised accuracy from 97.4% to 99.86% by cutting false positives from 17 to 0, and static typosquat-domain checks cover gaps in the filter. For large packages, giving the agent a codemap plus an on-demand ReadFile tool beat both forwarding the flagged chunk and rechunking, reaching 95.2% end-to-end accuracy with no runtime errors. Projected costs are about $0.025 per median package and $0.072 at p90, and a crawler polls npm and PyPI every 10 minutes, caching verdicts by hash and diffing against the previous version.

  • MemLab: An open source framework for finding JavaScript memory leaks

    Meta Engineering mediumAdept

    MemLab finds JavaScript memory leaks by driving a headless browser with Puppeteer through a navigate-away/target/return sequence, then diffing heap snapshots as (SB \ SA) ∩ SA' to find objects that should have been freed. It filters candidates with framework knowledge such as detached React Fiber nodes, then generates and clusters retainer traces from GC roots. A lazily constructed graph-view API supports custom leak detectors, Jest memory assertions and heap analysis. At Meta it helped cut Facebook.com OOM crashes by 50%, React 18's aggressive Fiber cleanup on unmount cut average memory by nearly 25%, and interning Relay cache-key strings cut p99 memory by 20%.

  • MCP Horror Stories: The Drive-By Localhost Breach

    Docker mediumAdept

    CVE-2025-49596 (CVSS 9.4) let any website achieve remote code execution on developer machines running MCP Inspector below 0.14.1. The Inspector's Node.js proxy listened on 0.0.0.0:6277 with no authentication and accepted requests from any origin. Malicious JavaScript could send no-cors GET requests to its /sse endpoint with transportType=stdio and arbitrary command arguments, and because browsers treat 0.0.0.0 like localhost (the "0.0.0.0-day" flaw), those requests could spawn processes that read SSH keys, dump environment variables or clone private repos. The fix is upgrading to 0.14.1+, and Docker pitches running its MCP Gateway with stdio transport so no HTTP endpoint is exposed to browsers at all.

The quest for software engineering knowledge.

Look:
Layout: