@cyclonedx/cdxgen 12.2.0 → 12.3.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 (181) hide show
  1. package/README.md +242 -90
  2. package/bin/audit.js +191 -0
  3. package/bin/cdxgen.js +532 -168
  4. package/bin/convert.js +99 -0
  5. package/bin/evinse.js +23 -0
  6. package/bin/repl.js +339 -8
  7. package/bin/sign.js +8 -0
  8. package/bin/validate.js +8 -0
  9. package/bin/verify.js +8 -0
  10. package/data/container-knowledge-index.json +125 -0
  11. package/data/gtfobins-index.json +6296 -0
  12. package/data/lolbas-index.json +150 -0
  13. package/data/queries-darwin.json +63 -3
  14. package/data/queries-win.json +45 -3
  15. package/data/queries.json +74 -2
  16. package/data/rules/chrome-extensions.yaml +240 -0
  17. package/data/rules/ci-permissions.yaml +478 -18
  18. package/data/rules/container-risk.yaml +270 -0
  19. package/data/rules/obom-runtime.yaml +891 -0
  20. package/data/rules/package-integrity.yaml +49 -0
  21. package/data/spdx-export.schema.json +6794 -0
  22. package/data/spdx-model-v3.0.1.jsonld +15999 -0
  23. package/lib/audit/index.js +1924 -0
  24. package/lib/audit/index.poku.js +1488 -0
  25. package/lib/audit/progress.js +137 -0
  26. package/lib/audit/progress.poku.js +188 -0
  27. package/lib/audit/reporters.js +618 -0
  28. package/lib/audit/scoring.js +310 -0
  29. package/lib/audit/scoring.poku.js +341 -0
  30. package/lib/audit/targets.js +260 -0
  31. package/lib/audit/targets.poku.js +331 -0
  32. package/lib/cli/index.js +276 -68
  33. package/lib/cli/index.poku.js +368 -0
  34. package/lib/helpers/analyzer.js +1052 -5
  35. package/lib/helpers/analyzer.poku.js +301 -0
  36. package/lib/helpers/annotationFormatter.js +49 -0
  37. package/lib/helpers/annotationFormatter.poku.js +44 -0
  38. package/lib/helpers/bomUtils.js +36 -0
  39. package/lib/helpers/bomUtils.poku.js +51 -0
  40. package/lib/helpers/caxa.js +2 -2
  41. package/lib/helpers/chromextutils.js +1153 -0
  42. package/lib/helpers/chromextutils.poku.js +493 -0
  43. package/lib/helpers/ciParsers/githubActions.js +1632 -45
  44. package/lib/helpers/ciParsers/githubActions.poku.js +853 -1
  45. package/lib/helpers/containerRisk.js +186 -0
  46. package/lib/helpers/containerRisk.poku.js +52 -0
  47. package/lib/helpers/depsUtils.js +16 -0
  48. package/lib/helpers/depsUtils.poku.js +58 -1
  49. package/lib/helpers/display.js +245 -61
  50. package/lib/helpers/display.poku.js +162 -2
  51. package/lib/helpers/exportUtils.js +123 -0
  52. package/lib/helpers/exportUtils.poku.js +60 -0
  53. package/lib/helpers/formulationParsers.js +69 -0
  54. package/lib/helpers/formulationParsers.poku.js +44 -0
  55. package/lib/helpers/gtfobins.js +189 -0
  56. package/lib/helpers/gtfobins.poku.js +49 -0
  57. package/lib/helpers/lolbas.js +267 -0
  58. package/lib/helpers/lolbas.poku.js +39 -0
  59. package/lib/helpers/osqueryTransform.js +84 -0
  60. package/lib/helpers/osqueryTransform.poku.js +49 -0
  61. package/lib/helpers/provenanceUtils.js +193 -0
  62. package/lib/helpers/provenanceUtils.poku.js +145 -0
  63. package/lib/helpers/pylockutils.js +281 -0
  64. package/lib/helpers/pylockutils.poku.js +48 -0
  65. package/lib/helpers/registryProvenance.js +793 -0
  66. package/lib/helpers/registryProvenance.poku.js +452 -0
  67. package/lib/helpers/remote/dependency-track.js +84 -0
  68. package/lib/helpers/remote/dependency-track.poku.js +119 -0
  69. package/lib/helpers/source.js +1267 -0
  70. package/lib/helpers/source.poku.js +771 -0
  71. package/lib/helpers/spdxUtils.js +97 -0
  72. package/lib/helpers/spdxUtils.poku.js +70 -0
  73. package/lib/helpers/table.js +384 -0
  74. package/lib/helpers/table.poku.js +186 -0
  75. package/lib/helpers/unicodeScan.js +147 -0
  76. package/lib/helpers/unicodeScan.poku.js +45 -0
  77. package/lib/helpers/utils.js +882 -136
  78. package/lib/helpers/utils.poku.js +995 -91
  79. package/lib/managers/binary.js +29 -5
  80. package/lib/managers/docker.js +179 -52
  81. package/lib/managers/docker.poku.js +327 -28
  82. package/lib/managers/oci.js +107 -23
  83. package/lib/managers/oci.poku.js +132 -0
  84. package/lib/server/openapi.yaml +50 -0
  85. package/lib/server/server.js +228 -331
  86. package/lib/server/server.poku.js +220 -5
  87. package/lib/stages/postgen/annotator.js +7 -0
  88. package/lib/stages/postgen/annotator.poku.js +40 -0
  89. package/lib/stages/postgen/auditBom.js +20 -5
  90. package/lib/stages/postgen/auditBom.poku.js +1729 -67
  91. package/lib/stages/postgen/postgen.js +40 -0
  92. package/lib/stages/postgen/postgen.poku.js +47 -0
  93. package/lib/stages/postgen/ruleEngine.js +80 -2
  94. package/lib/stages/postgen/spdxConverter.js +796 -0
  95. package/lib/stages/postgen/spdxConverter.poku.js +341 -0
  96. package/lib/validator/bomValidator.js +232 -0
  97. package/lib/validator/bomValidator.poku.js +70 -0
  98. package/lib/validator/complianceRules.js +70 -7
  99. package/lib/validator/complianceRules.poku.js +30 -0
  100. package/lib/validator/reporters/annotations.js +2 -2
  101. package/lib/validator/reporters/console.js +13 -2
  102. package/lib/validator/reporters.poku.js +13 -0
  103. package/package.json +10 -8
  104. package/types/bin/audit.d.ts +3 -0
  105. package/types/bin/audit.d.ts.map +1 -0
  106. package/types/bin/convert.d.ts +3 -0
  107. package/types/bin/convert.d.ts.map +1 -0
  108. package/types/bin/repl.d.ts.map +1 -1
  109. package/types/lib/audit/index.d.ts +115 -0
  110. package/types/lib/audit/index.d.ts.map +1 -0
  111. package/types/lib/audit/progress.d.ts +27 -0
  112. package/types/lib/audit/progress.d.ts.map +1 -0
  113. package/types/lib/audit/reporters.d.ts +35 -0
  114. package/types/lib/audit/reporters.d.ts.map +1 -0
  115. package/types/lib/audit/scoring.d.ts +35 -0
  116. package/types/lib/audit/scoring.d.ts.map +1 -0
  117. package/types/lib/audit/targets.d.ts +63 -0
  118. package/types/lib/audit/targets.d.ts.map +1 -0
  119. package/types/lib/cli/index.d.ts +8 -0
  120. package/types/lib/cli/index.d.ts.map +1 -1
  121. package/types/lib/helpers/analyzer.d.ts +13 -0
  122. package/types/lib/helpers/analyzer.d.ts.map +1 -1
  123. package/types/lib/helpers/annotationFormatter.d.ts +23 -0
  124. package/types/lib/helpers/annotationFormatter.d.ts.map +1 -0
  125. package/types/lib/helpers/bomUtils.d.ts +5 -0
  126. package/types/lib/helpers/bomUtils.d.ts.map +1 -0
  127. package/types/lib/helpers/chromextutils.d.ts +97 -0
  128. package/types/lib/helpers/chromextutils.d.ts.map +1 -0
  129. package/types/lib/helpers/ciParsers/githubActions.d.ts +3 -8
  130. package/types/lib/helpers/ciParsers/githubActions.d.ts.map +1 -1
  131. package/types/lib/helpers/containerRisk.d.ts +17 -0
  132. package/types/lib/helpers/containerRisk.d.ts.map +1 -0
  133. package/types/lib/helpers/depsUtils.d.ts.map +1 -1
  134. package/types/lib/helpers/display.d.ts +4 -1
  135. package/types/lib/helpers/display.d.ts.map +1 -1
  136. package/types/lib/helpers/exportUtils.d.ts +40 -0
  137. package/types/lib/helpers/exportUtils.d.ts.map +1 -0
  138. package/types/lib/helpers/formulationParsers.d.ts.map +1 -1
  139. package/types/lib/helpers/gtfobins.d.ts +17 -0
  140. package/types/lib/helpers/gtfobins.d.ts.map +1 -0
  141. package/types/lib/helpers/lolbas.d.ts +16 -0
  142. package/types/lib/helpers/lolbas.d.ts.map +1 -0
  143. package/types/lib/helpers/osqueryTransform.d.ts +7 -0
  144. package/types/lib/helpers/osqueryTransform.d.ts.map +1 -0
  145. package/types/lib/helpers/provenanceUtils.d.ts +90 -0
  146. package/types/lib/helpers/provenanceUtils.d.ts.map +1 -0
  147. package/types/lib/helpers/pylockutils.d.ts +51 -0
  148. package/types/lib/helpers/pylockutils.d.ts.map +1 -0
  149. package/types/lib/helpers/registryProvenance.d.ts +17 -0
  150. package/types/lib/helpers/registryProvenance.d.ts.map +1 -0
  151. package/types/lib/helpers/remote/dependency-track.d.ts +16 -0
  152. package/types/lib/helpers/remote/dependency-track.d.ts.map +1 -0
  153. package/types/lib/helpers/source.d.ts +141 -0
  154. package/types/lib/helpers/source.d.ts.map +1 -0
  155. package/types/lib/helpers/spdxUtils.d.ts +2 -0
  156. package/types/lib/helpers/spdxUtils.d.ts.map +1 -0
  157. package/types/lib/helpers/table.d.ts +6 -0
  158. package/types/lib/helpers/table.d.ts.map +1 -0
  159. package/types/lib/helpers/unicodeScan.d.ts +46 -0
  160. package/types/lib/helpers/unicodeScan.d.ts.map +1 -0
  161. package/types/lib/helpers/utils.d.ts +30 -11
  162. package/types/lib/helpers/utils.d.ts.map +1 -1
  163. package/types/lib/managers/binary.d.ts.map +1 -1
  164. package/types/lib/managers/docker.d.ts.map +1 -1
  165. package/types/lib/managers/oci.d.ts.map +1 -1
  166. package/types/lib/server/server.d.ts +0 -35
  167. package/types/lib/server/server.d.ts.map +1 -1
  168. package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
  169. package/types/lib/stages/postgen/auditBom.d.ts.map +1 -1
  170. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  171. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  172. package/types/lib/stages/postgen/spdxConverter.d.ts +11 -0
  173. package/types/lib/stages/postgen/spdxConverter.d.ts.map +1 -0
  174. package/types/lib/validator/bomValidator.d.ts +1 -0
  175. package/types/lib/validator/bomValidator.d.ts.map +1 -1
  176. package/types/lib/validator/complianceRules.d.ts.map +1 -1
  177. package/types/lib/validator/reporters/console.d.ts.map +1 -1
  178. package/types/bin/dependencies.d.ts +0 -3
  179. package/types/bin/dependencies.d.ts.map +0 -1
  180. package/types/bin/licenses.d.ts +0 -3
  181. package/types/bin/licenses.d.ts.map +0 -1
