0sec-cli 0.15.0 → 0.18.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.
- package/0sec.js +327 -0
- package/README.md +68 -48
- package/attacks/data-exfiltration/pii-leakage.yaml +27 -0
- package/attacks/encoding-bypass/base64-encoding.yaml +24 -0
- package/attacks/jailbreak/dan-roleplay.yaml +27 -0
- package/attacks/jailbreak/hypothetical-scenario.yaml +25 -0
- package/attacks/jailbreak/multilingual-bypass.yaml +22 -0
- package/attacks/output-manipulation/harmful-content.yaml +25 -0
- package/attacks/prompt-injection/context-manipulation.yaml +32 -0
- package/attacks/prompt-injection/direct-injection.yaml +28 -0
- package/attacks/prompt-injection/indirect-injection.yaml +33 -0
- package/attacks/system-prompt-extraction/direct-ask.yaml +30 -0
- package/attacks/system-prompt-extraction/markdown-exfil.yaml +26 -0
- package/attacks/tool-misuse/ssrf-via-tools.yaml +27 -0
- package/chunks/adapt-loop-SMH6V4PD.js +18 -0
- package/chunks/adgraph-JLGA6RYI.js +54 -0
- package/chunks/agent/skills/frameworks/entra-id.yaml +63 -0
- package/chunks/agent/skills/frameworks/graphql-introspection.yaml +116 -0
- package/chunks/agent/skills/frameworks/nextjs.yaml +82 -0
- package/chunks/agent/skills/frameworks/python-web.yaml +85 -0
- package/chunks/agent/skills/frameworks/supabase.yaml +83 -0
- package/chunks/agent/skills/frameworks/wordpress-deep.yaml +122 -0
- package/chunks/agent/skills/techniques/ad-attack-paths.yaml +57 -0
- package/chunks/agent/skills/techniques/advisory-disclosure.yaml +59 -0
- package/chunks/agent/skills/techniques/assumption-mining.yaml +53 -0
- package/chunks/agent/skills/techniques/blind-exploitation.yaml +143 -0
- package/chunks/agent/skills/techniques/crypto-misuse.yaml +88 -0
- package/chunks/agent/skills/techniques/cve-poc-adaptation.yaml +82 -0
- package/chunks/agent/skills/techniques/entra-attack-paths.yaml +55 -0
- package/chunks/agent/skills/techniques/http-conformance-diff.yaml +48 -0
- package/chunks/agent/skills/techniques/jwt-attacks.yaml +137 -0
- package/chunks/agent/skills/techniques/kernel-weaponization.yaml +53 -0
- package/chunks/agent/skills/techniques/llm-excessive-agency.yaml +55 -0
- package/chunks/agent/skills/techniques/llm-insecure-output-handling.yaml +56 -0
- package/chunks/agent/skills/techniques/llm-prompt-injection.yaml +54 -0
- package/chunks/agent/skills/techniques/llm-prompt-layer-write.yaml +68 -0
- package/chunks/agent/skills/techniques/llm-rag-poisoning.yaml +57 -0
- package/chunks/agent/skills/techniques/llm-safety-eval.yaml +51 -0
- package/chunks/agent/skills/techniques/npm-ecosystem.yaml +51 -0
- package/chunks/agent/skills/techniques/poc-verification.yaml +55 -0
- package/chunks/agent/skills/techniques/race-condition.yaml +122 -0
- package/chunks/agent/skills/techniques/scoped-fix.yaml +49 -0
- package/chunks/agent/skills/techniques/seedless-depth-review.yaml +59 -0
- package/chunks/agent/skills/techniques/spec-differential.yaml +48 -0
- package/chunks/agent/skills/techniques/variant-hunting.yaml +55 -0
- package/chunks/agent/skills/vulnerabilities/cardano-eutxo-validators.yaml +72 -0
- package/chunks/agent/skills/vulnerabilities/command-injection.yaml +99 -0
- package/chunks/agent/skills/vulnerabilities/deserialization-chains.yaml +106 -0
- package/chunks/agent/skills/vulnerabilities/native-memory-safety.yaml +93 -0
- package/chunks/agent/skills/vulnerabilities/path-traversal.yaml +78 -0
- package/chunks/agent/skills/vulnerabilities/prototype-pollution.yaml +132 -0
- package/chunks/agent/skills/vulnerabilities/request-smuggling.yaml +129 -0
- package/chunks/agent/skills/vulnerabilities/sqli-advanced.yaml +102 -0
- package/chunks/agent/skills/vulnerabilities/ssrf-bypass.yaml +84 -0
- package/chunks/agent/skills/vulnerabilities/ssti-exploitation.yaml +112 -0
- package/chunks/agent/skills/vulnerabilities/structural-sqli.yaml +91 -0
- package/chunks/appsec-catalog-CBWHGTEL.js +24 -0
- package/chunks/artifact-scraper-HQ7HLP6V.js +34 -0
- package/chunks/assumption-mining-5SNIVVDN.js +79 -0
- package/chunks/chunk-242TMK6G.js +110 -0
- package/chunks/chunk-2JCCA2JL.js +381 -0
- package/chunks/chunk-2RMLOJVB.js +47 -0
- package/chunks/chunk-3KPWWJCI.js +1422 -0
- package/chunks/chunk-3MOLBTLS.js +953 -0
- package/chunks/chunk-53G27VPS.js +136 -0
- package/chunks/chunk-57ZENEX2.js +169 -0
- package/chunks/chunk-5G3ZXFBW.js +182 -0
- package/chunks/chunk-5JI7L7KV.js +74240 -0
- package/chunks/chunk-6L26OBWI.js +1094 -0
- package/chunks/chunk-6LKRLK2R.js +542 -0
- package/chunks/chunk-72CISA2D.js +2597 -0
- package/chunks/chunk-7DQEV5QI.js +287 -0
- package/chunks/chunk-AD7WXDH6.js +3250 -0
- package/chunks/chunk-ADOLI6DT.js +102 -0
- package/chunks/chunk-AHTBZC3E.js +596 -0
- package/chunks/chunk-ASUR522M.js +518 -0
- package/chunks/chunk-ATATQACO.js +471 -0
- package/chunks/chunk-BATRQBOR.js +1732 -0
- package/chunks/chunk-BFR2CDV5.js +5735 -0
- package/chunks/chunk-BFRB6HB2.js +235 -0
- package/chunks/chunk-BKZFDZ23.js +361 -0
- package/chunks/chunk-BVAZO4WA.js +193 -0
- package/chunks/chunk-BZNEY2ZS.js +33225 -0
- package/chunks/chunk-C2WXWFBB.js +1070 -0
- package/chunks/chunk-CMKXP5RR.js +917 -0
- package/chunks/chunk-DW5UWPFY.js +275 -0
- package/chunks/chunk-F3WBKITT.js +687 -0
- package/chunks/chunk-GMT2AZKM.js +2439 -0
- package/chunks/chunk-H2FFLZNK.js +3 -0
- package/chunks/chunk-IOL7D5YV.js +515 -0
- package/chunks/chunk-IR537GON.js +49 -0
- package/chunks/chunk-JQHOLLTD.js +3729 -0
- package/chunks/chunk-KLTNTE2Z.js +121 -0
- package/chunks/chunk-LP3HHYQU.js +245 -0
- package/chunks/chunk-MYVT64FN.js +16 -0
- package/chunks/chunk-N7BOUYEV.js +852 -0
- package/chunks/chunk-OEFNRYI2.js +150 -0
- package/chunks/chunk-P6WKNFWX.js +1968 -0
- package/chunks/chunk-QI233I24.js +333 -0
- package/chunks/chunk-RJWOYEOG.js +271 -0
- package/chunks/chunk-RRMJC3ZE.js +105 -0
- package/chunks/chunk-RWONANDA.js +973 -0
- package/chunks/chunk-SAFFWQW4.js +5921 -0
- package/chunks/chunk-SF4KZ4O3.js +502 -0
- package/chunks/chunk-SVJEDVYK.js +808 -0
- package/chunks/chunk-TSK2AG6J.js +5108 -0
- package/chunks/chunk-U5FLXGHT.js +2010 -0
- package/chunks/chunk-UCYRA73C.js +662 -0
- package/chunks/chunk-UR4ELX2Y.js +4784 -0
- package/chunks/chunk-VQG4FT5D.js +685 -0
- package/chunks/chunk-WEBMRWEG.js +9337 -0
- package/chunks/chunk-WU6AFRAZ.js +1167 -0
- package/chunks/chunk-WVTBZEQO.js +1531 -0
- package/chunks/chunk-WXQ6BJ6A.js +596 -0
- package/chunks/chunk-XM5NLHYU.js +600 -0
- package/chunks/chunk-YLMN3N25.js +4054 -0
- package/chunks/chunk-YYRBQVFE.js +2572 -0
- package/chunks/chunk-Z5FA2XOX.js +2798 -0
- package/chunks/commands-TBC2F5CE.js +16999 -0
- package/chunks/corpus-v1.json +403 -0
- package/chunks/cost-ledger-NU63MYZM.js +13 -0
- package/chunks/data/appsec-archetypes.json +102 -0
- package/chunks/data/chromium-archetypes.json +204 -0
- package/chunks/data/freebsd-archetypes.json +171 -0
- package/chunks/data/kernel-archetypes.json +611 -0
- package/chunks/db-KFWOAUUB.js +16 -0
- package/chunks/disclose-EKTWSCGW.js +132 -0
- package/chunks/dist-4MAW5X6L.js +74 -0
- package/chunks/dist-4YICS2J2.js +2776 -0
- package/chunks/dist-FMGSR3DW.js +159 -0
- package/chunks/eval-runner-7ZF472KV.js +27 -0
- package/chunks/example-manifest.json +95 -0
- package/chunks/exploit-agent-45YQOHPJ.js +98 -0
- package/chunks/exploit-autoclimb-UZGEMGYT.js +81 -0
- package/chunks/exploit-climb-SG23KB2G.js +358 -0
- package/chunks/fix-IG7LYXH3.js +12 -0
- package/chunks/github-issues-MJ6OYOOU.js +157 -0
- package/chunks/harness-7ODOLOWU.js +22 -0
- package/chunks/http-conformance-DU66MZIU.js +11 -0
- package/chunks/http-sender-GWH2IYEA.js +10 -0
- package/chunks/hunt-scan-MMKUOETU.js +38 -0
- package/chunks/identity-6ZAIIWOR.js +191 -0
- package/chunks/kernel-primitive-7U6CWHXD.js +44 -0
- package/chunks/kernel-vm-runner-3JAU4O6J.js +62 -0
- package/chunks/memsafety-scan-J7SECV5W.js +16 -0
- package/chunks/native-loop-RJCJPOUS.js +54 -0
- package/chunks/npm-detectors-KB5Y5ZFX.js +69 -0
- package/chunks/npm-dynamic-discovery-AHROOZDB.js +13 -0
- package/chunks/orchestrate-OC2VZN2X.js +62 -0
- package/chunks/pipeline-BZK5BLJR.js +14 -0
- package/chunks/pre-recon-cve-66EB6G4M.js +351 -0
- package/chunks/prepare-MYY743TK.js +13 -0
- package/chunks/process-LQRCS5OY.js +13 -0
- package/chunks/replay-runner-45G3VU7X.js +39 -0
- package/chunks/run-D56MPDKY.js +32716 -0
- package/chunks/runtime-G7YWIO3B.js +43 -0
- package/chunks/runtime-J7PLXZNM.js +12 -0
- package/chunks/scan-stream-FHI2FYZE.js +96 -0
- package/chunks/scope-BI7BF4ZY.js +18 -0
- package/chunks/session-store-GZ4A4KYT.js +28 -0
- package/chunks/source-files-PWRQR6LY.js +12 -0
- package/chunks/specdrift-WCLH6TTQ.js +19 -0
- package/chunks/variant-candidates-YERCYMPD.js +13 -0
- package/chunks/web-recon-prepass-JJGPEOLE.js +1148 -0
- package/dashboard/assets/0sec-icon-66SreztZ.gif +0 -0
- package/dashboard/assets/bot-yILPnRgD.js +1 -0
- package/dashboard/assets/chevron-down-BeDJ-Vka.js +1 -0
- package/dashboard/assets/circle-alert-BEnMBMT-.js +1 -0
- package/dashboard/assets/client-DRYsuOGl.js +9 -0
- package/dashboard/assets/copy-Bi5vzoF9.js +1 -0
- package/dashboard/assets/desktop-CXTQonNm.js +32 -0
- package/dashboard/assets/desktop-NOekk4QS.css +1 -0
- package/dashboard/assets/dist-CmX-h7a4.js +1 -0
- package/dashboard/assets/dist-DAwYQmf_.js +45 -0
- package/dashboard/assets/findings-page-CACW9nw2.js +5 -0
- package/dashboard/assets/format-PoISqsES.js +1 -0
- package/dashboard/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dashboard/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dashboard/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dashboard/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dashboard/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dashboard/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/dashboard/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/dashboard/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/dashboard/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/dashboard/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/dashboard/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/dashboard/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/dashboard/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/dashboard/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/dashboard/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/dashboard/assets/jsx-runtime-C7oxC63R.js +1 -0
- package/dashboard/assets/live-page-DrgQqQK5.js +1 -0
- package/dashboard/assets/meta-tile-CcskIV_o.js +1 -0
- package/dashboard/assets/operations-BKE8T-vY.css +2 -0
- package/dashboard/assets/operations-D8nUP5_m.js +4 -0
- package/dashboard/assets/operations-app-CQQhG54n.js +2 -0
- package/dashboard/assets/overview-page-DTGS8dPo.js +1 -0
- package/dashboard/assets/page-header-MFVvEtZW.js +1 -0
- package/dashboard/assets/play-Dwo-9xt6.js +1 -0
- package/dashboard/assets/scans-page-ChVtq8Us.js +1 -0
- package/dashboard/assets/search-CiooTLck.js +1 -0
- package/dashboard/assets/siren-CCBwTSuk.js +1 -0
- package/dashboard/assets/table-BYS-nIVA.js +1 -0
- package/dashboard/assets/tabs-DivxbhQy.js +1 -0
- package/dashboard/desktop.html +21 -0
- package/dashboard/index.html +15 -0
- package/package.json +30 -18
- package/bin/0sec.cjs +0 -361
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __0secCreateRequire } from "node:module";
|
|
3
|
+
const require = __0secCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
AGENT_ACTION_ASSURANCE_SCHEMA_VERSION,
|
|
6
|
+
AgentActionEvidenceManifestSchema,
|
|
7
|
+
AgentActionOutcomeSchema,
|
|
8
|
+
AgentActionScenarioSchema,
|
|
9
|
+
AgentActionTargetMetadataSchema,
|
|
10
|
+
AgentInjectionVectorSchema,
|
|
11
|
+
AssertionKindSchema,
|
|
12
|
+
DEFAULT_ALLOW_MODEL_SELF_EXTENSION,
|
|
13
|
+
DEFAULT_AUTONOMY_MODE,
|
|
14
|
+
DEFAULT_MAX_CONCURRENCY,
|
|
15
|
+
DEFAULT_MODEL,
|
|
16
|
+
DEFAULT_SEVERITY_FLOOR,
|
|
17
|
+
DEFAULT_TIMEOUT_MS,
|
|
18
|
+
DEPTH_CONFIG,
|
|
19
|
+
DESKTOP_CONSOLE_SCHEMA_VERSION,
|
|
20
|
+
EngineMetadataSchema,
|
|
21
|
+
EvidenceArtifactSchema,
|
|
22
|
+
HALT_STATE,
|
|
23
|
+
MANUAL_PRICING,
|
|
24
|
+
MODEL_PRICING,
|
|
25
|
+
PRESENTATION_PROTOCOL,
|
|
26
|
+
PRICING_SNAPSHOT_DATE,
|
|
27
|
+
RunnerKindSchema,
|
|
28
|
+
SEVERITY_ORDER,
|
|
29
|
+
SEVERITY_RANK,
|
|
30
|
+
VERSION,
|
|
31
|
+
VerificationAssertionSchema,
|
|
32
|
+
VerificationCommandSchema,
|
|
33
|
+
VerificationModeSchema,
|
|
34
|
+
VerificationResultSchema,
|
|
35
|
+
VerificationStatusSchema,
|
|
36
|
+
compareRoles,
|
|
37
|
+
conditionCmpOpSchema,
|
|
38
|
+
conditionCmpSchema,
|
|
39
|
+
conditionExprSchema,
|
|
40
|
+
conditionLhsSchema,
|
|
41
|
+
conditionRhsSchema,
|
|
42
|
+
createAuditReportDocument,
|
|
43
|
+
createPresentationEvent,
|
|
44
|
+
createReviewReportDocument,
|
|
45
|
+
createScanReportDocument,
|
|
46
|
+
createTranscriptDocument,
|
|
47
|
+
defaultRoleFor,
|
|
48
|
+
estimateCost,
|
|
49
|
+
findingSchema,
|
|
50
|
+
formatZodError,
|
|
51
|
+
getRates,
|
|
52
|
+
hasMultipleIdentities,
|
|
53
|
+
homeStateDir,
|
|
54
|
+
isPresentationEvent,
|
|
55
|
+
meetsSeverityFloor,
|
|
56
|
+
modelProvider,
|
|
57
|
+
normalizeResearchNovelty,
|
|
58
|
+
parseAgentActionEvidenceManifest,
|
|
59
|
+
pocStepArraySchema,
|
|
60
|
+
pocStepSchema,
|
|
61
|
+
priceRun,
|
|
62
|
+
reportSummarySchema,
|
|
63
|
+
researchDisclosureReady,
|
|
64
|
+
researchGradeAtLeast,
|
|
65
|
+
researchLpeDisclosureReady,
|
|
66
|
+
researchPlatformLpeDisclosureReady,
|
|
67
|
+
researchWindowsLpeDisclosureReady,
|
|
68
|
+
researchWindowsTokenTransitionProven,
|
|
69
|
+
researchZeroCapProven,
|
|
70
|
+
resolveIdentities,
|
|
71
|
+
runStateDir,
|
|
72
|
+
severityRank,
|
|
73
|
+
specialistRefSchema,
|
|
74
|
+
splitCost,
|
|
75
|
+
stateDefSchema,
|
|
76
|
+
transitionRefSchema,
|
|
77
|
+
transitionRuleSchema,
|
|
78
|
+
transitionTargetSchema,
|
|
79
|
+
workflowDefinitionSchema
|
|
80
|
+
} from "./chunk-6L26OBWI.js";
|
|
81
|
+
import "./chunk-YLMN3N25.js";
|
|
82
|
+
import "./chunk-IR537GON.js";
|
|
83
|
+
export {
|
|
84
|
+
AGENT_ACTION_ASSURANCE_SCHEMA_VERSION,
|
|
85
|
+
AgentActionEvidenceManifestSchema,
|
|
86
|
+
AgentActionOutcomeSchema,
|
|
87
|
+
AgentActionScenarioSchema,
|
|
88
|
+
AgentActionTargetMetadataSchema,
|
|
89
|
+
AgentInjectionVectorSchema,
|
|
90
|
+
AssertionKindSchema,
|
|
91
|
+
DEFAULT_ALLOW_MODEL_SELF_EXTENSION,
|
|
92
|
+
DEFAULT_AUTONOMY_MODE,
|
|
93
|
+
DEFAULT_MAX_CONCURRENCY,
|
|
94
|
+
DEFAULT_MODEL,
|
|
95
|
+
DEFAULT_SEVERITY_FLOOR,
|
|
96
|
+
DEFAULT_TIMEOUT_MS,
|
|
97
|
+
DEPTH_CONFIG,
|
|
98
|
+
DESKTOP_CONSOLE_SCHEMA_VERSION,
|
|
99
|
+
EngineMetadataSchema,
|
|
100
|
+
EvidenceArtifactSchema,
|
|
101
|
+
HALT_STATE,
|
|
102
|
+
MANUAL_PRICING,
|
|
103
|
+
MODEL_PRICING,
|
|
104
|
+
PRESENTATION_PROTOCOL,
|
|
105
|
+
PRICING_SNAPSHOT_DATE,
|
|
106
|
+
RunnerKindSchema,
|
|
107
|
+
SEVERITY_ORDER,
|
|
108
|
+
SEVERITY_RANK,
|
|
109
|
+
VERSION,
|
|
110
|
+
VerificationAssertionSchema,
|
|
111
|
+
VerificationCommandSchema,
|
|
112
|
+
VerificationModeSchema,
|
|
113
|
+
VerificationResultSchema,
|
|
114
|
+
VerificationStatusSchema,
|
|
115
|
+
compareRoles,
|
|
116
|
+
conditionCmpOpSchema,
|
|
117
|
+
conditionCmpSchema,
|
|
118
|
+
conditionExprSchema,
|
|
119
|
+
conditionLhsSchema,
|
|
120
|
+
conditionRhsSchema,
|
|
121
|
+
createAuditReportDocument,
|
|
122
|
+
createPresentationEvent,
|
|
123
|
+
createReviewReportDocument,
|
|
124
|
+
createScanReportDocument,
|
|
125
|
+
createTranscriptDocument,
|
|
126
|
+
defaultRoleFor,
|
|
127
|
+
estimateCost,
|
|
128
|
+
findingSchema,
|
|
129
|
+
formatZodError,
|
|
130
|
+
getRates,
|
|
131
|
+
hasMultipleIdentities,
|
|
132
|
+
homeStateDir,
|
|
133
|
+
isPresentationEvent,
|
|
134
|
+
meetsSeverityFloor,
|
|
135
|
+
modelProvider,
|
|
136
|
+
normalizeResearchNovelty,
|
|
137
|
+
parseAgentActionEvidenceManifest,
|
|
138
|
+
pocStepArraySchema,
|
|
139
|
+
pocStepSchema,
|
|
140
|
+
priceRun,
|
|
141
|
+
reportSummarySchema,
|
|
142
|
+
researchDisclosureReady,
|
|
143
|
+
researchGradeAtLeast,
|
|
144
|
+
researchLpeDisclosureReady,
|
|
145
|
+
researchPlatformLpeDisclosureReady,
|
|
146
|
+
researchWindowsLpeDisclosureReady,
|
|
147
|
+
researchWindowsTokenTransitionProven,
|
|
148
|
+
researchZeroCapProven,
|
|
149
|
+
resolveIdentities,
|
|
150
|
+
runStateDir,
|
|
151
|
+
severityRank,
|
|
152
|
+
specialistRefSchema,
|
|
153
|
+
splitCost,
|
|
154
|
+
stateDefSchema,
|
|
155
|
+
transitionRefSchema,
|
|
156
|
+
transitionRuleSchema,
|
|
157
|
+
transitionTargetSchema,
|
|
158
|
+
workflowDefinitionSchema
|
|
159
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __0secCreateRequire } from "node:module";
|
|
3
|
+
const require = __0secCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
getEvalCategories,
|
|
6
|
+
runEval
|
|
7
|
+
} from "./chunk-AHTBZC3E.js";
|
|
8
|
+
import "./chunk-BZNEY2ZS.js";
|
|
9
|
+
import "./chunk-YYRBQVFE.js";
|
|
10
|
+
import "./chunk-3MOLBTLS.js";
|
|
11
|
+
import "./chunk-P6WKNFWX.js";
|
|
12
|
+
import "./chunk-UCYRA73C.js";
|
|
13
|
+
import "./chunk-LP3HHYQU.js";
|
|
14
|
+
import "./chunk-KLTNTE2Z.js";
|
|
15
|
+
import "./chunk-RRMJC3ZE.js";
|
|
16
|
+
import "./chunk-H2FFLZNK.js";
|
|
17
|
+
import "./chunk-WEBMRWEG.js";
|
|
18
|
+
import "./chunk-57ZENEX2.js";
|
|
19
|
+
import "./chunk-UR4ELX2Y.js";
|
|
20
|
+
import "./chunk-ADOLI6DT.js";
|
|
21
|
+
import "./chunk-6L26OBWI.js";
|
|
22
|
+
import "./chunk-YLMN3N25.js";
|
|
23
|
+
import "./chunk-IR537GON.js";
|
|
24
|
+
export {
|
|
25
|
+
getEvalCategories,
|
|
26
|
+
runEval
|
|
27
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "bench-example-references-only",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"corpusRoot": "/opt/0sec-bench-corpus",
|
|
5
|
+
"_comment": "REFERENCES ONLY. This sample documents the manifest shape. It contains NO vulnerable app source and NO exploits. The real uncontaminated/post-cutoff corpus (images, compose dirs, kernel reproducers) lives OUTSIDE this repo per disclosure embargo discipline and is resolved at run time via image refs / corpusRoot-relative paths / reproducerRef. Markers below are placeholder tokens that, in a real corpus, are planted per-target at build time (like XBOW's random FLAG).",
|
|
6
|
+
"cases": [
|
|
7
|
+
{
|
|
8
|
+
"id": "web-file-read-001",
|
|
9
|
+
"name": "Path traversal → /etc/secret read",
|
|
10
|
+
"target": { "kind": "web", "image": "ghcr.io/0sec-labs/bench-web-file-read-001@sha256:PINNED", "port": 8080 },
|
|
11
|
+
"objective": { "type": "file-read", "marker": "BENCH_MARKER_FILEREAD_001", "path": "/etc/0sec-bench/secret" },
|
|
12
|
+
"ci": true,
|
|
13
|
+
"tags": ["web", "lfi"]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "web-db-access-002",
|
|
17
|
+
"name": "SQLi → exfiltrate seeded row",
|
|
18
|
+
"target": { "kind": "web", "composeDir": "web/db-access-002", "port": 3000 },
|
|
19
|
+
"objective": { "type": "db-access", "marker": "BENCH_MARKER_DBROW_002" },
|
|
20
|
+
"ci": true,
|
|
21
|
+
"tags": ["web", "sqli"]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "web-admin-login-003",
|
|
25
|
+
"name": "Auth bypass → admin panel",
|
|
26
|
+
"target": { "kind": "web", "image": "ghcr.io/0sec-labs/bench-web-admin-003@sha256:PINNED", "port": 80 },
|
|
27
|
+
"objective": { "type": "admin-login", "marker": "BENCH_MARKER_ADMINFLAG_003" },
|
|
28
|
+
"tags": ["web", "authz"]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "web-ssrf-callback-004",
|
|
32
|
+
"name": "SSRF → attacker callback",
|
|
33
|
+
"target": { "kind": "web", "image": "ghcr.io/0sec-labs/bench-web-ssrf-004@sha256:PINNED", "port": 8000 },
|
|
34
|
+
"objective": { "type": "ssrf-callback", "token": "BENCH_OAST_TOKEN_004" },
|
|
35
|
+
"tags": ["web", "ssrf"]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "web-file-write-005",
|
|
39
|
+
"name": "Upload → arbitrary write",
|
|
40
|
+
"target": { "kind": "web", "composeDir": "web/file-write-005", "port": 5000 },
|
|
41
|
+
"objective": { "type": "file-write", "marker": "BENCH_MARKER_FILEWRITE_005", "path": "/var/www/uploads/pwn" },
|
|
42
|
+
"tags": ["web", "upload"]
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
{
|
|
46
|
+
"id": "web-negative-hardened-101",
|
|
47
|
+
"name": "Hardened search endpoint (parameterized queries)",
|
|
48
|
+
"target": { "kind": "web", "image": "ghcr.io/0sec-labs/bench-web-negative-101@sha256:PINNED", "port": 8080 },
|
|
49
|
+
"objective": { "type": "db-access", "marker": "BENCH_MARKER_NEVER_PRESENT_101" },
|
|
50
|
+
"knownNegative": true,
|
|
51
|
+
"ci": true,
|
|
52
|
+
"tags": ["web", "known-negative"]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "web-negative-allowlist-102",
|
|
56
|
+
"name": "URL fetcher with strict allowlist (no SSRF)",
|
|
57
|
+
"target": { "kind": "web", "image": "ghcr.io/0sec-labs/bench-web-negative-102@sha256:PINNED", "port": 8000 },
|
|
58
|
+
"objective": { "type": "ssrf-callback", "token": "BENCH_OAST_TOKEN_NEVER_102" },
|
|
59
|
+
"knownNegative": true,
|
|
60
|
+
"tags": ["web", "known-negative"]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "web-negative-rbac-103",
|
|
64
|
+
"name": "Correct RBAC on admin routes (no bypass)",
|
|
65
|
+
"target": { "kind": "web", "image": "ghcr.io/0sec-labs/bench-web-negative-103@sha256:PINNED", "port": 80 },
|
|
66
|
+
"objective": { "type": "admin-login", "marker": "BENCH_MARKER_NEVER_104" },
|
|
67
|
+
"knownNegative": true,
|
|
68
|
+
"tags": ["web", "known-negative"]
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
{
|
|
72
|
+
"id": "kernel-uaf-201",
|
|
73
|
+
"name": "Driver UAF reproducer (KASAN slab-use-after-free)",
|
|
74
|
+
"target": { "kind": "kernel", "reproducerRef": "corpus://kernel/uaf-201", "ecosystem": "kernel-tree" },
|
|
75
|
+
"objective": { "type": "kasan-hit", "signature": "slab-use-after-free" },
|
|
76
|
+
"ci": true,
|
|
77
|
+
"tags": ["kernel", "uaf"]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "kernel-oob-202",
|
|
81
|
+
"name": "Out-of-bounds write reproducer (KASAN)",
|
|
82
|
+
"target": { "kind": "kernel", "reproducerRef": "corpus://kernel/oob-202", "ecosystem": "kernel-tree" },
|
|
83
|
+
"objective": { "type": "kasan-hit", "signature": "out-of-bounds" },
|
|
84
|
+
"tags": ["kernel", "oob"]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "kernel-negative-203",
|
|
88
|
+
"name": "Patched driver (no crash) — known-negative",
|
|
89
|
+
"target": { "kind": "kernel", "reproducerRef": "corpus://kernel/patched-203", "ecosystem": "kernel-tree" },
|
|
90
|
+
"objective": { "type": "kasan-hit" },
|
|
91
|
+
"knownNegative": true,
|
|
92
|
+
"tags": ["kernel", "known-negative"]
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __0secCreateRequire } from "node:module";
|
|
3
|
+
const require = __0secCreateRequire(import.meta.url);
|
|
4
|
+
import "./chunk-IR537GON.js";
|
|
5
|
+
|
|
6
|
+
// packages/cli/src/commands/exploit-agent.ts
|
|
7
|
+
import { execFileSync } from "node:child_process";
|
|
8
|
+
import { writeFileSync } from "node:fs";
|
|
9
|
+
import { resolve } from "node:path";
|
|
10
|
+
function makeDockerExecutor(containerId, timeoutMs = 3e5) {
|
|
11
|
+
return (cmd) => execFileSync("docker", ["exec", "-w", "/workspace", containerId, "sh", "-c", cmd], {
|
|
12
|
+
encoding: "utf8",
|
|
13
|
+
timeout: timeoutMs,
|
|
14
|
+
maxBuffer: 64 * 1024 * 1024
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function makeScriptExecutor(scriptPath, timeoutMs = 3e5) {
|
|
18
|
+
const abs = resolve(scriptPath);
|
|
19
|
+
return (cmd) => execFileSync(abs, [cmd], {
|
|
20
|
+
encoding: "utf8",
|
|
21
|
+
timeout: timeoutMs,
|
|
22
|
+
maxBuffer: 64 * 1024 * 1024
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async function runExploitAgent(opts) {
|
|
26
|
+
const { runExploitScan } = await import("./dist-4YICS2J2.js");
|
|
27
|
+
const log = opts.log ?? ((m) => process.stderr.write(m + "\n"));
|
|
28
|
+
const result = await runExploitScan({
|
|
29
|
+
target: {
|
|
30
|
+
description: opts.taskDescription,
|
|
31
|
+
flagPath: opts.flagPath,
|
|
32
|
+
...opts.flagPattern ? { flagPattern: opts.flagPattern } : {},
|
|
33
|
+
...opts.taskId ? { taskId: opts.taskId } : {}
|
|
34
|
+
},
|
|
35
|
+
execCmd: opts.exec,
|
|
36
|
+
runtime: opts.runtime ?? "api",
|
|
37
|
+
...opts.model ? { model: opts.model } : {},
|
|
38
|
+
...opts.maxSteps !== void 0 ? { maxSteps: opts.maxSteps } : {},
|
|
39
|
+
log
|
|
40
|
+
});
|
|
41
|
+
const exitCode = result.captured ? 0 : result.builtExploit ? 1 : 2;
|
|
42
|
+
return {
|
|
43
|
+
exitCode,
|
|
44
|
+
result: {
|
|
45
|
+
mode: "agent",
|
|
46
|
+
...opts.taskId ? { task_id: opts.taskId } : {},
|
|
47
|
+
captured: result.captured,
|
|
48
|
+
steps: result.steps,
|
|
49
|
+
built_exploit: result.builtExploit,
|
|
50
|
+
model: result.model,
|
|
51
|
+
flag_path: opts.flagPath,
|
|
52
|
+
// Surfaced deliberately: the loop warns here when a "capture" rests only on
|
|
53
|
+
// a non-empty flag file rather than a real oracle.
|
|
54
|
+
warnings: result.warnings
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
async function agentFromExploitOpts(opts) {
|
|
59
|
+
if (!opts.task) throw new Error("--agent requires --task <path to the vuln/task description>");
|
|
60
|
+
if (!opts.container && !opts.execScript) {
|
|
61
|
+
throw new Error(
|
|
62
|
+
"--agent requires a target executor: --container <id> (docker exec) or --exec-script <path>. Refusing to run exploit commands locally."
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
if (opts.container && opts.execScript) {
|
|
66
|
+
throw new Error("--agent takes --container OR --exec-script, not both");
|
|
67
|
+
}
|
|
68
|
+
const { readFileSync } = await import("node:fs");
|
|
69
|
+
const taskDescription = readFileSync(resolve(opts.task), "utf8");
|
|
70
|
+
const flagPath = opts.flagPath ?? "/tmp/flag";
|
|
71
|
+
let maxSteps;
|
|
72
|
+
if (opts.maxSteps !== void 0) {
|
|
73
|
+
maxSteps = parseInt(opts.maxSteps, 10);
|
|
74
|
+
if (!Number.isFinite(maxSteps) || maxSteps <= 0) {
|
|
75
|
+
throw new Error(`invalid --max-steps '${opts.maxSteps}' (expected positive integer)`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const exec = opts.container ? makeDockerExecutor(opts.container) : makeScriptExecutor(opts.execScript);
|
|
79
|
+
const outcome = await runExploitAgent({
|
|
80
|
+
taskDescription,
|
|
81
|
+
flagPath,
|
|
82
|
+
...opts.flagPattern ? { flagPattern: opts.flagPattern } : {},
|
|
83
|
+
exec,
|
|
84
|
+
...opts.model ? { model: opts.model } : {},
|
|
85
|
+
...maxSteps !== void 0 ? { maxSteps } : {},
|
|
86
|
+
...opts.runtime ? { runtime: opts.runtime } : {}
|
|
87
|
+
});
|
|
88
|
+
const json = JSON.stringify(outcome.result, null, 2);
|
|
89
|
+
if (opts.output) writeFileSync(resolve(opts.output), json + "\n", "utf8");
|
|
90
|
+
else process.stdout.write(json + "\n");
|
|
91
|
+
return outcome.exitCode;
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
agentFromExploitOpts,
|
|
95
|
+
makeDockerExecutor,
|
|
96
|
+
makeScriptExecutor,
|
|
97
|
+
runExploitAgent
|
|
98
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __0secCreateRequire } from "node:module";
|
|
3
|
+
const require = __0secCreateRequire(import.meta.url);
|
|
4
|
+
import "./chunk-IR537GON.js";
|
|
5
|
+
|
|
6
|
+
// packages/cli/src/commands/exploit-autoclimb.ts
|
|
7
|
+
import { spawn } from "node:child_process";
|
|
8
|
+
import { mkdtempSync, writeFileSync, readFileSync, existsSync } from "node:fs";
|
|
9
|
+
import { tmpdir } from "node:os";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
function makeShellBootRunner(opts) {
|
|
12
|
+
const log = opts.logger ?? (() => {
|
|
13
|
+
});
|
|
14
|
+
if (!existsSync(opts.bootScript)) {
|
|
15
|
+
throw new Error(`autoclimb boot script not found: ${opts.bootScript}`);
|
|
16
|
+
}
|
|
17
|
+
return async (report) => {
|
|
18
|
+
const dir = mkdtempSync(join(tmpdir(), "autoclimb-"));
|
|
19
|
+
const cfile = join(dir, "poc.c");
|
|
20
|
+
writeFileSync(cfile, report.reproducer ?? "", "utf8");
|
|
21
|
+
const serialFile = `${cfile}.serial`;
|
|
22
|
+
log(`[autoclimb-runner] booting ${cfile} via ${opts.bootScript}`);
|
|
23
|
+
const output = await new Promise((resolveP) => {
|
|
24
|
+
const child = spawn(opts.bootScript, [cfile], {
|
|
25
|
+
env: { ...process.env, ...opts.env },
|
|
26
|
+
timeout: opts.timeoutMs ?? 9e5
|
|
27
|
+
});
|
|
28
|
+
let out = "";
|
|
29
|
+
child.stdout.on("data", (d) => out += d.toString());
|
|
30
|
+
child.stderr.on("data", (d) => out += d.toString());
|
|
31
|
+
child.on("close", () => resolveP(out));
|
|
32
|
+
child.on("error", (e) => resolveP(`boot-script error: ${String(e)}`));
|
|
33
|
+
});
|
|
34
|
+
const dmesg = existsSync(serialFile) ? readFileSync(serialFile, "utf8") : "";
|
|
35
|
+
const compiled = /COMPILED=1/.test(output);
|
|
36
|
+
const executed = /EXECUTED=1/.test(output);
|
|
37
|
+
return { compiled, executed, output, dmesg, exitCode: 0, timedOut: false };
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
async function runAutoclimbCli(opts) {
|
|
41
|
+
const log = opts.logger ?? ((l) => process.stderr.write(l + "\n"));
|
|
42
|
+
const { autonomousClimb } = await import("./dist-4YICS2J2.js");
|
|
43
|
+
const bug = JSON.parse(readFileSync(opts.bugSpecPath, "utf8"));
|
|
44
|
+
const runner = makeShellBootRunner({
|
|
45
|
+
bootScript: opts.bootScript,
|
|
46
|
+
...opts.bootEnv ? { env: opts.bootEnv } : {},
|
|
47
|
+
logger: log
|
|
48
|
+
});
|
|
49
|
+
const result = await autonomousClimb({
|
|
50
|
+
bug,
|
|
51
|
+
runner,
|
|
52
|
+
maxRounds: opts.maxRounds,
|
|
53
|
+
plateauRounds: opts.plateauRounds,
|
|
54
|
+
...opts.modelId ? { modelId: opts.modelId } : {},
|
|
55
|
+
logger: log
|
|
56
|
+
});
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
async function autoclimbFromExploitOpts(opts) {
|
|
60
|
+
const bugSpecPath = opts.bugSpec;
|
|
61
|
+
const bootScript = opts.bootScript ?? process.env["0SEC_AUTOCLIMB_BOOT_SCRIPT"];
|
|
62
|
+
if (!bugSpecPath) throw new Error("--autoclimb requires --bug-spec <path>");
|
|
63
|
+
if (!bootScript) throw new Error("--autoclimb requires --boot-script <path> or 0SEC_AUTOCLIMB_BOOT_SCRIPT");
|
|
64
|
+
const maxRounds = opts.loopBoots ? parseInt(opts.loopBoots, 10) : 6;
|
|
65
|
+
const result = await runAutoclimbCli({
|
|
66
|
+
bugSpecPath,
|
|
67
|
+
bootScript,
|
|
68
|
+
maxRounds: Number.isFinite(maxRounds) && maxRounds > 0 ? maxRounds : 6,
|
|
69
|
+
plateauRounds: 3,
|
|
70
|
+
...opts.model ? { modelId: opts.model } : {}
|
|
71
|
+
});
|
|
72
|
+
const json = JSON.stringify(result, null, 2);
|
|
73
|
+
if (opts.output) writeFileSync(opts.output, json + "\n", "utf8");
|
|
74
|
+
else process.stdout.write(json + "\n");
|
|
75
|
+
return result.reachedCeiling ? 0 : result.highestRung === "none" ? 2 : 1;
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
autoclimbFromExploitOpts,
|
|
79
|
+
makeShellBootRunner,
|
|
80
|
+
runAutoclimbCli
|
|
81
|
+
};
|