A security analysis tool that detects specific attack vectors used by malicious Node.js scripts targeting cryptocurrency wallets and development environments.
NXSweep scans your system for indicators that match the attack patterns of the NX malware family. It checks for:
- AI CLI Tools: Presence of
claude,gemini, orqcommand-line interfaces - GitHub Authentication: Valid GitHub tokens via
ghCLI or environment variables - NPM Configuration: Active npm user sessions and
.npmrcfiles - Shell Compromise: Malicious lines in
~/.bashrcor~/.zshrcfiles - Cryptocurrency Wallets: Files matching wallet-related patterns
- Attack Artifacts:
/tmp/inventory.txtfiles created by the malware
python3 NXSweep.pypython3 NXSweep.py --clipython3 NXSweep.py --output=custom_report.json--cli,-c: Execute AI CLI tools with test prompts (use with caution)--output=FILE,-o=FILE: Specify custom output file (default:NXSweepReport.json)
Results are displayed in the terminal and saved to a JSON report file containing:
- Boolean indicators for each attack vector
- File paths of suspicious files found
- Authentication token presence (tokens are not exposed)
- Detailed scan results for forensic analysis
- This tool is for defensive security analysis only
- It mimics malware behavior to detect compromise indicators
- The
--cliflag will execute AI tools with prompts - use only on isolated systems - No sensitive data (tokens, keys) is exposed in output
- Python 3.6+
- No external dependencies required
- Works on macOS, Linux, and Windows
This tool is provided for cybersecurity research and incident response purposes.