@@ -0,0 +1,891 @@
1
+ # OBOM Runtime Security & Compliance Rules
2
+ # Category: obom-runtime
3
+ # Detects host posture, persistence, and runtime indicators from osquery-derived OBOM components
4
+
5
+ - id: OBOM-LNX-001
6
+ name: "Linux systemd unit sourced from temporary path"
7
+ description: "Systemd units loaded from /tmp or /var/tmp can indicate unauthorized persistence."
8
+ severity: high
9
+ category: obom-runtime
10
+ condition: |
11
+ components[
12
+ $prop($, 'cdx:osquery:category') = 'systemd_units'
13
+ and (
14
+ $contains($nullSafeProp($, 'fragment_path'), '/tmp/')
15
+ or $contains($nullSafeProp($, 'fragment_path'), '/var/tmp/')
16
+ or $contains($nullSafeProp($, 'source_path'), '/tmp/')
17
+ or $contains($nullSafeProp($, 'source_path'), '/var/tmp/')
18
+ )
19
+ ]
20
+ location: |
21
+ {
22
+ "bomRef": $."bom-ref",
23
+ "purl": purl
24
+ }
25
+ message: "Systemd unit '{{ name }}' references temporary execution artifacts in its unit file path configuration"
26
+ mitigation: "Move unit files to trusted system paths, validate ownership/permissions, and re-enable only approved services."
27
+ evidence: |
28
+ {
29
+ "activeState": $prop($, 'active_state'),
30
+ "unitFileState": $prop($, 'unit_file_state'),
31
+ "fragmentPath": $prop($, 'fragment_path'),
32
+ "sourcePath": $prop($, 'source_path')
33
+ }
34
+
35
+ - id: OBOM-LNX-002
36
+ name: "Linux sudoers broad privilege rule"
37
+ description: "Sudoers entries allowing unrestricted command execution increase lateral movement and privilege escalation risk."
38
+ severity: high
39
+ category: obom-runtime
40
+ condition: |
41
+ components[
42
+ $prop($, 'cdx:osquery:category') = 'sudoers_snapshot'
43
+ and (
44
+ $contains(description, 'NOPASSWD:ALL')
45
+ or $contains(description, 'ALL=(ALL) ALL')
46
+ )
47
+ ]
48
+ location: |
49
+ {
50
+ "bomRef": $."bom-ref",
51
+ "purl": purl
52
+ }
53
+ message: "Sudo policy '{{ name }}' contains broad privilege grant: {{ description }}"
54
+ mitigation: "Replace broad grants with command-specific allowlists and enforce MFA/approval workflows for privileged operations."
55
+ evidence: |
56
+ {
57
+ "sourceFile": $prop($, 'path'),
58
+ "ruleDetails": description
59
+ }
60
+
61
+ - id: OBOM-LNX-003
62
+ name: "Root authorized_keys entry without restrictions"
63
+ description: "Root SSH keys without command/from/no-agent-forwarding restrictions weaken access controls and traceability."
64
+ severity: medium
65
+ category: obom-runtime
66
+ condition: |
67
+ components[
68
+ $prop($, 'cdx:osquery:category') = 'authorized_keys_snapshot'
69
+ and name = 'root'
70
+ and $hasProp($, 'options')
71
+ and $safeStr($prop($, 'options')) = ''
72
+ ]
73
+ location: |
74
+ {
75
+ "bomRef": $."bom-ref",
76
+ "purl": purl
77
+ }
78
+ message: "Root authorized_keys entry in '{{ $prop($, 'key_file') }}' lacks restrictive key options"
79
+ mitigation: "Apply restrictive key options (from=, command=, no-agent-forwarding, no-port-forwarding) and rotate unmanaged keys."
80
+ evidence: |
81
+ {
82
+ "account": name,
83
+ "algorithm": version,
84
+ "keyFile": $prop($, 'key_file'),
85
+ "options": $prop($, 'options')
86
+ }
87
+
88
+ - id: OBOM-WIN-001
89
+ name: "Windows drive without BitLocker protection"
90
+ description: "Drives with disabled BitLocker protection can violate endpoint encryption requirements and increase data exposure risk."
91
+ severity: high
92
+ category: obom-runtime
93
+ condition: |
94
+ components[
95
+ $prop($, 'cdx:osquery:category') = 'windows_bitlocker_info'
96
+ and $safeStr($prop($, 'protection_status')) != '1'
97
+ ]
98
+ location: |
99
+ {
100
+ "bomRef": $."bom-ref",
101
+ "purl": purl
102
+ }
103
+ message: "BitLocker protection is not enabled for drive '{{ version }}' (device '{{ name }}')"
104
+ mitigation: "Enable BitLocker with approved encryption policy and escrow recovery keys in managed KMS/AD."
105
+ evidence: |
106
+ {
107
+ "deviceId": name,
108
+ "driveLetter": version,
109
+ "protectionStatus": $prop($, 'protection_status'),
110
+ "encryptionMethod": $prop($, 'encryption_method'),
111
+ "percentageEncrypted": $prop($, 'percentage_encrypted')
112
+ }
113
+
114
+ - id: OBOM-WIN-002
115
+ name: "Windows Security Center unhealthy state"
116
+ description: "Poor Security Center health indicates one or more key endpoint protections are disabled or degraded."
117
+ severity: high
118
+ category: obom-runtime
119
+ condition: |
120
+ components[
121
+ $prop($, 'cdx:osquery:category') = 'windows_security_center'
122
+ and (
123
+ name = 'Poor'
124
+ or version = 'Poor'
125
+ or description = 'Poor'
126
+ or $prop($, 'internet_settings') = 'Poor'
127
+ or $prop($, 'windows_security_center_service') = 'Poor'
128
+ or $prop($, 'user_account_control') = 'Poor'
129
+ )
130
+ ]
131
+ location: |
132
+ {
133
+ "bomRef": $."bom-ref",
134
+ "purl": purl
135
+ }
136
+ message: "Windows Security Center reports degraded protection posture (antivirus={{ name }}, firewall={{ version }}, autoupdate={{ description }})"
137
+ mitigation: "Restore endpoint protection controls and enforce policy baselines for AV, firewall, updates, and UAC."
138
+ evidence: |
139
+ {
140
+ "antivirus": name,
141
+ "firewall": version,
142
+ "autoupdate": description,
143
+ "internetSettings": $prop($, 'internet_settings'),
144
+ "securityCenterService": $prop($, 'windows_security_center_service'),
145
+ "uac": $prop($, 'user_account_control')
146
+ }
147
+
148
+ - id: OBOM-WIN-003
149
+ name: "Windows Run key references temporary/script execution path"
150
+ description: "Run/RunOnce entries launching from temp or encoded script commands are common persistence techniques."
151
+ severity: critical
152
+ category: obom-runtime
153
+ condition: |
154
+ components[
155
+ $prop($, 'cdx:osquery:category') = 'windows_run_keys'
156
+ and (
157
+ $contains($lowercase($safeStr(description)), '\\appdata\\local\\temp\\')
158
+ or $contains($lowercase($safeStr(description)), '\\temp\\')
159
+ or $contains($lowercase($safeStr(description)), '-enc ')
160
+ )
161
+ ]
162
+ location: |
163
+ {
164
+ "bomRef": $."bom-ref",
165
+ "purl": purl
166
+ }
167
+ message: "Run key '{{ name }}' launches potentially suspicious command/path: {{ description }}"
168
+ mitigation: "Validate publisher and hash of the referenced executable/script, remove unauthorized entries, and investigate parent change events."
169
+ evidence: |
170
+ {
171
+ "registryPath": name,
172
+ "command": description,
173
+ "registryKey": $prop($, 'key'),
174
+ "mtime": version
175
+ }
176
+
177
+ - id: OBOM-MAC-001
178
+ name: "macOS firewall disabled or stealth mode off"
179
+ description: "ALF misconfiguration can expose endpoints to unsolicited inbound traffic and weakens host hardening baselines."
180
+ severity: high
181
+ category: obom-runtime
182
+ condition: |
183
+ components[
184
+ $prop($, 'cdx:osquery:category') = 'alf'
185
+ and (
186
+ $safeStr(version) = '0'
187
+ or $safeStr($prop($, 'stealth_enabled')) = '0'
188
+ )
189
+ ]
190
+ location: |
191
+ {
192
+ "bomRef": $."bom-ref",
193
+ "purl": purl
194
+ }
195
+ message: "macOS ALF posture is weak (global_state={{ version }}, stealth_enabled={{ $prop($, 'stealth_enabled') }})"
196
+ mitigation: "Enable ALF and stealth mode via managed profile or MDM baseline."
197
+ evidence: |
198
+ {
199
+ "globalState": version,
200
+ "stealthEnabled": $prop($, 'stealth_enabled'),
201
+ "allowSignedEnabled": $prop($, 'allow_signed_enabled'),
202
+ "loggingEnabled": $prop($, 'logging_enabled')
203
+ }
204
+
205
+ - id: OBOM-MAC-002
206
+ name: "macOS launchd item from user-writable temporary path"
207
+ description: "Launchd agents/daemons sourced from temporary paths are a strong persistence and execution abuse signal."
208
+ severity: critical
209
+ category: obom-runtime
210
+ condition: |
211
+ components[
212
+ $prop($, 'cdx:osquery:category') = 'launchd_services'
213
+ and (
214
+ $contains($nullSafeProp($, 'path'), '/tmp/')
215
+ or $contains($nullSafeProp($, 'path'), '/var/tmp/')
216
+ or $contains($nullSafeProp($, 'program'), '/tmp/')
217
+ or $contains($nullSafeProp($, 'program'), '/var/tmp/')
218
+ )
219
+ and (
220
+ $safeStr($prop($, 'run_at_load')) = 'true'
221
+ or $safeStr($prop($, 'run_at_load')) = '1'
222
+ or $safeStr($prop($, 'keep_alive')) = 'true'
223
+ or $safeStr($prop($, 'keep_alive')) = '1'
224
+ )
225
+ ]
226
+ location: |
227
+ {
228
+ "bomRef": $."bom-ref",
229
+ "purl": purl
230
+ }
231
+ message: "Launchd entry '{{ name }}' executes from temporary path and is configured for persistence"
232
+ mitigation: "Remove unauthorized plist entries, relocate approved binaries to trusted paths, and enforce signed launchd payloads."
233
+ evidence: |
234
+ {
235
+ "label": $prop($, 'label'),
236
+ "plistPath": $prop($, 'path'),
237
+ "program": $prop($, 'program'),
238
+ "runAtLoad": $prop($, 'run_at_load'),
239
+ "keepAlive": $prop($, 'keep_alive')
240
+ }
241
+
242
+ - id: OBOM-MAC-003
243
+ name: "macOS firewall exception for binary in untrusted user path"
244
+ description: "ALF exceptions for binaries in user Downloads/Desktop/tmp increase risk of untrusted inbound network exposure."
245
+ severity: medium
246
+ category: obom-runtime
247
+ condition: |
248
+ components[
249
+ $prop($, 'cdx:osquery:category') = 'alf_exceptions'
250
+ and (
251
+ $contains($safeStr(name), '/Users/')
252
+ and (
253
+ $contains($safeStr(name), '/Downloads/')
254
+ or $contains($safeStr(name), '/Desktop/')
255
+ or $contains($safeStr(name), '/tmp/')
256
+ )
257
+ )
258
+ ]
259
+ location: |
260
+ {
261
+ "bomRef": $."bom-ref",
262
+ "purl": purl
263
+ }
264
+ message: "ALF exception allows inbound access for risky path '{{ name }}'"
265
+ mitigation: "Restrict exceptions to signed, managed applications in trusted system paths."
266
+ evidence: |
267
+ {
268
+ "path": name,
269
+ "state": version
270
+ }
271
+
272
+ - id: OBOM-LNX-004
273
+ name: "Linux shell history contains suspicious download-execute pattern"
274
+ description: "Shell history with direct download-and-execute commands may indicate malware staging or hands-on-keyboard activity."
275
+ severity: high
276
+ category: obom-runtime
277
+ condition: |
278
+ components[
279
+ $prop($, 'cdx:osquery:category') = 'shell_history_snapshot'
280
+ and (
281
+ ($contains($lowercase(description), 'curl ') and $contains($lowercase(description), '| sh'))
282
+ or ($contains($lowercase(description), 'wget ') and $contains($lowercase(description), '| bash'))
283
+ or $contains($lowercase(description), 'base64 -d')
284
+ or $contains($lowercase(description), 'nc -e ')
285
+ )
286
+ ]
287
+ location: |
288
+ {
289
+ "bomRef": $."bom-ref",
290
+ "purl": purl
291
+ }
292
+ message: "Suspicious shell history entry for user '{{ name }}': {{ description }}"
293
+ mitigation: "Correlate with process/network telemetry, validate command intent, and isolate host if command lineage is untrusted."
294
+ evidence: |
295
+ {
296
+ "account": name,
297
+ "command": description,
298
+ "historyFile": $prop($, 'history_file'),
299
+ "timestamp": $prop($, 'time')
300
+ }
301
+
302
+ - id: OBOM-LNX-005
303
+ name: "Docker API exposed over unauthenticated TCP port"
304
+ description: "Dockerd listening on TCP 2375 enables remote daemon control if not protected by network controls and TLS."
305
+ severity: critical
306
+ category: obom-runtime
307
+ condition: |
308
+ components[
309
+ $prop($, 'cdx:osquery:category') = 'listening_ports'
310
+ and $safeStr($prop($, 'port')) = '2375'
311
+ and (
312
+ $safeStr($prop($, 'address')) = '0.0.0.0'
313
+ or $safeStr($prop($, 'address')) = '::'
314
+ )
315
+ ]
316
+ location: |
317
+ {
318
+ "bomRef": $."bom-ref",
319
+ "purl": purl
320
+ }
321
+ message: "Potentially insecure Docker API exposure detected on {{ $prop($, 'address') }}:{{ $prop($, 'port') }} for process '{{ name }}'"
322
+ mitigation: "Disable insecure TCP listener, enforce TLS/mTLS, and restrict daemon access to trusted local interfaces."
323
+ evidence: |
324
+ {
325
+ "process": name,
326
+ "pid": $prop($, 'pid'),
327
+ "address": $prop($, 'address'),
328
+ "port": $prop($, 'port'),
329
+ "protocol": $prop($, 'protocol')
330
+ }
331
+
332
+ - id: OBOM-LNX-006
333
+ name: "Privileged Linux listener exposed on a non-local interface"
334
+ description: "Root or service-account listeners bound to all interfaces expand attack surface and deserve proactive review."
335
+ severity: high
336
+ category: obom-runtime
337
+ condition: |
338
+ components[
339
+ $prop($, 'cdx:osquery:category') = 'privileged_listening_ports'
340
+ and (
341
+ $safeStr($prop($, 'address')) = '0.0.0.0'
342
+ or $safeStr($prop($, 'address')) = '::'
343
+ )
344
+ and $safeStr($prop($, 'port')) != '22'
345
+ and $safeStr($prop($, 'port')) != '53'
346
+ and $safeStr(name) != 'systemd-resolved'
347
+ and $safeStr(name) != 'avahi-daemon'
348
+ and $safeStr(name) != 'cupsd'
349
+ ]
350
+ location: |
351
+ {
352
+ "bomRef": $."bom-ref",
353
+ "purl": purl
354
+ }
355
+ message: "Privileged listener '{{ name }}' is reachable on {{ $prop($, 'address') }}:{{ $prop($, 'port') }}"
356
+ mitigation: "Restrict privileged services to local interfaces where possible, front them with authenticated proxies, and validate exposure against approved admin-surface inventory."
357
+ evidence: |
358
+ {
359
+ "account": $prop($, 'account'),
360
+ "pid": $prop($, 'pid'),
361
+ "address": $prop($, 'address'),
362
+ "port": $prop($, 'port'),
363
+ "path": $prop($, 'path'),
364
+ "serviceUnit": $prop($, 'service_unit'),
365
+ "packageSourceHint": $prop($, 'package_source_hint'),
366
+ "parentCmdline": $prop($, 'parent_cmdline')
367
+ }
368
+
369
+ - id: OBOM-LNX-007
370
+ name: "Administrative Linux surface running with elevated privileges"
371
+ description: "Cockpit, PackageKit, pkexec, and related admin surfaces running with elevated privileges should be continuously monitored for exposure and drift."
372
+ severity: high
373
+ category: obom-runtime
374
+ condition: |
375
+ components[
376
+ (
377
+ $prop($, 'cdx:osquery:category') = 'elevated_processes'
378
+ or $prop($, 'cdx:osquery:category') = 'privileged_listening_ports'
379
+ or $prop($, 'cdx:osquery:category') = 'sudo_executions'
380
+ or $prop($, 'cdx:osquery:category') = 'privilege_transitions'
381
+ )
382
+ and (
383
+ $contains($lowercase($safeStr(name)), 'cockpit')
384
+ or $contains($lowercase($nullSafeProp($, 'path')), 'cockpit')
385
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'cockpit')
386
+ or $contains($lowercase($safeStr(name)), 'packagekit')
387
+ or $contains($lowercase($nullSafeProp($, 'path')), 'packagekit')
388
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'packagekit')
389
+ or $contains($lowercase($safeStr(name)), 'pkexec')
390
+ or $contains($lowercase($nullSafeProp($, 'path')), 'pkexec')
391
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'pkexec')
392
+ or $contains($lowercase($safeStr(name)), 'pkcon')
393
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'pkcon')
394
+ )
395
+ and (
396
+ $safeStr($prop($, 'uid')) = '0'
397
+ or $safeStr($prop($, 'euid')) = '0'
398
+ or $safeStr($prop($, 'account')) = 'root'
399
+ or $safeStr($prop($, 'effective_user')) = 'root'
400
+ )
401
+ ]
402
+ location: |
403
+ {
404
+ "bomRef": $."bom-ref",
405
+ "purl": purl
406
+ }
407
+ message: "Administrative surface '{{ name }}' is active with elevated privileges and should be reviewed for exposure"
408
+ mitigation: "Review network reachability, patch cadence, and whether the administrative package is still needed on this host."
409
+ evidence: |
410
+ {
411
+ "category": $prop($, 'cdx:osquery:category'),
412
+ "path": $prop($, 'path'),
413
+ "cmdline": $prop($, 'cmdline'),
414
+ "account": $prop($, 'account'),
415
+ "effectiveUser": $prop($, 'effective_user'),
416
+ "serviceUnit": $prop($, 'service_unit'),
417
+ "address": $prop($, 'address'),
418
+ "port": $prop($, 'port'),
419
+ "packageSourceHint": $prop($, 'package_source_hint')
420
+ }
421
+
422
+ - id: OBOM-LNX-008
423
+ name: "Interactive sudo chain touched sensitive administrative binary"
424
+ description: "Interactive sudo or pkexec invocations against package-management and admin-control binaries can indicate privileged changes worth auditing."
425
+ severity: high
426
+ category: obom-runtime
427
+ condition: |
428
+ components[
429
+ $prop($, 'cdx:osquery:category') = 'sudo_executions'
430
+ and $safeStr($prop($, 'auid')) != ''
431
+ and $safeStr($prop($, 'auid')) != '0'
432
+ and (
433
+ $safeStr($prop($, 'euid')) = '0'
434
+ or $safeStr($prop($, 'effective_user')) = 'root'
435
+ )
436
+ and (
437
+ $contains($lowercase($nullSafeProp($, 'path')), 'pkexec')
438
+ or $contains($lowercase($nullSafeProp($, 'path')), 'pkcon')
439
+ or $contains($lowercase($nullSafeProp($, 'path')), 'packagekit')
440
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'pkexec')
441
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'pkcon')
442
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'packagekit')
443
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'cockpit')
444
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'systemctl')
445
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'service ')
446
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), ' apt ')
447
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), ' apt-get ')
448
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), ' dnf ')
449
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), ' yum ')
450
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), ' zypper ')
451
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), ' rpm ')
452
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), ' dpkg ')
453
+ )
454
+ ]
455
+ location: |
456
+ {
457
+ "bomRef": $."bom-ref",
458
+ "purl": purl
459
+ }
460
+ message: "Interactive privileged execution by '{{ $prop($, 'login_user') }}' touched sensitive administrative command '{{ $prop($, 'path') }}'"
461
+ mitigation: "Review whether the command was expected, tie it to change records, and investigate unexpected package-management or control-plane activity."
462
+ evidence: |
463
+ {
464
+ "loginUser": $prop($, 'login_user'),
465
+ "effectiveUser": $prop($, 'effective_user'),
466
+ "path": $prop($, 'path'),
467
+ "cmdline": $prop($, 'cmdline'),
468
+ "parentCmdline": $prop($, 'parent_cmdline'),
469
+ "serviceUnit": $prop($, 'service_unit'),
470
+ "packageSourceHint": $prop($, 'package_source_hint'),
471
+ "timestamp": $prop($, 'time')
472
+ }
473
+
474
+ - id: OBOM-LNX-009
475
+ name: "Unexpected Linux privilege transition for non-allowlisted executable"
476
+ description: "Setuid/setgid transitions outside a small baseline of expected tools can indicate risky privilege-bound packages or exploit activity."
477
+ severity: high
478
+ category: obom-runtime
479
+ condition: |
480
+ components[
481
+ $prop($, 'cdx:osquery:category') = 'privilege_transitions'
482
+ and $safeStr($prop($, 'auid')) != ''
483
+ and $safeStr($prop($, 'auid')) != '0'
484
+ and (
485
+ $safeStr($prop($, 'euid')) = '0'
486
+ or $safeStr($prop($, 'egid')) = '0'
487
+ )
488
+ and $safeStr($prop($, 'path')) != '/usr/bin/sudo'
489
+ and $safeStr($prop($, 'path')) != '/bin/su'
490
+ and $safeStr($prop($, 'path')) != '/usr/bin/su'
491
+ and $safeStr($prop($, 'path')) != '/usr/bin/doas'
492
+ and $safeStr($prop($, 'path')) != '/usr/bin/passwd'
493
+ and $safeStr($prop($, 'path')) != '/usr/bin/chsh'
494
+ and $safeStr($prop($, 'path')) != '/usr/bin/chfn'
495
+ and $safeStr($prop($, 'path')) != '/usr/bin/gpasswd'
496
+ and $safeStr($prop($, 'path')) != '/usr/bin/newgrp'
497
+ and $safeStr($prop($, 'path')) != '/usr/bin/mount'
498
+ and $safeStr($prop($, 'path')) != '/usr/bin/umount'
499
+ ]
500
+ location: |
501
+ {
502
+ "bomRef": $."bom-ref",
503
+ "purl": purl
504
+ }
505
+ message: "Unexpected privilege transition detected for '{{ $prop($, 'path') }}' (auid={{ $prop($, 'auid') }}, euid={{ $prop($, 'euid') }})"
506
+ mitigation: "Validate binary provenance, file permissions, and recent package changes; treat unfamiliar setuid/setgid paths as high-priority review items."
507
+ evidence: |
508
+ {
509
+ "loginUser": $prop($, 'login_user'),
510
+ "path": $prop($, 'path'),
511
+ "cmdline": $prop($, 'cmdline'),
512
+ "parentCmdline": $prop($, 'parent_cmdline'),
513
+ "auid": $prop($, 'auid'),
514
+ "uid": $prop($, 'uid'),
515
+ "euid": $prop($, 'euid'),
516
+ "gid": $prop($, 'gid'),
517
+ "egid": $prop($, 'egid'),
518
+ "packageSourceHint": $prop($, 'package_source_hint')
519
+ }
520
+
521
+ - id: OBOM-LNX-010
522
+ name: "Elevated Linux process launched from user-writable or unusual path"
523
+ description: "Root processes executing from user-controlled or non-standard paths are a strong signal for persistence or package drift."
524
+ severity: critical
525
+ category: obom-runtime
526
+ condition: |
527
+ components[
528
+ $prop($, 'cdx:osquery:category') = 'elevated_processes'
529
+ and $safeStr($prop($, 'uid')) = '0'
530
+ and (
531
+ $contains($nullSafeProp($, 'path'), '/tmp/')
532
+ or $contains($nullSafeProp($, 'path'), '/var/tmp/')
533
+ or $contains($nullSafeProp($, 'path'), '/dev/shm/')
534
+ or $contains($nullSafeProp($, 'path'), '/home/')
535
+ or $contains($nullSafeProp($, 'path'), '/run/user/')
536
+ or $safeStr($prop($, 'package_source_hint')) = 'user-writable-path'
537
+ or $safeStr($prop($, 'package_source_hint')) = 'unclassified-path'
538
+ )
539
+ and $safeStr(name) != 'systemd'
540
+ and $safeStr(name) != 'init'
541
+ ]
542
+ location: |
543
+ {
544
+ "bomRef": $."bom-ref",
545
+ "purl": purl
546
+ }
547
+ message: "Elevated process '{{ name }}' executes from a risky path: {{ $prop($, 'path') }}"
548
+ mitigation: "Move approved binaries into trusted system locations, validate package ownership, and investigate any root process sourced from writable directories."
549
+ evidence: |
550
+ {
551
+ "account": $prop($, 'account'),
552
+ "path": $prop($, 'path'),
553
+ "serviceUnit": $prop($, 'service_unit'),
554
+ "parentPath": $prop($, 'parent_path'),
555
+ "parentCmdline": $prop($, 'parent_cmdline'),
556
+ "startTime": $prop($, 'start_time'),
557
+ "packageSourceHint": $prop($, 'package_source_hint')
558
+ }
559
+
560
+ - id: OBOM-LNX-011
561
+ name: "Interactive shell parent spawned privileged Linux execution"
562
+ description: "Shell-driven privileged chains are useful for separating admin changes from long-running service behavior."
563
+ severity: medium
564
+ category: obom-runtime
565
+ condition: |
566
+ components[
567
+ $prop($, 'cdx:osquery:category') = 'sudo_executions'
568
+ and $safeStr($prop($, 'auid')) != ''
569
+ and $safeStr($prop($, 'auid')) != '0'
570
+ and (
571
+ $safeStr($prop($, 'euid')) = '0'
572
+ or $safeStr($prop($, 'effective_user')) = 'root'
573
+ )
574
+ and (
575
+ $safeStr($prop($, 'parent_name')) = 'bash'
576
+ or $safeStr($prop($, 'parent_name')) = 'sh'
577
+ or $safeStr($prop($, 'parent_name')) = 'zsh'
578
+ or $safeStr($prop($, 'parent_name')) = 'dash'
579
+ or $safeStr($prop($, 'parent_name')) = 'fish'
580
+ or $contains($lowercase($nullSafeProp($, 'parent_cmdline')), 'bash')
581
+ or $contains($lowercase($nullSafeProp($, 'parent_cmdline')), 'zsh')
582
+ or $contains($lowercase($nullSafeProp($, 'parent_cmdline')), 'fish')
583
+ )
584
+ ]
585
+ location: |
586
+ {
587
+ "bomRef": $."bom-ref",
588
+ "purl": purl
589
+ }
590
+ message: "Interactive shell lineage for privileged command '{{ $prop($, 'cmdline') }}' merits change-review validation"
591
+ mitigation: "Correlate the privileged command with shell history, tickets, and package changes to confirm it was expected."
592
+ evidence: |
593
+ {
594
+ "loginUser": $prop($, 'login_user'),
595
+ "parentName": $prop($, 'parent_name'),
596
+ "parentCmdline": $prop($, 'parent_cmdline'),
597
+ "path": $prop($, 'path'),
598
+ "cmdline": $prop($, 'cmdline'),
599
+ "timestamp": $prop($, 'time')
600
+ }
601
+
602
+ - id: OBOM-WIN-004
603
+ name: "Hidden scheduled task uses suspicious execution path"
604
+ description: "Enabled hidden tasks executing from temp paths or encoded script launchers are common persistence tradecraft."
605
+ severity: high
606
+ category: obom-runtime
607
+ condition: |
608
+ components[
609
+ $prop($, 'cdx:osquery:category') = 'scheduled_tasks'
610
+ and $safeStr($prop($, 'enabled')) = '1'
611
+ and $safeStr($prop($, 'hidden')) = '1'
612
+ and (
613
+ $contains($lowercase($nullSafeProp($, 'path')), '\\temp\\')
614
+ or ($contains($lowercase($nullSafeProp($, 'action')), 'powershell') and $contains($lowercase($nullSafeProp($, 'action')), '-enc '))
615
+ )
616
+ ]
617
+ location: |
618
+ {
619
+ "bomRef": $."bom-ref",
620
+ "purl": purl
621
+ }
622
+ message: "Hidden scheduled task '{{ name }}' has suspicious action/path: {{ $prop($, 'action') }}"
623
+ mitigation: "Validate author and binary lineage, disable unauthorized tasks, and investigate task registration event history."
624
+ evidence: |
625
+ {
626
+ "taskName": name,
627
+ "taskPath": $prop($, 'path'),
628
+ "action": $prop($, 'action'),
629
+ "state": $prop($, 'state')
630
+ }
631
+
632
+ - id: OBOM-WIN-005
633
+ name: "Auto-start Windows service points to user-writable path"
634
+ description: "Auto-start services from temp or AppData paths may indicate privilege persistence through service hijacking."
635
+ severity: critical
636
+ category: obom-runtime
637
+ condition: |
638
+ components[
639
+ $prop($, 'cdx:osquery:category') = 'services_snapshot'
640
+ and $safeStr($prop($, 'start_type')) = 'AUTO_START'
641
+ and (
642
+ $contains($lowercase($nullSafeProp($, 'path')), '\\temp\\')
643
+ or $contains($lowercase($nullSafeProp($, 'path')), '\\appdata\\')
644
+ )
645
+ ]
646
+ location: |
647
+ {
648
+ "bomRef": $."bom-ref",
649
+ "purl": purl
650
+ }
651
+ message: "Auto-start service '{{ name }}' launches from a user-writable path: {{ $prop($, 'path') }}"
652
+ mitigation: "Move binaries to protected system paths, lock ACLs, and validate service image hashes/signatures."
653
+ evidence: |
654
+ {
655
+ "serviceName": name,
656
+ "displayName": $prop($, 'display_name'),
657
+ "servicePath": $prop($, 'path'),
658
+ "account": $prop($, 'user_account')
659
+ }
660
+
661
+ - id: OBOM-WIN-006
662
+ name: "Windows persistence surface references LOLBAS execution helper"
663
+ description: "Run keys, startup items, scheduled tasks, or auto-start services that reference LOLBAS execution helpers deserve elevated review because they blend persistence with proxy execution tradecraft."
664
+ severity: high
665
+ category: obom-runtime
666
+ condition: |
667
+ components[
668
+ $prop($, 'cdx:lolbas:matched') = 'true'
669
+ and (
670
+ $prop($, 'cdx:osquery:category') = 'windows_run_keys'
671
+ or $prop($, 'cdx:osquery:category') = 'scheduled_tasks'
672
+ or $prop($, 'cdx:osquery:category') = 'startup_items'
673
+ or $prop($, 'cdx:osquery:category') = 'services_snapshot'
674
+ )
675
+ and (
676
+ $listContains($prop($, 'cdx:lolbas:functions'), 'command')
677
+ or $listContains($prop($, 'cdx:lolbas:functions'), 'script-execution')
678
+ or $listContains($prop($, 'cdx:lolbas:functions'), 'proxy-execution')
679
+ or $listContains($prop($, 'cdx:lolbas:functions'), 'library-load')
680
+ or $listContains($prop($, 'cdx:lolbas:functions'), 'shell')
681
+ )
682
+ ]
683
+ location: |
684
+ {
685
+ "bomRef": $."bom-ref",
686
+ "purl": purl
687
+ }
688
+ message: "Windows persistence surface '{{ name }}' references LOLBAS helper(s) {{ $prop($, 'cdx:lolbas:names') }}"
689
+ mitigation: "Validate the owning change, replace proxy-execution helpers with signed managed binaries where possible, and baseline approved startup surfaces with allowlists."
690
+ attack:
691
+ tactics: [TA0003, TA0005]
692
+ techniques: [T1218, T1547]
693
+ evidence: |
694
+ {
695
+ "queryCategory": $prop($, 'cdx:osquery:category'),
696
+ "lolbasNames": $prop($, 'cdx:lolbas:names'),
697
+ "functions": $prop($, 'cdx:lolbas:functions'),
698
+ "matchFields": $prop($, 'cdx:lolbas:matchFields'),
699
+ "path": $prop($, 'path'),
700
+ "action": $prop($, 'action'),
701
+ "command": description
702
+ }
703
+
704
+ - id: OBOM-WIN-007
705
+ name: "Windows WMI or AppCompat persistence uses LOLBAS"
706
+ description: "WMI command consumers and AppCompat shims that invoke LOLBAS utilities are high-signal persistence and defense-evasion indicators."
707
+ severity: critical
708
+ category: obom-runtime
709
+ condition: |
710
+ components[
711
+ $prop($, 'cdx:lolbas:matched') = 'true'
712
+ and (
713
+ $prop($, 'cdx:osquery:category') = 'appcompat_shims'
714
+ or $prop($, 'cdx:osquery:category') = 'wmi_cli_event_consumers'
715
+ or $prop($, 'cdx:osquery:category') = 'wmi_cli_event_consumers_snapshot'
716
+ )
717
+ ]
718
+ location: |
719
+ {
720
+ "bomRef": $."bom-ref",
721
+ "purl": purl
722
+ }
723
+ message: "WMI/AppCompat persistence artifact '{{ name }}' references LOLBAS helper(s) {{ $prop($, 'cdx:lolbas:names') }}"
724
+ mitigation: "Treat as a persistence investigation, review WMI repository and shim databases, and remove unauthorized subscriptions or shim registrations."
725
+ attack:
726
+ tactics: [TA0003, TA0005]
727
+ techniques: [T1218, T1546]
728
+ evidence: |
729
+ {
730
+ "queryCategory": $prop($, 'cdx:osquery:category'),
731
+ "lolbasNames": $prop($, 'cdx:lolbas:names'),
732
+ "functions": $prop($, 'cdx:lolbas:functions'),
733
+ "matchFields": $prop($, 'cdx:lolbas:matchFields'),
734
+ "path": $prop($, 'path'),
735
+ "executable": $prop($, 'executable'),
736
+ "commandLine": $prop($, 'command_line'),
737
+ "commandTemplate": $prop($, 'command_line_template')
738
+ }
739
+
740
+ - id: OBOM-WIN-008
741
+ name: "Windows startup or process activity uses network-capable LOLBAS"
742
+ description: "Network-capable LOLBAS helpers such as PowerShell, Certutil, Bitsadmin, or WMIC become higher priority when they appear in persistence surfaces or suspicious live process command lines."
743
+ severity: high
744
+ category: obom-runtime
745
+ condition: |
746
+ components[
747
+ $prop($, 'cdx:lolbas:matched') = 'true'
748
+ and (
749
+ $listContains($prop($, 'cdx:lolbas:functions'), 'download')
750
+ or $listContains($prop($, 'cdx:lolbas:functions'), 'upload')
751
+ )
752
+ and (
753
+ $prop($, 'cdx:osquery:category') = 'windows_run_keys'
754
+ or $prop($, 'cdx:osquery:category') = 'scheduled_tasks'
755
+ or $prop($, 'cdx:osquery:category') = 'startup_items'
756
+ or (
757
+ $prop($, 'cdx:osquery:category') = 'processes'
758
+ and (
759
+ $contains($lowercase($nullSafeProp($, 'cmdline')), 'http://')
760
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), 'https://')
761
+ or $contains($lowercase($nullSafeProp($, 'cmdline')), '-enc ')
762
+ )
763
+ )
764
+ )
765
+ ]
766
+ location: |
767
+ {
768
+ "bomRef": $."bom-ref",
769
+ "purl": purl
770
+ }
771
+ message: "Network-capable LOLBAS helper(s) {{ $prop($, 'cdx:lolbas:names') }} detected in '{{ $prop($, 'cdx:osquery:category') }}'"
772
+ mitigation: "Correlate with outbound connections and downloads, restrict unmanaged scripting/network utilities, and investigate encoded or remote-fetch command lines."
773
+ attack:
774
+ tactics: [TA0002, TA0011]
775
+ techniques: [T1041, T1059.001, T1105]
776
+ evidence: |
777
+ {
778
+ "queryCategory": $prop($, 'cdx:osquery:category'),
779
+ "lolbasNames": $prop($, 'cdx:lolbas:names'),
780
+ "functions": $prop($, 'cdx:lolbas:functions'),
781
+ "command": description,
782
+ "cmdline": $prop($, 'cmdline'),
783
+ "action": $prop($, 'action')
784
+ }
785
+
786
+ - id: OBOM-WIN-009
787
+ name: "Network-facing Windows listener is a LOLBAS execution helper"
788
+ description: "A listening process backed by a LOLBAS execution helper is a strong remote-control or staging indicator on Windows endpoints."
789
+ severity: critical
790
+ category: obom-runtime
791
+ condition: |
792
+ components[
793
+ $prop($, 'cdx:osquery:category') = 'listening_ports'
794
+ and $prop($, 'cdx:lolbas:matched') = 'true'
795
+ and (
796
+ $safeStr($prop($, 'address')) = '0.0.0.0'
797
+ or $safeStr($prop($, 'address')) = '::'
798
+ )
799
+ and (
800
+ $listContains($prop($, 'cdx:lolbas:functions'), 'command')
801
+ or $listContains($prop($, 'cdx:lolbas:functions'), 'script-execution')
802
+ or $listContains($prop($, 'cdx:lolbas:functions'), 'shell')
803
+ )
804
+ ]
805
+ location: |
806
+ {
807
+ "bomRef": $."bom-ref",
808
+ "purl": purl
809
+ }
810
+ message: "Listening process '{{ name }}' on {{ $prop($, 'address') }}:{{ $prop($, 'port') }} matches LOLBAS helper(s) {{ $prop($, 'cdx:lolbas:names') }}"
811
+ mitigation: "Review parent process lineage, isolate unmanaged listeners, and block or remove unexpected inbound admin or scripting surfaces."
812
+ attack:
813
+ tactics: [TA0008, TA0011]
814
+ techniques: [T1059, T1105, T1218]
815
+ evidence: |
816
+ {
817
+ "lolbasNames": $prop($, 'cdx:lolbas:names'),
818
+ "functions": $prop($, 'cdx:lolbas:functions'),
819
+ "path": $prop($, 'path'),
820
+ "cmdline": $prop($, 'cmdline'),
821
+ "address": $prop($, 'address'),
822
+ "port": $prop($, 'port')
823
+ }
824
+
825
+ - id: OBOM-WIN-010
826
+ name: "Windows persistence artifact uses LOLBAS with UAC-bypass context"
827
+ description: "Persistence surfaces that reference LOLBAS helpers documented with UAC-bypass behavior should be treated as privilege-escalation investigations."
828
+ severity: critical
829
+ category: obom-runtime
830
+ condition: |
831
+ components[
832
+ $prop($, 'cdx:lolbas:matched') = 'true'
833
+ and $listContains($prop($, 'cdx:lolbas:contexts'), 'uac-bypass')
834
+ and (
835
+ $prop($, 'cdx:osquery:category') = 'windows_run_keys'
836
+ or $prop($, 'cdx:osquery:category') = 'scheduled_tasks'
837
+ or $prop($, 'cdx:osquery:category') = 'startup_items'
838
+ or $prop($, 'cdx:osquery:category') = 'wmi_cli_event_consumers'
839
+ or $prop($, 'cdx:osquery:category') = 'wmi_cli_event_consumers_snapshot'
840
+ )
841
+ ]
842
+ location: |
843
+ {
844
+ "bomRef": $."bom-ref",
845
+ "purl": purl
846
+ }
847
+ message: "UAC-bypass-capable LOLBAS helper(s) {{ $prop($, 'cdx:lolbas:names') }} detected in Windows persistence artifact '{{ name }}'"
848
+ mitigation: "Investigate as a possible privilege-escalation foothold, remove unauthorized registration points, and enforce WDAC/AppLocker policies for known proxy binaries."
849
+ attack:
850
+ tactics: [TA0003, TA0004, TA0005]
851
+ techniques: [T1548.002, T1218]
852
+ evidence: |
853
+ {
854
+ "queryCategory": $prop($, 'cdx:osquery:category'),
855
+ "lolbasNames": $prop($, 'cdx:lolbas:names'),
856
+ "contexts": $prop($, 'cdx:lolbas:contexts'),
857
+ "path": $prop($, 'path'),
858
+ "action": $prop($, 'action'),
859
+ "command": description
860
+ }
861
+
862
+ - id: OBOM-MAC-004
863
+ name: "macOS launchd override disables Apple-managed service"
864
+ description: "Launchd overrides disabling Apple-managed services can indicate tampering with built-in security or platform controls."
865
+ severity: medium
866
+ category: obom-runtime
867
+ condition: |
868
+ components[
869
+ $prop($, 'cdx:osquery:category') = 'launchd_overrides'
870
+ and $safeStr($prop($, 'key')) = 'Disabled'
871
+ and (
872
+ $safeStr($prop($, 'value')) = '1'
873
+ or $lowercase($safeStr($prop($, 'value'))) = 'true'
874
+ )
875
+ and $startsWith($safeStr($prop($, 'label')), 'com.apple.')
876
+ ]
877
+ location: |
878
+ {
879
+ "bomRef": $."bom-ref",
880
+ "purl": purl
881
+ }
882
+ message: "Launchd override disables Apple-managed label '{{ $prop($, 'label') }}'"
883
+ mitigation: "Review override provenance, restore approved launchd settings, and investigate unauthorized local configuration changes."
884
+ evidence: |
885
+ {
886
+ "label": $prop($, 'label'),
887
+ "key": $prop($, 'key'),
888
+ "value": $prop($, 'value'),
889
+ "uid": $prop($, 'uid'),
890
+ "plistPath": $prop($, 'path')
891
+ }