pwn 0.5.621 → 0.5.626

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 (124) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -2
  3. data/Gemfile +1 -1
  4. data/README.md +7 -1
  5. data/bin/pwn_gqrx_scanner +78 -9
  6. data/documentation/Agent-Tool-Registry.md +3 -3
  7. data/documentation/Configuration.md +301 -47
  8. data/documentation/Cron.md +5 -3
  9. data/documentation/Diagrams.md +1 -1
  10. data/documentation/Extrospection.md +472 -26
  11. data/documentation/FFI.md +72 -8
  12. data/documentation/Home.md +4 -4
  13. data/documentation/How-PWN-Works.md +7 -3
  14. data/documentation/Mistakes.md +9 -0
  15. data/documentation/SDR.md +83 -10
  16. data/documentation/Skills-Memory-Learning.md +101 -11
  17. data/documentation/diagrams/agent-tool-registry.svg +56 -55
  18. data/documentation/diagrams/ai-integration-tool-calling.svg +24 -24
  19. data/documentation/diagrams/aws-cloud-security.svg +25 -25
  20. data/documentation/diagrams/burp-vs-zap-preference.svg +12 -12
  21. data/documentation/diagrams/code-scanning-sast.svg +25 -25
  22. data/documentation/diagrams/cron-scheduling.svg +23 -23
  23. data/documentation/diagrams/dot/agent-tool-registry.dot +2 -2
  24. data/documentation/diagrams/dot/extrospection-world-awareness.dot +33 -6
  25. data/documentation/diagrams/dot/hardware-hacking.dot +3 -1
  26. data/documentation/diagrams/dot/memory-skills-detailed.dot +4 -2
  27. data/documentation/diagrams/dot/mistakes-negative-feedback.dot +4 -2
  28. data/documentation/diagrams/dot/overall-pwn-architecture.dot +3 -3
  29. data/documentation/diagrams/dot/persistence-filesystem.dot +3 -3
  30. data/documentation/diagrams/dot/pwn-ai-feedback-learning-loop.dot +10 -4
  31. data/documentation/diagrams/dot/sdr-radio-flow.dot +39 -16
  32. data/documentation/diagrams/driver-framework.svg +13 -13
  33. data/documentation/diagrams/extrospection-world-awareness.svg +383 -177
  34. data/documentation/diagrams/fuzzing-workflow.svg +24 -24
  35. data/documentation/diagrams/hardware-hacking.svg +84 -69
  36. data/documentation/diagrams/history-to-drivers.svg +18 -18
  37. data/documentation/diagrams/memory-skills-detailed.svg +137 -120
  38. data/documentation/diagrams/mistakes-negative-feedback.svg +152 -137
  39. data/documentation/diagrams/network-infra-testing.svg +27 -27
  40. data/documentation/diagrams/overall-pwn-architecture.svg +97 -97
  41. data/documentation/diagrams/penetration-testing-workflow.svg +30 -30
  42. data/documentation/diagrams/persistence-filesystem.svg +100 -94
  43. data/documentation/diagrams/plugin-ecosystem.svg +35 -35
  44. data/documentation/diagrams/pwn-ai-feedback-learning-loop.svg +254 -207
  45. data/documentation/diagrams/pwn-repl-prototyping.svg +20 -20
  46. data/documentation/diagrams/reporting-pipeline.svg +18 -18
  47. data/documentation/diagrams/reverse-engineering-flow.svg +21 -21
  48. data/documentation/diagrams/sdr-radio-flow.svg +223 -91
  49. data/documentation/diagrams/sessions-cron-automation.svg +18 -18
  50. data/documentation/diagrams/swarm-multi-agent.svg +39 -39
  51. data/documentation/diagrams/web-application-testing.svg +26 -26
  52. data/documentation/diagrams/zero-day-research-flow.svg +25 -25
  53. data/documentation/pwn-ai-Agent.md +16 -10
  54. data/documentation/pwn_silent_help_learn_demo.gif +0 -0
  55. data/lib/pwn/ai/agent/assembly.rb +1 -1
  56. data/lib/pwn/ai/agent/btc.rb +1 -1
  57. data/lib/pwn/ai/agent/burp_suite.rb +1 -1
  58. data/lib/pwn/ai/agent/extrospection.rb +2562 -57
  59. data/lib/pwn/ai/agent/gqrx.rb +2 -2
  60. data/lib/pwn/ai/agent/hacker_one.rb +1 -1
  61. data/lib/pwn/ai/agent/learning.rb +16 -16
  62. data/lib/pwn/ai/agent/loop.rb +1 -1
  63. data/lib/pwn/ai/agent/{introspection.rb → reflect.rb} +12 -12
  64. data/lib/pwn/ai/agent/sast.rb +1 -1
  65. data/lib/pwn/ai/agent/tools/extrospection.rb +311 -8
  66. data/lib/pwn/ai/agent/tools/learning.rb +7 -7
  67. data/lib/pwn/ai/agent/transparent_browser.rb +1 -1
  68. data/lib/pwn/ai/agent/vuln_gen.rb +2 -2
  69. data/lib/pwn/ai/agent.rb +1 -1
  70. data/lib/pwn/ai/open_ai.rb +10 -6
  71. data/lib/pwn/config.rb +5 -4
  72. data/lib/pwn/ffi/adalm_pluto.rb +498 -0
  73. data/lib/pwn/ffi/fftw.rb +192 -0
  74. data/lib/pwn/ffi/hack_rf.rb +193 -0
  75. data/lib/pwn/ffi/liquid.rb +244 -0
  76. data/lib/pwn/ffi/rtl_sdr.rb +210 -0
  77. data/lib/pwn/ffi/soapy_sdr.rb +177 -0
  78. data/lib/pwn/ffi/stdio.rb +9 -1
  79. data/lib/pwn/ffi/volk.rb +241 -0
  80. data/lib/pwn/ffi.rb +45 -2
  81. data/lib/pwn/plugins/burp_suite.rb +2 -2
  82. data/lib/pwn/sast/pom_version.rb +2 -2
  83. data/lib/pwn/sast/test_case_engine.rb +1 -1
  84. data/lib/pwn/sdr/decoder/adsb.rb +201 -12
  85. data/lib/pwn/sdr/decoder/apt.rb +19 -5
  86. data/lib/pwn/sdr/decoder/base.rb +314 -1
  87. data/lib/pwn/sdr/decoder/bluetooth.rb +91 -18
  88. data/lib/pwn/sdr/decoder/dect.rb +81 -23
  89. data/lib/pwn/sdr/decoder/dsp.rb +229 -15
  90. data/lib/pwn/sdr/decoder/flex.rb +23 -6
  91. data/lib/pwn/sdr/decoder/gps.rb +80 -18
  92. data/lib/pwn/sdr/decoder/gsm.rb +83 -28
  93. data/lib/pwn/sdr/decoder/iridium.rb +80 -18
  94. data/lib/pwn/sdr/decoder/lora.rb +84 -28
  95. data/lib/pwn/sdr/decoder/lte.rb +80 -18
  96. data/lib/pwn/sdr/decoder/morse.rb +23 -6
  97. data/lib/pwn/sdr/decoder/p25.rb +90 -31
  98. data/lib/pwn/sdr/decoder/pager.rb +23 -6
  99. data/lib/pwn/sdr/decoder/pocsag.rb +23 -6
  100. data/lib/pwn/sdr/decoder/rds.rb +219 -52
  101. data/lib/pwn/sdr/decoder/rfid.rb +81 -27
  102. data/lib/pwn/sdr/decoder/rtl433.rb +85 -27
  103. data/lib/pwn/sdr/decoder/rtty.rb +23 -6
  104. data/lib/pwn/sdr/decoder/wifi.rb +86 -32
  105. data/lib/pwn/sdr/decoder/zigbee.rb +88 -35
  106. data/lib/pwn/sdr/decoder.rb +6 -5
  107. data/lib/pwn/sdr/frequency_allocation.rb +124 -81
  108. data/lib/pwn/sdr/gqrx.rb +1513 -165
  109. data/lib/pwn/version.rb +1 -1
  110. data/spec/lib/pwn/ai/agent/extrospection_spec.rb +96 -0
  111. data/spec/lib/pwn/ai/agent/{introspection_spec.rb → reflect_spec.rb} +3 -3
  112. data/spec/lib/pwn/ai/agent/tools/extrospection_spec.rb +8 -24
  113. data/spec/lib/pwn/ffi/adalm_pluto_spec.rb +37 -0
  114. data/spec/lib/pwn/ffi/fftw_spec.rb +26 -0
  115. data/spec/lib/pwn/ffi/hack_rf_spec.rb +25 -0
  116. data/spec/lib/pwn/ffi/liquid_spec.rb +42 -0
  117. data/spec/lib/pwn/ffi/rtl_sdr_spec.rb +24 -0
  118. data/spec/lib/pwn/ffi/soapy_sdr_spec.rb +25 -0
  119. data/spec/lib/pwn/ffi/volk_spec.rb +36 -0
  120. data/spec/lib/pwn/sdr/decoder/base_iq_spec.rb +65 -0
  121. data/spec/lib/pwn/sdr/decoder/dsp_spec.rb +50 -4
  122. data/spec/lib/pwn/sdr/decoder/rds_spec.rb +45 -4
  123. data/third_party/pwn_rdoc.jsonl +279 -30
  124. metadata +21 -5
