pwn 0.5.683 → 0.5.684
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 +11 -10
- data/documentation/Agent-Tool-Registry.md +2 -2
- data/documentation/CLI-Drivers.md +27 -28
- data/documentation/Configuration.md +5 -5
- data/documentation/Contributing.md +2 -2
- data/documentation/Cron.md +11 -7
- data/documentation/Diagrams.md +2 -2
- data/documentation/General-PWN-Usage.md +1 -1
- data/documentation/Home.md +7 -6
- data/documentation/How-PWN-Works.md +9 -9
- data/documentation/Installation.md +1 -1
- data/documentation/Persistence.md +2 -1
- data/documentation/Plugins.md +3 -3
- data/documentation/Reinforcement-Learning.md +102 -100
- data/documentation/SAST.md +1 -1
- data/documentation/Session-Workflow.md +152 -0
- data/documentation/Sessions.md +2 -1
- data/documentation/Troubleshooting.md +2 -2
- data/documentation/What-is-PWN.md +3 -3
- data/documentation/diagrams/agent-tool-registry.svg +152 -152
- data/documentation/diagrams/cron-scheduling.svg +141 -121
- data/documentation/diagrams/dot/agent-tool-registry.dot +4 -4
- data/documentation/diagrams/dot/cron-scheduling.dot +10 -7
- data/documentation/diagrams/dot/driver-framework.dot +1 -1
- data/documentation/diagrams/dot/overall-pwn-architecture.dot +4 -4
- data/documentation/diagrams/dot/persistence-filesystem.dot +1 -1
- data/documentation/diagrams/dot/plugin-ecosystem.dot +2 -2
- data/documentation/diagrams/dot/task-summarizer.dot +18 -16
- data/documentation/diagrams/driver-framework.svg +1 -1
- data/documentation/diagrams/overall-pwn-architecture.svg +93 -93
- data/documentation/diagrams/persistence-filesystem.svg +4 -4
- data/documentation/diagrams/plugin-ecosystem.svg +101 -100
- data/documentation/diagrams/task-summarizer.svg +166 -156
- data/documentation/pwn-ai-Agent.md +9 -4
- data/lib/pwn/ai/agent/dispatch.rb +52 -1
- data/lib/pwn/ai/agent/loop.rb +167 -162
- data/lib/pwn/ai/agent/open_goal.rb +83 -0
- data/lib/pwn/ai/agent/prompt_builder.rb +3 -1
- data/lib/pwn/ai/agent.rb +1 -0
- data/lib/pwn/config.rb +1 -1
- data/lib/pwn/cron.rb +18 -5
- data/lib/pwn/plugins/repl.rb +9 -4
- data/lib/pwn/plugins/tty_spinner.rb +64 -17
- data/lib/pwn/version.rb +1 -1
- data/spec/integration/persistence_roundtrip_spec.rb +2 -1
- data/spec/integration/reinforced_feedback_loop_spec.rb +6 -11
- data/spec/lib/pwn/ai/agent/dispatch_spec.rb +38 -82
- data/spec/lib/pwn/ai/agent/loop_spec.rb +221 -10
- data/spec/lib/pwn/ai/agent/open_goal_spec.rb +37 -0
- data/spec/lib/pwn/cron_spec.rb +13 -3
- data/spec/lib/pwn/plugins/repl_spec.rb +17 -0
- data/spec/lib/pwn/plugins/tty_spinner_spec.rb +14 -0
- data/third_party/pwn_rdoc.jsonl +22 -1
- metadata +4 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea35094f56adb31f1af096c634b0a027aa16825fe596ed34165b1efc0627c279
|
|
4
|
+
data.tar.gz: 42bedb6ce050206f988a3df3d99c84d39896e63ec54d453aa0d625e763600b9e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da7066b555f86266d022850351074fd8ce266254e746c80f13a84fd631a71040d7e122c6fb1ccbd9ef5c93225b40c22a99651bfb35a05ae26bd60dd56d0208b7
|
|
7
|
+
data.tar.gz: de4d5212171f9bb84122a9141203851245a8fa4e4ca01eb127992b9fce505de4aeb15ed7812cd03bc6aaf71248cfa389fdb41ee280460f24ed7f56b8245b1d77
|
data/README.md
CHANGED
|
@@ -33,9 +33,9 @@ can run those same methods for you.
|
|
|
33
33
|
Red teamers, pentesters, and vulnerability researchers get one place to script
|
|
34
34
|
and automate instead of gluing together a pile of separate CLIs.
|
|
35
35
|
|
|
36
|
-
**In numbers:**
|
|
37
|
-
service wrappers · 22 `PWN::WWW` site drivers · 53 `bin/pwn_*`
|
|
38
|
-
6 LLM engines · 13 agent toolsets ·
|
|
36
|
+
**In numbers:** 67 `PWN::Plugins` · 48 `PWN::SAST` modules · 90 `PWN::AWS`
|
|
37
|
+
service wrappers · 22 `PWN::WWW` site drivers · 54 executables (`pwn` + 53 `bin/pwn_*`) ·
|
|
38
|
+
6 LLM engines · 13 agent toolsets · 87 LLM-callable tools.
|
|
39
39
|
|
|
40
40
|
Full page: [What is PWN](documentation/What-is-PWN.md)
|
|
41
41
|
|
|
@@ -119,11 +119,12 @@ message bus:
|
|
|
119
119
|

