Threat Hunting Playbook: Indicators of Compromise (IOCs) for React2Shell Malware Infection

CYBERDUDEBIVASH

Author: CyberDudeBivash
Powered by: CyberDudeBivash Brand | cyberdudebivash.com
Related:cyberbivash.blogspot.com

 Daily Threat Intel by CyberDudeBivash
Zero-days, exploit breakdowns, IOCs, detection rules & mitigation playbooks.

Follow on LinkedInApps & Security ToolsWWW.CYBERDUDEBIVASH.COM

 React2Shell Overview

React2Shell is an insecure deserialization vulnerability in the React Server Components ‘Flight’ protocol. Successful exploitation allows an unauthenticated attacker to execute arbitrary OS commands on the server (running in the context of the web server process, e.g., Node.js/Next.js).

Phase 1: Initial Exploitation & Reconnaissance IOCs

The initial compromise is typically a single, crafted HTTP request that triggers the RCE, often followed by a quick reconnaissance command.

1. Network & Web Server Log Indicators

Indicator TypeDescriptionHunting/Detection Logic
Malicious RequestA single, crafted HTTP POST request sent to an RSC endpoint (e.g., in a Next.js App Router application).Look for POST requests with unusual content-types or payloads targeting RSC endpoints that result in immediate application crashes (HTTP 500 error) or unusual log entries.
Exploitation ArtifactsA vulnerable server returning a specific error digest upon a failed exploitation attempt.Look for HTTP 500 Internal Server Error responses containing an error object structure like E{"digest": ...} following a malicious-looking POST request.
Reconnaissance CommandImmediate execution of simple OS commands to confirm RCE, most commonly whoami.Monitor web server logs for the spawning of a whoami process as a direct child of the Node.js/web server process (next-serverreact-routerwaku, etc.).

2. File System Indicators (Exploitation Stage)

Indicator TypeDescriptionHunting/Detection Logic
Script Download URIsRequests to download subsequent payload scripts.Check outbound network logs from the web server for connections to the malicious IPs below, often with unusual URIs like /nuts/x86/n2/x86, or long, randomized shell script names (e.g., /gfdsgsdfhfsd_ghsfdgsfdgsdfg.sh).

 Phase 2: Post-Exploitation & Malware Deployment IOCs

After RCE is achieved, attackers download and execute secondary payloads (like coin miners or backdoors).

3. File and Process Indicators (Malware)

Indicator TypeDescriptionHunting/Detection Logic
Suspicious Process SpawningThe Node.js/web server process spawning a shell (shbashcmd.exepowershell.exe) which, in turn, spawns tools like wgetcurl, or nslookup.Look for child_process.spawnSync() function calls in the Node.js process logs/telemetry executing OS commands.
Malicious Process NamesProcesses masquerading as legitimate system services.Look for running processes named like xmrighashwatcher, or Linux kernel threads like [ksoftirqd] in the process list, especially if they are running under the web server user or have unusual parent processes.
Malicious File PathsTemporary or system-mimicking files created by the malware.Scan file systems for files in suspicious locations, especially in /tmp/dev, or hidden directories in user home folders ($HOME/.ksoftirqd-private-f393y1moabubffpqvozboktusmfzqj1k-ksoftirqd-softirq.service-NjSR4/softirq). Examples include: /tmp/bot/dev/x86/dev/health.sh/tmp/runnv/lived.sh, or scripts like sex.sh or b.sh.
File Hashes (SHA256)Hashes of known deployed malware.Compare file hashes on suspicious systems against threat intelligence feeds for: <ul><li>df3f20a961d29eed46636783b71589c183675510737c984a11f78932b177b540 (HISONIC)</li><li>0bc65a55a84d1b2e2a320d2b011186a14f9074d6d28ff9120cb24fcc03c3f696 (ANGRYREBEL.LINUX)</li><li>13675cca4674a8f9a8fabe4f9df4ae0ae9ef11986dd1dcc6a896912c7d527274 (XMRIG Downloader)</li></ul>

4. Persistence Indicators