@@ -9,41 +9,41 @@
9
9
  <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(43.2 265.39)">
10
10
  <title>PWN_ZeroDay</title>
11
11
  <polygon fill="#0f172a" stroke="none" points="-43.2,43.2 -43.2,-265.39 1021.2,-265.39 1021.2,43.2 -43.2,43.2"/>
12
- <text xml:space="preserve" text-anchor="start" x="304.5" y="-200.19" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="20.00" fill="#e2e8f0">Zero&#45;Day Research Lifecycle with PWN</text>
13
- <text xml:space="preserve" text-anchor="start" x="337.12" y="-188.74" font-family="Helvetica,sans-Serif" font-size="11.00" fill="#94a3b8">attack surface → hypothesis → prove → weaponise → disclose</text>
12
+ <text xml:space="preserve" text-anchor="start" x="304.5" y="-200.19" font-family="sans-Serif" font-weight="bold" font-size="20.00" fill="#e2e8f0">Zero&#45;Day Research Lifecycle with PWN</text>
13
+ <text xml:space="preserve" text-anchor="start" x="337.12" y="-188.74" font-family="sans-Serif" font-size="11.00" fill="#94a3b8">attack surface → hypothesis → prove → weaponise → disclose</text>
14
14
  <g id="clust1" class="cluster">