|
|
120
120
|
|
|
121
121
|
Long-running turns also show **executive task briefs** (not raw commands) via
|
|
122
|
-
`TaskSummarizer`.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
`TaskSummarizer`. There is no request type. Every request gets an English
|
|
123
|
+
task compass (`emit_plan!` on submit, `about_to` as `task k/n` before each
|
|
124
|
+
tool batch). Duplicate briefs are suppressed. Budget-hot turns skip extra
|
|
125
|
+
counterfactual forks and only strip tools on the last iteration when the
|
|
126
|
+
original request is already satisfied. Yesterday's scars do not lower this
|
|
127
|
+
request's `max_iters` (default 777).
|
|
127
128
|
|
|
128
129
|
Full pages: [How PWN Works](documentation/How-PWN-Works.md) ·
|
|
129
130
|
[All data-flow diagrams](documentation/Diagrams.md)
|
|
@@ -136,9 +137,9 @@ The complete wiki lives in this repo at **[`documentation/Home.md`](documentatio
|
|
|
136
137
|
|
|
137
138
|
| Start Here | Entry Points | AI Subsystem | Capabilities |
|
|
138
139
|
|---|---|---|---|
|
|
139
|
-
| [What is PWN](documentation/What-is-PWN.md) | [`pwn` REPL](documentation/pwn-REPL.md) | [AI / LLM Integration](documentation/AI-Integration.md) | [Plugins (
|
|
140
|
+
| [What is PWN](documentation/What-is-PWN.md) | [`pwn` REPL](documentation/pwn-REPL.md) | [AI / LLM Integration](documentation/AI-Integration.md) | [Plugins (67)](documentation/Plugins.md) |
|
|
140
141
|
| [Why PWN](documentation/Why-PWN.md) | [`pwn-ai` Agent](documentation/pwn-ai-Agent.md) | [Agent Tool Registry](documentation/Agent-Tool-Registry.md) | [SAST (48)](documentation/SAST.md) |
|
|
141
|
-
| [How PWN Works](documentation/How-PWN-Works.md) | [CLI Drivers (
|
|
142
|
+
| [How PWN Works](documentation/How-PWN-Works.md) | [CLI Drivers (54)](documentation/CLI-Drivers.md) | [Memory · Skills · Learning](documentation/Skills-Memory-Learning.md) | [AWS (90)](documentation/AWS.md) |
|
|
142
143
|
| [Installation](documentation/Installation.md) | [Build a Driver](documentation/Drivers.md) | [Mistakes (neg-feedback)](documentation/Mistakes.md) | [WWW (22)](documentation/WWW.md) |
|
|
143
144
|
| [General Usage](documentation/General-PWN-Usage.md) | | [Reinforcement Learning](documentation/Reinforcement-Learning.md) | [SDR / Radio](documentation/SDR.md) |
|
|
144
145
|
| [Configuration](documentation/Configuration.md) | | [Extrospection](documentation/Extrospection.md) | [Hardware](documentation/Hardware.md) |
|
|
@@ -6,7 +6,7 @@ toolsets; the JSON-Schema for each tool is what the model actually sees.
|
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
9
|
-
## Toolsets to tools (13 toolsets ·
|
|
9
|
+
## Toolsets to tools (13 toolsets · 87 tools)
|
|
10
10
|
|
|
11
11
|
| Toolset | Tools | Backed by |
|
|
12
12
|
|---|---|---|
|
|
@@ -69,7 +69,7 @@ PWN::AI::Agent::Registry.definitions(relevance: 'nmap sweep 10.0.0.0/8', top_k:
|
|
|
69
69
|
PWN::AI::Agent::Registry.rank(query: 'run a shell command') # inspect ranking
|
|
70
70
|
PWN::AI::Agent::Registry.preference_order # Env / DEFAULT_PREFERENCE
|
|
71
71
|
PWN::AI::Agent::Registry.toolsets # -> the 13 names above
|
|
72
|
-
PWN::AI::Agent::Registry.all.count # ->
|
|
72
|
+
PWN::AI::Agent::Registry.all.count # -> 87
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
Frontier engines leave `tool_router` off (unless you set it) and receive the
|
|
@@ -9,34 +9,33 @@ without a REPL or an LLM.
|
|
|
9
9
|
## Full list
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
|
-
pwn
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
pwn_jenkins_useradd
|
|
12
|
+
pwn pwn_jenkins_update_plugins
|
|
13
|
+
pwn_ai_red_team pwn_jenkins_useradd
|
|
14
|
+
pwn_android_war_dialer pwn_mail_agent
|
|
15
|
+
pwn_autoinc_version pwn_msf_postgres_login
|
|
16
|
+
pwn_aws_describe_resources pwn_nessus_cloud_scan_crud
|
|
17
|
+
pwn_bdba_groups pwn_nessus_cloud_vulnscan
|
|
18
|
+
pwn_bdba_scan pwn_nexpose
|
|
19
|
+
pwn_burp_suite_pro_active_rest_api_scan pwn_nmap_discover_tcp_udp
|
|
20
|
+
pwn_burp_suite_pro_active_scan pwn_openvas_vulnscan
|
|
21
|
+
pwn_char_base64_encoding pwn_pastebin_sample_filter
|
|
22
|
+
pwn_char_dec_encoding pwn_phone
|
|
23
|
+
pwn_char_hex_escaped_encoding pwn_rdoc_to_jsonl
|
|
24
|
+
pwn_char_html_entity_encoding pwn_sast
|
|
25
|
+
pwn_char_unicode_escaped_encoding pwn_serial_check_voicemail
|
|
26
|
+
pwn_char_url_encoding pwn_serial_msr206
|
|
27
|
+
pwn_crt_sh pwn_serial_qualcomm_commands
|
|
28
|
+
pwn_defectdojo_engagement_create pwn_serial_son_micro_sm132_rfid
|
|
29
|
+
pwn_defectdojo_importscan pwn_setup
|
|
30
|
+
pwn_defectdojo_reimportscan pwn_shodan_graphql_introspection
|
|
31
|
+
pwn_diff_csv_files_w_column_exclude pwn_shodan_search
|
|
32
|
+
pwn_domain_reversewhois pwn_simple_http_server
|
|
33
|
+
pwn_fuzz_net_app_proto pwn_web_cache_deception
|
|
34
|
+
pwn_gqrx_scanner pwn_www_checkip
|
|
35
|
+
pwn_jenkins_create_job pwn_www_uri_buster
|
|
36
|
+
pwn_jenkins_create_view pwn_xss_dom_vectors
|
|
37
|
+
pwn_jenkins_install_plugin pwn_zaproxy_active_rest_api_scan
|
|
38
|
+
pwn_jenkins_thinBackup_aws_s3 pwn_zaproxy_active_scan
|
|
40
39
|
```
|
|
41
40
|
|
|
42
41
|
Run any with `--help` for its flags.
|
|
@@ -118,7 +118,7 @@ ai:
|
|
|
118
118
|
|
|
119
119
|
agent:
|
|
120
120
|
native_tools: true # Use provider-native tool_calls / function-calling. false → legacy text-parsed tool protocol.
|
|
121
|
-
max_iters:
|
|
121
|
+
max_iters: 777 # Hard cap on tool-call rounds per user turn. Scars do not lower it.
|
|
122
122
|
task_summary: true # Executive task briefs via TaskSummarizer (plan + about_to). false disables.
|
|
123
123
|
task_summary_every: 5 # When task_summary_verbose: emit Progress every N completed tools.
|
|
124
124
|
task_summary_interval_s: 8.0 # When verbose: also emit when this many seconds elapsed.
|
|
@@ -133,7 +133,7 @@ ai:
|
|
|
133
133
|
shell_bash: false # true -> run shell via bash -lc. Default is /bin/sh.
|
|
134
134
|
plan_first: ~ # Plan-then-act pre-pass. nil = auto (true when ai.active is ollama or openwebui).
|
|
135
135
|
tool_router: ~ # Dynamic tool-set slimming. nil = auto (true for ollama / openwebui).
|
|
136
|
-
tool_preference: # Same order as CORE_TOOLS
|
|
136
|
+
tool_preference: # Same order as CORE_TOOLS: memory_recall, session_recall, skills_recall, pwn_eval, shell, mistakes_record, mistakes_resolve, learning_note_outcome, memory_remember. Current session is injected separately.
|
|
137
137
|
- memory_recall
|
|
138
138
|
- session_recall
|
|
139
139
|
- skills_recall
|
|
@@ -253,7 +253,7 @@ targets: # Optional - engagement-scope URLs/hosts. Mer
|
|
|
253
253
|
|
|
254
254
|
```ruby
|
|
255
255
|
PWN::Env[:ai][:active] # => :grok
|
|
256
|
-
PWN::Env.dig(:ai, :agent, :max_iters) # =>
|
|
256
|
+
PWN::Env.dig(:ai, :agent, :max_iters) # => 777
|
|
257
257
|
PWN::EnvRedacted[:ai][:grok][:key] # => ">>> REDACTED >>> ..."
|
|
258
258
|
|
|
259
259
|
# Edit + re-encrypt + reload without leaving the REPL:
|
|
@@ -303,7 +303,7 @@ PWN::Config.refresh_env
|
|
|
303
303
|
| Key path | Type | Default | Consumed by | Purpose |
|
|
304
304
|
|---|---|---|---|---|
|
|
305
305
|
| `ai.agent.native_tools` | Boolean | `true` | `PWN::Plugins::REPL` (`pwn-ai` cmd) | Use provider-native `tool_calls` / function-calling. `false` falls back to the legacy text-parsed tool protocol. |
|
|
306
|
-
| `ai.agent.max_iters` | Integer | `
|
|
306
|
+
| `ai.agent.max_iters` | Integer | `777` | `PWN::AI::Agent::Loop.run`, `PWN::AI::Agent::Swarm` | Hard cap on tool-call rounds per user turn. Budget-hot scars and overconfidence do not lower this request's runway. |
|
|
307
307
|
| `ai.agent.task_summary` | Boolean | `true` | `PWN::AI::Agent::TaskSummarizer`, `Loop` | Master switch for executive task briefs (`emit_plan!` / `about_to`). |
|
|
308
308
|
| `ai.agent.task_summary_every` | Integer | `5` | `TaskSummarizer.every_n` | Verbose progress cadence (tools). |
|
|
309
309
|
| `ai.agent.task_summary_interval_s` | Float | `8.0` | `TaskSummarizer.interval_s` | Verbose progress cadence (seconds). |
|
|
@@ -317,7 +317,7 @@ PWN::Config.refresh_env
|
|
|
317
317
|
| `ai.agent.shell_bash` | Boolean | `false` | `PWN::AI::Agent::ToolGuard.shell_bash?` | When true, `shell` runs via `bash -lc` so bash-only syntax is allowed. Default is POSIX `/bin/sh` and bashisms are rejected with a rewrite hint. |
|
|
318
318
|
| `ai.agent.plan_first` | Boolean \| `nil` | `nil` (auto: `true` when `ai.active` is `ollama` or `openwebui`) | `PWN::AI::Agent::Loop.plan_first` | Plan-then-act pre-pass: the model must emit a numbered tool plan (as an assistant message) *before* it may dispatch anything. Cheap chain-of-thought scaffolding for local models. |
|
|
319
319
|
| `ai.agent.tool_router` | Boolean \| `nil` | `nil` (auto: `true` for `ollama` / `openwebui`) | `PWN::AI::Agent::Registry.definitions` | Dynamic tool-set slimming: expose only `Registry::CORE_TOOLS` + the top-K keyword-relevant schemas for *this* request. Ties break on historical `Metrics` success rate, then `ai.agent.tool_preference`. |
|
|
320
|
-
| `ai.agent.tool_preference` | Array\<String\> | `memory_recall`, `session_recall`, `skills_recall`, `pwn_eval`, `shell`, `mistakes_record`, `mistakes_resolve`, `learning_note_outcome`, `memory_remember` | `PWN::AI::Agent::Registry.preference_order` / `.rank` / `.apply_preference`, `Policy` | Same order as `CORE_TOOLS`. Current session is injected
|
|
320
|
+
| `ai.agent.tool_preference` | Array\<String\> | `memory_recall`, `session_recall`, `skills_recall`, `pwn_eval`, `shell`, `mistakes_record`, `mistakes_resolve`, `learning_note_outcome`, `memory_remember` | `PWN::AI::Agent::Registry.preference_order` / `.rank` / `.apply_preference`, `Policy` | Same order as `CORE_TOOLS`. Current session is injected as RECENT TURNS. Explicit empty list disables preference. |
|
|
321
321
|
| `ai.agent.defer_introspect` | Boolean | `true` | `PWN::AI::Agent::TurnFinalizer` | Run `Learning.auto_introspect` on a background thread after the user-visible reply. Specs and cron stay inline. |
|
|
322
322
|
| `ai.agent.prompt_cache` | Boolean | `true` | `PWN::AI::Agent::PromptCache` | Engine-native prefix cache. Anthropic uses `cache_control`; OpenAI uses `prompt_cache_key`; Grok uses `x-grok-conv-id`; Gemini splits `systemInstruction`. Ollama and Open WebUI have no native prefix-cache field. |
|
|
323
323
|
| `ai.agent.local_introspect` | Symbol | `failure_only` | `PWN::AI::Agent::Learning.auto_introspect` | End-of-turn introspect policy for local engines: `always` · `failure_only` · `every_n` (with `introspect_every_n`). |
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
lib/pwn/ # all namespaces
|
|
7
7
|
lib/pwn/setup.rb # PWN::Setup - doctor/provisioner data tables
|
|
8
8
|
lib/pwn/migrate.rb # PWN::Migrate - ~/.pwn state doctor / auto-migrator
|
|
9
|
-
lib/pwn/plugins/ #
|
|
9
|
+
lib/pwn/plugins/ # 67 plugin modules
|
|
10
10
|
lib/pwn/ai/agent/ # agent core
|
|
11
11
|
lib/pwn/ai/agent/tools/ # LLM tool registrations
|
|
12
|
-
bin/ # 53 pwn_* drivers + pwn (incl. pwn_setup)
|
|
12
|
+
bin/ # 54 executables: 53 pwn_* drivers + pwn (incl. pwn_setup)
|
|
13
13
|
spec/ # RSpec (incl. conventions_spec)
|
|
14
14
|
documentation/ # this wiki + diagrams
|
|
15
15
|
```
|
data/documentation/Cron.md
CHANGED
|
@@ -36,15 +36,19 @@ does not remove existing per-job lines.
|
|
|
36
36
|
|
|
37
37
|
## Seeded self-improvement jobs (`PWN::Cron.install_defaults`)
|
|
38
38
|
|
|
39
|
-
`pwn setup --migrate` (schema `v1`) seeds
|
|
39
|
+
`pwn setup --migrate` (schema `v1`) seeds five jobs into every fresh
|
|
40
40
|
`~/.pwn/cron/jobs.yml` via `PWN::Cron.install_defaults`:
|
|
41
41
|
|
|
42
|
-
| Name | Schedule | Ruby |
|
|
43
|
-
|
|
44
|
-
| `curriculum_practice_nightly` | `0 3 * * *` | `
|
|
45
|
-
| `curriculum_offline_judge` | `30 3 * * *` | `
|
|
46
|
-
| `curriculum_train_weekly` | `0 4 * * 0` | `
|
|
47
|
-
| `learning_consolidate_nightly` | `0 5 * * *` | `
|
|
42
|
+
| Name | Schedule | Enabled | Ruby |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| `curriculum_practice_nightly` | `0 3 * * *` | **no** | `Curriculum.practice(limit: 3)` - opt-in; runs `Loop.run` with real tools |
|
|
45
|
+
| `curriculum_offline_judge` | `30 3 * * *` | **no** | `Curriculum.offline_judge(...)` - opt-in; spends API tokens |
|
|
46
|
+
| `curriculum_train_weekly` | `0 4 * * 0` | **no** | `Curriculum.train_and_gate(dry_run: true)` - opt-in; needs trainer+GPU to actually train |
|
|
47
|
+
| `learning_consolidate_nightly` | `0 5 * * *` | **yes** | `Learning.consolidate` - memory GC |
|
|
48
|
+
| `pwn_stores_lean_nightly` | `15 5 * * *` | **yes** | `Learning.gc_stores!` - lean memory, learning.jsonl, mistakes, policy, sessions |
|
|
49
|
+
|
|
50
|
+
- **practice / judge / train** ship **disabled**. Practice self-plays via `Loop.run` (shell, browsers). Judge hits the live model. Train is a no-op without a LoRA trainer. Enable with `cron_enable` when you want that loop.
|
|
51
|
+
- **consolidate + lean** stay on: they only touch `~/.pwn` files so the injected MEMORY / LEARNING / session tail stays high-signal.
|
|
48
52
|
|
|
49
53
|
- **practice** - top unresolved `Mistakes` under `Reward.judge`; auto-`resolve` with ≥2 holdouts
|
|
50
54
|
- **offline_judge** - backfill outcome/process labels + plan calibration from PLAN `p(success)=` so `:failure_only` local introspect does not starve the corpus; also runs `Reward.warm_sentinel` so the reward-sentinel window can fill on local hosts
|
data/documentation/Diagrams.md
CHANGED
|
@@ -23,7 +23,7 @@ groups) so lines never criss-cross.
|
|
|
23
23
|
[source](diagrams/dot/persistence-filesystem.dot) · doc: [Persistence](Persistence.md)
|
|
24
24
|

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

|
|
29
29
|
|
|
@@ -68,7 +68,7 @@ groups) so lines never criss-cross.
|
|
|
68
68
|
[source](diagrams/dot/ai-integration-tool-calling.dot) · doc: [AI Integration](AI-Integration.md)
|
|
69
69
|

|
|
70
70
|
|
|
71
|
-
### Agent Tool Registry (13 toolsets ·
|
|
71
|
+
### Agent Tool Registry (13 toolsets · 87 tools)
|
|
72
72
|
[source](diagrams/dot/agent-tool-registry.dot) · doc: [Agent Tool Registry](Agent-Tool-Registry.md)
|
|
73
73
|

|
|
74
74
|
|
|
@@ -24,7 +24,7 @@ See [Installation](Installation.md) for every flag and the
|
|
|
24
24
|
|
|
25
25
|
```ruby
|
|
26
26
|
PWN.help # top-level help
|
|
27
|
-
PWN::Plugins.constants.sort # list all
|
|
27
|
+
PWN::Plugins.constants.sort # list all 67 plugins
|
|
28
28
|
PWN::Plugins::NmapIt.help # per-plugin usage
|
|
29
29
|
PWN::Setup.check # capability doctor from inside the REPL
|
|
30
30
|
PWN::Migrate.status # ~/.pwn state-file compatibility rows
|
data/documentation/Home.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **PWN** (/pōn/) - an open-source offensive-security automation framework and
|
|
4
4
|
> continuous-security-integration platform written in Ruby.
|
|
5
|
-
>
|
|
6
|
-
>
|
|
5
|
+
> 67 plugins · 48 SAST modules · 90 AWS wrappers · 22 WWW drivers · 54 CLI
|
|
6
|
+
> executables · 6 LLM engines · a self-improving multi-agent AI · one REPL.
|
|
7
7
|
|
|
8
8
|
**Repo root:** `/opt/pwn` · **This wiki:** `/opt/pwn/documentation/` ·
|
|
9
9
|
**Rebuild diagrams:** `documentation/diagrams/build.sh`
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|---|---|
|
|
29
29
|
| [The `pwn` REPL](pwn-REPL.md) | Pry shell with the whole `PWN::` namespace pre-loaded |
|
|
30
30
|
| [`pwn-ai` Autonomous Agent](pwn-ai-Agent.md) | Natural-language TUI + `pwn --ai PROMPT` one-shot · **TaskSummarizer** briefs · iteration budget guard |
|
|
31
|
-
| [CLI Drivers `bin/pwn_*`](CLI-Drivers.md) |
|
|
31
|
+
| [CLI Drivers `bin/pwn_*`](CLI-Drivers.md) | 54 headless executables (`pwn` + 53 `pwn_*`) for CI/CD |
|
|
32
32
|
| [Drivers (build your own)](Drivers.md) | Turn a REPL session into a shipped binary |
|
|
33
33
|
|
|
34
34
|
## 🤖 AI Subsystem (`PWN::AI`)
|
|
@@ -36,20 +36,21 @@
|
|
|
36
36
|
| | |
|
|
37
37
|
|---|---|
|
|
38
38
|
| [AI / LLM Integration](AI-Integration.md) | OpenAI · Anthropic · Grok (OAuth) · Gemini · Ollama · Open WebUI |
|
|
39
|
-
| [Agent Tool Registry](Agent-Tool-Registry.md) | 13 toolsets · **
|
|
39
|
+
| [Agent Tool Registry](Agent-Tool-Registry.md) | 13 toolsets · **87** LLM-callable tools |
|
|
40
40
|
| [Memory · Skills · Learning](Skills-Memory-Learning.md) | Introspection - the self-improvement loop |
|
|
41
41
|
| [Mistakes](Mistakes.md) | **Negative feedback** - fingerprint failures · do-NOT-repeat · `[REPEATING]`/`[REGRESSED]` · inline self-correction |
|
|
42
42
|
| [Reinforcement Learning](Reinforcement-Learning.md) | **`Reward` + `Curriculum` + `Policy`** - outcome/process judges · preference ledger · self-play practice · live Q / REINFORCE (advisory) · export-ready LoRA gate |
|
|
43
43
|
| [Extrospection](Extrospection.md) | World-awareness - snapshot · drift · intel · **watch** · **verify** · **rf_tune** · **osint** · serial · telecomm · packet · vision · voice · correlate |
|
|
44
44
|
| [Swarm (Multi-Agent)](Swarm.md) | Personas · ask · debate · broadcast · shared bus |
|
|
45
45
|
| [Sessions](Sessions.md) | Transcript persistence + reflection |
|
|
46
|
-
| [
|
|
46
|
+
| [Session Workflow](Session-Workflow.md) | Keywords: `continue` / last session / write-then-read / recon scope |
|
|
47
|
+
| [Cron](Cron.md) | Scheduled jobs. Hygiene seeds on; curriculum practice/judge/train ship off |
|
|
47
48
|
|
|
48
49
|
## 🧩 Capability Namespaces (`lib/pwn/*`)
|
|
49
50
|
|
|
50
51
|
| | |
|
|
51
52
|
|---|---|
|
|
52
|
-
| [Plugins (
|
|
53
|
+
| [Plugins (67)](Plugins.md) | Every `PWN::Plugins::*` module by category |
|
|
53
54
|
| ↳ [BurpSuite](BurpSuite.md) ⭐ | Preferred web proxy / scanner |
|
|
54
55
|
| ↳ [TransparentBrowser](Transparent-Browser.md) | Headless / visible browser automation |
|
|
55
56
|
| ↳ [NmapIt](NmapIt.md) | Network discovery |
|
|
@@ -20,16 +20,16 @@ hardware).
|
|
|
20
20
|
| `pwn-ai` | `lib/pwn/ai/agent/loop.rb` | Agent TUI inside the REPL |
|
|
21
21
|
| `pwn --ai PROMPT` | `bin/pwn` | Headless one-shot agent (CI-friendly) |
|
|
22
22
|
| `pwn setup` | `lib/pwn/setup.rb` · `bin/pwn_setup` | Post-install doctor + capability provisioner + `--migrate` state doctor (also `pwn --setup[=PROFILE]`) |
|
|
23
|
-
| `bin/pwn_*` |
|
|
24
|
-
| `PWN::Cron` | `lib/pwn/cron.rb` | Scheduled jobs
|
|
23
|
+
| `bin/pwn_*` + `pwn` | 54 files | Thin OptionParser wrappers plus the `pwn` REPL / one-shot agent |
|
|
24
|
+
| `PWN::Cron` | `lib/pwn/cron.rb` | Scheduled jobs. Fresh install seeds hygiene on (`learning_consolidate_nightly`, `pwn_stores_lean_nightly`) and curriculum practice/judge/train off |
|
|
25
25
|
|
|
26
26
|
## L2 - AI agent core (`lib/pwn/ai/agent/`)
|
|
27
27
|
|
|
28
28
|
| Module | Role |
|
|
29
29
|
|---|---|
|
|
30
|
-
| `Loop` | plan → **TaskSummarizer** briefs → dispatch tool_calls → observe → repeat until final answer
|
|
31
|
-
| **`TaskSummarizer`** | Executive UX: every request gets an English task compass (`emit_plan!` · `about_to` as `task k/n`)
|
|
32
|
-
| `Registry` | JSON-Schema function definitions grouped into 13 **toolsets** · **87 tools** · `CORE_TOOLS` = `DEFAULT_PREFERENCE` (`memory_recall` · `session_recall` · `skills_recall` · `pwn_eval` · `shell`) |
|
|
30
|
+
| `Loop` | plan → **TaskSummarizer** briefs → dispatch tool_calls → observe → repeat until final answer. Scars do not lower `max_iters` (default 777). Last-iter strips tools only when the original request is already satisfied |
|
|
31
|
+
| **`TaskSummarizer`** | Executive UX: every request gets an English task compass (`emit_plan!` · `about_to` as `task k/n`) - no statement/question/goal type |
|
|
32
|
+
| `Registry` | JSON-Schema function definitions grouped into 13 **toolsets** · **87 tools** · `CORE_TOOLS` = `DEFAULT_PREFERENCE` (`memory_recall` · `session_recall` · `skills_recall` · `pwn_eval` · `shell` · `mistakes_record` · `mistakes_resolve` · `learning_note_outcome` · `memory_remember`) |
|
|
33
33
|
| `Dispatch` / `Result` | execute a tool, capture stdout/value/error/duration |
|
|
34
34
|
| `PromptBuilder` | inject MEMORY / SKILLS / LEARNING / **KNOWN MISTAKES + FIXES** / METRICS / **POLICY** / EXTROSPECTION / RECENT TURNS |
|
|
35
35
|
| `Metrics` · `Learning` · `Reflect` · **`Policy`** | **introspection** - how well am I doing? (Policy is live Q / REINFORCE, advisory rank only) |
|
|
@@ -45,7 +45,7 @@ call, and [Reinforcement Learning](Reinforcement-Learning.md) for how
|
|
|
45
45
|
|
|
46
46
|
## L3 - Capability namespaces (`lib/pwn/*`)
|
|
47
47
|
|
|
48
|
-
`Plugins` (
|
|
48
|
+
`Plugins` (67) · `SAST` (48) · `WWW` (22) · `AWS` (90) · `SDR` · `Blockchain` ·
|
|
49
49
|
`Bounty` · `Reports` · `FFI` · `Banner` · **`Setup`** · **`Migrate`**. Each is
|
|
50
50
|
a plain module of `public_class_method def self.x(opts = {})` methods -
|
|
51
51
|
callable the same way from the REPL, from `pwn_eval`, or from a driver.
|
|
@@ -75,9 +75,9 @@ Q / REINFORCE when the judge scores the turn, and **the prompt blocks**
|
|
|
75
75
|
(MEMORY · SKILLS · LEARNING · KNOWN MISTAKES/FIXES · TOOL EFFECTIVENESS ·
|
|
76
76
|
POLICY · EXTROSPECTION · RECENT TURNS) are re-injected into the next system
|
|
77
77
|
prompt.
|
|
78
|
-
Nightly cron
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
Nightly hygiene cron trims `~/.pwn` stores. Curriculum practice, offline
|
|
79
|
+
judge, and weekly LoRA train ship seeded but disabled; turn them on with
|
|
80
|
+
`cron_enable` when you want that loop:
|
|
81
81
|
|
|
82
82
|

|
|
83
83
|
|
|
@@ -293,7 +293,7 @@ Vagrant, CI) picks it up automatically.
|
|
|
293
293
|
```ruby
|
|
294
294
|
pwn[CURRENT_VERSION]:001 >>> PWN::Setup.check[:ok] # => true
|
|
295
295
|
pwn[CURRENT_VERSION]:002 >>> PWN::Migrate.needed? # => false
|
|
296
|
-
pwn[CURRENT_VERSION]:003 >>> PWN::Plugins.constants.count # =>
|
|
296
|
+
pwn[CURRENT_VERSION]:003 >>> PWN::Plugins.constants.count # => 67
|
|
297
297
|
pwn[CURRENT_VERSION]:004 >>> PWN::SAST.constants.count # => 48
|
|
298
298
|
pwn[CURRENT_VERSION]:005 >>> pwn-ai # launches agent TUI
|
|
299
299
|
```
|
|
@@ -24,7 +24,8 @@ Every byte PWN remembers between processes lives here.
|
|
|
24
24
|
| `extrospection/packet/*.pcap` | `Extrospection` | pcap | `rm -rf` | bounded captures from `extro_packet(action: :capture)` |
|
|
25
25
|
| `extrospection/voice/*` | `Extrospection` | wav / txt | `rm -rf` | TTS/STT artifacts from `extro_voice` |
|
|
26
26
|
| `sessions/*.jsonl` | `PWN::Sessions` | JSON-per-line | `sessions_delete` | full transcript per pwn-ai run (with per-step `step_reward` from `Reward.prm`) |
|
|
27
|
-
| `
|
|
27
|
+
| `open_goal.json` | `PWN::AI::Agent::OpenGoal` | JSON | delete the file | unfinished host-work request so `continue` / `resume` picks it up |
|
|
28
|
+
| `cron/jobs.yml` | `PWN::Cron` | YAML | `cron_remove` | scheduled jobs. Fresh install seeds hygiene (`learning_consolidate_nightly` + `pwn_stores_lean_nightly` **on**) and curriculum practice/judge/train **off** |
|
|
28
29
|
| `cron/log/*.log` | `PWN::Cron` | text | rm | last_run output |
|
|
29
30
|
| `agents.yml` | `PWN::AI::Agent::Swarm` | YAML | edit / `agent_spawn` | persona registry |
|
|
30
31
|
| `swarm/<id>/bus.jsonl` | `Swarm` | JSON-per-line | rm -rf | append-only multi-agent chat |
|
data/documentation/Plugins.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# `PWN::Plugins` - All
|
|
1
|
+
# `PWN::Plugins` - All 67 Modules
|
|
2
2
|
|
|
3
3
|
Every plugin is a plain Ruby module of `public_class_method def self.x(opts = {})`
|
|
4
4
|
methods with self-documenting `.help`. Source: `lib/pwn/plugins/*.rb`.
|
|
@@ -93,7 +93,7 @@ show-source PWN::Plugins::Fuzz.generate
|
|
|
93
93
|
|
|
94
94
|
### Utility
|
|
95
95
|
`FileFu` · `ThreadPool` · `Log` · `PWNLogger` · `Char` · `XXD` · `DetectOS` ·
|
|
96
|
-
`CreditCard` · `SSN` · `EIN` · `VIN` · `PS` · `MonkeyPatch` · `REPL`
|
|
96
|
+
`CreditCard` · `SSN` · `EIN` · `VIN` · `PS` · `MonkeyPatch` · `REPL` · `TTYSpinner`
|
|
97
97
|
|
|
98
98
|
## Full alphabetical list
|
|
99
99
|
|
|
@@ -104,6 +104,6 @@ HackerOne Hunter IPInfo IRC Jenkins JiraDataCenter JSONPathify Log MailAgent
|
|
|
104
104
|
Metasploit MonkeyPatch MSR206 NessusCloud NexposeVulnScan NmapIt OAuth2 OCR
|
|
105
105
|
OpenAPI OpenVAS Packet PDFParse Pony PS PWNLogger RabbitMQ REPL ScannableCodes
|
|
106
106
|
Serial Shodan SlackClient Sock Spider SSN ThreadPool Tor TransparentBrowser
|
|
107
|
-
TwitterAPI URIScheme Vault VIN Voice Vsphere XXD Zaproxy`
|
|
107
|
+
TTYSpinner TwitterAPI URIScheme Vault VIN Voice Vsphere XXD Zaproxy`
|
|
108
108
|
|
|
109
109
|
[← Home](Home.md) · [Diagrams](Diagrams.md)
|