pwn 0.5.618 → 0.5.620

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 (82) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/README.md +14 -6
  4. data/bin/pwn_gqrx_scanner +25 -5
  5. data/documentation/Agent-Tool-Registry.md +3 -3
  6. data/documentation/Diagrams.md +6 -2
  7. data/documentation/Extrospection.md +30 -11
  8. data/documentation/Home.md +5 -4
  9. data/documentation/How-PWN-Works.md +7 -4
  10. data/documentation/Mistakes.md +96 -0
  11. data/documentation/Persistence.md +3 -1
  12. data/documentation/SDR.md +23 -5
  13. data/documentation/Skills-Memory-Learning.md +15 -5
  14. data/documentation/diagrams/agent-tool-registry.svg +94 -92
  15. data/documentation/diagrams/dot/agent-tool-registry.dot +2 -2
  16. data/documentation/diagrams/dot/extrospection-world-awareness.dot +9 -7
  17. data/documentation/diagrams/dot/memory-skills-detailed.dot +12 -5
  18. data/documentation/diagrams/dot/mistakes-negative-feedback.dot +93 -0
  19. data/documentation/diagrams/dot/overall-pwn-architecture.dot +7 -5
  20. data/documentation/diagrams/dot/persistence-filesystem.dot +3 -2
  21. data/documentation/diagrams/dot/pwn-ai-feedback-learning-loop.dot +19 -7
  22. data/documentation/diagrams/dot/sdr-radio-flow.dot +13 -11
  23. data/documentation/diagrams/extrospection-world-awareness.svg +111 -93
  24. data/documentation/diagrams/memory-skills-detailed.svg +146 -97
  25. data/documentation/diagrams/mistakes-negative-feedback.svg +266 -0
  26. data/documentation/diagrams/overall-pwn-architecture.svg +184 -173
  27. data/documentation/diagrams/persistence-filesystem.svg +77 -62
  28. data/documentation/diagrams/pwn-ai-feedback-learning-loop.svg +217 -149
  29. data/documentation/diagrams/sdr-radio-flow.svg +76 -56
  30. data/documentation/pwn-ai-Agent.md +28 -15
  31. data/lib/pwn/ai/agent/extrospection.rb +65 -6
  32. data/lib/pwn/ai/agent/learning.rb +67 -7
  33. data/lib/pwn/ai/agent/loop.rb +72 -6
  34. data/lib/pwn/ai/agent/mistakes.rb +369 -0
  35. data/lib/pwn/ai/agent/prompt_builder.rb +10 -1
  36. data/lib/pwn/ai/agent/tools/extrospection.rb +2 -2
  37. data/lib/pwn/ai/agent/tools/mistakes.rb +132 -0
  38. data/lib/pwn/ai/agent.rb +1 -0
  39. data/lib/pwn/plugins/jira_data_center.rb +2 -2
  40. data/lib/pwn/sdr/decoder/adsb.rb +101 -0
  41. data/lib/pwn/sdr/decoder/apt.rb +75 -0
  42. data/lib/pwn/sdr/decoder/bluetooth.rb +78 -0
  43. data/lib/pwn/sdr/decoder/dect.rb +84 -0
  44. data/lib/pwn/sdr/decoder/gps.rb +83 -0
  45. data/lib/pwn/sdr/decoder/gsm.rb +50 -29
  46. data/lib/pwn/sdr/decoder/iridium.rb +81 -0
  47. data/lib/pwn/sdr/decoder/lora.rb +87 -0
  48. data/lib/pwn/sdr/decoder/lte.rb +88 -0
  49. data/lib/pwn/sdr/decoder/morse.rb +64 -0
  50. data/lib/pwn/sdr/decoder/p25.rb +71 -0
  51. data/lib/pwn/sdr/decoder/pager.rb +77 -0
  52. data/lib/pwn/sdr/decoder/pocsag.rb +26 -11
  53. data/lib/pwn/sdr/decoder/rfid.rb +88 -0
  54. data/lib/pwn/sdr/decoder/rtl433.rb +95 -0
  55. data/lib/pwn/sdr/decoder/rtty.rb +66 -0
  56. data/lib/pwn/sdr/decoder/wifi.rb +98 -0
  57. data/lib/pwn/sdr/decoder/zigbee.rb +96 -0
  58. data/lib/pwn/sdr/decoder.rb +67 -7
  59. data/lib/pwn/sdr/frequency_allocation.rb +82 -41
  60. data/lib/pwn/sdr/gqrx.rb +186 -95
  61. data/lib/pwn/version.rb +1 -1
  62. data/spec/lib/pwn/ai/agent/mistakes_spec.rb +36 -0
  63. data/spec/lib/pwn/ai/agent/tools/mistakes_spec.rb +12 -0
  64. data/spec/lib/pwn/sdr/decoder/adsb_spec.rb +15 -0
  65. data/spec/lib/pwn/sdr/decoder/apt_spec.rb +15 -0
  66. data/spec/lib/pwn/sdr/decoder/bluetooth_spec.rb +15 -0
  67. data/spec/lib/pwn/sdr/decoder/dect_spec.rb +15 -0
  68. data/spec/lib/pwn/sdr/decoder/gps_spec.rb +15 -0
  69. data/spec/lib/pwn/sdr/decoder/iridium_spec.rb +15 -0
  70. data/spec/lib/pwn/sdr/decoder/lora_spec.rb +15 -0
  71. data/spec/lib/pwn/sdr/decoder/lte_spec.rb +15 -0
  72. data/spec/lib/pwn/sdr/decoder/morse_spec.rb +15 -0
  73. data/spec/lib/pwn/sdr/decoder/p25_spec.rb +15 -0
  74. data/spec/lib/pwn/sdr/decoder/pager_spec.rb +15 -0
  75. data/spec/lib/pwn/sdr/decoder/rfid_spec.rb +15 -0
  76. data/spec/lib/pwn/sdr/decoder/rtl433_spec.rb +15 -0
  77. data/spec/lib/pwn/sdr/decoder/rtty_spec.rb +15 -0
  78. data/spec/lib/pwn/sdr/decoder/wifi_spec.rb +15 -0
  79. data/spec/lib/pwn/sdr/decoder/zigbee_spec.rb +15 -0
  80. data/third_party/pwn_rdoc.jsonl +92 -3
  81. metadata +44 -6
  82. data/README.md.bak +0 -200