15
15
  <title>cluster_hyp</title>
16
16
  <path fill="#022c22" stroke="#047857" d="M210.5,-24.19C210.5,-24.19 312,-24.19 312,-24.19 318,-24.19 324,-30.19 324,-36.19 324,-36.19 324,-163.19 324,-163.19 324,-169.19 318,-175.19 312,-175.19 312,-175.19 210.5,-175.19 210.5,-175.19 204.5,-175.19 198.5,-169.19 198.5,-163.19 198.5,-163.19 198.5,-36.19 198.5,-36.19 198.5,-30.19 204.5,-24.19 210.5,-24.19"/>
17
- <text xml:space="preserve" text-anchor="middle" x="261.25" y="-152.19" font-family="Helvetica,sans-Serif" font-size="20.00" fill="#a7f3d0">Hypothesise</text>
17
+ <text xml:space="preserve" text-anchor="middle" x="261.25" y="-152.19" font-family="sans-Serif" font-size="20.00" fill="#a7f3d0">Hypothesise</text>
18
18
  </g>
19
19
  <g id="clust2" class="cluster">
20
20
  <title>cluster_prove</title>
21
21
  <path fill="#422006" stroke="#a16207" d="M407,-24.19C407,-24.19 502.75,-24.19 502.75,-24.19 508.75,-24.19 514.75,-30.19 514.75,-36.19 514.75,-36.19 514.75,-163.19 514.75,-163.19 514.75,-169.19 508.75,-175.19 502.75,-175.19 502.75,-175.19 407,-175.19 407,-175.19 401,-175.19 395,-169.19 395,-163.19 395,-163.19 395,-36.19 395,-36.19 395,-30.19 401,-24.19 407,-24.19"/>
22
- <text xml:space="preserve" text-anchor="middle" x="454.88" y="-152.19" font-family="Helvetica,sans-Serif" font-size="20.00" fill="#fde68a">Prove</text>
22
+ <text xml:space="preserve" text-anchor="middle" x="454.88" y="-152.19" font-family="sans-Serif" font-size="20.00" fill="#fde68a">Prove</text>
23
23
  </g>
24
24
  <g id="clust3" class="cluster">
25
25
  <title>cluster_weapon</title>
