nox-openclaw-hunter 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +170 -10
  2. package/dist/commands/export.d.ts.map +1 -1
  3. package/dist/commands/export.js +529 -46
  4. package/dist/commands/export.js.map +1 -1
  5. package/dist/detector/cli-binary.d.ts.map +1 -1
  6. package/dist/detector/cli-binary.js +19 -0
  7. package/dist/detector/cli-binary.js.map +1 -1
  8. package/dist/detector/config.d.ts.map +1 -1
  9. package/dist/detector/config.js +135 -3
  10. package/dist/detector/config.js.map +1 -1
  11. package/dist/detector/process.d.ts.map +1 -1
  12. package/dist/detector/process.js +12 -1
  13. package/dist/detector/process.js.map +1 -1
  14. package/dist/enforcer/file-remover.d.ts +9 -0
  15. package/dist/enforcer/file-remover.d.ts.map +1 -1
  16. package/dist/enforcer/file-remover.js +76 -0
  17. package/dist/enforcer/file-remover.js.map +1 -1
  18. package/dist/enforcer/index.d.ts.map +1 -1
  19. package/dist/enforcer/index.js +19 -8
  20. package/dist/enforcer/index.js.map +1 -1
  21. package/dist/enforcer/service-stopper.d.ts +1 -0
  22. package/dist/enforcer/service-stopper.d.ts.map +1 -1
  23. package/dist/enforcer/service-stopper.js +7 -6
  24. package/dist/enforcer/service-stopper.js.map +1 -1
  25. package/dist/mdm/templates/detect.ps1.d.ts.map +1 -1
  26. package/dist/mdm/templates/detect.ps1.js +69 -38
  27. package/dist/mdm/templates/detect.ps1.js.map +1 -1
  28. package/dist/mdm/templates/enforce.ps1.d.ts.map +1 -1
  29. package/dist/mdm/templates/enforce.ps1.js +38 -25
  30. package/dist/mdm/templates/enforce.ps1.js.map +1 -1
  31. package/dist/platform/darwin.d.ts.map +1 -1
  32. package/dist/platform/darwin.js +117 -25
  33. package/dist/platform/darwin.js.map +1 -1
  34. package/dist/platform/index.d.ts +4 -0
  35. package/dist/platform/index.d.ts.map +1 -1
  36. package/dist/platform/index.js.map +1 -1
  37. package/dist/platform/windows.d.ts.map +1 -1
  38. package/dist/platform/windows.js +101 -0
  39. package/dist/platform/windows.js.map +1 -1
  40. package/docs/jumpcloud.jpeg +0 -0
  41. package/package.json +1 -1
