<?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 MR Gh0st [ 0xff ] on Medium]]></title>
        <description><![CDATA[Stories by MR Gh0st [ 0xff ] on Medium]]></description>
        <link>https://medium.com/@mrgh0st?source=rss-de2b765d5c20------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6nkm10U6QnbDs43ecD581g.jpeg</url>
            <title>Stories by MR Gh0st [ 0xff ] on Medium</title>
            <link>https://medium.com/@mrgh0st?source=rss-de2b765d5c20------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 12:47:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mrgh0st/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[The Ultimate Guide to Subdomain Enumeration: Techniques, Tools, and Best Practices]]></title>
            <link>https://medium.com/@mrgh0st/the-ultimate-guide-to-subdomain-enumeration-techniques-tools-and-best-practices-f252fa109b21?source=rss-de2b765d5c20------2</link>
            <guid isPermaLink="false">https://medium.com/p/f252fa109b21</guid>
            <dc:creator><![CDATA[MR Gh0st [ 0xff ]]]></dc:creator>
            <pubDate>Thu, 21 Aug 2025 09:31:48 GMT</pubDate>
            <atom:updated>2025-08-21T09:31:48.714Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Unlock hidden attack surfaces and expand your target scope with comprehensive subdomain discovery methods</em></p><h3>Why Subdomain Enumeration Matters</h3><p>Subdomain enumeration is arguably one of the most critical phases in modern reconnaissance and penetration testing. In today’s complex web architectures, organizations often deploy numerous subdomains for various purposes — development environments, API endpoints, administrative panels, and third-party services. Many of these subdomains are forgotten, poorly secured, or contain vulnerabilities that can lead to significant security breaches.</p><p>Consider this: 76% of organizations have vulnerable subdomains that could potentially lead to system compromises. From the massive GitHub token leak via a misconfigureed subdomain to numerous subdomain takeover vulnerabilities affecting major companies, the risks are real and substantial.</p><p>In this comprehensive guide, we’ll explore both fundamental and advanced subdomain enumeration techniques, tools, and strategies that security professionals use to discover hidden attack surfaces.</p><h3>Understanding Subdomain Enumeration</h3><h3>What Are Subdomains?</h3><p>Subdomains are subdivisions of main domains that can point to different servers or services. For example:</p><ul><li>api.example.com (API endpoints)</li><li>admin.example.com (Administrative interface)</li><li>dev.example.com (Development environment)</li><li>cdn.example.com (Content delivery network)</li></ul><h3>Why Enumeration is Crucial</h3><ol><li>Expanded Attack Surface: Each subdomain represents potential entry points</li><li>Forgotten Assets: Companies often forget about old subdomains</li><li>Different Security Postures: Subdomains may have weaker security than main domains</li><li>Information Disclosure: Often reveal internal infrastructure details</li></ol><h3>Passive Enumeration: The Stealthy Approach</h3><p>Passive enumeration involves gathering information without directly interacting with the target’s infrastructure. This method is stealthy and avoids triggering security alerts.</p><h3>Search Engine Discovery</h3><p>Search engines have indexed countless subdomains over years of crawling. Using advanced search operators can reveal valuable information:</p><pre># Google Dorks for subdomain discovery<br>site:*.example.com<br>site:*.*.example.com<br>inurl:example.com -site:example.com<br><br># Bing search for related subdomains<br>ip:192.168.1.1</pre><h3>Certificate Transparency Logs</h3><p>Certificate Transparency (CT) logs are a goldmine for subdomain discovery. Every SSL/TLS certificate issued is recorded in public logs</p><pre># Using crt.sh via command line<br>curl -s &quot;https://crt.sh/?q=%.example.com&amp;output=json&quot; | jq -r &#39;.[].name_value&#39; | <br>sed &#39;s/\*\.//g&#39; | sort -u &gt; certificate_subdomains.txt<br><br># Common certificate transparency sources<br>- crt.sh<br>- Google Transparency Report<br>- Certificate Search<br>- CertSpotter</pre><h3>Passive DNS Databases</h3><p>Several services maintain historical DNS data that can reveal subdomains:</p><pre># SecurityTrails API example<br>curl &quot;https://api.securitytrails.com/v1/domain/example.com/subdomains&quot; \<br>  -H &quot;APIKEY: your-api-key&quot; | jq -r &#39;.subdomains[]&#39; | <br>  sed &#39;s/$/.example.com/&#39; &gt; securitytrails_subs.txt<br><br># Other valuable sources:<br>- VirusTotal<br>- PassiveTotal<br>- DNSDumpster<br>- WhoisXMLAPI</pre><h3>Active Enumeration: Direct Discovery Methods</h3><p>Active techniques involve directly interacting with the target’s DNS infrastructure and services.</p><h3>DNS Brute Forcing</h3><p>Brute forcing remains one of the most effective methods for discovering subdomains:</p><pre># Using Gobuster with multiple wordlists<br>gobuster dns -d example.com -w subdomains.txt \<br>  -t 50 --delay 100ms -o gobuster_results.txt<br><br># FFuF with advanced filtering<br>ffuf -w subdomains.txt -u https://FUZZ.example.com \<br>  -mc 200,301,302 -t 100 -rate 50 -o fuf_results.json<br><br># Best practices for brute forcing:<br>- Use multiple wordlists<br>- Adjust rates to avoid detection<br>- Rotate DNS resolvers<br>- Implement random delays</pre><h3>DNS Zone Transfers</h3><p>Though increasingly rare, misconfigured DNS servers may allow zone transfers:</p><pre># Attempt zone transfer<br>dig axfr @ns1.example.com example.com<br><br># If successful, you&#39;ll get all DNS records<br># Common nameservers to try:<br>- ns1.example.com<br>- ns2.example.com<br>- dns1.example.com</pre><h3>Permutation and Alteration Attacks</h3><p>Creating intelligent variations of known subdomains can reveal new targets:</p><pre># Using altdns for permutation<br>altdns -i known_subdomains.txt -o data_output -w words.txt \<br>  -r -s results.txt<br><br># DNSGen for advanced generation<br>dnsgen known_subdomains.txt | massdns -r resolvers.txt \<br>  -t A -o S -w dnsgen_results.txt<br><br># Common permutation patterns:<br>- dev-api → api-dev, api-dev1, dev1-api<br>- test → testing, staging, preprod<br>- admin → administrator, login, auth</pre><h3>Advanced Techniques and Automation</h3><h3>Orchestrating Multiple Tools</h3><p>The real power comes from combining multiple tools and techniques:</p><pre>#!/bin/bash<br># Automated subdomain enumeration script<br>DOMAIN=$1<br>echo &quot;[+] Starting subdomain enumeration for $DOMAIN&quot;<br><br># Create directory structure<br>mkdir -p $DOMAIN/subdomain_enum<br><br># Passive enumeration<br>echo &quot;[+] Passive enumeration...&quot;<br>subfinder -d $DOMAIN -all -o $DOMAIN/subdomain_enum/subfinder.txt<br>amass enum -passive -d $DOMAIN -o $DOMAIN/subdomain_enum/amass_passive.txt<br><br># Certificate transparency<br>curl -s &quot;https://crt.sh/?q=%.$DOMAIN&amp;output=json&quot; | jq -r &#39;.[].name_value&#39; | <br>sed &#39;s/\*\.//g&#39; | sort -u &gt; $DOMAIN/subdomain_enum/crtsh.txt<br><br># Active enumeration<br>echo &quot;[+] Active enumeration...&quot;<br>amass enum -active -d $DOMAIN -brute -w /path/to/wordlist.txt \<br>  -o $DOMAIN/subdomain_enum/amass_active.txt<br><br># Combine and deduplicate results<br>cat $DOMAIN/subdomain_enum/*.txt | sort -u &gt; $DOMAIN/all_subdomains.txt<br>echo &quot;[+] Found $(wc -l $DOMAIN/all_subdomains.txt) unique subdomains&quot;</pre><h3>DNS Resolution and Validation</h3><p>Not all discovered subdomains will resolve. Validation is crucial:</p><pre># MassDNS for high-speed resolution<br>massdns -r resolvers.txt -t A -o S $DOMAIN/all_subdomains.txt &gt; resolved.txt<br><br># Extract valid subdomains<br>cat resolved.txt | awk &#39;{print $1}&#39; | sed &#39;s/\.$//&#39; | sort -u &gt; valid_subdomains.txt<br><br># HTTP validation with httpx<br>cat valid_subdomains.txt | httpx -title -status-code -tech-detect \<br>  -o $DOMAIN/live_subdomains.txt</pre><h3>Essential Tools for Subdomain Enumeration</h3><h3>Comprehensive Tool Comparison</h3><pre>Subdomain Enumeration Tools<br>│<br>├── Amass<br>│   ├── Best For: Comprehensive enumeration<br>│   ├── Strengths: Multiple data sources, OSINT<br>│   └── Limitations: Can be slow<br>│<br>├── Subfinder<br>│   ├── Best For: Fast passive enumeration<br>│   ├── Strengths: Speed, simplicity<br>│   └── Limitations: Limited active enumeration<br>│<br>├── AssetFinder<br>│   ├── Best For: Quick overview<br>│   ├── Strengths: Simple output<br>│   └── Limitations: Basic features<br>│<br>├── OneForAll<br>│   ├── Best For: All-in-one solution<br>│   ├── Strengths: 21 data sources<br>│   └── Limitations: Complex setup<br>│<br>└── TheHarvester<br>    ├── Best For: Email and subdomain collection<br>    ├── Strengths: Multi-source<br>    └── Limitations: Older codebase</pre><h3>Specialized Tools</h3><pre># For certificate transparency<br>- ct-exposer: https://github.com/chris408/ct-exposer<br>- CertCrunchy: https://github.com/joda32/CertCrunchy<br><br># For DNS brute forcing<br>- dnsrecon: Comprehensive DNS enumeration<br>- dnscan: Python-based DNS scanner<br>- massdns: High-performance DNS resolver<br><br># For subdomain takeover<br>- Subjack: Subdomain takeover tool<br>- HostileSubBruteforcer: Takeover detection<br>- nuclei: With takeover templates</pre><h3>Building Effective Wordlists</h3><h3>Curated Wordlists Sources</h3><ol><li>SecLists: Discovery/DNS/ directory</li><li>Commonspeak2: Frequently updated wordlists</li><li>AssetNote Wordlists: High-quality targeted lists</li><li>Custom Generation: Based on target industry</li></ol><h3>Creating Targeted Wordlists</h3><pre># Extract words from existing subdomains<br>cat known_subdomains.txt | awk -F. &#39;{print $1}&#39; | sort -u &gt; custom_words.txt<br><br># Generate industry-specific words<br># For tech companies: api, dev, staging, lab, test<br># For e-commerce: shop, store, cart, payment<br># For education: learn, course, student, portal<br><br># Combine multiple sources<br>cat seclists.txt commonspeak.txt custom_words.txt | sort -u &gt; combined_wordlist.txt</pre><h3>Defensive Considerations: Protecting Your Subdomains</h3><h3>For Defenders: Best Practices</h3><ol><li>Inventory Management: Maintain a complete subdomain inventory</li><li>Regular Audits: Schedule periodic subdomain discovery scans</li><li>Monitoring: Implement alerts for new subdomain creations</li><li>Security Headers: Implement proper security headers on all subdomains</li><li>Wildcard DNS: Use carefully and with proper security measures</li></ol><h3>Monitoring for Subdomain Takeovers</h3><pre># Regular takeover checks<br>subjack -w subdomains.txt -t 100 -timeout 30 -c /path/to/fingerprints.json<br><br># Automated monitoring script<br>#!/bin/bash<br>DOMAIN=&quot;yourdomain.com&quot;<br># Run enumeration<br>subfinder -d $DOMAIN -o new_subs.txt<br># Compare with previous results<br>diff old_subs.txt new_subs.txt &gt; changes.txt<br># Check new subdomains for takeovers<br>subjack -w new_subs.txt -o potential_takeovers.txt</pre><h3>Real-World Case Studies</h3><h3>Case Study 1: The GitHub Token Leak</h3><p>A misconfigured .env file on a development subdomain exposed GitHub tokens that led to access to private repositories. The subdomain dev-api.company.com was discovered through certificate transparency logs and contained hardcoded credentials.</p><h3>Case Study 2: Subdomain Takeover via AWS S3</h3><p>An abandoned cdn.company.com subdomain pointed to a deleted AWS S3 bucket. Attackers claimed the bucket and served malicious content on the company&#39;s domain.</p><h3>Case Study 3: Internal Infrastructure Exposure</h3><p>A subdomain vpn.company.com was discovered through brute forcing, which revealed the company&#39;s VPN login page and allowed for password spraying attacks.</p><h3>Advanced Tactics for Bug Bounty Hunters</h3><h3>Methodology for Maximum Coverage</h3><ol><li>Comprehensive Passive Enumeration: Start with all passive sources</li><li>Targeted Brute Forcing: Use multiple wordlists and techniques</li><li>Permutation Attacks: Generate variations of discovered subdomains</li><li>Historical Analysis: Check Wayback Machine and DNS history</li><li>Continuous Monitoring: Set up alerts for new subdomains</li></ol><h3>Pro Tips for Success</h3><pre># Always check for aliases and CNAME records<br>dig CNAME suspicious-subdomain.example.com<br><br># Look for interesting response patterns<br># - Different HTTP headers<br># - Unique error messages<br># - Unusual technologies<br><br># Don&#39;t forget about internationalized domain names<br># Example: café.example.com (xn--caf-dma.example.com)</pre><h3>Legal and Ethical Considerations</h3><h3>Always Remember:</h3><ol><li>Authorization: Only test targets you own or have permission to test</li><li>Respect robots.txt: While not legally binding, it shows intent</li><li>Rate Limiting: Avoid aggressive scanning that may cause disruption</li><li>Data Handling: Responsibly handle any discovered information</li><li>Disclosure: Follow responsible disclosure practices for findings</li></ol><h3>Conclusion: Mastering Subdomain Enumeration</h3><p>Subdomain enumeration is both an art and a science. The most successful security professionals combine multiple tools, techniques, and creative thinking to discover hidden attack surfaces. Remember that:</p><ol><li>No single tool is perfect — Use a combination approach</li><li>Persistence pays off — New subdomains appear constantly</li><li>Context matters — Understand the target’s business and technology</li><li>Automation is key — But human analysis is irreplaceable</li></ol><h3>Next Steps for Mastery</h3><ol><li>Practice: Set up your own domains and test enumeration techniques</li><li>Stay Updated: New tools and techniques emerge regularly</li><li>Contribute: Share your wordlists and findings with the community</li><li>Specialize: Consider focusing on particular industries or technologies</li></ol><h3>Resources and Further Learning</h3><h3>Recommended Reading</h3><ul><li><a href="https://owasp.org/www-project-web-security-testing-guide/">OWASP Testing Guide — Information Gathering</a></li><li><a href="https://nostarch.com/bug-bounty-bootcamp">Bug Bounty Bootcamp</a></li><li><a href="https://blog.compass-security.com/2020/05/the-art-of-subdomain-enumeration/">The Art of Subdomain Enumeration</a></li></ul><h3>Training Platforms</h3><ul><li>HackTheBox</li><li>TryHackMe</li><li>BugCrowd University</li><li>HackerOne Hacktivity</li></ul><h3>Community Resources</h3><ul><li>Reddit: /r/netsec, /r/bugbounty</li><li>Twitter: #bugbounty, #reconnaissance</li><li>Discord: Various security communities</li></ul><p><em>Happy hunting! Remember to always test ethically and contribute back to the security community.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f252fa109b21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Active Directory User Enumeration]]></title>
            <link>https://medium.com/@mrgh0st/active-directory-user-enumeration-69c146381fec?source=rss-de2b765d5c20------2</link>
            <guid isPermaLink="false">https://medium.com/p/69c146381fec</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[blackhat]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[red-teaming]]></category>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[MR Gh0st [ 0xff ]]]></dc:creator>
            <pubDate>Sun, 10 Aug 2025 17:28:21 GMT</pubDate>
            <atom:updated>2025-08-10T17:28:21.978Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Author: MR Gh0st [0xff]</em></p><h3>Table of Contents</h3><ol><li>Introduction to Active Directory (AD)</li><li>What is User Enumeration in AD?</li><li>Why User Enumeration Matters for Pentesters &amp; Red Teamers</li><li>Tools for AD Enumeration in Kali Linux</li><li>Manual Enumeration Using LDAP</li><li>SMB-Based Enumeration</li><li>Kerberos-Based Enumeration (Kerbrute &amp; Rubeus)</li><li>RPC Enumeration</li><li>Nmap NSE Scripts for AD Enumeration</li><li>Using CrackMapExec for User Enumeration</li><li>Enum4linux-ng in Depth</li><li>Impacket Toolkit for AD Enumeration</li><li>Password Spray and Credential Stuffing Techniques</li><li>PowerShell Methods for AD Enumeration (Windows Environment)</li><li>Mitigation and Hardening Against User Enumeration</li><li>OPSEC Tips During Enumeration</li><li>Final Thoughts</li></ol><h3>1. Introduction to Active Directory (AD)</h3><p>Active Directory (AD) is Microsoft’s directory service that centralizes and manages the identities, credentials, and access controls of users, groups, computers, and other resources within an enterprise network. It organizes information in domains, trees, and forests, enabling scalable and secure management of resources.</p><h3>2. What is User Enumeration in AD?</h3><p>User enumeration refers to the process of systematically identifying user accounts within an Active Directory environment. This includes gathering user names, group memberships, privileges, and associated metadata that can be leveraged for further attack phases, such as privilege escalation or lateral movement.</p><h3>3. Why User Enumeration Matters for Pentesters &amp; Red Teamers</h3><p>User enumeration exposes valuable information that helps:</p><ul><li>Identify privileged accounts (e.g., Domain Admins)</li><li>Target weak, default, or reused passwords for credential attacks</li><li>Discover misconfigurations and sensitive user groups</li><li>Understand the organizational structure and user relationships</li></ul><p>Effective enumeration is a foundational step in Active Directory penetration testing and red teaming.</p><h3>4. Tools for AD Enumeration in Kali Linux</h3><p>Kali Linux includes numerous tools to facilitate AD user enumeration</p><pre>- Tool Name: CrackMapExec  <br>  Description: SMB enumeration and credential testing  <br>  Example Command: crackmapexec smb &lt;targets&gt; -u &lt;user&gt; -p &lt;pass&gt; --users<br><br>- Tool Name: Enum4linux-ng  <br>  Description: SMB/NetBIOS enumeration  <br>  Example Command: enum4linux -u &lt;user&gt; -p &lt;password&gt; -U &lt;ip&gt;<br><br>- Tool Name: Impacket  <br>  Description: Collection of Python scripts for AD exploitation  <br>  Example Command: python3 lookupsid.py &lt;domain&gt;/&lt;user&gt;@&lt;ip&gt;<br><br>- Tool Name: Kerbrute  <br>  Description: Kerberos user enumeration  <br>  Example Command: kerbrute userenum -d domain.local -U users.txt<br><br>- Tool Name: Rubeus  <br>  Description: Kerberos ticket manipulation (Windows)  <br>  Example Command: PowerShell/command line Kerberos toolkit<br><br>- Tool Name: Windapsearch  <br>  Description: LDAP enumeration over LDAP queries  <br>  Example Command: windapsearch --dc &lt;dc-ip&gt; -u &lt;user&gt; -p &lt;pass&gt; -m users</pre><h3>5. Manual Enumeration Using LDAP</h3><p>LDAP (Lightweight Directory Access Protocol) is central to querying AD data remotely. You can use LDAP queries to enumerate users, groups, computers, and domain policies.</p><p>Example LDAP user enumeration with Windapsearch</p><pre>windapsearch --dc 192.168.1.100 -u &#39;[email protected]&#39; -p Password123 -m users</pre><p>Key LDAP attributes to query:</p><pre>- Attribute: cn  <br>  Description: Common Name<br><br>- Attribute: distinguishedName  <br>  Description: Unique directory path<br><br>- Attribute: memberOf  <br>  Description: User group memberships<br><br>- Attribute: userAccountControl  <br>  Description: Account status and settings</pre><h3>6. SMB-Based Enumeration</h3><p>SMB (Server Message Block) protocol can be used to gather shares, users, and group information.</p><p>Example with CrackMapExec:</p><p>Enumerate users</p><pre>crackmapexec smb 192.168.1.0/24 -u admin -p &#39;Passw0rd!&#39; --users</pre><p>List shared folders:</p><pre>crackmapexec smb 192.168.1.0/24 -u admin -p &#39;Passw0rd!&#39; --shares</pre><h3>7. Kerberos-Based Enumeration (Kerbrute &amp; Rubeus)</h3><p>Kerberos is an authentication protocol used in AD environments.</p><ul><li>Kerbrute: Fast user enumeration via Kerberos pre-authentication.</li></ul><pre>kerbrute userenum -d domain.local -U users.txt</pre><ul><li>Rubeus: Windows tool to interact with Kerberos tickets and extract useful AD info.</li></ul><pre>Invoke-Rubeus -Command:Display</pre><h3>8. RPC Enumeration</h3><p>RPC is a Windows protocol that can reveal details about domain controllers, users, and other resources but requires specific tools and privileges.</p><h3>9. Nmap NSE Scripts for AD Enumeration</h3><p>Nmap’s scripting engine offers targeted AD-related enumeration:</p><p>Example</p><pre>nmap -p 88 --script krb5-enum-users.nse &lt;target&gt;</pre><p>This script enumerates valid Kerberos users on the target domain.</p><h3>10. Using CrackMapExec for User Enumeration</h3><p>CrackMapExec is a Swiss-army knife for SMB enumeration and exploitation:</p><ul><li>Enumerate domain users:</li></ul><pre>crackmapexec smb &lt;target&gt; -u &lt;user&gt; -p &lt;pass&gt; --users</pre><ul><li>Check password policy:</li></ul><pre>crackmapexec smb &lt;target&gt; -u &lt;user&gt; -p &lt;pass&gt; --pass-pol</pre><h3>11. Enum4linux-ng in Depth</h3><p>Enum4linux-ng extends enum4linux capabilities with user enumeration, group enumeration, and policy extraction.</p><p>Example</p><pre>enum4linux -u admin -p Password1 -U 192.168.1.100</pre><p>Enumerates user accounts from the target.</p><h3>12. Impacket Toolkit for AD Enumeration</h3><p>Impacket provides Python scripts to interact with Windows protocols:</p><pre>- Script: lookupsid.py  <br>  Description: Lookup SID to find group members  <br>  Usage Example: python3 lookupsid.py domain/admin@192.168.1.5<br><br>- Script: secretsdump.py  <br>  Description: Dump password hashes  <br>  Usage Example: python3 secretsdump.py domain/admin@192.168.1.5</pre><h3>13. Password Spray and Credential Stuffing Techniques</h3><p>Password spraying tests a small number of commonly used passwords against many accounts to avoid lockout.</p><p>Example tool: CrackMapExec or custom script.</p><h3>14. PowerShell Methods for AD Enumeration (Windows Environment)</h3><p>PowerView, part of PowerShell Empire, is a powerful script for AD enumeration.</p><p>Example — Enumerate all domain users</p><pre>Get-DomainUser | Select-Object Name, SamAccountName, Enabled</pre><p>Example — Get members of Domain Admins group:</p><pre>Get-NetGroupMember -GroupName &quot;Domain Admins&quot;</pre><h3>15. Mitigation and Hardening Against User Enumeration</h3><ul><li>Limit LDAP and SMB access to trusted hosts</li><li>Enable account lockout policies and log failed login attempts</li><li>Use strong authentication (e.g., MFA, Kerberos armoring)</li><li>Monitor unusual enumeration traffic</li><li>Harden Group Policy Objects and ACLs</li></ul><h3>16. OPSEC Tips During Enumeration</h3><ul><li>Use low and slow techniques to avoid detection</li><li>Avoid noisy tools like BloodHound in sensitive environments</li><li>Rotate accounts and source IPs if possible</li><li>Validate enumeration output with multiple tools</li></ul><h3>17. Final Thoughts</h3><p>Active Directory user enumeration is a critical phase in penetration testing and red teaming. Combining automated tools and manual techniques provides a comprehensive picture of the target domain. Each method has its strengths, and understanding when and how to use them increases operational success and stealth.</p><p>Active mastery of LDAP queries, SMB enumeration, Kerberos enumeration, and PowerShell scripting is essential for effective AD user enumeration.</p><p>This post has combined detailed explanations, command examples, tables, and conceptual insights to empower pentesters and red teamers in Active Directory user enumeration using Kali Linux tools and other methods.</p><p><strong>Ref</strong> <strong>With</strong> -</p><ol><li><a href="https://www.kayssel.com/post/introduction-to-active-directory-9-enumeration/">https://www.kayssel.com/post/introduction-to-active-directory-9-enumeration/</a></li><li><a href="https://tbhaxor.com/active-directory-pentesting-from-linux/">https://tbhaxor.com/active-directory-pentesting-from-linux/</a></li><li><a href="https://www.kali.org/tools/redsnarf/">https://www.kali.org/tools/redsnarf/</a></li><li><a href="https://risk3sixty.com/blog/active-directory-enumeration">https://risk3sixty.com/blog/active-directory-enumeration</a></li><li><a href="https://www.kali.org/tools/ident-user-enum/">https://www.kali.org/tools/ident-user-enum/</a></li><li><a href="https://www.hackingarticles.in/active-directory-enumeration-ldeep/">https://www.hackingarticles.in/active-directory-enumeration-ldeep/</a></li><li><a href="https://www.scribd.com/document/719325371/Active-Directory-enumeration-1682922094">https://www.scribd.com/document/719325371/Active-Directory-enumeration-1682922094</a></li><li><a href="https://daviscybersec.org/2024-summer/ad-exploitation-mitigation/">https://daviscybersec.org/2024-summer/ad-exploitation-mitigation/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69c146381fec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Enumerate SSH with Kali Linux — A Deep Dive & How SSH Works]]></title>
            <link>https://medium.com/@mrgh0st/how-to-enumerate-ssh-with-kali-linux-a-deep-dive-how-ssh-works-8583f654ca75?source=rss-de2b765d5c20------2</link>
            <guid isPermaLink="false">https://medium.com/p/8583f654ca75</guid>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[MR Gh0st [ 0xff ]]]></dc:creator>
            <pubDate>Sat, 02 Aug 2025 11:32:07 GMT</pubDate>
            <atom:updated>2025-08-02T11:32:40.936Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Enumerate SSH with Kali Linux — A Deep Dive &amp; How SSH Works</h3><p>Secure Shell (SSH) is a fundamental protocol for securely accessing remote systems over unsecured networks. Ethical hackers and penetration testers often target SSH during their assessments because misconfigurations can lead to unauthorized access. In this post, I’ll explain what SSH is, how it works, and provide a detailed walkthrough on how to perform SSH enumeration with Kali Linux — using techniques and tools favored by professionals.</p><h3>What is SSH and How Does It Work?</h3><p><strong>SSH (Secure Shell)</strong> is a cryptographic protocol that enables secure communication between two networked devices. It is commonly used for remote login, file transfers (SCP, SFTP), and automated scripts. SSH encrypts all traffic to protect credentials and sensitive data from eavesdropping and other attacks.</p><ul><li><strong>How SSH Works</strong></li><li><strong>Client and Server:</strong> An SSH client initiates the connection to the SSH server (default port 22).</li><li><strong>Authentication:</strong> Users authenticate using passwords or cryptographic keys.</li><li><strong>Encryption:</strong> Once connected, the data is encrypted, ensuring confidentiality.</li><li><strong>Integrity and Compression:</strong> SSH provides strong integrity checking and can compress data for efficiency.</li></ul><p>SSH supports various authentication methods</p><ul><li><strong>Password-based:</strong> Traditional username/password pairs.</li><li><strong>Public Key-based:</strong> Users generate a key pair, adding their public key to ~/.ssh/authorized_keys on the server.</li></ul><h3>Why Enumerate SSH?</h3><p>SSH enumeration helps uncover valuable information such as</p><ul><li>Valid user accounts</li><li>SSH version and supported authentication methods</li><li>Weak login credentials</li><li>Misconfigurations (e.g., root login enabled)</li><li>Banner and OS details</li></ul><p>Attackers use this intelligence to refine attacks, while defenders can identify and patch vulnerabilities.</p><h3>SSH Enumeration with Kali Linux — Step-by-Step</h3><h3>1. Identify the SSH Service</h3><p><strong>Scan for Open SSH Port</strong></p><pre>nmap -p 22 &lt;target-ip&gt;</pre><p><strong>Example</strong></p><pre>$ nmap -p 22 192.168.1.10</pre><pre>Starting Nmap 7.92 ( <a href="https://nmap.org/">https://nmap.org</a> ) at 2025-08-02 16:00 UTC<br>Nmap scan report for 192.168.1.10<br>Host is up (0.0012s latency).</pre><pre>PORT   STATE SERVICE<br>22/tcp open  ssh</pre><p>This reveals port 22 open, indicating SSH service is active.</p><h3>2. Grab the SSH Banner</h3><p><strong>Check Version and Banner</strong></p><p>Using Netcat</p><pre>nc &lt;target-ip&gt; 22</pre><p><strong>Example</strong></p><pre>$ nc 192.168.1.10 22<br>SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2</pre><p>This output shows the SSH server uses OpenSSH version 7.9p1 on Debian.</p><p>You can also use nmap with service/version detection</p><pre>nmap -sV -p 22 &lt;target-ip&gt;</pre><p><strong>Example</strong></p><pre>$ nmap -sV -p 22 192.168.1.10</pre><pre>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 7.9p1 Debian 10+deb10u2</pre><h3>3. Enumerate Users</h3><h3>a. Brute Force with Hydra</h3><pre>hydra -L users.txt -P passwords.txt ssh://&lt;target-ip&gt;</pre><p>Where users.txt contains usernames and passwords.txt contains potential passwords.</p><p><strong>Example</strong></p><pre>$ hydra -L users.txt -P passwords.txt ssh://192.168.1.10</pre><pre>Hydra v9.0 (c) 2025 by van Hauser/THC &amp; David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes.</pre><pre>[DATA] attacking ssh://192.168.1.10:22/<br>[22][ssh] host: 192.168.1.10   login: root   password: toor<br>1 of 1 target successfully completed, 1 valid password found</pre><p>Here, hydra found root:toor as valid credentials.</p><h3>4. Check Authentication Methods</h3><p>Check which authentication methods the SSH server supports</p><pre>nmap -p 22 --script ssh-auth-methods &lt;target-ip&gt;</pre><p><strong>Example</strong></p><pre>$ nmap -p 22 --script ssh-auth-methods 192.168.1.10</pre><pre>Starting Nmap 7.92 ( <a href="https://nmap.org/">https://nmap.org</a> ) at 2025-08-02 16:15 UTC<br>Nmap scan report for 192.168.1.10<br>Host is up (0.0015s latency).</pre><pre>PORT   STATE SERVICE<br>22/tcp open  ssh<br>| ssh-auth-methods: <br>|   supported methods: publickey, password, keyboard-interactive<br>|_  password authentication is enabled</pre><h3>5. Try Default and Weak Credentials</h3><p>Try connecting manually with SSH</p><pre>ssh root@&lt;target-ip&gt;</pre><p>If you know password or want to test weak passwords interactively or via automated tools.</p><h3>6. Enumerate SSH Keys</h3><p>Using ssh-audit (installed in Kali)</p><pre>ssh-audit &lt;target-ip&gt;</pre><p><strong>Output</strong></p><pre>$ ssh-audit 192.168.1.10</pre><pre>Target: 192.168.1.10:22<br>SSH Banner: SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2<br>Key Exchange Algorithms:<br>  diffie-hellman-group-exchange-sha256 - ok<br>  diffie-hellman-group14-sha1 - weak<br>Encryption Algorithms:<br>  aes128-ctr - ok<br>  aes192-ctr - ok<br>  aes256-ctr - ok<br>MAC Algorithms:<br>  hmac-sha2-256 - ok<br>  hmac-sha2-512 - ok<br>...</pre><pre>Warning: Some weak algorithms detected</pre><p>This tool helps identify potential weaknesses in SSH cryptography and configuration.</p><h3>Practical Enumeration Example</h3><p><strong>Full Nmap SSH Scripts Scan</strong></p><pre>nmap -sV -p 22 --script=&quot;ssh-*&quot; &lt;target-ip&gt;</pre><p><strong>Output</strong></p><pre>$ nmap -sV -p 22 --script=&quot;ssh-*&quot; 192.168.1.10</pre><pre>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 7.9p1 Debian 10+deb10u2<br>| ssh-hostkey: <br>|   2048 1a:7b:cd:3d:e4:6a:9c:77:12:ab:46:df:27:68:5d:33 (RSA)<br>| ssh-auth-methods: <br>|   supported methods: publickey, password, keyboard-interactive<br>| ssh-brute:<br>|   Accounts found:<br>|     root<br>|_    admin</pre><h3>Hardening SSH — Defenses</h3><ul><li>Disable root login: PermitRootLogin no in sshd_config</li><li>Prefer public key authentication</li><li>Use strong, unique passwords or keys</li><li>Change default port</li><li>Monitor logs for failed logins</li><li>Disable unused authentication methods</li></ul><p>SSH is a powerful protocol, but any weakness or misconfiguration can leave a system vulnerable. Enumeration is key for both attackers and defenders — it helps test the resilience of SSH configurations and spot potential weaknesses before they are exploited.</p><p>Remember to only use these techniques against systems you own or have explicit permission to test — unauthorized access is illegal.</p><p><strong>Happy Hacking!</strong></p><p><em>Written by MR Gh0st [ 0xff ] — Stay curious, stay secure.</em># How to Enumerate SSH with Kali Linux — A Deep Dive &amp; How SSH Works</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8583f654ca75" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>