26
26
  <path fill="#450a0a" stroke="#b91c1c" d="M674.75,-24.19C674.75,-24.19 767.25,-24.19 767.25,-24.19 773.25,-24.19 779.25,-30.19 779.25,-36.19 779.25,-36.19 779.25,-163.19 779.25,-163.19 779.25,-169.19 773.25,-175.19 767.25,-175.19 767.25,-175.19 674.75,-175.19 674.75,-175.19 668.75,-175.19 662.75,-169.19 662.75,-163.19 662.75,-163.19 662.75,-36.19 662.75,-36.19 662.75,-30.19 668.75,-24.19 674.75,-24.19"/>
27
- <text xml:space="preserve" text-anchor="middle" x="721" y="-152.19" font-family="Helvetica,sans-Serif" font-size="20.00" fill="#fecaca">Weaponise</text>
27
+ <text xml:space="preserve" text-anchor="middle" x="721" y="-152.19" font-family="sans-Serif" font-size="20.00" fill="#fecaca">Weaponise</text>
28
28
  </g>
29
29
  <g id="clust4" class="cluster">
30
30
  <title>cluster_disc</title>
31
31
  <path fill="#2e1065" stroke="#6d28d9" d="M862.25,-24.19C862.25,-24.19 958,-24.19 958,-24.19 964,-24.19 970,-30.19 970,-36.19 970,-36.19 970,-163.19 970,-163.19 970,-169.19 964,-175.19 958,-175.19 958,-175.19 862.25,-175.19 862.25,-175.19 856.25,-175.19 850.25,-169.19 850.25,-163.19 850.25,-163.19 850.25,-36.19 850.25,-36.19 850.25,-30.19 856.25,-24.19 862.25,-24.19"/>
32
- <text xml:space="preserve" text-anchor="middle" x="910.12" y="-152.19" font-family="Helvetica,sans-Serif" font-size="20.00" fill="#ddd6fe">Disclose</text>
32
+ <text xml:space="preserve" text-anchor="middle" x="910.12" y="-152.19" font-family="sans-Serif" font-size="20.00" fill="#ddd6fe">Disclose</text>
33
33
  </g>
34
34
  <!-- Surface -->
35
35
  <g id="node1" class="node">
36
36
  <title>Surface</title>
37
37
  <path fill="#7dd3fc" stroke="#334155" stroke-width="1.3" d="M107.5,-101.19C107.5,-101.19 12,-101.19 12,-101.19 6,-101.19 0,-95.19 0,-89.19 0,-89.19 0,-77.19 0,-77.19 0,-71.19 6,-65.19 12,-65.19 12,-65.19 107.5,-65.19 107.5,-65.19 113.5,-65.19 119.5,-71.19 119.5,-77.19 119.5,-77.19 119.5,-89.19 119.5,-89.19 119.5,-95.19 113.5,-101.19 107.5,-101.19"/>
38
- <text xml:space="preserve" text-anchor="middle" x="59.75" y="-85.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">Attack Surface</text>
39
- <text xml:space="preserve" text-anchor="middle" x="59.75" y="-73.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">OpenAPI · Shodan · Git</text>
38
+ <text xml:space="preserve" text-anchor="middle" x="59.75" y="-85.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Attack Surface</text>
39
+ <text xml:space="preserve" text-anchor="middle" x="59.75" y="-73.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">OpenAPI · Shodan · Git</text>
40
40
  </g>
41
41
  <!-- SAST -->
42
42
  <g id="node2" class="node">
43
43
  <title>SAST</title>
44
44
  <path fill="#6ee7b7" stroke="#334155" stroke-width="1.3" d="M285.25,-136.19C285.25,-136.19 236.25,-136.19 236.25,-136.19 230.25,-136.19 224.25,-130.19 224.25,-124.19 224.25,-124.19 224.25,-112.19 224.25,-112.19 224.25,-106.19 230.25,-100.19 236.25,-100.19 236.25,-100.19 285.25,-100.19 285.25,-100.19 291.25,-100.19 297.25,-106.19 297.25,-112.19 297.25,-112.19 297.25,-124.19 297.25,-124.19 297.25,-130.19 291.25,-136.19 285.25,-136.19"/>