data/README.md.bak DELETED
@@ -1,200 +0,0 @@
1
- ![PWN](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/PWN.png)
2
-
3
- ### **Table of Contents** ###
4
-
5
- - [Intro](#intro)
6
- * [What is PWN](#what-is-pwn)
7
- * [Why PWN](#why-pwn)
8
- * [How PWN Works](#how-pwn-works)
9
- - [[Local PWN Wiki](documentation/Home.md)
10
- - [Installation](#installation)
11
- - [General Usage](#general-usage)
12
- - [Call to Arms](#call-to-arms)
13
- - [Module Documentation](#module-documentation)
14
- - [Keep Us Caffeinated](#keep-us-caffeinated)
15
- - [0x004D65726368](#0x004d65726368)
16
-
17
- ### **Intro** ###
18
-
19
- #### **What is PWN** ####
20
-
21
- PWN (Pronounced /pōn/ or pone), is a powerful open-source offensive cybersecurity automation framework and continuous security integration platform. It enables security researchers, red teamers, penetration testers, and vulnerability researchers to rapidly discover zero-days, automate exploitation, perform advanced web application testing, conduct source code analysis (SAST), orchestrate infrastructure reconnaissance, and execute AI-augmented autonomous security operations.
22
-
23
- PWN stands on the shoulders of security giants, providing over **66** production-grade plugins, full LLM integration with tool-calling agents, persistent memory, reusable skills, session/cron management, and a highly interactive REPL for prototyping and driving complex security workflows. All core automation primitives are open to promote trust, peer review, and collaborative innovation in adversarial security.
24
-
25
- **See the full [PWN Wiki](documentation/Home.md) for detailed guides.**
26
-
27
- #### **Why PWN** ####
28
-
29
- In cybersecurity, where proprietary black-box tools dominate and threats evolve daily, an open framework for core security primitives, vulnerability research, exploitation techniques, and intelligent automation is essential. PWN ensures foundational modules remain transparent and auditable while providing seamless bridges to commercial and open security tools (e.g. Burp Suite Professional, Metasploit, Nmap, Nessus, and multiple LLMs).
30
-
31
- Broad collaboration accelerates zero-day discovery, reliable exploit development, continuous vulnerability management in CI/CD pipelines, and the creation of reusable AI-driven security skills. PWN makes advanced red team and vuln research capabilities accessible and extensible to all.
32
-
33
- See [Why PWN](documentation/Why-PWN.md) in the wiki.
34
-
35
- #### **How PWN Works** ####
36
-
37
- #### **PWN AI Feedback Learning Loop (Self-Improving Agent)**
38
-
39
- The core of pwn-ai is a closed feedback loop for autonomous improvement:
40
-
41
- ![PWN AI Feedback Learning Loop](documentation/diagrams/pwn-ai-feedback-learning-loop.svg)
42
-
43
- See full details in [Skills, Memory & Learning](documentation/Skills-Memory-Learning.md) and the [Diagrams](documentation/Diagrams.md) wiki page.
44
-
45
-
46
- PWN is structured as a Ruby gem with a rich namespace:
47
-
48
- - `PWN::Plugins::*` — **66+** specialized modules ([BurpSuite](documentation/BurpSuite.md) [preferred for web proxying/scanning], [Zaproxy](documentation/Plugins.md) [fallback], [Metasploit](documentation/Plugins.md), [NmapIt](documentation/NmapIt.md), [TransparentBrowser](documentation/Transparent-Browser.md), Shodan, NessusCloud, NexposeVulnScan, Fuzz, SAST engines, Android analysis, SDR/GQRX, Blockchain, Bounty platforms like HackerOne, hardware interfaces, OCR, packet crafting, etc.).
49
- - `PWN::AI::*` — Multi-provider LLM clients (OpenAI, Anthropic, Gemini, [Grok OAuth device flow](documentation/AI-Integration.md), Ollama) and autonomous `PWN::AI::Agent` with tool-calling harness (`pwn_eval` for full PWN namespace, shell execution, skills, memory recall/remember, learning loops).
50
- - `PWN::SAST` — Static application security testing and test case generation. See [SAST Wiki](documentation/SAST.md).
51
- - `PWN::Reports` — Automated reporting from scans, agents, and findings. See [Reporting](documentation/Reporting.md).
52
- - `PWN::Memory / Sessions / Cron / Skills / Config` — Persistent facts, conversation sessions, scheduled autonomous tasks, reusable markdown skills (distillable from successful workflows), and environment management. See [Skills, Memory & Learning](documentation/Skills-Memory-Learning.md).
53
- - `PWN::Driver` — Framework for building custom security automation packages ("drivers"). See [Drivers](documentation/Drivers.md).
54
-
55
- The **pwn REPL** (launched via the `pwn` command) is the primary interface: a Pry-powered interactive shell with the entire `PWN` namespace pre-loaded. It supports rapid prototyping, direct execution of any plugin method, and custom commands.
56
-
57
- **Particularly powerful is the `pwn-ai` command** inside the REPL:
58
- - Activates an autonomous AI agent TUI with multi-line input support (use SHIFT+ENTER to insert newlines; ENTER submits the full prompt).
59
- - Full awareness of PWN plugins, skills (`~/.pwn/skills`), memory, sessions, and cron.
60
- - Leverages LLM tool-calling to execute PWN methods (e.g., `PWN::Plugins::BurpSuite`, `PWN::Plugins::NmapIt`, `PWN::Plugins::TransparentBrowser`, `PWN::SAST`, `PWN::Reports`), shell commands, and orchestrate end-to-end tasks.
61
- - Supports self-improvement via `PWN::AI::Agent::Learning` / Metrics (records per-tool success/duration, distills skills from outcomes).
62
- - Example instruction: "Use NmapIt to scan target.example.com for open ports, then TransparentBrowser to spider the web app, run SAST analysis if source is available, proxy via BurpSuite, and generate a vulnerability report with PWN::Reports."
63
- - Additional REPL commands: `pwn-asm` (assembly prototyping with multiline), `pwn-ai-memory`, `pwn-ai-sessions`, `pwn-ai-cron`, `pwn-ai-delegate`, `welcome-banner`, etc.
64
- - Easily prototype and roll out custom "drivers" (see `/opt/pwn/bin/` examples).
65
-
66
- Mix and match plugins, invoke via the REPL or `pwn-ai` agent, record/replay sessions, schedule autonomous jobs, and generate reports. PWN is designed for both interactive red teaming and headless/CI automation.
67
-
68
- Here are some [example drivers](https://github.com/0dayInc/pwn/tree/master/bin) distributed with PWN.
69
-
70
- #### **Local PWN Wiki** ####
71
-
72
- A full local wiki has been generated in this checkout:
73
-
74
- **`/opt/pwn/documentation/Home.md`**
75
-
76
- - [Home](documentation/Home.md)
77
- - [What is PWN](documentation/What-is-PWN.md)
78
- - [Installation](documentation/Installation.md)
79
- - [pwn-ai Agent](documentation/pwn-ai-Agent.md)
80
- - [Plugins](documentation/Plugins.md)
81
- - [AI Integration](documentation/AI-Integration.md)
82
- - [Troubleshooting](documentation/Troubleshooting.md)
83
- - ...and many more
84
-
85
- Run `cat /opt/pwn/documentation/Home.md` or open in your editor for the complete local documentation.
86
-
87
- ### **Installation** ###
88
-
89
- Tested on Debian-Based Linux Distros & OSX leveraging Ruby via RVM.
90
-
91
- ```
92
- $ cd /opt
93
- $ sudo git clone https://github.com/0dayinc/pwn
94
- $ cd /opt/pwn
95
- $ ./install.sh
96
- $ ./install.sh ruby-gem
97
- $ pwn
98
- pwn[v0.5.617]:001 >>> PWN.help
99
- ```
100
-
101
- [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
102
-
103
- See the dedicated [Installation Wiki](documentation/Installation.md) for more options.
104
-
105
- ### **General Usage** ###
106
-
107
- [General Usage Quick-Start](https://github.com/0dayinc/pwn/wiki/General-PWN-Usage)
108
-
109
- Detailed local guide: [General PWN Usage](documentation/General-PWN-Usage.md)
110
-
111
- It is strongly recommended to update PWN frequently as new capabilities (plugins, AI agents, skills, zero-day tooling) are released regularly:
112
-
113
- ```
114
- $ rvm list gemsets
115
- $ rvm use ruby-4.0.5@pwn
116
- $ gem uninstall --all --executables pwn
117
- $ gem install --verbose pwn
118
- $ pwn
119
- pwn[v0.5.617]:001 >>> PWN.help
120
- ```
121
-
122
- If using a multi-user install of RVM:
123
-
124
- ```
125
- $ rvm list gemsets
126
- $ rvm use ruby-4.0.5@pwn
127
- $ rvmsudo gem uninstall --all --executables pwn
128
- $ rvmsudo gem install --verbose pwn
129
- $ pwn
130
- pwn[v0.5.617]:001 >>> PWN.help
131
- ```
132
-
133
- **Inside the pwn REPL (the heart of PWN):**
134
- - Full access to every PWN class and plugin.
135
- - `PWN.help` — list all top-level modules.
136
- - `pwn-ai` — launch the autonomous AI agent (highly recommended for complex tasks). Once active you can issue natural language instructions that leverage PWN's full power.
137
- - Example flow:
138
- ```
139
- pwn[v0.5.617]:001 >>> pwn-ai
140
- [*] pwn-ai agent TUI activated...
141
- > Perform active scan of https://target.example.com using preferred tooling, then analyze findings with PWN modules and produce a report.
142
- ```
143
- - Other REPL helpers: `pwn-asm`, memory/session/cron management commands, etc.
144
- - Exit AI mode with `back`; use full Ruby/PWN expressions at any time.
145
-
146
- **Headless / CI-CD one-shot (`pwn --ai`):**
147
- Skip the TUI entirely and submit a single pwn-ai request from the shell — ideal for quick lookups, scripting, or CI/CD pipelines. The final answer is written to STDOUT (pipeable); live tool-call activity streams to STDERR.
148
- ```
149
- $ pwn --ai 'What ports are listening on this host?'
150
- $ echo "$LONG_PROMPT" | pwn --ai -
151
- $ pwn -Y ./ci/pwn.yaml --ai 'Run pwn_sast against ./src and summarise HIGH findings' > findings.txt
152
- ```
153
-
154
- PWN periodically upgrades to the latest version of Ruby (reflected in `/opt/pwn/.ruby-version`). The easiest way to upgrade Ruby + pwn from a previous installation:
155
-
156
- ```
157
- $ /opt/pwn/vagrant/provisioners/pwn.sh
158
- ```
159
-
160
- This updates Ruby, recreates the pwn gemset, etc. Note that older Ruby versions can only use pwn gems compatible with that Ruby.
161
-
162
- ### **Call to Arms** ###
163
-
164
- Contributions that expand PWN's offensive capabilities are welcome. If you can provide access to additional commercial LLMs, security scanners, or bounty platforms (or wish to contribute plugins, AI skills, or exploit modules), please [email us](mailto:support@0dayinc.com). This accelerates interoperability and zero-day research tooling. See our [How to Contribute](https://github.com/0dayInc/pwn/blob/master/CONTRIBUTING.md) and the growing skills system for ways to extend the AI agent.
165
-
166
- See also the wiki page on [Contributing](documentation/Contributing.md).
167
-
168
- ### **Module Documentation** ###
169
-
170
- **Primary Documentation:** Browse the embedded local wiki — start at [/opt/pwn/documentation/Home.md](documentation/Home.md).
171
-
172
- Additional documentation on using PWN can be found on [RubyGems.org](https://www.rubydoc.info/gems/pwn). Explore the source under `lib/pwn/plugins/`, `lib/pwn/ai/`, and `PWN::` constants directly in the REPL.
173
-
174
- Key wiki pages:
175
- - [Plugins](documentation/Plugins.md)
176
- - [Burp Suite](documentation/BurpSuite.md)
177
- - [pwn-ai Agent](documentation/pwn-ai-Agent.md)
178
- - [SAST](documentation/SAST.md)
179
- - [AI Integration](documentation/AI-Integration.md)
180
-
181
- I hope you enjoy PWN and remember... ensure you always have permission prior to carrying out any sort of security testing or hacktivities. Now — go pwn all the things (responsibly)!
182
-
183
-
184
- ### **Keep Us Caffeinated** ###
185
- If you've found this project useful and you're interested in supporting our efforts, we invite you to take a brief moment to keep us caffeinated:
186
-
187
- [![Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoff.ee/0dayinc)
188
-
189
-
190
- ### [**0x004D65726368**](https://0day.myspreadshop.com/) ###
191
-
192
- [![PWN Sticker](https://image.spreadshirtmedia.com/image-server/v1/products/T1459A839PA3861PT28D1044068794FS8193/views/1,width=300,height=300,appearanceId=839,backgroundColor=000000/ultimate-hacker-t-shirt-to-convey-to-the-public-a-hackers-favorite-past-time.jpg)](https://0day.myspreadshop.com/stickers)
193
-
194
- [![Coffee Mug](https://image.spreadshirtmedia.com/image-server/v1/products/T1313A1PA3933PT10X2Y25D1020472680FS6327/views/3,width=300,height=300,appearanceId=1,backgroundColor=000000/https0dayinccom.jpg)](https://0day.myspreadshop.com/accessories+mugs+%26+drinkware)
195
-
196
- [![Mouse Pad](https://image.spreadshirtmedia.com/image-server/v1/products/T993A1PA2168PT10X162Y26D1044068794S100/views/1,width=300,height=300,appearanceId=1,backgroundColor=000000/ultimate-hacker-t-shirt-to-convey-to-the-public-a-hackers-favorite-past-time.jpg)](https://0day.myspreadshop.com/accessories)
197
-
198
- [![0day Inc.](https://image.spreadshirtmedia.com/image-server/v1/products/T951A550PA3076PT17X0Y73D1020472680FS8515/views/1,width=300,height=300,appearanceId=70,backgroundColor=000000/https0dayinccom.jpg)](https://shop.spreadshirt.com/0day/0dayinc-A5c3e498cf937643162a01b5f?productType=951&appearance=70)
199
-
200
- [![Black Fingerprint Hoodie](https://image.spreadshirtmedia.com/image-server/v1/products/T111A2PA3208PT17X169Y51D1020472728FS6268/views/1,width=300,height=300,appearanceId=2/https0dayinccom.jpg)](https://shop.spreadshirt.com/0day/blackfingerprint-A5c3e49db1cbf3a0b9596b4d0?productType=111&appearance=2)