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.
- checksums.yaml +4 -4
- data/README.md +24 -10
- data/bin/pwn +47 -2
- data/bin/pwn_gqrx_scanner +75 -18
- data/documentation/Diagrams.md +123 -40
- data/documentation/General-PWN-Usage.md +50 -30
- data/documentation/Home.md +78 -51
- data/documentation/How-PWN-Works.md +59 -57
- data/documentation/Installation.md +53 -28
- data/documentation/What-is-PWN.md +51 -32
- data/documentation/Why-PWN.md +41 -11
- data/documentation/diagrams/ai-integration-tool-calling.svg +141 -103
- data/documentation/diagrams/build.sh +20 -0
- data/documentation/diagrams/burp-vs-zap-preference.svg +47 -62
- data/documentation/diagrams/code-scanning-sast.svg +139 -79
- data/documentation/diagrams/dot/_THEME.md +27 -0
- data/documentation/diagrams/dot/agent-tool-registry.dot +59 -0
- data/documentation/diagrams/dot/ai-integration-tool-calling.dot +47 -20
- data/documentation/diagrams/dot/aws-cloud-security.dot +48 -0
- data/documentation/diagrams/dot/burp-vs-zap-preference.dot +23 -12
- data/documentation/diagrams/dot/code-scanning-sast.dot +46 -18
- data/documentation/diagrams/dot/cron-scheduling.dot +40 -0
- data/documentation/diagrams/dot/driver-framework.dot +36 -14
- data/documentation/diagrams/dot/extrospection-world-awareness.dot +55 -0
- data/documentation/diagrams/dot/fuzzing-workflow.dot +44 -24
- data/documentation/diagrams/dot/history-to-drivers.dot +31 -17
- data/documentation/diagrams/dot/memory-skills-detailed.dot +57 -25
- data/documentation/diagrams/dot/network-infra-testing.dot +51 -19
- data/documentation/diagrams/dot/overall-pwn-architecture.dot +110 -44
- data/documentation/diagrams/dot/penetration-testing-workflow.dot +56 -25
- data/documentation/diagrams/dot/plugin-ecosystem.dot +41 -27
- data/documentation/diagrams/dot/pwn-ai-feedback-learning-loop.dot +87 -46
- data/documentation/diagrams/dot/pwn-repl-prototyping.dot +49 -30
- data/documentation/diagrams/dot/reporting-pipeline.dot +43 -14
- data/documentation/diagrams/dot/reverse-engineering-flow.dot +40 -18
- data/documentation/diagrams/dot/sdr-radio-flow.dot +45 -0
- data/documentation/diagrams/dot/sessions-cron-automation.dot +41 -14
- data/documentation/diagrams/dot/swarm-multi-agent.dot +70 -0
- data/documentation/diagrams/dot/web-application-testing.dot +45 -23
- data/documentation/diagrams/dot/zero-day-research-flow.dot +46 -24
- data/documentation/diagrams/driver-framework.svg +87 -66
- data/documentation/diagrams/fuzzing-workflow.svg +128 -115
- data/documentation/diagrams/history-to-drivers.svg +84 -82
- data/documentation/diagrams/memory-skills-detailed.svg +167 -119
- data/documentation/diagrams/network-infra-testing.svg +146 -84
- data/documentation/diagrams/overall-pwn-architecture.svg +356 -185
- data/documentation/diagrams/penetration-testing-workflow.svg +161 -108
- data/documentation/diagrams/plugin-ecosystem.svg +225 -121
- data/documentation/diagrams/pwn-ai-feedback-learning-loop.svg +257 -185
- data/documentation/diagrams/pwn-repl-prototyping.svg +126 -137
- data/documentation/diagrams/reporting-pipeline.svg +128 -68
- data/documentation/diagrams/reverse-engineering-flow.svg +100 -80
- data/documentation/diagrams/sessions-cron-automation.svg +112 -68
- data/documentation/diagrams/web-application-testing.svg +136 -100
- data/documentation/diagrams/zero-day-research-flow.svg +116 -112
- data/git_commit.sh +1 -1
- data/lib/pwn/ai/agent/assembly.rb +1 -1
- data/lib/pwn/ai/agent/btc.rb +1 -1
- data/lib/pwn/ai/agent/burp_suite.rb +1 -1
- data/lib/pwn/ai/agent/extrospection.rb +618 -0
- data/lib/pwn/ai/agent/gqrx.rb +2 -2
- data/lib/pwn/ai/agent/hacker_one.rb +1 -1
- data/lib/pwn/ai/agent/introspection.rb +91 -0
- data/lib/pwn/ai/agent/learning.rb +6 -4
- data/lib/pwn/ai/agent/loop.rb +15 -0
- data/lib/pwn/ai/agent/prompt_builder.rb +10 -1
- data/lib/pwn/ai/agent/sast.rb +1 -1
- data/lib/pwn/ai/agent/swarm.rb +437 -0
- data/lib/pwn/ai/agent/tools/cron.rb +163 -0
- data/lib/pwn/ai/agent/tools/extrospection.rb +280 -0
- data/lib/pwn/ai/agent/tools/learning.rb +108 -0
- data/lib/pwn/ai/agent/tools/memory.rb +27 -0
- data/lib/pwn/ai/agent/tools/metrics.rb +61 -0
- data/lib/pwn/ai/agent/tools/sessions.rb +139 -0
- data/lib/pwn/ai/agent/tools/skills.rb +30 -0
- data/lib/pwn/ai/agent/tools/swarm.rb +229 -0
- data/lib/pwn/ai/agent/transparent_browser.rb +1 -1
- data/lib/pwn/ai/agent/vuln_gen.rb +2 -2
- data/lib/pwn/ai/agent.rb +3 -0
- data/lib/pwn/ai/anthropic.rb +19 -4
- data/lib/pwn/ai.rb +0 -1
- data/lib/pwn/config.rb +10 -23
- data/lib/pwn/cron.rb +16 -7
- data/lib/pwn/plugins/repl.rb +90 -281
- data/lib/pwn/sdr/decoder/base.rb +251 -0
- data/lib/pwn/sdr/decoder/gsm.rb +84 -185
- data/lib/pwn/sdr/decoder/pocsag.rb +62 -217
- data/lib/pwn/sdr/decoder.rb +1 -0
- data/lib/pwn/sdr/gqrx.rb +446 -65
- data/lib/pwn/version.rb +1 -1
- data/spec/lib/pwn/ai/agent/extrospection_spec.rb +15 -0
- data/spec/lib/pwn/ai/agent/introspection_spec.rb +15 -0
- data/spec/lib/pwn/ai/agent/swarm_spec.rb +34 -0
- data/spec/lib/pwn/ai/agent/tools/cron_spec.rb +40 -0
- data/spec/lib/pwn/ai/agent/tools/extrospection_spec.rb +40 -0
- data/spec/lib/pwn/ai/agent/tools/metrics_spec.rb +20 -0
- data/spec/lib/pwn/ai/agent/tools/sessions_spec.rb +35 -0
- data/spec/lib/pwn/ai/agent/tools/swarm_spec.rb +17 -0
- data/spec/lib/pwn/{ai/introspection_spec.rb → sdr/decoder/base_spec.rb} +3 -3
- data/third_party/pwn_rdoc.jsonl +178 -33
- metadata +27 -3
- data/lib/pwn/ai/introspection.rb +0 -76
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb16e051629252943b2df67c661ca49455cd5dfd4acfbde1620e75135f858c42
|
|
4
|
+
data.tar.gz: 036cb463b3cd848926f88c60be3f885e5e9b4f738534ac036918d118d18ec893
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d76d992d344b3a2016819f772e7e304fc437d42df677b85b67f33418c988f6436385eefbb6509cbe1d1436c9df585a30f2f44189b00134792160f420af77e81c
|
|
7
|
+
data.tar.gz: 34cdfc754bd3801071a8967b672924764c5d8b894fb13a6bd74dc43f10d930aee94cb781e5c9812b6b00b14b83fbfa34cbcbbcf45d4c6c2332c800b8fe322fe5
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* [What is PWN](#what-is-pwn)
|
|
7
7
|
* [Why PWN](#why-pwn)
|
|
8
8
|
* [How PWN Works](#how-pwn-works)
|
|
9
|
-
- [[Local PWN Wiki](
|
|
9
|
+
- [[Local PWN Wiki](documentation/Home.md)
|
|
10
10
|
- [Installation](#installation)
|
|
11
11
|
- [General Usage](#general-usage)
|
|
12
12
|
- [Call to Arms](#call-to-arms)
|
|
@@ -22,7 +22,7 @@ PWN (Pronounced /pōn/ or pone), is a powerful open-source offensive cybersecuri
|
|
|
22
22
|
|
|
23
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
24
|
|
|
25
|
-
**See the full [PWN Wiki](
|
|
25
|
+
**See the full [PWN Wiki](documentation/Home.md) for detailed guides.**
|
|
26
26
|
|
|
27
27
|
#### **Why PWN** ####
|
|
28
28
|
|
|
@@ -73,7 +73,7 @@ A full local wiki has been generated in this checkout:
|
|
|
73
73
|
|
|
74
74
|
**`/opt/pwn/documentation/Home.md`**
|
|
75
75
|
|
|
76
|
-
- [Home](
|
|
76
|
+
- [Home](documentation/Home.md)
|
|
77
77
|
- [What is PWN](documentation/What-is-PWN.md)
|
|
78
78
|
- [Installation](documentation/Installation.md)
|
|
79
79
|
- [pwn-ai Agent](documentation/pwn-ai-Agent.md)
|
|
@@ -95,7 +95,7 @@ $ cd /opt/pwn
|
|
|
95
95
|
$ ./install.sh
|
|
96
96
|
$ ./install.sh ruby-gem
|
|
97
97
|
$ pwn
|
|
98
|
-
pwn[v0.5.
|
|
98
|
+
pwn[v0.5.617]:001 >>> PWN.help
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
[](https://youtu.be/G7iLUY4FzsI)
|
|
@@ -116,7 +116,7 @@ $ rvm use ruby-4.0.5@pwn
|
|
|
116
116
|
$ gem uninstall --all --executables pwn
|
|
117
117
|
$ gem install --verbose pwn
|
|
118
118
|
$ pwn
|
|
119
|
-
pwn[v0.5.
|
|
119
|
+
pwn[v0.5.617]:001 >>> PWN.help
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
If using a multi-user install of RVM:
|
|
@@ -127,7 +127,7 @@ $ rvm use ruby-4.0.5@pwn
|
|
|
127
127
|
$ rvmsudo gem uninstall --all --executables pwn
|
|
128
128
|
$ rvmsudo gem install --verbose pwn
|
|
129
129
|
$ pwn
|
|
130
|
-
pwn[v0.5.
|
|
130
|
+
pwn[v0.5.617]:001 >>> PWN.help
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
**Inside the pwn REPL (the heart of PWN):**
|
|
@@ -136,13 +136,21 @@ pwn[v0.5.615]:001 >>> PWN.help
|
|
|
136
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
137
|
- Example flow:
|
|
138
138
|
```
|
|
139
|
-
pwn[v0.5.
|
|
139
|
+
pwn[v0.5.617]:001 >>> pwn-ai
|
|
140
140
|
[*] pwn-ai agent TUI activated...
|
|
141
141
|
> Perform active scan of https://target.example.com using preferred tooling, then analyze findings with PWN modules and produce a report.
|
|
142
142
|
```
|
|
143
143
|
- Other REPL helpers: `pwn-asm`, memory/session/cron management commands, etc.
|
|
144
144
|
- Exit AI mode with `back`; use full Ruby/PWN expressions at any time.
|
|
145
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
|
+
|
|
146
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:
|
|
147
155
|
|
|
148
156
|
```
|
|
@@ -159,7 +167,7 @@ See also the wiki page on [Contributing](documentation/Contributing.md).
|
|
|
159
167
|
|
|
160
168
|
### **Module Documentation** ###
|
|
161
169
|
|
|
162
|
-
**Primary Documentation:** Browse the embedded local wiki — start at [/opt/pwn/documentation/Home.md](
|
|
170
|
+
**Primary Documentation:** Browse the embedded local wiki — start at [/opt/pwn/documentation/Home.md](documentation/Home.md).
|
|
163
171
|
|
|
164
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.
|
|
165
173
|
|
|
@@ -172,15 +180,21 @@ Key wiki pages:
|
|
|
172
180
|
|
|
173
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)!
|
|
174
182
|
|
|
175
|
-
### **Keep Us Caffeinated** ###
|
|
176
183
|
|
|
184
|
+
### **Keep Us Caffeinated** ###
|
|
177
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:
|
|
178
186
|
|
|
179
187
|
[](https://buymeacoff.ee/0dayinc)
|
|
180
188
|
|
|
189
|
+
|
|
181
190
|
### [**0x004D65726368**](https://0day.myspreadshop.com/) ###
|
|
182
191
|
|
|
183
192
|
[](https://0day.myspreadshop.com/stickers)
|
|
184
193
|
|
|
185
|
-
|
|
194
|
+
[](https://0day.myspreadshop.com/accessories+mugs+%26+drinkware)
|
|
195
|
+
|
|
196
|
+
[](https://0day.myspreadshop.com/accessories)
|
|
197
|
+
|
|
198
|
+
[](https://shop.spreadshirt.com/0day/0dayinc-A5c3e498cf937643162a01b5f?productType=951&appearance=70)
|
|
186
199
|
|
|
200
|
+
[](https://shop.spreadshirt.com/0day/blackfingerprint-A5c3e49db1cbf3a0b9596b4d0?productType=111&appearance=2)
|
data/bin/pwn
CHANGED
|
@@ -3,13 +3,58 @@
|
|
|
3
3
|
|
|
4
4
|
require 'pwn'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
opts = PWN::Env[:driver_opts]
|
|
7
|
+
pwn_driver = PWN::Driver::Parser.new do |options|
|
|
8
|
+
options.on(
|
|
9
|
+
'-APROMPT',
|
|
10
|
+
'--ai=PROMPT',
|
|
11
|
+
"<Optional - Headless one-shot pwn-ai request (no TUI). '-' reads PROMPT " \
|
|
12
|
+
'from STDIN. Final answer goes to STDOUT, tool activity to STDERR. ' \
|
|
13
|
+
'Useful for quick tasks or CI/CD jobs>'
|
|
14
|
+
) do |a|
|
|
15
|
+
opts[:ai] = a
|
|
16
|
+
end
|
|
17
|
+
end
|
|
7
18
|
pwn_driver.auto_opts_help = false
|
|
8
19
|
pwn_driver.parse!
|
|
9
20
|
|
|
10
21
|
begin
|
|
11
22
|
pwn_pid = Process.pid
|
|
12
|
-
|
|
23
|
+
|
|
24
|
+
if opts[:ai]
|
|
25
|
+
# ------------------------------------------------------------------
|
|
26
|
+
# Headless pwn-ai: behave as if the user typed PROMPT at the pwn-ai
|
|
27
|
+
# TUI, but non-interactively — a single agent-loop turn with native
|
|
28
|
+
# tool-calling. STDOUT receives ONLY the final answer so it can be
|
|
29
|
+
# captured/piped; live tool dispatches stream to STDERR for CI logs.
|
|
30
|
+
# $ pwn --ai 'What ports are listening on this host?'
|
|
31
|
+
# $ echo "$PROMPT" | pwn --ai -
|
|
32
|
+
# ------------------------------------------------------------------
|
|
33
|
+
prompt = opts[:ai].to_s
|
|
34
|
+
prompt = $stdin.read if prompt == '-' || (prompt.strip.empty? && !$stdin.tty?)
|
|
35
|
+
raise 'ERROR: --ai requires a non-empty PROMPT (or pipe one via STDIN with --ai -)' if prompt.to_s.strip.empty?
|
|
36
|
+
|
|
37
|
+
sess = PWN::Sessions.create(
|
|
38
|
+
title: "pwn --ai #{Time.now.strftime('%Y-%m-%d %H:%M')}",
|
|
39
|
+
source: 'pwn-ai-headless'
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
on_tool = lambda do |name, args, result|
|
|
43
|
+
preview = args.is_a?(String) ? args[0, 120] : args.inspect[0, 120]
|
|
44
|
+
warn "[ pwn-ai → #{name} ] #{preview}"
|
|
45
|
+
warn result.to_s[0, 700]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
final = PWN::AI::Agent::Loop.run(
|
|
49
|
+
request: prompt,
|
|
50
|
+
session_id: sess[:id],
|
|
51
|
+
enabled_toolsets: PWN::Env.dig(:ai, :agent, :toolsets),
|
|
52
|
+
on_tool: on_tool
|
|
53
|
+
)
|
|
54
|
+
puts final
|
|
55
|
+
else
|
|
56
|
+
PWN::Plugins::REPL.start
|
|
57
|
+
end
|
|
13
58
|
rescue StandardError => e
|
|
14
59
|
raise e
|
|
15
60
|
ensure
|
data/bin/pwn_gqrx_scanner
CHANGED
|
@@ -72,6 +72,33 @@ PWN::Driver::Parser.new do |options|
|
|
|
72
72
|
options.on('-wLOC', '--location=LOC', '<Optional - Location string to include in AI analysis (e.g. "New York, NY", 90210, GPS coords, etc.)>') do |l|
|
|
73
73
|
opts[:location] = l
|
|
74
74
|
end
|
|
75
|
+
options.on('--fft-scan', '<Optional - Use fast FFT-based panoramic scanning via #fast_scan_range (much faster) instead of #scan_range. Applies to profile or --scan-ranges>') do |f|
|
|
76
|
+
opts[:fft_scan] = f
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
options.on('-SRATE', '--sample-rate=RATE', '<Optional --fft-scan - Visible span/sample_rate in Hz (default 1_000_000)>') do |s|
|
|
80
|
+
opts[:sample_rate] = s
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
options.on('-NINT', '--nfft=INT', '<Optional --fft-scan - FFT bin size (default 2048)>') do |n|
|
|
84
|
+
opts[:nfft] = n
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
options.on('-AINT', '--avg=INT', '<Optional --fft-scan - FFT averages (default 2)>') do |a|
|
|
88
|
+
opts[:avg] = a
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
options.on('-CSEC', '--capture-secs=SEC', '<Optional --fft-scan - Capture seconds per chunk (default 0.03)>') do |c|
|
|
92
|
+
opts[:capture_secs] = c
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
options.on('--keep-spectrum', '<Optional --fft-scan - Keep full spectrum data in output (large)>') do |k|
|
|
96
|
+
opts[:keep_spectrum] = k
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
options.on('-ODB', '--strength-offset-db=FLOAT', '<Optional - Power offset in dB (default 0.0)>') do |o|
|
|
100
|
+
opts[:strength_offset_db] = o
|
|
101
|
+
end
|
|
75
102
|
end.parse!
|
|
76
103
|
|
|
77
104
|
begin
|
|
@@ -146,24 +173,54 @@ begin
|
|
|
146
173
|
# Merge opts one last time to ensure parameters passed to the driver are included
|
|
147
174
|
opts.merge!(band_plans[profile.to_sym]) unless profile.nil?
|
|
148
175
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
176
|
+
fft_scan = opts[:fft_scan]
|
|
177
|
+
sample_rate = opts[:sample_rate] || 1_000_000
|
|
178
|
+
sample_rate = sample_rate.to_i
|
|
179
|
+
nfft = opts[:nfft] || 2048
|
|
180
|
+
nfft = nfft.to_i
|
|
181
|
+
avgv = opts[:avg] || 2
|
|
182
|
+
avgv = avgv.to_i
|
|
183
|
+
capture_secs = opts[:capture_secs] || 0.03
|
|
184
|
+
capture_secs = capture_secs.to_f
|
|
185
|
+
keep_spectrum = opts[:keep_spectrum] ? true : false
|
|
186
|
+
strength_offset_db = opts[:strength_offset_db]
|
|
187
|
+
strength_offset_db = strength_offset_db.to_f unless strength_offset_db.nil?
|
|
188
|
+
|
|
189
|
+
if fft_scan
|
|
190
|
+
puts '[*] --fft-scan requested: using fast FFT panoramic mode (#fast_scan_range)'
|
|
191
|
+
fast_resp = PWN::SDR::GQRX.fast_scan_range(
|
|
192
|
+
gqrx_sock: gqrx_sock,
|
|
193
|
+
ranges: ranges,
|
|
194
|
+
sample_rate: sample_rate,
|
|
195
|
+
nfft: nfft,
|
|
196
|
+
avg: avgv,
|
|
197
|
+
capture_secs: capture_secs,
|
|
198
|
+
strength_lock: strength_lock,
|
|
199
|
+
keep_spectrum: keep_spectrum,
|
|
200
|
+
strength_offset_db: strength_offset_db,
|
|
201
|
+
scan_log: scan_log
|
|
202
|
+
)
|
|
203
|
+
puts "FFT Scan complete: #{fast_resp[:total]} signals found."
|
|
204
|
+
else
|
|
205
|
+
PWN::SDR::GQRX.scan_range(
|
|
206
|
+
gqrx_sock: gqrx_sock,
|
|
207
|
+
ranges: ranges,
|
|
208
|
+
demodulator_mode: demodulator_mode,
|
|
209
|
+
bandwidth: bandwidth,
|
|
210
|
+
audio_gain_db: audio_gain_db,
|
|
211
|
+
squelch: squelch,
|
|
212
|
+
precision: precision,
|
|
213
|
+
strength_lock: strength_lock,
|
|
214
|
+
rf_gain: rf_gain,
|
|
215
|
+
intermediate_gain: intermediate_gain,
|
|
216
|
+
baseband_gain: baseband_gain,
|
|
217
|
+
keep_looping: keep_looping,
|
|
218
|
+
scan_log: scan_log,
|
|
219
|
+
decoder: decoder,
|
|
220
|
+
location: location
|
|
221
|
+
)
|
|
222
|
+
puts 'Scan Complete.'
|
|
223
|
+
end
|
|
167
224
|
rescue StandardError => e
|
|
168
225
|
raise e
|
|
169
226
|
rescue Interrupt
|
data/documentation/Diagrams.md
CHANGED
|
@@ -1,57 +1,140 @@
|
|
|
1
|
-
# PWN Data
|
|
1
|
+
# PWN Data-Flow Diagrams
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
26 SVG diagrams, all rendered from Graphviz sources in
|
|
4
|
+
[`diagrams/dot/`](diagrams/dot/) with a single shared visual theme
|
|
5
|
+
(see [`_THEME.md`](diagrams/dot/_THEME.md)). Rebuild everything with:
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
```bash
|
|
8
|
+
cd documentation/diagrams && ./build.sh
|
|
9
|
+
```
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
Every diagram uses strict layer→layer edges (`newrank=true` + `{rank=same}`
|
|
12
|
+
groups) so lines never criss-cross.
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-

|
|
14
|
+
---
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-

|
|
16
|
+
## 1 · Architecture
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
### Overall PWN Architecture
|
|
19
|
+
[source](diagrams/dot/overall-pwn-architecture.dot) · doc: [How PWN Works](How-PWN-Works.md)
|
|
20
|
+

|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
### `~/.pwn/` Persistence Map
|
|
23
|
+
[source](diagrams/dot/persistence-filesystem.dot) · doc: [Persistence](Persistence.md)
|
|
24
|
+

|
|
20
25
|
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
### Plugin Ecosystem (66 modules)
|
|
27
|
+
[source](diagrams/dot/plugin-ecosystem.dot) · doc: [Plugins](Plugins.md)
|
|
28
|
+

|
|
23
29
|
|
|
24
|
-
|
|
25
|
-

|
|
30
|
+
---
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-

|
|
32
|
+
## 2 · Entry Points
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
### `pwn` REPL Prototyping
|
|
35
|
+
[source](diagrams/dot/pwn-repl-prototyping.dot) · doc: [pwn REPL](pwn-REPL.md)
|
|
36
|
+

|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
### REPL History → Reusable Driver / Skill
|
|
39
|
+
[source](diagrams/dot/history-to-drivers.dot) · doc: [Drivers](Drivers.md)
|
|
40
|
+

|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
### Driver Anatomy (`bin/pwn_*`)
|
|
43
|
+
[source](diagrams/dot/driver-framework.dot) · doc: [CLI Drivers](CLI-Drivers.md)
|
|
44
|
+

|
|
37
45
|
|
|
38
|
-
|
|
39
|
-
- These visualize the integration of:
|
|
40
|
-
- `PWN::Plugins` (67+ modules)
|
|
41
|
-
- `PWN::AI::Agent` + tool calling + LLM providers
|
|
42
|
-
- `PWN::Memory`, `PWN::Skills`, and Learning loop
|
|
43
|
-
- `PWN::SAST`, `PWN::Reports`, `PWN::Driver`
|
|
44
|
-
- For the source definitions, see `diagrams/dot/*.dot`.
|
|
45
|
-
- Update these diagrams by editing the `.dot` files and re-rendering with `dot -Tsvg`.
|
|
46
|
+
---
|
|
46
47
|
|
|
47
|
-
##
|
|
48
|
+
## 3 · AI Agent
|
|
48
49
|
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- [Skills, Memory & Learning](Skills-Memory-Learning.md)
|
|
53
|
-
- [Plugins](Plugins.md)
|
|
54
|
-
- [SAST](SAST.md)
|
|
55
|
-
- [Drivers](Drivers.md)
|
|
50
|
+
### pwn-ai Closed Self-Improvement Loop
|
|
51
|
+
[source](diagrams/dot/pwn-ai-feedback-learning-loop.dot) · doc: [Skills, Memory & Learning](Skills-Memory-Learning.md)
|
|
52
|
+

|
|
56
53
|
|
|
57
|
-
|
|
54
|
+
### Multi-Provider LLM Integration
|
|
55
|
+
[source](diagrams/dot/ai-integration-tool-calling.dot) · doc: [AI Integration](AI-Integration.md)
|
|
56
|
+

|
|
57
|
+
|
|
58
|
+
### Agent Tool Registry (10 toolsets)
|
|
59
|
+
[source](diagrams/dot/agent-tool-registry.dot) · doc: [Agent Tool Registry](Agent-Tool-Registry.md)
|
|
60
|
+

|
|
61
|
+
|
|
62
|
+
### Memory · Skills · Sessions Detail
|
|
63
|
+
[source](diagrams/dot/memory-skills-detailed.dot) · doc: [Skills, Memory & Learning](Skills-Memory-Learning.md)
|
|
64
|
+

|
|
65
|
+
|
|
66
|
+
### Extrospection — World Awareness
|
|
67
|
+
[source](diagrams/dot/extrospection-world-awareness.dot) · doc: [Extrospection](Extrospection.md)
|
|
68
|
+

|
|
69
|
+
|
|
70
|
+
### Swarm — Native Multi-Agent
|
|
71
|
+
[source](diagrams/dot/swarm-multi-agent.dot) · doc: [Swarm](Swarm.md)
|
|
72
|
+

|
|
73
|
+
|
|
74
|
+
### Cron — Scheduled Jobs
|
|
75
|
+
[source](diagrams/dot/cron-scheduling.dot) · doc: [Cron](Cron.md)
|
|
76
|
+

|
|
77
|
+
|
|
78
|
+
### Sessions ↔ Cron ↔ Swarm Continuity
|
|
79
|
+
[source](diagrams/dot/sessions-cron-automation.dot) · doc: [Sessions](Sessions.md)
|
|
80
|
+

|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 4 · Security Workflows
|
|
85
|
+
|
|
86
|
+
### End-to-End Penetration Test
|
|
87
|
+
[source](diagrams/dot/penetration-testing-workflow.dot)
|
|
88
|
+

|
|
89
|
+
|
|
90
|
+
### Web Application Testing
|
|
91
|
+
[source](diagrams/dot/web-application-testing.dot) · doc: [BurpSuite](BurpSuite.md)
|
|
92
|
+

|
|
93
|
+
|
|
94
|
+
### Burp ⭐ vs ZAP Selection
|
|
95
|
+
[source](diagrams/dot/burp-vs-zap-preference.dot)
|
|
96
|
+

|
|
97
|
+
|
|
98
|
+
### Network & Infrastructure Testing
|
|
99
|
+
[source](diagrams/dot/network-infra-testing.dot) · doc: [NmapIt](NmapIt.md)
|
|
100
|
+

|
|
101
|
+
|
|
102
|
+
### SAST / Code Scanning
|
|
103
|
+
[source](diagrams/dot/code-scanning-sast.dot) · doc: [SAST](SAST.md)
|
|
104
|
+

|
|
105
|
+
|
|
106
|
+
### Fuzzing
|
|
107
|
+
[source](diagrams/dot/fuzzing-workflow.dot) · doc: [Fuzzing](Fuzzing.md)
|
|
108
|
+

|
|
109
|
+
|
|
110
|
+
### Reverse Engineering & Binary Exploitation
|
|
111
|
+
[source](diagrams/dot/reverse-engineering-flow.dot) · doc: [Hardware](Hardware.md)
|
|
112
|
+

|
|
113
|
+
|
|
114
|
+
### Zero-Day Research Lifecycle
|
|
115
|
+
[source](diagrams/dot/zero-day-research-flow.dot)
|
|
116
|
+

|
|
117
|
+
|
|
118
|
+
### Reporting Pipeline
|
|
119
|
+
[source](diagrams/dot/reporting-pipeline.dot) · doc: [Reporting](Reporting.md)
|
|
120
|
+

|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 5 · Domain-Specific
|
|
125
|
+
|
|
126
|
+
### AWS Cloud Security (90 services)
|
|
127
|
+
[source](diagrams/dot/aws-cloud-security.dot) · doc: [AWS](AWS.md)
|
|
128
|
+

|
|
129
|
+
|
|
130
|
+
### SDR / Radio Hacking
|
|
131
|
+
[source](diagrams/dot/sdr-radio-flow.dot) · doc: [SDR](SDR.md)
|
|
132
|
+

|
|
133
|
+
|
|
134
|
+
### Hardware & Physical-Layer
|
|
135
|
+
[source](diagrams/dot/hardware-hacking.dot) · doc: [Hardware](Hardware.md)
|
|
136
|
+

|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
[← Back to Home](Home.md)
|
|
@@ -1,40 +1,60 @@
|
|
|
1
|
-
# General
|
|
1
|
+
# General Usage — Day-One Cheat Sheet
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Launch
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
$ pwn
|
|
7
|
-
pwn
|
|
6
|
+
$ pwn # interactive REPL
|
|
7
|
+
$ pwn --ai "scan 10.0.0.0/24 with NmapIt and summarise open services"
|
|
8
|
+
$ pwn_nmap_discover_tcp_udp -t 10.0.0.0/24 -o out/ # headless driver
|
|
8
9
|
```
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Inside the REPL
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## Recommended Workflow
|
|
21
|
-
|
|
22
|
-
1. Launch `pwn`
|
|
23
|
-
2. Start `pwn-ai`
|
|
24
|
-
3. Give natural language tasks that leverage plugins, skills, memory.
|
|
25
|
-
4. Use `SHIFT+ENTER` for multi-line prompts.
|
|
26
|
-
|
|
27
|
-
## Updating PWN
|
|
13
|
+
```ruby
|
|
14
|
+
PWN.help # top-level help
|
|
15
|
+
PWN::Plugins.constants.sort # list all 66 plugins
|
|
16
|
+
PWN::Plugins::NmapIt.help # per-plugin usage
|
|
17
|
+
ls PWN::Plugins::BurpSuite # Pry: list methods
|
|
18
|
+
show-source PWN::SAST::SQL.scan # Pry: read the code
|
|
19
|
+
history # what you've typed → copy into a driver
|
|
20
|
+
```
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
## Custom REPL commands
|
|
23
|
+
|
|
24
|
+
| Command | Does |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `pwn-ai` | Enter the agent TUI (SHIFT+ENTER = newline, ENTER = submit) |
|
|
27
|
+
| `pwn-asm` | Multi-line assembly ↔ opcode workbench |
|
|
28
|
+
| `pwn-ai-memory` | Inspect / edit `~/.pwn/memory.json` |
|
|
29
|
+
| `pwn-ai-sessions` | List / view / delete transcripts |
|
|
30
|
+
| `pwn-ai-cron` | List / run scheduled jobs |
|
|
31
|
+
| `pwn-ai-delegate` | Hand a task to a Swarm persona |
|
|
32
|
+
| `welcome-banner` | Redraw a random `PWN::Banner` |
|
|
33
|
+
| `toggle-pager` | Pry pager on/off |
|
|
34
|
+
|
|
35
|
+
## A 60-second attack chain
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
# 1. discover
|
|
39
|
+
nmap = PWN::Plugins::NmapIt.port_scan(target: 'scanme.nmap.org')
|
|
40
|
+
|
|
41
|
+
# 2. drive traffic through Burp
|
|
42
|
+
burp = PWN::Plugins::BurpSuite.start(headless: true)
|
|
43
|
+
b = PWN::Plugins::TransparentBrowser.open(
|
|
44
|
+
browser_type: :headless, proxy: 'http://127.0.0.1:8080')
|
|
45
|
+
b[:browser].goto 'http://scanme.nmap.org'
|
|
46
|
+
|
|
47
|
+
# 3. active scan
|
|
48
|
+
scan = PWN::Plugins::BurpSuite.active_scan(burp_obj: burp,
|
|
49
|
+
target_url: 'http://scanme.nmap.org')
|
|
50
|
+
|
|
51
|
+
# 4. report
|
|
52
|
+
PWN::Reports::SAST.generate(dir_path: '/tmp/src', output_dir: '/tmp/out')
|
|
53
|
+
```
|
|
30
54
|
|
|
31
|
-
|
|
55
|
+
Then say the same thing in English inside `pwn-ai` and watch the agent do it.
|
|
32
56
|
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
- `memory.json`
|
|
36
|
-
- `learning.jsonl`
|
|
37
|
-
- `metrics.json`
|
|
38
|
-
- sessions, cron jobs, etc.
|
|
57
|
+
**Next:** [pwn REPL](pwn-REPL.md) · [pwn-ai Agent](pwn-ai-Agent.md) ·
|
|
58
|
+
[CLI Drivers](CLI-Drivers.md)
|
|
39
59
|
|
|
40
|
-
[
|
|
60
|
+
[← Home](Home.md)
|