package/README.md CHANGED
@@ -1,9 +1,11 @@
1
- ![OpenClaw Hunter](./repo.png)
1
+ ![OpenClaw Hunter](https://github.com/Arampc/OpenClaw-Hunter/raw/HEAD/crab_repo.jpeg)
2
2
 
3
3
  # OpenClaw Hunter
4
4
 
5
5
  **Hunt, purge, and isolate OpenClaw AI agents across your fleet.**
6
6
 
7
+ *TL;DR — This tool works with all MDMs or locally on your endpoint: use **npm** for local install and **scripts** for MDM deployment.*
8
+
7
9
  ---
8
10
 
9
11
  ## Installation
@@ -12,7 +14,8 @@
12
14
  npm install -g nox-openclaw-hunter
13
15
  ```
14
16
 
15
- Or from source:
17
+ <details>
18
+ <summary><strong>Or from source</strong></summary>
16
19
 
17
20
  ```bash
18
21
  git clone https://github.com/Arampc/OpenClaw-Hunter.git
@@ -20,6 +23,22 @@ cd OpenClaw-Hunter
20
23
  npm install && npm run build && npm link
21
24
  ```
22
25
 
26
+ </details>
27
+
28
+ <details>
29
+ <summary><strong>Deploy via MDM (scripts)</strong></summary>
30
+
31
+ Deploy via your MDM (Jamf, Intune, JumpCloud) using the script sources below. Upload the script to your MDM as a command/policy, then assign to device groups. See [MDM Deployment](#mdm-deployment) for platform-specific steps.
32
+
33
+ | Script | Platform | Source |
34
+ |--------|----------|--------|
35
+ | **Scan (detect)** | macOS / Linux | [nox-scan.sh](scripts/nox-scan.sh) |
36
+ | **Scan (detect)** | Windows | [nox-scan.ps1](scripts/nox-scan.ps1) |
37
+ | **Purge** | macOS / Linux | [nox-purge.sh](scripts/nox-purge.sh) |
38
+ | **Purge** | Windows | [nox-purge.ps1](scripts/nox-purge.ps1) |
39
+
40
+ </details>
41
+
23
42
  > Requires Node.js 18+
24
43
 
25
44
  ---
@@ -37,6 +56,61 @@ nox scan --json # Output as JSON
37
56
  nox scan --yaml # Output as YAML
38
57
  ```
39
58
 
59
+ **Example output** (when OpenClaw is detected):
60
+
61
+ ```
62
+ ┌────────────────────┬──────────────────────────────────────────────────┐
63
+ │ Status │ Installed & Running │
64
+ ├────────────────────┼──────────────────────────────────────────────────┤
65
+ │ Hostname │ {Hostname} │
66
+ ├────────────────────┼──────────────────────────────────────────────────┤
67
+ │ Platform │ {Type} │
68
+ ├────────────────────┼──────────────────────────────────────────────────┤
69
+ │ Timestamp │ 2026-02-04T13:35:09.008Z │
70
+ └────────────────────┴──────────────────────────────────────────────────┘
71
+
72
+ Detection Details:
73
+ ┌───────────────┬───────────────┬────────────────────────────────────────┐
74
+ │ Component │ Status │ Details │
75
+ ├───────────────┼───────────────┼────────────────────────────────────────┤
76
+ │ CLI Binary │ Found │ /Users/{path} │
77
+ ├───────────────┼───────────────┼────────────────────────────────────────┤
78
+ │ App Bundle │ {} │ - │
79
+ ├───────────────┼───────────────┼────────────────────────────────────────┤
80
+ │ State Dir │ Found │ /Users/{path}/.openclaw │
81
+ ├───────────────┼───────────────┼────────────────────────────────────────┤
82
+ │ Config │ Found │ /Users/{path}/.openclaw/opencl… │
83
+ ├───────────────┼───────────────┼────────────────────────────────────────┤
84
+ │ AI Model │ Configured │ google/gemini-3-flash-preview (e.g.) │
85
+ ├───────────────┼───────────────┼────────────────────────────────────────┤
86
+ │ Autonomous │ ENABLED │ Agent has autonomous execution │
87
+ ├───────────────┼───────────────┼────────────────────────────────────────┤
88
+ │ Service │ Running │ ai.openclaw.gateway │
89
+ ├───────────────┼───────────────┼────────────────────────────────────────┤
90
+ │ Gateway │ Listening │ Port 18789 │
91
+ ├───────────────┼───────────────┼────────────────────────────────────────┤
92
+ │ Docker │ Not found │ - │
93
+ └───────────────┴───────────────┴────────────────────────────────────────┘
94
+
95
+ Agent Permissions:
96
+ ┌──────────────────────────────────────────────────┐
97
+ │ Granted Permissions │
98
+ ├──────────────────────────────────────────────────┤
99
+ │ workspace: /Users/{path}/.openclaw/works… │
100
+ └──────────────────────────────────────────────────┘
101
+
102
+ Running Processes:
103
+ ┌──────┬──────────────────┬──────┬─────────┐
104
+ │ PID │ Name │ User │ Memory │
105
+ ├──────┼──────────────────┼──────┼─────────┤
106
+ │ 6688 │ openclaw-gateway │ - │ 385.1MB │
107
+ ├──────┼──────────────────┼──────┼─────────┤
108
+ │ 4861 │ openclaw │ - │ 54.9MB │
109
+ ├──────┼──────────────────┼──────┼─────────┤
110
+ │ 4888 │ openclaw-onboard │ - │ 381.8MB │
111
+ └──────┴──────────────────┴──────┴─────────┘
112
+ ```
113
+
40
114
  ### `nox purge`
41
115
 
42
116
  Purge all OpenClaw components from the system.
@@ -47,6 +121,34 @@ sudo nox purge # Execute purge
47
121
  sudo nox purge --force # Skip confirmation
48
122
  ```
49
123
 
124
+ **Example output** (after a successful purge):
125
+
126
+ ```
127
+ Enforcement Results:
128
+
129
+ ┌────────────────┬────────────────────────────────┬──────────┬────────────┐
130
+ │ Action │ Target │ Status │ Details │
131
+ ├────────────────┼────────────────────────────────┼──────────┼────────────┤
132
+ │ process-kill │ openclaw-gateway │ Success │ │
133
+ ├────────────────┼────────────────────────────────┼──────────┼────────────┤
134
+ │ process-kill │ openclaw │ Success │ │
135
+ ├────────────────┼────────────────────────────────┼──────────┼────────────┤
136
+ │ process-kill │ openclaw-onboard │ Success │ │
137
+ ├────────────────┼────────────────────────────────┼──────────┼────────────┤
138
+ │ service-stop │ ai.openclaw.gateway │ Success │ │
139
+ ├────────────────┼────────────────────────────────┼──────────┼────────────┤
140
+ │ binary-remove │ /usr/local/bin/openclaw │ Success │ │
141
+ ├────────────────┼────────────────────────────────┼──────────┼────────────┤
142
+ │ config-remove │ /Users/{user}/.openclaw │ Success │ │
143
+ └────────────────┴────────────────────────────────┴──────────┴────────────┘
144
+
145
+ Summary:
146
+ Total: 6
147
+ Success: 6
148
+ Failed: 0
149
+ Skipped: 0
150
+ ```
151
+
50
152
  ### `nox isolate`
51
153
 
52
154
  Isolate the device by blocking ports, quarantining files, and preventing reinstallation.
@@ -86,15 +188,73 @@ nox export --platform jumpcloud --mode detect --webhook https://siem.example.com
86
188
 
87
189
  ---
88
190
 
89
- ## Webhook Integration
191
+ ## MDM Deployment
90
192
 
91
- Send results to your SIEM or alerting system:
193
+ OpenClaw Hunter can be deployed across your fleet via **MDM (Mobile Device Management)**. Use `nox export` to generate scripts (or download the scripts `nox-scan`, `nox-purge.sh`), then add them to your MDM.
92
194
 
93
- ```bash
94
- nox scan --webhook https://siem.example.com --webhook-token SECRET
95
- nox purge --webhook https://siem.example.com --webhook-token SECRET
96
- nox isolate --webhook https://siem.example.com --webhook-token SECRET
97
- ```
195
+ **Supported MDMs:**
196
+
197
+ | MDM | Platforms | Modes |
198
+ |-----|-----------|--------|
199
+ | **Jamf** | macOS | detect, purge |
200
+ | **Intune** | Windows, macOS | detect, purge |
201
+ | **JumpCloud** | Windows, macOS, Linux | detect, purge (enforce) |
202
+
203
+ **JumpCloud**
204
+
205
+ ![JumpCloud Commands](docs/jumpcloud.jpeg)
206
+
207
+ <details>
208
+ <summary><strong>Step-by-step: add the script to JumpCloud</strong></summary>
209
+
210
+ **Step 1 — Use the scripts**
211
+
212
+ Use `nox-scan.sh` and `nox-scan.ps1` for detection, and `nox-purge.sh` and `nox-purge.ps1` for purge.
213
+
214
+ ---
215
+
216
+ **Step 2 — Create a command in JumpCloud**
217
+
218
+ | # | What to do |
219
+ |---|------------|
220
+ | 1 | In JumpCloud go to **Device Management → Commands**. |
221
+ | 2 | Click **+** (Add Command). |
222
+ | 3 | **Name:** e.g. `Nox OpenClaw Detection (macOS)`. |
223
+ | 4 | **Command:** Paste the full contents of `nox-scan.sh`. |
224
+ | 5 | **Command Type:** **Mac** (or **Linux** / **Windows** for the matching script). |
225
+ | 6 | **Run As:** **Root** (required for full detection). |
226
+ | 7 | **Timeout:** **120** seconds. |
227
+ | 8 | **Launch Options:** Trigger (e.g. `nox-openclaw-detect`) or **Schedule** (e.g. daily). |
228
+ | 9 | Click **Save**. |
229
+
230
+ ---
231
+
232
+ **Step 3 — Repeat for each OS (and optionally purge)**
233
+
234
+ | OS | Command type | Script |
235
+ |----|--------------|--------|
236
+ | macOS | Mac | `nox-scan.sh` |
237
+ | Linux | Linux | `nox-scan.sh` |
238
+ | Windows | Windows, Shell = PowerShell, Run As = Administrator | `nox-scan.ps1` |
239
+
240
+ For **purge**, use `nox-purge.sh` / `nox-purge.ps1`; set **Timeout** to **300** seconds.
241
+
242
+ ---
243
+
244
+ **Step 4 — Assign to devices**
245
+
246
+ Open the command → **Device Groups** or **Systems** tab → select the groups or systems → **Save**.
247
+
248
+ ---
249
+
250
+ **Step 5 — Run the command**
251
+
252
+ - **Manual run:** Open the command → **Systems** tab → select one or more systems → **Run** (or use **Run** from the Commands list).
253
+ - **Scheduled:** If you set a **Schedule** in Step 2, the command runs automatically (e.g. daily).
254
+ - **Trigger:** If you set a **Trigger**, run it via the JumpCloud API using the trigger name.
255
+ - **View results:** Open the command → **Results** tab to see exit codes and output per system (e.g. `0` = clean, `1` = OpenClaw detected).
256
+
257
+ </details>
98
258
 
99
259
  ---
100
260
 
@@ -130,4 +290,4 @@ MIT
130
290
 
131
291
  ---
132
292
 
133
- **OpenClaw Hunter ©**
293
+ **OpenClaw Hunter ©**
@@ -1 +1 @@
1
- {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE;QACP,IAAI,IAAI;YAAE,KAAK,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;KAC7B,CAAC;CACH;AAsxCD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmFhF"}
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE;QACP,IAAI,IAAI;YAAE,KAAK,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;KAC7B,CAAC;CACH;AAyvDD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmFhF"}