.. | ||
acl-persistence-abuse | ||
ad-certificates | ||
abusing-ad-mssql.md | ||
ad-certificates.md | ||
ad-dns-records.md | ||
ad-information-in-printers.md | ||
asreproast.md | ||
bloodhound.md | ||
constrained-delegation.md | ||
custom-ssp.md | ||
dcshadow.md | ||
dcsync.md | ||
diamond-ticket.md | ||
dsrm-credentials.md | ||
external-forest-domain-one-way-outbound.md | ||
external-forest-domain-oneway-inbound.md | ||
golden-ticket.md | ||
kerberoast.md | ||
kerberos-authentication.md | ||
kerberos-double-hop-problem.md | ||
laps.md | ||
over-pass-the-hash-pass-the-key.md | ||
pass-the-ticket.md | ||
password-spraying.md | ||
printers-spooler-service-abuse.md | ||
printnightmare.md | ||
privileged-groups-and-token-privileges.md | ||
rdp-sessions-abuse.md | ||
README.md | ||
resource-based-constrained-delegation.md | ||
security-descriptors.md | ||
sid-history-injection.md | ||
silver-ticket.md | ||
skeleton-key.md | ||
unconstrained-delegation.md |
Active Directory Methodology
{% hint style="success" %}
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Check the subscription plans!
- Join the ð¬ Discord group or the telegram group or follow us on Twitter ðŠ @hacktricks_live.
- Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.
åºæ¬æŠèŠ
Active Directoryã¯ããããã¯ãŒã¯ç®¡çè ããããã¯ãŒã¯å ã®ãã¡ã€ã³ããŠãŒã¶ãŒãããã³ãªããžã§ã¯ããå¹ççã«äœæããã³ç®¡çã§ããããã«ããåºç€æè¡ã§ããããã¯ã¹ã±ãŒã©ãã«ã«èšèšãããŠãããèšå€§ãªæ°ã®ãŠãŒã¶ãŒã管çå¯èœãªã°ã«ãŒãããã³ãµãã°ã«ãŒãã«æŽçããããŸããŸãªã¬ãã«ã§ã¢ã¯ã»ã¹æš©ãå¶åŸ¡ããŸãã
Active Directoryã®æ§é ã¯ããã¡ã€ã³ãããªãŒãããã³ãã©ã¬ã¹ãã®3ã€ã®äž»èŠãªå±€ã§æ§æãããŠããŸãããã¡ã€ã³ã¯ãå ±éã®ããŒã¿ããŒã¹ãå ±æãããŠãŒã¶ãŒãããã€ã¹ãªã©ã®ãªããžã§ã¯ãã®ã³ã¬ã¯ã·ã§ã³ãå«ã¿ãŸããããªãŒã¯ãå ±ææ§é ã«ãã£ãŠãªã³ã¯ããããããã®ãã¡ã€ã³ã®ã°ã«ãŒãã§ããããã©ã¬ã¹ãã¯ãä¿¡é Œé¢ä¿ãéããŠçžäºæ¥ç¶ãããè€æ°ã®ããªãŒã®ã³ã¬ã¯ã·ã§ã³ãè¡šããçµç¹æ§é ã®æäžå±€ã圢æããŸããç¹å®ã®ã¢ã¯ã»ã¹ããã³éä¿¡æš©ã¯ããããã®åã¬ãã«ã§æå®ã§ããŸãã
Active Directoryå ã®äž»èŠãªæŠå¿µã«ã¯ä»¥äžãå«ãŸããŸãïŒ
- ãã£ã¬ã¯ã㪠â Active Directoryãªããžã§ã¯ãã«é¢ãããã¹ãŠã®æ å ±ãä¿æããŸãã
- ãªããžã§ã¯ã â ãã£ã¬ã¯ããªå ã®ãšã³ãã£ãã£ã瀺ãããŠãŒã¶ãŒãã°ã«ãŒãããŸãã¯å ±æãã©ã«ããŒãå«ã¿ãŸãã
- ãã¡ã€ã³ â ãã£ã¬ã¯ããªãªããžã§ã¯ãã®ã³ã³ãããšããŠæ©èœãããã©ã¬ã¹ãå ã§è€æ°ã®ãã¡ã€ã³ãå ±åã§ãããããããç¬èªã®ãªããžã§ã¯ãã³ã¬ã¯ã·ã§ã³ãç¶æããŸãã
- ããªãŒ â å ±éã®ã«ãŒããã¡ã€ã³ãå ±æãããã¡ã€ã³ã®ã°ã«ãŒãã§ãã
- ãã©ã¬ã¹ã â Active Directoryã«ãããçµç¹æ§é ã®é ç¹ã§ãããä¿¡é Œé¢ä¿ãæã€ããã€ãã®ããªãŒã§æ§æãããŠããŸãã
**Active Directory Domain Services (AD DS)**ã¯ããããã¯ãŒã¯å ã®éäžç®¡çããã³éä¿¡ã«äžå¯æ¬ ãªäžé£ã®ãµãŒãã¹ãå«ã¿ãŸãããããã®ãµãŒãã¹ã«ã¯ä»¥äžãå«ãŸããŸãïŒ
- ãã¡ã€ã³ãµãŒãã¹ â ããŒã¿ã¹ãã¬ãŒãžãéäžåãããŠãŒã¶ãŒãšãã¡ã€ã³éã®çžäºäœçšã管çããèªèšŒããã³æ€çŽ¢æ©èœãå«ã¿ãŸãã
- 蚌ææžãµãŒãã¹ â å®å šãªããžã¿ã«èšŒææžã®äœæãé åžãããã³ç®¡çãç£ç£ããŸãã
- 軜éãã£ã¬ã¯ããªãµãŒãã¹ â LDAPãããã³ã«ãéããŠãã£ã¬ã¯ããªå¯Ÿå¿ã¢ããªã±ãŒã·ã§ã³ããµããŒãããŸãã
- ãã£ã¬ã¯ããªãã§ãã¬ãŒã·ã§ã³ãµãŒãã¹ â è€æ°ã®Webã¢ããªã±ãŒã·ã§ã³ã§ã®ãŠãŒã¶ãŒèªèšŒãåäžã®ã»ãã·ã§ã³ã§è¡ãã·ã³ã°ã«ãµã€ã³ãªã³æ©èœãæäŸããŸãã
- æš©å©ç®¡ç â èäœæš©è³æãä¿è·ããããã«ããã®ç¡èš±å¯ã®é åžããã³äœ¿çšãèŠå¶ããŸãã
- DNSãµãŒãã¹ â ãã¡ã€ã³åã®è§£æ±ºã«éèŠã§ãã
詳现ãªèª¬æã«ã€ããŠã¯ãTechTerms - Active Directory Definitionã確èªããŠãã ããã
KerberosèªèšŒ
ADãæ»æããæ¹æ³ãåŠã¶ã«ã¯ãKerberosèªèšŒããã»ã¹ãéåžžã«ããç解ããå¿
èŠããããŸãã
ãŸã ãã®ä»çµã¿ãç¥ããªãå Žåã¯ãã®ããŒãžãèªãã§ãã ããã
ããŒãã·ãŒã
ADãåæ/æªçšããããã«å®è¡ã§ããã³ãã³ãã®æŠèŠãè¿ éã«ç¢ºèªããã«ã¯ãhttps://wadcoms.github.io/ãåç §ããŠãã ããã
Active Directoryã®åµå¯ïŒã¯ã¬ãã³ã·ã£ã«/ã»ãã·ã§ã³ãªãïŒ
ADç°å¢ã«ã¢ã¯ã»ã¹ã§ããããã¯ã¬ãã³ã·ã£ã«/ã»ãã·ã§ã³ããªãå Žåã¯ã次ã®ããšãã§ããŸãïŒ
- ãããã¯ãŒã¯ããã³ãã¹ãããïŒ
- ãããã¯ãŒã¯ãã¹ãã£ã³ãããã·ã³ããªãŒãã³ããŒããèŠã€ããè匱æ§ãæªçšããããããããã¯ã¬ãã³ã·ã£ã«ãæœåºãããããŸãïŒäŸãã°ãããªã³ã¿ãŒã¯éåžžã«èå³æ·±ãã¿ãŒã²ããã«ãªãå¯èœæ§ããããŸãïŒã
- DNSãåæããããšã§ããã¡ã€ã³å ã®äž»èŠãªãµãŒããŒã«é¢ããæ å ±ãåŸãããšãã§ããŸãããŠã§ããããªã³ã¿ãŒãå ±æãVPNãã¡ãã£ã¢ãªã©ã
gobuster dns -d domain.local -t 25 -w /opt/Seclist/Discovery/DNS/subdomain-top2000.txt
- ãããè¡ãæ¹æ³ã«ã€ããŠã®è©³çŽ°ã¯ãäžè¬çãªãã³ãã¹ãææ³ã確èªããŠãã ããã
- smbãµãŒãã¹ã§ã®nullããã³Guestã¢ã¯ã»ã¹ã確èªããïŒããã¯ææ°ã®WindowsããŒãžã§ã³ã§ã¯æ©èœããŸããïŒïŒ
enum4linux -a -u "" -p "" <DC IP> && enum4linux -a -u "guest" -p "" <DC IP>
smbmap -u "" -p "" -P 445 -H <DC IP> && smbmap -u "guest" -p "" -P 445 -H <DC IP>
smbclient -U '%' -L //<DC IP> && smbclient -U 'guest%' -L //
- SMBãµãŒããŒãåæããæ¹æ³ã«ã€ããŠã®è©³çŽ°ãªã¬ã€ãã¯ããã«ãããŸãïŒ
{% content-ref url="../../network-services-pentesting/pentesting-smb/" %} pentesting-smb {% endcontent-ref %}
- Ldapãåæãã
nmap -n -sV --script "ldap* and not brute" -p 389 <DC IP>
- LDAPãåæããæ¹æ³ã«ã€ããŠã®è©³çŽ°ãªã¬ã€ãã¯ããã«ãããŸãïŒå¿åã¢ã¯ã»ã¹ã«ç¹ã«æ³šæããŠãã ããïŒïŒ
{% content-ref url="../../network-services-pentesting/pentesting-ldap.md" %} pentesting-ldap.md {% endcontent-ref %}
- ãããã¯ãŒã¯ãæ¯ãã
- Responderã䜿çšããŠãµãŒãã¹ãåœè£ ããŠã¯ã¬ãã³ã·ã£ã«ãåéãã
- ãªã¬ãŒæ»æãæªçšããŠãã¹ãã«ã¢ã¯ã»ã¹ãã
- æªæã®ããUPnPãµãŒãã¹ãå ¬éããŠã¯ã¬ãã³ã·ã£ã«ãåéããSDP
- OSINT:
- å éšææžããœãŒã·ã£ã«ã¡ãã£ã¢ããµãŒãã¹ïŒäž»ã«ãŠã§ãïŒãããŠãŒã¶ãŒå/ååãæœåºããå ¬éãããŠããæ å ±ãããåéããŸãã
- äŒç€Ÿã®åŸæ¥å¡ã®å®å šãªååãèŠã€ããå ŽåãããŸããŸãªADã®ãŠãŒã¶ãŒåã®èŠåãè©Šãããšãã§ããŸãïŒãããèªãïŒãæãäžè¬çãªèŠåã¯ïŒNameSurnameãName.SurnameãNamSurïŒå3æåïŒãNam.SurãNSurnameãN.SurnameãSurnameNameãSurname.NameãSurnameNãSurname.Nã3ã€ã®_ã©ã³ãã ãªæåãš3ã€ã®ã©ã³ãã ãªæ°å_ïŒabc123ïŒã§ãã
- ããŒã«ïŒ
- w0Tx/generate-ad-username
- urbanadventurer/username-anarchy
ãŠãŒã¶ãŒåæ
- å¿åSMB/LDAPåæïŒ ãã³ãã¹ãSMBããã³ãã³ãã¹ãLDAPããŒãžã確èªããŠãã ããã
- KerbruteåæïŒç¡å¹ãªãŠãŒã¶ãŒåãèŠæ±ããããšããµãŒããŒã¯Kerberosãšã©ãŒã³ãŒã_KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN_ã䜿çšããŠå¿çãããŠãŒã¶ãŒåãç¡å¹ã§ããããšãå€æã§ããŸããæå¹ãªãŠãŒã¶ãŒåã¯ãAS-REPå¿çã§TGTãåŒãèµ·ãããããšã©ãŒ_KRB5KDC_ERR_PREAUTH_REQUIRED_ã瀺ãããŠãŒã¶ãŒãäºåèªèšŒãè¡ãå¿ èŠãããããšã瀺ããŸãã
./kerbrute_linux_amd64 userenum -d lab.ropnop.com --dc 10.10.10.10 usernames.txt #From https://github.com/ropnop/kerbrute/releases
nmap -p 88 --script=krb5-enum-users --script-args="krb5-enum-users.realm='DOMAIN'" <IP>
Nmap -p 88 --script=krb5-enum-users --script-args krb5-enum-users.realm='<domain>',userdb=/root/Desktop/usernames.txt <IP>
msf> use auxiliary/gather/kerberos_enumusers
crackmapexec smb dominio.es -u '' -p '' --users | awk '{print $4}' | uniq
- OWA (Outlook Web Access) ãµãŒããŒ
ãããã¯ãŒã¯å ã«ãããã®ãµãŒããŒã®ãããããèŠã€ããå ŽåããŠãŒã¶ãŒåæãå®è¡ããããšãã§ããŸããããšãã°ãããŒã« MailSniper ã䜿çšã§ããŸãïŒ
ipmo C:\Tools\MailSniper\MailSniper.ps1
# Get info about the domain
Invoke-DomainHarvestOWA -ExchHostname [ip]
# Enumerate valid users from a list of potential usernames
Invoke-UsernameHarvestOWA -ExchHostname [ip] -Domain [domain] -UserList .\possible-usernames.txt -OutFile valid.txt
# Password spraying
Invoke-PasswordSprayOWA -ExchHostname [ip] -UserList .\valid.txt -Password Summer2021
# Get addresses list from the compromised mail
Get-GlobalAddressList -ExchHostname [ip] -UserName [domain]\[username] -Password Summer2021 -OutFile gal.txt
{% hint style="warning" %} ãŠãŒã¶ãŒåã®ãªã¹ãã¯ãã®GitHubãªããžã㪠****ããã®ãªããžããªïŒçµ±èšçã«å¯èœæ§ã®é«ããŠãŒã¶ãŒåïŒã§èŠã€ããããšãã§ããŸãã
ãã ãããããè¡ãåã«å®æœãããªã³ã³ã¹ããããããäŒç€Ÿã§åããŠãã人ã ã®ååãæã£ãŠããå¿ èŠããããŸããååãšå§ãããã°ãã¹ã¯ãªããnamemash.pyã䜿çšããŠãæœåšçãªæå¹ãªãŠãŒã¶ãŒåãçæã§ããŸãã {% endhint %}
1ã€ãŸãã¯è€æ°ã®ãŠãŒã¶ãŒåãç¥ã£ãŠããå Žå
ããŠãæå¹ãªãŠãŒã¶ãŒåã¯ããã£ãŠããããã¹ã¯ãŒãããªãå Žå... 次ã®ããšãè©ŠããŠã¿ãŠãã ããïŒ
- ASREPRoast: ãŠãŒã¶ãŒãå±æ§ DONT_REQ_PREAUTH ãæã£ãŠããªãå Žåããã®ãŠãŒã¶ãŒã®ããã«AS_REPã¡ãã»ãŒãžãèŠæ±ã§ãããŠãŒã¶ãŒã®ãã¹ã¯ãŒãã®æŽŸçã«ãã£ãŠæå·åãããããŒã¿ãå«ãŸããŸãã
- ãã¹ã¯ãŒãã¹ãã¬ãŒ: çºèŠããåãŠãŒã¶ãŒã«å¯ŸããŠæãäžè¬çãªãã¹ã¯ãŒããè©ŠããŠã¿ãŸããããããããããããããŠãŒã¶ãŒãæªããã¹ã¯ãŒãã䜿çšããŠãããããããŸããïŒãã¹ã¯ãŒãããªã·ãŒã«æ³šæããŠãã ããïŒïŒã
- OWAãµãŒããŒãã¹ãã¬ãŒããŠããŠãŒã¶ãŒã®ã¡ãŒã«ãµãŒããŒãžã®ã¢ã¯ã»ã¹ãè©Šã¿ãããšãã§ããŸãã
{% content-ref url="password-spraying.md" %} password-spraying.md {% endcontent-ref %}
LLMNR/NBT-NSãã€ãºãã³ã°
ãããã¯ãŒã¯ã®ããã€ãã®ãããã³ã«ããã€ãºãã³ã°ããããšã§ãããã€ãã®ãã£ã¬ã³ãžããã·ã¥ãååŸã§ãããããããŸããïŒ
{% content-ref url="../../generic-methodologies-and-resources/pentesting-network/spoofing-llmnr-nbt-ns-mdns-dns-and-wpad-and-relay-attacks.md" %} spoofing-llmnr-nbt-ns-mdns-dns-and-wpad-and-relay-attacks.md {% endcontent-ref %}
NTMLãªã¬ãŒ
ã¢ã¯ãã£ããã£ã¬ã¯ããªãåæã§ããå Žåãããå€ãã®ã¡ãŒã«ãšãããã¯ãŒã¯ã®ç解ãåŸãããŸããNTML ãªã¬ãŒæ»æ ****ã匷å¶ããŠADç°å¢ã«ã¢ã¯ã»ã¹ã§ãããããããŸããã
NTLMã¯ã¬ãã³ã·ã£ã«ã®çé£
ãã«ãŸãã¯ã²ã¹ããŠãŒã¶ãŒã§ä»ã®PCãå ±æã«ã¢ã¯ã»ã¹ã§ããå Žåããã¡ã€ã«ãé 眮ïŒSCFãã¡ã€ã«ãªã©ïŒããŠãäœããã®åœ¢ã§ã¢ã¯ã»ã¹ããããšNTMLèªèšŒãããªã¬ãŒããNTLMãã£ã¬ã³ãžãçãããšãã§ããŸãïŒ
{% content-ref url="../ntlm/places-to-steal-ntlm-creds.md" %} places-to-steal-ntlm-creds.md {% endcontent-ref %}
è³æ Œæ å ±/ã»ãã·ã§ã³ã䜿çšããã¢ã¯ãã£ããã£ã¬ã¯ããªã®åæ
ãã®ãã§ãŒãºã§ã¯ãæå¹ãªãã¡ã€ã³ã¢ã«ãŠã³ãã®è³æ Œæ å ±ãŸãã¯ã»ãã·ã§ã³ã䟵害ããŠããå¿ èŠããããŸãã æå¹ãªè³æ Œæ å ±ãŸãã¯ãã¡ã€ã³ãŠãŒã¶ãŒãšããŠã®ã·ã§ã«ãããå Žåãåã«ç€ºãããªãã·ã§ã³ã¯ä»ã®ãŠãŒã¶ãŒã䟵害ããããã®ãªãã·ã§ã³ãšããŠäŸç¶ãšããŠæå¹ã§ãã
èªèšŒãããåæãéå§ããåã«ãKerberosããã«ãããåé¡ãäœã§ããããç¥ã£ãŠããå¿ èŠããããŸãã
{% content-ref url="kerberos-double-hop-problem.md" %} kerberos-double-hop-problem.md {% endcontent-ref %}
åæ
ã¢ã«ãŠã³ãã䟵害ããããšã¯ããã¡ã€ã³å šäœã䟵害ããããã®å€§ããªã¹ãããã§ãããªããªããã¢ã¯ãã£ããã£ã¬ã¯ããªã®åæãéå§ã§ããããã§ãïŒ
ASREPRoastã«é¢ããŠã¯ãä»ããã¹ãŠã®å¯èœãªè匱ãªãŠãŒã¶ãŒãèŠã€ããããšãã§ãããã¹ã¯ãŒãã¹ãã¬ãŒã«é¢ããŠã¯ããã¹ãŠã®ãŠãŒã¶ãŒåã®ãªã¹ããååŸãã䟵害ãããã¢ã«ãŠã³ãã®ãã¹ã¯ãŒãã空ã®ãã¹ã¯ãŒããæ°ããææãªãã¹ã¯ãŒããè©Šãããšãã§ããŸãã
- CMDã䜿çšããŠåºæ¬çãªãªã³ã³ãå®è¡ã§ããŸãã
- PowerShellã䜿çšããŠãªã³ã³ããããšãã§ããããã¹ãã«ã¹æ§ããããŸãã
- ãã詳现ãªæ å ±ãæœåºããããã«PowerViewã䜿çšããããšãã§ããŸãã
- ã¢ã¯ãã£ããã£ã¬ã¯ããªã®ãªã³ã³ã«ãããŠãã1ã€ã®çŽ æŽãããããŒã«ã¯BloodHoundã§ããããã¯ããŸãã¹ãã«ã¹æ§ããããŸããïŒäœ¿çšããåéæ¹æ³ã«ãããŸãïŒãããããæ°ã«ããªãã®ã§ããã°ããã²è©ŠããŠã¿ãŠãã ããããŠãŒã¶ãŒãRDPã§ããå ŽæãèŠã€ããããä»ã®ã°ã«ãŒããžã®ãã¹ãèŠã€ãããããŸãã
- ä»ã®èªååãããADåæããŒã«ã¯ïŒ AD Explorerã ADReconã Group3rã PingCastleã
- ADã®DNSã¬ã³ãŒãã¯ãèå³æ·±ãæ å ±ãå«ãã§ãããããããŸããã
- ãã£ã¬ã¯ããªãåæããããã«äœ¿çšã§ããGUIããŒã«ã¯ãSysInternalã¹ã€ãŒãã®AdExplorer.exeã§ãã
- ldapsearchã䜿çšããŠLDAPããŒã¿ããŒã¹å ãæ€çŽ¢ãã_userPassword_ããã³_unixUserPassword_ãã£ãŒã«ãå ã®è³æ Œæ å ±ãã_Description_ãæ¢ãããšãã§ããŸããcf. PayloadsAllTheThingsã®ADãŠãŒã¶ãŒã³ã¡ã³ãå ã®ãã¹ã¯ãŒãã§ä»ã®æ¹æ³ã確èªããŠãã ããã
- Linuxã䜿çšããŠããå Žåãpywerviewã䜿çšããŠãã¡ã€ã³ãåæããããšãã§ããŸãã
- èªååããŒã«ãšããŠæ¬¡ã®ãã®ãè©Šãããšãã§ããŸãïŒ
- tomcarver16/ADSearch
- 61106960/adPEAS
- ãã¹ãŠã®ãã¡ã€ã³ãŠãŒã¶ãŒã®æœåº
Windowsãããã¹ãŠã®ãã¡ã€ã³ãŠãŒã¶ãŒåãååŸããã®ã¯éåžžã«ç°¡åã§ãïŒnet user /domain
ãGet-DomainUser
ãŸãã¯wmic useraccount get name,sid
ïŒãLinuxã§ã¯ã次ã®ã³ãã³ãã䜿çšã§ããŸãïŒGetADUsers.py -all -dc-ip 10.10.10.110 domain.com/username
ãŸãã¯enum4linux -a -u "user" -p "password" <DC IP>
ãã®åæã»ã¯ã·ã§ã³ã¯å°ããèŠãããããããŸããããããã¯ãã¹ãŠã®äžã§æãéèŠãªéšåã§ãããªã³ã¯ã«ã¢ã¯ã»ã¹ãïŒäž»ã«cmdãpowershellãpowerviewãBloodHoundã®ãã®ïŒããã¡ã€ã³ãåæããæ¹æ³ãåŠã³ãå¿«é©ã«æãããŸã§ç·Žç¿ããŠãã ãããè©äŸ¡äžãããã¯DAãžã®éãèŠã€ããããã®éèŠãªç¬éã§ãããäœãã§ããªããšæ±ºå®ããç¬éã§ããããŸãã
Kerberoast
Kerberoastingã¯ããŠãŒã¶ãŒã¢ã«ãŠã³ãã«é¢é£ä»ãããããµãŒãã¹ã«ãã£ãŠäœ¿çšãããTGSãã±ãããååŸãããã®æå·åãã¯ã©ãã¯ããããšãå«ã¿ãŸãâããã¯ãŠãŒã¶ãŒãã¹ã¯ãŒãã«åºã¥ããŠããããªãã©ã€ã³ã§è¡ãããŸãã
ããã«é¢ãã詳现ã¯ïŒ
{% content-ref url="kerberoast.md" %} kerberoast.md {% endcontent-ref %}
ãªã¢ãŒãæ¥ç¶ïŒRDPãSSHãFTPãWin-RMãªã©ïŒ
ããã€ãã®è³æ Œæ å ±ãååŸãããããã·ã³ãžã®ã¢ã¯ã»ã¹ããããã©ããã確èªã§ããŸãããã®ããã«ãCrackMapExecã䜿çšããŠãããŒãã¹ãã£ã³ã«å¿ããŠç°ãªããããã³ã«ã§è€æ°ã®ãµãŒããŒã«æ¥ç¶ãè©Šã¿ãããšãã§ããŸãã
ããŒã«ã«ç¹æš©ææ Œ
è³æ Œæ å ±ãŸãã¯éåžžã®ãã¡ã€ã³ãŠãŒã¶ãŒãšããŠã®ã»ãã·ã§ã³ã䟵害ãããã¡ã€ã³å ã®ä»»æã®ãã·ã³ã«ãã®ãŠãŒã¶ãŒã§ã¢ã¯ã»ã¹ã§ããå ŽåãããŒã«ã«ã§ç¹æš©ãææ Œãããè³æ Œæ å ±ãæ¢ãæ¹æ³ãèŠã€ããã¹ãã§ããããã¯ãããŒã«ã«ç®¡çè æš©éããªããšãä»ã®ãŠãŒã¶ãŒã®ããã·ã¥ãã¡ã¢ãªïŒLSASSïŒãããŒã«ã«ïŒSAMïŒã§ãã³ãã§ããªãããã§ãã
ãã®æ¬ã«ã¯Windowsã«ãããããŒã«ã«ç¹æš©ææ Œã«é¢ããå®å šãªããŒãžãšãã§ãã¯ãªã¹ãããããŸãããŸããWinPEASã䜿çšããããšãå¿ããªãã§ãã ããã
çŸåšã®ã»ãã·ã§ã³ãã±ãã
äºæããªããªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããã®èš±å¯ãäžãããã±ãããçŸåšã®ãŠãŒã¶ãŒãèŠã€ããããšã¯éåžžã«ããããã«ãããŸãããã確èªããããšãã§ããŸãïŒ
## List all tickets (if not admin, only current user tickets)
.\Rubeus.exe triage
## Dump the interesting one by luid
.\Rubeus.exe dump /service:krbtgt /luid:<luid> /nowrap
[IO.File]::WriteAllBytes("ticket.kirbi", [Convert]::FromBase64String("<BASE64_TICKET>"))
NTML Relay
ããã¢ã¯ãã£ããã£ã¬ã¯ããªãåæã§ãããªããããå€ãã®ã¡ãŒã«ãšãããã¯ãŒã¯ã®ç解ãåŸãããšãã§ããã§ããããNTML ãªã¬ãŒæ»æã匷å¶ããããšãã§ãããããããŸããã
ã³ã³ãã¥ãŒã¿å ±æå ã®ã¯ã¬ãã³ã·ã£ã«ãæ¢ã
åºæ¬çãªã¯ã¬ãã³ã·ã£ã«ãæã£ãŠããã®ã§ãADå ã§å ±æãããŠããèå³æ·±ããã¡ã€ã«ãèŠã€ããããšãã§ããã確èªããã¹ãã§ããæåã§è¡ãããšãã§ããŸãããéåžžã«éå±ã§ç¹°ãè¿ãã®äœæ¥ã§ãïŒç¹ã«ç¢ºèªããå¿ èŠãããææžãäœçŸãèŠã€ãã£ãå Žåã¯ãªãããã§ãïŒã
䜿çšã§ããããŒã«ã«ã€ããŠåŠã¶ã«ã¯ãã®ãªã³ã¯ããã©ããŒããŠãã ããã
NTLMã¯ã¬ãã³ã·ã£ã«ãçã
ä»ã®PCãå ±æã«ã¢ã¯ã»ã¹ã§ããå Žåããã¡ã€ã«ïŒSCFãã¡ã€ã«ãªã©ïŒãé 眮ããããšãã§ããããã«ã¢ã¯ã»ã¹ããããšNTMLèªèšŒãããªãã«å¯ŸããŠããªã¬ãŒãããã®ã§ãNTLMãã£ã¬ã³ãžãçãããšãã§ããŸãïŒ
{% content-ref url="../ntlm/places-to-steal-ntlm-creds.md" %} places-to-steal-ntlm-creds.md {% endcontent-ref %}
CVE-2021-1675/CVE-2021-34527 PrintNightmare
ãã®è匱æ§ã«ãããèªèšŒãããä»»æã®ãŠãŒã¶ãŒããã¡ã€ã³ã³ã³ãããŒã©ãŒã䟵害ããããšãã§ããŸããã
{% content-ref url="printnightmare.md" %} printnightmare.md {% endcontent-ref %}
ç¹æš©ã¯ã¬ãã³ã·ã£ã«/ã»ãã·ã§ã³ã䜿çšããã¢ã¯ãã£ããã£ã¬ã¯ããªã®ç¹æš©ææ Œ
以äžã®æè¡ã«ã¯ãéåžžã®ãã¡ã€ã³ãŠãŒã¶ãŒã§ã¯äžååã§ããããã®æ»æãå®è¡ããããã«ã¯ç¹å¥ãªç¹æš©/ã¯ã¬ãã³ã·ã£ã«ãå¿ èŠã§ãã
ããã·ã¥æœåº
幞éã«ããAsRepRoastãPassword SprayingãKerberoastãResponderãå«ããªã¬ãŒãEvilSSDPãããŒã«ã«ã§ã®ç¹æš©ææ Œã䜿çšããŠããŒã«ã«ç®¡çè
ã¢ã«ãŠã³ãã䟵害ããããšãã§ããããšãé¡ã£ãŠããŸãã
次ã«ãã¡ã¢ãªãšããŒã«ã«ã®ãã¹ãŠã®ããã·ã¥ããã³ãããæã§ãã
ããã·ã¥ãååŸããããã®ããŸããŸãªæ¹æ³ã«ã€ããŠãã®ããŒãžãèªãã§ãã ããã
ãã¹ã»ã¶ã»ããã·ã¥
ãŠãŒã¶ãŒã®ããã·ã¥ãæã£ãŠããå Žåãããã䜿çšããŠãªãããŸãããšãã§ããŸãã
ãã®ããã·ã¥ã䜿çšããŠNTLMèªèšŒãå®è¡ããããã®ããŒã«ã䜿çšããå¿
èŠããããŸãããŸãã¯ãæ°ããsessionlogonãäœæãããã®ããã·ã¥ãLSASSå
ã«æ³šå
¥ããããšãã§ããŸããããããã°ãä»»æã®NTLMèªèšŒãå®è¡ããããšããã®ããã·ã¥ã䜿çšãããŸããæåŸã®ãªãã·ã§ã³ã¯mimikatzãè¡ãããšã§ãã
詳现ã«ã€ããŠã¯ãã®ããŒãžãèªãã§ãã ããã
ãªãŒããŒãã¹ã»ã¶ã»ããã·ã¥/ãã¹ã»ã¶ã»ããŒ
ãã®æ»æã¯ããŠãŒã¶ãŒã®NTLMããã·ã¥ã䜿çšããŠKerberosãã±ãããèŠæ±ããããšãç®çãšããŠããŸããããã¯ãäžè¬çãªNTLMãããã³ã«ãä»ãããã¹ã»ã¶ã»ããã·ã¥ã®ä»£æ¿æ段ã§ãããããã£ãŠãããã¯ç¹ã«NTLMãããã³ã«ãç¡å¹ã«ãããŠãããããã¯ãŒã¯ã§ãKerberosã®ã¿ãèªèšŒãããã³ã«ãšããŠèš±å¯ãããŠããå Žåã«ç¹ã«æçšã§ãã
{% content-ref url="over-pass-the-hash-pass-the-key.md" %} over-pass-the-hash-pass-the-key.md {% endcontent-ref %}
ãã¹ã»ã¶ã»ãã±ãã
ãã¹ã»ã¶ã»ãã±ããïŒPTTïŒæ»æææ³ã§ã¯ãæ»æè ã¯ãŠãŒã¶ãŒã®èªèšŒãã±ãããçã代ããã«ããã¹ã¯ãŒããããã·ã¥å€ãçã¿ãŸãããã®çãŸãããã±ããã¯ããã®åŸãŠãŒã¶ãŒã«ãªãããŸãããã«äœ¿çšããããããã¯ãŒã¯å ã®ãªãœãŒã¹ããµãŒãã¹ãžã®äžæ£ã¢ã¯ã»ã¹ãåŸãããšãã§ããŸãã
{% content-ref url="pass-the-ticket.md" %} pass-the-ticket.md {% endcontent-ref %}
ã¯ã¬ãã³ã·ã£ã«ã®åå©çš
ããŒã«ã«ç®¡çè ã®ããã·ã¥ãŸãã¯ãã¹ã¯ãŒããæã£ãŠããå Žåã¯ãããã䜿çšããŠä»ã®PCã«ããŒã«ã«ã§ãã°ã€ã³ããããšããã¹ãã§ãã
# Local Auth Spray (once you found some local admin pass or hash)
## --local-auth flag indicate to only try 1 time per machine
crackmapexec smb --local-auth 10.10.10.10/23 -u administrator -H 10298e182387f9cab376ecd08491764a0 | grep +
{% hint style="warning" %} ãã®ããšã¯éåžžã«éšããããã®ã§ãããLAPSã軜æžããŸãã {% endhint %}
MSSQLã®æªçšãšä¿¡é Œããããªã³ã¯
ãŠãŒã¶ãŒãMSSQLã€ã³ã¹ã¿ã³ã¹ã«ã¢ã¯ã»ã¹ããæš©éãæã£ãŠããå ŽåãMSSQLãã¹ãã§ã³ãã³ããå®è¡ãããïŒSAãšããŠå®è¡ãããŠããå ŽåïŒãNetNTLMã®ããã·ã¥ãçãããšãã§ããããããã«ã¯ãªã¬ãŒæ»æãè¡ãããšãã§ãããããããŸããã
ãŸããMSSQLã€ã³ã¹ã¿ã³ã¹ãå¥ã®MSSQLã€ã³ã¹ã¿ã³ã¹ã«ãã£ãŠä¿¡é ŒãããŠããå Žåãä¿¡é ŒãããããŒã¿ããŒã¹ã«å¯Ÿããæš©éãæã€ãŠãŒã¶ãŒã¯ãä¿¡é Œé¢ä¿ãå©çšããŠä»ã®ã€ã³ã¹ã¿ã³ã¹ã§ãã¯ãšãªãå®è¡ã§ããããã«ãªããŸãããããã®ä¿¡é Œã¯é£éããããšãã§ãããŠãŒã¶ãŒã¯ã³ãã³ããå®è¡ã§ãã誀ã£ãŠæ§æãããããŒã¿ããŒã¹ãèŠã€ããããšãã§ãããããããŸããã
ããŒã¿ããŒã¹éã®ãªã³ã¯ã¯ããã©ã¬ã¹ãã®ä¿¡é Œãè¶ããŠãæ©èœããŸãã
{% content-ref url="abusing-ad-mssql.md" %} abusing-ad-mssql.md {% endcontent-ref %}
å¶çŽã®ãªãå§ä»»
ADS_UF_TRUSTED_FOR_DELEGATIONå±æ§ãæã€ã³ã³ãã¥ãŒã¿ãªããžã§ã¯ããèŠã€ããã³ã³ãã¥ãŒã¿ã«ãã¡ã€ã³æš©éãããå Žåãã³ã³ãã¥ãŒã¿ã«ãã°ã€ã³ãããã¹ãŠã®ãŠãŒã¶ãŒã®ã¡ã¢ãªããTGTããã³ãããããšãã§ããŸãã
ãããã£ãŠããã¡ã€ã³ç®¡çè
ãã³ã³ãã¥ãŒã¿ã«ãã°ã€ã³ãããšããã®TGTããã³ãããŠPass the Ticketã䜿çšããŠåœŒãåœè£
ããããšãã§ããŸãã
å¶çŽã®ããå§ä»»ã®ãããã§ãããªã³ããµãŒããŒãèªåçã«äŸµå®³ããããšããå¯èœã§ãïŒã§ããã°DCã§ããããšãé¡ã£ãŠããŸãïŒã
{% content-ref url="unconstrained-delegation.md" %} unconstrained-delegation.md {% endcontent-ref %}
å¶çŽãããå§ä»»
ãŠãŒã¶ãŒãŸãã¯ã³ã³ãã¥ãŒã¿ããå¶çŽãããå§ä»»ããèš±å¯ãããŠããå Žåãã³ã³ãã¥ãŒã¿å
ã®ããã€ãã®ãµãŒãã¹ã«ã¢ã¯ã»ã¹ããããã«ä»»æã®ãŠãŒã¶ãŒãåœè£
ããããšãã§ããŸãã
ãã®åŸããã®ãŠãŒã¶ãŒ/ã³ã³ãã¥ãŒã¿ã®ããã·ã¥ã䟵害ãããšãä»»æã®ãŠãŒã¶ãŒïŒãã¡ã€ã³ç®¡çè
ãå«ãïŒãåœè£
ããŠããã€ãã®ãµãŒãã¹ã«ã¢ã¯ã»ã¹ããããšãã§ããŸãã
{% content-ref url="constrained-delegation.md" %} constrained-delegation.md {% endcontent-ref %}
ãªãœãŒã¹ããŒã¹ã®å¶çŽãããå§ä»»
ãªã¢ãŒãã³ã³ãã¥ãŒã¿ã®Active Directoryãªããžã§ã¯ãã«å¯ŸããWRITEæš©éãæã€ããšã§ãææ Œãããæš©éã§ã®ã³ãŒãå®è¡ãå¯èœã«ãªããŸãïŒ
{% content-ref url="resource-based-constrained-delegation.md" %} resource-based-constrained-delegation.md {% endcontent-ref %}
ACLã®æªçš
䟵害ããããŠãŒã¶ãŒã¯ããã¡ã€ã³ãªããžã§ã¯ãã®ããã€ãã«å¯ŸããŠèå³æ·±ãæš©éãæã£ãŠããå¯èœæ§ããããããã«ãã暪移åãæš©éã®ææ Œãå¯èœã«ãªããŸãã
{% content-ref url="acl-persistence-abuse/" %} acl-persistence-abuse {% endcontent-ref %}
ããªã³ã¿ãŒã¹ããŒã©ãŒãµãŒãã¹ã®æªçš
ãã¡ã€ã³å ã§ã¹ããŒã«ãµãŒãã¹ããªãã¹ã³ããŠããããšãçºèŠããããšã¯ãæ°ããè³æ Œæ å ±ãååŸããæš©éãææ Œãããããã«æªçšãããå¯èœæ§ããããŸãã
{% content-ref url="printers-spooler-service-abuse.md" %} printers-spooler-service-abuse.md {% endcontent-ref %}
第äžè ã»ãã·ã§ã³ã®æªçš
ä»ã®ãŠãŒã¶ãŒã䟵害ããããã·ã³ã«ã¢ã¯ã»ã¹ãããšãã¡ã¢ãªããè³æ Œæ
å ±ãåéãã圌ãã®ããã»ã¹ã«ããŒã³ã³ã泚å
¥ããŠåœŒããåœè£
ããããšãå¯èœã§ãã
éåžžããŠãŒã¶ãŒã¯RDPãä»ããŠã·ã¹ãã ã«ã¢ã¯ã»ã¹ãããããããã§ã¯ç¬¬äžè
ã®RDPã»ãã·ã§ã³ã«å¯ŸããŠããã€ãã®æ»æãå®è¡ããæ¹æ³ã瀺ããŸãïŒ
{% content-ref url="rdp-sessions-abuse.md" %} rdp-sessions-abuse.md {% endcontent-ref %}
LAPS
LAPSã¯ããã¡ã€ã³ã«åå ããŠããã³ã³ãã¥ãŒã¿äžã®ããŒã«ã«ç®¡çè ãã¹ã¯ãŒãã管çããããã®ã·ã¹ãã ãæäŸãããããã©ã³ãã åããããŠããŒã¯ã§ãé »ç¹ã«å€æŽãããããšãä¿èšŒããŸãããããã®ãã¹ã¯ãŒãã¯Active Directoryã«ä¿åãããã¢ã¯ã»ã¹ã¯ACLãéããŠèªå¯ããããŠãŒã¶ãŒã®ã¿ã«å¶åŸ¡ãããŸãããããã®ãã¹ã¯ãŒãã«ã¢ã¯ã»ã¹ããããã®ååãªæš©éãããã°ãä»ã®ã³ã³ãã¥ãŒã¿ã«ããããããããšãå¯èœã«ãªããŸãã
{% content-ref url="laps.md" %} laps.md {% endcontent-ref %}
蚌ææžã®çé£
䟵害ããããã·ã³ãã蚌ææžãåéããããšã¯ãç°å¢å ã§æš©éãææ Œãããæ¹æ³ãšãªãå¯èœæ§ããããŸãïŒ
{% content-ref url="ad-certificates/certificate-theft.md" %} certificate-theft.md {% endcontent-ref %}
蚌ææžãã³ãã¬ãŒãã®æªçš
è匱ãªãã³ãã¬ãŒããæ§æãããŠããå ŽåããããæªçšããŠæš©éãææ Œãããããšãå¯èœã§ãïŒ
{% content-ref url="ad-certificates/domain-escalation.md" %} domain-escalation.md {% endcontent-ref %}
é«æš©éã¢ã«ãŠã³ãã«ãããã¹ããšã¯ã¹ããã€ã
ãã¡ã€ã³è³æ Œæ å ±ã®ãã³ã
ãã¡ã€ã³ç®¡çè ãŸãã¯ããã«è¯ããšã³ã¿ãŒãã©ã€ãºç®¡çè ã®æš©éãååŸãããšããã¡ã€ã³ããŒã¿ããŒã¹ããã³ãã§ããŸãïŒntds.ditã
DCSyncæ»æã«é¢ãã詳现æ å ±ã¯ããã«ãããŸãã
NTDS.ditãçãæ¹æ³ã«é¢ãã詳现æ å ±ã¯ããã«ãããŸã
æš©éææ ŒãšããŠã®æç¶æ§
åè¿°ã®ããã€ãã®æè¡ã¯æç¶æ§ã«äœ¿çšã§ããŸãã
äŸãã°ã次ã®ããšãã§ããŸãïŒ
- ãŠãŒã¶ãŒãKerberoastã«å¯ŸããŠè匱ã«ãã
Set-DomainObject -Identity <username> -Set @{serviceprincipalname="fake/NOTHING"}r
- ãŠãŒã¶ãŒãASREPRoastã«å¯ŸããŠè匱ã«ãã
Set-DomainObject -Identity <username> -XOR @{UserAccountControl=4194304}
- ãŠãŒã¶ãŒã«DCSyncæš©éãä»äžãã
Add-DomainObjectAcl -TargetIdentity "DC=SUB,DC=DOMAIN,DC=LOCAL" -PrincipalIdentity bfarmer -Rights DCSync
ã·ã«ããŒãã±ãã
ã·ã«ããŒãã±ããæ»æã¯ãç¹å®ã®ãµãŒãã¹ã®ããã«æ£åœãªãã±ããæäžãµãŒãã¹ïŒTGSïŒãã±ãããNTLMããã·ã¥ã䜿çšããŠäœæããŸãïŒäŸãã°ãPCã¢ã«ãŠã³ãã®ããã·ã¥ïŒããã®æ¹æ³ã¯ããµãŒãã¹æš©éã«ã¢ã¯ã»ã¹ããããã«äœ¿çšãããŸãã
{% content-ref url="silver-ticket.md" %} silver-ticket.md {% endcontent-ref %}
ãŽãŒã«ãã³ãã±ãã
ãŽãŒã«ãã³ãã±ããæ»æã¯ãæ»æè ãActive DirectoryïŒADïŒç°å¢å ã®krbtgtã¢ã«ãŠã³ãã®NTLMããã·ã¥ã«ã¢ã¯ã»ã¹ããããšãå«ã¿ãŸãããã®ã¢ã«ãŠã³ãã¯ç¹å¥ã§ããã¹ãŠã®**ãã±ããæäžãã±ããïŒTGTïŒ**ã«çœ²åããããã«äœ¿çšãããADãããã¯ãŒã¯å ã§ã®èªèšŒã«äžå¯æ¬ ã§ãã
æ»æè ããã®ããã·ã¥ãååŸãããšãä»»æã®ã¢ã«ãŠã³ãã®ããã«TGTãäœæããããšãã§ããŸãïŒã·ã«ããŒãã±ããæ»æïŒã
{% content-ref url="golden-ticket.md" %} golden-ticket.md {% endcontent-ref %}
ãã€ã€ã¢ã³ããã±ãã
ãããã¯ãäžè¬çãªãŽãŒã«ãã³ãã±ããæ€åºã¡ã«ããºã ãåé¿ããæ¹æ³ã§åœé ããããŽãŒã«ãã³ãã±ããã®ãããªãã®ã§ãã
{% content-ref url="diamond-ticket.md" %} diamond-ticket.md {% endcontent-ref %}
蚌ææžã¢ã«ãŠã³ãã®æç¶æ§
ã¢ã«ãŠã³ãã®èšŒææžãæã£ãŠããããèŠæ±ã§ããããšã¯ããŠãŒã¶ãŒã¢ã«ãŠã³ãã«æç¶ããããã®éåžžã«è¯ãæ¹æ³ã§ãïŒããšã圌ããã¹ã¯ãŒããå€æŽããŠãïŒïŒ
{% content-ref url="ad-certificates/account-persistence.md" %} account-persistence.md {% endcontent-ref %}
蚌ææžãã¡ã€ã³ã®æç¶æ§
蚌ææžã䜿çšããããšã¯ããã¡ã€ã³å ã§é«ãæš©éãæç¶ããããšãå¯èœã§ãïŒ
{% content-ref url="ad-certificates/domain-persistence.md" %} domain-persistence.md {% endcontent-ref %}
AdminSDHolderã°ã«ãŒã
Active Directoryã®AdminSDHolderãªããžã§ã¯ãã¯ãç¹æš©ã°ã«ãŒãïŒãã¡ã€ã³ç®¡çè ããšã³ã¿ãŒãã©ã€ãºç®¡çè ãªã©ïŒã®ã»ãã¥ãªãã£ã確ä¿ããããã«ããããã®ã°ã«ãŒãå šäœã«æšæºã®**ã¢ã¯ã»ã¹å¶åŸ¡ãªã¹ãïŒACLïŒ**ãé©çšããç¡èš±å¯ã®å€æŽãé²ããŸãããããããã®æ©èœã¯æªçšãããå¯èœæ§ããããŸããæ»æè ãAdminSDHolderã®ACLãå€æŽããŠéåžžã®ãŠãŒã¶ãŒã«å®å šãªã¢ã¯ã»ã¹ãäžãããšããã®ãŠãŒã¶ãŒã¯ãã¹ãŠã®ç¹æš©ã°ã«ãŒãã«å¯ŸããŠåºç¯ãªå¶åŸ¡ãåŸãããšã«ãªããŸãããã®ã»ãã¥ãªãã£å¯Ÿçã¯ä¿è·ãç®çãšããŠããŸãããå³éã«ç£èŠãããªãéããäžåœãªã¢ã¯ã»ã¹ãèš±ãããšã«ãªããŸãã
AdminDSHolderã°ã«ãŒãã«é¢ãã詳现æ å ±ã¯ããã«ãããŸãã
DSRMè³æ Œæ å ±
ãã¹ãŠã®ãã¡ã€ã³ã³ã³ãããŒã©ãŒïŒDCïŒå ã«ã¯ãããŒã«ã«ç®¡çè ã¢ã«ãŠã³ããååšããŸãããã®ãããªãã·ã³ã§ç®¡çè æš©éãååŸããããšã§ãmimikatzã䜿çšããŠããŒã«ã«ç®¡çè ããã·ã¥ãæœåºã§ããŸãããã®åŸããã®ãã¹ã¯ãŒãã䜿çšã§ããããã«ããããã®ã¬ãžã¹ããªå€æŽãå¿ èŠã§ãããŒã«ã«ç®¡çè ã¢ã«ãŠã³ããžã®ãªã¢ãŒãã¢ã¯ã»ã¹ãå¯èœã«ããŸãã
{% content-ref url="dsrm-credentials.md" %} dsrm-credentials.md {% endcontent-ref %}
ACLæç¶æ§
ç¹å®ã®ãã¡ã€ã³ãªããžã§ã¯ãã«å¯ŸããŠãŠãŒã¶ãŒã«ç¹å¥ãªæš©éãäžããããšã§ããã®ãŠãŒã¶ãŒãå°æ¥çã«æš©éãææ Œãããããšãã§ããããã«ãªããŸãã
{% content-ref url="acl-persistence-abuse/" %} acl-persistence-abuse {% endcontent-ref %}
ã»ãã¥ãªãã£èšè¿°å
ã»ãã¥ãªãã£èšè¿°åã¯ããªããžã§ã¯ãããªããžã§ã¯ãã«å¯ŸããŠæã€æš©éãä¿åããããã«äœ¿çšãããŸãããªããžã§ã¯ãã®ã»ãã¥ãªãã£èšè¿°åã«å°ãã®å€æŽãå ããããšãã§ããã°ããã®ãªããžã§ã¯ãã«å¯ŸããŠç¹æš©ã°ã«ãŒãã®ã¡ã³ããŒã§ããå¿ èŠãªããéåžžã«èå³æ·±ãæš©éãååŸã§ããŸãã
{% content-ref url="security-descriptors.md" %} security-descriptors.md {% endcontent-ref %}
ã¹ã±ã«ãã³ããŒ
LSASSãã¡ã¢ãªå ã§å€æŽããŠããã¹ãŠã®ãã¡ã€ã³ã¢ã«ãŠã³ãã«ã¢ã¯ã»ã¹ãèš±å¯ãããŠãããŒãµã«ãã¹ã¯ãŒãã確ç«ããŸãã
{% content-ref url="skeleton-key.md" %} skeleton-key.md {% endcontent-ref %}
ã«ã¹ã¿ã SSP
SSPïŒã»ãã¥ãªãã£ãµããŒããããã€ããŒïŒãšã¯äœããããã§åŠã³ãŸãã
èªåã®SSPãäœæããŠããã·ã³ã«ã¢ã¯ã»ã¹ããããã«äœ¿çšãããè³æ Œæ
å ±ãå¹³æã§ãã£ããã£ããããšãã§ããŸãã\
{% content-ref url="custom-ssp.md" %} custom-ssp.md {% endcontent-ref %}
DCShadow
ADã«æ°ãããã¡ã€ã³ã³ã³ãããŒã©ãŒãç»é²ããæå®ããããªããžã§ã¯ãã«å±æ§ïŒSIDHistoryãSPNsãªã©ïŒãããã·ã¥ããããã«äœ¿çšããŸãããå€æŽã«é¢ãããã°ãæ®ããã«è¡ããŸããDAæš©éãå¿
èŠã§ãã«ãŒããã¡ã€ã³å
ã«ããå¿
èŠããããŸãã
ééã£ãããŒã¿ã䜿çšãããšãéåžžã«éããã°ã衚瀺ãããããšã«æ³šæããŠãã ããã
{% content-ref url="dcshadow.md" %} dcshadow.md {% endcontent-ref %}
LAPSæç¶æ§
以åã«ãLAPSãã¹ã¯ãŒããèªã¿åãããã®ååãªæš©éãããå Žåã«æš©éãææ Œãããæ¹æ³ã«ã€ããŠèª¬æããŸããããããããããã®ãã¹ã¯ãŒãã¯æç¶æ§ãç¶æããããã«ã䜿çšã§ããŸãã
確èªããŠãã ããïŒ
{% content-ref url="laps.md" %} laps.md {% endcontent-ref %}
ãã©ã¬ã¹ãæš©éææ Œ - ãã¡ã€ã³ä¿¡é Œ
Microsoftã¯ãã©ã¬ã¹ããã»ãã¥ãªãã£å¢çãšèŠãªããŠããŸããããã¯ãåäžã®ãã¡ã€ã³ã䟵害ããããšãããã©ã¬ã¹ãå šäœã®äŸµå®³ã«ã€ãªããå¯èœæ§ãããããšãæå³ããŸãã
åºæ¬æ å ±
ãã¡ã€ã³ä¿¡é Œã¯ããããã¡ã€ã³ã®ãŠãŒã¶ãŒãå¥ã®ãã¡ã€ã³ã®ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ã§ããããã«ããã»ãã¥ãªãã£ã¡ã«ããºã ã§ããããã¯ã2ã€ã®ãã¡ã€ã³ã®èªèšŒã·ã¹ãã éã«ãªã³ã¯ãäœæããèªèšŒç¢ºèªãã·ãŒã ã¬ã¹ã«æµããããšãå¯èœã«ããŸãããã¡ã€ã³ãä¿¡é Œãèšå®ãããšãç¹å®ã®ããŒã**ãã¡ã€ã³ã³ã³ãããŒã©ãŒïŒDCïŒ**å ã§äº€æãä¿æããŸããããã¯ä¿¡é Œã®æŽåæ§ã«ãšã£ãŠéèŠã§ãã
å žåçãªã·ããªãªã§ã¯ããŠãŒã¶ãŒãä¿¡é Œããããã¡ã€ã³ã®ãµãŒãã¹ã«ã¢ã¯ã»ã¹ããããšããå ŽåããŸãèªåã®ãã¡ã€ã³ã®DCããã€ã³ã¿ãŒã¬ã«ã TGTãšåŒã°ããç¹å¥ãªãã±ãããèŠæ±ããå¿ èŠããããŸãããã®TGTã¯ãäž¡æ¹ã®ãã¡ã€ã³ãåæããå ±æããŒã§æå·åãããŠããŸãããŠãŒã¶ãŒã¯ãã®TGTãä¿¡é Œããããã¡ã€ã³ã®DCã«æ瀺ããŠãµãŒãã¹ãã±ããïŒTGSïŒãååŸããŸããä¿¡é Œããããã¡ã€ã³ã®DCã«ãã£ãŠã€ã³ã¿ãŒã¬ã«ã TGTãæ£åžžã«æ€èšŒããããšãTGSãçºè¡ããããŠãŒã¶ãŒã¯ãµãŒãã¹ã«ã¢ã¯ã»ã¹ã§ããããã«ãªããŸãã
æé ïŒ
- ãã¡ã€ã³1ã®ã¯ã©ã€ã¢ã³ãã³ã³ãã¥ãŒã¿ãã**ãã¡ã€ã³ã³ã³ãããŒã©ãŒïŒDC1ïŒãããã±ããæäžãã±ããïŒTGTïŒ**ãèŠæ±ããããã»ã¹ãéå§ããŸãã
- ã¯ã©ã€ã¢ã³ããæ£åžžã«èªèšŒããããšãDC1ã¯æ°ããTGTãçºè¡ããŸãã
- ã¯ã©ã€ã¢ã³ãã¯ããã¡ã€ã³2ã®ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããã«å¿ èŠãªã€ã³ã¿ãŒã¬ã«ã TGTãDC1ã«èŠæ±ããŸãã
- ã€ã³ã¿ãŒã¬ã«ã TGTã¯ãDC1ãšDC2ã®éã§å ±æãããä¿¡é ŒããŒã§æå·åãããŠããŸãã
- ã¯ã©ã€ã¢ã³ãã¯ã€ã³ã¿ãŒã¬ã«ã TGTã**ãã¡ã€ã³2ã®ãã¡ã€ã³ã³ã³ãããŒã©ãŒïŒDC2ïŒ**ã«æã£ãŠãããŸãã
- DC2ã¯ãå ±æãããä¿¡é ŒããŒã䜿çšããŠã€ã³ã¿ãŒã¬ã«ã TGTãæ€èšŒããæå¹ãªå Žåãã¯ã©ã€ã¢ã³ããã¢ã¯ã»ã¹ããããã¡ã€ã³2ã®ãµãŒããŒã®ããã®**ãã±ããæäžãµãŒãã¹ïŒTGSïŒ**ãçºè¡ããŸãã
- æåŸã«ãã¯ã©ã€ã¢ã³ãã¯ãã®TGSããµãŒããŒã«æ瀺ãããµãŒããŒã®ã¢ã«ãŠã³ãããã·ã¥ã§æå·åãããŠããããããã¡ã€ã³2ã®ãµãŒãã¹ã«ã¢ã¯ã»ã¹ããŸãã
ç°ãªãä¿¡é Œ
ä¿¡é Œã¯1æ¹åãŸãã¯2æ¹åã§ããããšã«æ³šæããããšãéèŠã§ãã2æ¹åã®ãªãã·ã§ã³ã§ã¯ãäž¡æ¹ã®ãã¡ã€ã³ãäºãã«ä¿¡é ŒããŸããã1æ¹åã®ä¿¡é Œé¢ä¿ã§ã¯ãäžæ¹ã®ãã¡ã€ã³ãä¿¡é Œããããã¡ã€ã³ã§ãããäžæ¹ãä¿¡é Œãããã¡ã€ã³ã«ãªããŸãããã®å Žåãä¿¡é Œããããã¡ã€ã³ããä¿¡é Œãããã¡ã€ã³å ã®ãªãœãŒã¹ã«ã®ã¿ã¢ã¯ã»ã¹ã§ããããšã«ãªããŸãã
ãã¡ã€ã³Aããã¡ã€ã³Bãä¿¡é ŒããŠããå ŽåãAã¯ä¿¡é Œãããã¡ã€ã³ã§ãBã¯ä¿¡é Œããããã¡ã€ã³ã§ããããã«ããã¡ã€ã³Aã§ã¯ãããã¯ã¢ãŠãããŠã³ãä¿¡é Œãšãªãããã¡ã€ã³Bã§ã¯ãããã¯ã€ã³ããŠã³ãä¿¡é ŒãšãªããŸãã
ç°ãªãä¿¡é Œé¢ä¿
- 芪åä¿¡é ŒïŒããã¯ãåããã©ã¬ã¹ãå ã§äžè¬çãªèšå®ã§ãããåãã¡ã€ã³ã¯èªåçã«èŠªãã¡ã€ã³ãšã®åæ¹åã®æšç§»çä¿¡é Œãæã¡ãŸããåºæ¬çã«ãããã¯èªèšŒèŠæ±ã芪ãšåã®éã§ã·ãŒã ã¬ã¹ã«æµããããšãæå³ããŸãã
- ã¯ãã¹ãªã³ã¯ä¿¡é ŒïŒããã¯ãã·ã§ãŒãã«ããä¿¡é ŒããšåŒã°ããåãã¡ã€ã³éã§ç¢ºç«ãããåç §ããã»ã¹ãè¿ éåããŸããè€éãªãã©ã¬ã¹ãã§ã¯ãèªèšŒåç §ã¯éåžžããã©ã¬ã¹ãã®ã«ãŒããŸã§äžæããã¿ãŒã²ãããã¡ã€ã³ãŸã§äžéããå¿ èŠããããŸããã¯ãã¹ãªã³ã¯ãäœæããããšã§ãæ ãççž®ãããç¹ã«å°ççã«åæ£ããç°å¢ã§æçã§ãã
- å€éšä¿¡é ŒïŒããã¯ç°ãªãç¡é¢ä¿ãªãã¡ã€ã³éã§èšå®ãããéæšç§»çã§ããMicrosoftã®ææžã«ãããšãå€éšä¿¡é Œã¯ãçŸåšã®ãã©ã¬ã¹ãå€ã®ãã¡ã€ã³ã®ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããã«åœ¹ç«ã¡ãŸããããã¯ããã©ã¬ã¹ãä¿¡é Œã«ãã£ãŠæ¥ç¶ãããŠããªããã¡ã€ã³ã§ããå€éšä¿¡é Œã§ã¯ãSIDãã£ã«ã¿ãªã³ã°ãéããŠã»ãã¥ãªãã£ã匷åãããŸãã
- ããªãŒã®ã«ãŒãä¿¡é ŒïŒãããã®ä¿¡é Œã¯ããã©ã¬ã¹ãã®ã«ãŒããã¡ã€ã³ãšæ°ããè¿œå ãããããªãŒã®ã«ãŒãéã§èªåçã«ç¢ºç«ãããŸããäžè¬çã«ã¯ééããŸããããããªãŒã®ã«ãŒãä¿¡é Œã¯ããã©ã¬ã¹ãã«æ°ãããã¡ã€ã³ããªãŒãè¿œå ããããã«éèŠã§ããããŠããŒã¯ãªãã¡ã€ã³åãç¶æããåæ¹åã®æšç§»æ§ã確ä¿ããŸãã詳现æ å ±ã¯Microsoftã®ã¬ã€ãã§ç¢ºèªã§ããŸãã
- ãã©ã¬ã¹ãä¿¡é ŒïŒãã®ã¿ã€ãã®ä¿¡é Œã¯ã2ã€ã®ãã©ã¬ã¹ãã«ãŒããã¡ã€ã³éã®åæ¹åæšç§»çä¿¡é Œã§ãããã»ãã¥ãªãã£å¯Ÿçã匷åããããã«SIDãã£ã«ã¿ãªã³ã°ã匷å¶ããŸãã
- MITä¿¡é ŒïŒãããã®ä¿¡é Œã¯ãéWindowsã®RFC4120æºæ ã®Kerberosãã¡ã€ã³ãšã®éã§ç¢ºç«ãããŸããMITä¿¡é Œã¯ãWindowsãšã³ã·ã¹ãã ã®å€éšã§KerberosããŒã¹ã®ã·ã¹ãã ãšã®çµ±åãå¿ èŠãšããç°å¢ã«ç¹åããŠããŸãã
ä¿¡é Œé¢ä¿ã®ä»ã®éã
- ä¿¡é Œé¢ä¿ã¯æšç§»çïŒAãBãä¿¡é ŒããBãCãä¿¡é Œããå ŽåãAã¯Cãä¿¡é ŒããïŒãŸãã¯éæšç§»çã§ããããšããããŸãã
- ä¿¡é Œé¢ä¿ã¯åæ¹åä¿¡é ŒïŒäž¡æ¹ãäºãã«ä¿¡é ŒããïŒãŸãã¯äžæ¹åä¿¡é ŒïŒäžæ¹ã ããä»æ¹ãä¿¡é ŒããïŒãšããŠèšå®ã§ããŸãã
æ»æãã¹
- ä¿¡é Œé¢ä¿ãåæãã
- ã©ã®ã»ãã¥ãªãã£ããªã³ã·ãã«ïŒãŠãŒã¶ãŒ/ã°ã«ãŒã/ã³ã³ãã¥ãŒã¿ïŒãä»ã®ãã¡ã€ã³ã®ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ã§ãããã確èªããŸããACEãšã³ããªãä»ã®ãã¡ã€ã³ã®ã°ã«ãŒãã«ããããšã«ãã£ãŠããã¡ã€ã³éã®é¢ä¿ãæ¢ããŸãïŒãã®ããã«ä¿¡é Œãäœæãããå¯èœæ§ããããŸãïŒã
- ãã®å Žåãkerberoastãå¥ã®ãªãã·ã§ã³ã«ãªãå¯èœæ§ããããŸãã
- ã¢ã«ãŠã³ãã䟵害ãããã¡ã€ã³ãããããããããšãã§ããŸãã
æ»æè ã¯ãä»ã®ãã¡ã€ã³ã®ãªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããã«ãäž»ã«3ã€ã®ã¡ã«ããºã ã䜿çšã§ããŸãïŒ
- ããŒã«ã«ã°ã«ãŒãã¡ã³ããŒã·ããïŒããªã³ã·ãã«ã¯ããµãŒããŒã®ãAdministratorsãã°ã«ãŒããªã©ããã·ã³ã®ããŒã«ã«ã°ã«ãŒãã«è¿œå ãããããšãããããã®ãã·ã³ã«å¯ŸããŠéèŠãªå¶åŸ¡ãäžããŸãã
- å€åœãã¡ã€ã³ã°ã«ãŒãã¡ã³ããŒã·ããïŒããªã³ã·ãã«ã¯ãå€åœãã¡ã€ã³å ã®ã°ã«ãŒãã®ã¡ã³ããŒã§ããããŸãããã ãããã®æ¹æ³ã®å¹æã¯ãä¿¡é Œã®æ§è³ªãšã°ã«ãŒãã®ç¯å²ã«äŸåããŸãã
- ã¢ã¯ã»ã¹å¶åŸ¡ãªã¹ãïŒACLïŒïŒããªã³ã·ãã«ã¯ãç¹å®ã®ãªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãæäŸããACLãç¹ã«DACLå ã®ACEã®ãšã³ãã£ãã£ãšããŠæå®ãããããšããããŸããACLãDACLãããã³ACEã®ã¡ã«ããºã ã«æ·±ãå ¥ãããæ¹ã«ã¯ããã¯ã€ãããŒããŒãAn ACE Up The Sleeveãã貎éãªãªãœãŒã¹ã§ãã
åãã芪ãžã®ãã©ã¬ã¹ãæš©éææ Œ
Get-DomainTrust
SourceName : sub.domain.local --> current domain
TargetName : domain.local --> foreign domain
TrustType : WINDOWS_ACTIVE_DIRECTORY
TrustAttributes : WITHIN_FOREST --> WITHIN_FOREST: Both in the same forest
TrustDirection : Bidirectional --> Trust direction (2ways in this case)
WhenCreated : 2/19/2021 1:28:00 PM
WhenChanged : 2/19/2021 1:28:00 PM
{% hint style="warning" %}
2ã€ã®ä¿¡é ŒãããããŒããããŸãã1ã€ã¯ Child --> Parent çšããã1ã€ã¯ Parent --> Child çšã§ãã
çŸåšã®ãã¡ã€ã³ã§äœ¿çšãããŠãããã®ã次ã®ã³ãã³ãã§ç¢ºèªã§ããŸãïŒ
Invoke-Mimikatz -Command '"lsadump::trust /patch"' -ComputerName dc.my.domain.local
Invoke-Mimikatz -Command '"lsadump::dcsync /user:dcorp\mcorp$"'
{% endhint %}
SID-History Injection
ãšã³ã¿ãŒãã©ã€ãºç®¡çè ãšããŠãSID-Historyã€ã³ãžã§ã¯ã·ã§ã³ãæªçšããŠå/芪ãã¡ã€ã³ã«ææ ŒããŸãïŒ
{% content-ref url="sid-history-injection.md" %} sid-history-injection.md {% endcontent-ref %}
æžã蟌ã¿å¯èœãªæ§æNCã®æªçš
æ§æåœåã³ã³ããã¹ãïŒNCïŒãã©ã®ããã«æªçšãããããç解ããããšã¯éèŠã§ããæ§æNCã¯ãActive DirectoryïŒADïŒç°å¢å ã®ãã©ã¬ã¹ãå šäœã®æ§æããŒã¿ã®äžå€®ãªããžããªãšããŠæ©èœããŸãããã®ããŒã¿ã¯ãã©ã¬ã¹ãå ã®ãã¹ãŠã®ãã¡ã€ã³ã³ã³ãããŒã©ãŒïŒDCïŒã«è€è£œãããæžã蟌ã¿å¯èœãªDCã¯æ§æNCã®æžã蟌ã¿å¯èœãªã³ããŒãä¿æããŸãããããæªçšããã«ã¯ãDCäžã§SYSTEMæš©éãæã€å¿ èŠããããŸããã§ããã°åDCãæãŸããã§ãã
GPOãã«ãŒãDCãµã€ãã«ãªã³ã¯ãã
æ§æNCã®ãµã€ãã³ã³ããã«ã¯ãADãã©ã¬ã¹ãå ã®ãã¹ãŠã®ãã¡ã€ã³åå ã³ã³ãã¥ãŒã¿ã®ãµã€ãã«é¢ããæ å ±ãå«ãŸããŠããŸããä»»æã®DCã§SYSTEMæš©éãæã£ãŠæäœããããšã§ãæ»æè ã¯GPOãã«ãŒãDCãµã€ãã«ãªã³ã¯ã§ããŸãããã®ã¢ã¯ã·ã§ã³ã¯ããããã®ãµã€ãã«é©çšãããããªã·ãŒãæäœããããšã«ãã£ãŠãã«ãŒããã¡ã€ã³ãå±éºã«ãããå¯èœæ§ããããŸãã
詳现æ å ±ã«ã€ããŠã¯ãSIDãã£ã«ã¿ãªã³ã°ã®ãã€ãã¹ã«é¢ããç 究ãæ¢ãããšãã§ããŸãã
ãã©ã¬ã¹ãå ã®ä»»æã®gMSAãå±éºã«ããã
æ»æãã¯ãã«ã¯ããã¡ã€ã³å ã®ç¹æš©gMSAãã¿ãŒã²ããã«ããããšã§ããgMSAã®ãã¹ã¯ãŒããèšç®ããããã«å¿ èŠãªKDSã«ãŒãããŒã¯ãæ§æNCå ã«ä¿åãããŠããŸããä»»æã®DCã§SYSTEMæš©éãæã€ããšã§ãKDSã«ãŒãããŒã«ã¢ã¯ã»ã¹ãããã©ã¬ã¹ãå ã®ä»»æã®gMSAã®ãã¹ã¯ãŒããèšç®ããããšãå¯èœã§ãã
詳现ãªåæã¯ããŽãŒã«ãã³gMSAä¿¡é Œæ»æã«é¢ããè°è«ã§èŠã€ããããšãã§ããŸãã
ã¹ããŒãå€æŽæ»æ
ãã®æ¹æ³ã¯ãæ°ããç¹æš©ADãªããžã§ã¯ãã®äœæãåŸ ã€å¿èãå¿ èŠã§ããSYSTEMæš©éãæã€æ»æè ã¯ãADã¹ããŒããå€æŽããŠä»»æã®ãŠãŒã¶ãŒã«ãã¹ãŠã®ã¯ã©ã¹ã«å¯Ÿããå®å šãªå¶åŸ¡ãä»äžã§ããŸããããã«ãããæ°ããäœæãããADãªããžã§ã¯ããžã®äžæ£ã¢ã¯ã»ã¹ãšå¶åŸ¡ãå¯èœã«ãªãå¯èœæ§ããããŸãã
ãããªãèªã¿ç©ã¯ãã¹ããŒãå€æŽä¿¡é Œæ»æã§å©çšã§ããŸãã
ADCS ESC5ã䜿çšããŠDAããEAãž
ADCS ESC5ã®è匱æ§ã¯ããã©ã¬ã¹ãå ã®ä»»æã®ãŠãŒã¶ãŒãšããŠèªèšŒãå¯èœã«ãã蚌ææžãã³ãã¬ãŒããäœæããããã«ãå ¬ééµåºç€ïŒPKIïŒãªããžã§ã¯ãã®å¶åŸ¡ãã¿ãŒã²ããã«ããŠããŸããPKIãªããžã§ã¯ãã¯æ§æNCã«ååšãããããæžã蟌ã¿å¯èœãªåDCãå±éºã«ãããããšã§ESC5æ»æãå®è¡ã§ããŸãã
ããã«é¢ãã詳现ã¯ãESC5ã䜿çšããŠDAããEAãžã§èªãããšãã§ããŸããADCSããªãã·ããªãªã§ã¯ãæ»æè ã¯å¿ èŠãªã³ã³ããŒãã³ããèšå®ããèœåãæã£ãŠãããåãã¡ã€ã³ç®¡çè ãããšã³ã¿ãŒãã©ã€ãºç®¡çè ãžã®ææ Œã§è°è«ãããŠããŸãã
å€éšãã©ã¬ã¹ããã¡ã€ã³ - äžæ¹åïŒã€ã³ããŠã³ãïŒãŸãã¯åæ¹å
Get-DomainTrust
SourceName : a.domain.local --> Current domain
TargetName : domain.external --> Destination domain
TrustType : WINDOWS-ACTIVE_DIRECTORY
TrustAttributes :
TrustDirection : Inbound --> Inboud trust
WhenCreated : 2/19/2021 10:50:56 PM
WhenChanged : 2/19/2021 10:50:56 PM
ãã®ã·ããªãªã§ã¯ãããªãã®ãã¡ã€ã³ãå€éšã®ãã¡ã€ã³ã«ãã£ãŠä¿¡é ŒãããŠããŸããããã«ãããäžæãªæš©éãäžããããŸããããªãã¯ãããªãã®ãã¡ã€ã³ã®ã©ã®ããªã³ã·ãã«ãå€éšãã¡ã€ã³ã«å¯ŸããŠã©ã®ãããªã¢ã¯ã»ã¹æš©ãæã£ãŠããããèŠã€ãããããæªçšããããšããå¿ èŠããããŸãã
{% content-ref url="external-forest-domain-oneway-inbound.md" %} external-forest-domain-oneway-inbound.md {% endcontent-ref %}
å€éšãã©ã¬ã¹ããã¡ã€ã³ - äžæ¹åïŒã¢ãŠãããŠã³ãïŒ
Get-DomainTrust -Domain current.local
SourceName : current.local --> Current domain
TargetName : external.local --> Destination domain
TrustType : WINDOWS_ACTIVE_DIRECTORY
TrustAttributes : FOREST_TRANSITIVE
TrustDirection : Outbound --> Outbound trust
WhenCreated : 2/19/2021 10:15:24 PM
WhenChanged : 2/19/2021 10:15:24 PM
ãã®ã·ããªãªã§ã¯ãããªãã®ãã¡ã€ã³ãç°ãªããã¡ã€ã³ã®ããªã³ã·ãã«ã«ç¹æš©ãä¿¡é ŒããŠããŸãã
ãããããã¡ã€ã³ãä¿¡é Œããããšãä¿¡é Œããããã¡ã€ã³ã¯äºæž¬å¯èœãªååã®ãŠãŒã¶ãŒãäœæããä¿¡é Œããããã¹ã¯ãŒãããã¹ã¯ãŒããšããŠäœ¿çšããŸããããã¯ãä¿¡é Œãããã¡ã€ã³ã®ãŠãŒã¶ãŒã«ã¢ã¯ã»ã¹ããŠä¿¡é Œããããã¡ã€ã³ã«å ¥ãããšãå¯èœã§ãããããããåæããŠããã«ç¹æš©ãææ Œãããããšãã§ããããšãæå³ããŸãã
{% content-ref url="external-forest-domain-one-way-outbound.md" %} external-forest-domain-one-way-outbound.md {% endcontent-ref %}
ä¿¡é Œããããã¡ã€ã³ã䟵害ããå¥ã®æ¹æ³ã¯ããã¡ã€ã³ä¿¡é Œã®éæ¹åã«äœæãããSQLä¿¡é Œãªã³ã¯ãèŠã€ããããšã§ãïŒããã¯ããŸãäžè¬çã§ã¯ãããŸããïŒã
ä¿¡é Œããããã¡ã€ã³ã䟵害ããå¥ã®æ¹æ³ã¯ãä¿¡é Œããããã¡ã€ã³ã®ãŠãŒã¶ãŒãã¢ã¯ã»ã¹ã§ãããã·ã³ã§åŸ
æ©ããRDPãä»ããŠãã°ã€ã³ããããšã§ãã次ã«ãæ»æè
ã¯RDPã»ãã·ã§ã³ããã»ã¹ã«ã³ãŒãã泚å
¥ãããããã被害è
ã®å
ã®ãã¡ã€ã³ã«ã¢ã¯ã»ã¹ã§ããŸãã
ããã«ã被害è
ãããŒããã©ã€ããããŠã³ãããŠããå ŽåãRDPã»ãã·ã§ã³ããã»ã¹ããæ»æè
ã¯ããŒããã©ã€ãã®ã¹ã¿ãŒãã¢ãããã©ã«ããŒã«ããã¯ãã¢ãä¿åã§ããŸãããã®æè¡ã¯RDPInceptionãšåŒã°ããŸãã
{% content-ref url="rdp-sessions-abuse.md" %} rdp-sessions-abuse.md {% endcontent-ref %}
ãã¡ã€ã³ä¿¡é Œã®æªçšç·©å
SIDãã£ã«ã¿ãªã³ã°:
- ãã©ã¬ã¹ãä¿¡é Œã«ãããSIDå±¥æŽå±æ§ãå©çšããæ»æã®ãªã¹ã¯ã¯ãSIDãã£ã«ã¿ãªã³ã°ã«ãã£ãŠè»œæžãããããã¯ãã¹ãŠã®ã€ã³ã¿ãŒãã©ã¬ã¹ãä¿¡é Œã§ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸããããã¯ããã€ã¯ããœããã®ç«å Žã«åŸãããã©ã¬ã¹ããã»ãã¥ãªãã£å¢çãšèŠãªãããšããæãç«ã£ãŠããŸãã
- ãããã泚æç¹ããããŸãïŒSIDãã£ã«ã¿ãªã³ã°ã¯ã¢ããªã±ãŒã·ã§ã³ããŠãŒã¶ãŒã¢ã¯ã»ã¹ã«åœ±é¿ãäžããå¯èœæ§ãããããã®ããææç¡å¹ã«ãããããšããããŸãã
éžæçèªèšŒ:
- ã€ã³ã¿ãŒãã©ã¬ã¹ãä¿¡é Œã«å¯ŸããŠãéžæçèªèšŒã䜿çšããããšã§ã2ã€ã®ãã©ã¬ã¹ãã®ãŠãŒã¶ãŒãèªåçã«èªèšŒãããªãããã«ããŸãã代ããã«ãä¿¡é Œãããã¡ã€ã³ãŸãã¯ãã©ã¬ã¹ãå ã®ãã¡ã€ã³ããµãŒããŒã«ã¢ã¯ã»ã¹ããããã«ã¯æ瀺çãªæš©éãå¿ èŠã§ãã
- ãããã®å¯Ÿçã¯ãæžã蟌ã¿å¯èœãªæ§æåã³ã³ããã¹ãïŒNCïŒã®æªçšãä¿¡é Œã¢ã«ãŠã³ããžã®æ»æããä¿è·ãããã®ã§ã¯ãªãããšã«æ³šæãå¿ èŠã§ãã
ãã¡ã€ã³ä¿¡é Œã«é¢ãã詳现æ å ±ã¯ired.teamã§ã
AD -> Azure & Azure -> AD
{% embed url="https://cloud.hacktricks.xyz/pentesting-cloud/azure-security/az-lateral-movements/azure-ad-connect-hybrid-identity" %}
äžè¬çãªé²åŸ¡ç
ããã§è³æ Œæ å ±ãä¿è·ããæ¹æ³ã«ã€ããŠè©³ããåŠã¶ã\
è³æ Œæ å ±ä¿è·ã®ããã®é²åŸ¡ç
- ãã¡ã€ã³ç®¡çè ã®å¶é: ãã¡ã€ã³ç®¡çè ã¯ãã¡ã€ã³ã³ã³ãããŒã©ãŒã«ã®ã¿ãã°ã€ã³ãèš±å¯ããä»ã®ãã¹ãã§ã®äœ¿çšãé¿ããããšãæšå¥šãããŸãã
- ãµãŒãã¹ã¢ã«ãŠã³ãã®ç¹æš©: ãµãŒãã¹ã¯ã»ãã¥ãªãã£ãç¶æããããã«ãã¡ã€ã³ç®¡çè ïŒDAïŒç¹æš©ã§å®è¡ãããã¹ãã§ã¯ãããŸããã
- äžæçç¹æš©å¶é: DAç¹æš©ãå¿
èŠãšããã¿ã¹ã¯ã«ã€ããŠã¯ããã®æéãå¶éããã¹ãã§ããããã¯æ¬¡ã®ããã«å®çŸã§ããŸãïŒ
Add-ADGroupMember -Identity âDomain Adminsâ -Members newDA -MemberTimeToLive (New-TimeSpan -Minutes 20)
欺çæè¡ã®å®è£
- 欺çãå®è£ ããã«ã¯ããã¹ã¯ãŒããæéåãã«ãªããªãããå§ä»»ã®ããã«ä¿¡é ŒãããŠãããšããŒã¯ããããã³ã€ãŠãŒã¶ãŒãã³ã³ãã¥ãŒã¿ã®ãããªçœ ãèšå®ããŸãã詳现ãªã¢ãããŒãã«ã¯ãç¹å®ã®æš©å©ãæã€ãŠãŒã¶ãŒãäœæããããé«ç¹æš©ã°ã«ãŒãã«è¿œå ãããããããšãå«ãŸããŸãã
- å®çšçãªäŸãšããŠã次ã®ãããªããŒã«ã䜿çšããŸãïŒ
Create-DecoyUser -UserFirstName user -UserLastName manager-uncommon -Password Pass@123 | DeployUserDeception -UserFlag PasswordNeverExpires -GUID d07da11f-8a3d-42b6-b0aa-76c962be719a -Verbose
- 欺çæè¡ã®å±éã«é¢ãã詳现ã¯ãDeploy-Deception on GitHubã§èŠã€ããããšãã§ããŸãã
欺çã®ç¹å®
- ãŠãŒã¶ãŒãªããžã§ã¯ãã®å Žå: çãããææšã«ã¯ãç°åžžãªObjectSIDãé »ç¹ã§ãªããã°ãªã³ãäœææ¥ãäœãäžæ£ãã¹ã¯ãŒãã«ãŠã³ããå«ãŸããŸãã
- äžè¬çãªææš: æœåšçãªãã³ã€ãªããžã§ã¯ãã®å±æ§ãæ¬ç©ã®ãã®ãšæ¯èŒããããšã§äžäžèŽãæããã«ãªãããšããããŸããããŒã«ã®ãããªHoneypotBusterã¯ããã®ãããªæ¬ºçãç¹å®ããã®ã«åœ¹ç«ã¡ãŸãã
æ€åºã·ã¹ãã ã®åé¿
- Microsoft ATAæ€åºåé¿:
- ãŠãŒã¶ãŒåæ: ãã¡ã€ã³ã³ã³ãããŒã©ãŒã§ã®ã»ãã·ã§ã³åæãé¿ããATAæ€åºãé²ããŸãã
- ãã±ããã®åœè£ : ãã±ããäœæã«aesããŒã䜿çšããããšã§ãNTLMã«ããŠã³ã°ã¬ãŒãããã«æ€åºãåé¿ããŸãã
- DCSyncæ»æ: ATAæ€åºãé¿ããããã«ããã¡ã€ã³ã³ã³ãããŒã©ãŒããçŽæ¥å®è¡ããã®ã§ã¯ãªããéãã¡ã€ã³ã³ã³ãããŒã©ãŒããå®è¡ããããšãæšå¥šãããŸãã
åèæç®
- http://www.harmj0y.net/blog/redteaming/a-guide-to-attacking-domain-trusts/
- https://www.labofapenetrationtester.com/2018/10/deploy-deception.html
- https://ired.team/offensive-security-experiments/active-directory-kerberos-abuse/child-domain-da-to-ea-in-parent-domain
{% hint style="success" %}
AWSãããã³ã°ãåŠã³ãå®è·µããïŒHackTricks Training AWS Red Team Expert (ARTE)
GCPãããã³ã°ãåŠã³ãå®è·µããïŒHackTricks Training GCP Red Team Expert (GRTE)
HackTricksããµããŒããã
- ãµãã¹ã¯ãªãã·ã§ã³ãã©ã³ã確èªããŠãã ããïŒ
- ð¬ Discordã°ã«ãŒããŸãã¯ãã¬ã°ã©ã ã°ã«ãŒãã«åå ããããTwitterã§ãã©ããŒããŠãã ãã ðŠ @hacktricks_live.**
- ãããã³ã°ã®ããªãã¯ãå ±æããã«ã¯ãHackTricksããã³HackTricks Cloudã®GitHubãªããžããªã«PRãéä¿¡ããŠãã ããã