45
- <text xml:space="preserve" text-anchor="middle" x="260.75" y="-120.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">PWN::SAST</text>
46
- <text xml:space="preserve" text-anchor="middle" x="260.75" y="-108.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">taint patterns</text>
45
+ <text xml:space="preserve" text-anchor="middle" x="260.75" y="-120.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">PWN::SAST</text>
46
+ <text xml:space="preserve" text-anchor="middle" x="260.75" y="-108.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">taint patterns</text>
47
47
  </g>
48
48
  <!-- Surface&#45;&gt;SAST -->
49
49
  <g id="edge1" class="edge">
@@ -55,8 +55,8 @@
55
55
  <g id="node3" class="node">
56
56
  <title>AI</title>
57
57
  <path fill="#6ee7b7" stroke="#334155" stroke-width="1.3" d="M291.25,-68.19C291.25,-68.19 230.25,-68.19 230.25,-68.19 224.25,-68.19 218.25,-62.19 218.25,-56.19 218.25,-56.19 218.25,-44.19 218.25,-44.19 218.25,-38.19 224.25,-32.19 230.25,-32.19 230.25,-32.19 291.25,-32.19 291.25,-32.19 297.25,-32.19 303.25,-38.19 303.25,-44.19 303.25,-44.19 303.25,-56.19 303.25,-56.19 303.25,-62.19 297.25,-68.19 291.25,-68.19"/>
58
- <text xml:space="preserve" text-anchor="middle" x="260.75" y="-52.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">pwn&#45;ai</text>
59
- <text xml:space="preserve" text-anchor="middle" x="260.75" y="-40.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">Agent::VulnGen</text>
58
+ <text xml:space="preserve" text-anchor="middle" x="260.75" y="-52.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">pwn&#45;ai</text>
59
+ <text xml:space="preserve" text-anchor="middle" x="260.75" y="-40.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Agent::VulnGen</text>
60
60
  </g>
61
61
  <!-- Surface&#45;&gt;AI -->
62
62
  <g id="edge2" class="edge">
@@ -68,8 +68,8 @@
68
68
  <g id="node4" class="node">
69
69
  <title>Fuzz</title>
70
70
  <path fill="#fcd34d" stroke="#334155" stroke-width="1.3" d="M477.5,-136.19C477.5,-136.19 432.25,-136.19 432.25,-136.19 426.25,-136.19 420.25,-130.19 420.25,-124.19 420.25,-124.19 420.25,-112.19 420.25,-112.19 420.25,-106.19 426.25,-100.19 432.25,-100.19 432.25,-100.19 477.5,-100.19 477.5,-100.19 483.5,-100.19 489.5,-106.19 489.5,-112.19 489.5,-112.19 489.5,-124.19 489.5,-124.19 489.5,-130.19 483.5,-136.19 477.5,-136.19"/>
71
- <text xml:space="preserve" text-anchor="middle" x="454.88" y="-120.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">Fuzz · Sock</text>
72
- <text xml:space="preserve" text-anchor="middle" x="454.88" y="-108.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">Packet</text>
71
+ <text xml:space="preserve" text-anchor="middle" x="454.88" y="-120.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Fuzz · Sock</text>
72
+ <text xml:space="preserve" text-anchor="middle" x="454.88" y="-108.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Packet</text>
73
73
  </g>
74
74
  <!-- SAST&#45;&gt;Fuzz -->
75
75
  <g id="edge3" class="edge">
@@ -81,8 +81,8 @@
81
81
  <g id="node5" class="node">
82
82
  <title>TB</title>
83
83
  <path fill="#fcd34d" stroke="#334155" stroke-width="1.3" d="M494.75,-68.19C494.75,-68.19 415,-68.19 415,-68.19 409,-68.19 403,-62.19 403,-56.19 403,-56.19 403,-44.19 403,-44.19 403,-38.19 409,-32.19 415,-32.19 415,-32.19 494.75,-32.19 494.75,-32.19 500.75,-32.19 506.75,-38.19 506.75,-44.19 506.75,-44.19 506.75,-56.19 506.75,-56.19 506.75,-62.19 500.75,-68.19 494.75,-68.19"/>
84
- <text xml:space="preserve" text-anchor="middle" x="454.88" y="-52.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">TransparentBrowser</text>
85
- <text xml:space="preserve" text-anchor="middle" x="454.88" y="-40.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">Burp replay</text>
84
+ <text xml:space="preserve" text-anchor="middle" x="454.88" y="-52.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">TransparentBrowser</text>
85
+ <text xml:space="preserve" text-anchor="middle" x="454.88" y="-40.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Burp replay</text>
86
86
  </g>
