nox-openclaw-hunter 1.0.0

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 (211) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +140 -0
  3. package/bin/nox.js +2 -0
  4. package/dist/branding.d.ts +39 -0
  5. package/dist/branding.d.ts.map +1 -0
  6. package/dist/branding.js +66 -0
  7. package/dist/branding.js.map +1 -0
  8. package/dist/cli.d.ts +15 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +94 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/commands/export.d.ts +21 -0
  13. package/dist/commands/export.d.ts.map +1 -0
  14. package/dist/commands/export.js +616 -0
  15. package/dist/commands/export.js.map +1 -0
  16. package/dist/commands/index.d.ts +8 -0
  17. package/dist/commands/index.d.ts.map +1 -0
  18. package/dist/commands/index.js +8 -0
  19. package/dist/commands/index.js.map +1 -0
  20. package/dist/commands/isolate.d.ts +30 -0
  21. package/dist/commands/isolate.d.ts.map +1 -0
  22. package/dist/commands/isolate.js +547 -0
  23. package/dist/commands/isolate.js.map +1 -0
  24. package/dist/commands/purge.d.ts +22 -0
  25. package/dist/commands/purge.d.ts.map +1 -0
  26. package/dist/commands/purge.js +295 -0
  27. package/dist/commands/purge.js.map +1 -0
  28. package/dist/commands/scan.d.ts +23 -0
  29. package/dist/commands/scan.d.ts.map +1 -0
  30. package/dist/commands/scan.js +155 -0
  31. package/dist/commands/scan.js.map +1 -0
  32. package/dist/detector/app-bundle.d.ts +13 -0
  33. package/dist/detector/app-bundle.d.ts.map +1 -0
  34. package/dist/detector/app-bundle.js +27 -0
  35. package/dist/detector/app-bundle.js.map +1 -0
  36. package/dist/detector/cli-binary.d.ts +12 -0
  37. package/dist/detector/cli-binary.d.ts.map +1 -0
  38. package/dist/detector/cli-binary.js +66 -0
  39. package/dist/detector/cli-binary.js.map +1 -0
  40. package/dist/detector/config.d.ts +21 -0
  41. package/dist/detector/config.d.ts.map +1 -0
  42. package/dist/detector/config.js +337 -0
  43. package/dist/detector/config.js.map +1 -0
  44. package/dist/detector/detection-config.d.ts +24 -0
  45. package/dist/detector/detection-config.d.ts.map +1 -0
  46. package/dist/detector/detection-config.js +242 -0
  47. package/dist/detector/detection-config.js.map +1 -0
  48. package/dist/detector/docker.d.ts +10 -0
  49. package/dist/detector/docker.d.ts.map +1 -0
  50. package/dist/detector/docker.js +94 -0
  51. package/dist/detector/docker.js.map +1 -0
  52. package/dist/detector/index.d.ts +50 -0
  53. package/dist/detector/index.d.ts.map +1 -0
  54. package/dist/detector/index.js +155 -0
  55. package/dist/detector/index.js.map +1 -0
  56. package/dist/detector/network.d.ts +34 -0
  57. package/dist/detector/network.d.ts.map +1 -0
  58. package/dist/detector/network.js +205 -0
  59. package/dist/detector/network.js.map +1 -0
  60. package/dist/detector/process.d.ts +16 -0
  61. package/dist/detector/process.d.ts.map +1 -0
  62. package/dist/detector/process.js +47 -0
  63. package/dist/detector/process.js.map +1 -0
  64. package/dist/detector/service.d.ts +17 -0
  65. package/dist/detector/service.d.ts.map +1 -0
  66. package/dist/detector/service.js +51 -0
  67. package/dist/detector/service.js.map +1 -0
  68. package/dist/enforcer/docker-cleaner.d.ts +30 -0
  69. package/dist/enforcer/docker-cleaner.d.ts.map +1 -0
  70. package/dist/enforcer/docker-cleaner.js +163 -0
  71. package/dist/enforcer/docker-cleaner.js.map +1 -0
  72. package/dist/enforcer/file-remover.d.ts +34 -0
  73. package/dist/enforcer/file-remover.d.ts.map +1 -0
  74. package/dist/enforcer/file-remover.js +137 -0
  75. package/dist/enforcer/file-remover.js.map +1 -0
  76. package/dist/enforcer/index.d.ts +33 -0
  77. package/dist/enforcer/index.d.ts.map +1 -0
  78. package/dist/enforcer/index.js +142 -0
  79. package/dist/enforcer/index.js.map +1 -0
  80. package/dist/enforcer/process-killer.d.ts +18 -0
  81. package/dist/enforcer/process-killer.d.ts.map +1 -0
  82. package/dist/enforcer/process-killer.js +80 -0
  83. package/dist/enforcer/process-killer.js.map +1 -0
  84. package/dist/enforcer/service-stopper.d.ts +23 -0
  85. package/dist/enforcer/service-stopper.d.ts.map +1 -0
  86. package/dist/enforcer/service-stopper.js +95 -0
  87. package/dist/enforcer/service-stopper.js.map +1 -0
  88. package/dist/index.d.ts +6 -0
  89. package/dist/index.d.ts.map +1 -0
  90. package/dist/index.js +10 -0
  91. package/dist/index.js.map +1 -0
  92. package/dist/isolator/firewall.d.ts +25 -0
  93. package/dist/isolator/firewall.d.ts.map +1 -0
  94. package/dist/isolator/firewall.js +114 -0
  95. package/dist/isolator/firewall.js.map +1 -0
  96. package/dist/isolator/index.d.ts +63 -0
  97. package/dist/isolator/index.d.ts.map +1 -0
  98. package/dist/isolator/index.js +201 -0
  99. package/dist/isolator/index.js.map +1 -0
  100. package/dist/isolator/lockdown.d.ts +22 -0
  101. package/dist/isolator/lockdown.d.ts.map +1 -0
  102. package/dist/isolator/lockdown.js +401 -0
  103. package/dist/isolator/lockdown.js.map +1 -0
  104. package/dist/isolator/quarantine.d.ts +39 -0
  105. package/dist/isolator/quarantine.d.ts.map +1 -0
  106. package/dist/isolator/quarantine.js +364 -0
  107. package/dist/isolator/quarantine.js.map +1 -0
  108. package/dist/mdm/index.d.ts +93 -0
  109. package/dist/mdm/index.d.ts.map +1 -0
  110. package/dist/mdm/index.js +414 -0
  111. package/dist/mdm/index.js.map +1 -0
  112. package/dist/mdm/intune.d.ts +69 -0
  113. package/dist/mdm/intune.d.ts.map +1 -0
  114. package/dist/mdm/intune.js +409 -0
  115. package/dist/mdm/intune.js.map +1 -0
  116. package/dist/mdm/jamf.d.ts +58 -0
  117. package/dist/mdm/jamf.d.ts.map +1 -0
  118. package/dist/mdm/jamf.js +441 -0
  119. package/dist/mdm/jamf.js.map +1 -0
  120. package/dist/mdm/jumpcloud.d.ts +73 -0
  121. package/dist/mdm/jumpcloud.d.ts.map +1 -0
  122. package/dist/mdm/jumpcloud.js +470 -0
  123. package/dist/mdm/jumpcloud.js.map +1 -0
  124. package/dist/mdm/templates/detect.ps1.d.ts +30 -0
  125. package/dist/mdm/templates/detect.ps1.d.ts.map +1 -0
  126. package/dist/mdm/templates/detect.ps1.js +463 -0
  127. package/dist/mdm/templates/detect.ps1.js.map +1 -0
  128. package/dist/mdm/templates/detect.sh.d.ts +30 -0
  129. package/dist/mdm/templates/detect.sh.d.ts.map +1 -0
  130. package/dist/mdm/templates/detect.sh.js +474 -0
  131. package/dist/mdm/templates/detect.sh.js.map +1 -0
  132. package/dist/mdm/templates/enforce.ps1.d.ts +33 -0
  133. package/dist/mdm/templates/enforce.ps1.d.ts.map +1 -0
  134. package/dist/mdm/templates/enforce.ps1.js +681 -0
  135. package/dist/mdm/templates/enforce.ps1.js.map +1 -0
  136. package/dist/mdm/templates/enforce.sh.d.ts +33 -0
  137. package/dist/mdm/templates/enforce.sh.d.ts.map +1 -0
  138. package/dist/mdm/templates/enforce.sh.js +591 -0
  139. package/dist/mdm/templates/enforce.sh.js.map +1 -0
  140. package/dist/platform/darwin.d.ts +6 -0
  141. package/dist/platform/darwin.d.ts.map +1 -0
  142. package/dist/platform/darwin.js +192 -0
  143. package/dist/platform/darwin.js.map +1 -0
  144. package/dist/platform/index.d.ts +43 -0
  145. package/dist/platform/index.d.ts.map +1 -0
  146. package/dist/platform/index.js +27 -0
  147. package/dist/platform/index.js.map +1 -0
  148. package/dist/platform/linux.d.ts +6 -0
  149. package/dist/platform/linux.d.ts.map +1 -0
  150. package/dist/platform/linux.js +134 -0
  151. package/dist/platform/linux.js.map +1 -0
  152. package/dist/platform/windows.d.ts +6 -0
  153. package/dist/platform/windows.d.ts.map +1 -0
  154. package/dist/platform/windows.js +134 -0
  155. package/dist/platform/windows.js.map +1 -0
  156. package/dist/reporter/console.d.ts +27 -0
  157. package/dist/reporter/console.d.ts.map +1 -0
  158. package/dist/reporter/console.js +431 -0
  159. package/dist/reporter/console.js.map +1 -0
  160. package/dist/reporter/index.d.ts +11 -0
  161. package/dist/reporter/index.d.ts.map +1 -0
  162. package/dist/reporter/index.js +13 -0
  163. package/dist/reporter/index.js.map +1 -0
  164. package/dist/reporter/json.d.ts +61 -0
  165. package/dist/reporter/json.d.ts.map +1 -0
  166. package/dist/reporter/json.js +75 -0
  167. package/dist/reporter/json.js.map +1 -0
  168. package/dist/reporter/webhook.d.ts +57 -0
  169. package/dist/reporter/webhook.d.ts.map +1 -0
  170. package/dist/reporter/webhook.js +230 -0
  171. package/dist/reporter/webhook.js.map +1 -0
  172. package/dist/types/config.d.ts +116 -0
  173. package/dist/types/config.d.ts.map +1 -0
  174. package/dist/types/config.js +6 -0
  175. package/dist/types/config.js.map +1 -0
  176. package/dist/types/detection.d.ts +85 -0
  177. package/dist/types/detection.d.ts.map +1 -0
  178. package/dist/types/detection.js +5 -0
  179. package/dist/types/detection.js.map +1 -0
  180. package/dist/types/enforcement.d.ts +33 -0
  181. package/dist/types/enforcement.d.ts.map +1 -0
  182. package/dist/types/enforcement.js +5 -0
  183. package/dist/types/enforcement.js.map +1 -0
  184. package/dist/types/index.d.ts +8 -0
  185. package/dist/types/index.d.ts.map +1 -0
  186. package/dist/types/index.js +8 -0
  187. package/dist/types/index.js.map +1 -0
  188. package/dist/types/isolation.d.ts +55 -0
  189. package/dist/types/isolation.d.ts.map +1 -0
  190. package/dist/types/isolation.js +5 -0
  191. package/dist/types/isolation.js.map +1 -0
  192. package/dist/utils/exec.d.ts +48 -0
  193. package/dist/utils/exec.d.ts.map +1 -0
  194. package/dist/utils/exec.js +103 -0
  195. package/dist/utils/exec.js.map +1 -0
  196. package/dist/utils/fs.d.ts +34 -0
  197. package/dist/utils/fs.d.ts.map +1 -0
  198. package/dist/utils/fs.js +111 -0
  199. package/dist/utils/fs.js.map +1 -0
  200. package/dist/utils/index.d.ts +7 -0
  201. package/dist/utils/index.d.ts.map +1 -0
  202. package/dist/utils/index.js +7 -0
  203. package/dist/utils/index.js.map +1 -0
  204. package/dist/utils/logger.d.ts +14 -0
  205. package/dist/utils/logger.d.ts.map +1 -0
  206. package/dist/utils/logger.js +48 -0
  207. package/dist/utils/logger.js.map +1 -0
  208. package/docs/intune.md +390 -0
  209. package/docs/jamf.md +400 -0
  210. package/docs/jumpcloud.md +510 -0
  211. package/package.json +65 -0