Indicator TypeDescriptionHunting/Detection Logic
New Service/JobCreation of persistence mechanisms.Check for new/modified entries in: <ul><li>crontab files</li><li>/etc/rc.local or similar startup scripts</li><li>systemd service files (e.g., /lib/systemd/system/systemd-agent.service)</li><li>Upstart configuration files (/etc/init/systemd-agent.conf)</li></ul>
Anti-ForensicsAttempts to cover tracks.Look for execution of shell commands like history -c to clear command history.

 Phase 3: Command & Control (C2) Communication IOCs

After installing the payload, the malware beacons out to a C2 server for instructions or to exfiltrate data.

5. Network Traffic Indicators

Indicator TypeDescriptionHunting/Detection Logic
C2 IP AddressesKnown malicious Command & Control infrastructure.Monitor outbound network connections from the web server/Node.js process to the following IPs (and similar rare/new external IPs): <ul><li>193.34.213[.]150 (Highest observed connection count)</li><li>176.117.107[.]154</li><li>128.199.194[.]97:9001</li><li>45.76.155[.]14</li><li>82.163.22[.]139</li></ul>
C2 DomainsKnown malicious C2 domains.Monitor DNS and HTTP requests for: <ul><li>reactcdn.windowserrorapis[.]com</li></ul>
Anomalous TrafficNetwork behavior indicative of a backdoor or miner.Look for: <ul><li>HTTP Beaconing to new, rare, or non-standard external IP addresses.</li><li>HTTP connections posted without hostnames.</li><li>Anomalous server activity on new, non-standard ports.</li></ul>
Exfiltration AttemptsLateral movement or data theft.Monitor for connections to cloud metadata services (e.g., AWS/Azure IMDS) and unusual outbound connections to external hosts, especially on high-risk ports.

 Mitigation & Remediation Actions

The most critical step is patching the underlying vulnerability.

1. Immediate Actions

  • Patch Immediately: Upgrade React Server Components to a patched version: 19.0.119.1.2, or 19.2.1 (or later) to prevent RCE. Update frameworks like Next.js (App Router), Waku, etc., to their fixed versions.
  • WAF/Network Block: Deploy Web Application Firewall (WAF) rules to detect and block suspicious POST requests, and block the C2 IP addresses listed above.

2. Remediation and Post-Patch Hunting

  • Process Termination: Identify and terminate any suspicious processes, particularly xmrig[ksoftirqd], or shells spawned directly by the Node.js/web server process.
  • Secrets Rotation: Assume compromise of environment variables, API keys, database credentials, and any secrets stored in the application’s configuration. Rotate all of them immediately.
  • Clean Rebuild: Rebuild and redeploy the affected workload from a clean image/source code after patching, instead of just cleaning the compromised system.

1) What to Hunt First (High-Confidence Behavioral IOCs)

A. Initial Access / Execution (Developer & “React” Lures)

Look for developer workflows being abused:

  • Suspicious node.exe / npm / yarn / pnpm execution spawning shells
    • node.exe -> cmd.exe
    • node.exe -> powershell.exe
    • node.exe -> wscript.exe / cscript.exe
    • npm.exe -> powershell.exe
  • Script execution from project folders
    • %USERPROFILE%\Documents\*
    • %USERPROFILE%\Desktop\*
    • C:\Users\<user>\AppData\Roaming\*
    • C:\Users\<user>\AppData\Local\Temp\*
    • C:\Users\<user>\AppData\Local\Microsoft\Windows\INetCache\*
  • Suspicious install-time scripts in JS ecosystems (endpoint artifacts)
    • postinstallpreinstallinstallprepare scripts firing unexpectedly
    • Unknown binaries dropped during npm install

Windows Event / Sysmon signals

  • Sysmon Event ID 1 (Process Create) with parent node.exe and child powershell.exe/cmd.exe
  • Sysmon Event ID 11 (File Create) in AppData\RoamingTemp, or hidden folders right after npm/yarn activity

2) Host IOCs (Persistence + Payload Staging)

A. Common Persistence Locations to Check

Startup folders

  • C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\

Registry Run keys

  • HKCU\Software\Microsoft\Windows\CurrentVersion\Run
  • HKLM\Software\Microsoft\Windows\CurrentVersion\Run

