pwn 0.5.615 → 0.5.617

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 (102) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -10
  3. data/bin/pwn +47 -2
  4. data/bin/pwn_gqrx_scanner +75 -18
  5. data/documentation/Diagrams.md +123 -40
  6. data/documentation/General-PWN-Usage.md +50 -30
  7. data/documentation/Home.md +78 -51
  8. data/documentation/How-PWN-Works.md +59 -57
  9. data/documentation/Installation.md +53 -28
  10. data/documentation/What-is-PWN.md +51 -32
  11. data/documentation/Why-PWN.md +41 -11
  12. data/documentation/diagrams/ai-integration-tool-calling.svg +141 -103
  13. data/documentation/diagrams/build.sh +20 -0
  14. data/documentation/diagrams/burp-vs-zap-preference.svg +47 -62
  15. data/documentation/diagrams/code-scanning-sast.svg +139 -79
  16. data/documentation/diagrams/dot/_THEME.md +27 -0
  17. data/documentation/diagrams/dot/agent-tool-registry.dot +59 -0
  18. data/documentation/diagrams/dot/ai-integration-tool-calling.dot +47 -20
  19. data/documentation/diagrams/dot/aws-cloud-security.dot +48 -0
  20. data/documentation/diagrams/dot/burp-vs-zap-preference.dot +23 -12
  21. data/documentation/diagrams/dot/code-scanning-sast.dot +46 -18
  22. data/documentation/diagrams/dot/cron-scheduling.dot +40 -0
  23. data/documentation/diagrams/dot/driver-framework.dot +36 -14
  24. data/documentation/diagrams/dot/extrospection-world-awareness.dot +55 -0
  25. data/documentation/diagrams/dot/fuzzing-workflow.dot +44 -24
  26. data/documentation/diagrams/dot/history-to-drivers.dot +31 -17
  27. data/documentation/diagrams/dot/memory-skills-detailed.dot +57 -25
  28. data/documentation/diagrams/dot/network-infra-testing.dot +51 -19
  29. data/documentation/diagrams/dot/overall-pwn-architecture.dot +110 -44
  30. data/documentation/diagrams/dot/penetration-testing-workflow.dot +56 -25
  31. data/documentation/diagrams/dot/plugin-ecosystem.dot +41 -27
  32. data/documentation/diagrams/dot/pwn-ai-feedback-learning-loop.dot +87 -46
  33. data/documentation/diagrams/dot/pwn-repl-prototyping.dot +49 -30
  34. data/documentation/diagrams/dot/reporting-pipeline.dot +43 -14
  35. data/documentation/diagrams/dot/reverse-engineering-flow.dot +40 -18
  36. data/documentation/diagrams/dot/sdr-radio-flow.dot +45 -0
  37. data/documentation/diagrams/dot/sessions-cron-automation.dot +41 -14
  38. data/documentation/diagrams/dot/swarm-multi-agent.dot +70 -0
  39. data/documentation/diagrams/dot/web-application-testing.dot +45 -23
  40. data/documentation/diagrams/dot/zero-day-research-flow.dot +46 -24
  41. data/documentation/diagrams/driver-framework.svg +87 -66
  42. data/documentation/diagrams/fuzzing-workflow.svg +128 -115
  43. data/documentation/diagrams/history-to-drivers.svg +84 -82
  44. data/documentation/diagrams/memory-skills-detailed.svg +167 -119
  45. data/documentation/diagrams/network-infra-testing.svg +146 -84
  46. data/documentation/diagrams/overall-pwn-architecture.svg +356 -185
  47. data/documentation/diagrams/penetration-testing-workflow.svg +161 -108
  48. data/documentation/diagrams/plugin-ecosystem.svg +225 -121
  49. data/documentation/diagrams/pwn-ai-feedback-learning-loop.svg +257 -185
  50. data/documentation/diagrams/pwn-repl-prototyping.svg +126 -137
  51. data/documentation/diagrams/reporting-pipeline.svg +128 -68
  52. data/documentation/diagrams/reverse-engineering-flow.svg +100 -80
  53. data/documentation/diagrams/sessions-cron-automation.svg +112 -68
  54. data/documentation/diagrams/web-application-testing.svg +136 -100
  55. data/documentation/diagrams/zero-day-research-flow.svg +116 -112
  56. data/git_commit.sh +1 -1
  57. data/lib/pwn/ai/agent/assembly.rb +1 -1
  58. data/lib/pwn/ai/agent/btc.rb +1 -1
  59. data/lib/pwn/ai/agent/burp_suite.rb +1 -1
  60. data/lib/pwn/ai/agent/extrospection.rb +618 -0
  61. data/lib/pwn/ai/agent/gqrx.rb +2 -2
  62. data/lib/pwn/ai/agent/hacker_one.rb +1 -1
  63. data/lib/pwn/ai/agent/introspection.rb +91 -0
  64. data/lib/pwn/ai/agent/learning.rb +6 -4
  65. data/lib/pwn/ai/agent/loop.rb +15 -0
  66. data/lib/pwn/ai/agent/prompt_builder.rb +10 -1
  67. data/lib/pwn/ai/agent/sast.rb +1 -1
  68. data/lib/pwn/ai/agent/swarm.rb +437 -0
  69. data/lib/pwn/ai/agent/tools/cron.rb +163 -0
  70. data/lib/pwn/ai/agent/tools/extrospection.rb +280 -0
  71. data/lib/pwn/ai/agent/tools/learning.rb +108 -0
  72. data/lib/pwn/ai/agent/tools/memory.rb +27 -0
  73. data/lib/pwn/ai/agent/tools/metrics.rb +61 -0
  74. data/lib/pwn/ai/agent/tools/sessions.rb +139 -0
  75. data/lib/pwn/ai/agent/tools/skills.rb +30 -0
  76. data/lib/pwn/ai/agent/tools/swarm.rb +229 -0
  77. data/lib/pwn/ai/agent/transparent_browser.rb +1 -1
  78. data/lib/pwn/ai/agent/vuln_gen.rb +2 -2
  79. data/lib/pwn/ai/agent.rb +3 -0
  80. data/lib/pwn/ai/anthropic.rb +19 -4
  81. data/lib/pwn/ai.rb +0 -1
  82. data/lib/pwn/config.rb +10 -23
  83. data/lib/pwn/cron.rb +16 -7
  84. data/lib/pwn/plugins/repl.rb +90 -281
  85. data/lib/pwn/sdr/decoder/base.rb +251 -0
  86. data/lib/pwn/sdr/decoder/gsm.rb +84 -185
  87. data/lib/pwn/sdr/decoder/pocsag.rb +62 -217
  88. data/lib/pwn/sdr/decoder.rb +1 -0
  89. data/lib/pwn/sdr/gqrx.rb +446 -65
  90. data/lib/pwn/version.rb +1 -1
  91. data/spec/lib/pwn/ai/agent/extrospection_spec.rb +15 -0
  92. data/spec/lib/pwn/ai/agent/introspection_spec.rb +15 -0
  93. data/spec/lib/pwn/ai/agent/swarm_spec.rb +34 -0
  94. data/spec/lib/pwn/ai/agent/tools/cron_spec.rb +40 -0
  95. data/spec/lib/pwn/ai/agent/tools/extrospection_spec.rb +40 -0
  96. data/spec/lib/pwn/ai/agent/tools/metrics_spec.rb +20 -0
  97. data/spec/lib/pwn/ai/agent/tools/sessions_spec.rb +35 -0
  98. data/spec/lib/pwn/ai/agent/tools/swarm_spec.rb +17 -0
  99. data/spec/lib/pwn/{ai/introspection_spec.rb → sdr/decoder/base_spec.rb} +3 -3
  100. data/third_party/pwn_rdoc.jsonl +178 -33
  101. metadata +27 -3
  102. data/lib/pwn/ai/introspection.rb +0 -76
