CyberGen - CL-report
CyberGen - CL-report
Contents
INTRODUCTION................................................................................................................................................................... 3
REPORT STRUCTURE........................................................................................................................................................... 3
EXECUTIVE SUMMARY....................................................................................................................................................... 4
SCOPE OF WORK................................................................................................................................................................ 4
TIMELINE............................................................................................................................................................................. 4
ASSESSMENT SUMMARY...................................................................................................................................................... 5
POSITIVE PRACTICES IDENTIFIED.......................................................................................................................................... 6
HIGH-LEVEL SIGNIFICANT TECHNICAL FINDINGS.................................................................................................................... 7
STRATEGIC RECOMMENDATIONS.......................................................................................................................................... 7
ATTACK KILL CHAIN.......................................................................................................................................................... 9
RECONNAISSANCE............................................................................................................................................................... 9
TARGET DEVELOPMENT..................................................................................................................................................... 10
INTRUSION......................................................................................................................................................................... 10
LATERAL MOVEMENT......................................................................................................................................................... 11
DATA EXFILTRATION.......................................................................................................................................................... 11
OPERATIONS NARRATIVE............................................................................................................................................... 12
INITIAL ACCESS................................................................................................................................................................. 12
NETWORK PROPAGATION................................................................................................................................................... 18
CLOSURE....................................................................................................................................................................... 27
TECHNICAL DETAILS....................................................................................................................................................... 28
Introduction
Report Structure
The report is structured as follows:
▪ Executive Summary: This section contains information about the assessment, what assets were tested,
and a high-level summary of findings and recommendations for remedial actions.
▪ Attack Kill Chain: This section provides a brief overview of the methodology typically used to simulate this
type of assessment.
▪ Operations Narrative: This section walks through the Attack Kill Chain and the Tactics, Techniques and
Procedures (TTPs) used during the execution of our attacks.
▪ Technical Details: Contains the technical descriptions of the findings and any associated risks Client, LLC
(“Client) technical team may wish to consider when remediating. This section highlights evidence collected
during the tests and proposes steps or activities required to resolve the issues outlined.
Executive Summary
Client, LLC (“Client”) engaged CyberGen, LLC (“CyberGen”, “Consultants”, “Offensive Security team”) to execute
Attack and Penetration tests against its internal network infrastructure, from the standpoint of an adversary who had
established a network connection within the internal network.
The Offensive Security team employed the concept of path of least resistance attack kill chains to execute these
tests, which focused on attempting to access Client’s resources by exploiting identified security weaknesses, which
would provide the least resistance to an adversary.
The following is an explanation of the access provided to the team during the internal penetration test:
▪ Client deployed an instance of a Kali Linux system within Client’s internal network, which could provide the
Offensive Security team access to the internal network of Client.
▪ Client also deployed a Windows Operating System on the internal network, which served as a Jump Box
from outside the network.
▪ The CyberGen Offensive Security team first connected to the Windows Jump Box and then connected to the
Kali Linux system from the Jump Box via SSH and also Remote Desktop Protocol (RDP).
▪ The Kali Linux system was used to execute the test within Client internal network environment.
Throughout the execution of the tests, the Offensive Security team identified several positive findings, and also
identified some vulnerabilities and attack vectors. The detailed findings are listed in the TECHNICAL DETAILS
section.
Most importantly, these tests did not, nor were they intended to, identify all the potential vulnerabilities or
attack vectors on all systems within the networks.
Scope of Work
The in-scope subnets and domain(s) are listed below.
Timeline
Various tests were conducted throughout the timeframe listed below.
Assessment Summary
Throughout this report, the Offensive Security team uses certain notations to articulate the severity of the findings
identified. This severity level takes into consideration the following factors:
▪ Likelihood of a vulnerability or an attack vector being exploited or abused
▪ Ease of exploitation or abuse
▪ Resulting level of access to the host and the network
▪ Impact on business
The CyberGen Offensive Security team has assessed the risk ratings and should be used as a guide to understand
the priority of carrying out any remedial actions. However, individual risk ratings should be reviewed in line with
Client’s knowledge of the technical environment and with the business context of the systems being reviewed. This
may result in Client assigning different severity levels to the ones highlighted in the report. A guide to the scoring
and examples of vulnerabilities that fall into certain scores can be found below:
Severity Description
High The adversary would gain full control over the system or application (e.g. administrative, root
rights). This would also relate to attacks that would render the system or its data unusable,
irreparably damage the company’s reputation, or extract highly sensitive information that, if made
public, could cause considerable damage to the company.
Medium Medium risk vulnerabilities relate to findings that would not lead to a direct compromise of the
system or data but could be used to gain further access. Exposure could impact business systems
and business operations could experience a reduction in performance. These would often be used
in a chained attack to obtain access to a resource or network.
Low This would relate to findings such as information leakage, that is, an adversary being able to gather
usernames, internal IP address information, technologies in use, or other potentially sensitive data.
Exposure should not impact business operations, however, should be addressed to meet expected
business operations.
8
7 Findings
7
6
5
4
3
2
1 1
1
0
High Medium Low
Patch Management
CyberGen team noted that systems throughout the network were up to date on patches, with no vulnerabilities that
were successfully exploited. Effective patch management process ensures systems are resilient to low hanging
vulnerability attacks.
Default Passwords
All of the web portals identified during testing did not utilize default credentials. Web portals are typically targeted
because they often either do not require authentication or they are configured with default passwords. The
administrative section of a portal could contain information such as account IDs, email addresses, file shares, email
server addresses, and occasionally, passwords. By changing the default credentials on web administrative portals,
Client is decreasing its attack surface and making an adversary’s lateral movement and escalation within the
environment more difficult. CyberGen team recommends that Client continues with its processes of modifying these
default credentials on all newly installed systems.
Null Sessions
CyberGen team discovered that Active Directory Domain Controllers were configured to prevent null session
authentication. A null session is when a client (computer or user) is able to establish an SMB connection to a system
with an empty username and password. An adversary can utilize null session access on a Domain Controller to
obtain a wealth of information from Active Directory, such as a listing of all configured accounts and machines,
domain trust details and password policies. This configuration was not found to be present, and CyberGen team
recommends continuing this practice of not allowing unauthenticated sessions to connect to sensitive systems.
and contain specific character sets. However, it takes only one weak password for a threat actor to breach an
organization’s network. In this case, it only took our team one good, guessed password for us to establish an Active
Directory Domain level access, leading to other lateral movement attacks and compromising the entire Active
Directory domain environment.
Strategic Recommendations
While the recommendations in the TECHNICAL DETAILS section primarily focus on technical remediation steps, the
recommendations in this section also consider managerial and operational controls that may be helpful in
addressing the possible root-causes behind the findings of this assessment.
Password Management
Implement a periodic password audit to ensure password leading practices, such as password complexity, are
implemented and enforced organization wide.
Reconnaissance
Target
Data Exfiltration
Development
Adaptive
Penetration Test
Methodology
Lateral Movement
Intrusion
Reconnaissance
Reconnaissance is typically the initial phase of most cyber-attacks and during this phase,
CyberGen Offensive Security team acquires strategic information about the client’s IT
infrastructure and organizational structure. The team uses both proprietary and Open-Source
Intelligence (OSINT) platforms and tools to passively and actively gather intelligence about the
client’s network infrastructure exposure.
The team looks for login portals or services that authenticate to client’s Active Directory environment such as the
following:
▪ Mail – Office 365, OWA, EWS, ADFS
▪ Communication/Collaboration tools – Lync, Webex, Jenkins
▪ Other network services – VPN, CMS, SharePoint, Custom apps, SMB
To ensure the activities are blended within normal user activities, the CyberGen Offensive Security team uses built-
in utilities and specialized tools to carry such activities. Some of the outcomes from this phase may include the
domain names, hostnames, domain users, domain groups, IP addresses, subnets, etc.
Target Development
Using the information gathered from the Reconnaissance activities, the team begins the
process of exploring the information to develop a list of targets to attack. Some of the activities
in this phase include, but not limited to, harvesting employees names, enumerating network
services with potential vulnerabilities, web applications with login portals that could be
susceptible to authentication-based attacks, wireless infrastructure that could be used to
provide entry into corporate network, credentials from possible past data breaches, etc. The
outcome of this phase provides the team with a list of potential targets that would provide the team with entry points
into the client’s network, yet, with minimal resistance.
The following are sample information the team uses to build attack plans and paths for gaining initial foothold into
the network:
▪ IP addresses or subnet ranges
▪ Domain and Subdomain names
▪ Login portals (OWA, VPN, Citrix, SharePoint, Autodiscover, etc.)
▪ Open network ports and services (Joomla, Tomcat, SSH, etc.)
▪ Possible credentials from past data breaches
▪ Possible vulnerabilities
The team also executes active network scans to identify additional targets.
Intrusion
In this phase, the team begins to interact with the targets from the Enumeration phase, in
attempts to achieve initial network access. This phase involves cyclical reiteration of tactical and
strategic attack techniques as the team tries different Tactics, Techniques and Procedures
(TTPs) to compromise endpoint devices. Some of the TTPs the team uses to compromise these
targets include software vulnerability exploitation, network service vulnerability exploitation, login
portal authentication attacks (password spray attack), weak wireless infrastructure, web
application exploitation, misconfigurations, poor user habits, etc.
The CyberGen Offensive Security team approaches this phase strategically and break the intrusion phase into:
▪ Least Resistance Path: The team focuses their attention on compromising systems that would give
adversaries initial access, with the least or no resistance. The team attempts to exploit low hanging fruit
attack vectors such as misconfigured servers, default or weak credentials, unnecessary network service
exposures, misconfigured access controls, etc.
▪ Vulnerability Exploitation: Next, the team actively attempts to exploit vulnerabilities such as client-side
vulnerabilities, remote code execution vulnerabilities to compromise systems. This phase also has some
inherent risks and as Offensive Security Operators, the team exercises professional diligence when
executing this phase.
o Denial of Service (DoS): Some exploits may crash a system, service or make the system unstable.
o Account Lockouts: An unexpected account lockout can happen from attacks such as authentication-
based attacks.
o Data Integrity: An exploit may also impact the integrity of a system and its data because of
unexpected changes to a system’s configurations or loss of data.
Lateral Movement
Once the CyberGen Offensive Security team has compromised and gained an initial foothold on a
system, the team begins the post-exploitation and lateral movement activities. The team maps out
the client’s internal network infrastructure and creates a battle plan, deploying multiple parallel kill
chains to laterally move within the internal network for further attacks. Some of the TTPs the team
employs at this stage include privilege escalation (if or when necessary) to ensure the team can
execute certain tasks on the network with less restrictions. The team uses techniques such as credential harvesting
and re-use, Pass-the-Hash, systems misconfigurations, Active Directory Access Control abuse, network service
abuse, to gain access to key target resources. The team uses the access gained to gather additional information to
move within the internal network.
The team gathers additional information to move within the internal network via two ways:
▪ Internal Host-based Intelligence Gathering:
- Environment information gathering such as local users, settings, applications, files, shares, Remote
Desktop Protocol (RDP) sessions, credentials, configuration files, additional network interface.
- Attempts to bypass logging or preventative controls such as Endpoint Detection and Response (EDR)
security solutions, Host Behavioral Analysis, User Access Control (UAC), AppLocker, EMET,
PowerShell Constrained Mode, PowerShell Logging, AMSI, etc.
- Attempts to escalate privileges to that of Local Administrator/SYSTEM or root, if possible, using
escalation techniques or exploits.
▪ Internal Network-based/Active Directory Intelligence Gathering:
- Identify internal subnets and Virtual Local Area Networks (VLANs).
- Enumerate Active Directory for Domains, Forest Trusts, Group Memberships, Domain Users, Domain
Controllers, Administrators, Critical Systems, Group Policy Objects (GPOs), Access Control Lists
(ACLs), etc.
- Asset enumeration for password vaults, sensitive applications/file shares, intellectual property, etc.
- Network security controls enumeration such as web filtering, proxies, behavioral analytics, honey
pots/tokens, etc.
Some lateral movement activities may require high privileges (Administrator/SYSTEM) to execute certain tasks.
Hence, the team attempts other privilege escalation activities such Weak Services, Misconfigurations,
Kerberoasting, Unquoted Service Paths, Installation Files, Dynamic Link Library (DLL) Injection, Token
Manipulation, GPPassword, Kerberos Delegation attacks, Active Directory Certificate Service abuse.
Data Exfiltration
In attempts to assess the monitoring and detection capabilities of the client’s technological
controls, the team attempts to erase and clean up all activities conducted on the network.
Where permitted per the scope of the test, the team also creates dummy data and attempts to
exfiltrate such data, via multiple protocols, in attempts to assess the organization’s Data Loss
Prevention (DLP) controls.
OPERATIONS NARRATIVE
Testing Time Frame: September 02, 2024 – September 20, 2024
Assumed scenarios:
▪ An insider threat actor (disgruntled employee, consultant, adversary, etc), with a network-level access on
Client Corporate Internal Network.
▪ The threat actor has no network credentials.
In the following storyline, CyberGen Offensive Security team describes some of the Tactics, Techniques and
Procedures (TTPs) executed against the network infrastructure to demonstrate the skill level required to carry out
such activities. CyberGen Offensive Security team executed the penetration testing operations from a Kali Linux
system, from the standpoint of an insider adversary (e.g., adversary, consultant, disgruntled employee, etc.) who
had established an internal network access, with no Active Directory Domain User credentials.
Initial Access
Reconnaissance
The CyberGen Offensive Security team started the operations with the reconnaissance phase, where we gathered
intelligence about Client's network infrastructure attack surface. The team executed several username and email
address intelligence gathering using external Open Source Intelligence (OSINT) tools and platforms, scraping the
internet for employees of Client LLC. Using this technique, the team compiled a list of usernames of Client
employees. Moreover, the team used tools such as dig, NetExec, nbtscan and nslookup to identify the location of
high value target servers such as Domain Controllers, LDAP server, etc. In the image below, the team used dig to
locate the Global Catalogue servers on the internal network.
The team also used various techniques and tools to understand the internal network infrastructure, the various
subnets, DNS information, communication patterns among systems, etc. For instance, the team analyzed network
traffic on the local subnet the team’s attacking system connected, using the Open-Source tool Responder. The team
noted that systems on the network issued NetBIOS and Link Local Multicast Name Resolution (LLMNR) requests, in
attempts to locate a proxy server and connect to Server Message Block (SMB) shares that were not present. The
team then used a technique known as NetBIOS/LLMNR spoofing by executing the Responder tool to reply to the
requests, informing the workstations that the team’s attacking system should be used as the proxy server. On a
network where systems are vulnerable to such attack, the adversary would be able to capture user password
hashes and possibly crack them offline to gain access to systems on the network. In the image below, the team ran
fake network services and broadcasted them on the local network to respond to any request for such services to any
system on the local network.
As systems requested network services, the tool responded with its fake services and in so doing, attempted to
capture credentials or hashed credentials of services that requested credentials from authenticating accounts. In the
image below, the team used the DumpHash tool from the Responder to extract the hashes collected by Responder.
The team attempted to crack the password hashes offline, using the Hashcat tool, shown below:
Password Spraying
While the password hashes captured from Responder were undergoing cracking, the team executed an
authentication-based attack known as Password Spray. Password spray (i.e., reverse password brute-forcing)
attack technique attempts to use one weak and widely used password (e.g., Password1, Summer2023, etc.) against
a compiled list of usernames to discover a user who may be using that guessable password, so that we could
leverage that login to gain access into the user’s account or any network resource that user has access to. This
method most often leads to a successful login without any account lockout or raising too many network red flags.
Moreover, we performed this attack within reasonable time intervals to ensure the attacks did not result in account
lockouts. Using the compiled list of usernames obtained from our external intelligence gathering, we executed this
password spray attack trying several different passwords. In the screenshot below, the team executed the password
spray attack, supplying the tool with a list of usernames and a guessed password.
From the Password Spray attack, the team discovered valid credentials for two Active Directory users. The team
then checked the discovered credentials against the network to determine if the users had any higher privileges on
the network, which they did not. Nevertheless, the team used one of the credentials and extracted all the Active
Directory users in the domain for another around of Password Spray attack.
ASRep-Roasting
Using the usernames obtained from the Active Directory, the team executed an attack known as ASRep- Roasting.
ASRep-Roasting attack is a technique that exploits a vulnerability in the Kerberos authentication protocol,
specifically targeting accounts that have Kerberos pre-authentication disabled.
From this attack, the team identified a target [Link] and extracted his password hash for offline cracking.
NTLM Relay
The team also enumerated all systems that had SMB Signing not enabled on the network. Windows Operating
Systems running SMB services without Signing enabled renders such systems vulnerable to SMB-related attacks
such as SMB/NTLM Relay attacks. In an SMB/NTLM Relay attack, an adversary strategically positions their
attacking computer on an internal network and conducts an Adversary-in-the-Middle (AitM) attack to intercept
hashed credentials being transmitted by a machine authenticating to an SMB service. The attacking machine then
“relays” the captured authentication hash to the vulnerable SMB system (the system with SMB Signing not enabled)
and if the credentials are valid on the vulnerable system, the adversary could compromise the vulnerable system, in
some cases, with full system access.
The image below provides an overview of how such an attack could be carried:
To carry out the attack, the team first identified all systems running SMB service with SMB Signing not enabled,
using the NetExec tool.
Next, the team set up a relay server on the team’s attacking system, running several network services and waiting
for a connection.
As users on the network attempted to authenticate to their systems, their credentials were relayed to the systems
with SMB Signing disabled. In the screenshot below, as the user [Link] attempted to access network resources,
their network credentials were successfully “relayed” to the SMB servers ([Link], [Link],
[Link] and [Link]) that did not have the SMB Signing enabled.
The relayed credentials from the user [Link] had administrative privileges on two system, providing the team with
access to these system.
Network Mapping
Additionally, the team executed active network scanning to probe for live systems, open ports, network services,
and potential vulnerabilities using the tool nmap.
The team had obtained salient information about the internal network and completed several attacks during the
Initial Access phase such as the following:
▪ Discovered password for two Active Directory users through Password Spray attack
▪ Cracked the password hashes of the users [Link] and [Link] from the LLMNR/NBT-NS protocol
abuse and ASRep-Roasting attacks, respectively
▪ Compromised two systems ([Link] and [Link]) via NTLM Relay attack
Network Propagation
Once the CyberGen Offensive Security team had compromised the passwords of users and access to some
systems, the team transitioned the operations into the Network Propagation phase, where the team executed
enumerations, privilege escalations and lateral movement activities. From the enumeration activities, the team
queried the Active Directory environment for information such as:
Domains
Domain Users
Domain Controllers
Administrators
Critical Systems
GPOs
ACLs
Forest Trusts
Group Memberships
Privilege Escalation
From the enumeration activities, the team noted that the Domain Controllers are vulnerable to an attack known as
Kerberoasting. Within a Windows Active Directory environment, Service Principal Names (SPNs) are used to
uniquely identify each instance of a Windows service. To enable authentication, Kerberos requires that SPNs be
associated with at least one service logon account. If an adversary is in possession of a valid Kerberos Ticket-
Granting Ticket (TGT), they may be able to request one or more Kerberos Ticket-Granting Service (TGS) service
tickets for any SPN from a Domain Controller (DC). Portions of these tickets may be encrypted with the RC4
algorithm, meaning the Kerberos 5 TGS-REP etype 23 hash of the service account associated with the SPN is used
as the private key and is thus vulnerable to offline cracking that may expose plaintext credentials. (Source:
[Link]
To execute this attack, the team requested TGS service tickets for any SPN from the Domain Controller of the
[Link] domain.
The team then extracted the TGS tickets for one account, [Link], and using the password cracking tool,
Hashcat, proceeded to crack the password hash offline.
Upon cracking the password of the user [Link], the team discovered the user had Local Administrator
privileges on the system CD-WKSTN ([Link]).
From the initial enumerations, the team had discovered the system CD-WKSTN ([Link]) had been
configured with Unconstrained Kerberos Delegation. This made the system susceptible to an attack that exploits a
configuration in Kerberos delegation where a service account is trusted to delegate authentication to any service
within the domain.
A brief overview of how the attack works:
▪ Identify Target: An adversary identifies a computer or service account configured with Unconstrained
Delegation.
▪ Compromise Target: The adversary compromises or gains access to this account or computer, with
administrative privileges.
▪ Coerce Authentication: The adversary then coerces a high-privilege account, such as a Domain Controller,
to authenticate to the compromised system. Or waits for a high-privilege account to authenticate to the
compromised system.
▪ Steal Tickets: Once the high-privilege account authenticates, the adversary can steal the Kerberos tickets
(TGTs) of this high-privileged account from the compromised system.
▪ Lateral Movement: Using these tickets, the adversary can impersonate the high-privileged account and
move laterally within the network.
In the image below, the team enumerated the Domain Controller ([Link]) for systems configured with
Unconstrained Delegation.
With administrative privileges on the CD-WKSTN, the team used [Link]’s credential and accessed the system
through Remote Desktop Protocol (RDP). Using the tool Rubeus, the team listed all the Kerberos tickets in the CD-
WKSTN system, leading to the discovery of the tickets for the user [Link].
From the domain membership enumerations, the team discovered that the user [Link] was a Local
Administrator on the system CD-SRV. Hence, after extracting [Link]’s Kerberos ticket, it was imported and
then used to gain access to the CD-SRV.
From the initial enumerations, the team had also discovered the system CD-SRV ([Link]) had been
configured with Constrained Kerberos Delegation. This configuration also made the system susceptible to an attack
that exploits a configuration in Kerberos delegation where a service is allowed to impersonate users to access
specific services on their behalf.
A brief overview of how the attack works:
▪ Identify Target: An adversary identifies a computer or service account configured with Constrained
Delegation.
▪ Compromise Target: The adversary compromises or gains access to this account or computer, with
administrative privileges.
▪ Impersonate Users: The adversary uses the compromised account to request service tickets on behalf of
other users, including high-privilege accounts.
▪ Access Services: With these service tickets, the adversary can access the specified services as the
impersonated user.
In the image below, the team enumerated the Domain Controller ([Link]) for systems configured with
Constrained Delegation.
To execute this attack, the team had to first extract the NTLM hash of the computer service account of CD-SRV
(CD-SRV$).
With an NTLM hash of the CD-SRV$ account, the team requested a Service Ticket (ST) for the computer account
CD-SRV$ to impersonate the Domain Administrator user, [Link], to the SPN on the Domain Controller (the target).
Having compromised the CHILD domain, the team extracted the NTDS database that contains all the NTLM hashes
and other credentials for the [Link] domain.
The team then ran the NTDS files through password cracking for analysis. Using a regular desktop computer with 8
gig of RAM and 4 CPUs, the team cracked seventy-nine percent (79%) of the passwords within 8 hours.
The Offensive Security team continued the enumeration of the compromised CHILD domain and discovered a
Domain Trust between the CHILD and CLIENT domain through a parent-child trust relationship.
Figure 25: Bidirectional Domain Trust relationship between [Link] and [Link]
Using this information, the Offensive Security team abused this trust to compromise the parent domain ([Link])
through a Golden Ticket attack. The Golden Ticket attack can be used to compromise a parent Active Directory (AD)
domain from a child domain by exploiting the SID History configuration.
A brief overview of how the attack works:
▪ SID History is a feature in AD that allows a user to retain access to resources from a previous domain after
being migrated to a new domain. This is done by storing the old SID in the SID History attribute of the AD
object (e.g. a user account).
▪ Golden Ticket attack involves creating a forged Kerberos Ticket Granting Ticket (TGT) using the password
hash of the KRBTGT account (the account responsible for Kerberos ticket encryption in AD). With this
forged ticket, an adversary can impersonate any user, including high-privilege account such as a Domain or
an Enterprise Administrator.
▪ By injecting the SID of a high-privilege group (e.g. Enterprise or Domain Administrators) from the parent
domain into the SID History of an account in the child domain ([Link]), an adversary can gain
unauthorized access to resources in the parent ([Link]).
▪ Inject the SID: Add the SID of the high-privilege object (e.g. Enterprise Administrator) to the SID History of
the target object.
The team automated this attack, using the raiseChild tool from the Impacket suite of tools. The tool executed the
attack as follows using the credentials of a Domain Administrator ([Link]) of the [Link] domain:
Obtains the SID for the Enterprise Administrators group of the parent domain ([Link])
Retrieves the hash for the KRBTGT account in the child domain ([Link])
Creates a Golden Ticket
Logs into the parent domain ([Link])
Retrieves credentials for the Administrator account in the parent domain ([Link])
Authenticates to the parent Domain's Domain Controller via Psexec
Figure 26: Compromised parent domain ([Link]) via Golden Ticket attack
While logged into the compromised CLIENT domain’s Domain Controller, the team discovered credentials of the
user [Link] for a FOREIGN domain, a domain with a Forest Trust relationship with the CLIENT domain.
The user [Link] was a low privileged user in the FOREIGN, however, the team used this user’s credentials
and discovered misconfigurations in an Active Directory Certificate Services (AD-CS) implementation on the
network.
AD CS is a server role that functions as Microsoft’s Public Key Infrastructure (PKI) implementation. AD CS
integrates with Active Directory and enables the issuing of certificates, which are X.509-formatted digitally signed
electronic documents that can be used for encryption, message signing, and/or authentication. The information
included in a certificate binds an identity (user, machine) to a public/private key pair. An application can then use the
key pair in operations as proof of the identity of the user. The Certificate Authorities (CAs) signs the certificate using
its private key and then returns it to the client. The diagram below summarizes the process of certificate issuance.
A misconfigured AD CS could lead to attacks such as Credential theft, Account persistence, Domain escalation and
Domain persistence. While AD CS offers adversaries various attack paths, an adversary needs to first identify
misconfigurations that can be abused. In the screenshot below, the team probed the FOREIGN domain Certificate
Services for vulnerabilities in its deployment.
The scan results revealed the CA was vulnerable to attacks labelled ESC1, ESC2, ESC3, ESC4 and EC8 due to the
misconfigured settings and policies that define the contents of the certificate issued by the enterprise CA. The team
focused on abusing the ESC4 vulnerability, which allowed the user [Link], in addition to Domain Admins,
Enterprise Admins and Local System, to alter the existing certificate Vuln-ESC4 so that they can request a
certificate from the AD CS service for any user.
Using the Certipy tool, the team altered the Vuln-ESC4 template to be vulnerable to be able to request a certificate
for one of the Domain Administrator users.
Using the Certipy tool, the NTLM hash of the Enterprise Administrator account was extracted from the .pfx file. With
the NTLM hash of the Enterprise Administrator, the team used Pass-the-Hash technique to authenticate to the
Domain Controller of the FOREIGN domain.
The team reverted the altered Vuln-ESC4 certificate template to its original state to not introduce a vulnerability into
the FOREIGN domain environment.
All these activities went undetected by the defensive controls of the client.
TECHNICAL DETAILS
INT-01: Weak Password Policy
Risk Rating: High
Reproduction/Proof of Concept:
In the screenshot below, the team was able to guess the password for the user accounts [Link] and [Link]
due to their choice of weak password.
Patch and Update: Keep all systems and network systems up to date with the latest security patches and
updates. Vulnerabilities in SMB protocols are often addressed through software updates, so staying
current is crucial.
Affected Asset:
[Link]
[Link]
[Link]
[Link]
Reproduction/Proof of Concept:
In the screenshot below, the team used the NetExec tool to identify systems running SMB service with no signing
enabled.
Reproduction/Proof of Concept:
Create fake services such as SMB and HTTP to answer requests from internal clients.
Affected Asset:
[Link]
Reproduction/Proof of Concept:
INT-04.B: An ESC4 vulnerable template due to misconfigured ACES for the user [Link]
Reproduction/Proof of Concept:
With an administrative account, use impacket suite of scripts to authenticate to a system with a username and
NTLM password hash.
INT-05.A: Authentication into Domain Controller with NT hash of the administrator account
INT-06: Kerberoasting
Reproduction/Proof of Concept:
Use the [Link] script from impacket with credentials for a valid domain user.
INT-06.A: SPN request leading to extraction of password hashes for the user [Link]
to choose complex passwords and change them frequently. This can make it more difficult for adversaries
to crack user passwords even if they are able to extract the password hash.
References:
Cracking Active Directory Passwords with AS-REP Roasting:
[Link]
Helping protect against AS-REP Roasting with Microsoft Defender for Identity:
[Link]
roasting-with-microsoft-defender/ba-p/2244089
[Link]
Affected Asset:
Active Directory domain-wide
Reproduction/Proof of Concept:
Use the GetNPUsers script from impacket to execute an AS-Rep Roasting attack to retrieve password hashes of
user who have Kerberos preauthentication disabled.
Reproduction/Proof of Concept:
During the RBCD attack, the Offensive Security team had to first create and join a computer object (fakepc$) to the
[Link] domain.
Thank You