
⚡ Censys의 인증서 투명성 로그를 사용하여 서브도메인 열거를 수행합니다.
중요 사항: 2024년 후반부터 Censys는 무료 계정에 API 액세스를 더 이상 제공하지 않습니다.
이 도구는 Censys Search에 저장된 인증서 투명성 로그를 사용하여 서브도메인을 열거합니다. 공개 CA에서 SSL 인증서를 발급받은 모든 서브도메인을 반환합니다.
실제 작동 모습:
$ 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
https://search.censys.io/register에서 계정을 등록합니다(무료).
https://search.censys.io/account로 이동하여 API ID와 API 시크릿으로 두 개의 환경 변수를 설정합니다:
export CENSYS_API_ID=...
export CENSYS_API_SECRET=...
또는 .env 파일을 사용하여 이러한 값을 여러 번 사용할 때 지속적으로 저장할 수 있습니다:
cp .env.template .env
그런 다음 .env 파일을 편집하여 CENSYS_API_ID 및 CENSYS_API_SECRET의 값을 설정합니다.
저장소를 클론합니다:
git clone https://github.com/christophetd/censys-subdomain-finder.git
가상 환경에 종속성을 설치합니다:
cd censys-subdomain-finder
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
사용 예시:
python censys-subdomain-finder.py example.com
서브도메인 목록을 텍스트 파일로 출력:
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)
Python 3.7+에서 실행되어야 합니다.
Censys API는 5분 윈도우당 120개 쿼리의 제한 속도가 있습니다. 이 도구의 각 호출은 Censys에 정확히 하나의 API 호출을 합니다.
제안이나 의견이 있으면 이슈를 열거나 트윗 @christophetd로 보내주세요.