@@ -1,49 +1,115 @@
1
- digraph "PWN Overall Architecture" {
2
- rankdir=TB;
3
- node [shape=box, style=rounded, fontname="Arial", fontsize=9];
4
- edge [fontname="Arial", fontsize=8];
5
-
6
- User [label="End User\n(Researcher, pwn-ai)", shape=box];
7
- REPL [label="PWN REPL\n(pry + pwn)", shape=ellipse, fillcolor=lightgreen, style=filled];
8
- AI [label="PWN::AI\n(Agent + Providers)", shape=ellipse, fillcolor=lightblue, style=filled];
9
-
10
- subgraph cluster_core {
11
- label="Core PWN";
12
- color=darkblue;
13
- Plugins [label="PWN::Plugins\n(67+ modules:\nBurp, NmapIt,\nMetasploit, Fuzz,\nTransparentBrowser...)" , shape=box];
14
- SAST [label="PWN::SAST", shape=box];
15
- Reports [label="PWN::Reports", shape=box];
16
- Driver [label="PWN::Driver", shape=box];
17
- Memory [label="PWN::Memory", shape=box];
1
+ digraph "PWN_Overall_Architecture" {
2
+ graph [
3
+ label=<<B>PWN Offensive Security Automation Framework</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">Overall Architecture · lib/pwn/*</FONT>>,
4
+ labelloc=t, fontsize=22, fontname="Helvetica",
5
+ rankdir=TB, splines=spline, nodesep=0.55, ranksep=1.15,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, compound=true, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=11, style="filled,rounded",
9
+ shape=box, penwidth=1.4, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ /* ───────── L0 · ACTORS ───────── */
14
+ subgraph cluster_actors {
15
+ label="Actors"; fontcolor="#94a3b8"; style="rounded,dashed";
16
+ color="#334155"; bgcolor="#1e293b";
17
+ User [label="👤 Researcher\nRed Team · Bug Hunter", fillcolor="#7dd3fc"];
18
+ CI [label="⚙️ CI / CD\nHeadless pipelines", fillcolor="#7dd3fc"];
19
+ LLM [label="🤖 LLM Providers\nOpenAI · Anthropic\nGrok · Gemini · Ollama", fillcolor="#c4b5fd"];
20
+ Target [label="🎯 Attack Surface\nHosts · Web · Cloud\nRadio · Hardware", fillcolor="#fda4af"];
21
+ }
22
+ {rank=same; User; CI; LLM; Target}
23
+
24
+ /* ───────── L1 · ENTRY POINTS ───────── */
25
+ subgraph cluster_entry {
26
+ label="Entry Points (bin/)"; fontcolor="#7dd3fc";
27
+ style=rounded; color="#0369a1"; bgcolor="#0c4a6e"; penwidth=2;
28
+ REPL [label="🐚 pwn REPL\nPry + PWN:: preload", fillcolor="#7dd3fc"];
29
+ PwnAI [label="✨ pwn-ai\nAgent TUI · pwn --ai", fillcolor="#7dd3fc"];
30
+ CLI [label="📜 bin/pwn_*\n52 CLI drivers", fillcolor="#7dd3fc"];
31
+ Cronb [label="⏱ PWN::Cron\nScheduled jobs", fillcolor="#7dd3fc"];
18
32
  }
33
+ {rank=same; REPL; PwnAI; CLI; Cronb}
19
34
 
20
- subgraph cluster_persistent {
21
- label="Persistent Layer";
22
- color=darkgreen;
23
- Skills [label="PWN::Skills\n(~/.pwn/skills)", shape=cylinder, fillcolor=lightyellow];
24
- Sess [label="PWN::Sessions", shape=cylinder, fillcolor=lightyellow];
25
- Cron [label="PWN::Cron", shape=cylinder, fillcolor=lightyellow];
26
- Learn [label="Learning\n(Metrics + JSONL)", shape=cylinder, fillcolor=lightyellow];
35
+ /* ───────── L2 · AI AGENT CORE ───────── */
36
+ subgraph cluster_agent {
37
+ label="PWN::AI::Agent"; fontcolor="#ddd6fe";
38
+ style=rounded; color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
39
+ Loop [label="Loop\nplan → dispatch → observe", fillcolor="#c4b5fd"];
40
+ Registry [label="Registry\n10 toolsets · 45+ tools", fillcolor="#c4b5fd"];
41
+ Swarm [label="Swarm\npersonas · debate · bus", fillcolor="#c4b5fd"];
42
+ Prompt [label="PromptBuilder\nMEMORY · SKILLS · EXTRO",fillcolor="#c4b5fd"];
27
43
  }
44
+ {rank=same; Loop; Registry; Swarm; Prompt}
45
+
46
+ /* ───────── L3 · CAPABILITY NAMESPACES ───────── */
47
+ subgraph cluster_caps {
48
+ label="Capability Namespaces (lib/pwn/*)"; fontcolor="#a7f3d0";
49
+ style=rounded; color="#047857"; bgcolor="#022c22"; penwidth=2;
50
+ Plugins [label="Plugins\n66 modules", fillcolor="#6ee7b7"];
51
+ SAST [label="SAST\n48 rules", fillcolor="#6ee7b7"];
52
+ WWW [label="WWW\n21 site drivers", fillcolor="#6ee7b7"];
53
+ AWS [label="AWS\n90 services", fillcolor="#6ee7b7"];
54
+ SDR [label="SDR\nGQRX · Flipper · RFID", fillcolor="#6ee7b7"];
55
+ Chain [label="Blockchain\nBTC · ETH", fillcolor="#6ee7b7"];
56
+ Bounty [label="Bounty\nlifecycle replay", fillcolor="#6ee7b7"];
57
+ Reports [label="Reports\nHTML · JSON", fillcolor="#6ee7b7"];
58
+ }
59
+ {rank=same; Plugins; SAST; WWW; AWS; SDR; Chain; Bounty; Reports}
60
+
61
+ /* ───────── L4 · PERSISTENCE (~/.pwn) ───────── */
62
+ subgraph cluster_persist {
63
+ label="Persistence ~/.pwn/"; fontcolor="#fde68a";
64
+ style=rounded; color="#a16207"; bgcolor="#422006"; penwidth=2;
65
+ Memory [label="memory.json", shape=cylinder, fillcolor="#fcd34d"];
66
+ Skills [label="skills/*.md", shape=cylinder, fillcolor="#fcd34d"];
67
+ Learn [label="learning.jsonl", shape=cylinder, fillcolor="#fcd34d"];
68
+ Metrics [label="metrics.json", shape=cylinder, fillcolor="#fcd34d"];
69
+ Extro [label="extrospection.json", shape=cylinder, fillcolor="#fcd34d"];
70
+ Sessions [label="sessions/*.jsonl", shape=cylinder, fillcolor="#fcd34d"];
71
+ SwarmB [label="swarm/*/bus.jsonl", shape=cylinder, fillcolor="#fcd34d"];
72
+ CronF [label="cron/jobs.yml", shape=cylinder, fillcolor="#fcd34d"];
73
+ }
74
+ {rank=same; Memory; Skills; Learn; Metrics; Extro; Sessions; SwarmB; CronF}
75
+
76
+ /* ── L0 → L1 ── */
77
+ User -> REPL [color="#38bdf8"];
78
+ User -> PwnAI [color="#38bdf8"];
79
+ CI -> CLI [color="#38bdf8"];
80
+ CI -> Cronb [label="crontab", color="#38bdf8"];
81
+
82
+ /* ── L1 → L2 ── */
83
+ REPL -> Loop [color="#a78bfa"];
84
+ PwnAI -> Loop [label="natural language", color="#a78bfa", penwidth=2];
85
+ PwnAI -> Registry [color="#a78bfa"];
86
+ CLI -> Swarm [style=invis];
87
+ Cronb -> Prompt [style=invis];
88
+
89
+ /* ── L2 → L3 ── */
90
+ Loop -> Plugins [label="pwn_eval", color="#34d399", penwidth=2];
91
+ Loop -> SAST [color="#34d399"];
92
+ Registry -> WWW [color="#34d399"];
93
+ Registry -> AWS [color="#34d399"];
94
+ Swarm -> SDR [color="#34d399"];
95
+ Swarm -> Chain [color="#34d399"];
96
+ Prompt -> Bounty [style=invis];
97
+ Prompt -> Reports [style=invis];
98
+ CLI -> Plugins [color="#34d399", constraint=false];
99
+
100
+ /* ── L3 → L4 ── */
101
+ Plugins -> Memory [color="#f59e0b"];
102
+ SAST -> Skills [color="#f59e0b"];
103
+ WWW -> Learn [color="#f59e0b"];
104
+ AWS -> Metrics [color="#f59e0b"];
105
+ SDR -> Extro [color="#f59e0b"];
106
+ Chain -> Sessions [color="#f59e0b"];
107
+ Bounty -> SwarmB [color="#f59e0b"];
108
+ Reports -> CronF [color="#f59e0b"];
28
109
 
29
- BinDrivers [label="/opt/pwn/bin/\n(Drivers & CLIs)", shape=box];
30
-
31
- User -> REPL [label="pwn / pwn-ai"];
32
- REPL -> AI [label="launch pwn-ai"];
33
- REPL -> Plugins [label="direct invocation"];
34
- REPL -> SAST;
35
- REPL -> Reports;
36
- REPL -> Driver;
37
- AI -> Plugins [label="tool calls\npwn_eval"];
38
- AI -> Memory [label="remember/recall"];
39
- REPL -> Memory;
40
- REPL -> BinDrivers;
41
- Driver -> BinDrivers;
42
- Plugins -> Learn;
43
- AI -> Learn [label="distill skills"];
44
- Learn -> Skills [label="promote successful"];
45
- Skills -> AI [label="context injection"];
46
- Skills -> REPL;
47
- Cron -> REPL [label="schedule drivers/agents"];
48
- Sess -> REPL [label="replay / audit"];
110
+ /* ── side flows (few, non-constraining) ── */
111
+ Loop -> LLM [label="tool-use API", color="#c4b5fd", constraint=false, penwidth=2];
112
+ Plugins -> Target [label="attack", color="#fb7185", constraint=false, penwidth=2];
113
+ Prompt -> Memory [label="inject", dir=back, color="#fbbf24", constraint=false, style=dashed];
114
+ Reports -> User [label="findings", color="#38bdf8", constraint=false, penwidth=2];
49
115
  }
@@ -1,29 +1,60 @@
1
- digraph "PWN Penetration Testing Workflow" {
2
- rankdir=TB;
3
- node [shape=box, style=rounded, fontname="Arial", fontsize=9];
4
- edge [fontname="Arial", fontsize=8];
1
+ digraph "PWN_Pentest" {
2
+ graph [
3
+ label=<<B>End-to-End Penetration Testing with PWN</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">recon → enumerate → exploit → post-ex → report</FONT>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=LR, splines=spline, nodesep=0.45, ranksep=1.2,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=10, style="filled,rounded",
9
+ shape=box, penwidth=1.3, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
5
12
 
6
- Target [label="Target System\n(Host, Network, App)", shape=box];
13
+ Scope [label="🎯 Scope\ntargets · rules", fillcolor="#7dd3fc"];
7
14
 
8
- Recon [label="Recon\n(NmapIt, Shodan,\nIPInfo, crt.sh)", shape=ellipse, fillcolor=lightblue];
9
- Scanning [label="Vuln Scanning\n(OpenVAS, Nessus,\nNexpose, ZAP/Burp)", shape=ellipse, fillcolor=lightblue];
10
- Web [label="Web App Testing\n(TransparentBrowser,\nBurpSuite, Zaproxy,\nURI Buster)", shape=ellipse, fillcolor=lightblue];
11
- Fuzz [label="Fuzzing\n(PWN::Plugins::Fuzz,\npwn_fuzz_net_app_proto)", shape=ellipse, fillcolor=lightblue];
12
- Exploit [label="Exploitation\n(Metasploit, custom\nBeEF, Serial, etc.)", shape=ellipse, fillcolor=lightcoral];
13
- Post [label="Post-Exploitation\n(PS, FileFu, SSH,\ncredential extraction)", shape=ellipse, fillcolor=lightcoral];
14
- Report [label="Reporting\n(PWN::Reports)", shape=ellipse, fillcolor=lightgreen];
15
+ subgraph cluster_recon {
16
+ label="1 · Recon"; fontcolor="#a7f3d0"; style=rounded;
17
+ color="#047857"; bgcolor="#022c22";
18
+ Shodan [label="Plugins::Shodan\nHunter · IPInfo", fillcolor="#6ee7b7"];
19
+ CrtSh [label="bin/pwn_crt_sh\nWWW::WaybackMachine", fillcolor="#6ee7b7"];
20
+ }
21
+ subgraph cluster_enum {
22
+ label="2 · Enumerate"; fontcolor="#a7f3d0"; style=rounded;
23
+ color="#047857"; bgcolor="#022c22";
24
+ Nmap [label="Plugins::NmapIt\nTCP/UDP discover", fillcolor="#6ee7b7"];
25
+ Spider[label="Plugins::Spider\nTransparentBrowser", fillcolor="#6ee7b7"];
26
+ }
27
+ subgraph cluster_vuln {
28
+ label="3 · Vuln Scan"; fontcolor="#fde68a"; style=rounded;
29
+ color="#a16207"; bgcolor="#422006";
30
+ Burp [label="Plugins::BurpSuite\nactive scan", fillcolor="#fcd34d"];
31
+ Nessus [label="NessusCloud\nOpenVAS · Nexpose", fillcolor="#fcd34d"];
32
+ }
33
+ subgraph cluster_xpl {
34
+ label="4 · Exploit"; fontcolor="#fecaca"; style=rounded;
35
+ color="#b91c1c"; bgcolor="#450a0a";
36
+ MSF [label="Plugins::Metasploit", fillcolor="#fda4af"];
37
+ Fuzz [label="Plugins::Fuzz\nPacket · Sock", fillcolor="#fda4af"];
38
+ }
39
+ subgraph cluster_post {
40
+ label="5 · Post-Ex"; fontcolor="#ddd6fe"; style=rounded;
41
+ color="#6d28d9"; bgcolor="#2e1065";
42
+ Beef [label="Plugins::BeEF\nAndroid · Serial", fillcolor="#c4b5fd"];
43
+ Tor [label="Plugins::Tor\npivot / exfil", fillcolor="#c4b5fd"];
44
+ }
45
+ Report [label="PWN::Reports\nHTML · JSON · DefectDojo", fillcolor="#7dd3fc"];
15
46
 
16
- MemorySkills [label="Memory + Skills\n(persistent context)", shape=cylinder];
17
-
18
- Target -> Recon;
19
- Recon -> Scanning;
20
- Scanning -> Web;
21
- Web -> Fuzz;
22
- Fuzz -> Exploit;
23
- Exploit -> Post;
24
- Post -> Report;
25
-
26
- Report -> MemorySkills [label="note outcomes"];
27
- MemorySkills -> Recon [label="recall previous\nfindings"];
28
- MemorySkills -> Exploit [label="reuse exploits"];
47
+ Scope -> Shodan [color="#38bdf8"];
48
+ Scope -> CrtSh [color="#38bdf8"];
49
+ Shodan -> Nmap [color="#34d399"];
50
+ CrtSh -> Spider [color="#34d399"];
51
+ Nmap -> Burp [color="#f59e0b"];
52
+ Nmap -> Nessus [color="#f59e0b"];
53
+ Spider -> Burp [color="#f59e0b"];
54
+ Burp -> MSF [color="#fb7185"];
55
+ Nessus -> Fuzz [color="#fb7185"];
56
+ MSF -> Beef [color="#a78bfa"];
57
+ Fuzz -> Tor [color="#a78bfa"];
58
+ Beef -> Report [color="#38bdf8", penwidth=2];
59
+ Tor -> Report [color="#38bdf8", penwidth=2];
29
60
  }
@@ -1,31 +1,45 @@
1
- digraph "PWN Plugin Ecosystem" {
2
- rankdir=TB;
3
- node [shape=box, style=rounded, fontname="Arial", fontsize=8];
4
- edge [fontsize=7];
1
+ digraph "PWN_Plugins" {
2
+ graph [
3
+ label=<<B>PWN::Plugins 66 Modules by Category</B>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=LR, splines=spline, nodesep=0.25, ranksep=1.5,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=9, style="filled,rounded",
9
+ shape=box, penwidth=1.2, color="#334155", fontcolor="#0f172a"];
10
+ edge [color="#94a3b8", penwidth=1.0, arrowsize=0.6];
5
11
 
6
- Hub [label="PWN::Plugins", shape=ellipse, fillcolor=lightblue];
7
- Recon [label="Recon & Discovery\n(NmapIt, Shodan, IPInfo,\nHunter, crt.sh, Git)"];
8
- Web [label="Web & Proxy\n(TransparentBrowser,\nBurpSuite, Zaproxy,\nSpider, URI Buster)"];
9
- Vuln [label="Vulnerability\n(Fuzz, Metasploit,\nNessus, OpenVAS,\nNexpose, DefectDojo)"];
10
- Auth [label="Auth & Access\n(OAuth2, BasicAuth,\nDAOs, Vault)"];
11
- Infra [label="Infrastructure\n(Jenkins, AWS, Jira,\nRabbitMQ, Vsphere)"];
12
- LowLevel [label="Low Level &\nHardware\n(Serial, BusPirate,\nPacket, Sock, Tor,\nAndroid, Assembly)"];
13
- Util [label="Utilities\n(FileFu, Char, XXD,\nPS, Reports helpers)"];
14
- SDR [label="SDR & RF\n(SDR, gqrx)"];
15
- Other [label="Misc\n(BeEF, OCR, PDFParse,\nScannableCodes, etc.)"];
12
+ Root [label="PWN::Plugins", fillcolor="#7dd3fc", fontsize=14, penwidth=2];
16
13
 
17
- Hub -> Recon;
18
- Hub -> Web;
19
- Hub -> Vuln;
20
- Hub -> Auth;
21
- Hub -> Infra;
22
- Hub -> LowLevel;
23
- Hub -> Util;
24
- Hub -> SDR;
25
- Hub -> Other;
14
+ subgraph cluster_cat {
15
+ label=""; style=invis;
16
+ Web [label="Web / Proxy", fillcolor="#6ee7b7"];
17
+ Net [label="Network", fillcolor="#6ee7b7"];
18
+ Xpl [label="Exploitation", fillcolor="#6ee7b7"];
19
+ Osint[label="OSINT", fillcolor="#6ee7b7"];
20
+ Data [label="Data / DAO", fillcolor="#6ee7b7"];
21
+ Auth [label="Auth", fillcolor="#6ee7b7"];
22
+ HW [label="Hardware", fillcolor="#6ee7b7"];
23
+ CI [label="CI / DevOps", fillcolor="#6ee7b7"];
24
+ Comm [label="Comms", fillcolor="#6ee7b7"];
25
+ Util [label="Utility", fillcolor="#6ee7b7"];
26
+ }
27
+ {rank=same; Web; Net; Xpl; Osint; Data; Auth; HW; CI; Comm; Util}
26
28
 
27
- Recon -> Vuln;
28
- Web -> Vuln;
29
- Auth -> Vuln;
30
- Infra -> Vuln;
29
+ node [fillcolor="#fcd34d"];
30
+ w [label="BurpSuite · Zaproxy\nTransparentBrowser · Spider\nOpenAPI · URIScheme"];
31
+ n [label="NmapIt · Sock · Packet\nTor · IPInfo"];
32
+ x [label="Metasploit · Fuzz\nBeEF · Assembly"];
33
+ o [label="Shodan · Hunter\nGithub · HackerOne"];
34
+ d [label="DAO::LDAP/Mongo/PG/SQLite\nJSONPathify · PDFParse · OCR"];
35
+ a [label="OAuth2 · BasicAuth\nAuthenticationHelper · Vault"];
36
+ h [label="Serial · BusPirate\nMSR206 · Android · BareSIP"];
37
+ c [label="Jenkins · Git · vSphere\nDefectDojo · BlackDuck"];
38
+ m [label="MailAgent · SlackClient\nIRC · RabbitMQ · TwitterAPI · Voice"];
39
+ u [label="FileFu · ThreadPool · Log\nChar · XXD · DetectOS\nScannableCodes · CreditCard\nSSN · EIN · VIN · Pony · PS"];
40
+
41
+ Root->Web; Root->Net; Root->Xpl; Root->Osint; Root->Data;
42
+ Root->Auth; Root->HW; Root->CI; Root->Comm; Root->Util;
43
+ Web->w; Net->n; Xpl->x; Osint->o; Data->d;
44
+ Auth->a; HW->h; CI->c; Comm->m; Util->u;
31
45
  }
@@ -1,57 +1,98 @@
1
- digraph "PWN-AI Feedback Learning Loop" {
2
- rankdir=TB;
3
- node [shape=box, style=rounded, fontname="Arial", fontsize=10];
4
- edge [fontname="Arial", fontsize=9];
5
-
6
- // External Entities
7
- User [label="Security Researcher\n(User / pwn-ai)", shape=box];
8
- LLM [label="LLM Providers\n(Grok/OAuth, OpenAI,\nAnthropic, Gemini, Ollama)", shape=box];
9
-
10
- // Processes
11
- subgraph cluster_agent {
12
- label="PWN::AI::Agent";
13
- style=rounded;
14
- color=blue;
15
-
16
- PwnAI [label="pwn-ai TUI\n(Natural Language Interface)", shape=ellipse, style=filled, fillcolor=lightblue];
17
- ToolCall [label="Tool Calling Dispatcher\n(pwn_eval, shell, memory,\nskill_list, etc.)", shape=ellipse, style=filled, fillcolor=lightblue];
18
- Introspection [label="Introspection &\nReflection", shape=ellipse, style=filled, fillcolor=lightblue];
19
- }
1
+ digraph "PWN_AI_Feedback_Learning_Loop" {
2
+ graph [
3
+ label=<<B>pwn-ai Closed Self-Improvement Loop</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">Introspection (self) ⟷ Extrospection (world)</FONT>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=TB, splines=spline, nodesep=0.6, ranksep=1.0,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true, compound=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=11, style="filled,rounded",
9
+ shape=box, penwidth=1.4, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
12
+
13
+ /* L0 ─ actors */
14
+ User [label="👤 Researcher", fillcolor="#7dd3fc"];
15
+ LLM [label="🤖 LLM Provider", fillcolor="#c4b5fd"];
16
+ World [label="🌍 Host · Net · Repo\nToolchain · Intel feeds", fillcolor="#fda4af"];
17
+ {rank=same; User; LLM; World}
20
18
 
21
- // Data Stores
22
- Memory [label="PWN::Memory\n(~/.pwn/memory.json)", shape=cylinder, fillcolor=lightyellow];
23
- Metrics [label="PWN::AI::Agent::Metrics\n(~/.pwn/metrics.json)", shape=cylinder, fillcolor=lightyellow];
24
- Learning [label="PWN::AI::Agent::Learning\n(~/.pwn/learning.jsonl)", shape=cylinder, fillcolor=lightyellow];
25
- Skills [label="PWN::Skills\n(~/.pwn/skills/*.md)", shape=cylinder, fillcolor=lightyellow];
26
- History [label="Pry History /\nSession Logs", shape=cylinder, fillcolor=lightyellow];
19
+ /* L1 ─ agent core */
20
+ subgraph cluster_core {
21
+ label="PWN::AI::Agent::Loop"; fontcolor="#ddd6fe";
22
+ style=rounded; color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
23
+ Prompt [label="PromptBuilder\ninject context", fillcolor="#c4b5fd"];
24
+ Dispatch [label="Dispatch\ntool calls", fillcolor="#c4b5fd"];
25
+ Result [label="Result\nfinal answer", fillcolor="#c4b5fd"];
26
+ }
27
+ {rank=same; Prompt; Dispatch; Result}
27
28
 
28
- // External / Other
29
- REPL [label="PWN REPL\n(Full PWN namespace)", shape=box];
29
+ /* L2 dual engines */
30
+ subgraph cluster_intro {
31
+ label="INTROSPECTION (self)"; fontcolor="#a7f3d0";
32
+ style=rounded; color="#047857"; bgcolor="#022c22"; penwidth=2;
33
+ Metrics [label="Metrics\nper-tool success · avg ms", fillcolor="#6ee7b7"];
34
+ Learning [label="Learning\nnote_outcome · reflect\nconsolidate · distill_skill", fillcolor="#6ee7b7"];
35
+ }
36
+ subgraph cluster_extro {
37
+ label="EXTROSPECTION (world)"; fontcolor="#fde68a";
38
+ style=rounded; color="#a16207"; bgcolor="#422006"; penwidth=2;
39
+ Snapshot [label="snapshot · drift\nhost/net/toolchain/repo", fillcolor="#fcd34d"];
40
+ Observe [label="observe · intel\nrecon facts · CVE feed", fillcolor="#fcd34d"];
41
+ }
42
+ {rank=same; Metrics; Learning; Snapshot; Observe}
30
43
 
31
- // Flows
32
- User -> PwnAI [label="Natural language task\n(e.g. scan + exploit + report)"];
33
- PwnAI -> ToolCall [label="Parse intent, plan steps"];
34
- ToolCall -> REPL [label="pwn_eval(code) or shell(cmd)"];
35
- REPL -> ToolCall [label="Results / stdout / exceptions"];
36
- ToolCall -> LLM [label="If needed for decisioning"];
37
- LLM -> ToolCall [label="Responses"];
44
+ /* L3 ─ correlate */
45
+ Correlate [label="extro_correlate()\n\"I did it wrong\" vs \"the world changed\"",
46
+ fillcolor="#fda4af", penwidth=2, fontsize=12];
38
47
 
39
- ToolCall -> Memory [label="remember(key, val)"];
40
- Memory -> ToolCall [label="recall(query) injected\ninto prompts"];
48
+ /* L4 persistence */
49
+ subgraph cluster_store {
50
+ label="~/.pwn/"; fontcolor="#94a3b8";
51
+ style="rounded,dashed"; color="#334155"; bgcolor="#1e293b";
52
+ Fmet [label="metrics.json", shape=cylinder, fillcolor="#fcd34d"];
53
+ Flrn [label="learning.jsonl", shape=cylinder, fillcolor="#fcd34d"];
54
+ Fmem [label="memory.json", shape=cylinder, fillcolor="#fcd34d"];
55
+ Fskl [label="skills/*.md", shape=cylinder, fillcolor="#fcd34d"];
56
+ Fext [label="extrospection.json", shape=cylinder, fillcolor="#fcd34d"];
57
+ }
58
+ {rank=same; Fmet; Flrn; Fmem; Fskl; Fext}
41
59
 
42
- ToolCall -> Metrics [label="record(success, duration,\ntool=...)"];
43
- Metrics -> Introspection [label="per-tool stats"];
60
+ /* L0 L1 */
61
+ User -> Prompt [label="task", color="#38bdf8", penwidth=2];
62
+ LLM -> Dispatch [label="tool_calls", dir=both, color="#a78bfa", penwidth=2];
63
+ World-> Result [style=invis];
44
64
 
45
- ToolCall -> Learning [label="note_outcome(task, success, details)"];
46
- Learning -> Introspection [label="reflect on transcript"];
65
+ /* L1 internal */
66
+ Prompt -> Dispatch [color="#a78bfa"];
67
+ Dispatch -> Result [color="#a78bfa"];
47
68
 
48
- Introspection -> Skills [label="distill_skill(name, content,\nreferences)"];
49
- Skills -> ToolCall [label="skill_list / skill_view\ninjected into future prompts"];
69
+ /* L1 L2 */
70
+ Dispatch -> Metrics [label="record()", color="#34d399"];
71
+ Result -> Learning [label="auto_reflect", color="#34d399"];
72
+ Dispatch -> Snapshot [label="probe", color="#f59e0b"];
73
+ Result -> Observe [label="auto_extrospect", color="#f59e0b"];
74
+ World -> Snapshot [color="#fb7185", constraint=false];
75
+ World -> Observe [color="#fb7185", constraint=false];
50
76
 
51
- Introspection -> History [label="Update session"];
77
+ /* L2 L3 */
78
+ Metrics -> Correlate [color="#34d399"];
79
+ Learning -> Correlate [color="#34d399"];
80
+ Snapshot -> Correlate [color="#f59e0b"];
81
+ Observe -> Correlate [color="#f59e0b"];
52
82
 
53
- User -> History [label="history command to\ninspect previous"];
54
- History -> PwnAI [label="context from prior sessions"];
83
+ /* L3 L4 */
84
+ Correlate -> Fmet [style=invis];
85
+ Metrics -> Fmet [color="#94a3b8"];
86
+ Learning -> Flrn [color="#94a3b8"];
87
+ Learning -> Fmem [label="lesson", color="#94a3b8"];
88
+ Learning -> Fskl [label="skill", color="#94a3b8"];
89
+ Observe -> Fext [color="#94a3b8"];
55
90
 
56
- PwnAI -> User [label="Results, reports, next steps"];
91
+ /* feedback (dashed, non-constraining) */
92
+ Fmem -> Prompt [label="MEMORY block", style=dashed, color="#fbbf24", constraint=false];
93
+ Fskl -> Prompt [label="SKILLS block", style=dashed, color="#fbbf24", constraint=false];
94
+ Fext -> Prompt [label="EXTRO block", style=dashed, color="#fbbf24", constraint=false];
95
+ Correlate -> Prompt [label="findings → next run", style=dashed, color="#fb7185",
96
+ constraint=false, penwidth=2];
97
+ Result -> User [label="answer", color="#38bdf8", constraint=false, penwidth=2];
57
98
  }
@@ -1,37 +1,56 @@
1
- digraph "PWN REPL Prototyping & Development" {
2
- rankdir=LR;
3
- node [shape=box, style=rounded, fontname="Arial", fontsize=9];
4
- edge [fontname="Arial", fontsize=8];
1
+ digraph "PWN_REPL" {
2
+ graph [
3
+ label=<<B>The pwn REPL — Interactive Prototyping</B><BR/><FONT POINT-SIZE="11" COLOR="#94a3b8">Pry + full PWN:: preload + custom commands</FONT>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=TB, splines=spline, nodesep=0.55, ranksep=0.9,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=10, style="filled,rounded",
9
+ shape=box, penwidth=1.3, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
5
12
 
6
- User [label="User\n(Researcher)", shape=box];
7
- Shell [label="shell (pwn command)", shape=box];
8
- Pry [label="Pry REPL\n(PWN preloaded)", shape=ellipse, fillcolor=lightgreen, style=filled];
13
+ User [label="👤 $ pwn", fillcolor="#7dd3fc"];
9
14
 
10
- subgraph cluster_pwn {
11
- label="PWN Namespace";
12
- color=navy;
13
- Plugins [label="PWN::Plugins::\n(Burp, NmapIt,\nTransparentBrowser,\nMetasploit, etc.)", shape=box];
14
- SAST [label="PWN::SAST\n(Static Analysis\n+ Testgen)", shape=box];
15
- Reports [label="PWN::Reports", shape=box];
16
- Driver [label="PWN::Driver\n(Parser, auto_opts)", shape=box];
17
- AI [label="PWN::AI::\n(Agent, Grok, etc.)", shape=box];
15
+ subgraph cluster_repl {
16
+ label="Plugins::REPL (Pry)"; fontcolor="#ddd6fe"; style=rounded;
17
+ color="#6d28d9"; bgcolor="#2e1065"; penwidth=2;
18
+ Prompt [label="pwn[v0.5.x]:001 >>>", fillcolor="#c4b5fd"];
19
+ Preload [label="autoload PWN::*\nBanner · MonkeyPatch", fillcolor="#c4b5fd"];
20
+ Hist [label="~/.pwn_history\nreplay · edit", fillcolor="#c4b5fd"];
18
21
  }
22
+ {rank=same; Prompt; Preload; Hist}
19
23
 
20
- History [label="Pry Command History\n(~/.pry_history)", shape=cylinder, fillcolor=yellow];
21
- Scripts [label="Custom Scripts\n& Prototypes (.rb)", shape=box];
22
-
23
- User -> Shell [label="pwn"];
24
- Shell -> Pry [label="starts"];
25
- Pry -> Plugins [label="direct method calls"];
26
- Pry -> SAST [label="PWN::SAST.analyze..."];
27
- Pry -> Reports [label="PWN::Reports.generate"];
28
- Pry -> AI [label="pwn-ai or direct"];
29
- Pry -> History [label="every cmd logged"];
30
- Pry -> Scripts [label="save / edit\nprototype"];
24
+ subgraph cluster_cmds {
25
+ label="Custom Commands"; fontcolor="#a7f3d0"; style=rounded;
26
+ color="#047857"; bgcolor="#022c22";
27
+ CAI [label="pwn-ai", fillcolor="#6ee7b7"];
28
+ CASM [label="pwn-asm", fillcolor="#6ee7b7"];
29
+ CMEM [label="pwn-ai-memory", fillcolor="#6ee7b7"];
30
+ CSESS [label="pwn-ai-sessions",fillcolor="#6ee7b7"];
31
+ CCRON [label="pwn-ai-cron", fillcolor="#6ee7b7"];
32
+ CDEL [label="pwn-ai-delegate",fillcolor="#6ee7b7"];
33
+ }
34
+ {rank=same; CAI; CASM; CMEM; CSESS; CCRON; CDEL}
31
35
 
32
- History -> Pry [label="history\nup-arrow\nctrl-r search"];
33
- Scripts -> Pry [label="load / require\ncopy-paste"];
34
- Scripts -> Driver [label="wrap as driver"];
36
+ subgraph cluster_ns {
37
+ label="Live Namespace"; fontcolor="#fde68a"; style=rounded;
38
+ color="#a16207"; bgcolor="#422006";
39
+ NS [label="PWN::Plugins · PWN::SAST · PWN::AWS · PWN::SDR\nPWN::WWW · PWN::Reports · PWN::AI · PWN::Memory",
40
+ fillcolor="#fcd34d", fontsize=11];
41
+ }
35
42
 
36
- Pry -> User [label="interactive results\ninspect / pp / tab-complete"];
43
+ User -> Prompt [color="#38bdf8", penwidth=2];
44
+ User -> Preload [style=invis];
45
+ User -> Hist [style=invis];
46
+ Prompt -> CAI [color="#34d399"];
47
+ Prompt -> CASM [color="#34d399"];
48
+ Preload -> CMEM [color="#34d399"];
49
+ Preload -> CSESS [color="#34d399"];
50
+ Hist -> CCRON [color="#34d399"];
51
+ Hist -> CDEL [color="#34d399"];
52
+ CAI -> NS [color="#f59e0b"];
53
+ CASM -> NS [color="#f59e0b"];
54
+ CMEM -> NS [color="#f59e0b"];
55
+ Prompt -> NS [label="direct call", color="#f59e0b", constraint=false, penwidth=2];
37
56
  }
@@ -1,17 +1,46 @@
1
- digraph "PWN Reporting Pipeline" {
2
- rankdir=LR;
3
- node [shape=box, style=rounded, fontname="Arial", fontsize=9];
1
+ digraph "PWN_Reports" {
2
+ graph [
3
+ label=<<B>PWN::Reports Findings Pipeline</B>>,
4
+ labelloc=t, fontsize=20, fontname="Helvetica",
5
+ rankdir=LR, splines=spline, nodesep=0.45, ranksep=1.2,
6
+ bgcolor="#0f172a", fontcolor="#e2e8f0", pad=0.6, newrank=true
7
+ ];
8
+ node [fontname="Helvetica", fontsize=10, style="filled,rounded",
9
+ shape=box, penwidth=1.3, color="#334155", fontcolor="#0f172a"];
10
+ edge [fontname="Helvetica", fontsize=9, color="#94a3b8",
11
+ fontcolor="#cbd5e1", penwidth=1.3, arrowsize=0.8];
4
12
 
5
- Findings [label="Raw Findings\n(Scan results,\nagent outputs,\nexploits, SAST)", shape=box];
6
- Reports [label="PWN::Reports", shape=ellipse, fillcolor=lightgreen];
7
- Templates [label="Templates\n(Markdown, PDF,\nJSON, CSV, HTML)", shape=cylinder];
8
- Outputs [label="Generated Reports\n(DefectDojo import,\nJira tickets, PDFs)", shape=box];
9
- Memory [label="PWN::Memory", shape=cylinder, fillcolor=lightyellow];
13
+ subgraph cluster_src {
14
+ label="Finding Sources"; fontcolor="#a7f3d0"; style=rounded;
15
+ color="#047857"; bgcolor="#022c22";
16
+ Sast [label="PWN::SAST", fillcolor="#6ee7b7"];
17
+ Fuzz [label="Plugins::Fuzz", fillcolor="#6ee7b7"];
18
+ Uri [label="URI Buster", fillcolor="#6ee7b7"];
19
+ Phone[label="BareSIP recon", fillcolor="#6ee7b7"];
20
+ }
21
+ subgraph cluster_gen {
22
+ label="Generators"; fontcolor="#fde68a"; style=rounded;
23
+ color="#a16207"; bgcolor="#422006";
24
+ Rsast [label="Reports::SAST", fillcolor="#fcd34d"];
25
+ Rfuzz [label="Reports::Fuzz", fillcolor="#fcd34d"];
26
+ Ruri [label="Reports::URIBuster", fillcolor="#fcd34d"];
27
+ Rphone[label="Reports::Phone", fillcolor="#fcd34d"];
28
+ }
29
+ subgraph cluster_out {
30
+ label="Delivery"; fontcolor="#ddd6fe"; style=rounded;
31
+ color="#6d28d9"; bgcolor="#2e1065";
32
+ HTML [label="HTML\n(Header/Footer)", fillcolor="#c4b5fd"];
33
+ JSON [label="JSON", fillcolor="#c4b5fd"];
34
+ DD [label="DefectDojo\nimport/reimport", fillcolor="#c4b5fd"];
35
+ Jira [label="JiraDataCenter", fillcolor="#c4b5fd"];
36
+ }
10
37
 
11
- Findings -> Reports;
12
- Reports -> Templates;
13
- Templates -> Reports;
14
- Reports -> Outputs [label="generate"];
15
- Reports -> Memory [label="store summary"];
16
- Memory -> Reports [label="enrich with context"];
38
+ Sast -> Rsast [color="#f59e0b"];
39
+ Fuzz -> Rfuzz [color="#f59e0b"];
40
+ Uri -> Ruri [color="#f59e0b"];
41
+ Phone -> Rphone [color="#f59e0b"];
42
+ Rsast -> HTML [color="#a78bfa"];
43
+ Rfuzz -> JSON [color="#a78bfa"];
44
+ Ruri -> DD [color="#a78bfa"];
45
+ Rphone -> Jira [color="#a78bfa"];
17
46
  }