Some helper subdomain_takeover_tools to validate subdomain takeovers
Project description
Subdomain Takeover Tools
A set of tools to validate the initial outcome of subtake.
Installation
-
Install using pip:
pip install subdomain_takeover_tools
for windows:
py -m pip install subdomain_takeover_tools
Alternatively, you can download or clone this repo and call
pip install -e .
.
Confirming takeovers
All scripts support the following two parameters:
--strict
: only report as vulnerable if the issue is not also applicable onhostname.tld
andwww.hostname.tld
.--inverse
: do inverse reporting, so report all subdomains that are not vulnerable
Some scripts require a config file to be present, the location is .subdomain_takeover_tools.ini
, an example of the file can be found below:
[azure]
subscription_id=44713cf2-8656-11ec-a8a3-0242ac120002
Confirming S3
Subtake has some false positives on Google Cloud buckets as S3 buckets, also some access denied's end up in the results.
The script confirm-s3.py
will make sure that the bucket is actually vulnerable.
grep "\[s3 bucket: " subtake-output.txt | confirm_s3
Confirming ELB
Some patterns of elb are vulnerable while others are not, to filter them we can use our script:
grep "\[elasticbeanstalk: " subtake-output.txt | confirm_elb
Note: the parameter --strict
is accepted here but will not lead to expected results.
Confirming Shopify
It seems that
grep "\[shopify: " subtake-output.txt | confirm_shopify
Separate tools
Extracting domain names
As part of my process I want to know the domains involved in my findings.
Example usage:
cut -f3 < subtake-output.txt | extract_domain_names | sort -u > involved.domains
Note that extract_domain_names
also support groups, such as domain.(co.id|in.th|ph|vn)
, this will be expanded automatically.
Resolving from the authoritative DNS authority
For validation of the results I want to validate whether the DNS record is still accurate.
To do this we fetch the authoritative result's step by step from the authoritative DNS servers.
authoritative_resolve "github.com" "martinvw.nl"
Exporting and enriching
The subtake_enrich_and_export
will split the existing output and add some additional columms:
- has a wildcard
- domain name
- tld
- still vulnerable
- authoritative results
subtake_enrich_and_export < subtakee-output.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for subdomain_takeover_tools-0.17.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7bd140f76096254240afaa72f528c57af4d9c80e6a21ff3db013b7305fbb496 |
|
MD5 | f0e29634f87d94eebdb613bc5128b6ce |
|
BLAKE2b-256 | bdee66b5b857869318130668dcb342a360727339b28a05ef874ca3b00b27fa9d |
Hashes for subdomain_takeover_tools-0.17.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dedef787b4705467d21caa9bfc89fae47a5c6d214194924ab3b38cd0054e200 |
|
MD5 | c4fe21c593fd7a0d14890cb7c3f9bede |
|
BLAKE2b-256 | 5537a3e5b2caace97f94e59011a4f46d3fa2b83abb63a7831688ac5f56cc87ae |