feat(arsenal): subdomain takeover detection built-in - #134
Merged
Conversation
Pure, I/O-free detection logic split into src/arsenal/takeover.ts so it is fully unit-testable without DNS or network: - TAKEOVER_FINGERPRINTS: curated CNAME + unclaimed-resource-body signatures for 15 high-frequency services (S3, GitHub Pages, Heroku, Azure, Fastly, Shopify, Netlify, ...) - classifySubdomainTakeover(): conservative verdict (confirmed / potential / none) driven by a dangling CNAME and/or a service body fingerprint; no cross-service false matches - renderTakeoverReport(): human-readable output block
… count 108->109 - New keyless, self-contained built-in tool 'subdomain_takeover_check' (recon): resolves the CNAME, checks whether the target still resolves (dangling), fetches the live body via the scope-gated targetFetch, and classifies via classifySubdomainTakeover. Emits a real finding. - Added to the Recon operator's default toolkit so the swarm can reach it (operator-toolkits coverage invariant). - Bumped the advertised arsenal size 108 -> 109 in lockstep across the count-honesty test, README, and verify-claims (73 adapters + 36 built-in).
…cked DNS/fetch e2e) - classifySubdomainTakeover decision matrix: confirmed via body fingerprint, confirmed via dangling nxdomain-prone CNAME, potential (known service, no confirmation), potential (dangling unknown), none (no CNAME / resolves clean), and no cross-service false matching - renderTakeoverReport output shape - end-to-end handler test with DNS + fetch mocked, driving the confirmed S3 path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello again!
Why
The prompts already tell the agent to flag "subdomain takeover candidates (CNAME → unclaimed resource)", but no tool actually checked for them. This adds the missing instrument. Keyless, pure-Node, works out of the box like
dns_lookup.How
New
subdomain_takeover_checkbuilt-in (recon):confirmed / potential / none.Notes:
takeover.ts(classifySubdomainTakeover) → fully unit-tested, no network.Verify:
npm run build node -e "import('./dist/arsenal/index.js').then(async m=>{const t=m.BUILTIN_TOOLS.find(x=>x.name==='subdomain_takeover_check');console.log((await t.handler({parameters:{target:process.argv[1]}})).output)})" blog.example.comConfirmed path is covered end-to-end with DNS+fetch mocked in the test suite.
Commands run:
If anything needs to be looked at and fixed please ping me.