Scheduled Tasks

  • Tasks with:
    • Random names (6–12 chars, mixed case)
    • Triggers: “At logon”, “On idle”
    • Action invoking powershell -enccmd /cmshtarundll32, or node

Services / WMI

  • Newly created service with odd ImagePath
  • WMI event subscription (rare but high value if present)

B. Typical Payload Staging Patterns (File IOCs)

Hunt for executables/scripts dropped under:

  • %APPDATA%\ (Roaming)
  • %LOCALAPPDATA%\
  • %TEMP%\
  • %ProgramData%\
  • Hidden directories like:
    • %APPDATA%\<random>\
    • %LOCALAPPDATA%\<random>\
  • Look for:
    • .js.jse.vbs.ps1.bat.cmd
    • “double extensions” (e.g., update.pdf.exereact_fix.png.scr)
    • Files with recent creation time matching the suspected install/launch window

3) Network IOCs (C2 + Exfil Patterns)

A. High-Signal Network Behaviors

  • Node-based apps making outbound traffic to unusual hosts
    • node.exe initiating external connections (rare in many enterprise endpoints unless dev machines)
  • DNS to newly registered domains or random subdomains
  • HTTPS with odd User-Agents from powershellnodecurlwget, or custom agents
  • Beaconing
    • Small, periodic outbound requests (e.g., every 30s / 60s / 5m)
  • Suspicious endpoints
    • /api/v1/gate/panel/connect/update/sync/cdn/*
    • Requests carrying base64 blobs in headers, cookies, or URL params

B. Quick Network Hunt Filters

  • Outbound connections from:
    • powershell.execmd.exemshta.exerundll32.exewscript.exenode.exe
  • TLS SNI domains not seen before in your environment
  • DNS queries followed immediately by connection attempts from the same host/user

4) Ready-to-Run Hunting Queries

A. Microsoft Defender for Endpoint (KQL)

1) Node spawning PowerShell / CMD

DeviceProcessEvents
| where InitiatingProcessFileName in~ ("node.exe","npm.exe","yarn.exe","pnpm.exe")
| where FileName in~ ("powershell.exe","cmd.exe","wscript.exe","cscript.exe","mshta.exe","rundll32.exe")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine
| order by Timestamp desc

2) Suspicious encoded PowerShell launched from dev tooling

DeviceProcessEvents
| where FileName =~ "powershell.exe"
| where ProcessCommandLine has_any ("-enc","-encodedcommand","FromBase64String","IEX","Invoke-Expression")
| where InitiatingProcessFileName in~ ("node.exe","npm.exe","yarn.exe","pnpm.exe","cmd.exe")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, ProcessCommandLine
| order by Timestamp desc

3) New autoruns in common persistence paths

DeviceFileEvents
| where FolderPath has_any (@"\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup",
                           @"\ProgramData\",
                           @"\AppData\Roaming\",
                           @"\AppData\Local\Temp\")
| where ActionType in ("FileCreated","FileModified")
| where FileName endswith ".lnk" or FileName endswith ".ps1" or FileName endswith ".vbs" or FileName endswith ".js" or FileName endswith ".exe"
| project Timestamp, DeviceName, AccountName, FolderPath, FileName, SHA256
| order by Timestamp desc

4) Outbound connections from suspicious processes

DeviceNetworkEvents
| where InitiatingProcessFileName in~ ("powershell.exe","cmd.exe","mshta.exe","rundll32.exe","wscript.exe","node.exe")
| where RemoteUrl != "" or RemoteIP != ""
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteUrl, RemoteIP, RemotePort
| order by Timestamp desc


B. Splunk (Windows + Sysmon)

1) Node → PowerShell / CMD (Sysmon EID 1)

index=windows sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
(ParentImage="*\\node.exe" OR ParentImage="*\\npm.exe" OR ParentImage="*\\yarn.exe" OR ParentImage="*\\pnpm.exe")
(Image="*\\powershell.exe" OR Image="*\\cmd.exe" OR Image="*\\wscript.exe" OR Image="*\\mshta.exe" OR Image="*\\rundll32.exe")
| table _time, Computer, User, ParentImage, ParentCommandLine, Image, CommandLine
| sort - _time

2) Encoded PowerShell

index=windows EventCode=1 sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational"
Image="*\\powershell.exe" (CommandLine="*-enc*" OR CommandLine="*-EncodedCommand*" OR CommandLine="*FromBase64String*" OR CommandLine="*IEX*")
| table _time, Computer, User, ParentImage, CommandLine
| sort - _time


5) “IOC Packs” You Should Compile (Fill These From Your Case)

When you confirm artifacts from one infected endpoint, build a pack:

A. File Hash IOCs

  • SHA256: <malware_dropper_hash>
  • SHA256: <stage2_hash>
  • SHA256: <persistence_binary_hash>

B. Domain / IP IOCs

  • Domains: <c2_domain_1><c2_domain_2>
  • IPs: <remote_ip_1><remote_ip_2>
  • URLs:
    • https://<domain>/api/<path>
    • https://<domain>/update/<path>

C. Process Command-Line IOCs

  • Exact strings found in:
    • powershell -enc <blob>
    • cmd /c certutil -urlcache -split -f ...
    • mshta http(s)://...
    • node <temp>\*.js

6) Triage Workflow (Fast)

  1. Start with one known-suspect machine
  • Pull process tree around node/npm/yarn execution
  • Identify child processes + command lines
  1. Pivot on hashes + file paths
  • Search enterprise-wide for same SHA256, same FolderPath, same FileName
  1. Pivot on network
  • Search for the same RemoteUrl/RemoteIP across the fleet
  • Identify other hosts with identical beacon intervals
  1. Confirm persistence
  • Scheduled tasks + Run keys + Startup folder artifacts
  1. Contain
  • Isolate hosts
  • Block domains/IPs
  • Hunt laterally (credentials + token theft patterns)

CYBERDUDEBIVASH’S RECOMMENDATION :

. Patch Immediately (The Only Definitive Fix)

  • Upgrade React Server Components (RSC) Packages: Update the vulnerable packages (react-server-dom-webpack-parcel, and -turbopack) to the patched versions:
    • 19.0.1 (or later)
    • 19.1.2 (or later)
    • 19.2.1 (or later)
  • Upgrade Next.js: If using the Next.js App Router, upgrade to a stable patched version immediately (e.g., 15.0.516.0.7, or the latest patch release for your minor version).
  • Update All RSC-Enabled Frameworks: Apply patches for any other affected frameworks using RSC, such as WakuRedwoodSDKReact Router RSC preview, etc.

2. Hunting & Incident Response (Assume Breach)

Since exploitation is active in the wild and the vulnerability has a CVSS score of 10.0, assume publicly exposed systems are compromised.

  • Hunt for IOCs: Use the Indicators of Compromise (IOCs) provided in the playbook above (and from vendor advisories) to scan your environment for signs of compromise, such as:
    • Unexpected processes (whoamiidxmrig[ksoftirqd], or shells) spawned directly by the Node.js/web server process.
    • Suspicious network connections to known C2 IP addresses.
    • Unexpected files written to the /tmp/ directory or hidden folders.
  • Rotate Credentials: Immediately rotate all secrets, API keys, database credentials, and cloud credentials (e.g., AWS IAM keys) that were accessible to the compromised web server process/container environment.

3. Implement Layered Defenses (Interim Protection)

  • WAF Rules: Deploy WAF rules as an interim layer of protection to block suspicious POST requests targeting RSC endpoints with malicious payloads. Do not rely on WAF alone—it can be bypassed.
  • Network Monitoring: Enforce egress filtering to prevent the compromised web server/container from making unauthorized outbound connections to external hosts or cloud metadata endpoints (169.254.169.254).

#CYBERDUDEBIVASH #ThreatHunting

#IOC

#IndicatorsOfCompromise

#MalwareAnalysis

#MalwareInfection

#PostExploitation

#InitialAccess

#Persistence

© 2024–2025 CyberDudeBivash Pvt Ltd. All Rights Reserved. Unauthorized reproduction, redistribution, or copying of any content is strictly prohibited.

Leave a comment

Design a site like this with WordPress.com
Get started