pwn 0.5.780 → 0.5.781
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/Gemfile +2 -2
- data/documentation/AI-Integration.md +4 -4
- data/documentation/AWS.md +10 -9
- data/documentation/Agent-Tool-Registry.md +20 -17
- data/documentation/Blockchain.md +3 -2
- data/documentation/Bounty.md +8 -6
- data/documentation/BurpSuite.md +6 -10
- data/documentation/CLI-Drivers.md +7 -4
- data/documentation/Capability-Broker-Sandbox.md +1 -1
- data/documentation/Configuration.md +23 -15
- data/documentation/Contributing.md +3 -3
- data/documentation/Cron.md +3 -2
- data/documentation/Diagrams.md +9 -3
- data/documentation/Drivers.md +12 -6
- data/documentation/Extrospection.md +25 -5
- data/documentation/FFI.md +15 -25
- data/documentation/Fuzzing.md +13 -13
- data/documentation/General-PWN-Usage.md +7 -4
- data/documentation/Harness-Evaluation.md +90 -3
- data/documentation/Home.md +6 -5
- data/documentation/How-PWN-Works.md +9 -10
- data/documentation/Installation.md +12 -11
- data/documentation/Metasploit.md +13 -19
- data/documentation/Mistakes.md +2 -2
- data/documentation/NmapIt.md +6 -3
- data/documentation/Operability.md +99 -0
- data/documentation/Persistence.md +3 -2
- data/documentation/Plugin-Degradation.md +4 -2
- data/documentation/Plugins.md +4 -11
- data/documentation/Policy-Benchmark.md +4 -0
- data/documentation/Reinforcement-Learning.md +19 -3
- data/documentation/Reporting.md +6 -5
- data/documentation/SAST.md +15 -10
- data/documentation/SDR-Decoder-Coverage.md +10 -4
- data/documentation/SDR.md +28 -40
- data/documentation/Session-Workflow.md +25 -12
- data/documentation/Sessions.md +7 -0
- data/documentation/Skills-Memory-Learning.md +11 -4
- data/documentation/Swarm.md +6 -0
- data/documentation/Transparent-Browser.md +1 -1
- data/documentation/Troubleshooting.md +6 -3
- data/documentation/What-is-PWN.md +4 -4
- data/documentation/Why-PWN.md +1 -1
- data/documentation/diagrams/agent-tool-registry.svg +219 -180
- data/documentation/diagrams/ai-integration-tool-calling.svg +35 -34
- data/documentation/diagrams/code-scanning-sast.svg +78 -78
- data/documentation/diagrams/cron-scheduling.svg +165 -145
- data/documentation/diagrams/dot/_THEME.md +6 -4
- data/documentation/diagrams/dot/agent-tool-registry.dot +6 -2
- data/documentation/diagrams/dot/ai-integration-tool-calling.dot +1 -1
- data/documentation/diagrams/dot/code-scanning-sast.dot +8 -8
- data/documentation/diagrams/dot/cron-scheduling.dot +2 -0
- data/documentation/diagrams/dot/driver-framework.dot +1 -1
- data/documentation/diagrams/dot/extrospection-world-awareness.dot +2 -2
- data/documentation/diagrams/dot/fuzzing-workflow.dot +3 -3
- data/documentation/diagrams/dot/history-to-drivers.dot +1 -1
- data/documentation/diagrams/dot/memory-skills-detailed.dot +3 -3
- data/documentation/diagrams/dot/mistakes-negative-feedback.dot +2 -2
- data/documentation/diagrams/dot/overall-pwn-architecture.dot +33 -121
- data/documentation/diagrams/dot/persistence-filesystem.dot +2 -2
- data/documentation/diagrams/dot/plugin-ecosystem.dot +2 -2
- data/documentation/diagrams/dot/pwn-ai-feedback-learning-loop.dot +31 -167
- data/documentation/diagrams/dot/pwn-repl-prototyping.dot +1 -1
- data/documentation/diagrams/dot/reinforcement-learning.dot +15 -7
- data/documentation/diagrams/dot/reporting-pipeline.dot +5 -3
- data/documentation/diagrams/dot/reverse-engineering-flow.dot +3 -3
- data/documentation/diagrams/dot/sdr-radio-flow.dot +5 -5
- data/documentation/diagrams/dot/sessions-cron-automation.dot +1 -1
- data/documentation/diagrams/dot/swarm-multi-agent.dot +3 -3
- data/documentation/diagrams/dot/task-summarizer.dot +2 -2
- data/documentation/diagrams/dot/web-application-testing.dot +4 -3
- data/documentation/diagrams/dot/zero-day-research-flow.dot +4 -3
- data/documentation/diagrams/driver-framework.svg +1 -1
- data/documentation/diagrams/extrospection-world-awareness.svg +178 -178
- data/documentation/diagrams/fuzzing-workflow.svg +58 -58
- data/documentation/diagrams/history-to-drivers.svg +42 -42
- data/documentation/diagrams/memory-skills-detailed.svg +210 -210
- data/documentation/diagrams/mistakes-negative-feedback.svg +116 -116
- data/documentation/diagrams/overall-pwn-architecture.svg +248 -404
- data/documentation/diagrams/persistence-filesystem.svg +143 -143
- data/documentation/diagrams/plugin-ecosystem.svg +100 -100
- data/documentation/diagrams/pwn-ai-feedback-learning-loop.svg +233 -752
- data/documentation/diagrams/pwn-repl-prototyping.svg +27 -27
- data/documentation/diagrams/reinforcement-learning.svg +295 -221
- data/documentation/diagrams/reporting-pipeline.svg +94 -80
- data/documentation/diagrams/reverse-engineering-flow.svg +31 -31
- data/documentation/diagrams/sdr-radio-flow.svg +157 -155
- data/documentation/diagrams/sessions-cron-automation.svg +13 -13
- data/documentation/diagrams/swarm-multi-agent.svg +86 -86
- data/documentation/diagrams/task-summarizer.svg +57 -57
- data/documentation/diagrams/web-application-testing.svg +81 -75
- data/documentation/diagrams/zero-day-research-flow.svg +101 -92
- data/documentation/pwn-REPL.md +5 -3
- data/documentation/pwn-ai-Agent.md +18 -14
- data/documentation/pwn_silent_help_learn_demo.gif +0 -0
- data/etc/default_skills/pwn/ai/agent/learning/SKILL.md +1 -0
- data/lib/pwn/ai/agent/learning.rb +46 -1
- data/lib/pwn/ai/agent/policy_evaluation.rb +5 -1
- data/lib/pwn/ai/agent/reward.rb +9 -0
- data/lib/pwn/version.rb +1 -1
- data/spec/fixtures/harness/completion_regressions.json +10 -0
- data/spec/fixtures/harness/completion_regressions.json.sha256 +1 -0
- data/spec/integration/harness_evaluation_spec.rb +13 -0
- data/spec/lib/pwn/ai/agent/learning_spec.rb +22 -0
- data/spec/lib/pwn/ai/agent/policy_evaluation_spec.rb +6 -1
- data/spec/lib/pwn/ai/agent/reward_spec.rb +21 -0
- data/spec/support/harness/evaluate.rb +1 -1
- data/third_party/pwn_rdoc.jsonl +2 -1
- metadata +8 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be1437ab0b3260ca673ef36aa2c5d062008637493f6c0a02c0863e514fc3b199
|
|
4
|
+
data.tar.gz: 2c10c59ab8501a88b0e788034d8319e04a58d4322c2ed345f6cb88bf11e9e452
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 51827bef402328c9bfe195fac4a7542733b485651e4cfd6eb87203abf5ee0a7c83c1dd5837da133d1fdcb21e1582cc9f6867087f427293b6a4719de2efe0a857
|
|
7
|
+
data.tar.gz: a19aaf87f51bfaa1101918cd9c1526791d6953249ba992a51ebfe86db5a4eec8da79e348dc29263161f17d9754f108f53b5044d53c98a92719900668883a886f
|
data/Gemfile
CHANGED
|
@@ -50,7 +50,7 @@ gem 'libusb', '0.8.0'
|
|
|
50
50
|
gem 'luhn', '3.0.0'
|
|
51
51
|
gem 'mail', '2.9.1'
|
|
52
52
|
gem 'mcp', '1.8.1'
|
|
53
|
-
gem 'meshtastic', '0.0.
|
|
53
|
+
gem 'meshtastic', '0.0.189'
|
|
54
54
|
gem 'metasm', '1.0.6'
|
|
55
55
|
gem 'mongo', '2.26.0'
|
|
56
56
|
gem 'msfrpc-client', '1.1.2'
|
|
@@ -81,7 +81,7 @@ gem 'rmagick', '7.2.0'
|
|
|
81
81
|
gem 'rqrcode', '3.2.0'
|
|
82
82
|
gem 'rspec', '3.13.2'
|
|
83
83
|
gem 'rtesseract', '3.1.4'
|
|
84
|
-
gem 'rubocop', '1.92.
|
|
84
|
+
gem 'rubocop', '1.92.1'
|
|
85
85
|
gem 'rubocop-rake', '0.7.1'
|
|
86
86
|
gem 'rubocop-rspec', '3.10.2'
|
|
87
87
|
gem 'ruby-audio', '1.6.1'
|
|
@@ -18,9 +18,9 @@ agent code never cares which model is behind it.
|
|
|
18
18
|
| `openwebui` | `PWN::AI::OpenWebUI` | `key:` (JWT / API token) + `base_uri:` | Open WebUI gateway - OpenAI-compatible `/api/v1/chat/completions` plus proxied Ollama `/ollama/api/*` (including embed) |
|
|
19
19
|
|
|
20
20
|
> PWN is **model-agnostic**. `ai.<engine>.model` is passed straight through to
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
choose a provider-supported model ID (or a tag from `ollama list`).
|
|
22
|
+
Provider-specific reasoning/endpoint compatibility logic still exists; changing
|
|
23
|
+
`base_uri` alone does not implement Azure or Bedrock authentication/protocols.
|
|
24
24
|
|
|
25
25
|
## Selecting an engine
|
|
26
26
|
|
|
@@ -79,7 +79,7 @@ The harness adapts to the *class* of engine, not the model name:
|
|
|
79
79
|
|---|---|---|
|
|
80
80
|
| **PromptBuilder.budget** | full MEMORY / METRICS / MISTAKES / LEARNING / EXTRO blocks | tightened via `ai.ollama.prompt_budget` (extro off by default) |
|
|
81
81
|
| **MEMORY ranking** | relevance-ranked when a local Ollama `embed_model` is reachable, else newest-first | relevance-ranked via `PWN::MemoryIndex` (`~/.pwn/memory.idx`) |
|
|
82
|
-
| **Tool schemas shipped** |
|
|
82
|
+
| **Tool schemas shipped** | Loop normally requests core-only schemas; explicit Registry callers may request more | `CORE_TOOLS` + top-K keyword matches when `ai.agent.tool_router` is on (default on). Ties also honor `tool_preference`. |
|
|
83
83
|
| **Pre-pass** | none | `plan_first` numbered tool plan before first dispatch |
|
|
84
84
|
| **Intent route** | always | `request_intent` only (greeting / howto / recall cheap paths). There is no request type. Every other turn gets a TaskSummarizer compass and CORE_TOOLS. |
|
|
85
85
|
| **Few-shot** | none | `Learning.exemplars_for(request)` splices a prior successful trace |
|
data/documentation/AWS.md
CHANGED
|
@@ -8,21 +8,22 @@ with the PWN `opts = {}` convention so they compose in the REPL and in
|
|
|
8
8
|
|
|
9
9
|
## Credentials
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
Service wrappers expose `connect`/`disconnect`, not every AWS SDK operation
|
|
12
|
+
as a PWN module method. Supply `region`, `access_key_id`, `secret_access_key`
|
|
13
|
+
and optional `sts_session_token` to `connect`; retrieve credentials through
|
|
14
|
+
your approved secret source without printing them. `STS.get_temp_credentials`
|
|
15
|
+
is the separate assume-role helper. Inspect each module's `.help` first.
|
|
14
16
|
|
|
15
17
|
## Quick enumeration
|
|
16
18
|
|
|
17
19
|
```ruby
|
|
18
|
-
|
|
19
|
-
PWN::AWS::
|
|
20
|
-
|
|
21
|
-
PWN::AWS::
|
|
22
|
-
PWN::AWS::Lambda.list_functions
|
|
20
|
+
# credentials is an operator-supplied Hash; never log its values.
|
|
21
|
+
ec2 = PWN::AWS::EC2.connect(credentials.merge(region: 'us-east-1'))
|
|
22
|
+
instances = ec2.describe_instances
|
|
23
|
+
PWN::AWS::EC2.disconnect(ec2_obj: ec2)
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
CLI: `pwn_aws_describe_resources -r us-east-1 -
|
|
26
|
+
CLI: `pwn_aws_describe_resources -r us-east-1 -c /path/to/private-aws.yaml`
|
|
26
27
|
|
|
27
28
|
## Service groups
|
|
28
29
|
|
|
@@ -11,18 +11,18 @@ toolsets; the JSON-Schema for each tool is what the model actually sees.
|
|
|
11
11
|
| Toolset | Tools | Backed by |
|
|
12
12
|
|---|---|---|
|
|
13
13
|
| `http` | `http_proxy_start` · `http_proxy_stop` · `http_proxy_entries` · `http_proxy_rules` · `http_replay` | `PWN::Plugins::MitmProxy`: native HTTP HAR capture/replay; opaque CONNECT tunnels |
|
|
14
|
-
| `terminal` | `
|
|
15
|
-
| `pwn` | `
|
|
14
|
+
| `terminal` | `pty_expect` · `job_run` · `job_status` · `job_result` · `job_tail` · `job_kill` · `pty_open` · `pty_send` · `pty_read` · `pty_close` · `pty_session` · `shell` | Foreground host commands plus `PWN::Plugins::Jobs` durable supervisors |
|
|
15
|
+
| `pwn` | `binary_triage` · `browser_goto` · `capabilities` · `debug_session` · `gdb_run_to_crash` · `binary_diff` · `crash_triage` · `emulate` · `detonate` · `decompile` · `exploitdev` · `finding_record` · `finding_report` · `chain_score` · `fuzz_campaign` · `intel_lookup` · `loot_query` · `nmap_scan` · `nuclei_scan` · `r2_functions` · `r2_disasm` · `recon_run` · `pwn_eval` · `sandbox_run` · `sandbox_fuzz` · `sbom_scan` · `swarm_map` | `TOPLEVEL_BINDING.eval` in the live REPL process, after `ToolGuard`; SBOM engines via `PWN::Plugins::SBOM` store CVE leads as recon observations, not findings; r2pipe JSON via `PWN::Plugins::Radare2`; gdb MI3 crash reports via `PWN::Plugins::GDBMI`; nmap XML ingest/diff via `PWN::Plugins::NmapIt`, which skips a known port unless `refresh: true`; nuclei/httpx JSONL via `PWN::Plugins::Nuclei` writes a recon observation (a template match is not a finding) and accepts a `Recon.handoff` record; TransparentBrowser navigation captures screenshot/DOM/HAR via `browser_goto`; engagement loot via `PWN::Plugins::Vault` |
|
|
16
16
|
| `mcp` | `mcp` | `PWN::AI::MCP` session broker → any `PWN::AI::MCP::*` stdio client |
|
|
17
|
-
| `memory` | `memory_remember` · `memory_recall` · `memory_forget` · `memory_clear` ·
|
|
18
|
-
| `skills` | `
|
|
19
|
-
| `sessions` |
|
|
20
|
-
| `learning` | `learning_note_outcome` · `learning_reflect` · `learning_distill_skill` · `learning_stats` · `learning_outcomes` · `learning_consolidate` · `learning_reset` · `learning_auto_introspect_toggle` ·
|
|
21
|
-
| `reward` |
|
|
22
|
-
| `curriculum` |
|
|
23
|
-
| `metrics` | `metrics_summary` · `metrics_reset` | `PWN::AI::Agent::Metrics` → `~/.pwn/metrics.json`. ESR is `verified_exploit_tools / vulnerable_tools`. ASR is `successful_attacks / total_attack_attempts`. |
|
|
24
|
-
| `policy` |
|
|
25
|
-
| `extrospection` | `extro_snapshot` · `extro_drift` · `extro_observe` · `extro_observations` · `extro_intel` ·
|
|
17
|
+
| `memory` | `memory_remember` · `memory_recall` · `memory_forget` · `memory_clear` · `memory_lean` | `PWN::Memory` → `~/.pwn/memory.json` |
|
|
18
|
+
| `skills` | `skills_recall` · `skills_update` · `skill_list` · `skill_view` · `skill_create` · `skills_create` · `skill_add_reference` · `skill_delete` · `skill_migrate_legacy` · `skills_consolidate` | `~/.pwn/skills/<name>/SKILL.md` (**[agentskills.io](https://agentskills.io) spec**; legacy flat `*.md` auto-migrated) |
|
|
19
|
+
| `sessions` | `artifacts_list` · `artifacts_get` · `artifact_read` · `artifact_grep` · `artifact_put` · `artifact_get` · `context_attach` · `capability_request` · `budget_status` · `engagement_open` · `engagement_close` · `engagement_status` · `session_export` · `session_recall` · `sessions_list` · `sessions_view` · `sessions_delete` · `sessions_stats` · `sessions_current` · `sessions_lean` · `verify` | `PWN::Sessions` → `~/.pwn/sessions/`; `PWN::Plugins::ArtifactRegistry` → `~/.pwn/artifacts/` |
|
|
20
|
+
| `learning` | `curriculum_practice` · `curriculum_train` · `curriculum_hindsight` · `learning_purge_noise` · `curriculum_offline_judge` · `curriculum_preference_balance` · `learning_note_outcome` · `learning_reflect` · `learning_distill_skill` · `learning_stats` · `learning_outcomes` · `learning_consolidate` · `learning_reset` · `learning_auto_introspect_toggle` · `learning_gc_stores` · `mistakes_list` · `mistakes_record` · `mistakes_resolve` · `mistakes_lean` · `mistakes_reset` · `reward_judge` · `reward_prm` · `reward_sentinel` · `reward_preferences` · `reward_export_dpo` · `reward_warm_sentinel` · `reward_scrub_preferences` · `reward_preference_balance` | `PWN::AI::Agent::Learning` + `Mistakes` + `Reward` + `Curriculum` → `~/.pwn/learning.jsonl` + `~/.pwn/mistakes.json` + `~/.pwn/preferences.jsonl` + `~/.pwn/curriculum/` + `~/.pwn/finetune/` |
|
|
21
|
+
| `reward` | `reward_generator_mix` | `PWN::AI::Agent::Reward.generator_mix` → online preference source-mix controller (`preferences.jsonl`) |
|
|
22
|
+
| `curriculum` | `curriculum_practice_kpi` | `PWN::AI::Agent::Curriculum.practice_kpi` → `~/.pwn/curriculum_kpi.jsonl` |
|
|
23
|
+
| `metrics` | `metrics_summary` · `metrics_reset` · `ai_usage` | `PWN::AI::Agent::Metrics` → `~/.pwn/metrics.json`. ESR is `verified_exploit_tools / vulnerable_tools`. ASR is `successful_attacks / total_attack_attempts`. |
|
|
24
|
+
| `policy` | `policy_stats` · `policy_evaluate` · `policy_recommend` | `PWN::AI::Agent::Policy` → `~/.pwn/policy.json` + `~/.pwn/policy_traj.jsonl` |
|
|
25
|
+
| `extrospection` | `extro_snapshot` · `extro_drift` · `extro_observe` · `extro_observations` · `extro_intel` · `extro_correlate` · `extro_stats` · `extro_reset` · `extro_auto_toggle` · `extro_verify` · `extro_watch` · `extro_rf_tune` · `extro_osint` · `extro_serial` · `extro_telecomm` · `extro_packet` · `extro_vision` · `extro_voice` | `PWN::AI::Agent::Extrospection` (+ Serial/Packet/OCR/Voice/BareSIP/TransparentBrowser/GQRX) → `~/.pwn/extrospection.json` |
|
|
26
26
|
| `cron` | `cron_list` · `cron_create` · `cron_run` · `cron_enable` · `cron_disable` · `cron_remove` | `PWN::Cron` → `~/.pwn/cron/jobs.yml` |
|
|
27
27
|
| `swarm` | `agent_list` · `agent_spawn` · `agent_ask` · `agent_debate` · `agent_broadcast` · `swarm_bus` · `swarm_list` · `agent_roster` | `PWN::AI::Agent::Swarm` → `~/.pwn/agents.yml` + `~/.pwn/swarm/` |
|
|
28
28
|
| `manifest` | `host_os_type` | YAML tool declarations in `lib/pwn/ai/tools/*.yaml` via `PWN::AI::Agent::Manifest` |
|
|
@@ -86,11 +86,11 @@ PWN::AI::Agent::Registry.definitions(relevance: 'nmap sweep 10.0.0.0/8', top_k:
|
|
|
86
86
|
PWN::AI::Agent::Registry.rank(query: 'run a shell command') # inspect ranking
|
|
87
87
|
PWN::AI::Agent::Registry.preference_order # Env / DEFAULT_PREFERENCE
|
|
88
88
|
PWN::AI::Agent::Registry.toolsets # -> the 16 names above
|
|
89
|
-
PWN::AI::Agent::Registry.all.count # ->
|
|
89
|
+
PWN::AI::Agent::Registry.all.count # -> 150 (after discover)
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
This broader Registry behavior does not override normal Loop's core-only
|
|
93
|
+
selection. Frontier engines default `tool_router` off for broader callers. Local engines (`ollama` / `openwebui`) default `tool_router` to on.
|
|
94
94
|
|
|
95
95
|
## Durable long-running jobs
|
|
96
96
|
|
|
@@ -186,7 +186,8 @@ bound to this turn's contract ID. Finalization rechecks the current file against
|
|
|
186
186
|
that evidence. Textual delivery claims, mere existence, old-turn observations,
|
|
187
187
|
and files changed after readback cannot satisfy the gate. A proven current-turn
|
|
188
188
|
write delta takes precedence over filesystem timestamp clock-tick lag.
|
|
189
|
-
Nested calls
|
|
189
|
+
Nested calls bind their own contract and restore the parent scope on return;
|
|
190
|
+
only current, exact-target child receipts can cross into parent acceptance. Historical mistake
|
|
190
191
|
entries are not deleted by this enforcement.
|
|
191
192
|
|
|
192
193
|
## Retry checkpoints
|
|
@@ -194,8 +195,10 @@ entries are not deleted by this enforcement.
|
|
|
194
195
|
The identical-payload checkpoint distinguishes retries from successful repeats.
|
|
195
196
|
A structured nonzero exit or timeout resets that payload's repeat count and
|
|
196
197
|
does not extinguish the payload through the repeated-failure guard. The command
|
|
197
|
-
can
|
|
198
|
-
|
|
198
|
+
can be retried on legacy standalone Dispatch paths, subject to deadline
|
|
199
|
+
escalation and cumulative budget. Runtime-owned requests preserve caller
|
|
200
|
+
deadlines and refuse uncertain mutations across restart; changing an action ID
|
|
201
|
+
does not make their side effects safe to replay. Successful repeats retain the
|
|
199
202
|
checkpoint. Policy denials, exhausted budgets, checkpoint responses, and text
|
|
200
203
|
in stdout do not grant an execution-failure exemption. Actual command failures
|
|
201
204
|
remain recorded; the exemption does not erase historical mistake entries.
|
data/documentation/Blockchain.md
CHANGED
|
@@ -106,10 +106,11 @@ failures propagate; malformed/unsupported returned ABI layouts are marked unavai
|
|
|
106
106
|
## Verification
|
|
107
107
|
|
|
108
108
|
Default specs use deterministic transport fixtures and need no live credentials.
|
|
109
|
-
|
|
109
|
+
The earlier implementation report recorded read-only live checks exercising BTC chain/block/transaction/ancestor/UTXO/date/
|
|
110
110
|
address/mempool paths against the configured unpruned mainnet node, and Ethereum
|
|
111
111
|
chain/block/receipt/pinned-account/activity/Transfer-log/USDC-metadata paths against
|
|
112
|
-
a public mainnet RPC.
|
|
112
|
+
a public mainnet RPC. Those historical checks were not repeated in this documentation audit. They
|
|
113
|
+
establish only the reported paths, not universal
|
|
113
114
|
provider compatibility or complete attribution. Never put RPC credentials in
|
|
114
115
|
fixtures, documentation, logs, or generated skills.
|
|
115
116
|
|
data/documentation/Bounty.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
| Module | Purpose |
|
|
4
4
|
|---|---|
|
|
5
|
-
| `PWN::Bounty::LifecycleAuthzReplay` |
|
|
5
|
+
| `PWN::Bounty::LifecycleAuthzReplay` | Plan actor/surface/checkpoint coverage, record caller-supplied observations, and summarize stale-access evidence; it does not automatically replay HAR requests |
|
|
6
6
|
|
|
7
7
|
Pairs naturally with:
|
|
8
8
|
|
|
@@ -11,11 +11,13 @@ Pairs naturally with:
|
|
|
11
11
|
- [`PWN::Plugins::BurpSuite`](BurpSuite.md) - capture the session to replay
|
|
12
12
|
|
|
13
13
|
```ruby
|
|
14
|
-
PWN::Bounty::LifecycleAuthzReplay
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
replay = PWN::Bounty::LifecycleAuthzReplay
|
|
15
|
+
plan = replay.load_plan(yaml_path: '/path/to/lifecycle_authz_replay.yaml')
|
|
16
|
+
run = replay.start_run(plan: plan, output_dir: '/tmp/authz-evidence')
|
|
17
|
+
# Perform the authorized requests separately and record their actual results
|
|
18
|
+
# with replay.record_observation(run_obj: run, checkpoint:, actor:, surface:,
|
|
19
|
+
# status:, request:, response:, artifact_paths:).
|
|
20
|
+
summary = replay.finalize_run(run_obj: run)
|
|
19
21
|
```
|
|
20
22
|
|
|
21
23
|
[← Home](Home.md) · [WWW](WWW.md)
|
data/documentation/BurpSuite.md
CHANGED
|
@@ -11,20 +11,16 @@ Professional's headless mode + REST API.
|
|
|
11
11
|
|
|
12
12
|
## Configure
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
bind_ip: 127.0.0.1
|
|
20
|
-
proxy_port: 8080
|
|
21
|
-
api_port: 1337
|
|
22
|
-
```
|
|
14
|
+
`BurpSuite.start` takes `burp_jar_path`, `burp_ip`, `burp_port`,
|
|
15
|
+
`pwn_burp_ip`, `pwn_burp_port`, `headless` and `browser_type` options.
|
|
16
|
+
It uses the PWN Burp extension API; an arbitrary REST API key/config block is
|
|
17
|
+
not an interchangeable adapter. Burp Professional and the matching extension
|
|
18
|
+
must be provisioned separately. Use `.help` for the exact installed contract.
|
|
23
19
|
|
|
24
20
|
## Core methods
|
|
25
21
|
|
|
26
22
|
```ruby
|
|
27
|
-
burp = PWN::Plugins::BurpSuite.start(headless: true)
|
|
23
|
+
burp = PWN::Plugins::BurpSuite.start(headless: true, burp_port: 8080)
|
|
28
24
|
|
|
29
25
|
# drive traffic through it
|
|
30
26
|
b = PWN::Plugins::TransparentBrowser.open(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CLI Drivers - `bin/pwn_*`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
56 executables (53 `pwn_*` + `pwn`, `pwn-ai`, `pwn-capd`), each a thin `OptionParser`
|
|
4
4
|
wrapper over one plugin (or one workflow). They exist so CI/CD can call PWN
|
|
5
5
|
without a REPL or an LLM.
|
|
6
6
|
|
|
@@ -9,6 +9,7 @@ without a REPL or an LLM.
|
|
|
9
9
|
## Full list
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
|
+
pwn-ai pwn-capd
|
|
12
13
|
pwn pwn_jenkins_update_plugins
|
|
13
14
|
pwn_ai_red_team pwn_jenkins_useradd
|
|
14
15
|
pwn_android_war_dialer pwn_mail_agent
|
|
@@ -38,7 +39,9 @@ pwn_jenkins_install_plugin pwn_zaproxy_active_rest_api_scan
|
|
|
38
39
|
pwn_jenkins_thinBackup_aws_s3 pwn_zaproxy_active_scan
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
Most drivers support `--help`; inspect source before assuming that convention.
|
|
43
|
+
`pwn_msf_postgres_login` is positional (config, hosts, port) and does not have an
|
|
44
|
+
OptionParser help path. Never probe it with `--help` against live credentials.
|
|
42
45
|
|
|
43
46
|
## `pwn_setup` - post-install doctor / provisioner / state migrator
|
|
44
47
|
|
|
@@ -78,8 +81,8 @@ sast:
|
|
|
78
81
|
script:
|
|
79
82
|
- pwn_setup --profile net --yes
|
|
80
83
|
- pwn_setup --check # gate: exit 1 if degraded
|
|
81
|
-
- pwn_sast -d
|
|
82
|
-
|
|
84
|
+
- pwn_sast --help # use the installed driver's -u/-d/-n contract, not -o
|
|
85
|
+
# Add an explicitly configured authenticated import after verifying artifacts.
|
|
83
86
|
```
|
|
84
87
|
|
|
85
88
|
## Write your own
|
|
@@ -61,7 +61,7 @@ UID, socket and interface in sudoers. Only add engagement interfaces after
|
|
|
61
61
|
operator review. CAP_NET_ADMIN is reserved for future neighbor management;
|
|
62
62
|
current operations need CAP_NET_RAW, while neighbor queries are read-only.
|
|
63
63
|
|
|
64
|
-
Ruby API (
|
|
64
|
+
Ruby API (the central plugin namespace autoloads CapabilityBroker):
|
|
65
65
|
|
|
66
66
|
```ruby
|
|
67
67
|
require 'pwn/plugins/capability_broker'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Configuration - `~/.pwn/pwn.yaml`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Provider and plugin configuration lives in **one encrypted YAML file**, loaded by
|
|
4
4
|
`PWN::Config.refresh_env` at driver startup and exposed in-process as the
|
|
5
|
-
|
|
5
|
+
constant **`PWN::Env`** (whose nested settings are mutable) (a redacted copy is available as
|
|
6
6
|
`PWN::EnvRedacted`).
|
|
7
7
|
|
|
8
8
|
The file is **AES-encrypted at rest** by `PWN::Plugins::Vault`. Its key/IV
|
|
@@ -146,7 +146,7 @@ ai:
|
|
|
146
146
|
escalation_persona: escalator # Swarm persona for a 3-line corrective hint after enough in-turn failures. nil = disabled.
|
|
147
147
|
local_introspect: failure_only # End-of-turn auto_introspect policy for local engines: always | failure_only | every_n.
|
|
148
148
|
policy: true # Live tabular Q / REINFORCE. Advisory only; never replaces TaskSummarizer / plan_first. false disables.
|
|
149
|
-
toolsets: ~ # Allow-list of toolsets exposed to the agent. nil = all. Valid: cron, curriculum, extrospection, learning, memory, metrics, policy, pwn, reward, sessions, skills, swarm, terminal.
|
|
149
|
+
toolsets: ~ # Allow-list of toolsets exposed to the agent. nil = all. Valid: cron, curriculum, extrospection, http, learning, manifest, mcp, memory, metrics, policy, pwn, reward, sessions, skills, swarm, terminal.
|
|
150
150
|
extrospection:
|
|
151
151
|
web:
|
|
152
152
|
anchors: # URLs the headless browser fingerprints on extro_snapshot(sections:[:web]). Alias: web_anchors.
|
|
@@ -230,16 +230,17 @@ plugins:
|
|
|
230
230
|
active: LongFast # Which named channel block below `pwn-mesh` uses for TX/RX.
|
|
231
231
|
LongFast: # Channel definition - name is arbitrary, referenced by `active:` above.
|
|
232
232
|
psk: 'AQ==' # Channel pre-shared key (base64). 'AQ==' = Meshtastic default public key. Redacted.
|
|
233
|
-
region: US/UT #
|
|
233
|
+
region: US/UT # Opaque MQTT topic prefix, NOT a firmware regulatory-band selector.
|
|
234
234
|
topic: 2/e/# # MQTT topic filter to subscribe/publish for this channel.
|
|
235
|
-
channel_num: 8 #
|
|
235
|
+
channel_num: 8 # Legacy channel metadata, NOT a radio slot.
|
|
236
|
+
radio_index: 0 # Explicit enabled radio slot when needed; verify device configuration.
|
|
236
237
|
from: '!deadbeef' # Sender node id used on outbound packets. Optional - defaults to !<mqtt client_id>.
|
|
237
238
|
short_name: # Optional display name for that from node. When set, it replaces the last four bytes of from.
|
|
238
239
|
PWN: # Example second (private) channel definition.
|
|
239
240
|
psk: ... # Private channel pre-shared key (base64). Redacted.
|
|
240
|
-
region: US/UT #
|
|
241
|
+
region: US/UT # Opaque MQTT topic prefix for this channel.
|
|
241
242
|
topic: 2/e/PWN/# # MQTT topic filter for this channel.
|
|
242
|
-
channel_num: 99 #
|
|
243
|
+
channel_num: 99 # Legacy metadata; use radio_index for an explicit enabled device slot.
|
|
243
244
|
shodan:
|
|
244
245
|
api_key: ... # Shodan API key - passed as api_key: to PWN::Plugins::Shodan.*. Redacted.
|
|
245
246
|
|
|
@@ -279,6 +280,13 @@ PWN::Config.refresh_env
|
|
|
279
280
|
|
|
280
281
|
## Full key reference
|
|
281
282
|
|
|
283
|
+
The Consumed by column includes private implementation helpers (for example
|
|
284
|
+
Loop `plan_first`/`escalate` and Extrospection probes), not only public APIs.
|
|
285
|
+
Use module `.help` for callable entry points. This annotated example is not a
|
|
286
|
+
verbatim copy of every runtime default; the installed `Config.env_template` is
|
|
287
|
+
the default schema, and migrations preserve existing operator values.
|
|
288
|
+
|
|
289
|
+
|
|
282
290
|
### `ai` - AI engines & agent loop
|
|
283
291
|
|
|
284
292
|
| Key path | Type | Default | Consumed by | Purpose |
|
|
@@ -291,7 +299,7 @@ PWN::Config.refresh_env
|
|
|
291
299
|
| `ai.<engine>.system_role_content` | String | ethical-hacker persona | `PWN::AI::Agent::PromptBuilder`, `PWN::Plugins::REPL` | Base system prompt prepended to MEMORY / SKILLS / LEARNING / EXTROSPECTION blocks. |
|
|
292
300
|
| `ai.<engine>.temp` | Float | `1.0` | `PWN::AI::<Engine>.chat` | Sampling temperature. |
|
|
293
301
|
| `ai.<engine>.max_prompt_length` | Integer | per-engine | `PWN::AI::<Engine>`, `PWN::Plugins::REPL` | Soft input-context ceiling used for prompt truncation / chunking. |
|
|
294
|
-
| `ai.anthropic.max_tokens` | Integer | `8192` | `PWN::AI::Anthropic.
|
|
302
|
+
| `ai.anthropic.max_tokens` | Integer | `8192` | `PWN::AI::Anthropic.chat_with_tools` | Max **output** tokens per response. Raise if tool-call JSON truncates. |
|
|
295
303
|
| `ai.openai.max_tokens` | Integer | `16384` | `PWN::AI::OpenAI.chat` | Max **output** tokens per response. Mapped to OpenAI's wire param `max_completion_tokens` (legacy env key `max_completion_tokens` still accepted). |
|
|
296
304
|
| `ai.ollama.embed_model` | String | provider default | `PWN::MemoryIndex` | Local embedding model tag used to build `~/.pwn/memory.idx` for **relevance-ranked** MEMORY injection. Falls back to substring recall when unset / unreachable. |
|
|
297
305
|
| `ai.ollama.num_ctx` | Integer | `32768` | `PWN::AI::Ollama.chat_with_tools` | Context window sent as `options.num_ctx` on the native `/api/chat` call. Ollama's own default (2048) truncates the pwn-ai system prompt. |
|
|
@@ -324,7 +332,7 @@ PWN::Config.refresh_env
|
|
|
324
332
|
| `ai.agent.max_depth` | Integer | `3` | `PWN::AI::Agent::Swarm` | Recursion guard for `agent_ask` / `agent_debate` sub-agents spawning sub-agents. |
|
|
325
333
|
| `ai.agent.auto_introspect` | Boolean | `true` | `PWN::AI::Agent::Learning.auto_introspect` | Run outcome logging + lesson mining after every final answer. Toggle live via `learning_auto_introspect_toggle`. |
|
|
326
334
|
| `ai.agent.auto_extrospect` | Boolean | `true` | `PWN::AI::Agent::Extrospection.auto_extrospect` | Ambient baseline after every final answer (`AUTO_SECTIONS` = host/repo/env only; never spawns GUI/JVM tools). Sense tools (`intel`/`verify`/`watch`/`rf_tune`/`observe`) stay on-demand. Toggle live via `extro_auto_toggle`. |
|
|
327
|
-
| `ai.agent.toolsets` | Array\<String\> \| `nil` | `nil` (all) | `bin/pwn`, `PWN::Plugins::REPL`, `PWN::AI::Agent::Registry` | Allow-list of toolsets exposed to the agent. Valid: `cron`, `curriculum`, `extrospection`, `learning`, `memory`, `metrics`, `policy`, `pwn`, `reward`, `sessions`, `skills`, `swarm`, `terminal`. |
|
|
335
|
+
| `ai.agent.toolsets` | Array\<String\> \| `nil` | `nil` (all) | `bin/pwn`, `PWN::Plugins::REPL`, `PWN::AI::Agent::Registry` | Allow-list of toolsets exposed to the agent. Valid: `cron`, `curriculum`, `extrospection`, `http`, `manifest`, `mcp`, `learning`, `memory`, `metrics`, `policy`, `pwn`, `reward`, `sessions`, `skills`, `swarm`, `terminal`. |
|
|
328
336
|
| `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. |
|
|
329
337
|
| `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. |
|
|
330
338
|
| `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`. |
|
|
@@ -336,12 +344,12 @@ PWN::Config.refresh_env
|
|
|
336
344
|
| `ai.agent.critic` | Boolean \| `nil` | `nil` (auto: on for remote, off for ollama) | `PWN::AI::Agent::Curriculum.critic` | Tool-armed constitutional self-critic reviews (and may `shell`/`extro_verify`) every final answer before it is returned. |
|
|
337
345
|
| `ai.agent.red_team_plan` | Boolean \| `nil` | `nil` (auto: on for remote, off for ollama) | `PWN::AI::Agent::Curriculum.red_team_plan` | Adversarial review of the `plan_first` numbered plan, grounded in Metrics/Mistakes/`extro_drift` telemetry, before the first dispatch. |
|
|
338
346
|
| `ai.agent.counterfactual` | Boolean \| `nil` | `nil` (auto: on for remote, off for ollama) | `PWN::AI::Agent::Curriculum.counterfactual` | On `[REPEATING]`, fork an alt-persona branch, judge both, and record the `(loser, winner)` DPO preference pair. |
|
|
339
|
-
| `ai.agent.hindsight` | Boolean | `true` | `PWN::AI::Agent::Curriculum.hindsight` | Hindsight Experience Replay -
|
|
347
|
+
| `ai.agent.hindsight` | Boolean | `true` | `PWN::AI::Agent::Curriculum.hindsight` | Hindsight Experience Replay - record what a failed trajectory did accomplish as `success: 'soft'`; excluded from hard supervised success export. |
|
|
340
348
|
| `ai.agent.policy` | Boolean | `true` | `PWN::AI::Agent::Policy` | Live tabular Q-learning + REINFORCE. Records `(s,a,r,s')` per tool step, trains on `Reward.judge` at episode end, and adds a small Q-advantage term to `Registry.rank`. Advisory only: never replaces TaskSummarizer or plan_first. |
|
|
341
349
|
| `ai.agent.reward_llm` | Boolean \| `nil` | `nil` (auto: on for remote, off for ollama) | `PWN::AI::Agent::Reward.judge` / `.prm` | Use a cheap LLM teacher for outcome/process judges even when `module_reflection` is false. Local ollama stays heuristic unless this is `true`. |
|
|
342
350
|
| `ai.agent.reward_model` | String \| `nil` | `nil` | `Reward.judge` / `.prm` | Optional cheaper model id for the ORM/PRM chat. Falls back to `ai.reflect_model`, then the active engine default. |
|
|
343
351
|
| `ai.agent.reward_llm_timeout` | Integer | `12` | `Reward.judge` / `.prm` | Seconds for the cheap ORM chat (clamped 2..30). Fail fast to the overlap heuristic rather than a 900s hang. |
|
|
344
|
-
| `ai.agent.verify_as_reward` | Boolean \| `nil` | `nil` (auto: ~10% local / always frontier when a claim matches) | `PWN::AI::Agent::Reward.verify_as_reward` | Ground the LLM judge score by browser-verifying any checkable claim in the final via `extro_verify`;
|
|
352
|
+
| `ai.agent.verify_as_reward` | Boolean \| `nil` | `nil` (auto: ~10% local / always frontier when a claim matches) | `PWN::AI::Agent::Reward.verify_as_reward` | Ground the LLM judge score by browser-verifying any checkable claim in the final via `extro_verify`; refutation can cap the judge; one confirmed claim cannot establish whole-request completion. |
|
|
345
353
|
| `ai.agent.extrospection.web.anchors` | Array\<String\> | `DEFAULT_WEB_ANCHORS` | `PWN::AI::Agent::Extrospection.probe_web` | URLs the headless browser fingerprints on `extro_snapshot(sections:[:web])`. Alias: `web_anchors`. |
|
|
346
354
|
| `ai.agent.extrospection.web.proxy` | String | - | `Extrospection.probe_web` / `.verify` / `.watch` | Upstream proxy for `PWN::Plugins::TransparentBrowser` (e.g. `tor`, `http://127.0.0.1:8080`). |
|
|
347
355
|
| `ai.agent.extrospection.web.max_anchors` | Integer | `8` | `Extrospection.probe_web` | Cap on anchors rendered per snapshot. |
|
|
@@ -400,9 +408,9 @@ PWN::Config.refresh_env
|
|
|
400
408
|
| `plugins.meshtastic.mqtt.ack_timeout` | Integer | `5` | `pwn-mesh` | Optional MQTT ack timeout seconds. |
|
|
401
409
|
| `plugins.meshtastic.channel.active` | String | `LongFast` | `pwn-mesh` | Which named channel block below is used for TX/RX. |
|
|
402
410
|
| `plugins.meshtastic.channel.<NAME>.psk` | String (b64) | `AQ==` | `pwn-mesh` | Channel pre-shared key. |
|
|
403
|
-
| `plugins.meshtastic.channel.<NAME>.region` | String | - | `pwn-mesh` |
|
|
411
|
+
| `plugins.meshtastic.channel.<NAME>.region` | String | - | `pwn-mesh` | Complete opaque MQTT prefix (e.g. `US/UT`), not the firmware regulatory region. |
|
|
404
412
|
| `plugins.meshtastic.channel.<NAME>.topic` | String | - | `pwn-mesh` | MQTT topic filter to subscribe/publish (e.g. `2/e/#`). |
|
|
405
|
-
| `plugins.meshtastic.channel.<NAME>.channel_num` | Integer | - | `pwn-mesh` |
|
|
413
|
+
| `plugins.meshtastic.channel.<NAME>.channel_num` | Integer | - | `pwn-mesh` | Legacy channel metadata, not a radio slot; use `radio_index` or resolved device channel metadata. |
|
|
406
414
|
| `plugins.meshtastic.channel.<NAME>.from` | String | `!<mqtt client_id>` | `pwn-mesh` | Sender node id used on outbound packets. |
|
|
407
415
|
| `plugins.meshtastic.channel.<NAME>.short_name` | String | - | `pwn-mesh` | Optional short name for that `from` node. A non-empty value is shown instead of the last four bytes of `from`. |
|
|
408
416
|
| `plugins.shodan.api_key` | String | - | `PWN::Plugins::Shodan` | Shodan API key (passed as `api_key:` to `Shodan.*`). |
|
|
@@ -458,8 +466,8 @@ agent system prompt.
|
|
|
458
466
|
|
|
459
467
|
## Related files under `~/.pwn/`
|
|
460
468
|
|
|
461
|
-
`pwn.yaml` is the
|
|
462
|
-
state. See **[Persistence](Persistence.md)** for the full map
|
|
469
|
+
`pwn.yaml` is edited through the vault UI. Personas and SOP skills have
|
|
470
|
+
separate operator-editable files; other files include machine-written state. See **[Persistence](Persistence.md)** for the full map
|
|
463
471
|
(`.schema`, `memory.json`, `memory.idx`, `learning.jsonl`,
|
|
464
472
|
`preferences.jsonl`, `mistakes.json`, `metrics.json`,
|
|
465
473
|
`reward_sentinel.json`, `extrospection.json`, `sessions/`,
|
|
@@ -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/ # 107 top-level plugin autoloads
|
|
10
10
|
lib/pwn/ai/agent/ # agent core
|
|
11
11
|
lib/pwn/ai/agent/tools/ # LLM tool registrations
|
|
12
|
-
bin/ #
|
|
12
|
+
bin/ # 56 executables: 53 pwn_* drivers + pwn / pwn-ai / pwn-capd (incl. pwn_setup)
|
|
13
13
|
spec/ # RSpec (incl. conventions_spec)
|
|
14
14
|
documentation/ # this wiki + diagrams
|
|
15
15
|
```
|
|
@@ -25,7 +25,7 @@ documentation/ # this wiki + diagrams
|
|
|
25
25
|
## Quality gates
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
rake
|
|
28
|
+
bundle exec rake # RSpec, RuboCop, then RDoc; await the actual exit status
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
(`rvmsudo rake` on multi-user RVM installs.)
|
data/documentation/Cron.md
CHANGED
|
@@ -36,7 +36,7 @@ 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`
|
|
39
|
+
`pwn setup --migrate` and first-launch default installation seed six jobs into a fresh
|
|
40
40
|
`~/.pwn/cron/jobs.yml` via `PWN::Cron.install_defaults`:
|
|
41
41
|
|
|
42
42
|
| Name | Schedule | Enabled | Ruby |
|
|
@@ -44,11 +44,12 @@ does not remove existing per-job lines.
|
|
|
44
44
|
| `curriculum_practice_nightly` | `0 3 * * *` | **no** | `Curriculum.practice(limit: 3)` - opt-in; runs `Loop.run` with real tools |
|
|
45
45
|
| `curriculum_offline_judge` | `30 3 * * *` | **no** | `Curriculum.offline_judge(...)` - opt-in; spends API tokens |
|
|
46
46
|
| `curriculum_train_weekly` | `0 4 * * 0` | **no** | `Curriculum.train_and_gate(dry_run: true)` - opt-in; needs trainer+GPU to actually train |
|
|
47
|
+
| `session_cleanup` | `45 3 * * *` | **yes** | Guarded unsummarized-session cleanup with backups, dependency checks and activity leases; see [Installation](Installation.md) |
|
|
47
48
|
| `learning_consolidate_nightly` | `0 5 * * *` | **yes** | `Learning.consolidate` - memory GC |
|
|
48
49
|
| `pwn_stores_lean_nightly` | `15 5 * * *` | **yes** | `Learning.gc_stores!` - lean memory, learning.jsonl, mistakes, policy, sessions |
|
|
49
50
|
|
|
50
51
|
- **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
|
|
52
|
+
- **consolidate + lean + session cleanup** stay on: they operate on local `~/.pwn` state; cleanup can delete eligible transcripts after verified backups and guards, so the injected MEMORY / LEARNING / session tail stays high-signal.
|
|
52
53
|
|
|
53
54
|
- **practice** - top unresolved `Mistakes` under `Reward.judge`; auto-`resolve` with ≥2 holdouts
|
|
54
55
|
- **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
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
cd documentation/diagrams && ./build.sh
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Diagrams distinguish implemented control/data paths from illustrative operator
|
|
12
|
+
workflows. Cross-links and feedback can cross visually; Graphviz ranking is not
|
|
13
|
+
a dependency guarantee. External services/radios require separate live verification.
|
|
13
14
|
|
|
14
15
|
---
|
|
15
16
|
|
|
@@ -23,7 +24,7 @@ groups) so lines never criss-cross.
|
|
|
23
24
|
[source](diagrams/dot/persistence-filesystem.dot) · doc: [Persistence](Persistence.md)
|
|
24
25
|

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

|
|
29
30
|
|
|
@@ -96,6 +97,11 @@ groups) so lines never criss-cross.
|
|
|
96
97
|
|
|
97
98
|
## 4 · Security Workflows
|
|
98
99
|
|
|
100
|
+
These diagrams show operator-composed workflows, not automatic call chains or
|
|
101
|
+
proof that the named service is available. In particular, SDK wrappers need
|
|
102
|
+
explicit credentials, scanners produce leads, and exports/imports are separate
|
|
103
|
+
operations. See [Operability](Operability.md).
|
|
104
|
+
|
|
99
105
|
### End-to-End Penetration Test
|
|
100
106
|
[source](diagrams/dot/penetration-testing-workflow.dot)
|
|
101
107
|

|
data/documentation/Drivers.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Drivers - Turn a REPL Session into a Shipped Binary
|
|
2
2
|
|
|
3
3
|
A **driver** is a small executable in `bin/` that wires `OptionParser` to one
|
|
4
|
-
or more `PWN::` calls.
|
|
5
|
-
|
|
4
|
+
or more `PWN::` calls. The example below is a minimal pattern, not a claim
|
|
5
|
+
that every driver has the same options or implementation.
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
@@ -11,7 +11,8 @@ or more `PWN::` calls. All 53 shipped `pwn_*` binaries follow the same
|
|
|
11
11
|
1. **Prototype in the REPL** until the calls work.
|
|
12
12
|
2. `history` → copy the winning lines.
|
|
13
13
|
3. Drop them into the template below as `bin/pwn_<name>`.
|
|
14
|
-
4. `chmod +x bin/pwn_<name
|
|
14
|
+
4. `chmod +x bin/pwn_<name>`; track it in Git for gemspec discovery and test it
|
|
15
|
+
before `bundle exec rake install`. Do not commit or publish without review.
|
|
15
16
|
5. (Optional) `learning_distill_skill(name: '<name>')` so the agent knows the
|
|
16
17
|
procedure too.
|
|
17
18
|
|
|
@@ -23,6 +24,8 @@ or more `PWN::` calls. All 53 shipped `pwn_*` binaries follow the same
|
|
|
23
24
|
|
|
24
25
|
require 'optparse'
|
|
25
26
|
require 'pwn'
|
|
27
|
+
require 'json'
|
|
28
|
+
require 'fileutils'
|
|
26
29
|
|
|
27
30
|
opts = {}
|
|
28
31
|
OptionParser.new do |o|
|
|
@@ -33,9 +36,12 @@ end.parse!
|
|
|
33
36
|
|
|
34
37
|
raise OptionParser::MissingArgument, '-t' unless opts[:target]
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
raise OptionParser::MissingArgument, '-o' unless opts[:out]
|
|
40
|
+
FileUtils.mkdir_p(opts[:out])
|
|
41
|
+
xml = File.join(opts[:out], 'scan.xml')
|
|
42
|
+
PWN::Plugins::NmapIt.port_scan(targets: opts[:target], xml: xml)
|
|
43
|
+
result = PWN::Plugins::NmapIt.inventory(xml_file: xml)
|
|
44
|
+
puts JSON.pretty_generate(result)
|
|
39
45
|
```
|
|
40
46
|
|
|
41
47
|
## Three artifact types from one REPL session
|
|
@@ -7,6 +7,25 @@ say when I need it for a better answer?"*
|
|
|
7
7
|
|
|
8
8
|
**Primary intent = sense tools on demand**, not ambient inventory of the local host.
|
|
9
9
|
|
|
10
|
+
## Evidence boundaries and living off the land
|
|
11
|
+
|
|
12
|
+
`PWN::Plugins::DetectOS.living_off_the_land` inventories executable names on PATH
|
|
13
|
+
plus present optional `bins:` in `native`, and reports OS/architecture,
|
|
14
|
+
raw-socket capability and Docker observations. `PromptBuilder` adds its summary
|
|
15
|
+
to the HOST block as `LIVING OFF THE LAND`. This is local capability evidence,
|
|
16
|
+
not permission, proof of tool health, or a reason to install missing software
|
|
17
|
+
automatically. Tests can supply `which:` to replace PATH discovery, plus explicit OS, capability
|
|
18
|
+
and Docker fixtures to avoid other host reads. Only the OS summary is injected
|
|
19
|
+
from this API; PreflightChecker supplies separate plugin-health information.
|
|
20
|
+
|
|
21
|
+
Extrospection supplies observations and correlation candidates, not causal proof
|
|
22
|
+
or whole-request completion. `extro_verify` uses source-specific heuristics;
|
|
23
|
+
token overlap and a reachable page cannot establish arbitrary factual truth.
|
|
24
|
+
Confirmed claims cannot override failed host acceptance checks. Feed entries
|
|
25
|
+
below describe implemented adapters, not currently verified endpoint availability
|
|
26
|
+
or access entitlements. RF tuning, serial writes, calls and packet capture are
|
|
27
|
+
active operations; this documentation audit did not exercise them.
|
|
28
|
+
|
|
10
29
|
| You need... | Call... |
|
|
11
30
|
|---|---|
|
|
12
31
|
| Weather / public page content | `extro_watch` / `extro_verify` / TransparentBrowser |
|
|
@@ -104,7 +123,7 @@ Override / extend via `PWN::Env[:ai][:agent][:extrospection][:web][:anchors]`; s
|
|
|
104
123
|
(g) :intel obs whose feed anchor is × probe_web-unreachable → downgrade weight
|
|
105
124
|
```
|
|
106
125
|
|
|
107
|
-
Output
|
|
126
|
+
Output suggests whether a failure may be **its own fault** ("I called the
|
|
108
127
|
API wrong" → belongs in [Mistakes](Mistakes.md)) or **the world changed**
|
|
109
128
|
("nmap was upgraded and the flag moved", "the HackRF was unplugged") - and
|
|
110
129
|
that distinction is written back into MEMORY so the next run doesn't waste
|
|
@@ -112,8 +131,9 @@ iterations rediscovering it.
|
|
|
112
131
|
|
|
113
132
|
## `extro_verify` - proactive fact-checking (the browser as a sense organ)
|
|
114
133
|
|
|
115
|
-
`probe_rf`
|
|
116
|
-
|
|
134
|
+
`probe_rf` inventories interfaces; `extro_rf_tune` tunes and samples RDS.
|
|
135
|
+
`extro_verify(claim:)` attempts browser rendering, with a REST fallback that does
|
|
136
|
+
not execute JavaScript, and returns a heuristic verdict:
|
|
117
137
|
|
|
118
138
|
| `kind:` | Canonical source (rendered headless) | Verdict logic |
|
|
119
139
|
|---|---|---|
|
|
@@ -254,7 +274,7 @@ unreachable endpoints return `{error:...}` instead of raising.
|
|
|
254
274
|
| `:agify` / `:genderize` / `:nationalize` | agify.io · genderize.io · nationalize.io | First-name age/gender/nationality estimates |
|
|
255
275
|
| `:haveibeenpwned` | haveibeenpwned.com v3 | Breach membership - **needs** `HIBP_API_KEY` |
|
|
256
276
|
| `:securitytrails` | api.securitytrails.com | Domain DNS history - **needs** `SECURITYTRAILS_API_KEY` |
|
|
257
|
-
| `:keybase` | keybase.io lookup API |
|
|
277
|
+
| `:keybase` | keybase.io lookup API | Service-reported proof metadata/cross-links; not independent local cryptographic verification or proof of real-world identity |
|
|
258
278
|
| `:gravatar` | gravatar.com profile JSON | email → md5 → username, verified accounts, bio, urls |
|
|
259
279
|
| `:mastodon` | `<instance>/api/v1/accounts/lookup` + WebFinger | Fediverse identity; instance defaults to `mastodon.social` |
|
|
260
280
|
| `:bluesky` | public.api.bsky.app `getProfile` | DID, handle, followers, bio |
|
|
@@ -452,7 +472,7 @@ cron_create(name: 'memory_revalidate', schedule: '0 4 * * 0',
|
|
|
452
472
|
|
|
453
473
|
```ruby
|
|
454
474
|
PWN::Env[:ai][:agent][:extrospection][:web] = {
|
|
455
|
-
anchors: ['https://target.
|
|
475
|
+
anchors: ['https://target.example.com/api/version'], # else DEFAULT_WEB_ANCHORS
|
|
456
476
|
proxy: 'tor', # or 'http://127.0.0.1:8080' (Burp) - honored by verify/watch/probe_web
|
|
457
477
|
max_anchors: 8,
|
|
458
478
|
per_page_timeout: 15,
|