리눅스

Sublist3r 설치하는 방법

코드버스 2023. 4. 12. 09:31
728x90
반응형

Sublist3r 설치하는 방법

Sublist3r은 Python으로 작성된 하위 도메인 탐지 도구입니다. Sublist3r을 설치하는 방법은 다음과 같습니다.

 

1. 파이썬 설치 확인

먼저, 시스템에 파이썬이 설치되어 있는지 확인합니다. Sublist3r은 파이썬 2.7.x와 3.x를 모두 지원하므로, 어느 버전의 파이썬이 설치되어 있는지 확인해야 합니다. 터미널에서 다음 명령어를 입력하여 파이썬 버전을 확인합니다.

python --version

 

2. Git 설치

Sublist3r을 설치하려면 Git이 필요합니다. Git이 설치되어 있는지 확인하려면 다음 명령어를 입력합니다.

Git이 설치되어 있지 않으면 해당 시스템에 맞는 Git을 설치합니다.

git --version

 

3. Sublist3r 다운로드

Sublist3r을 다운로드합니다. 터미널에서 다음 명령어를 입력합니다.

git clone https://github.com/aboul3la/Sublist3r.git

 

4. 의존성 설치

Sublist3r은 몇 가지 의존성 라이브러리를 필요로 합니다. 이러한 라이브러리를 설치하려면 다음 명령어를 입력합니다.

cd Sublist3r/
sudo pip install -r requirements.txt

 

5. Sublist3r 실행

Sublist3r을 실행하려면 다음 명령어를 입력합니다.

python sublist3r.py -h
$ python sublist3r.py -h
usage: sublist3r.py [-h] -d DOMAIN [-b [BRUTEFORCE]] [-p PORTS] [-v [VERBOSE]] [-t THREADS] [-e ENGINES] [-o OUTPUT]
                    [-n]

OPTIONS:
  -h, --help            show this help message and exit
  -d DOMAIN, --domain DOMAIN
                        Domain name to enumerate it's subdomains
  -b [BRUTEFORCE], --bruteforce [BRUTEFORCE]
                        Enable the subbrute bruteforce module
  -p PORTS, --ports PORTS
                        Scan the found subdomains against specified tcp ports
  -v [VERBOSE], --verbose [VERBOSE]
                        Enable Verbosity and display results in realtime
  -t THREADS, --threads THREADS
                        Number of threads to use for subbrute bruteforce
  -e ENGINES, --engines ENGINES
                        Specify a comma-separated list of search engines
  -o OUTPUT, --output OUTPUT
                        Save the results to text file
  -n, --no-color        Output without color

Example: python sublist3r.py -d google.com

위 명령어를 실행하면 Sublist3r의 도움말 메시지가 표시됩니다. 이제 Sublist3r을 사용하여 원하는 도메인의 하위 도메인을 찾을 수 있습니다.

 

sublist3r 실행

python sublist3r.py -d codeverse.kr

Virustotal API 키 발급

Virustotal API : https://www.virustotal.com

 

1. Virustotal 사이트에 가입하고 API 키를 발급받습니다. 발급받은 API 키는 Virustotal 계정 페이지에서 확인할 수 있습니다.

 

2. Sublist3r 폴더에서 "config.py" 파일을 열어서 "virustotal_api_key" 변수의 값을 설정합니다.

위에서 "YOUR_VIRUSTOTAL_API_KEY_HERE" 부분을 발급받은 Virustotal API 키로 바꾸어 저장합니다.

cd Sublist3r
vim config.py
# Virustotal API Key
virustotal_api_key = 'YOUR_VIRUSTOTAL_API_KEY_HERE'

 

3. Sublist3r를 실행할 때 "-v" 또는 "--virustotal" 옵션을 사용하여 Virustotal API를 사용하도록 설정합니다.

python sublist3r.py -d example.com -v

위와 같이 "-v" 옵션을 추가하면 Virustotal API를 사용하여 서브도메인을 수집합니다. 이때, 앞서 설정한 Virustotal API 키가 필요합니다.

 

sublist3r 실행

python sublist3r.py -d codeverse.kr -v

 

728x90
반응형