0sec-cli 0.18.0 → 0.22.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 → 0.js} +90 -82
- package/LICENSE +1 -1
- package/README.md +62 -46
- package/chunks/adapt-loop-7I57LXXR.js +18 -0
- package/chunks/{adgraph-JLGA6RYI.js → adgraph-AUDQTBYA.js} +5 -5
- package/chunks/agent/skills/frameworks/entra-id.yaml +2 -2
- package/chunks/agent/skills/techniques/assumption-mining.yaml +2 -2
- package/chunks/agent/skills/techniques/cve-poc-adaptation.yaml +2 -2
- package/chunks/agent/skills/techniques/entra-attack-paths.yaml +1 -1
- package/chunks/agent/skills/techniques/kernel-weaponization.yaml +1 -1
- package/chunks/agent/skills/techniques/llm-prompt-injection.yaml +2 -2
- package/chunks/agent/skills/techniques/npm-ecosystem.yaml +1 -1
- package/chunks/agent/skills/techniques/poc-verification.yaml +1 -1
- package/chunks/agent/skills/techniques/seedless-depth-review.yaml +20 -38
- package/chunks/{artifact-scraper-HQ7HLP6V.js → artifact-scraper-PYZ3RU3O.js} +6 -6
- package/chunks/{assumption-mining-5SNIVVDN.js → assumption-mining-MFLF43IR.js} +24 -26
- package/chunks/{chunk-7DQEV5QI.js → chunk-23DG5YKS.js} +4 -4
- package/chunks/{chunk-UR4ELX2Y.js → chunk-2GV4HQKE.js} +340 -703
- package/chunks/{chunk-P6WKNFWX.js → chunk-2OQOQ2FZ.js} +8 -8
- package/chunks/{chunk-5G3ZXFBW.js → chunk-2WNCI664.js} +3 -3
- package/chunks/{chunk-DW5UWPFY.js → chunk-4VGLO2YS.js} +6 -5
- package/chunks/{chunk-KLTNTE2Z.js → chunk-5IBCBQEH.js} +13 -14
- package/chunks/{chunk-N7BOUYEV.js → chunk-5MWAG3FT.js} +14 -14
- package/chunks/{chunk-OEFNRYI2.js → chunk-6GHSR47F.js} +3 -6
- package/chunks/chunk-6YNKRUMC.js +4474 -0
- package/chunks/{chunk-6L26OBWI.js → chunk-76KSBWOQ.js} +255 -35
- package/chunks/chunk-7DEHG7YT.js +2143 -0
- package/chunks/{chunk-AD7WXDH6.js → chunk-7UFUALR2.js} +288 -22
- package/chunks/{chunk-53G27VPS.js → chunk-AZ7L3HFD.js} +7 -2
- package/chunks/{chunk-TSK2AG6J.js → chunk-CAYANSH6.js} +173 -1757
- package/chunks/{chunk-SAFFWQW4.js → chunk-DKSCN2AB.js} +7 -7
- package/chunks/{chunk-2JCCA2JL.js → chunk-DM5C5L5D.js} +3 -3
- package/chunks/{chunk-RWONANDA.js → chunk-DQTNI3KY.js} +5 -5
- package/chunks/{chunk-5JI7L7KV.js → chunk-EGZGZFAH.js} +10036 -12938
- package/chunks/{chunk-6LKRLK2R.js → chunk-FHC2B7LN.js} +3 -3
- package/chunks/{chunk-MYVT64FN.js → chunk-GHWODZMR.js} +2 -2
- package/chunks/{chunk-2RMLOJVB.js → chunk-GVD6SJGH.js} +2 -2
- package/chunks/{chunk-SF4KZ4O3.js → chunk-HLFS6WV2.js} +2 -2
- package/chunks/chunk-HR2TU42B.js +1228 -0
- package/chunks/{chunk-BFRB6HB2.js → chunk-HUNAPTKV.js} +3 -3
- package/chunks/chunk-IO7R7WBM.js +114 -0
- package/chunks/{chunk-WEBMRWEG.js → chunk-IXT64DV5.js} +656 -1868
- package/chunks/{chunk-3MOLBTLS.js → chunk-K2PWUPUI.js} +2 -2
- package/chunks/{chunk-WXQ6BJ6A.js → chunk-LCRTAQN2.js} +7 -7
- package/chunks/{chunk-SVJEDVYK.js → chunk-LPTRPRZR.js} +5 -5
- package/chunks/{chunk-CMKXP5RR.js → chunk-LYUAM3TG.js} +3 -3
- package/chunks/{chunk-BVAZO4WA.js → chunk-MICHDTBK.js} +3 -3
- package/chunks/{chunk-UCYRA73C.js → chunk-OAYUPGF6.js} +4 -4
- package/chunks/{chunk-XM5NLHYU.js → chunk-OWLJYJ5O.js} +14 -14
- package/chunks/{chunk-BKZFDZ23.js → chunk-QCUFBVIZ.js} +3 -3
- package/chunks/chunk-RE5EZDG2.js +5523 -0
- package/chunks/{chunk-ASUR522M.js → chunk-RRD4XXPU.js} +9 -9
- package/chunks/{chunk-AHTBZC3E.js → chunk-RSIUX3RW.js} +4 -4
- package/chunks/{chunk-BZNEY2ZS.js → chunk-SJBCK2EI.js} +15268 -16053
- package/chunks/{chunk-IOL7D5YV.js → chunk-SQCBHFWN.js} +3 -3
- package/chunks/chunk-TH2LW437.js +7829 -0
- package/chunks/{chunk-WVTBZEQO.js → chunk-TM74SSHC.js} +8 -8
- package/chunks/{chunk-U5FLXGHT.js → chunk-TO35Y326.js} +13 -729
- package/chunks/chunk-TRH2PJSN.js +547 -0
- package/chunks/{chunk-YYRBQVFE.js → chunk-TZFIAMWZ.js} +70 -16
- package/chunks/chunk-UELXHK2Y.js +1950 -0
- package/chunks/{chunk-RJWOYEOG.js → chunk-UEX7PFSE.js} +5 -5
- package/chunks/{chunk-VQG4FT5D.js → chunk-UFHN6RIU.js} +2 -2
- package/chunks/{chunk-JQHOLLTD.js → chunk-UU7PQP6N.js} +9 -9
- package/chunks/{chunk-BFR2CDV5.js → chunk-UV5QWZGE.js} +283 -153
- package/chunks/{chunk-WU6AFRAZ.js → chunk-V36HVTUL.js} +12 -12
- package/chunks/{chunk-IR537GON.js → chunk-VCSFCHAJ.js} +2 -2
- package/chunks/{chunk-YLMN3N25.js → chunk-VIT5ALXF.js} +3 -3
- package/chunks/{chunk-BATRQBOR.js → chunk-VMRRNRMR.js} +41 -41
- package/chunks/{chunk-72CISA2D.js → chunk-VNRY6AWF.js} +89 -41
- package/chunks/chunk-W6UWZFKL.js +298 -0
- package/chunks/{chunk-3KPWWJCI.js → chunk-XFCTUKXR.js} +88 -88
- package/chunks/{chunk-GMT2AZKM.js → chunk-YIQSGNAA.js} +897 -130
- package/chunks/codex-models-7TLJSY3L.js +17 -0
- package/chunks/{commands-TBC2F5CE.js → commands-NEI7L3QA.js} +2836 -1424
- package/chunks/corpus-v1.json +2 -2
- package/chunks/data/appsec-archetypes.json +2 -2
- package/chunks/data/chromium-archetypes.json +1 -1
- package/chunks/data/freebsd-archetypes.json +1 -1
- package/chunks/data/kernel-archetypes.json +2 -2
- package/chunks/db-5AP3JB4W.js +16 -0
- package/chunks/{disclose-EKTWSCGW.js → disclose-LDNKAVRH.js} +13 -11
- package/chunks/{dist-4YICS2J2.js → dist-3FNZIBB4.js} +394 -404
- package/chunks/{dist-4MAW5X6L.js → dist-5YHYNLI3.js} +6 -6
- package/chunks/{dist-FMGSR3DW.js → dist-DD4H6HMQ.js} +13 -5
- package/chunks/dist-KEULE5IQ.js +21914 -0
- package/chunks/dist-XZB53PS5.js +53 -0
- package/chunks/eval-runner-43BO2C4T.js +26 -0
- package/chunks/example-manifest.json +2 -2
- package/chunks/{exploit-agent-45YQOHPJ.js → exploit-agent-N4A5ELBK.js} +4 -4
- package/chunks/{exploit-autoclimb-UZGEMGYT.js → exploit-autoclimb-N7P6KIF5.js} +6 -6
- package/chunks/{exploit-climb-SG23KB2G.js → exploit-climb-WNEJUB5W.js} +12 -12
- package/chunks/fix-Z452M4EC.js +26 -0
- package/chunks/{github-issues-MJ6OYOOU.js → github-issues-IGTTWM7V.js} +7 -7
- package/chunks/harness-QJJJVSG4.js +22 -0
- package/chunks/http-conformance-U5F6GKYG.js +11 -0
- package/chunks/http-sender-I5XFFY35.js +10 -0
- package/chunks/hunt-scan-K6D2V3PX.js +36 -0
- package/chunks/{identity-6ZAIIWOR.js → identity-62SVRW4H.js} +5 -5
- package/chunks/{kernel-primitive-7U6CWHXD.js → kernel-primitive-TKUACPKD.js} +6 -6
- package/chunks/{kernel-vm-runner-3JAU4O6J.js → kernel-vm-runner-RAAO2PGT.js} +6 -6
- package/chunks/memsafety-scan-FCPAXIZE.js +16 -0
- package/chunks/{native-loop-RJCJPOUS.js → native-loop-2ZRJENZ3.js} +17 -18
- package/chunks/{npm-detectors-KB5Y5ZFX.js → npm-detectors-Z2ZIQCN4.js} +6 -6
- package/chunks/npm-dynamic-discovery-5J7FT3XM.js +13 -0
- package/chunks/orchestrate-2GWGNTBF.js +58 -0
- package/chunks/{pre-recon-cve-66EB6G4M.js → pre-recon-cve-X2K2P5YQ.js} +4 -4
- package/chunks/prepare-KYHGFWCJ.js +13 -0
- package/chunks/process-N245QIQG.js +12 -0
- package/chunks/{run-D56MPDKY.js → run-U3XU4CTC.js} +11507 -13632
- package/chunks/{runtime-G7YWIO3B.js → runtime-G75TEWQY.js} +10 -11
- package/chunks/runtime-XFWJTBUO.js +12 -0
- package/chunks/{scan-stream-FHI2FYZE.js → scan-stream-BMOCPKQX.js} +7 -7
- package/chunks/scope-WXI46UHJ.js +21 -0
- package/chunks/{session-store-GZ4A4KYT.js → session-store-27L3ZU73.js} +6 -6
- package/chunks/source-files-REHOM44I.js +12 -0
- package/chunks/{specdrift-WCLH6TTQ.js → specdrift-AFS54WEJ.js} +5 -5
- package/chunks/token-KRWP5JYA.js +72 -0
- package/chunks/token-util-DWTL33S3.js +8 -0
- package/chunks/variant-candidates-YWZORZMK.js +13 -0
- package/chunks/{web-recon-prepass-JJGPEOLE.js → web-recon-prepass-YVMFXCIK.js} +9 -9
- package/cli-path-traversal-fixture.js +352 -0
- package/dashboard/assets/bot-Bg1Tp9_d.js +1 -0
- package/dashboard/assets/dist-B_dDCPbu.js +1 -0
- package/dashboard/assets/findings-page-mayGhNx6.js +5 -0
- package/dashboard/assets/format--susmHX7.js +1 -0
- package/dashboard/assets/input-TuVPR3Zl.js +1 -0
- package/dashboard/assets/jsx-runtime-MGseXjj5.js +3 -0
- package/dashboard/assets/live-page-HWWHX99U.js +1 -0
- package/dashboard/assets/meta-tile-ckHo-w7k.js +1 -0
- package/dashboard/assets/operations-BxZ0OoXO.js +10 -0
- package/dashboard/assets/operations-CMFVrXEe.css +2 -0
- package/dashboard/assets/operations-app-D3d35rgo.js +46 -0
- package/dashboard/assets/overview-page-W_4IteEr.js +1 -0
- package/dashboard/assets/page-header-Bw9AJgBV.js +1 -0
- package/dashboard/assets/scans-page-CgzVXHnn.js +1 -0
- package/dashboard/assets/siren-KQj8QAnJ.js +1 -0
- package/dashboard/assets/table-8EDklulN.js +1 -0
- package/dashboard/assets/tabs-CFHPOwg8.js +1 -0
- package/dashboard/index.html +4 -5
- package/node_modules/node-addon-api/LICENSE.md +9 -0
- package/node_modules/node-addon-api/README.md +95 -0
- package/node_modules/node-addon-api/common.gypi +21 -0
- package/node_modules/node-addon-api/except.gypi +25 -0
- package/node_modules/node-addon-api/index.js +14 -0
- package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
- package/node_modules/node-addon-api/napi-inl.h +7250 -0
- package/node_modules/node-addon-api/napi.h +3463 -0
- package/node_modules/node-addon-api/node_addon_api.gyp +42 -0
- package/node_modules/node-addon-api/node_api.gyp +9 -0
- package/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +21 -0
- package/node_modules/node-addon-api/package.json +481 -0
- package/node_modules/node-addon-api/tools/README.md +73 -0
- package/node_modules/node-addon-api/tools/check-napi.js +99 -0
- package/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/node_modules/node-addon-api/tools/conversion.js +301 -0
- package/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/node-gyp-build/package.json +43 -0
- package/node_modules/tree-sitter/LICENSE +21 -0
- package/node_modules/tree-sitter/README.md +90 -0
- package/node_modules/tree-sitter/binding.gyp +76 -0
- package/node_modules/tree-sitter/index.js +895 -0
- package/node_modules/tree-sitter/package.json +62 -0
- package/node_modules/tree-sitter/prebuilds/darwin-arm64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/darwin-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/linux-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/win32-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/src/addon_data.h +47 -0
- package/node_modules/tree-sitter/src/binding.cc +35 -0
- package/node_modules/tree-sitter/src/conversions.cc +140 -0
- package/node_modules/tree-sitter/src/conversions.h +22 -0
- package/node_modules/tree-sitter/src/language.cc +106 -0
- package/node_modules/tree-sitter/src/language.h +17 -0
- package/node_modules/tree-sitter/src/logger.cc +70 -0
- package/node_modules/tree-sitter/src/logger.h +19 -0
- package/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
- package/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
- package/node_modules/tree-sitter/src/node.cc +1056 -0
- package/node_modules/tree-sitter/src/node.h +30 -0
- package/node_modules/tree-sitter/src/parser.cc +298 -0
- package/node_modules/tree-sitter/src/parser.h +35 -0
- package/node_modules/tree-sitter/src/query.cc +383 -0
- package/node_modules/tree-sitter/src/query.h +39 -0
- package/node_modules/tree-sitter/src/tree.cc +307 -0
- package/node_modules/tree-sitter/src/tree.h +45 -0
- package/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
- package/node_modules/tree-sitter/src/tree_cursor.h +52 -0
- package/node_modules/tree-sitter/tree-sitter.d.ts +211 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/LICENSE +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/README.md +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/README.md +6 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +1266 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +290 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +11 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +501 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +36 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +221 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +299 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +419 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +49 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +14 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +774 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2151 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +230 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +62 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4134 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +34 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +95 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +899 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +133 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1060 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +382 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +165 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +714 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +29 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +448 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +733 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +881 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +50 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +23 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +109 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +1294 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +1823 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +31 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/test/fixtures/grammars/.gitkeep +0 -0
- package/node_modules/tree-sitter-c/LICENSE +21 -0
- package/node_modules/tree-sitter-c/README.md +18 -0
- package/node_modules/tree-sitter-c/binding.gyp +20 -0
- package/node_modules/tree-sitter-c/bindings/node/binding.cc +20 -0
- package/node_modules/tree-sitter-c/bindings/node/index.d.ts +28 -0
- package/node_modules/tree-sitter-c/bindings/node/index.js +7 -0
- package/node_modules/tree-sitter-c/grammar.js +1463 -0
- package/node_modules/tree-sitter-c/package.json +108 -0
- package/node_modules/tree-sitter-c/prebuilds/darwin-arm64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/darwin-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/linux-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/win32-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/queries/highlights.scm +81 -0
- package/node_modules/tree-sitter-c/queries/tags.scm +9 -0
- package/node_modules/tree-sitter-c/src/grammar.json +9682 -0
- package/node_modules/tree-sitter-c/src/node-types.json +4556 -0
- package/node_modules/tree-sitter-c/src/parser.c +113852 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/alloc.h +54 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/array.h +290 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/parser.h +265 -0
- package/package.json +20 -13
- package/vendor/tree-sitter-0.21.1-node24.json +16 -0
- package/vendor/tree-sitter-0.21.1-node24.tgz +0 -0
- package/chunks/adapt-loop-SMH6V4PD.js +0 -18
- package/chunks/appsec-catalog-CBWHGTEL.js +0 -24
- package/chunks/chunk-242TMK6G.js +0 -110
- package/chunks/chunk-57ZENEX2.js +0 -169
- package/chunks/chunk-ADOLI6DT.js +0 -102
- package/chunks/chunk-ATATQACO.js +0 -471
- package/chunks/chunk-C2WXWFBB.js +0 -1070
- package/chunks/chunk-F3WBKITT.js +0 -687
- package/chunks/chunk-H2FFLZNK.js +0 -3
- package/chunks/chunk-LP3HHYQU.js +0 -245
- package/chunks/chunk-QI233I24.js +0 -333
- package/chunks/chunk-RRMJC3ZE.js +0 -105
- package/chunks/chunk-Z5FA2XOX.js +0 -2798
- package/chunks/cost-ledger-NU63MYZM.js +0 -13
- package/chunks/db-KFWOAUUB.js +0 -16
- package/chunks/eval-runner-7ZF472KV.js +0 -27
- package/chunks/fix-IG7LYXH3.js +0 -12
- package/chunks/harness-7ODOLOWU.js +0 -22
- package/chunks/http-conformance-DU66MZIU.js +0 -11
- package/chunks/http-sender-GWH2IYEA.js +0 -10
- package/chunks/hunt-scan-MMKUOETU.js +0 -38
- package/chunks/memsafety-scan-J7SECV5W.js +0 -16
- package/chunks/npm-dynamic-discovery-AHROOZDB.js +0 -13
- package/chunks/orchestrate-OC2VZN2X.js +0 -62
- package/chunks/pipeline-BZK5BLJR.js +0 -14
- package/chunks/prepare-MYY743TK.js +0 -13
- package/chunks/process-LQRCS5OY.js +0 -13
- package/chunks/replay-runner-45G3VU7X.js +0 -39
- package/chunks/runtime-J7PLXZNM.js +0 -12
- package/chunks/scope-BI7BF4ZY.js +0 -18
- package/chunks/source-files-PWRQR6LY.js +0 -12
- package/chunks/variant-candidates-YERCYMPD.js +0 -13
- package/dashboard/assets/0sec-icon-66SreztZ.gif +0 -0
- package/dashboard/assets/bot-yILPnRgD.js +0 -1
- package/dashboard/assets/chevron-down-BeDJ-Vka.js +0 -1
- package/dashboard/assets/circle-alert-BEnMBMT-.js +0 -1
- package/dashboard/assets/client-DRYsuOGl.js +0 -9
- package/dashboard/assets/copy-Bi5vzoF9.js +0 -1
- package/dashboard/assets/desktop-CXTQonNm.js +0 -32
- package/dashboard/assets/desktop-NOekk4QS.css +0 -1
- package/dashboard/assets/dist-CmX-h7a4.js +0 -1
- package/dashboard/assets/dist-DAwYQmf_.js +0 -45
- package/dashboard/assets/findings-page-CACW9nw2.js +0 -5
- package/dashboard/assets/format-PoISqsES.js +0 -1
- package/dashboard/assets/jsx-runtime-C7oxC63R.js +0 -1
- package/dashboard/assets/live-page-DrgQqQK5.js +0 -1
- package/dashboard/assets/meta-tile-CcskIV_o.js +0 -1
- package/dashboard/assets/operations-BKE8T-vY.css +0 -2
- package/dashboard/assets/operations-D8nUP5_m.js +0 -4
- package/dashboard/assets/operations-app-CQQhG54n.js +0 -2
- package/dashboard/assets/overview-page-DTGS8dPo.js +0 -1
- package/dashboard/assets/page-header-MFVvEtZW.js +0 -1
- package/dashboard/assets/play-Dwo-9xt6.js +0 -1
- package/dashboard/assets/scans-page-ChVtq8Us.js +0 -1
- package/dashboard/assets/search-CiooTLck.js +0 -1
- package/dashboard/assets/siren-CCBwTSuk.js +0 -1
- package/dashboard/assets/table-BYS-nIVA.js +0 -1
- package/dashboard/assets/tabs-DivxbhQy.js +0 -1
- package/dashboard/desktop.html +0 -21
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as
|
|
3
|
-
const require =
|
|
2
|
+
import { createRequire as __0CreateRequire } from "node:module";
|
|
3
|
+
const require = __0CreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
homeStateDir
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-76KSBWOQ.js";
|
|
7
7
|
|
|
8
8
|
// packages/core/dist/triage/kernel-vm-runner.js
|
|
9
9
|
import { execFileSync, spawn } from "node:child_process";
|
|
@@ -196,7 +196,7 @@ function inferDiskFormat(diskImage) {
|
|
|
196
196
|
return diskImage.endsWith(".qcow2") || diskImage.endsWith(".qcow") ? "qcow2" : "raw";
|
|
197
197
|
}
|
|
198
198
|
function defaultKernelCacheDir() {
|
|
199
|
-
return process.env["
|
|
199
|
+
return process.env["ZERO_KERNEL_BUILD_CACHE"]?.trim() || join(homeStateDir(), "kernel-cache");
|
|
200
200
|
}
|
|
201
201
|
function kernelTreeFingerprint(kernelTree) {
|
|
202
202
|
try {
|
|
@@ -232,7 +232,7 @@ function sha256File(path) {
|
|
|
232
232
|
return createHash("sha256").update(readFileSync(path)).digest("hex");
|
|
233
233
|
}
|
|
234
234
|
function expectedKernelRelease(kernelTree, explicit, requireExplicit = false) {
|
|
235
|
-
const fromEnv = explicit?.trim() || process.env["
|
|
235
|
+
const fromEnv = explicit?.trim() || process.env["ZERO_KERNEL_QEMU_EXPECTED_RELEASE"]?.trim();
|
|
236
236
|
if (fromEnv) {
|
|
237
237
|
if (!RELEASE_RE.test(fromEnv))
|
|
238
238
|
throw new Error("invalid expected kernel release");
|
|
@@ -251,7 +251,7 @@ function expectedKernelRelease(kernelTree, explicit, requireExplicit = false) {
|
|
|
251
251
|
const version = part("VERSION"), patch = part("PATCHLEVEL"), sub = part("SUBLEVEL") ?? "0", extra = part("EXTRAVERSION") ?? "";
|
|
252
252
|
const release = version && patch ? `${version}.${patch}.${sub}${extra}` : "";
|
|
253
253
|
if (!RELEASE_RE.test(release))
|
|
254
|
-
throw new Error("cannot determine expected kernel release; set
|
|
254
|
+
throw new Error("cannot determine expected kernel release; set ZERO_KERNEL_QEMU_EXPECTED_RELEASE");
|
|
255
255
|
return release;
|
|
256
256
|
}
|
|
257
257
|
function kernelBuildCacheKey(kernelTree, configProfile) {
|
|
@@ -270,7 +270,7 @@ function defaultBuildRunner(input) {
|
|
|
270
270
|
join(process.cwd(), "src/triage/kernel-vm/build-from-tree.sh")
|
|
271
271
|
].find((candidate) => existsSync(candidate));
|
|
272
272
|
if (!script) {
|
|
273
|
-
throw new Error("kernel build script not found; set
|
|
273
|
+
throw new Error("kernel build script not found; set ZERO_KERNEL_QEMU_KERNEL/ZERO_KERNEL_QEMU_DISK to prebuilt artifacts or run from a source checkout");
|
|
274
274
|
}
|
|
275
275
|
execFileSync("bash", [script, input.kernelTree, input.outDir, input.configProfile], {
|
|
276
276
|
stdio: "inherit"
|
|
@@ -279,14 +279,14 @@ function defaultBuildRunner(input) {
|
|
|
279
279
|
function prepareKernelVmArtifacts(opts) {
|
|
280
280
|
const configProfile = opts.configProfile ?? "kasan";
|
|
281
281
|
const log = opts.logger ?? ((line) => console.log(line));
|
|
282
|
-
const envKernel = process.env["
|
|
283
|
-
const envDisk = process.env["
|
|
282
|
+
const envKernel = process.env["ZERO_KERNEL_QEMU_KERNEL"]?.trim();
|
|
283
|
+
const envDisk = process.env["ZERO_KERNEL_QEMU_DISK"]?.trim();
|
|
284
284
|
if (!opts.force && envKernel && envDisk && existsSync(envKernel) && existsSync(envDisk)) {
|
|
285
|
-
log(`[kernel-cache] env-override: using
|
|
285
|
+
log(`[kernel-cache] env-override: using ZERO_KERNEL_QEMU_KERNEL/DISK (skipping build)`);
|
|
286
286
|
return {
|
|
287
287
|
kernelImage: envKernel,
|
|
288
288
|
diskImage: envDisk,
|
|
289
|
-
kernelConfig: process.env["
|
|
289
|
+
kernelConfig: process.env["ZERO_KERNEL_QEMU_CONFIG"]?.trim() || "",
|
|
290
290
|
cacheKey: "env",
|
|
291
291
|
cacheDir: "",
|
|
292
292
|
cacheStatus: "env",
|
|
@@ -343,45 +343,45 @@ function warnIfKcsanUnsupported(configProfile, kernelConfigPath, log) {
|
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
function loadKernelVmConfigFromEnv() {
|
|
346
|
-
const kernelImage = process.env["
|
|
347
|
-
const diskImage = process.env["
|
|
346
|
+
const kernelImage = process.env["ZERO_KERNEL_QEMU_KERNEL"]?.trim();
|
|
347
|
+
const diskImage = process.env["ZERO_KERNEL_QEMU_DISK"]?.trim();
|
|
348
348
|
const missing = [
|
|
349
|
-
!kernelImage ? "
|
|
350
|
-
!diskImage ? "
|
|
349
|
+
!kernelImage ? "ZERO_KERNEL_QEMU_KERNEL" : "",
|
|
350
|
+
!diskImage ? "ZERO_KERNEL_QEMU_DISK" : ""
|
|
351
351
|
].filter(Boolean);
|
|
352
352
|
if (missing.length > 0) {
|
|
353
353
|
throw new Error(`kernel VM runner is enabled but missing required env vars: ${missing.join(", ")}`);
|
|
354
354
|
}
|
|
355
355
|
const resolvedKernelImage = kernelImage;
|
|
356
356
|
const resolvedDiskImage = diskImage;
|
|
357
|
-
const kaslr = /^(1|true|on|yes)$/i.test(process.env["
|
|
358
|
-
const explicitAppend = process.env["
|
|
357
|
+
const kaslr = /^(1|true|on|yes)$/i.test(process.env["ZERO_KERNEL_QEMU_KASLR"]?.trim() ?? "");
|
|
358
|
+
const explicitAppend = process.env["ZERO_KERNEL_QEMU_APPEND"]?.trim();
|
|
359
359
|
const kernelAppend = explicitAppend || buildKernelAppend(kaslr);
|
|
360
|
-
const widenSymbol = process.env["
|
|
361
|
-
const widenOffsetRaw = process.env["
|
|
362
|
-
const widenDelayRaw = process.env["
|
|
363
|
-
const weaponizeInitramfs = /^(1|true|on|yes)$/i.test(process.env["
|
|
364
|
-
const initramfsModules = (process.env["
|
|
365
|
-
const busyboxPath = process.env["
|
|
360
|
+
const widenSymbol = process.env["ZERO_KERNEL_QEMU_WIDEN_SYMBOL"]?.trim() || void 0;
|
|
361
|
+
const widenOffsetRaw = process.env["ZERO_KERNEL_QEMU_WIDEN_OFFSET"]?.trim();
|
|
362
|
+
const widenDelayRaw = process.env["ZERO_KERNEL_QEMU_WIDEN_DELAY_MS"]?.trim();
|
|
363
|
+
const weaponizeInitramfs = /^(1|true|on|yes)$/i.test(process.env["ZERO_KERNEL_QEMU_INITRAMFS"]?.trim() ?? "") || /^(1|true|on|yes)$/i.test(process.env.USE_KERNEL_WEAPONIZE?.trim() ?? "");
|
|
364
|
+
const initramfsModules = (process.env["ZERO_KERNEL_QEMU_INITRAMFS_MODULES"]?.trim() || "").split(/[:,\s]+/).map((m) => m.trim()).filter(Boolean);
|
|
365
|
+
const busyboxPath = process.env["ZERO_KERNEL_QEMU_BUSYBOX"]?.trim() || void 0;
|
|
366
366
|
return {
|
|
367
|
-
qemuBinary: process.env["
|
|
367
|
+
qemuBinary: process.env["ZERO_KERNEL_QEMU_BINARY"]?.trim() || "qemu-system-x86_64",
|
|
368
368
|
kernelImage: resolvedKernelImage,
|
|
369
369
|
diskImage: resolvedDiskImage,
|
|
370
|
-
diskFormat: process.env["
|
|
371
|
-
bootTimeoutSec: parseInt(process.env["
|
|
372
|
-
memoryMb: parseInt(process.env["
|
|
373
|
-
smp: parseInt(process.env["
|
|
370
|
+
diskFormat: process.env["ZERO_KERNEL_QEMU_DISK_FORMAT"]?.trim() || inferDiskFormat(resolvedDiskImage),
|
|
371
|
+
bootTimeoutSec: parseInt(process.env["ZERO_KERNEL_QEMU_BOOT_TIMEOUT_SEC"]?.trim() || "120", 10),
|
|
372
|
+
memoryMb: parseInt(process.env["ZERO_KERNEL_QEMU_MEMORY_MB"]?.trim() || "2048", 10),
|
|
373
|
+
smp: parseInt(process.env["ZERO_KERNEL_QEMU_SMP"]?.trim() || "2", 10),
|
|
374
374
|
kernelAppend,
|
|
375
|
-
qemuAccel: process.env["
|
|
376
|
-
initrdPath: process.env["
|
|
377
|
-
timeoutSec: parseInt(process.env["
|
|
378
|
-
shareTag: process.env["
|
|
379
|
-
artifactDir: process.env["
|
|
375
|
+
qemuAccel: process.env["ZERO_KERNEL_QEMU_ACCEL"]?.trim() || void 0,
|
|
376
|
+
initrdPath: process.env["ZERO_KERNEL_QEMU_INITRD"]?.trim() || void 0,
|
|
377
|
+
timeoutSec: parseInt(process.env["ZERO_KERNEL_QEMU_TIMEOUT_SEC"]?.trim() || "60", 10),
|
|
378
|
+
shareTag: process.env["ZERO_KERNEL_QEMU_SHARE_TAG"]?.trim() || "osecshare",
|
|
379
|
+
artifactDir: process.env["ZERO_KERNEL_QEMU_ARTIFACT_DIR"]?.trim() || void 0,
|
|
380
380
|
kaslr,
|
|
381
381
|
...widenSymbol ? { widenSymbol } : {},
|
|
382
382
|
...widenOffsetRaw && Number.isFinite(parseInt(widenOffsetRaw, 16)) ? { widenOffset: parseInt(widenOffsetRaw, 16) } : {},
|
|
383
383
|
...widenDelayRaw && Number.isFinite(parseInt(widenDelayRaw, 10)) ? { widenDelayMs: parseInt(widenDelayRaw, 10) } : {},
|
|
384
|
-
...process.env["
|
|
384
|
+
...process.env["ZERO_KERNEL_QEMU_GUEST_BUILD_DIR"]?.trim() ? { guestKernelBuildDir: process.env["ZERO_KERNEL_QEMU_GUEST_BUILD_DIR"].trim() } : {},
|
|
385
385
|
weaponizeInitramfs,
|
|
386
386
|
...initramfsModules.length > 0 ? { initramfsModules } : {},
|
|
387
387
|
...busyboxPath ? { busyboxPath } : {}
|
|
@@ -389,13 +389,13 @@ function loadKernelVmConfigFromEnv() {
|
|
|
389
389
|
}
|
|
390
390
|
function buildKernelAppend(kaslr) {
|
|
391
391
|
const base = "console=ttyS0 root=/dev/vda rw";
|
|
392
|
-
const tail = "panic=-1 init=/sbin/
|
|
392
|
+
const tail = "panic=-1 init=/sbin/0-init";
|
|
393
393
|
return `${base} ${kaslr ? "kaslr" : "nokaslr"} ${tail}`;
|
|
394
394
|
}
|
|
395
395
|
function renderRaceWidenModuleSource(symbol, offset, delayMs) {
|
|
396
396
|
const off = `0x${offset.toString(16)}`;
|
|
397
397
|
return [
|
|
398
|
-
"//
|
|
398
|
+
"// 0 race-widening kprobe: inject mdelay() at the faulting PC to widen",
|
|
399
399
|
"// the UAF/race window. Best-effort; harmless if the probe fails to register.",
|
|
400
400
|
"#include <linux/module.h>",
|
|
401
401
|
"#include <linux/kernel.h>",
|
|
@@ -419,7 +419,7 @@ function renderRaceWidenModuleSource(symbol, offset, delayMs) {
|
|
|
419
419
|
"",
|
|
420
420
|
"static int __init widen_init(void) {",
|
|
421
421
|
" kp.pre_handler = handler_pre;",
|
|
422
|
-
` pr_info("
|
|
422
|
+
` pr_info("0-widen: probing ${symbol}+${off} delay=%lums\\n", widen_delay_ms);`,
|
|
423
423
|
" return register_kprobe(&kp);",
|
|
424
424
|
"}",
|
|
425
425
|
"",
|
|
@@ -500,8 +500,8 @@ function renderRealIpiRaceHarness(spec) {
|
|
|
500
500
|
"}",
|
|
501
501
|
"",
|
|
502
502
|
"int main(void) {",
|
|
503
|
-
` long retries = osec_env_long("
|
|
504
|
-
` long seconds = osec_env_long("
|
|
503
|
+
` long retries = osec_env_long("ZERO_RACE_RETRIES", ${maxIters});`,
|
|
504
|
+
` long seconds = osec_env_long("ZERO_RACE_SECONDS", ${seconds});`,
|
|
505
505
|
" time_t deadline = time(NULL) + seconds;",
|
|
506
506
|
"",
|
|
507
507
|
" /* Arm the widening tactics ONCE (freeze/register + IPI bursts). */",
|
|
@@ -519,9 +519,9 @@ function renderRealIpiRaceHarness(spec) {
|
|
|
519
519
|
" g_stop = 1;",
|
|
520
520
|
" pthread_join(ta, NULL);",
|
|
521
521
|
" pthread_join(tb, NULL);",
|
|
522
|
-
' if ((iter & 0x3ff) == 0) { printf("
|
|
522
|
+
' if ((iter & 0x3ff) == 0) { printf("ZERO-RACE iter=%ld\\n", iter); fflush(stdout); }',
|
|
523
523
|
" }",
|
|
524
|
-
' printf("
|
|
524
|
+
' printf("ZERO-RACE done (budget exhausted, no splat)\\n");',
|
|
525
525
|
" fflush(stdout);",
|
|
526
526
|
" return 0;",
|
|
527
527
|
"}"
|
|
@@ -571,7 +571,7 @@ function buildInitramfsKernelAppend(kaslr) {
|
|
|
571
571
|
].join(" ");
|
|
572
572
|
}
|
|
573
573
|
function renderInitramfsInitScript(moduleNames, raceEnv, timeoutSec) {
|
|
574
|
-
const raceEnvEntries = Object.entries(raceEnv).filter(([key]) => /^
|
|
574
|
+
const raceEnvEntries = Object.entries(raceEnv).filter(([key]) => /^ZERO_RACE_[A-Z0-9_]+$/.test(key));
|
|
575
575
|
const envAssignments = raceEnvEntries.map(([key, value]) => `${key}=${shellQuote(value)}`).join(" ");
|
|
576
576
|
const exploitCommand = [
|
|
577
577
|
envAssignments ? `/bin/busybox env ${envAssignments}` : "",
|
|
@@ -585,10 +585,10 @@ function renderInitramfsInitScript(moduleNames, raceEnv, timeoutSec) {
|
|
|
585
585
|
"/bin/busybox mount -t sysfs none /sys",
|
|
586
586
|
"/bin/busybox mount -t devtmpfs none /dev 2>/dev/null",
|
|
587
587
|
"/bin/busybox --install -s /bin 2>/dev/null",
|
|
588
|
-
'echo "===
|
|
588
|
+
'echo "=== ZERO-INITRAMFS weaponize lane up ==="',
|
|
589
589
|
"cat /proc/version",
|
|
590
590
|
insmods,
|
|
591
|
-
'echo "===
|
|
591
|
+
'echo "=== ZERO-INITRAMFS run (env: ' + raceEnvEntries.map(([key]) => key).join(",") + ') ==="',
|
|
592
592
|
// CRITICAL: the engine's emitted exploit prints a RECLAIM marker on EVERY
|
|
593
593
|
// spray-loop iteration (thousands/sec). Streaming that to the slow 8250 UART
|
|
594
594
|
// wedges the CPU in io_serial_in and STARVES the race (NMI watchdog fires,
|
|
@@ -598,13 +598,13 @@ function renderInitramfsInitScript(moduleNames, raceEnv, timeoutSec) {
|
|
|
598
598
|
// stream either way, and the KASAN splats (kernel printk, a separate path)
|
|
599
599
|
// still interleave live. `timeout` caps a hung flood; busybox `timeout` takes
|
|
600
600
|
// the seconds as a POSITIONAL arg (`timeout SECS PROG`), NOT GNU `-t SECS`.
|
|
601
|
-
`${exploitCommand} || echo "
|
|
602
|
-
'echo "===
|
|
601
|
+
`${exploitCommand} || echo "ZERO-INITRAMFS exploit exit=$?" >> /tmp/run.log`,
|
|
602
|
+
'echo "=== ZERO-INITRAMFS exploit output (batched off the UART hot path) ==="',
|
|
603
603
|
"cat /tmp/run.log",
|
|
604
|
-
'echo "===
|
|
604
|
+
'echo "=== ZERO-INITRAMFS post-run ==="',
|
|
605
605
|
"sync",
|
|
606
|
-
"cat /tmp/pwned 2>/dev/null && echo
|
|
607
|
-
'echo "===
|
|
606
|
+
"cat /tmp/pwned 2>/dev/null && echo ZERO-INITRAMFS-PWNED-FILE-PRESENT",
|
|
607
|
+
'echo "=== ZERO-INITRAMFS done; powering off ==="',
|
|
608
608
|
"/bin/busybox poweroff -f"
|
|
609
609
|
].join("\n");
|
|
610
610
|
}
|
|
@@ -623,7 +623,7 @@ function buildWeaponizeInitramfs(config, exploitC, workDir, raceEnv) {
|
|
|
623
623
|
}
|
|
624
624
|
})();
|
|
625
625
|
if (!busybox || !existsSync(busybox)) {
|
|
626
|
-
throw new Error("weaponize-initramfs lane: no busybox found (set
|
|
626
|
+
throw new Error("weaponize-initramfs lane: no busybox found (set ZERO_KERNEL_QEMU_BUSYBOX to a STATIC busybox)");
|
|
627
627
|
}
|
|
628
628
|
execFileSync("cp", [busybox, join(rootDir, "bin", "busybox")]);
|
|
629
629
|
chmodSync(join(rootDir, "bin", "busybox"), 493);
|
|
@@ -686,11 +686,11 @@ function buildInitramfsQemuCommand(config, serialLogPath, initramfsPath, kernelA
|
|
|
686
686
|
function collectRaceEnv() {
|
|
687
687
|
const out = {};
|
|
688
688
|
for (const key of [
|
|
689
|
-
"
|
|
690
|
-
"
|
|
691
|
-
"
|
|
692
|
-
"
|
|
693
|
-
"
|
|
689
|
+
"ZERO_RACE_FLOOD_THREADS",
|
|
690
|
+
"ZERO_RACE_SPRAY_THREADS",
|
|
691
|
+
"ZERO_RACE_PARK_US",
|
|
692
|
+
"ZERO_RACE_SECONDS",
|
|
693
|
+
"ZERO_RACE_SAME_CPU"
|
|
694
694
|
]) {
|
|
695
695
|
const v = process.env[key]?.trim();
|
|
696
696
|
if (v)
|
|
@@ -721,8 +721,8 @@ function renderGuestRunnerScript(config, language, request) {
|
|
|
721
721
|
return [
|
|
722
722
|
"#!/bin/sh",
|
|
723
723
|
"set -eu",
|
|
724
|
-
"SHARE_DIR=/mnt/
|
|
725
|
-
"WORK_DIR=/tmp/
|
|
724
|
+
"SHARE_DIR=/mnt/0",
|
|
725
|
+
"WORK_DIR=/tmp/0-run",
|
|
726
726
|
'mkdir -p "$WORK_DIR"',
|
|
727
727
|
"compiled=0",
|
|
728
728
|
"executed=0",
|
|
@@ -782,12 +782,12 @@ function renderGuestRunnerScript(config, language, request) {
|
|
|
782
782
|
' if make -C "$KBUILD_DIR" M="$WORK_DIR" modules >"$SHARE_DIR/widen.log" 2>&1 \\',
|
|
783
783
|
' && insmod "$WORK_DIR/osec_widen.ko" >>"$SHARE_DIR/widen.log" 2>&1; then',
|
|
784
784
|
" widened=1",
|
|
785
|
-
' printf "%s\\n" "
|
|
785
|
+
' printf "%s\\n" "0-widen: insmod ok" >> "$SHARE_DIR/widen.log"',
|
|
786
786
|
" else",
|
|
787
|
-
' printf "%s\\n" "
|
|
787
|
+
' printf "%s\\n" "0-widen: build/insmod failed \u2014 running WITHOUT widening" >> "$SHARE_DIR/widen.log"',
|
|
788
788
|
" fi",
|
|
789
789
|
"else",
|
|
790
|
-
' printf "%s\\n" "
|
|
790
|
+
' printf "%s\\n" "0-widen: no kernel build tree in guest \u2014 running WITHOUT widening" > "$SHARE_DIR/widen.log"',
|
|
791
791
|
"fi",
|
|
792
792
|
'printf "%s\\n" "$widened" > "$SHARE_DIR/widened.ok"'
|
|
793
793
|
] : [];
|
|
@@ -800,8 +800,8 @@ function renderGuestRunnerScript(config, language, request) {
|
|
|
800
800
|
"# after \u2014 so the captured output carries an ordered DROP(uid!=0)\u2192ROOT(uid=0)",
|
|
801
801
|
"# witness the oracle uses to confirm a genuine escalation. We must therefore",
|
|
802
802
|
"# run it directly (as root), NOT via su/sudo to a lower uid.",
|
|
803
|
-
"SHARE_DIR=/mnt/
|
|
804
|
-
"WORK_DIR=/tmp/
|
|
803
|
+
"SHARE_DIR=/mnt/0",
|
|
804
|
+
"WORK_DIR=/tmp/0-run",
|
|
805
805
|
'mkdir -p "$WORK_DIR"',
|
|
806
806
|
"compiled=0",
|
|
807
807
|
"executed=0",
|
|
@@ -887,7 +887,7 @@ async function waitForInitramfsVm(config, proc, serialLogPath) {
|
|
|
887
887
|
return { poweredOff: true };
|
|
888
888
|
if (existsSync(serialLogPath)) {
|
|
889
889
|
const tail = readFileSync(serialLogPath, "utf-8").slice(-2e3);
|
|
890
|
-
if (tail.includes("
|
|
890
|
+
if (tail.includes("ZERO-INITRAMFS done"))
|
|
891
891
|
return { poweredOff: true };
|
|
892
892
|
}
|
|
893
893
|
await sleep(1e3);
|
|
@@ -897,8 +897,8 @@ async function waitForInitramfsVm(config, proc, serialLogPath) {
|
|
|
897
897
|
async function runWeaponizeInitramfs(config, exploitC) {
|
|
898
898
|
const hostTmpDir = config.artifactDir ? (() => {
|
|
899
899
|
mkdirSync(config.artifactDir, { recursive: true });
|
|
900
|
-
return mkdtempSync(join(config.artifactDir, "
|
|
901
|
-
})() : mkdtempSync(join(tmpdir(), "
|
|
900
|
+
return mkdtempSync(join(config.artifactDir, "0-initramfs-"));
|
|
901
|
+
})() : mkdtempSync(join(tmpdir(), "0-initramfs-"));
|
|
902
902
|
const serialLogPath = join(hostTmpDir, "serial.log");
|
|
903
903
|
const raceEnv = collectRaceEnv();
|
|
904
904
|
let initramfsPath;
|
|
@@ -922,7 +922,7 @@ async function runWeaponizeInitramfs(config, exploitC) {
|
|
|
922
922
|
try {
|
|
923
923
|
const { poweredOff } = await waitForInitramfsVm(config, vmProc, serialLogPath);
|
|
924
924
|
const serial = existsSync(serialLogPath) ? readFileSync(serialLogPath, "utf-8") : "";
|
|
925
|
-
const executed = serial.includes("
|
|
925
|
+
const executed = serial.includes("ZERO-INITRAMFS run");
|
|
926
926
|
const timedOut = !poweredOff;
|
|
927
927
|
if (executed) {
|
|
928
928
|
assertBugAttribution({
|
|
@@ -964,19 +964,19 @@ async function runReproducerInKernelVm(report) {
|
|
|
964
964
|
}
|
|
965
965
|
const hostTmpDir = config.artifactDir ? (() => {
|
|
966
966
|
mkdirSync(config.artifactDir, { recursive: true });
|
|
967
|
-
return mkdtempSync(join(config.artifactDir, "
|
|
968
|
-
})() : mkdtempSync(join(tmpdir(), "
|
|
967
|
+
return mkdtempSync(join(config.artifactDir, "0-kvm-"));
|
|
968
|
+
})() : mkdtempSync(join(tmpdir(), "0-kvm-"));
|
|
969
969
|
const language = report.reproducerLanguage ?? "c";
|
|
970
970
|
const request = report.executionAttestationRequest ?? (() => {
|
|
971
|
-
const release = process.env["
|
|
971
|
+
const release = process.env["ZERO_KERNEL_QEMU_EXPECTED_RELEASE"]?.trim();
|
|
972
972
|
if (!release || !RELEASE_RE.test(release))
|
|
973
|
-
throw new Error("direct kernel VM execution requires
|
|
973
|
+
throw new Error("direct kernel VM execution requires ZERO_KERNEL_QEMU_EXPECTED_RELEASE");
|
|
974
974
|
return {
|
|
975
975
|
nonce: randomBytes(16).toString("hex"),
|
|
976
976
|
reproducerSha256: createHash("sha256").update(report.reproducer).digest("hex"),
|
|
977
977
|
expectedKernelRelease: release,
|
|
978
978
|
kernelImageSha256: sha256File(config.kernelImage),
|
|
979
|
-
kernelConfigSha256: sha256File(process.env["
|
|
979
|
+
kernelConfigSha256: sha256File(process.env["ZERO_KERNEL_QEMU_CONFIG"]?.trim() || "")
|
|
980
980
|
};
|
|
981
981
|
})();
|
|
982
982
|
const sourcePath = join(hostTmpDir, language === "syz" ? "repro.syz" : "repro.c");
|
|
@@ -1061,7 +1061,7 @@ function detectKernelSignature(dmesg) {
|
|
|
1061
1061
|
function defaultDmesgOutPath() {
|
|
1062
1062
|
const ns = process.hrtime.bigint().toString();
|
|
1063
1063
|
const random = Math.random().toString(36).slice(2, 10);
|
|
1064
|
-
return join(tmpdir(), `
|
|
1064
|
+
return join(tmpdir(), `0-verify-${ns}-${random}.dmesg`);
|
|
1065
1065
|
}
|
|
1066
1066
|
function writeProofFileReadOnly(path, content) {
|
|
1067
1067
|
mkdirSync(dirname(path), { recursive: true });
|
|
@@ -1112,7 +1112,7 @@ async function verifyKernelFinding(opts) {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
const build_cache_hit = artifacts.cacheStatus === "hit" || artifacts.cacheStatus === "env";
|
|
1114
1114
|
mkdirSync(dirname(dmesgOutPath), { recursive: true });
|
|
1115
|
-
const launchDir = mkdtempSync(join(dirname(dmesgOutPath), ".
|
|
1115
|
+
const launchDir = mkdtempSync(join(dirname(dmesgOutPath), ".0-kernel-launch-"));
|
|
1116
1116
|
const stagedKernelImage = join(launchDir, "kernel.image");
|
|
1117
1117
|
const stagedKernelConfig = join(launchDir, "kernel.config");
|
|
1118
1118
|
let attestationRequest;
|
|
@@ -1136,20 +1136,20 @@ async function verifyKernelFinding(opts) {
|
|
|
1136
1136
|
return { status: "build_failed", dmesg_path: dmesgOutPath, build_cache_hit };
|
|
1137
1137
|
}
|
|
1138
1138
|
const previousEnv = {
|
|
1139
|
-
qemu: process.env["
|
|
1140
|
-
kernel: process.env["
|
|
1141
|
-
disk: process.env["
|
|
1142
|
-
cfg: process.env["
|
|
1143
|
-
cacheKey: process.env["
|
|
1139
|
+
qemu: process.env["ZERO_KERNEL_QEMU"],
|
|
1140
|
+
kernel: process.env["ZERO_KERNEL_QEMU_KERNEL"],
|
|
1141
|
+
disk: process.env["ZERO_KERNEL_QEMU_DISK"],
|
|
1142
|
+
cfg: process.env["ZERO_KERNEL_QEMU_CONFIG"],
|
|
1143
|
+
cacheKey: process.env["ZERO_KERNEL_QEMU_CACHEKEY"]
|
|
1144
1144
|
};
|
|
1145
|
-
process.env["
|
|
1146
|
-
process.env["
|
|
1147
|
-
process.env["
|
|
1145
|
+
process.env["ZERO_KERNEL_QEMU"] = "1";
|
|
1146
|
+
process.env["ZERO_KERNEL_QEMU_KERNEL"] = stagedKernelImage;
|
|
1147
|
+
process.env["ZERO_KERNEL_QEMU_DISK"] = artifacts.diskImage;
|
|
1148
1148
|
if (artifacts.kernelConfig) {
|
|
1149
|
-
process.env["
|
|
1149
|
+
process.env["ZERO_KERNEL_QEMU_CONFIG"] = stagedKernelConfig;
|
|
1150
1150
|
}
|
|
1151
1151
|
if (artifacts.cacheKey) {
|
|
1152
|
-
process.env["
|
|
1152
|
+
process.env["ZERO_KERNEL_QEMU_CACHEKEY"] = artifacts.cacheKey;
|
|
1153
1153
|
}
|
|
1154
1154
|
let runResult;
|
|
1155
1155
|
try {
|
|
@@ -1176,11 +1176,11 @@ async function verifyKernelFinding(opts) {
|
|
|
1176
1176
|
build_cache_hit
|
|
1177
1177
|
};
|
|
1178
1178
|
} finally {
|
|
1179
|
-
process.env["
|
|
1180
|
-
process.env["
|
|
1181
|
-
process.env["
|
|
1182
|
-
process.env["
|
|
1183
|
-
process.env["
|
|
1179
|
+
process.env["ZERO_KERNEL_QEMU"] = previousEnv.qemu;
|
|
1180
|
+
process.env["ZERO_KERNEL_QEMU_KERNEL"] = previousEnv.kernel;
|
|
1181
|
+
process.env["ZERO_KERNEL_QEMU_DISK"] = previousEnv.disk;
|
|
1182
|
+
process.env["ZERO_KERNEL_QEMU_CONFIG"] = previousEnv.cfg;
|
|
1183
|
+
process.env["ZERO_KERNEL_QEMU_CACHEKEY"] = previousEnv.cacheKey;
|
|
1184
1184
|
rmSync(launchDir, { recursive: true, force: true });
|
|
1185
1185
|
}
|
|
1186
1186
|
const dmesgContent = runResult.dmesg || runResult.output || "";
|