https://github.com/backslash-security/Claw-Hunter
Claw Hunter is an open-source security tool (MDM) by Backslash Security, designed to detect, audit & secure OpenClaw/Moltbot shadow AI agents across macOS, Linux & Windows endpoints.
https://github.com/backslash-security/Claw-Hunter
clawdbot itsec itsecurity mdm openclaw security shadow-ai shadow-ai-detector vibe-coding
Last synced: 23 days ago
JSON representation
Claw Hunter is an open-source security tool (MDM) by Backslash Security, designed to detect, audit & secure OpenClaw/Moltbot shadow AI agents across macOS, Linux & Windows endpoints.
- Host: GitHub
- URL: https://github.com/backslash-security/Claw-Hunter
- Owner: backslash-security
- License: mit
- Created: 2026-02-02T13:15:13.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-02-06T09:53:36.000Z (about 1 month ago)
- Last Synced: 2026-02-06T17:43:05.036Z (about 1 month ago)
- Topics: clawdbot, itsec, itsecurity, mdm, openclaw, security, shadow-ai, shadow-ai-detector, vibe-coding
- Language: Shell
- Homepage: https://www.backslash.security/
- Size: 1.38 MB
- Stars: 33
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
๐ฆ Claw Hunter ๐ฆ by Backslash Security
[](https://opensource.org/licenses/MIT)
[](https://www.gnu.org/software/bash/)
[](https://docs.microsoft.com/en-us/powershell/)
Let us guess, your developers are not running OpenClaw, are they? ๐
Claw Hunter is a discovery and risk-assessment tool for OpenClaw (formerly known as Clawdbot and Moltbot) instances. It identifies "Shadow AI", audits agent privileges. It let's you (the user) ensure that your user endpoints, data and network are not compromised by unauthorized access.
## ๐ก๏ธ Why it matters for Security Teams
In the 2026 landscape, autonomous agents like OpenClaw operate as high-privilege service accounts. While they boost productivity, they often bypass standard IAM policies, creating "Shadow AI" instances that can execute shell commands and move data across your network.
**Claw Hunter** is purpose-built for **ITSec teams** to detect:
* **Security Risks**: Shell access, filesystem write permissions, exposed gateways
* **Credential Exposure**: Scans for potential secrets and API keys
* **Integration Inventory:** Active agents, channels, and registry entries
* **Configuration Issues**: Missing auth tokens, misconfigured services
* **Installation Status**: CLI, config files, running processes
## โจ Core Capabilities
* โ
**System Agnostic Visibility:** macOS, Linux (bash 3.2+), Windows (PowerShell 5.1+)
* โ
**MDM-Ready**: Silent execution, proper exit codes, centralized logging
* โ
**Non-Intrusive**: Read-only operations, no system modifications
* โ
**Comprehensive Detection**: Installation, configuration, processes, secrets
* โ
**Structured Output**: JSON format for automation and SIEM integration
* โ
**Zero Dependencies**: Pure bash/PowerShell, optional `jq` for enhanced JSON
### MDM Integration
- ๐ Silent execution mode for automated deployment
- ๐ Machine identification (hostname, serial number, timestamp)
- ๐ฏ Security risk scoring (clean, warning, critical)
- ๐ค Upload results to central API endpoint
- ๐ Bearer token authentication support
- ๐ Persistent logging to standard locations
- โ
Proper exit codes for automation
### Exit Codes
- `0`: No issues detected (clean)
- `1`: Security issues or warnings found
- `2`: OpenClaw not installed
- `3`: Script execution error
## ๐ Quick Start
### Interactive Mode (Manual Audit)
**macOS/Linux:**
```bash
# Download and run
curl -O https://raw.githubusercontent.com/backslash-security/Claw-Hunter/main/claw-hunter.sh
chmod +x claw-hunter.sh
./claw-hunter.sh
```
**Windows:**
```powershell
# Download and run
Invoke-WebRequest -Uri https://raw.githubusercontent.com/backslash-security/Claw-Hunter/main/claw-hunter.ps1 -OutFile claw-hunter.ps1
.\claw-hunter.ps1
```
### MDM Deployment (Automated)
**Jamf Pro (macOS):**
```bash
sudo /path/to/claw-hunter.sh --mdm --upload-url https://your-api.com/audits --api-key-file /etc/openclaw-key
```
**Microsoft Intune (Windows):**
```powershell
.\claw-hunter.ps1 --mdm --upload-url https://your-api.com/audits
```
See [MDM Deployment Guides](docs/mdm-guides/) for platform-specific instructions.
## ๐ Usage
### Command-Line Options
```bash
./claw-hunter.sh [OPTIONS]
Options:
--json Print JSON output to terminal (stdout)
--json-path Save JSON results to this file path
--mdm MDM mode: silent execution with JSON output
--upload-url Upload JSON results to this URL
--api-key-file File containing API key for authentication
--log-file Write logs to this file
-h, --help Show help message
MDM Mode:
Silent execution designed for automated deployment via MDM platforms.
- Suppresses terminal output (errors go to stderr)
- Writes JSON to /var/log/claw-hunter.json (Unix) or C:\ProgramData\claw-hunter.json (Windows)
- Logs to corresponding .log file
- Returns proper exit codes for automation
```
### Examples
```bash
# Interactive mode with terminal output
./claw-hunter.sh
# Save results to JSON file
./claw-hunter.sh --json-path /tmp/audit-results.json
# Print JSON to stdout
./claw-hunter.sh --json
# MDM deployment with upload
sudo ./claw-hunter.sh --mdm --upload-url https://api.example.com/audits --api-key-file /etc/audit-key
# MDM with custom paths
sudo ./claw-hunter.sh --mdm --json-path /custom/audit.json --log-file /var/log/custom.log
```
## ๐ Output Format
### Terminal Output (Interactive Mode)
```
==========================================
๐ก๏ธ OPENCLAW SECURITY AUDIT: UNIX/MAC (v3)
==========================================
--- [ Detection ] ---
โ
State Dir: /Users/john/.openclaw
โ
Config: /Users/john/.openclaw/openclaw.json (found)
โ
CLI: /usr/local/bin/openclaw (v1.2.3)
--- [ Network & Gateway ] ---
โก Gateway: ACTIVE (Port 18789 | PID: 12345)
โ ๏ธ Gateway auth token: NOT SET
--- [ Privileges & Tools ] ---
โ RISK: Shell Access ENABLED
โ
Filesystem Write: not flagged
```
### JSON Output (MDM Mode)
```json
{
"mdm_mode": true,
"mdm_metadata": {
"hostname": "LAPTOP-ABC123",
"serial_number": "C02XYZ123456",
"timestamp": "2026-02-02T20:30:00Z",
"script_version": "3.0"
},
"security_summary": {
"risk_level": "warning",
"critical_issues": 1,
"warnings": 2,
"info_items": 5
},
"platform": "unix",
"os": "macos",
"cli_installed": true,
"cli_version": "1.2.3",
"gateway_running": true,
"gateway_token_set": false,
"risk_shell_access_enabled": true,
"secrets_found": false
}
```
See [examples/](examples/) for complete output samples.
## ๐ง Requirements
### Bash Script (macOS/Linux)
- Bash 3.2 or higher (pre-installed on macOS/most Linux)
- Standard Unix utilities: `grep`, `awk`, `sed`, `find`
- Optional: `jq` for enhanced JSON formatting
- Root/sudo access for MDM mode (for serial number access)
### PowerShell Script (Windows)
- PowerShell 5.1 or higher (Windows 10/11)
- No additional dependencies
- Administrator privileges recommended for MDM mode
## ๐งช Testing
Run the test suite to verify functionality:
```bash
# Bash tests
cd tests/bash
./run-tests.sh
# PowerShell tests
cd tests/powershell
.\run-tests.ps1
```
See [tests/README.md](tests/README.md) for detailed testing documentation.
## ๐ License
Distributed under the MIT License. see the [LICENSE](LICENSE) file for details.
## โ๏ธ Legal Disclaimer
**Claw Hunter** is an independent security research tool. We are **not affiliated, associated, authorized, endorsed by, or in any way officially connected** with OpenClaw (formerly Moltbot) or any of its subsidiaries or its affiliates. The name OpenClaw as well as related names, marks, emblems, and images are registered trademarks of their respective owners.
## โ ๏ธ Disclaimer
This tool performs read-only security audits and does not modify system configurations. Always test in a non-production environment first. The tool detects potential security issues but does not make judgments about your specific security requirements.
[Security Considerations](security.md) - What the audit detects and why
## ๐ค Contact & Support
For security disclosures, enterprise support, or general inquiries, please reach out to the team.
* ๐ **Website:** [backslash.security](https://backslash.security/)
* ๐ **Email:** support@backslash.security
## ๐ฉท Acknowledgments
* All the contributors making AI safer every day.
* Maintained with โค๏ธ by the team at **Backslash Security**.
* Special thanks to the security researchers documenting the evolution of autonomous agent persistence.
* Don't forget to Vibe Safely!