<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Privilege Escalation on LEIKAH</title><link>https://leikah.haoyingcao.xyz/en/tags/privilege-escalation/</link><description>Recent content in Privilege Escalation on LEIKAH</description><generator>Hugo</generator><language>en</language><atom:link href="https://leikah.haoyingcao.xyz/en/tags/privilege-escalation/index.xml" rel="self" type="application/rss+xml"/><item><title>Abuse ACL access over groups</title><link>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/acl_abuse/group/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/acl_abuse/group/</guid><description>&lt;p&gt;Member principals within a Active Directory group automatically inherits the accesses and privileges granted to that group. If the principal we control have sufficient privileges over a group (&lt;code&gt;GenericAll&lt;/code&gt;, &lt;code&gt;GenericWrite&lt;/code&gt;, &lt;code&gt;AllExtendedRights&lt;/code&gt; or &lt;code&gt;Self-Membership&lt;/code&gt;), we can add another principal (e.g. a low-priv user) to the group so the principal inherits all access rights granted to the group.&lt;/p&gt;
&lt;h2 id="linux-perspective"&gt;Linux Perspective&lt;a class="td-heading-self-link" href="#linux-perspective" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;From a Linux attacker machine, we can use bloodyAD to add a user to a group.&lt;/p&gt;</description></item><item><title>Abuse ACL Access over User</title><link>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/acl_abuse/control_over_user/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/acl_abuse/control_over_user/</guid><description>&lt;h2 id="force-change-password"&gt;Force Change Password&lt;a class="td-heading-self-link" href="#force-change-password" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The most naive method is to simply change that user&amp;rsquo;s password. With &lt;code&gt;ForceChangePassword&lt;/code&gt; access, which is included with &lt;code&gt;GenericAll&lt;/code&gt; access on a user, we should be able to change that user&amp;rsquo;s password without knowing their current password.&lt;/p&gt;
&lt;div class="alert alert-primary" role="alert"&gt;&lt;div class="h4 alert-heading" role="heading"&gt;Note&lt;/div&gt;
&lt;p&gt;Change an account&amp;rsquo;s password is considered &lt;strong&gt;destructive&lt;/strong&gt; to the environment due to the potential disruption it may cause. With the account&amp;rsquo;s password changed, Users may not be able to log in. If the account is a service account, the service can become unavailable. During real-life engagements, only use this technique if written consent from the client is obtained.&lt;/p&gt;</description></item><item><title>ACL Abuse</title><link>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/acl_abuse/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/acl_abuse/</guid><description>&lt;p&gt;Permissions in Active Directory are controlled through &lt;strong&gt;Access Control Lists (ACL)&lt;/strong&gt;. Each security principal (user, group, process) has a corresponding ACL. ACLs define both who has access to which assets or resource, and what level of access they are granted. ACLs are made up of &lt;strong&gt;Access Control Entries (ACE)&lt;/strong&gt; that explicity allow and/or deny users or groups from access.&lt;/p&gt;
&lt;p&gt;If misconfigured, ACLs can be leveraged by attackers to achieve lateral movement or privilege escalation inside the domain. The abuse of ACL access rights are dependent on the specific access granted to the attacking user.&lt;/p&gt;</description></item><item><title>ASREProasting</title><link>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/kerberos/asreproast/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/kerberos/asreproast/</guid><description>&lt;h2 id="theory"&gt;Theory&lt;a class="td-heading-self-link" href="#theory" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Normally, in order for users to obtain their &lt;strong&gt;Ticket Granting Ticket (TGT)&lt;/strong&gt; from the &lt;strong&gt;Key Distribution Center (KDC)&lt;/strong&gt;, they have to verify their identity via &lt;strong&gt;pre-authentication&lt;/strong&gt;. If the verification is successful, the KDC would then send a TGT back inside its &lt;strong&gt;Authentication Service Response (AS-REP)&lt;/strong&gt;, which is encrypted with a key derived from the user&amp;rsquo;s password.&lt;/p&gt;
&lt;p&gt;Active Directory has an option inside the user&amp;rsquo;s &lt;strong&gt;User Account Control (UAC)&lt;/strong&gt; settings called &lt;strong&gt;Do not require Kerberos pre-authentication&lt;/strong&gt;. As its name suggests, the KDC would response with the &lt;strong&gt;AS-REP&lt;/strong&gt; containing the user&amp;rsquo;s encrypted TGT without first verifying the user&amp;rsquo;s identity.&lt;/p&gt;</description></item><item><title>Group Managed Service Account</title><link>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/acl_abuse/gmsa/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/acl_abuse/gmsa/</guid><description>&lt;p&gt;The need to protect service accounts against attacks such as Kerberoasting gave rise to &lt;strong&gt;Managed Service Accounts (MSA)&lt;/strong&gt; and later &lt;strong&gt;Group Managed Service Accounts (gMSA)&lt;/strong&gt;. While both supports automatic password generation and rotation, the latter allows the same service accounts to be used acrossed different machines.&lt;/p&gt;
&lt;p&gt;Members of the group that manage the gMSA are intended to be the machine accounts of the computers where the service account will be deployed on. Members have the ability to read the password hash of the service account (&lt;code&gt;ReadGMSAPassword&lt;/code&gt;).&lt;/p&gt;</description></item><item><title>Kerberoasting</title><link>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/kerberos/kerberoast/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/kerberos/kerberoast/</guid><description>&lt;p&gt;Kerberoasting is a privilege escalation technique for Active Directory credited to security researcher Tim Medin, who presented the attack back in 2014. The attack targets domain accounts with &lt;strong&gt;Service Principal Names (SPN)&lt;/strong&gt;, which are unique identifiers that Kerberos uses to map a service to a domain service account in whose context the service is running.&lt;/p&gt;
&lt;h2 id="theory"&gt;Theory&lt;a class="td-heading-self-link" href="#theory" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Once the user completes pre-authentication, the Kerberos KDC (Key Distribution Center) issues the user a Ticket Granting Ticket (TGT). The user can then use the TGT to obtain a &lt;strong&gt;service ticket&lt;/strong&gt; from the Ticket Granting Service (TGS) at the KDC. The service ticket is issued for a particular service principal, whose password hash is used to encrypt the service ticket. Users can then use the service ticket to authenticate to the service principal to access the service.&lt;/p&gt;</description></item><item><title>Kerberos</title><link>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/kerberos/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/kerberos/</guid><description>&lt;p&gt;Kerberos is a ticket-based network protocol that enables centralized authentication and authorization management in a network. This is the process a client goes through to access a service in a Kerberos network:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Client requests a &lt;strong&gt;Ticket Granting Ticket (TGT)&lt;/strong&gt; from the &lt;strong&gt;Auethenitcation Service (AS)&lt;/strong&gt; of the &lt;strong&gt;Key Distribution Center (KDC)&lt;/strong&gt; (AS-REQ).&lt;/li&gt;
&lt;li&gt;The KDC authenticates the client, then sends back a response (AS-REP).&lt;/li&gt;
&lt;li&gt;Client decrypts the AS-REP using the hash of their password, obtaining the TGT.&lt;/li&gt;
&lt;li&gt;Client hands the TGT to the &lt;strong&gt;Ticket Granting Service (TGS)&lt;/strong&gt; alongside the &lt;strong&gt;service principal name (SPN)&lt;/strong&gt; of the service they are attempting to access (TGS-REQ).&lt;/li&gt;
&lt;li&gt;TGS after verifying the TGT and ensure the client can access the SPN, then responds to the client&amp;rsquo;s request (TGS-REP).&lt;/li&gt;
&lt;li&gt;Client decrypts TGS-REP, obtaining the service ticket.&lt;/li&gt;
&lt;li&gt;Client hands the service ticket to the service.&lt;/li&gt;
&lt;li&gt;The service decrypts the service ticket using the password hash of its service account and verifies its content, then grants the client access.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Microsoft&amp;rsquo;s implementation of Kerberos sits at the center of Active Directory. The &lt;strong&gt;Domain Controllers (DC)&lt;/strong&gt; acts as the KDC, enabling both centralized storage of credentials as well as user privileges and permissions. At the same time, different steps within the Kerberos authentication flow can be leveraged by attackers to obtain access to accounts and services. Attackers can use responses from the KDC to crack the target&amp;rsquo;s password offline (roasting attacks), extract Kerberos tickets from compromised machines, or forge tickets to escalate their privileges.&lt;/p&gt;</description></item><item><title>Lateral Movement and Privilege Escalation</title><link>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://leikah.haoyingcao.xyz/en/docs/active_directory/movement/</guid><description>&lt;p&gt;Lateral movement and privilege escalation within the Active Directory domain is a gradual and cyclical process of analyzing the access our account(s) have on the domain&amp;rsquo;s principals (other users, groups, machines, services), and abusing those accesses to either access other machines or services, or other more-privileged accounts. We repeat this process with the end-goal of achieving total domain compromise.&lt;/p&gt;
&lt;p&gt;Misconfigurations of accesses and privileges are what enables attacker&amp;rsquo;s movement with Active Directory. Rather than obtaining access after exploiting a vulnerability, more commonly, the attacker simply &lt;strong&gt;logs in&lt;/strong&gt;.&lt;/p&gt;</description></item></channel></rss>