<?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 Sherwine Sheba on Medium]]></title>
        <description><![CDATA[Stories by Sherwine Sheba on Medium]]></description>
        <link>https://medium.com/@shebasherwine?source=rss-9e6e9f6676d0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Ck9wFvMrggmdhtWx</url>
            <title>Stories by Sherwine Sheba on Medium</title>
            <link>https://medium.com/@shebasherwine?source=rss-9e6e9f6676d0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 09:57:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shebasherwine/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[My Active Directory learning path]]></title>
            <link>https://medium.com/@shebasherwine/my-active-directory-learning-path-97f151dacc5b?source=rss-9e6e9f6676d0------2</link>
            <guid isPermaLink="false">https://medium.com/p/97f151dacc5b</guid>
            <category><![CDATA[beginner-notes]]></category>
            <category><![CDATA[internal-pentesting]]></category>
            <category><![CDATA[ad-pentesting]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Sherwine Sheba]]></dc:creator>
            <pubDate>Sat, 21 Mar 2026 06:14:44 GMT</pubDate>
            <atom:updated>2026-03-21T06:14:44.312Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Everyone,</p><p>I’m Sherwine Sheba. I’ve started learning active directory basics through TCM’s youtube channel - 5+ hours free course. You can build the lab via watching the original video.</p><p>Video Link: <a href="https://youtu.be/VXxH4n684HE?si=KExWjO49vXGM6gQH">https://youtu.be/VXxH4n684HE?si=KExWjO49vXGM6gQH</a></p><p>I’m just sharing my notes that I’ve taken while learning this course.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*i9J8DZkzqMiRnoJKaz9OGQ.png" /></figure><p>⇒You can authenticate with same credentials on system that is in another geological location with active directory through network</p><p><strong>Physical Components of AD:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*BBs_Wc4GtfyCr8Gw-RU52Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*OHCFYoLQvQTGMPES9EC_sA.png" /></figure><p><strong>Logical Components of AD:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*hEFzCVgia67XZzfg74K0Ng.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ai1a_jLcfR4oG4SdXR1VTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*gjq7VxZ_XH5XjfL-LMa4Ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*B1FxdpP0qxq9lf0mDzA72g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*jadfSbFSpSAgbc1YXm11dg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*3Pm9ygBow-_JagNEW37f0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*4Y_XdSYy7rer3ToGr_I9tA.png" /></figure><p><strong>NOTE: </strong>As I’ve said in the beginning, build your lab by watching the video.</p><p><strong>Link for specific timestamp:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FVXxH4n684HE%3Ffeature%3Doembed%26start%3D243&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVXxH4n684HE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FVXxH4n684HE%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bf01842e37bf4fe7348de97e5edf5c28/href">https://medium.com/media/bf01842e37bf4fe7348de97e5edf5c28/href</a></iframe><p><strong>Initial Attack vectors:</strong></p><p><a href="https://adam-toscher.medium.com/top-five-ways-i-got-domain-admin-on-your-internal-network-before-lunch-2018-edition-82259ab73aaa">Top Five Ways I Got Domain Admin on Your Internal Network before Lunch (2018 Edition)</a></p><p><strong>LLMNR (Link local multi-cast name resolution) Poisoning:</strong></p><p>=&gt;Man-in-the-middle attack</p><p>=&gt;Previously named as NBT-NS (NetBios Name service)</p><p>=&gt;When we interact with it,it returns username and password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KMlTOJ_hhJfF_c02MTe6aQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*e2LvbwSJzDyXwTGRXa-Ycw.png" /></figure><p><strong>NOTE: </strong>Impacket is an open source collection of modules written in Python for programmatically constructing and manipulating network protocols.</p><p><strong>Step 1:</strong> Run Responder (It responds to the requests like that of the image above and in respond get some hashes and username from victim’s system)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CPVGjIgioVpwIdHQGE3cJw.png" /></figure><p><strong>Step 2: </strong>Event Occurs(For eg:Typed wrong network drive)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*DS6r9m-1xC04HV-n3d_VKQ.png" /></figure><p><strong>Step 3:</strong> Get the hashes via responder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*dhzA-AmK1YaPQpKK1340JA.png" /></figure><p><strong>Step 4:</strong> Crack them using hashcat</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*g-Pu7EAhJi7eN2N5Pema-Q.png" /></figure><p><strong>Own Screenshots:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*C4xaIcy30o6M24EOf6m-Cw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*pH89yz4_OZ1TOBLsQWpDSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*SPiFwXmjo4TdS3fHZYF6dA.png" /></figure><p><strong>SMB Relay Attack:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*5aW_QWXYbIdRB-8WTO6ARw.png" /></figure><p><strong>Step 1:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*quyWqv6sA4FN-mRiKoVQ2Q.png" /></figure><p><strong>Step 2:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*-NH_PfTg8yc5ZbQPvfR3fw.png" /></figure><p><strong>Step 3:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_6HiEZwnCn8-AQxBX8R9lQ.png" /></figure><p><strong>Step 4:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*DIUDdOD_08Av10sBmDosEQ.png" /></figure><p><strong>Step 5:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*bqh3ZsBJVTnm5qUEuqRdsg.png" /></figure><p><strong>Ways to find whether SMB is signed or not:</strong></p><p>1.Nessus Scan</p><p>2.Nmap default script</p><p>3.Github — SMB signing check</p><p><strong>Own Screenshots:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*JQWc2qft-ls__xkcUqZsKw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*5PkCM190Qvm_tCaec9VdnQ.png" /></figure><p>=&gt;Message signing enabled but not required (Equal to disabled)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*kNbzly6EhctfsqcvtyGn-g.png" /></figure><p>=&gt; /etc/Responder/Responder.conf (Turn off SMB and HTTP)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*j3vyNnMFQjPYWNvI8hzMsA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*rqR4-SOV2bE0rMpHgE6ikw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*k76aI2JuMZQTJxKRI5kJKA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*-9xxZjKp6qmTV6Rl78ftSA.png" /></figure><p>For some reason,Authentication is not success</p><p>=&gt;You can also try : $ntlmrelayx -tf &lt;target_file&gt; smb2support -i (Interactive smb shell)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*O0OuN7Rwbc3EYdRga1Z1AQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*hzo-zvi2fqRA1Q3ojKuJAA.png" /></figure><p><strong>Some other methods:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*I3I1RqvDGGhSIgFX9R_Xbg.png" /></figure><p>(Generate shell code for reverse shell as executable through msfvenom)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CZ3XS7fPk6FbUOGrHRa7MA.png" /></figure><p>(Execute commands and get shell)</p><p><strong>Mitigation:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*htAmqfUM0K31Mdrj-vwFrg.png" /></figure><p><strong>Gaining Shell Access:</strong></p><p><strong>Note:</strong></p><p>=&gt;Psexec is noisy,try avoiding it at first</p><p>=&gt;Try smbexec,wmiexec to gain shell and then navigate around to avoid antivirus in some sort and once you figured how to evade or turn off anti virus then use psexec to shell (meterpreter)</p><p><strong>Syntax:</strong></p><p><a href="http://1.psexec.py/smbexec.py/wmiexec.py">1.psexec.py/smbexec.py/wmiexec.py</a> &lt;domain_name&gt;/&lt;username&gt;:&lt;password&gt;@&lt;ip&gt;</p><p>Eg :psexec.py marvel.local/fcastle:Password1@192.168.159.138</p><p>=&gt;Psexec is alerting windows defender</p><p>=&gt;smbexec created the shell</p><p><strong>Through metasploit:</strong></p><p>=&gt;used exploit/windows/smb/psexec and given all info like rport,rhost,smbdomain,smbuser,smbpass and setted payload as windows/x64/meterpreter/reverse_tcp but didn’t got the shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Jc2pOXniqijCbKaZeV4fbA.png" /></figure><p><strong>Through cli:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*exQdi3pg2UwQxBIdoCziTQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*N6KJzmo8cykwzMVf-3buOA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ocs4ODw3t5Vv0hQWXfXvYQ.png" /></figure><p><strong>IPV6 Attacks</strong></p><p><strong>=&gt;</strong>Most of the machines nowadays communicate using IPv4 address and the query initiated will be gone through DNS (for IPV4) but at the same time ,IPV6 will be on and will not have any DNS server to it.</p><p>=&gt;So we impersonate as a DNS server for IPV6 traffic and transfer requests to the Domain controller.</p><p><strong>LDAPS:</strong></p><p>LDAP (Lightweight Directory Access Protocol) is a protocol used to access and manage directory services over a network. It’s widely used in environments like Active Directory for storing and retrieving information such as user details, groups, and permissions.</p><p><strong>Steps:</strong></p><ol><li>Turn on certificate authority <strong>ON</strong> on domain controller</li></ol><p>2. Setting up MITM6 (posing as a fake IPV6 DNS)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*yC2L6gmMi1b9b0Z-g6H0_g.png" /></figure><p>$/opt/mitm6 mitm6 -d &lt;domain_name&gt;.local</p><p>3. using ntlmrelayx.py</p><p>$ntlmrelayx.py -6 (IPv6 only) -t (target) ldaps://&lt;domain_controller_ip&gt; -wh fakewpad.marvel.local -l lootme (dump info into “lootme” file)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*boawWWQmvv3zTdEyevtIIQ.png" /></figure><p>Until now</p><p><strong>Flow:</strong> Event triggers on user machine (Restarting Punisher) — Looking for DNS for IPV6 during restart — We posing as IPV6 DNS using mitm6 — setting up ntlmrelayx to capture request from client also posing as a fake WPAD (a protocol helps browser to find proxy configuration file ) server and relaying captured request to initiate connection via ldaps to domain controller — domain controller sends stupidly info about it’s network conf file</p><p><strong>Advantages:</strong> We can see sensitive informations about the domain admins in the network configuration file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*1_1920qUduJMU_nMQwF2rg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*ukcKKz4aYT9NPCs9-QwIyA.png" /></figure><p><strong>Event 2 Flow:</strong></p><p>We have logged in with administrator credentials in one of the system in the system — IPV6 request sent to fake IPv6 set up by us (using mitm6 tool) — By the help of ntlmrelay.py, we can use the event details in the network and it lists out accesses of process or some entity in the ntlmrelayx.py terminal page and create new user with administrator access in domain controller (Refresh users and groups tab in domain controller) — After performing IPv6 attack , file with .restore extension will be stored in the mitm6 directory.With the use of that file we can bring back domain controller to the state which was in before the attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Kv0IaKcH1y6qltWMVJKG6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*h520yeNPGpXb6jSlwk3r7w.png" /></figure><p><a href="https://dirkjanm.io/worst-of-both-worlds-ntlm-relaying-and-kerberos-delegation/">The worst of both worlds: Combining NTLM Relaying and Kerberos delegation</a></p><p><strong>My Screenshots:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xpDTcSP6icw0bhVPvOl9aA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CpBFc0AkGKykbxvWWrgdyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*VusB5PnZwBAbuSZidcLNLg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*woUO-yN2tZ8vggTPey3v7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*yC0xOSeh_c3nRUD4uNKrKw.png" /></figure><p><strong>Event 2 Screenshots:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*z4QB6pbeUurfVZlqOlFseg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*WAXXBIYRmw93MgsmgHPJXQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*eZI7ast7OKp95cCpwAJ4hg.png" /></figure><p><strong>Mitigation:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*7iBeKIG_-3-Lj35X9nhwbQ.png" /></figure><p><strong>Passback attacks:</strong></p><p><a href="https://www.mindpointgroup.com/blog/how-to-hack-through-a-pass-back-attack">https://www.mindpointgroup.com/blog/how-to-hack-through-a-pass-back-attack</a></p><p>In internal pentesting,many printers are found with default credentials.Instead of pointing LDAPS connection to domain controller IP, we are pointing to our IP (Attacker).</p><p>So everytime user enters their credentials to access files (probably to print) in the active directory,instead of sending LDAP authentication request to domain controller,it will send to our IP,we can use responder or netcat to capture the request and see plain text credentials of the worker by which we can perform many attacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*MQ46yTUj9iULXYmgEdZlYA.png" /></figure><p>=&gt;Change to attacker IP in LDAP server address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*uHDMLiSKVTkaZ6SAeUXmrg.png" /></figure><p><strong>LDAPS (LDAP Secure)</strong> Step-by-Step Explanation</p><p>LDAPS (Lightweight Directory Access Protocol Secure) is an encrypted version of LDAP that uses SSL/TLS to secure communication between a client (e.g., a printer, computer, or application) and an LDAP directory server (e.g., Microsoft Active Directory, OpenLDAP).</p><p><strong>Step-by-Step Process of LDAPS Communication</strong></p><p>Step 1: <strong>Client Initiates a Secure Connection</strong></p><p>=&gt; The client (e.g., a printer, application, or user computer) wants to communicate with the LDAP directory securely.</p><p>=&gt; Instead of using port 389 (LDAP, unencrypted), the client connects to port 636, which is dedicated to LDAPS.</p><p>Step 2: <strong>SSL/TLS Handshake Begins</strong></p><p>=&gt; The client requests an encrypted connection using SSL or TLS.</p><p>=&gt; The LDAP server responds by sending its SSL/TLS certificate.</p><p>=&gt; This certificate is issued by a Certificate Authority (CA) or could be a self-signed certificate (less secure).</p><p>Step 3: <strong>Client Verifies the Server Certificate</strong></p><p>=&gt; The client checks if the LDAP server’s certificate is trusted by verifying:</p><p>=&gt; Certificate Authority (CA): Is the CA that issued the certificate trusted?</p><p>=&gt; Validity: Is the certificate expired?</p><p>=&gt; Common Name (CN): Does the server name match the certificate’s CN?</p><p>=&gt; If the certificate is valid, the client proceeds with a secure session.</p><p>=&gt; If invalid (e.g., expired or mismatched CN), the connection fails (unless manually overridden).</p><p>Step 4: <strong>Secure TLS/SSL Tunnel is Established</strong></p><p>=&gt; If the certificate is trusted, an encrypted communication channel is established using SSL/TLS.</p><p>=&gt; All further data exchanged between the client and the server is now encrypted and cannot be intercepted.</p><p>Step 5: <strong>Client Sends Authentication Request</strong></p><p>=&gt; The client (e.g., printer or user computer) sends authentication credentials (username and password) securely.</p><p>=&gt; This request is now protected from eavesdropping because it is inside the encrypted tunnel.</p><p>Step 6: <strong>LDAP Server Authenticates the Client</strong></p><p>=&gt; The LDAP server verifies the credentials against the directory database (e.g., Microsoft Active Directory).</p><p>=&gt; If authentication is successful, the server responds with a successful bind.</p><p>=&gt; If authentication fails, an error message is sent (e.g., “Invalid credentials”).</p><p>Step 7: <strong>Client Queries the Directory</strong></p><p>Once authenticated, the client can:</p><p>=&gt; Search for users or groups in the directory.</p><p>=&gt; Retrieve email addresses (for scan-to-email in printers).</p><p>=&gt; Check user permissions (for secure printing or restricted access).</p><p>=&gt; Perform other directory lookups based on permissions.</p><p>All data exchanged remains encrypted through the SSL/TLS tunnel.</p><p>Step 8: <strong>Secure Session Ends</strong></p><p>=&gt;When the client finishes querying or authenticating, it closes the LDAPS session.</p><p>=&gt;The encrypted connection is terminated securely.</p><p><strong>LDAPS Workflow Summary</strong></p><p>Step Action</p><p>1. Client connects to LDAPS server on port 636</p><p>2. Server sends SSL/TLS certificate</p><p>3. Client validates the certificate</p><p>4. Encrypted connection is established</p><p>5. Client sends authentication request</p><p>6. LDAP server verifies credentials</p><p>7. Client queries directory (e.g., searches for users, emails, etc.)</p><p>8. Secure session ends</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*gffrn5hLJxCqv6RGxXhTDA.png" /></figure><p><strong>Post Compromise Enumeration</strong></p><p><strong>PowerView.ps1</strong></p><p><a href="https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1">https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1</a></p><p><strong>Cmd:</strong></p><p>$powershell -ep bypass</p><p>=&gt;Explicitly shutting down execution policy which is there to prevent accidential execution of scripts</p><p>$../PowerView.ps1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*CgofCbtjnHn9PzespYwP6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*QSPR-iUR3d1Wt2gpqUlyBw.png" /></figure><ol><li><strong>Get-NetDomain</strong></li></ol><p>=&gt;gets information about the domain</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*mtJ6g1F9fYL82l2AcAmlLQ.png" /></figure><p><strong>2. Get-DomainController</strong></p><p>=&gt;Gets information about domain controller</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*32WHqgqEBnJU1vqeXtAu5g.png" /></figure><p><strong>3. Get-DomainPolicy</strong></p><p>=&gt;Get policies of domains</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*HcsdhN7MS5GW09rnrmIUJA.png" /></figure><p><strong>4. (Get-DomainPolicy).”systemaccess”</strong></p><p>=&gt;You can view clear details of each policies</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*pye3TR37ymh6QBsvAhM7ew.png" /></figure><p><strong>5.Get-NetUser</strong></p><p>=&gt;gets information about the users in the domain</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*4N0411N2BuChDXuH64t_Yg.png" /></figure><p><strong>6. Get-NetUser | select cn or samaccountname or description</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*qxlwSSqwuV3z__mTJOPN_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*sRF9V8t_F7V6hB11_0lQfg.png" /></figure><p><strong>7. Get-UserProperty</strong></p><p>Get-UserProperty -Properties pwdlastset</p><p>Get-UserProperty -Properties logoncount</p><p>=&gt;Used to find honeypot account (Least logged in account)</p><p>Get-UserProperty -Properties badpwdcount</p><p><strong>8. Get-NetComputer</strong></p><p>=&gt;Gets all computer information in the AD</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*5iC19drVEV_iyn2X4ApQiQ.png" /></figure><p>Get-NetComputer -FullData</p><p>Get-NetComputer | select OperatingSystem</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*JzF-ZXA3OmwlMAaXllrkrg.png" /></figure><p><strong>9. Get-NetGroup</strong></p><p>=&gt;Gets information about group in Domain</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xacZcvG-78-XlF83kkelNw.png" /></figure><p><strong>10. Invoke-ShareFinder</strong></p><p>=&gt;Find shared folders in the domain</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*FTpORmw32FBUlqpu62AaHA.png" /></figure><p><strong>11. Get-NetGPO</strong></p><p>=&gt;Lists group policies</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*MPby_9oajTkPQPYWU7gQCg.png" /></figure><p><strong>12. Get-NPO | select displayname, whenchanged</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*7sYZdAvCKYG3FKZsCUhn6w.png" /></figure><p><strong>BloodHound:</strong></p><p>=&gt; It is a tool that gets data from the systems in active directory</p><p>=&gt;It presents the collected data in graph</p><p>Installation = $sudo apt install bloodhound</p><p><strong>Setting up neo4j database:</strong></p><p><strong>$</strong>sudo neo4j console</p><p>=&gt;Go to localhost:7474 and change the default password “neo4j” to “password”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*oCv4VZXkq2s3hiH_Emn5Ug.png" /></figure><p>On another new tab, type $bloodhound with neo4j database running on the adjacent tab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ov4UeKKxY0vaaAsSieNBmw.png" /></figure><p>Once you changed your password, update it in the /etc/bhapi/bhapi.json and open $bloodhound</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*wJBCHLSbbQ5qVrJSxo956g.png" /></figure><p>=&gt;installing using apt is giving error while changing the default credentials admin:admin in bloodhound, so downloading it by using docker</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FNFfHUYAyGN8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DNFfHUYAyGN8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FNFfHUYAyGN8%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/201dde2b6fc5b69756e71bc6370f19c7/href">https://medium.com/media/201dde2b6fc5b69756e71bc6370f19c7/href</a></iframe><p>$ apt-get upgrade &amp;&amp; apt-get update</p><p>$cd /opt</p><p>$mkdir Bloodhound</p><p>$ sudo apt install docker.io &amp;&amp; sudo apt install docker-compose</p><p>$ sudo usermod -aG docker $USER</p><p># curl -L <a href="https://raw.githubusercontent.com/SpecterOps/bloodhound/main/examples/docker-compose/docker-compose.yml">https://raw.githubusercontent.com/SpecterOps/bloodhound/main/examples/docker-compose/docker-compose.yml</a> &gt; docker-compose.yml</p><p># sudo docker-compose pull &amp;&amp; docker-compose up</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*rFlNTERk7DoMX-VtqYOE6A.png" /></figure><p><strong>Bloodhound: To run</strong></p><p>$cd /opt/Bloodhound</p><p>$docker-compose up -d</p><p><strong>About the tool:</strong> <a href="https://github.com/SpecterOps/BloodHound-Legacy/wiki/Data-Collector/6c75b90e09efea4251f5757914d90b50434d30b7">https://github.com/SpecterOps/BloodHound-Legacy/wiki/Data-Collector/6c75b90e09efea4251f5757914d90b50434d30b7</a></p><p><strong>NOTE: </strong>Keep the both windows 10 machine, Windows server 2019 on.</p><p>=&gt;Save the below SharpHound.ps1 in one of the windows 10 machine</p><p><a href="https://github.com/RedTeamMagic/Powershell/blob/main/SharpHound.ps1">https://github.com/RedTeamMagic/Powershell/blob/main/SharpHound.ps1</a></p><p><strong>On windows cmd:</strong></p><p>$powershell -ep bypass (bypass execution policy)</p><p>$../SharpHound.ps1 (Execute script)</p><p>$Invoke-Bloodhound -CollectionMethod All -Domain MARVEL.local -ZipFileName file.zip</p><p>=&gt;file.zip will be created and move that file to kali machine</p><p>=&gt;ps1 didn’t work for me so I used exe version</p><p><a href="https://github.com/SpecterOps/SharpHound/releases">https://github.com/SpecterOps/SharpHound/releases</a></p><p>$powershell -ep bypass (bypass execution policy)</p><p>$.\SharpHound.exe -c All -d MARVEL.local -f full_enum.zip</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*VLoCvcf6NzYPo9Kg0AR2SA.png" /></figure><p>The above screenshot is an error.</p><p>=&gt;I’ve executed using SharpHound.ps1 and not .exe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*-jSPs3y0iA7mwnABRbfrog.png" /></figure><p>=&gt;Transferring the file.zip into kali machine</p><p>Using bloodhound, we can enumerate the AD network — Who are all domain admins, Shortest path to domain admin, Who has session in what accounts by which we can escalate our privileges (Token impersonation)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*teoKq6hYOzcjdCC_dEpDQw.png" /></figure><p>=&gt;Uploaded file.zip file in bloodhound</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*gMf1HrAdTIqbIPfwJWDlBA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*qOJCM49tun1pu1iMsoKiFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Tl8Olk8gcj0yDg-6z5I23w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*h2SOmKyG-Fkbgt1NManxvg.png" /></figure><p>=&gt;Users with passwords in their description</p><p><a href="https://m4lwhere.medium.com/the-ultimate-guide-for-bloodhound-community-edition-bhce-80b574595acf">The Ultimate Guide for BloodHound Community Edition (BHCE)</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*taOIpISDj5grSPYsuSNZVg.png" /></figure><p><strong>Attacking Active Directory — Post Compromise Attacks</strong></p><p><strong>1. Pass the password/hash attack:</strong></p><p>Passing the hash/password of the system which is in AD network to try and access whether the same password is used to any other device on the network or the same user is logged or anyway associated with other machines in the network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Vz291_D09oOhwdQMGY5A7A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Fox735O94jDMNncC5Lf62g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*p1FT6FKmFGJImL141yAwhg.png" /></figure><p><strong>Installing crackmapexec</strong></p><p>$sudo apt install crackmapexec</p><p>$crackmapexec smb 192.168.159.0/24 -u fcastle -d MARVEL.local -p Password1</p><p><strong>Syntax:</strong> crackmapexec smb &lt;ip range&gt; -u &lt;username&gt; -d &lt;domain&gt; -p &lt;password&gt;</p><p>crackmapexec smb &lt;ip range&gt; -u &lt;username&gt; -d &lt;domain&gt; -p &lt;password&gt; — — sam (Brings sam hashes) &lt;sometimes may fail&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*HVUP7yCI-QNs2J4yUMGNbg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*15ukvBYbUgNiFryaJEJU5Q.png" /></figure><p><strong>NOTE:</strong> psexec was detected by windows anti-virus, I’ve turned off every security features regarding anti-virus</p><p><strong>Dumping passwords with </strong><a href="http://secretsdump.py/"><strong>secretsdump.py</strong></a><strong> on both ironfist and spiderman machine</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*hZz0WqDnq41qcTIevskozA.png" /></figure><p>I’ve been getting error eventhough I’ve turned off every security features regarding anti-virus but you will be getting hashes like the image below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*jbHK9VL8PlCDjmPvSSpcPg.png" /></figure><p><strong>Hashes:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*q9wnKQTiJ-V7TmbvyG3hgA.png" /></figure><p><strong>NOTE</strong>: This is an NTLM type of hash.</p><p>=&gt;NTLM hashes can be passed around to bypass authentication</p><p>=&gt;NTLM version 2 hashes <strong>cannot</strong> be passed around to bypass authentication</p><p><strong>NTLM hash entries</strong> from a Windows SAM (Security Account Manager)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*zuwnMhKJGbtzDVMYQ0CXtQ.png" /></figure><p>Syntax: &lt;Username&gt;:&lt;RID&gt;:&lt;LM Hash&gt;:&lt;NT Hash&gt;:::</p><p><strong>Username</strong>: Self-explanatory (e.g., Administrator, Peter Parker).</p><p><strong>ID (Relative Identifier)</strong>:</p><p>500 = Default RID for the Administrator account.<br> 1001 = Typically user-created accounts.</p><p><strong>LM Hash</strong>:</p><p>aad3b435b51404eeaad3b435b51404ee = Placeholder indicating <strong>LM hash is disabled</strong> (modern and secure default).</p><p>The <strong>LM hash</strong> (LAN Manager hash) is a legacy Windows password hashing algorithm. It is <strong>highly insecure</strong> and has been <strong>disabled by default since Windows Vista/Windows Server 2008</strong>, but still shows up in tools that dump password hashes.</p><p>In Screenshot For <strong>all users</strong>, the LM hash is:</p><p>aad3b435b51404eeaad3b435b51404ee</p><p>This is a <strong>placeholder value</strong>, which means:</p><p>❗ <strong>LM hashing is disabled</strong> on these accounts.</p><p><strong>NT Hash</strong>: This is the actual NTLM hash of the user’s password. It can be cracked offline using tools like Hashcat or John the Ripper.</p><p>The last three colons (:::) are typically placeholders for additional metadata (e.g., password hints, timestamps, etc.).</p><p><strong>Cracking Hashes:</strong></p><p>hashcat.exe -m 1000 (NTLM hashmode) hash.txt rockyou.txt -O (optimization)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*FLz_otA3amJndRjyAQCRGQ.png" /></figure><p><strong>NOTE: </strong>you can see that there is empty spaces after the first hash (admin — hash). It indicates the account is disabled which means we <strong>can’t </strong>pass around it’s hash.</p><p><strong>Passing hashes using crackmapexec:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Un63aCjIstKAoT2tAXufpA.png" /></figure><p>No luck here :(</p><p>If by any chance, there is a green signal in the above command, we can use psexec.py to gain shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ulox2O0s8zCLZjRlBqFcTA.png" /></figure><p><strong>Mitigation:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*YfUsG-8CjDKgzCzh8HEOIQ.png" /></figure><p><strong>Token Impersonation attack:</strong></p><p><strong>Impersonating as Non-domain admin user:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*x3naf-fPsS9sHpZummKtGA.png" /></figure><p><strong>=&gt;</strong>Incognito is a default module in meterpreter. We have to load it and use it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*gPcm6QufNo1oYqwWtn0O8Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*eNTwmzWdzipZUTQpyjl2eQ.png" /></figure><p><strong>=&gt;</strong>Mimikatz is a powershell script which is used to dump password.</p><p>=&gt;It doesn’t work here since we are non-domain admin user (fcastle)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*QQC_EZsjaF0_0ORFhuHXqw.png" /></figure><p><strong>Impersonating as a domain admin:</strong> (Domain admin token — when available)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Bwv4qN3rzAHkejgkfJiMrQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Sbz_-aNfUCozIB4OwZaJfg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*DUc8XSbGYTv0CJQ44tnZtQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*9kCtUbz0UpDNC4xImusxOw.png" /></figure><p><strong>Hands-on</strong></p><p>On kali:</p><p>$msfconsole</p><p>msf6 &gt; use exploit/windows/smb/psexec</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*W7zyAkRWq1EjG9hci9SX5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*fX0PZBBgNaLha-c3CI0SYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*MawN_cG4t6WctSEto-sEhQ.png" /></figure><p>$exploit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*4JDmYdZTbHZH--sTriDVYA.png" /></figure><p>$help</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*hz9AP3FMNbc2WAJq-tjOcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*dVZ-zxKtF0tkPuIx7SRABg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KWQwjfGjJoOXa-Ej8XA0Vg.png" /></figure><p>=&gt; After impersonating a user, commands like hashdump might not work. If you need, $rev2self then click $hashdump</p><p>We’ve logged in with windows machine using fcastle. After when you execute $list_tokens -u , you can see marvel/fcastle token. It will be valid until you reboot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*heyyOsT7ygUn1iBvY6ov6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*hEXI6ygWHe49orLULM25ew.png" /></figure><p>=&gt; Don’t put user as local admins since even if we get their access to local admin account, it won’t give root access</p><p>=&gt; Don’t login as domain admin (domain controller account) anywhere — this will reduce storage of domain admin token in user machines.</p><p>=&gt; Use account tiering — Eg. Two accounts = fcastle (for normal usage), fcastle-a (only when you want to log into domain controller (-a ( denoting account with admin privileges)) )</p><p><strong>Kerberoasting</strong> (Attack name)</p><p><strong>Kerberoast:</strong></p><p>=&gt; Here domain controller is also called Key Distribution Center (KDC)</p><p>=&gt; Each service (Here in this diagram, application server ) has SPN (Special Principal Number)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*FxrYHZhvWpixhhyd65Satg.png" /></figure><p><strong>Workflow of authentication in kerberoast:</strong></p><p>1. User provides NTLM hash (Username, Password) to Domain Controller (Ticket Distribution Center) by requesting TGT (Ticket Granting Ticket) from DC.</p><p>2. After authenticating, user gets Ticket Granting Ticket (TGT) encrypted with krbtgt hash from KDC (Domain Controller) along with session key(which is encrypted using key derived from user’s NTLM hash)</p><p>3. User request TGS (Ticket Granting Service Ticket) from domain controller (KDC) for accessing a particular service by giving TGT (Ticket Granting Ticket) to DC.</p><p>4. Receives TGS from DC encrypted with server account’s password hash (Whatever the service we request. Eg. SQl, Web Service) (So that only service providing server can decrypt the TGS and verify the user )</p><p>5. Presents TGS (which is encrypted with server account’s hash) to service providing server</p><p>6. Service providing server authenticates and give access to user for particular service</p><p><strong>Kerberoasting:</strong> Crack service account’s password hash offline from step 5. Ie. TGS -&gt; encrypted with service account’s password hash -&gt; Encrypted TGS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KQSywWGakg-t0Mm6cYMxow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_iLBcJjRBusyHTNuk7gT4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ev3xVPVgTknJ8CVTU_p1WQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*kOPyNxGmlBrFa7mbgkKAxQ.png" /></figure><p>We got SQL Service account password:MyPassword123# . Service should never be domain admin but most of the time it is. By this we can gain access into the domain controller.</p><h3>Kerberoasting does NOT decrypt the ticket.</h3><p>It does:</p><p>Guess password → generate hash → try decrypt → check success</p><p>So it’s <strong>offline password cracking</strong>, not key extraction.</p><p><strong>Mitigation:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*AWEqt9pFoRbA0bofXJ5_HA.png" /></figure><p><strong>GPP (Group Policy Preferences) MS14–025:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*kqWTeBPPW6MSk7pbESa9KQ.png" /></figure><p>=&gt;Not common but still it is exploitable in DC before the patch MS14–025</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*F701y4pIzO3Y2LmpXmWvpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*iH06ZDa7gHbMyeRg41fzsg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*RNVEy58j0RRNwD3AgWIDlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*jrvV71JSAjN7vZ3DMaBEVw.png" /></figure><p>=&gt;SYSVOL share can be read by any user account . Group policies are stored there</p><p>=&gt;In the SYSVOL folder, we are looking for Groups.xml, there will be username and cPassword in there</p><p>=&gt; Key used for encrypting cPassword is leaked. Any password hash before the patch can be cracked</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*XRtxvrXCidLBvGURyQHvHg.png" /></figure><p>=&gt;smb_enum_grp is a metasploit scanning auxiliary module, which can enumerate against domain controller and can get password</p><p>=&gt;It is a post enumeration attack so compromised credentials of user account is expected here</p><p><strong>HTB: Active</strong></p><p><strong>$</strong>nmap -T5 &lt;ip&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*lpMvcJRYBLfdY3pz7l32xg.png" /></figure><p>=&gt;In domain controller we expect,</p><p>Port 53 to be open (It can be router using port as well )</p><p>Port 88 — Kerberos</p><p>Port 389 — Ldap</p><p>Port 636 — LdapSSL</p><p>Port 445 — SMB (This attack need SMB — We need to access SYSVOL share)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Xb9GOtgzn-1m3qfT6-GXZA.png" /></figure><p>=&gt; If you try to access via anonymous login, all the shares are going to deny access except replication share</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*RjY7qFzAuR4rmxT3GiCFgA.png" /></figure><p>=&gt; prompt off — It won’t prompt for confirmation everytime. Eg . If you download many files, it won’t ask for confirmation for each file</p><p>=&gt;recurse on — enable recursive directory traversal . Eg. If you type “ $mget * “ after $recurse on, it will download all the files recursively starting from current directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*hgShfLrkyim3nhBafpBNRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ve6xGdxEMwI2frjiN2DPWA.png" /></figure><p>=&gt;By the username we can tell that it is a hint given to us related to Kerbersoting ie. active.htb\SVC_TGS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*nE2ICSeZ0mD-0ovLYF1Qxw.png" /></figure><p><strong>Privilege Escalation:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*2SrWuKd4x7MapNquT8RvDA.png" /></figure><p>=&gt;With normal user, we cannot gain shell</p><p>=&gt;Since it is user account, we’re going to do Kerberosting and get TGS and crack the service account password hash and gain shell using service account credentials</p><p><strong>Kerberosting:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*su4tULo-MhYJUoK10xEDyQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*7xcHezoJ-TkI4td26pJvLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*00EzjE9g7toQC9ZSRohJCw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_GNgQkqRAm1CDlYcIDCZ1Q.png" /></figure><p>=&gt; Password: Ticketmaster1968</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*goTxwnKR41J94s_VBpluUg.png" /></figure><p><strong>URL Attack:</strong></p><p>=&gt; If you have already compromised account and it has some share, the file we created will automatically send NTLM hash to attacker upon opening the share without the file.</p><p>=&gt; Windows load them default.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*LakLwHP0QS7Rx7gVmE_v7Q.png" /></figure><p>=&gt;<strong>Watch out for syntax:</strong> the ip above is attacker Ip, which is listening using responder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*YtLGuEpWTD0u2bh_5eDZtQ.png" /></figure><p>=&gt;File name should be enclosed within quotes.</p><p>=&gt;File name should contain @ or ~.</p><p>=&gt;It’s extension should be .url</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*YyWMRF5ymSZ9aTP08HH9iQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*to4u84ZWuL8XOjjR8Qg-Og.png" /></figure><p>=&gt; When anyone opens the share folder, file will be automatically made to send NTLM hash</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*-53bOJsahvnEo-YsY3J7-g.png" /></figure><p>=&gt; You can relay, crack the password hash offline</p><p><strong>Mimikatz</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*WyEJ-ERfe1HAo_4BweboFA.png" /></figure><p><a href="https://github.com/gentilkiwi/mimikatz/wiki">Home</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*HU5iE6S8AagWEmLx0C5XpA.png" /></figure><p>=&gt;We are in Domain Controller</p><p>=&gt; Windows probably don’t allow mimikatz to run. Instead you can run powershell script like Invoke-Mimikatz</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*95NGQBIgEyUXISjJWR7qYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*3MyDroMAeTXGE2cccnMAog.png" /></figure><p>=&gt; First one privilege is the module name</p><p>=&gt; debug lets</p><p>=&gt;The debug privilege allows someone to debug a process that they wouldn’t otherwise have access to. For example, a process running as a user with the debug privilege enabled on its token can debug a service running as local system.</p><p>=&gt; without it, we cannot bypass memory protection mechanism to perform actions like dump credentials using required module</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*MwRkSQF1pWebRuoEq0oXHA.png" /></figure><p>=&gt; Gives password hash of logged in accounts</p><p>=&gt;This module extracts passwords, keys, pin codes, tickets from the memory of lsass (Local Security Authority Subsystem Service)</p><p>The Local Security Authority Subsystem Service (lsass.exe) is a critical Windows process responsible for enforcing security policies, managing user authentication, handling password changes, and creating access tokens. Running with elevated system privileges, it validates logons, maintains the security log, and acts as a primary target for credential-dumping attacks.</p><p><strong>Key Aspects of LSASS:</strong></p><p>=&gt; <strong>Function</strong>: Authenticates users for local and remote logins, enforces security policies, and manages Active Directory interactions.</p><p>=&gt; <strong>Security Risk</strong>: Because it stores sensitive authentication data (NTLM hashes, Kerberos tickets) in memory, it is a major target for attackers using tools like Mimikatz.</p><p>=&gt; <strong>Protection</strong>: <a href="https://learn.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/configuring-additional-lsa-protection">Windows 8.1+</a> and later allows enabling “LSA Protection,” which runs the process in a protected mode (RunAsPPL) to prevent non-trusted, unsigned processes from accessing its memory.</p><p>=&gt; <strong>System Impact</strong>: Forcible termination of lsass.exe causes the system to lose access to security accounts, forcing an automatic system reboot within one minute.</p><p>=&gt; <strong>Location</strong>: It runs as a system-level process (typically C:\Windows\System32\lsass.exe). If found elsewhere, it may indicate malware.</p><p><strong>Key Security Recommendations:</strong></p><p>=&gt; Enable <a href="https://www.lepide.com/blog/why-you-should-enable-lsa-protection/">LSA Protection</a> to prevent credential dumping, especially in enterprise environments.</p><p>=&gt; Monitor for unauthorized access to lsass.exe memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*OhYh7onlVU806-DqYwHw8g.png" /></figure><p>=&gt;wdigest: It is a feature which up until Windows 7, store password in plain text.</p><p>=&gt;wdigest plaintext showing is disabled from windows 8.</p><p>=&gt;We can turn on wdigest and wait for someone to login so we can see plaintext password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Zpzg3SleV0jTljim3lANzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*2rz8fM85rfyIzIrWz1dj5w.png" /></figure><p>=&gt;lsadump:sam : This command dumps the Security Account Managers (SAM) database. It contains NTLM, and sometimes LM hash, of users passwords. It can work in two modes: online (with SYSTEM user or token) or offline (with SYSTEM &amp; SAM hives or backup)</p><p>=&gt;If you’re not SYSTEM or using an impersonated SYSTEM token, you’ll have access denied error:</p><p>mimikatz # lsadump::sam</p><p>Domain : VM-W7-ULT-X</p><p>SysKey : 74c159e4408119a0ba39a7872e9d9a56</p><p>ERROR kuhl_m_lsadump_getUsersAndSamKey ; kull_m_registry_RegOpenKeyEx SAM Accounts (0x00000005)</p><p>In this case, you can use psexec to begin SYSTEM (or other tools) or elevate with token::elevate command to impersonate a SYSTEM token</p><p><strong>Golden Ticket Attack &amp; Pass the Ticket</strong></p><p><strong>=&gt;</strong>If krbtgt account hash can be cracked, (which generates Ticket Granting Ticket), we can create a golden ticket by which we can access any devices on domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*COj5XUplBiunU8PCJuyhjg.png" /></figure><p>=&gt; To generate golden ticket we need NTLM hash of krbtgt account and Sid of that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*DUmVWXpbRzVFvt08dRUFqw.png" /></figure><p><strong>The Security Identifier (SID) </strong>of the krbtgt account is S-1–5-domain-502.</p><p>Here is a breakdown of the SID structure for the krbtgt account:</p><p><strong>S-1–5</strong>: The identifier authority (NT Authority). — This represents the unique SID of your Active Directory domain (e.g., S-1–5–21–1234567890–1234567890–1234567890).</p><p><strong>502</strong>: The Relative Identifier (RID) for the krbtgt user account, which is consistent across all domains. Key Information About the krbtgt Account: Function: It is the built-in account used by the Key Distribution Center (KDC) service to sign and encrypt all Kerberos Ticket Granting Tickets (TGT).</p><p><strong>Location</strong>: It exists only on domain controllers, typically in the Users container.</p><p><strong>Security Implication:</strong> Compromise of the krbtgt account password hash (e.g., in a Golden Ticket attack) allows attackers to generate forged tickets, granting them full domain access.</p><p><strong>Best Practice:</strong> The password for this account should be changed periodically (every 180 days). To completely invalidate a compromised ticket, the password must be reset twice to clear the password history.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*el_OjSjn8kXy6K0-gAFBEg.png" /></figure><p>=&gt;Under /User: we can give whatever the username we want to. Even the username that doesn’t exist in the domain</p><p>=&gt;ptt : pass the ticket</p><p>=&gt;/id:500 — For admin account</p><p>=&gt;Through the golden ticket, we can open command prompt whatever we want in any of the devices in the domain</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*IA5V_VAyBGTFpW-kIGqhGA.png" /></figure><p>=&gt;Golden ticket is created for current session</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*7xOmFQqkAq4geGm2bITXmw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9I_e4OdztjXPxKBNteY46Q.png" /></figure><p>=&gt;We can download psexec.py and take shell in whatever machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xOwpBUeDTG4OZN56BLiXvw.png" /></figure><p><strong>Silver Ticket attack:</strong></p><p><a href="https://www.crowdstrike.com/en-us/cybersecurity-101/cyberattacks/silver-ticket-attack/">https://www.crowdstrike.com/en-us/cybersecurity-101/cyberattacks/silver-ticket-attack/</a></p><p>A silver ticket attack is a post-exploitation attack where an adversary forges a Kerberos service ticket (TGS) to access specific services without needing reauthentication by the domain controller. Unlike a <a href="https://www.crowdstrike.com/en-us/cybersecurity-101/cyberattacks/golden-ticket-attack/">golden ticket attack</a>, which grants full domain control, a silver ticket attack is more targeted, allowing adversaries to abuse a specific service account while bypassing certain security controls. Preventing and detecting silver ticket attacks is critical to securing an organization’s Active Directory infrastructure.</p><p>A <strong>Silver Ticket attack</strong> requires only:</p><h3>You must have:</h3><p>1. <strong>Service account hash/password</strong></p><p>2. Domain name</p><p>3. Domain SID</p><p>4. SPN (service name)</p><p><strong>Key Idea</strong></p><h3>Silver Ticket = forged TGS (offline)</h3><p>You:</p><p>=&gt; forge your own service ticket</p><p>=&gt; skip KDC completely</p><p>=&gt; authenticate directly to service</p><p><strong>Thanks for reading till the end :)</strong></p><p><strong>See you guys in the next post !!!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97f151dacc5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>