87
87
  <!-- AI&#45;&gt;TB -->
88
88
  <g id="edge4" class="edge">
@@ -94,8 +94,8 @@
94
94
  <g id="node6" class="node">
95
95
  <title>Asm</title>
96
96
  <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M758.5,-136.19C758.5,-136.19 682.5,-136.19 682.5,-136.19 676.5,-136.19 670.5,-130.19 670.5,-124.19 670.5,-124.19 670.5,-112.19 670.5,-112.19 670.5,-106.19 676.5,-100.19 682.5,-100.19 682.5,-100.19 758.5,-100.19 758.5,-100.19 764.5,-100.19 770.5,-106.19 770.5,-112.19 770.5,-112.19 770.5,-124.19 770.5,-124.19 770.5,-130.19 764.5,-136.19 758.5,-136.19"/>
97
- <text xml:space="preserve" text-anchor="middle" x="720.5" y="-120.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">Assembly</text>
98
- <text xml:space="preserve" text-anchor="middle" x="720.5" y="-108.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">pwn&#45;asm shellcode</text>
97
+ <text xml:space="preserve" text-anchor="middle" x="720.5" y="-120.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Assembly</text>
98
+ <text xml:space="preserve" text-anchor="middle" x="720.5" y="-108.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">pwn&#45;asm shellcode</text>
99
99
  </g>
100
100
  <!-- Fuzz&#45;&gt;Asm -->
101
101
  <g id="edge5" class="edge">
@@ -107,8 +107,8 @@
107
107
  <g id="node7" class="node">
108
108
  <title>MSF</title>
109
109
  <path fill="#fda4af" stroke="#334155" stroke-width="1.3" d="M739,-68.19C739,-68.19 702,-68.19 702,-68.19 696,-68.19 690,-62.19 690,-56.19 690,-56.19 690,-44.19 690,-44.19 690,-38.19 696,-32.19 702,-32.19 702,-32.19 739,-32.19 739,-32.19 745,-32.19 751,-38.19 751,-44.19 751,-44.19 751,-56.19 751,-56.19 751,-62.19 745,-68.19 739,-68.19"/>
110
- <text xml:space="preserve" text-anchor="middle" x="720.5" y="-52.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">Metasploit</text>
111
- <text xml:space="preserve" text-anchor="middle" x="720.5" y="-40.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">module</text>
110
+ <text xml:space="preserve" text-anchor="middle" x="720.5" y="-52.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Metasploit</text>
111
+ <text xml:space="preserve" text-anchor="middle" x="720.5" y="-40.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">module</text>
112
112
  </g>
113
113
  <!-- TB&#45;&gt;MSF -->
114
114
  <g id="edge6" class="edge">
@@ -120,8 +120,8 @@
120
120
  <g id="node8" class="node">
121
121
  <title>H1</title>
122
122
  <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M950,-136.19C950,-136.19 870.25,-136.19 870.25,-136.19 864.25,-136.19 858.25,-130.19 858.25,-124.19 858.25,-124.19 858.25,-112.19 858.25,-112.19 858.25,-106.19 864.25,-100.19 870.25,-100.19 870.25,-100.19 950,-100.19 950,-100.19 956,-100.19 962,-106.19 962,-112.19 962,-112.19 962,-124.19 962,-124.19 962,-130.19 956,-136.19 950,-136.19"/>
123
- <text xml:space="preserve" text-anchor="middle" x="910.12" y="-120.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">HackerOne</text>
124
- <text xml:space="preserve" text-anchor="middle" x="910.12" y="-108.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">BugCrowd · Synack</text>
123
+ <text xml:space="preserve" text-anchor="middle" x="910.12" y="-120.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">HackerOne</text>
124
+ <text xml:space="preserve" text-anchor="middle" x="910.12" y="-108.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">BugCrowd · Synack</text>
125
125
  </g>
126
126
  <!-- Asm&#45;&gt;H1 -->
127
127
  <g id="edge7" class="edge">
@@ -133,8 +133,8 @@
133
133
  <g id="node9" class="node">
134
134
  <title>Rep</title>
