
⚡ Führen Sie eine Subdomain-Enumeration mithilfe der Certificate-Transparency-Protokolle von Censys durch.
Wichtiger Hinweis: Seit Ende 2024 bietet Censys keinen API-Zugriff mehr für kostenlose Konten an.
Dies ist ein Tool zur Aufzählung von Subdomains mithilfe der Certificate-Transparency-Protokolle, die in Censys Search gespeichert sind. Es sollte alle Subdomains zurückgeben, für die jemals ein SSL-Zertifikat von einer öffentlichen Zertifizierungsstelle ausgestellt wurde.
Sieh es in Aktion:
$ python censys-subdomain-finder.py github.com
[*] Searching Censys for subdomains of github.com
[*] Found 42 unique subdomains of github.com in ~1.7 seconds
- hq.github.com
- talks.github.com
- cla.github.com
- github.com
- cloud.github.com
- enterprise.github.com
- help.github.com
- collector-cdn.github.com
- central.github.com
- smtp.github.com
- cas.octodemo.github.com
- schrauger.github.com
- jobs.github.com
- classroom.github.com
- dodgeball.github.com
- visualstudio.github.com
- branch.github.com
- www.github.com
- edu.github.com
- education.github.com
- import.github.com
- styleguide.github.com
- community.github.com
- server.github.com
- mac-installer.github.com
- registry.github.com
- f.cloud.github.com
- offer.github.com
- helpnext.github.com
- foo.github.com
- porter.github.com
- id.github.com
- atom-installer.github.com
- review-lab.github.com
- vpn-ca.iad.github.com
- maintainers.github.com
- raw.github.com
- status.github.com
- camo.github.com
- support.enterprise.github.com
- stg.github.com
- rs.github.com
Registrieren Sie ein kostenloses Konto auf https://search.censys.io/register
Gehen Sie auf https://search.censys.io/account und setzen Sie zwei Umgebungsvariablen mit Ihrer API-ID und Ihrem API-Secret:
export CENSYS_API_ID=...
export CENSYS_API_SECRET=...
Alternativ können Sie eine .env-Datei verwenden, um diese Werte für die dauerhafte Nutzung zu speichern:
cp .env.template .env
Bearbeiten Sie dann die .env-Datei und setzen Sie die Werte für CENSYS_API_ID und CENSYS_API_SECRET.
Klonen Sie das Repository:
git clone https://github.com/christophetd/censys-subdomain-finder.git
Installieren Sie die Abhängigkeiten in einer virtualenv:
cd censys-subdomain-finder
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Beispielverwendung:
python censys-subdomain-finder.py example.com
Geben Sie die Liste der Subdomains in eine Textdatei aus:
python censys-subdomain-finder.py example.com -o subdomains.txt
usage: censys-subdomain-finder.py [-h] [-o OUTPUT_FILE]
[--censys-api-id CENSYS_API_ID]
[--censys-api-secret CENSYS_API_SECRET]
domain
positional arguments:
domain The domain to scan
optional arguments:
-h, --help show this help message and exit
-o OUTPUT_FILE, --output OUTPUT_FILE
A file to output the list of subdomains to (default:
None)
--censys-api-id CENSYS_API_ID
Censys API ID. Can also be defined using the
CENSYS_API_ID environment variable (default: None)
--censys-api-secret CENSYS_API_SECRET
Censys API secret. Can also be defined using the
CENSYS_API_SECRET environment variable (default: None)
Sollte auf Python 3.7+ laufen.
Die Censys-API hat ein Limit von 120 Abfragen pro 5-Minuten-Fenster. Jeder Aufruf dieses Tools führt genau einen API-Aufruf an Censys durch.
Sie können gerne ein Issue eröffnen oder @christophetd twittern, um Vorschläge oder Anmerkungen zu machen.