ソース情報
- リポジトリ
- DataDog/pathrunner
- ソースの最終更新活動
- 2026年7月8日 11:12
- 検出された SKILL.md の言語
- 英語
- スター
- 3
- フォーク
- 0
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
SOC 職業分類に基づく
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/DataDog/pathrunner --skill create-moduleコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SKILL.md を表示中
Batch-create pathrunner exploit modules from a list of pathfinding-labs coverage gaps, using a rolling pool of concurrent sub-agents that enable → build → test → disable each lab. Verify stage iteratively fixes pathrunner-side failures (default budget 5 per module). Uses multi-agent orchestration.
Clean up AWS resources after testing a pathrunner module against a pathfinding-labs scenario
List pathfinding-labs scenarios that don't have pathrunner modules yet
| name | create-module |
| description | Create a new pathrunner exploit module from pathfinding.cloud path definition |
| argument-hint | <pathfinding-cloud-id> (e.g., ecs-001, iam-014, lambda-002) |
You are creating a new pathrunner exploit module. The user has provided a pathfinding-cloud ID (e.g., ecs-001). Your job is to:
Read these files to understand the attack path. Extract the service from the ID (e.g., lambda from lambda-002).
You MUST read all four files before proceeding to Step 1:
../pathfinding.cloud/data/paths/{service}/{id}.yaml (relative to the pathrunner repo root) and Read itscenario.yaml by searching for the ID in ../pathfinding-labs/modules/scenarios/, then Read itdemo_attack.sh from the same scenario directory found in step 2cleanup_attack.sh from the same scenario directory found in step 2Before any AWS-touching work, verify the SSO profiles you'll need are still alive. Both plabs and pathrunner's attacker identity commonly use short-term SSO profiles that expire silently.
./scripts/check-sso.sh plabs
If any profile shows FAIL/EXPIRED, tell the user which and stop — they need to run aws sso login --profile <name> interactively before you can proceed. Do NOT try to work around expired SSO by using SKIP_SSO_CHECK=1 unless the user explicitly asks.
If the module will use attacker infra (any revshell/*, exfil/https, exfil/s3, or a Glue-style module uploading to the attacker code bucket), also verify the attacker profile: ./scripts/check-sso.sh check <attacker-profile-name>. Discover the profile name via ./pathrunner attacker show.
ecs from ecs-001)grep -r '"$ARGUMENTS"' pkg/exploits/CRITICAL: The demo_attack.sh script is the most important source of operational knowledge. It contains battle-tested timing, retry logic, and payload behavior that MUST be reflected in the module. Extract and document ALL of the following before writing any code:
sleep commands exist and what are they waiting for? (e.g., function initialization, policy propagation, event source mapping activation)MAX_ATTEMPTS=30 * sleep 10 = 5 minutes)iam.attach_user_policy, iam.create_role, sts.get_caller_identity)exfil/output that rely on capturing the function response will NOT work.exfil/output payloads work fine.aws dynamodb describe-table to get stream ARN)Verifiable interface so the module can confirm the payload executed. The verification method should test the payload's effect using the starting user's credentials (e.g., call iam:ListUsers to check if admin policy was attached).CLEANUP to "false" and advise using workspace cleanup with admin credentialsThe payload registry is modular and service-scoped: payloads live under pkg/payloads/{service}/ (ec2/, lambda/, glue/), self-register in init(), and are queried by tag (payloads.GetPayloadsByTags, payloads.GetPayloadForService). Same logical name (e.g., backdoor/attach-policy) can exist under multiple services — the composite (service, name) key disambiguates. Your module doesn't enumerate specific payloads; it declares service tags via GetCompatibleTags() and every registered payload for that service becomes selectable.
pkg/payloads/{service}/ directory existsexfil/response from the recommended payloads since there's no caller to receive the responseLISTENER_IP, HTTPS_URL, EXFIL_BUCKET, etc.) and pathrunner auto-populates them from the running listener / deployed bucket. See payload-patterns.md for the auto-inject contract.Rather than assembling the module from a list of rules, copy the canonical module for your category and adapt it. The canonicals below are known-good, tested, and idiomatic — they demonstrate the current signatures (modules.ExecutionContext), the shared.PayloadHelper for tag-based payload wiring, resource tracking, side-effect tracking, and (where applicable) attacker-infra integration. Read the canonical end-to-end before writing anything.
| Your module's shape | Canonical to copy | Read it because it demonstrates |
|---|---|---|
| new-passrole — provision a fresh compute resource with a privileged role and run a payload on it | pkg/exploits/ec2_passrole/module.go (ec2-001) | shared.NewPayloadHelper(serviceTag, langTag) for one-line payload wiring, Discoverable for AWS-side option enumeration, auto-detection of infra defaults (AMI, VPC, subnet), tracking the created compute resource, tracking payload SideEffectReporter output, ExecutionContext signature |
| existing-passrole — modify an existing resource's code/config to inherit its role's permissions | pkg/exploits/lambda_updatecode_addpermission/module.go (lambda-005) | Backing up original state before mutating so cleanup can restore it, injecting payload params directly into the generated code when the AWS API can't set env vars, tracking a policy/permission grant separately from the code change, handler-name adaptation, waiting for propagation only when the payload takes IAM action (SideEffectReporter check), CLEANUP defaulting to true because the caller can reverse everything |
| new-passrole with attacker code artifacts — payload must be hosted somewhere the victim service can fetch it from (Glue script, CodeBuild source, etc.) | pkg/exploits/glue_passrole_job/module.go (glue-003) | Using ectx.AttackerIdentity (separate from victim identity) to upload payload script to attacker.GetCodeBucketInfo() bucket, namespacing uploads under a per-run S3 prefix and cleaning them up (but leaving the bucket itself since it's persistent attacker infra), auto-populating EXFIL_BUCKET from attacker.GetExfilBucket(), auto-resolving TARGET_USER from the caller identity, passing payload options via job arguments (Glue DefaultArguments), verifying via the payload's Verifiable interface |
For categories not covered by those three canonicals — self-escalation, principal-access, credential-access, event-triggered new-passrole — grep pkg/exploits/*/module.go for the closest existing module in the same category and use it as your starting point. iam_* directories are all self-escalation or two-step; sts_assume_role/ is principal-access; lambda_passrole_esm/ is event-triggered new-passrole. If nothing quite matches, start from the closest canonical above and diverge only where the path genuinely demands it.
Once you've read the canonical, create pkg/exploits/{service}_{technique}/module.go by copying its shape and editing:
PathInfo — populate from the YAML (ID, Name, Category, Services, Description, Permissions, Prerequisites, References, MITRE, Aliases)Options() — derive from demo_attack.sh's parameters, mirroring the canonical's naming styleExecute() — translate demo_attack.sh's API calls, sleeps, retries, and verification into the canonical's flow. Use the demo's exact sleep durations and retry counts (they were calibrated through real testing).The supporting files (module-patterns.md, payload-patterns.md, checklist.md) are reference material for cross-cutting concerns (registration mechanics, attacker-infra auto-injection contract, payload interface semantics, post-creation checklist) — consult them when a specific concern comes up, but don't try to follow them linearly.
Only if Step 3 determined new payloads are needed. Rather than assembling from a rule list, copy the closest existing payload in the same service and adapt it:
pkg/payloads/{service}/backdoor_attach_policy.go and adjust the AWS API call and SideEffectReporter output; for a new out-of-band exfil, copy exfil_https.go or exfil_s3.go; for a new reverse shell, copy revshell_tls.go.pkg/payloads/{service}/{technique}_{method}.go; init() calls payloads.Register(&MyPayload{}). No wiring changes needed if the service directory already exists.pkg/payloads/ecs/…), add a blank import to cmd/pathrunner/main.go and add the service tag to pkg/payloads/tags.go.SideEffectReporter so the module can track modifications for cleanup (pkg/payloads/lambda/backdoor_attach_policy.go is the reference implementation).Verifiable so the module can confirm the effect via a follow-up API call (pkg/payloads/lambda/backdoor_attach_policy.go also demonstrates this).os.environ (Python) or job args; EC2 payloads read shell env. Never string-substitute values into the source at code-gen time.payload-patterns.md for the full contract.Check pkg/core/repl/session.go cleanupResource() switch statement.
If the module creates resource types not already handled:
Check demo_attack.sh AND cleanup_attack.sh to identify ALL resource types created:
init() function calls modules.Register("{id}", constructor) — the primary key must be the pathfinding.cloud ID.pkg/exploits/register.go is generated by scripts/gen_register.go (invoked via //go:generate in pkg/exploits/gen.go). Running make build — or go generate ./pkg/exploits/ — regenerates it and adds a blank import for your new directory. Do NOT edit cmd/pathrunner/main.go for a new exploit module.pkg/payloads/ecs/), add a blank import for it in cmd/pathrunner/main.go alongside the existing pkg/payloads/{ec2,lambda,glue} imports. Payloads within an existing service directory need no wiring changes — init() handles it.Run:
make build
make build runs go generate ./pkg/exploits/ before compiling, so it regenerates register.go and then builds. If you prefer raw Go commands, run go generate ./pkg/exploits/ && go build ./....
Fix any compilation errors.
Add unit tests in tests/unit/:
Add integration tests in tests/integration/:
use {service}-{number} worksshow info displays correct metadatasearch {service} finds the modulego test ./tests/...
Fix any test failures.
Run through the sibling checklist.md in this skill directory and confirm every item passes.
Report to the user:
{service}-{number} at pkg/exploits/{service}_{technique}/module.go/test-module <id> --iterate 5 to verify against real AWS. test-module will iterate up to 5 attempts on pathrunner-side failures (compile errors, wrong ARN parses, missing env vars, timing bugs) with hard-stops on lab-side or environmental failures.