Skip to main content

Collect DNS records from various DNS and cloud providers.

Project description

D-Collector

TLDR; D-Collector is a tool that fetches DNS records from various DNS management and cloud providers and normalize all records to a unified format.


Description

Most of the enterprises nowadays are using multiple different cloud providers and DNS registrars. That creates a fertile ground for shadow IT to grow and makes it extremely hard for information security teams to map, manage and scan their attack surface.

The above led us to create D-Collector. Now, we can continuously scan our infrastructure for security vulnerabilities and drastically reduce the risk of shadow IT.

Who is this tool for?

This tool has been created for IT and information security practitioners to easily automate their domains management and attack surface management.

How it works?

  • Provide D-Collector with your cloud providers API tokens/keys.
  • D-Collector to fetch all DNS records from the given cloud providers.
  • D-Collector to create a unified structured "domains.json" file with all the DNS records.
  • Harness the magic for your needs.

Installation

Prerequisites

  • Fill the relevant providers' environment variables (empty variables will be ignored):
    # Prisma® Cloud (by Palo Alto Networks)
    export PRISMA_API_KEYID = your-value-here
    export PRISMA_API_SECRET = your-value-here
    export PRISMA_URL = your-value-here
    
    # Cycognito (ASM product)
    export CY_KEY = your-value-here
    export CY_REALM = your-value-here
    
    # AWS (Route53)
    export AWS_ACCESS_KEY_ID = your-value-here
    export AWS_SECRET_ACCESS_KEY = your-value-here
    # (Optional) If needed to assume a primary role for Route53 access
    export AWS_ARN=your-value-here
    # (Optional) JSON file containing additional roles to assume
    # This file should contain a list of role ARNs for additional Route53 accounts or permissions. Example:
    #
    # [
    #   "arn:aws:iam::123456789012:role/Role1",
    #   "arn:aws:iam::123456789012:role/Role2"
    # ]
    export AWS_ARN_EXTRA_ROLES_FILE=/path/to/roles.json
    
    # GCP
    export GCP_PRIVATE_KEY_FILE = your-value-here
    export GCP_PROJECT = your-value-here
    
    # Digital Ocean
    export DG_TOKEN = your-value-here
    
    # A JSON file contains DNS records in domains fetcher's output format
    export STATIC_DOMAINS_FILE = your-value-here
    
  • Define your company's known internal domain suffixes for the tool to classify as private. E.g., .corp, .internal.
    # Internal domain suffixes list, e.g., ".corp", ".internal"
    # Example:
    # INTERNAL_DOMAIN_SUFFIXES = "['.internal','corp']"
    export INTERNAL_DOMAIN_SUFFIXES = your-value-here
    

PIP (recommended)

pip install d-collector

Manual

git clone https://github.com/Playtika/D-Collector.git
cd D-Collector
pip install .

Usage

Short Form Long Form Description
-h --help Show this help message and exit
-lp --list-providers Listing loaded providers

Examples

  • List loaded providers
    dcollector -lp
  • Pull domain names from providers
    dcollector

Output Example

Output domains file will be in the following format (JSON):

[{"name": "domain name", "record_type": "DNS type (CNAME,A)", "record_value": "value (ip,ec2 domain name)", "is_private": "false/true", "source": "provider/dns management tool"}]

Cloud Providers and Tools Support

  • Static domains from file
  • AWS (Supports primary role and additional roles via JSON file)
  • GCP
  • Digital Ocean
  • Prisma® Cloud (by Palo Alto Networks)
  • Cycognito (EASM product)

Roadmap

  • Support for more cloud providers and DNS registrars.

Contributing

Feel free to fork the repository and submit pull-requests.


License

License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

d_collector-0.10.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

D_Collector-0.10-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file d_collector-0.10.tar.gz.

File metadata

  • Download URL: d_collector-0.10.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for d_collector-0.10.tar.gz
Algorithm Hash digest
SHA256 3b8ff38c9b770135d49ae069355966fbb7b372e9aa8c01f596f9d38424c3cc29
MD5 79e3d30a5f933e88cb8fa47e690fa28a
BLAKE2b-256 95f619971e256f5735798ea64ca772cbceb7e88017cc128d5eb5ed2f58ce79a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for d_collector-0.10.tar.gz:

Publisher: publish-to-pypi.yml on PlaytikaOSS/D-Collector

Attestations:

File details

Details for the file D_Collector-0.10-py3-none-any.whl.

File metadata

  • Download URL: D_Collector-0.10-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for D_Collector-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 2f8eb1ff546aa7cb8276b1138d64de0249d40aca408fa4761381d645b3b0f949
MD5 b4acd4f9644014a6281b5362c42835fd
BLAKE2b-256 7761aa0d86faa2480b6f3d1b94f168867153d6295518be8b7ca4fc1e8b6c9bf0

See more details on using hashes here.

Provenance

The following attestation bundles were made for D_Collector-0.10-py3-none-any.whl:

Publisher: publish-to-pypi.yml on PlaytikaOSS/D-Collector

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page