<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arbaz Khan on Medium]]></title>
        <description><![CDATA[Stories by Arbaz Khan on Medium]]></description>
        <link>https://medium.com/@k45arbaz?source=rss-3fdca0dad3de------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*sLSXl5RAk4sWHZYY</url>
            <title>Stories by Arbaz Khan on Medium</title>
            <link>https://medium.com/@k45arbaz?source=rss-3fdca0dad3de------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 21:05:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@k45arbaz/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Initial Foothold via Guest Wi-Fi and Misconfigured Domain Wi-Fi]]></title>
            <link>https://medium.com/@k45arbaz/initial-foothold-via-guest-wi-fi-and-misconfigured-domain-wi-fi-8ca1bf522ee3?source=rss-3fdca0dad3de------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ca1bf522ee3</guid>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[wifi-pentesting]]></category>
            <dc:creator><![CDATA[Arbaz Khan]]></dc:creator>
            <pubDate>Thu, 26 Sep 2024 15:13:44 GMT</pubDate>
            <atom:updated>2024-09-26T15:13:44.875Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oIpcXQu4Nvv0XqcD.png" /></figure><p><strong>Background:</strong><br>During an internal red team assessment at a client’s office, I identified potential security gaps in both the guest and enterprise wireless networks. My objective was to exploit these gaps to gain an initial foothold and escalate privileges within the target environment.</p><h3>Stage 1: Connecting to the Guest Wi-Fi</h3><p>Upon arriving at the client site, I noticed that the guest Wi-Fi was self-registered using OTP (One-Time Password) authentication based on a mobile number. I easily registered with a burner phone number, connected to the guest Wi-Fi, and gained internet access.</p><h3>Stage 2: Network Enumeration 🔎</h3><p>While on the guest Wi-Fi, I conducted network reconnaissance and surprisingly found that network segmentation was weak. I was able to:</p><ul><li>Enumerate domain details (Domain Controllers (DCs) and network structure).</li><li>Identify IP addresses of Domain Controllers (DC IPs).</li></ul><p>This exposure should not have been available on a guest network, revealing a critical misconfiguration that allowed internal network enumeration from an external-facing system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/0*53iuHrKocwr5xJ68.png" /></figure><p>Guest Wi-Fi</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-qwJaDgUEo2xHVWL.png" /></figure><p>Domain Recon from Guest Wi-Fi</p><h3>Stage 3: Credential Harvesting</h3><p>Next, I leveraged publicly available leaked credentials (acquired through OSINT or from previous breaches) and created a corresponding list of potential usernames. Using the <strong>Kerbrute</strong> tool:</p><ul><li>Performed username enumeration by attempting to authenticate using common usernames derived from the gathered credentials.</li><li>Identified several valid usernames.</li></ul><p>Once I had a list of valid usernames, I followed up with password spraying attacks using common passwords like Winter2024!, Welcome@123, targeting the identified usernames. This was done using tools like <strong>CME</strong> and <strong>NetExec</strong> for password brute-forcing against the correct usernames</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z_MisbrzDO0EJE1E.png" /></figure><h3>Stage 4: Successful Username and Password Discovery</h3><p>As expected, several usernames were valid, providing a successful list. Continuing the spraying process, I was able to guess one domain user’s credentials through weak password policy enforcement. Unfortunately, the login prompt indicated that the password had expired.</p><h3>Stage 5: Discovery of Enterprise Wi-Fi Networks 🔑</h3><p>During further network scanning and reconnaissance, I noticed multiple domain SSIDs that were enterprise-level Wi-Fi networks configured for employee access. These Wi-Fi networks were protected using enterprise authentication protocols.</p><h3>Stage 6: Exploiting Wi-Fi Misconfigurations 📡</h3><p>Since the compromised user account had expired credentials, I attempted to use the credentials to authenticate against one of the enterprise Wi-Fi SSIDs. The network accepted the expired credentials and prompted me to change the password. I changed the password successfully and connected to the enterprise Wi-Fi without needing certificate-based authentication (EAP-TLS or similar), indicating a weak or misconfigured authentication flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kxvaEiJLLNY2W7j-.png" /></figure><p>Expired Password Change Prompt</p><h3>Stage 7: Full Network Access 💻</h3><p>By connecting to the enterprise Wi-Fi with the new password, I effectively bridged into the internal corporate network. This network allowed full access to internal resources, indicating that the Wi-Fi network was not properly segmented or secured with additional layers of security. From here, an attacker could escalate privileges through various Active Directory (AD) attacks, network-based attacks (such as lateral movement or exploitation of network services), or even web-level attacks targeting internal web applications or services, further compromising the organization’s infrastructure.</p><p>🚨 <strong>Key Takeaways</strong>:</p><p>This scenario showcased a series of misconfigurations:</p><ol><li><strong>Weak network segmentation</strong>: Guest Wi-Fi allowed internal network enumeration.</li><li><strong>Password management flaws</strong>: Password spraying and guessing were successful due to poor password policies.</li><li><strong>Misconfigured enterprise Wi-Fi</strong>: Lack of certificate-based authentication and poor handling of expired credentials allowed me to escalate privileges and gain full network access.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ca1bf522ee3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Dorking: Potential Data Breach and AD Compromise]]></title>
            <link>https://medium.com/@k45arbaz/google-dorking-potential-data-breach-and-ad-compromise-0c34ab868b6e?source=rss-3fdca0dad3de------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c34ab868b6e</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[Arbaz Khan]]></dc:creator>
            <pubDate>Sun, 18 Aug 2024 16:23:13 GMT</pubDate>
            <atom:updated>2024-08-19T21:01:37.966Z</atom:updated>
            <content:encoded><![CDATA[<h3>Uncovering Security Flaws in IT Management Portal Through Google Dorking</h3><p>I was exploring the internet using a Google Dork query: inurl:/Login.do/ This search led me to many login pages from various organizations, including banks, automotive companies, IT learning centers, hospitals, and consumer services. What I found was concerning—many of these organizations were using a popular IT service management tool, and their login panels were exposed on the internet, making them vulnerable.</p><h3>The Issue: Admin Credentials</h3><p>As I dug deeper, I discovered that tool has five default admin IDs. Out of curiosity, I tried these default credentials on the portals I found, and to my surprise, I was able to access every single one. This meant I could get into the backend of these systems, which contain sensitive data and administrative controls.</p><h3>The Risks: What Could Happen</h3><p>Once inside the portals, I realized the extent of the risk. I could change any user’s Active Directory (AD) password without knowing the old one, which means I could potentially lock users out of their accounts or take control of them. Additionally, I could view and extract employees’ personal information, details about the organization’s servers, endpoints, software versions, and configurations. This information could be used by someone with bad intentions to carry out a major attack on the organization.</p><h3>Reporting the Issue: Mixed Reactions</h3><p>Understanding how serious this was, I reported the vulnerability to the affected organizations. My goal was to help them fix the issue before it could be exploited by someone else. The responses I received varied — some organizations appreciated the information and quickly took action, while others were less receptive.</p><p>I want to highlight one specific case where I identified a critical misconfiguration within a major organization, which I will refer to as “kheera91” for privacy reasons. During a general Google dorking exercise, I uncovered sensitive employee PII, details that could potentially compromise their Active Directory (AD), and the ability to gain access to one of their IT asset domains from an external environment. I submitted a detailed report, and while the organization initially communicated and quickly fixed the issue, they abruptly stopped responding afterward. Despite the seriousness of the vulnerability and my efforts to assist them, my follow-up messages were ignored, and I received no acknowledgment or appreciation. My only expectation was a letter of appreciation for the work I did to help them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*N16brxUxj2_NxtL3gApnuQ.png" /><figcaption>AI Generated Image</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*cQSbiCgxtTGpFkQ7zzQaMw.png" /><figcaption>User PII Data Exfiltration — Illustrative</figcaption></figure><h3>Why I Did It: Ethical Hacking</h3><p>I want to make it clear that my intentions were good. I didn’t go beyond the initial discovery because I did not have permission from the organizations to conduct deeper tests. I did not compromise AD credentials, gain VPN access, or explore their networks further. My actions were meant to highlight a serious security issue and help protect these organizations from potential harm.</p><p>However, I did conduct a similar test on one organization with their permission, and the results were eye-opening. You can read about that experience in detail on my Medium blog: <a href="https://medium.com/@k45arbaz/default-credentials-result-in-100-comprehensive-compromise-and-data-breach-38d691b2066a">Default Credentials Result in 100% Comprehensive Compromise and Data Breach</a>.</p><h3>The Takeaway: Secure Your Systems</h3><p>This experience highlights the importance of changing default credentials and regularly checking for security vulnerabilities. Organizations need to be proactive in securing their systems to prevent potential breaches. By working together and sharing information, we can help create a safer digital world for everyone.</p><p>Please note, this is not intended to promote hacking; rather, it is for educational purposes and to raise awareness.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c34ab868b6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Attacking Active Directory Certificate Services (ADCS) and Escalating Privileges]]></title>
            <link>https://medium.com/@k45arbaz/attacking-active-directory-certificate-services-adcs-and-escalating-privileges-9c0d916d68e6?source=rss-3fdca0dad3de------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c0d916d68e6</guid>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[Arbaz Khan]]></dc:creator>
            <pubDate>Sat, 17 Aug 2024 12:17:52 GMT</pubDate>
            <atom:updated>2024-08-17T12:17:52.821Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*v2V8CFhDEvDtYrdA" /></figure><p>Introduction: During a security assessment of an AD infrastructure, I have discovered significant vulnerabilities within the Active Directory Certificate Services (ADCS). This post details my findings, the attack scenario, and the steps taken to exploit these vulnerabilities, culminating in practical recommendations to enhance ADCS security.</p><p>Scenario Details: During my security assessment, I have focused on the AD infrastructure of “<a href="http://vuldomain.com/">vuldomain.com</a>,” a fictitious domain used for this case study. I have identified a certificate authority (CA) server named “<a href="http://adc.vuldomain.com/">adcs.vuldomain.com</a>” and uncovered multiple vulnerable certificate templates that posed substantial security risks.</p><p>Reconnaissance/Enumeration: reconnaissance and enumeration phase involved the following steps:</p><p>1. Access to Domain User Account: Initially, I have ensured access to a standard domain user account within the “<a href="http://vuldomain.com/">vuldomain.com</a>” domain.</p><p>2. Identifying ADCS Server: I have used the certutil.exe tool on a domain machine or the certipy tool remotely to identify the ADCS server. Running these tools provided me with details about the CA server “<a href="http://adcs.vuldomain.com/">adcs.vuldomain.com</a>.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/0*Qa_z7y9LX8BeR9Gj" /><figcaption>certutil.exe</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uMgpnPS8hJSioJHz" /><figcaption>Certipy tool</figcaption></figure><p>3. Gathering Certificate Details: By running certipy, I have obtained certificate details in JSON, TXT, and ZIP formats, which enumerated all the ADCS templates.</p><p>4. Identifying Vulnerable Templates: I have parsed the TXT file to identify vulnerable templates. my analysis revealed the presence of ESC1, ESC6, and ESC8 templates, all of which were vulnerable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B5igcsAVgBOCRhMm" /><figcaption>vulnerable templates</figcaption></figure><p>Initial Access: Having identified the vulnerable templates, I have targeted the ESC1 and ESC8 templates for exploitation.</p><p>Execution for ESC1</p><p>1. Requesting a Certificate: I have requested a certificate using the ESC1 template and supplied the Administrator’s Subject Alternative Name (SAN).</p><p>2. Obtaining the PFX File: Successfully requesting the certificate resulted in obtaining a PFX file, which contained the certificate and the private key.</p><p>3. Authenticating Against the Domain Controller: Using the certificate obtained from the ESC1 template, I have authenticated against the domain controller.</p><p>4. Extracting the NTLM Password Hash: The authentication process allowed us to extract the NTLM password hash for the administrator account.</p><p>5. Domain Compromise: Using the extracted NTLM hash, I have authenticated as the domain administrator, thereby compromising the entire “<a href="http://vuldomain.com/">vuldomain.com</a>” domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tJ3d9ITR0TYShQdH" /><figcaption>ESC1 Exploit</figcaption></figure><p>Execution for ESC8</p><p>To exploit the ESC8 template, the domain controller (DC) must be vulnerable to the NTLM relay attack known as Petitpotam.</p><p>1. Setting Up NTLM Relay: Configure an NTLM relay server to capture and relay authentication requests.</p><p>2. Running Petitpotam Attack: Execute the Petitpotam attack, which coerces the DC to authenticate via the MS-EFSRPC EfsRpcOpenFileRaw function. This attack provides a certificate for the domain controller machine account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9Xah2uUD99fd9bC9" /><figcaption>setting up NTLM and Petitpotam</figcaption></figure><p>3. Exporting KRB5CCNAME: Export the Kerberos ticket-granting ticket (TGT) for the domain controller machine account to a .ccache file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d29s5KBCfVx7AJ8w" /><figcaption>Exporting KRB5CCNAME</figcaption></figure><p>4. Using Impacket’s secretsdump: With the .ccache file, use Impacket’s secretsdump tool to extract the NTLM hash of any domain user or admin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pe-_P-xdc_EaHqTV" /><figcaption>Administrator hash credential</figcaption></figure><p>Recommendation:</p><p>My successful exploitation of the ADCS vulnerabilities highlights the critical need for robust security measures within AD environments. To mitigate these risks, I have recommend the following actions:</p><p>1. Update ADCS Servers and Templates: Ensure all ADCS components are up-to-date with the latest security patches and configurations.</p><p>2. Regular Vulnerability Assessments: Conduct periodic assessments to identify and remediate vulnerabilities promptly.</p><p>3. Implement Strong Access Controls: Enforce strict access controls and role-based access management for ADCS components.</p><p>4. Continuous Monitoring and Auditing: Monitor ADCS activities in real-time and perform regular audits to detect and respond to suspicious activities.</p><p>By implementing these recommendations, organizations can significantly enhance the security of their ADCS infrastructure and safeguard against potential attacks.</p><p>For an in-depth guide on mitigating ESC1 and ESC8 vulnerabilities, please refer to this [comprehensive resource](<a href="https://www.encryptionconsulting.com/mitigating-esc1-and-esc8-vulnerability-in-active-directory/">https://www.encryptionconsulting.com/mitigating-esc1-and-esc8-vulnerability-in-active-directory/</a>).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c0d916d68e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Default Credentials Result in 100% Comprehensive Compromise and Data Breach]]></title>
            <link>https://medium.com/@k45arbaz/default-credentials-result-in-100-comprehensive-compromise-and-data-breach-38d691b2066a?source=rss-3fdca0dad3de------2</link>
            <guid isPermaLink="false">https://medium.com/p/38d691b2066a</guid>
            <dc:creator><![CDATA[Arbaz Khan]]></dc:creator>
            <pubDate>Sat, 17 Aug 2024 12:12:52 GMT</pubDate>
            <atom:updated>2024-08-17T12:12:52.298Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a5LdWvskjXZCJP5E" /></figure><p>Introduction: In this article, we will explore a real-world practical scenario from an external red team assessment where the objective was to obtain Infrastructure compromise.</p><p>Scenario Details: Let’s consider the target organization as “<a href="http://domain.com/">domain.com</a>” (name redacted).</p><p>Reconnaissance/Enumeration: Our initial step involves discovering all subdomains, IP addresses, and breached credentials. This entails consolidating resolved subdomains, conducting port scans to identify exposed portals and applications over the internet.</p><p>Initial Access: We uncovered numerous accessible login portals, including one at <a href="http://itasset.domain.com/">itasset.domain.com</a>, which resolved to SapphireIMS. When encountering login portals, my initial step is to verify default logins/credentials. Remarkably, 5 different sets of credentials proved effective on the portal, granting us admin access to the itasset portal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/0*DdZFiBsjTSd1kYqn" /></figure><p>Execution: Upon obtaining admin access, we successfully extracted comprehensive user and infrastructure details, including endpoints, servers, network devices, and installed software. Within SapphireIMS, the option to add a user with specific privileges and perform actions such as enabling, disabling, unlocking, and changing AD passwords was identified.</p><p>Exploiting this capability, we reset the credentials of one of the highly privileged user and attempted to log in to the O365 portal using the same account. Surprisingly, there was an absence of Two-Factor Authentication (2FA) for this user. Seizing this opportunity, we discovered critical files and conducted data exfiltration. Notably, an unprotected confidential.xlsx file containing credentials for all vital organizational applications was identified.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AMASWH8oejeZHSfJ" /></figure><p>In our pursuit to gain internal network access, an examination of the SapphireIMS portal revealed the organization’s utilization of Paloalto Global Connect VPN. Armed with the server address “<a href="http://vpn.domain.com/">vpn.domain.com</a>’ and high-privilege user credentials, we successfully connected. However, our efforts to exploit this VPN were thwarted by the organization’s robust defense mechanisms, including domain-joined machines with recent endpoint patches, rendering the VPN ineffective.</p><p>Through further reconnaissance, we discovered a HRMS server (<a href="http://hrms.domain.com/">hrms.domain.com</a>) with an open 3389 RDP port accessible over the internet, allowing us to establish an RDP connection to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pB6j-lw4Y8iMMKUP" /></figure><p>Upon securing an RDP session, we successfully extracted comprehensive employee information, including attendance records, personally identifiable information (PII), and salary details. In essence, we now have administrative control over the HRMS server.</p><p>In the process of lateral movement, we employed the enterprise admin user credentials, securing access to more than 1000 endpoints and servers. The organization was fully compromised. Despite not exploiting any vulnerabilities or attacking the Windows AV, EDR failed to trigger any alerts due to misconfigurations.</p><p>It’s worth noting that EDR should ideally raise alerts for password resets and network scans. Unfortunately, the configuration for these alerts is also not set up correctly.</p><p>NOTE: This article is for illustrative/educational purposes only and should be used to raise awareness about the importance of robust security measures and regular penetration testing. Always ensure proper authorization and adherence to ethical guidelines before conducting any security assessments.</p><p>Recommendations:</p><ul><li>Deactivate default IDs.</li><li>Update default credentials and opt for robust, intricate passwords that avoid using your organization’s name or common words. Employ a combination of letters, numbers, and special characters to enhance security.</li><li>Conduct periodic reviews of your servers and Disable sensitive and unnecessary ports on the internet.</li><li>Implement monitoring for privileged users to promptly detect password changes. Investigate any occurrences immediately and take necessary measures.</li><li>Implement 2FA wherever applicable.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38d691b2066a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Journey to Domain Admin and Enterprise Admin: A Practical Internal Red Team Scenario]]></title>
            <link>https://medium.com/@k45arbaz/journey-to-domain-admin-and-enterprise-admin-a-practical-internal-red-team-scenario-7a3259730dc1?source=rss-3fdca0dad3de------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a3259730dc1</guid>
            <dc:creator><![CDATA[Arbaz Khan]]></dc:creator>
            <pubDate>Sat, 17 Aug 2024 12:10:28 GMT</pubDate>
            <atom:updated>2024-08-17T12:10:28.093Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Cgm_IKxc3Hnj8iT-" /></figure><p>Introduction:</p><p>In this article, we will explore a real-world practical scenario from an internal red team assessment where the objective was to obtain Domain Admin and Enterprise Admin access. We will discuss the steps taken, the tools utilized, and the significant findings discovered during the engagement. The primary goal of a penetration test is to identify security gaps, exploit them, and assess the risk level of each vulnerability. However, in a Red Team engagement, the focus shifts towards finding one way into the system, exploiting it, and then escalating privileges laterally to access valuable data.</p><p>Scenario Details: Let’s consider the target organization as “<a href="http://target.com/">target.com</a>” (name redacted).</p><p>Reconnaissance/Enumeration:</p><p>I have the domain name of the organization, and using open-source tools like theHarvestor, <a href="http://hunter.io/">Hunter.io</a>, LinkedIn, Google Dorks, and similar tools, I have gathered email IDs associated with that domain. By aggregating this information, I have compiled a user list for targeted brute-force activities.</p><p>Initial Access:</p><p>The scenario began with the collection of email IDs belonging to employees of <a href="http://target.com/">target.com</a>. It was discovered that the mail id convention followed the pattern of “<a href="http://mailto:firstname.lastname@target.com/">firstname.lastname@target.com</a>” while the corresponding username was “firstname.lastname”. Armed with this information, a list of usernames was prepared and subjected to a brute force attack using the common password “Target@123” through crackmapexec.</p><p>A breakthrough was achieved when one user’s credentials matched the password used in the brute force attack. However, spraying the same user’s credentials across various IP segments of endpoints and servers did not yield any significant results.</p><p>Execution:</p><p>The next step involved dumping the AD Schema using the AD Explorer tool, providing insights into the organization’s Active Directory structure. Bloodhound-python was then run remotely on the Domain Controller’s IP, and the output was fed into the Bloodhound GUI. By marking the identified user as “owned” and exploring the shortest path from own principals, a misconfiguration in the AD was discovered. It was found that the Domain Users group had AdminTo access on a specific server used for the AZURE AD connector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IJ97cM2nmnkuMUtX" /></figure><p>Defense Evasion and Lateral Movement:</p><p>Further enumeration revealed the presence of FortiEDR on the endpoints and servers. Attempts to remotely dump user credentials (SAM, LSA) from the server using Crackmapexec were thwarted by FortiEDR, triggering an alert. Alternative methods such as dumping lsass.exe with reg or creating a dump file using task manager also failed due to FortiEDR’s detection.</p><p>However, persistence paid off as Procdump was successfully used to dump the lsass.exe file, bypassing FortiEDR’s detection due to its use of a Microsoft-signed tool. The dumped file was then copied to a Kali machine, and Pypykatz was employed to extract user credentials and NTLM hashes. Although no passwords in clear text or LM hashes were obtained, the username and NT hashes were acquired.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/0*jLmy-63-Yi602dao" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SNd8e71ZPNf6gRpI" /></figure><p>After contemplating the findings and enjoying a good lunch, an idea emerged. The WDigest service was remotely enabled on the server via crackmapexec to store credentials in clear text. Awaiting the login of a Domain Admin/Enterprise Admin on the server, lsass.exe was dumped again using the same method. Success! Domain Admin credentials were obtained in clear text, highlighting the impact of the misconfiguration present in the network.</p><p>With Domain Admin access, authorized access to network shares was acquired, and sensitive data was dumped. RCE and RDP were achieved on all the Domain Controllers, paving the way to target becoming an Enterprise Admin. The same steps of dumping lsass.exe on the Domain Controller were repeated, resulting in the acquisition of additional privileged users, including Enterprise Admins.</p><p>Although the intent was to create a Golden ticket for persistence, permission was denied by the client before proceeding due to a backdoor in their network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/0*M0tGrbobLKaQNNss" /></figure><p>With compromised details and successful data exfiltration, the client decided to conclude the assessment at this stage.</p><p>NOTE:</p><p>Please note that this article is for illustrative/educational purposes only and should be used to raise awareness about the importance of robust security measures and regular penetration testing. Always ensure proper authorization and adherence to ethical guidelines before conducting any security assessments.</p><p>The following tools were utilized throughout the engagement: :</p><ol><li>Email IDs collection — Impacket-Module, <a href="http://hunter.io/">Hunter.io</a>, theHarvestor, LinkedIn, and Google Dorks</li><li>Crackmapexec</li><li>Bloodhound-python</li><li>procdump and pypykatz</li><li>ADExplorer/ADInfo</li></ol><p>Recommendation:</p><ol><li>Choose strong, complex passwords that don’t include your organization name or common words. Use a mix of letters, numbers, and special characters to make them harder to guess.</li><li>Regularly review your servers’ Active Directory (AD) configurations, including permissions, group policies, and access controls, to prevent misconfigurations and ensure proper security measures.</li><li>Set up a monitoring system to detect the enabling of WDgiest policies. Investigate any instances immediately and take appropriate action. If necessary, follow your specific environment’s security policies to permanently disable the policy.</li><li>Implement behavioral-based detection: Leverage FortiEDR’s behavioral-based detection capabilities. Configure rules that detect suspicious behavior associated with Procdump or any similar process attempting to dump lsass.exe. This can help identify and block such activities in real-time.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a3259730dc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>