135
135
  <path fill="#c4b5fd" stroke="#334155" stroke-width="1.3" d="M939.88,-68.19C939.88,-68.19 880.38,-68.19 880.38,-68.19 874.38,-68.19 868.38,-62.19 868.38,-56.19 868.38,-56.19 868.38,-44.19 868.38,-44.19 868.38,-38.19 874.38,-32.19 880.38,-32.19 880.38,-32.19 939.88,-32.19 939.88,-32.19 945.88,-32.19 951.88,-38.19 951.88,-44.19 951.88,-44.19 951.88,-56.19 951.88,-56.19 951.88,-62.19 945.88,-68.19 939.88,-68.19"/>
136
- <text xml:space="preserve" text-anchor="middle" x="910.12" y="-52.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">Reports · Skills</text>
137
- <text xml:space="preserve" text-anchor="middle" x="910.12" y="-40.69" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#0f172a">distill_skill</text>
136
+ <text xml:space="preserve" text-anchor="middle" x="910.12" y="-52.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">Reports · Skills</text>
137
+ <text xml:space="preserve" text-anchor="middle" x="910.12" y="-40.69" font-family="sans-Serif" font-size="10.00" fill="#0f172a">distill_skill</text>
138
138
  </g>
139
139
  <!-- MSF&#45;&gt;Rep -->
140
140
  <g id="edge8" class="edge">
@@ -147,7 +147,7 @@
147
147
  <title>Rep&#45;&gt;AI</title>
148
148
  <path fill="none" stroke="#fbbf24" stroke-width="1.3" stroke-dasharray="5,2" d="M867.84,-36.49C842.58,-28.83 809.42,-20.07 779.25,-16.19 609.87,5.62 564.45,5.09 395,-16.19 367.6,-19.63 337.77,-26.9 313.29,-33.84"/>
149
149
  <polygon fill="#fbbf24" stroke="#fbbf24" stroke-width="1.3" points="312.63,-31.11 305.73,-36.03 314.19,-36.49 312.63,-31.11"/>
150
- <text xml:space="preserve" text-anchor="middle" x="588.75" y="-2.92" font-family="Helvetica,sans-Serif" font-size="9.00" fill="#cbd5e1">lesson → next hunt</text>
150
+ <text xml:space="preserve" text-anchor="middle" x="588.75" y="-2.92" font-family="sans-Serif" font-size="9.00" fill="#cbd5e1">lesson → next hunt</text>
151
151
  </g>
152
152
  </g>
153
153
  </svg>
@@ -10,7 +10,7 @@ a final answer — **learning from every failure so it doesn't repeat it**.
10
10
 
11
11
  ```text
12
12
  # 1. Interactive TUI (inside the pwn REPL)
13
- pwn[v0.5.618]:001 >>> pwn-ai
13
+ pwn[v0.5.622]:001 >>> pwn-ai
14
14
  ✨ pwn-ai · anthropic · session 20260707_225041_d7f2f3bb
15
15
  > Use NmapIt to sweep 10.0.0.0/24, then TransparentBrowser via Burp on any
16
16
  host with 443 open, active-scan, and give me a Reports::SAST summary.
@@ -23,9 +23,10 @@ $ pwn --ai "run bin/pwn_sast against ./src and push findings to DefectDojo"
23
23
 
24
24
  ## Anatomy of a turn
25
25
 
26
- 1. **PromptBuilder** assembles the system prompt: your request + MEMORY block +
27
- SKILLS list + LEARNING stats + **KNOWN MISTAKES / KNOWN FIXES** +
28
- TOOL EFFECTIVENESS + EXTROSPECTION block.
26
+ 1. **PromptBuilder** assembles the system prompt: your request + **six blocks**
27
+ — MEMORY · SKILLS · LEARNING · **KNOWN MISTAKES / KNOWN FIXES** ·
28
+ TOOL EFFECTIVENESS · **EXTROSPECTION** (live host fp + drift + fresh
29
+ observations including `:rf` now-playing and `:web` DOM watches).
29
30
  2. **Loop** checks the incoming message against `Mistakes::CORRECTION_RX` — if
30
31
  it reads like *"no, that's wrong"* the previous outcome is flipped to
31
32
  `success:false` and fingerprinted.
@@ -36,17 +37,22 @@ $ pwn --ai "run bin/pwn_sast against ./src and push findings to DefectDojo"
36
37
  and the tool result gets an inline `correction_hint` (`seen N×, sig=…,
