Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
sub.Monitor — 자가 호스팅 패시브 서브도메인 연속 모니터링 도구. | Kitploit
도구/GitHubGitHub/e1abrador/sub.monitor
ReconnaissanceInformation GatheringSubdomain Enumeration
GitHube1abrador/sub.monitor

sub.Monitor

자가 호스팅 패시브 서브도메인 연속 모니터링 도구.

저장소 보기
172202년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

sub.Monitor

root@kitploit:~

   지속적인 공격 표면 관리를 위한 빠르고 사용자 친화적인 서브도메인 모니터링 도구.

image

왜?

왜 sub.Monitor를 선택해야 하나요? 이 프로그램은 발견된 모든 도메인을 저장하기 위해 SQLite를 사용하여(사전 데이터베이스 관리의 필요성을 없애) 간편한 설정을 제공합니다. 또한 사용자가 선택한 도구를 사용하여 스크립트에 몇 줄의 코드만 추가하면 되므로 높은 사용자 정의가 가능합니다. MySQL이나 MongoDB와 같은 데이터베이스에 의존하는 다른 기존 솔루션과 달리, 스크립트를 초기화하는 것이 번거로운 작업이 될 수 있습니다.

기능

  • 빠름
  • 사용하기 쉬움
  • 설치하기 쉬움
  • 사용자 정의가 쉬움
  • 로컬 데이터베이스에 서브도메인을 지속적으로 저장 (전체 덤프 가능)
  • Telegram/Slack/Discord 알림

도움말 메뉴

sub.Monitor 플래그:

root@kitploit:~
options:
  --add ADD             Domain to scan
  --out-scope OUT_SCOPE
                        File with out-of-scope domains
  --file FILE           File with known subdomains
  -D DOMAIN, --domain DOMAIN
                        Domain to scan
  -H HOURS, --hours HOURS
                        Hours between scans
  --dump                Dump all subdomains for a specific domain
  --list                List all root domains in the database
  -df DF                File with domains to scan
  --inscope             Dump only in-scope domains
  --notinscope          Dump only out-of-scope domains
  --dumpall             Dump all subdomains with their details
  --info                Show discovery date for subdomains
  -help, -?             Show this help message and exit

사전 필요 설정

구성(API) 경로 파일을 config.ini 파일에 작성해야 합니다.

  • Subfinder API 구성 파일.
  • Amass API 구성 파일.
  • Notify API 구성 파일.
  • sub.monitor-config.ini 파일에 바이너리 및 구성 경로를 지정해야 합니다.
  • 마지막으로 pip3 install -r requirements.txt를 실행하세요.

스크립트에 자신만의 도구를 쉽게 구현할 수 있습니다. 코드 라인을 수정하기만 하면 됩니다:

root@kitploit:~
def run_tool(tool, domain, output_file):
    print(f'[{datetime.datetime.now()}] - Running {tool} on {domain}')
    if tool == 'assetfinder':
        assetfinder_binary = config.get('Binary paths', 'assetfinder')
        cmd = f'echo {domain} | {assetfinder_binary} -subs-only | grep -E "{domain}$" |grep -v "*" | grep -v "@"'
    elif tool == 'subfinder':
        subfinder_binary = config.get('Binary paths', 'subfinder')
        subfinder_api = config.get('Api', 'subfinder_api')
        cmd = f'{subfinder_binary} -d {domain} -silent -pc {subfinder_api} -all'
    elif tool == 'amass':
        amass_binary = config.get('Binary paths', 'amass')
        amass_api = config.get('Api', 'amass_api')
        cmd = f'{amass_binary} enum -passive -norecursive -noalts -d {domain} -config {amass_api}'
    elif tool == 'my-custom-tool':
        my-custom-tool-binary = config.get('Binary paths', 'my-custom-tool-binary-or-script')
        cmd = f'{my-custom-tool-binary} -d {domain}'

사용자 정의 도구를 추가할 경우, 마지막 출력이 도메인 결과여야 sub.Monitor가 데이터베이스에 저장할 수 있다는 점에 유의하세요. 예를 들어 사용 방법은 다음과 같습니다:

root@kitploit:~
cmd = f'bash customtool.sh {domain}''
...
cat customtool.sh
mycustomtool -d $1 > /tmp/$1.txt &>/dev/null; cat /tmp/$1.txt | unfurl domains | anew; rm -r /tmp/$1.txt

또한 여기에 도구 이름을 추가하세요:

root@kitploit:~
                for tool in ['subfinder', 'amass', 'assetfinder', 'my-custom-tool-name']:
                    run_tool(tool, domain, output_file)

마지막으로, 물론 하위 모니터 구성 파일에 도구를 추가해야 파이썬 스크립트가 해당 구성 파일에서 바이너리를 가져올 수 있습니다.

필요한 것은 명령이 완료되면 출력에 발견된 모든 도메인이 표시되어 도구가 로그 파일과 데이터베이스 내에 저장할 수 있도록 하는 것입니다.

작업 계획

먼저 sub.Monitor는 이미 스캔된 도메인 목록이 필요합니다:

root@kitploit:~
➜  cat ibm_sorted_subdomains.txt
test1.ibm.com
test2.ibm.com
test3.ibm.com
subtest.testX.ibm.com
...

이제 서브도메인이 포함된 파일을 다음 명령으로 sub.Monitor에 전달할 수 있습니다:

root@kitploit:~
python3 monitor.py --add ibm.com --file ibm_sorted_subdomains.txt
          _    ___  ___            _ _
          | |   |  \/  |           (_) |
 ___ _   _| |__ | .  . | ___  _ __  _| |_ ___  _ __
/ __| | | | '_ \| |\/| |/ _ \| '_ \| | __/ _ \| '__|
\__ \ |_| | |_) | |  | | (_) | | | | | || (_) | |
|___/\__,_|_.__/\_|  |_/\___/|_| |_|_|\__\___/|_|

                    github.com/e1abrador/sub.Monitor

[2023-06-06 18:16:26.002521] - 538 subdomains were added to the local database.

또한 범위 외 플래그를 추가할 가능성이 있습니다. 예를 들어 버그 바운티 프로그램에 다음과 같은 정책이 있다고 가정해 보겠습니다:

root@kitploit:~
*.ibm.com - in scope
super-admin.ibm.com - out of scope
*.super-admin.ibm.com - out of scope

이 내용으로 파일을 만들 수 있습니다:

root@kitploit:~
cat outscope.txt
super-admin.ibm.com
*.super-admin.ibm.com

이제 수동으로 발견된 모든 도메인을 데이터베이스에 추가할 수 있습니다(범위 내 도메인만 필터링):

root@kitploit:~
python3 monitor.py --add ibm.com --file ibm_sorted_subdomains.txt --out-scope outscope.txt
          _    ___  ___            _ _
          | |   |  \/  |           (_) |
 ___ _   _| |__ | .  . | ___  _ __  _| |_ ___  _ __
/ __| | | | '_ \| |\/| |/ _ \| '_ \| | __/ _ \| '__|
\__ \ |_| | |_) | |  | | (_) | | | | | || (_) | |
|___/\__,_|_.__/\_|  |_/\___/|_| |_|_|\__\___/|_|

                    github.com/e1abrador/sub.Monitor

[2023-06-06 18:16:26.002521] - 538 subdomains were added to the local database.

이렇게 하면 모든 서브도메인이 데이터베이스에 추가되지만, 범위 외 도메인은 [Out of scope] 플래그로 표시됩니다(덤프 도메인 섹션에서 데이터베이스에서 범위 내 도메인을 필터링하는 방법을 확인할 수 있습니다).

도메인이 데이터베이스에 추가되었는지 확인하려면 다음을 실행하세요:

root@kitploit:~
python3 monitor.py --list
          _    ___  ___            _ _
          | |   |  \/  |           (_) |
 ___ _   _| |__ | .  . | ___  _ __  _| |_ ___  _ __
/ __| | | | '_ \| |\/| |/ _ \| '_ \| | __/ _ \| '__|
\__ \ |_| | |_) | |  | | (_) | | | | | || (_) | |
|___/\__,_|_.__/\_|  |_/\___/|_| |_|_|\__\___/|_|

                    github.com/e1abrador/sub.Monitor

ibm.com [9 subdomains added manually] [2 subdomains discovered] [11 total unique in database]

올바르게 로드되면 모니터링 프로세스를 시작할 수 있습니다. VPS에서 TMUX를 사용하여 오랫동안 실행하는 것이 좋습니다. 다음 명령을 사용하면 스크립트가 서브도메인 열거 도구를 실행하고 새 결과를 이전 결과와 비교합니다. 새로운 서브도메인이 발견되면 sub.Monitor는 먼저 로컬 데이터베이스에 추가한 후(더 이상 해당 발견에 대해 알리지 않음) slack/telegram/discord를 통해 사용자에게 알립니다.

root@kitploit:~
python3 monitor.py -D ibm.com -H 12 --out-scope outscope.txt

서브도메인이 발견되면 sub.Monitor는 출력에 다음 메시지를 표시합니다:

root@kitploit:~
➜ python3 monitor.py -D ibm.com -H 8 # To filter the subdomains that are in the current scope from the out-scope ones, you can use:
                                      # python3 monitor.py -D ibm.com -H 8 --out-scope outscope.txt

          _    ___  ___            _ _
          | |   |  \/  |           (_) |
 ___ _   _| |__ | .  . | ___  _ __  _| |_ ___  _ __
/ __| | | | '_ \| |\/| |/ _ \| '_ \| | __/ _ \| '__|
\__ \ |_| | |_) | |  | | (_) | | | | | || (_) | |
|___/\__,_|_.__/\_|  |_/\___/|_| |_|_|\__\___/|_|

                    github.com/e1abrador/sub.Monitor

[2023-06-06 18:07:25.191169] - New subdomain xxxx.ibm.com discovered
[2023-06-06 18:07:25.353156] - New subdomain xyxyxyxyxyx.ibm.com discovered
[2023-06-06 18:07:25.641082] - New subdomain x1.xxxx.ibm.com discovered