@@ -0,0 +1,510 @@
1
+ # JumpCloud Integration Guide
2
+
3
+ Deploy Nox OpenClaw detection and enforcement scripts across your Windows, macOS, and Linux fleet using JumpCloud.
4
+
5
+ ## Overview
6
+
7
+ This guide explains how to:
8
+
9
+ 1. Create detection and enforcement commands in JumpCloud
10
+ 2. Configure triggers and schedules for automation
11
+ 3. Set up System Insights for inventory reporting
12
+ 4. Use the JumpCloud API for automation
13
+ 5. Configure webhook integration for SIEM alerting
14
+
15
+ ## Prerequisites
16
+
17
+ - JumpCloud account with Device Management
18
+ - JumpCloud agent installed on managed devices
19
+ - Admin access to JumpCloud console
20
+ - Devices enrolled in JumpCloud
21
+ - (Optional) JumpCloud API key for automation
22
+
23
+ ## Quick Start
24
+
25
+ 1. Generate scripts:
26
+ ```bash
27
+ nox export --platform jumpcloud --mode detect --output ./jumpcloud-scripts
28
+ nox export --platform jumpcloud --mode enforce --output ./jumpcloud-scripts
29
+ ```
30
+
31
+ 2. Create commands in JumpCloud console
32
+ 3. Assign to device groups
33
+ 4. Configure triggers or schedules
34
+
35
+ ## Script Setup
36
+
37
+ ### Step 1: Generate Scripts
38
+
39
+ Generate JumpCloud-optimized scripts using the CLI:
40
+
41
+ ```bash
42
+ # Detection scripts
43
+ nox export --platform jumpcloud --mode detect --output ./jumpcloud-scripts
44
+
45
+ # Enforcement scripts
46
+ nox export --platform jumpcloud --mode enforce --output ./jumpcloud-scripts
47
+
48
+ # With webhook integration
49
+ nox export --platform jumpcloud --mode detect \
50
+ --webhook https://siem.example.com/webhook \
51
+ --webhook-token YOUR_TOKEN \
52
+ --output ./jumpcloud-scripts
53
+ ```
54
+
55
+ This generates scripts for all supported platforms:
56
+ - `detect-openclaw.sh` - macOS/Linux detection
57
+ - `detect-openclaw.ps1` - Windows detection
58
+ - `enforce-openclaw.sh` - macOS/Linux enforcement
59
+ - `enforce-openclaw.ps1` - Windows enforcement
60
+
61
+ ### Step 2: Create macOS Detection Command
62
+
63
+ 1. Navigate to **Device Management > Commands**
64
+ 2. Click **+** (Add Command)
65
+ 3. Configure:
66
+ - **Name:** Nox OpenClaw Detection (macOS)
67
+ - **Command:** Paste contents of `detect-openclaw.sh`
68
+ - **Command Type:** Mac
69
+ - **Run As:** Root
70
+ - **Timeout:** 120 seconds
71
+ 4. Under **Launch Options:**
72
+ - **Launch Type:** Trigger
73
+ - **Trigger Name:** `nox-openclaw-detect`
74
+ 5. Under **Schedule** (optional):
75
+ - **Repeat Type:** Day
76
+ - **Repeat Interval:** 1
77
+ 6. Click **Save**
78
+
79
+ ### Step 3: Create Linux Detection Command
80
+
81
+ 1. Click **+** (Add Command)
82
+ 2. Configure:
83
+ - **Name:** Nox OpenClaw Detection (Linux)
84
+ - **Command:** Paste contents of `detect-openclaw.sh`
85
+ - **Command Type:** Linux
86
+ - **Run As:** Root
87
+ - **Timeout:** 120 seconds
88
+ 3. Configure trigger and schedule as above
89
+ 4. Click **Save**
90
+
91
+ ### Step 4: Create Windows Detection Command
92
+
93
+ 1. Click **+** (Add Command)
94
+ 2. Configure:
95
+ - **Name:** Nox OpenClaw Detection (Windows)
96
+ - **Command:** Paste contents of `detect-openclaw.ps1`
97
+ - **Command Type:** Windows
98
+ - **Shell:** PowerShell
99
+ - **Run As:** Administrator (root)
100
+ - **Timeout:** 120 seconds
101
+ 3. Configure trigger and schedule
102
+ 4. Click **Save**
103
+
104
+ ### Step 5: Create Enforcement Commands
105
+
106
+ Repeat the above steps for enforcement scripts:
107
+
108
+ - **Timeout:** 300 seconds (longer for enforcement)
109
+ - **Launch Type:** Manual (for on-demand remediation)
110
+ - Or configure trigger: `nox-openclaw-enforce`
111
+
112
+ ## Command Configuration Details
113
+
114
+ ### Command Types
115
+
116
+ | OS | Command Type | Shell | Script Extension |
117
+ |----|-------------|-------|------------------|
118
+ | macOS | Mac | /bin/bash | .sh |
119
+ | Linux | Linux | /bin/bash | .sh |
120
+ | Windows | Windows | PowerShell | .ps1 |
121
+
122
+ ### Run As Options
123
+
124
+ | Setting | Description | Use Case |
125
+ |---------|-------------|----------|
126
+ | Root/Administrator | Full system access | Required for enforcement |
127
+ | Current User | User-level access | Detection only (limited) |
128
+
129
+ ### Launch Types
130
+
131
+ | Type | Description |
132
+ |------|-------------|
133
+ | Manual | Run on-demand from console or API |
134
+ | Trigger | Run via API trigger name |
135
+ | Schedule | Run on recurring schedule |
136
+
137
+ ## Device Group Assignment
138
+
139
+ ### Assign Command to Groups
140
+
141
+ 1. Open the command
142
+ 2. Click **Device Groups** tab
143
+ 3. Select target groups:
144
+ - All Devices
145
+ - macOS Devices
146
+ - Linux Servers
147
+ - Windows Workstations
148
+ 4. Click **Save**
149
+
150
+ ### Assign to Individual Systems
151
+
152
+ 1. Click **Systems** tab
153
+ 2. Select target systems
154
+ 3. Click **Save**
155
+
156
+ ## System Insights Integration
157
+
158
+ Use System Insights to track OpenClaw status in device inventory.
159
+
160
+ ### Create Custom Fact Script
161
+
162
+ 1. Navigate to **Device Management > Commands**
163
+ 2. Create command:
164
+ - **Name:** Nox OpenClaw Status Fact
165
+ - **Command:**
166
+
167
+ ```bash
168
+ #!/bin/bash
169
+ # Nox OpenClaw Status Fact for JumpCloud System Insights
170
+
171
+ STATUS="not_installed"
172
+
173
+ # Check CLI binary
174
+ if command -v openclaw &>/dev/null; then
175
+ STATUS="installed"
176
+ fi
177
+
178
+ # Check common paths
179
+ for path in /usr/local/bin/openclaw /opt/homebrew/bin/openclaw /usr/bin/openclaw; do
180
+ if [[ -f "$path" ]]; then
181
+ STATUS="installed"
182
+ break
183
+ fi
184
+ done
185
+
186
+ # Check app bundle (macOS)
187
+ if [[ -d "/Applications/OpenClaw.app" ]]; then
188
+ STATUS="installed"
189
+ fi
190
+
191
+ # Check config directory
192
+ if [[ -d "$HOME/.openclaw" ]] || ls -d /Users/*/.openclaw &>/dev/null 2>&1 || ls -d /home/*/.openclaw &>/dev/null 2>&1; then
193
+ STATUS="installed"
194
+ fi
195
+
196
+ # Check if running
197
+ if pgrep -f "openclaw" > /dev/null 2>&1; then
198
+ STATUS="running"
199
+ fi
200
+
201
+ # Check gateway port
202
+ if command -v nc &>/dev/null && nc -z localhost 18789 2>/dev/null; then
203
+ STATUS="running"
204
+ fi
205
+
206
+ echo "$STATUS"
207
+ ```
208
+
209
+ 3. Configure:
210
+ - **Command Type:** Mac (create separate for Linux)
211
+ - **Run As:** Root
212
+ - **Schedule:** Repeat Daily
213
+ 4. Assign to all devices
214
+
215
+ ### Query System Insights
216
+
217
+ View aggregated results in JumpCloud console:
218
+
219
+ 1. Navigate to **Insights > Systems**
220
+ 2. Create custom query or filter
221
+ 3. Export data for reporting
222
+
223
+ ## Automated Workflows
224
+
225
+ ### Scheduled Detection
226
+
227
+ Run detection daily across your fleet:
228
+
229
+ 1. Set command Launch Type to **Trigger + Schedule**
230
+ 2. Configure Schedule:
231
+ - **Repeat Type:** Day
232
+ - **Repeat Interval:** 1
233
+ - **Time:** 02:00 (off-hours recommended)
234
+
235
+ ### On-Demand Enforcement via API
236
+
237
+ Trigger enforcement when detection finds OpenClaw:
238
+
239
+ ```bash
240
+ # Trigger enforcement via API
241
+ curl -X POST "https://console.jumpcloud.com/api/command/trigger/nox-openclaw-enforce" \
242
+ -H "x-api-key: YOUR_API_KEY" \
243
+ -H "Content-Type: application/json" \
244
+ -d '{"systemIds": ["system_id_here"]}'
245
+ ```
246
+
247
+ ### Webhook-Based Automation
248
+
249
+ 1. Configure detection script with webhook
250
+ 2. Webhook notifies your automation system
251
+ 3. Automation triggers enforcement via JumpCloud API
252
+
253
+ ## Monitoring Results
254
+
255
+ ### Command Results Dashboard
256
+
257
+ 1. Navigate to **Device Management > Commands**
258
+ 2. Click on a command
259
+ 3. Select **Results** tab
260
+ 4. Filter by:
261
+ - Exit Code
262
+ - Date Range
263
+ - System Name
264
+
265
+ ### Exit Codes
266
+
267
+ | Code | Detection Meaning | Enforcement Meaning |
268
+ |------|-------------------|---------------------|
269
+ | 0 | OpenClaw not detected | Enforcement successful |
270
+ | 1 | OpenClaw detected | Partial failure |
271
+ | 2 | Script error | Script error |
272
+ | 3 | N/A | Nothing to enforce |
273
+
274
+ ### Create Alerts
275
+
276
+ Set up webhooks for command failures:
277
+
278
+ 1. Navigate to **Settings > Webhooks**
279
+ 2. Add webhook URL
280
+ 3. Select events: Command Results
281
+ 4. Configure filters for specific exit codes
282
+
283
+ ## API Integration
284
+
285
+ ### Get API Key
286
+
287
+ 1. Navigate to your avatar > **API Settings**
288
+ 2. Create API key with appropriate permissions
289
+
290
+ ### Create Command via API
291
+
292
+ ```bash
293
+ curl -X POST "https://console.jumpcloud.com/api/commands" \
294
+ -H "x-api-key: YOUR_API_KEY" \
295
+ -H "Content-Type: application/json" \
296
+ -d '{
297
+ "name": "Nox OpenClaw Detection (macOS)",
298
+ "command": "#!/bin/bash\n# Script content...",
299
+ "commandType": "mac",
300
+ "shell": "/bin/bash",
301
+ "user": "root",
302
+ "sudo": true,
303
+ "timeout": "120",
304
+ "launchType": "trigger",
305
+ "trigger": "nox-openclaw-detect"
306
+ }'
307
+ ```
308
+
309
+ ### Run Command on Demand
310
+
311
+ ```bash
312
+ # Run on specific systems
313
+ curl -X POST "https://console.jumpcloud.com/api/commands/{command_id}/run" \
314
+ -H "x-api-key: YOUR_API_KEY" \
315
+ -H "Content-Type: application/json" \
316
+ -d '{"systems": ["system_id_1", "system_id_2"]}'
317
+ ```
318
+
319
+ ### Get Command Results
320
+
321
+ ```bash
322
+ curl -X GET "https://console.jumpcloud.com/api/commands/{command_id}/results" \
323
+ -H "x-api-key: YOUR_API_KEY" \
324
+ -H "Content-Type: application/json"
325
+ ```
326
+
327
+ ### Trigger Command by Name
328
+
329
+ ```bash
330
+ curl -X POST "https://console.jumpcloud.com/api/command/trigger/nox-openclaw-detect" \
331
+ -H "x-api-key: YOUR_API_KEY" \
332
+ -H "Content-Type: application/json" \
333
+ -d '{"systemIds": ["system_id"]}'
334
+ ```
335
+
336
+ ## Webhook Integration
337
+
338
+ ### Configure in Scripts
339
+
340
+ Edit scripts before uploading:
341
+
342
+ ```bash
343
+ # At the top of shell scripts
344
+ WEBHOOK_URL="https://siem.example.com/api/v1/events"
345
+ WEBHOOK_TOKEN="YOUR_API_TOKEN"
346
+ ```
347
+
348
+ ```powershell
349
+ # At the top of PowerShell scripts
350
+ $WebhookUrl = "https://siem.example.com/api/v1/events"
351
+ $WebhookToken = "YOUR_API_TOKEN"
352
+ ```
353
+
354
+ ### Webhook Payload
355
+
356
+ ```json
357
+ {
358
+ "event": "openclaw.detection",
359
+ "version": "1.0",
360
+ "timestamp": "2026-02-03T10:30:00Z",
361
+ "status": "detected",
362
+ "severity": "high",
363
+ "host": {
364
+ "hostname": "server-01.example.com",
365
+ "os": "Linux",
366
+ "arch": "x86_64",
367
+ "user": "admin"
368
+ },
369
+ "details": "CLI found at /usr/local/bin/openclaw; Config directory found",
370
+ "source": {
371
+ "tool": "nox-openclaw-detector",
372
+ "version": "1.0.0",
373
+ "vendor": "Nox Security"
374
+ }
375
+ }
376
+ ```
377
+
378
+ ## Device Groups for Targeting
379
+
380
+ ### Recommended Groups
381
+
382
+ Create device groups for organized targeting:
383
+
384
+ | Group Name | Criteria | Use Case |
385
+ |------------|----------|----------|
386
+ | All Managed Devices | All enrolled systems | Detection scanning |
387
+ | macOS Workstations | OS = macOS | Mac-specific commands |
388
+ | Linux Servers | OS = Linux | Linux-specific commands |
389
+ | Windows Workstations | OS = Windows | Windows-specific commands |
390
+ | High Security | Tag = high-security | More frequent scanning |
391
+
392
+ ### Dynamic Groups
393
+
394
+ Create groups based on command results:
395
+
396
+ 1. Run detection command
397
+ 2. Parse results via API
398
+ 3. Update group membership programmatically
399
+ 4. Target enforcement to detected group
400
+
401
+ ## Advanced Configurations
402
+
403
+ ### Multi-Stage Deployment
404
+
405
+ 1. **Stage 1: Detection Only**
406
+ - Deploy detection to all devices
407
+ - Review results for 1-2 weeks
408
+ - Identify scope of OpenClaw presence
409
+
410
+ 2. **Stage 2: Targeted Enforcement**
411
+ - Create group of detected devices
412
+ - Deploy enforcement to detected group
413
+ - Monitor remediation success
414
+
415
+ 3. **Stage 3: Continuous Monitoring**
416
+ - Schedule daily detection
417
+ - Automate enforcement triggers
418
+ - Alert on new detections
419
+
420
+ ### High-Security Mode
421
+
422
+ For critical systems:
423
+
424
+ 1. Schedule detection every 6 hours
425
+ 2. Configure immediate webhook alerts
426
+ 3. Set up auto-enforcement triggers
427
+ 4. Enable detailed logging
428
+
429
+ ### Cross-Platform Consistency
430
+
431
+ Ensure consistent detection across all platforms:
432
+
433
+ 1. Create identical command names with OS suffix
434
+ 2. Use same trigger names
435
+ 3. Configure same schedules
436
+ 4. Aggregate results by trigger name
437
+
438
+ ## Troubleshooting
439
+
440
+ ### Command Not Running
441
+
442
+ 1. Verify JumpCloud agent is running:
443
+ ```bash
444
+ # macOS/Linux
445
+ sudo systemctl status jcagent
446
+ # or
447
+ sudo launchctl list | grep jumpcloud
448
+ ```
449
+
450
+ 2. Check agent logs:
451
+ - macOS/Linux: `/var/log/jcagent.log`
452
+ - Windows: `C:\Windows\Temp\jcagent.log`
453
+
454
+ 3. Verify device is online in JumpCloud console
455
+
456
+ 4. Check device group assignment
457
+
458
+ ### Permission Errors
459
+
460
+ 1. Verify command runs as root/Administrator
461
+ 2. Check sudo is enabled for command
462
+ 3. Verify script has correct permissions
463
+ 4. Check for SELinux/AppArmor restrictions (Linux)
464
+
465
+ ### Timeout Issues
466
+
467
+ 1. Increase timeout value:
468
+ - Detection: 120-180 seconds
469
+ - Enforcement: 300-600 seconds
470
+
471
+ 2. Check for hung processes during enforcement
472
+
473
+ 3. Simplify script if consistently timing out
474
+
475
+ ### Webhook Failures
476
+
477
+ 1. Verify URL is accessible from devices
478
+ 2. Check corporate firewall allows outbound HTTPS
479
+ 3. Validate authentication token
480
+ 4. Check script has curl/Invoke-RestMethod available
481
+
482
+ ### Windows-Specific Issues
483
+
484
+ 1. Verify PowerShell version (5.1+ required)
485
+ 2. Check execution policy isn't blocking
486
+ 3. Ensure Windows Firewall allows JumpCloud agent
487
+
488
+ ### macOS-Specific Issues
489
+
490
+ 1. Check System Integrity Protection status
491
+ 2. Verify Full Disk Access for JumpCloud agent
492
+ 3. Check for MDM profile restrictions
493
+
494
+ ## Best Practices
495
+
496
+ 1. **Organize by OS**: Create separate commands for each operating system
497
+ 2. **Use Device Groups**: Avoid assigning to individual systems
498
+ 3. **Schedule Off-Hours**: Minimize user impact during enforcement
499
+ 4. **Monitor Results**: Regularly review command results and failures
500
+ 5. **Test First**: Deploy to pilot group before fleet-wide rollout
501
+ 6. **Enable Webhooks**: Integrate with SIEM for centralized alerting
502
+ 7. **Document Triggers**: Maintain list of trigger names and purposes
503
+ 8. **API Automation**: Use API for advanced workflows and integrations
504
+
505
+ ## Support
506
+
507
+ - Email: support@nox.security
508
+ - Documentation: https://docs.nox.security/jumpcloud
509
+ - JumpCloud Support: https://support.jumpcloud.com
510
+ - JumpCloud API Docs: https://docs.jumpcloud.com/api
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "nox-openclaw-hunter",
3
+ "version": "1.0.0",
4
+ "description": "OpenClaw Detection & Removal CLI by Nox Security",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "nox": "./bin/nox.js"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "bin",
14
+ "docs",
15
+ "README.md"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc",
19
+ "start": "node bin/nox.js",
20
+ "prepare": "npm run build",
21
+ "typecheck": "tsc --noEmit",
22
+ "compile": "bun build ./src/index.ts --compile --outfile nox",
23
+ "compile:macos-arm": "bun build ./src/index.ts --compile --target=bun-darwin-arm64 --outfile nox-macos-arm64",
24
+ "compile:macos-x64": "bun build ./src/index.ts --compile --target=bun-darwin-x64 --outfile nox-macos-x64",
25
+ "compile:linux": "bun build ./src/index.ts --compile --target=bun-linux-x64 --outfile nox-linux",
26
+ "compile:windows": "bun build ./src/index.ts --compile --target=bun-windows-x64 --outfile nox-win.exe"
27
+ },
28
+ "keywords": [
29
+ "security",
30
+ "openclaw",
31
+ "detection",
32
+ "purge",
33
+ "cli",
34
+ "endpoint-security",
35
+ "mdm",
36
+ "siem"
37
+ ],
38
+ "author": "Nox Security <support@nox.security>",
39
+ "license": "MIT",
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/Arampc/Nox-OpenClaw-Hunter.git"
43
+ },
44
+ "bugs": {
45
+ "url": "https://github.com/Arampc/Nox-OpenClaw-Hunter/issues"
46
+ },
47
+ "homepage": "https://nox.security",
48
+ "dependencies": {
49
+ "chalk": "^5.3.0",
50
+ "cli-table3": "^0.6.3",
51
+ "commander": "^12.0.0",
52
+ "inquirer": "^9.2.12",
53
+ "ora": "^8.0.1",
54
+ "yaml": "^2.3.4"
55
+ },
56
+ "devDependencies": {
57
+ "@types/inquirer": "^9.0.9",
58
+ "@types/node": "^20.11.0",
59
+ "esbuild": "^0.20.0",
60
+ "typescript": "^5.3.3"
61
+ },
62
+ "engines": {
63
+ "node": ">=18"
64
+ }
65
+ }