37
38
  KNOWN FIX: …`) so the very next iteration self-corrects. If the persistent
38
39
  count ≥ 3, `guard_repeated_failure` interrupts with an explicit
39
- *change-approach* instruction.
40
+ *change-approach* instruction. On-demand sense tools
41
+ (`extro_verify` / `extro_watch` / `extro_rf_tune` / `extro_osint` / `extro_serial` / `extro_telecomm` / `extro_packet` / `extro_vision` / `extro_voice` / `extro_intel`) fire
42
+ here when the question needs the outside world; a `:refuted` verify is
43
+ itself recorded as a Mistakes `assumption` fingerprint.
40
44
  5. Results are appended to the message list; go to 3.
41
45
  6. When the reply has *no* tool_calls it's the **final answer** →
42
- `Learning.auto_reflect` and `Extrospection.auto_extrospect` fire (if
43
- enabled), transcript is flushed to `~/.pwn/sessions/`.
46
+ `Learning.auto_introspect` fires (if enabled) and, when
47
+ `auto_extrospect` is also on, calls `Extrospection.auto_extrospect`
48
+ (`AUTO_SECTIONS = host/repo/env` only — never toolchain/rf/web, never
49
+ launches Burp/ZAP/msf/gqrx). Transcript is flushed to `~/.pwn/sessions/`.
44
50
 
45
51
  ![Self-improvement loop](diagrams/pwn-ai-feedback-learning-loop.svg)
46
52
 
47
53
  ## What the agent can call
48
54
 
49
- 10 toolsets · 54 tools — full table at
55
+ 10 toolsets · 61 tools — full table at
50
56
  [Agent Tool Registry](Agent-Tool-Registry.md).
51
57
 
52
58
  The two that matter most:
@@ -71,8 +77,8 @@ full `Loop.run` under a persona overlay) that share a JSONL bus. See
71
77
  - SHIFT+ENTER = newline, ENTER = submit.
72
78
  - `back` / `exit` returns to the plain REPL.
73
79
  - Set `ai.agent.max_iters` in `~/.pwn/config.yml` if long tasks get truncated.
74
- - Disable `auto_reflect` during noisy fuzz loops
75
- (`learning_auto_reflect_toggle(enabled: false)`), re-enable for the summary
80
+ - Disable `auto_introspect` during noisy fuzz loops
81
+ (`learning_auto_introspect_toggle(enabled: false)`), re-enable for the summary
76
82
  turn.
77
83
  - Run `mistakes_list` before retrying something that failed last session — the
78
84
  fix may already be recorded.
@@ -35,7 +35,7 @@ module PWN
35
35
  raise "ERROR: Unsupported type parameter value '#{type}'. Supported values are :opcodes_to_asm and :asm_to_opcodes."
36
36
  end
37
37
 
38
- PWN::AI::Agent::Introspection.reflect_on(
38
+ PWN::AI::Agent::Reflect.on(
39
39
  system_role_content: system_role_content,
40
40
  request: request,
41
41
  suppress_pii_warning: true
@@ -16,7 +16,7 @@ module PWN
16
16
 
17
17
  system_role_content = 'Provide a useful summary of this latest bitcoin block returned from a bitcoin node via getblockchaininfo.'
18
18
 
19
- PWN::AI::Agent::Introspection.reflect_on(
19
+ PWN::AI::Agent::Reflect.on(
20
20
  system_role_content: system_role_content,
21
21
  request: request,
22
22
  suppress_pii_warning: true
@@ -50,7 +50,7 @@ module PWN
50
50
  Analyze provided HTTP request/response pairs methodically: Start with a high-level overview, then dive into specifics, flag potential issues with evidence from the traffic, and end with PoC if applicable. Be verbose in reasoning but concise in output. Prioritize high-severity findings. If data is incomplete, request clarifications. If analyzing a JavaScript source map file (i.e. .js.map), focus on deobfuscating and identifying any potentially vulnerable code patterns, especially those that could lead to client-side vulnerabilities like DOM XSS, prototype pollution, or insecure deserialization. Look for patterns such as eval, document.write, innerHTML assignments, and event handlers that could be influenced by user input. Provide detailed analysis and PoCs if vulnerabilities are identified.
51
51
  '
52
52
 
53
- PWN::AI::Agent::Introspection.reflect_on(
53
+ PWN::AI::Agent::Reflect.on(
54
54
  system_role_content: system_role_content,
55
55
  request: request,
56
56
  suppress_pii_warning: true