다음 명령을 사용하여 둘 이상의 도메인을 모니터링할 수도 있습니다:

root@kitploit:~
python3 monitor.py -df root-domains.txt -H 8
python3 monitor.py -df roots.txt -H 8 --out-scope outscope.txt

해당 메시지가 보고된 후 동시에 사용자는 Telegram에서 알림을 받게 됩니다.

image

알림을 어떻게 관리하나요? Discord를 통해 새로 발견된 모든 도메인을 확인하는 매우 쉬운(관리하기 쉬운) 방법을 찾았습니다. 다음과 같이 보입니다(모든 프로그램이 비공개이므로 흐리게 처리됨):

image

아이디어는 먼저 프로그램 이름에 대한 카테고리를 만드는 것입니다:

Yahoo

--- yahoo.com

--- yahoo.net

--- 등 ...

IBM

--- ibm.com

--- whateverdomain.com

--- 등 ...

제 notify 구성 파일은 다음과 같습니다:

image

각 도메인에 대해 이 작업을 수행하는 것이 좋습니다(설정이 상당히 번거로울 수 있지만 결과를 관리하는 좋은 방법입니다). monitor.py 스크립트는 ID(스캔할 도메인 이름과 동일해야 함)를 기반으로 지정된 웹훅으로 결과를 보냅니다.

스크립트가 2개월 동안 실행되었고 모든 결과(이전 서브도메인 및 새로 발견된 서브도메인)를 가져오려고 한다고 가정해 봅시다. sub.Monitor를 사용하면 --dump 플래그를 사용하여 가능합니다:

root@kitploit:~
python3 monitor.py -D ibm.com --dump

          _    ___  ___            _ _
          | |   |  \/  |           (_) |
 ___ _   _| |__ | .  . | ___  _ __  _| |_ ___  _ __
/ __| | | | '_ \| |\/| |/ _ \| '_ \| | __/ _ \| '__|
\__ \ |_| | |_) | |  | | (_) | | | | | || (_) | |
|___/\__,_|_.__/\_|  |_/\___/|_| |_|_|\__\___/|_|

                    github.com/e1abrador/sub.Monitor

Subdomains for ibm.com:
subdomain1.ibm.com
subdomain2.ibm.com
...

다음 명령을 사용하여 도메인이 발견된 날짜를 확인할 수도 있습니다:

root@kitploit:~
python3 monitor.py -D ibm.com --dump --info

          _    ___  ___            _ _
          | |   |  \/  |           (_) |
 ___ _   _| |__ | .  . | ___  _ __  _| |_ ___  _ __
/ __| | | | '_ \| |\/| |/ _ \| '_ \| | __/ _ \| '__|
\__ \ |_| | |_) | |  | | (_) | | | | | || (_) | |
|___/\__,_|_.__/\_|  |_/\___/|_| |_|_|\__\___/|_|

                    github.com/e1abrador/sub.Monitor

Subdomains for ibm.com:
test.ibm.com [discovered on 06/08/2023]
test2.ibm.com [discovered on 08/08/2023] [Out of scope]

python3 monitor.py -d ibm.com --dump --info 명령을 사용하여 일부 도메인이 범위 외로 표시될 가능성이 높기 때문에, 범위 내 도메인만 표시하려면 --inscope 플래그를 사용할 수 있습니다:

root@kitploit:~
python3 monitor.py -D ibm.com --dump --info --inscope

          _    ___  ___            _ _
          | |   |  \/  |           (_) |
 ___ _   _| |__ | .  . | ___  _ __  _| |_ ___  _ __
/ __| | | | '_ \| |\/| |/ _ \| '_ \| | __/ _ \| '__|
\__ \ |_| | |_) | |  | | (_) | | | | | || (_) | |
|___/\__,_|_.__/\_|  |_/\___/|_| |_|_|\__\___/|_|

                    github.com/e1abrador/sub.Monitor

Subdomains for ibm.com:
test.ibm.com [discovered on 06/08/2023]
test3.ibm.com [discovered on 08/08/2023]

감사

감사합니다:

  • subfinder와 notify를 만들어준 Projectdiscovery에 감사드립니다!.
  • 놀라운 프로젝트 amass를 만든 OWASP에 감사드립니다!.
  • assetfinder를 만든 Tomnomnom에게 감사드립니다!.

할 일

  • 1개 이상의 서브도메인 모니터링 구현. [DONE]
  • 프로그램을 중단하지 않고 새 도메인을 스캔할 수 있도록 도메인 파일을 지속적으로 읽음. [DONE]
  • 범위 외 필터링 구현 [DONE]

새로운 기능에 대한 아이디어가 있으면 https://github.com/e1abrador/sub.Monitor/pulls 에서 PR을 열어주세요.

행운을 빕니다! 사냥 잘하세요! 이 도구(또는 다른 도구)를 정말 좋아하거나, 훌륭한 바운티를 찾는 데 도움이 되었다면 커피 사주기! ☕를 고려해보세요 (카페인이 필요해요!)

⚪ e1abrador

Twitter: https://twitter.com/e1abrador

Buy Me a Coffee at ko-fi.com

도구 다운로드