<?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 Vinay A S on Medium]]></title>
        <description><![CDATA[Stories by Vinay A S on Medium]]></description>
        <link>https://medium.com/@vinayas23913?source=rss-76b8c0bcc3f0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lkBxgEvFtB8_R7HvwpoE9A.png</url>
            <title>Stories by Vinay A S on Medium</title>
            <link>https://medium.com/@vinayas23913?source=rss-76b8c0bcc3f0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 17:44:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vinayas23913/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[How I Identified and Exploited an Oracle WebLogic Server Unauthenticated Remote Code Execution…]]></title>
            <link>https://medium.com/@vinayas23913/how-i-identified-and-exploited-an-oracle-weblogic-server-unauthenticated-remote-code-execution-f082fb95b428?source=rss-76b8c0bcc3f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f082fb95b428</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity-assessments]]></category>
            <category><![CDATA[vulnerability-assessment]]></category>
            <category><![CDATA[oracle-weblogic-server]]></category>
            <dc:creator><![CDATA[Vinay A S]]></dc:creator>
            <pubDate>Mon, 24 Nov 2025 15:51:14 GMT</pubDate>
            <atom:updated>2025-11-24T15:51:14.024Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Identified and Exploited an Oracle WebLogic Server Unauthenticated Remote Code Execution (RCE) Vulnerability on Port 7001 (Real-World Case Study)</h3><p>Oracle WebLogic Server has long been a prime target for attackers due to its widespread use in enterprise environments and its role as a core component in many Java-based applications. Over the years, multiple <strong>Unauthenticated Remote Code Execution (RCE)</strong> vulnerabilities have been discovered, especially on <strong>Port 7001</strong>, which is WebLogic’s default administration and T3 service port.</p><p><strong>Severity — Critical</strong></p><p>“Step-by-step procedure to identify the vulnerability and exploit it to obtain the admin credentials.”</p><p><strong>Proof of Concept</strong></p><p>Step 1: The screenshot below shows the Nmap port scan results, where we can see that port 7001 is open and running Oracle WebLogic Admin HTTPD version 12.2.1.4</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*ZFKYqpGxoNhfzI2orBig1g.png" /></figure><p>Step 2: Here are the CVE details for Oracle WebLogic Admin HTTPD version 12.2.1.4</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dyOruRsEzLoAarJj3tX-Gg.png" /></figure><p>Step 3: Then we accessed the URL using port 7001 in the browser and received a ‘404 Not Found’ error</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3xra8sn5PSHcjbZReX6KAw.png" /></figure><p>Step 4: Then we performed a DirBuster scan and found the /console endpoint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*KgxMunisQFjhcvnKk3cXqA.png" /></figure><p>Step 5: Then, using the endpoint identified from the DirBuster scan, we accessed the full URL in the browser and successfully reached the Administration Console login page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R6YkuMfi19IQBUpFtTr3aA.png" /></figure><p>Step 6: This is the python script from the github</p><blockquote><a href="https://github.com/wsfengfan/cve-2020-14882/blob/main/CVE-2020-14882.py">https://github.com/wsfengfan/cve-2020-14882/blob/main/CVE-2020-14882.py</a></blockquote><p>Step 7: Then we ran the Python script, which confirmed that the vulnerability exists. We were able to gain access to the Oracle WebLogic server, executed the <strong>dir</strong> command, and received the directory output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ls9h_umPAUE4Nzl-P3XG1w.png" /></figure><p>Step 8:We then executed the <strong>whoami</strong> and <strong>id</strong> commands, both of which returned valid output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AfWeheW6nE4WSMHB7w5IDg.png" /></figure><p>Step 9: Then we executed <strong>cat /etc/passwd</strong> and successfully retrieved the user account information</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*3ZWxd_tV__jKyMe-yIcxDA.png" /></figure><p>Step 9: Then we searched for the config.xml file and located the user project <strong>config.xml</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*KrO0uZ_tbSYrAjLIqHqPaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*jK6Y1Nj_b7bySv1yYZnnAg.png" /></figure><p>Step 10: Then, using the cat command, we read the config.xml file. I copied the contents into Notepad and found that the Node Manager username is ‘weblogic’, while the password is encrypted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9-sxfIdjs7BNEkNStpuHUg.png" /></figure><p>Step 11: Then we searched for the boot.properties file and found the AdminServer file path</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IFsSxuotCcNuEUm5gu_k8g.png" /></figure><p>Step 12: Then, using the cat command, we viewed the boot.properties file and found that admin credentials both the username and password were encrypted. After that, we searched for the SerializedSystemIni.dat file, and using the cat command, we read its domain-specific encryption keys which is in base 64</p><p><strong>Explaination</strong></p><p>✅ Do We Need SerializedSystemIni.dat to Decrypt WebLogic Credentials?</p><p><strong>Yes.</strong><br> WebLogic stores encrypted credentials (like admin username &amp; password) inside:</p><pre>DOMAIN_HOME/servers/&lt;server_name&gt;/security/boot.properties</pre><p>Example:</p><pre>username={AES}a12bc93d...<br>password={AES}89cdef12...</pre><p>These are <strong>not</strong> encrypted with a static key.<br> They are encrypted using <strong>a domain-specific encryption key</strong>, which is stored in:</p><pre>DOMAIN_HOME/security/SerializedSystemIni.dat</pre><p>This file contains:</p><ul><li>Encryption keys</li><li>Salt values</li><li>Initialization vectors</li></ul><p>Without this file, <strong>you cannot decrypt the boot.properties credentials</strong>, because the encryption is tied to that specific WebLogic <em>domain</em>.</p><h4><strong>To decrypt WebLogic credentials from boot.properties → you MUST have SerializedSystemIni.dat from the same domain.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*dp_ICt29YVcw9v5uq8Ae9A.png" /></figure><p>Step 13: That screenshot shows a series of commands being executed in a Linux terminal, likely on a Kali Linux system, related to decryption or credential retrieval.</p><p>Here is a step-by-step explanation of what each command is doing:</p><h3>1. nano key_base64.txt</h3><ul><li><strong>Command:</strong> nano key_base64.txt</li><li><strong>Action:</strong> This command <strong>opens the file named </strong>key_base64.txt<strong> in the Nano text editor</strong>.</li><li><strong>Purpose:</strong> You were likely <strong>pasting or typing Base64-encoded data</strong> into this file. This data is probably a cryptographic key or an encrypted value needed for the next step.</li></ul><h3>2. base64 -d key_base64.txt &gt; SerializedSystemIni.dat</h3><ul><li><strong>Command:</strong> base64 -d key_base64.txt</li><li>base64: The utility for encoding and decoding Base64 data.</li><li>-d: The decode flag, which tells the utility to <strong>decode</strong> the input.</li><li>key_base64.txt: The input file containing the Base64-encoded data.</li><li><strong>Action:</strong> It <strong>decodes the contents</strong> of the key_base64.txt file.</li><li><strong>Redirection (</strong>&gt;<strong>):</strong> The output of the decoding is then redirected (saved) into a new file named SerializedSystemIni.dat.</li><li><strong>Purpose:</strong> This step creates the SerializedSystemIni.dat file, which often holds the encrypted WebLogic security key data in a binary format, decoded and ready for the next decryption step.</li></ul><h3>3. python3 Downloads/weblogicdecrypt.py \</h3><ul><li><strong>Command:</strong> python3 Downloads/weblogicdecrypt.py</li><li>python3: Invokes the Python 3 interpreter.</li><li>Downloads/weblogicdecrypt.py: The path to a Python script, likely a publicly available tool designed to <strong>decrypt sensitive information from Oracle WebLogic Server</strong> configuration files (specifically the key stored in SerializedSystemIni.dat).</li><li><strong>Options and Arguments:</strong></li><li>-i SerializedSystemIni.dat: The <strong>input file</strong> argument. This specifies the file containing the encrypted key/data, which was created in step 2.</li><li>-s &quot;AES256|L79q...rNMrMQQ|=&quot;: The <strong>salt/security key</strong> argument. This is the <strong>encrypted master key or salt value</strong> that WebLogic uses. The script uses this value along with the decrypted key from the input file to derive the actual credential. The format suggests a scheme like ALGORITHM|ENCRYPTED_VALUE.</li><li><strong>Action &amp; Output:</strong> The script runs, using the decrypted key from the input file and the provided encrypted salt/master key to perform the final decryption.</li><li><strong>Result (Last Line of Screenshot):</strong> The script successfully outputs the decrypted password:</li><li>[+] Password: &#39;India_1234&#39;</li><li><strong>Purpose:</strong> This is the final step where the actual plaintext password (likely a database password, admin password, or other sensitive credential stored in the WebLogic domain) is recovered.</li></ul><p>This is the python script link to decrypt the web logic password</p><blockquote><a href="https://gist.github.com/gquere/b331d9a8f0c0ffc8ac1fb44123aa8335">https://gist.github.com/gquere/b331d9a8f0c0ffc8ac1fb44123aa8335</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*rd_aA5YGjOaiHzJEB4kcXg.png" /></figure><p>Step 14: Then, using the WebLogic decryption Python script, we decrypted the username</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*ag1IRLi4--h37DdDwJ7CTA.png" /></figure><p>Step 14: Using the credentials obtained from the <strong>boot.properties</strong> and SerializedSystemIni.datfile, we attempted to log in with those credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lphiku-ibYaUCtSQS77Znw.png" /></figure><p>Step 15: We were able to log in to the Administration Console using those credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_UeJcDq5I_dwyDL-H6-wTQ.png" /></figure><p><strong>Remediation</strong></p><p>The primary and strongly recommended remediation is to apply the appropriate patches released by Oracle in their Critical Patch Update (CPU), specifically the October 2020 CPU advisory or later. It is essential to ensure that the Oracle WebLogic Server version is updated to a non-vulnerable version (supported affected versions include 10.3.6.0.0, 12.1.3.0.0, 12.2.1.3.0, 12.2.1.4.0, and 14.1.1.0.0). As a temporary, partial mitigation, system administrators should ensure the WebLogic Administration Console is not exposed to the public internet by restricting network access, typically by blocking TCP port 7001 (the default port) or using firewall rules to limit access to trusted IP addresses only.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f082fb95b428" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SNMP Penetration Testing Port -161]]></title>
            <link>https://medium.com/@vinayas23913/snmp-penetration-testing-port-161-a7dfa34c8cdd?source=rss-76b8c0bcc3f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7dfa34c8cdd</guid>
            <dc:creator><![CDATA[Vinay A S]]></dc:creator>
            <pubDate>Fri, 11 Apr 2025 11:30:17 GMT</pubDate>
            <atom:updated>2025-04-11T11:30:17.705Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is SNMP?</h3><p><strong>SNMP (Simple Network Management Protocol)</strong> is a protocol used to <strong>monitor, manage, and configure network devices</strong> like:</p><ul><li>Routers</li><li>Switches</li><li>Firewalls</li><li>Printers</li><li>Servers</li></ul><p>It helps network administrators get information like CPU usage, memory status, interface status, or even system uptime from these devices — remotely.</p><h3>How SNMP Works:</h3><p>SNMP has <strong>three main components</strong>:</p><p>Component — Role</p><p><strong>Manager — </strong>The system (like a PC or NMS tool) that sends requests and collects info.</p><p><strong>Agent — </strong>Software running on network devices that replies to the manager.</p><p><strong>MIB (Management Information Base) — </strong>A database of objects the agent can report on (like system name, interfaces, etc.).</p><h3>🔄 Communication Flow:</h3><p><strong>1.The Manager sends a request</strong> (like: “What’s your CPU load?”) to the Agent via UDP port <strong>161</strong>.</p><p><strong>2. The Agent responds</strong> with the data (from the MIB).</p><p>3. If something critical happens (like an interface goes down), <strong>the Agent can send a Trap</strong> to the Manager on UDP port <strong>162</strong></p><h3>🔐 SNMP Versions:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*DLwPF_5AyBmBBgNR1qq2pA.png" /></figure><h3>💥 Common Security Risk:</h3><p>Using <strong>SNMPv1 or v2c</strong> with default community strings (like public) can lead to <strong>information disclosure</strong> or even allow attackers to modify device settings.</p><p><strong>Proof of Concept:</strong></p><p>Step1 :The below screenshot shows that, If port 161 is open and the service is running SNMPv1 or SNMPv2, performing SNMP enumeration using Metasploit can lead to information disclosure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*9Oi_Fgr4Xhwg5WY2X62AHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*lLejq6Ih1VS0RVwmLzTAnQ.png" /></figure><p>Step 2: Afterward, we used the SNMP Login module in Metasploit, set the RHOSTS parameter to the target IP, and executed the SNMP Login scanner. This module attempts to authenticate using default SNMP community strings such as &#39;public&#39; and &#39;private&#39;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*hJyYD1sOgx2ZvyBBteCZww.png" /></figure><p>Step 3: After discovering valid SNMP credentials, we proceed to enumerate SNMP data using the snmpwalk utility and we got read only access.</p><blockquote>snmpwalk -v2c -c public &lt;target ip&gt;</blockquote><p>→ -v2c : Specifies SNMP version 2c</p><p>→ -c public : Uses the community string “public”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*PX0SISpYjNs8CAjDalHT2g.png" /></figure><p>Step 4: To check if the SNMP service allowed write access, we used the <em>snmpset</em> command with the commonly known community string <em>private</em>. We attempted to change the system name (Newhostname) to “Hackedbyyou”.</p><blockquote><em>snmpset -v2c -c private &lt;target ip&gt; &lt;OID&gt; s “anyname”</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*SxCzZ0PH6FleOCjAdi1DyQ.png" /></figure><p><strong>Remediation:</strong></p><p>SNMP Misconfiguration — Remediation Guide</p><p>1. Disable SNMP v1/v2c if not needed</p><p>Older versions (v1/v2c) lack encryption and authentication, making them insecure.</p><p>Remediation:</p><p>Disable SNMP v1 and v2c entirely if your monitoring tools support SNMPv3.</p><p>2. Use SNMPv3 with Authentication and Encryption</p><p>SNMPv3 supports secure authentication and encrypted traffic.</p><p>Remediation:</p><p>Configure SNMPv3 with strong user credentials and AES encryption. Avoid using default or weak usernames/passwords.</p><p>3. Change Default Community Strings</p><p>The use of public (read) and private (read-write) is very common and often overlooked.</p><p>Remediation:</p><p>Replace default community strings with long, complex, unique strings.</p><p>Avoid using strings that indicate their level of access (like private).</p><p>4. Restrict SNMP Access by IP Address</p><p>Limit access to SNMP services from known IP addresses (e.g., internal monitoring servers only).</p><p>Remediation:</p><p>Use Access Control Lists (ACLs) or firewall rules to restrict SNMP to trusted sources.</p><p>5. Implement Network Segmentation</p><p>Isolate SNMP-enabled devices on a separate management VLAN or subnet.</p><p>Remediation:</p><p>Prevent exposure of SNMP ports (UDP 161/162) to public or untrusted networks.</p><p>6. Monitor and Log SNMP Access</p><p>Track all SNMP activity for auditing and threat detection.</p><p>Remediation:</p><p>Enable logging of SNMP access attempts and review them regularly for anomalies.</p><p>7. Patch and Update Network Devices</p><p>Outdated firmware can have vulnerabilities that affect SNMP security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7dfa34c8cdd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kerberos User Enumeration via Port 88 — A Pentester’s Guide]]></title>
            <link>https://medium.com/@vinayas23913/kerberos-user-enumeration-via-port-88-a-pentesters-guide-018114cae668?source=rss-76b8c0bcc3f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/018114cae668</guid>
            <dc:creator><![CDATA[Vinay A S]]></dc:creator>
            <pubDate>Sun, 02 Mar 2025 14:42:53 GMT</pubDate>
            <atom:updated>2025-03-02T14:42:53.926Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kerberos User Enumeration via Port 88 — A Pentester’s Guide</h3><h3>Introduction</h3><p>When performing a penetration test on a Web application or Network penetration testing, identifying open ports is crucial. <strong>Port 88 (Kerberos)</strong> is a key target in Active Directory (AD) environments. If misconfigured, attackers can enumerate valid users, leading to <strong>brute-force attacks, password spraying, and AS-REP Roasting</strong>.</p><p>In this blog, I’ll demonstrate <strong>Kerberos user enumeration</strong>, how attackers exploit it, and the best security measures to prevent it.</p><h3>What is Kerberos?</h3><p>Kerberos is a network authentication protocol used in <strong>Windows Active Directory</strong> to allow users and services to authenticate securely. It uses <strong>tickets</strong> to authenticate users without sending passwords over the network. The key components of Kerberos are:</p><ul><li><strong>Key Distribution Center (KDC)</strong> — Central authentication authority in AD.</li><li><strong>Authentication Server (AS)</strong> — Issues <strong>Ticket Granting Ticket (TGT)</strong> to valid users.</li><li><strong>Ticket Granting Server (TGS)</strong> — Issues <strong>service tickets</strong> for accessing resources.</li></ul><h3>Proof Of Concept:</h3><p>Step 1: Starting with an <strong>Nmap scan</strong> to check for open ports, services, and their versions, we can see that <strong>port 88 is open</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*cBlkPtaDntpZLQeUXKsRvA.png" /></figure><p>Step 2: Open msfconsole in kali linux and search</p><blockquote><em>search kerberos_enum</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*dvUf-YqTeq_1hxAbo7bx2A.png" /></figure><p>Step 3: Here, we have configured <strong>RHOST</strong> as the target IP and <strong>USER_FILE</strong> as the list of usernames, which I downloaded from GitHub</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*T_GHGrTMDbNpAWWSxs-B8Q.png" /></figure><p>Step 4: Here, we have successfully identified valid users from the Kerberos authentication responses</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*MKha6pJu7cOv8N_lDT63wA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*NMGN_Hq43NGVuQrcrF4jJw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*LmSXw6G9N8P1wKSh8B4ObA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*E6HERgDYdp5_e86AwrtpeA.png" /></figure><p>Step 5: I attempted to log into the application with random credentials. The response returned an error stating, <strong>“Username vinay is not found in the Kerberos database,”</strong> indicating that the username does not exist</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QAQY4MbqfWbDGqkrpTJffw.png" /></figure><p>Step 9: Based on the users found from Kerberos, I attempted to log into the application using the valid user <strong>ROOT</strong> (which was previously obtained using Metasploit) with invalid credentials. The response returned <strong>“password incorrect,”</strong> confirming that the username exist</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OtA1hOGA584G1k2dsd0QUw.png" /></figure><p>I attempted a brute-force attack on the valid user to crack the password, but unfortunately, I wasn’t able to retrieve it.</p><h3><strong>Remediation:</strong></h3><h3>1. Implement Account Lockout Policies</h3><ul><li>Configure <strong>account lockout thresholds</strong> to prevent brute-force attempts.</li><li>Recommended settings:</li><li><strong>Account lockout threshold</strong>: 5–10 failed attempts</li><li><strong>Lockout duration</strong>: 15–30 minutes</li><li><strong>Reset lockout counter</strong>: 15–30 minutes</li></ul><h3>2. Enable Logging and Monitoring</h3><ul><li>Enable <strong>Kerberos authentication logging</strong> to detect unusual authentication attempts.</li><li><strong>Monitor event logs</strong> for brute-force attempts:</li><li><strong>Event ID 4768</strong> — TGT request</li><li><strong>Event ID 4769</strong> — TGS request</li><li><strong>Event ID 4771</strong> — Pre-authentication failed</li><li><strong>Event ID 4776</strong> — NTLM authentication failure</li></ul><h3>3. Implement Rate Limiting &amp; CAPTCHA</h3><ul><li>If Kerberos authentication is exposed to the internet, <strong>implement rate limiting</strong> to slow down brute-force attempts.</li><li>Use <strong>CAPTCHA</strong> on login pages to prevent automated attacks.</li></ul><h3>4. Use Strong Password Policies</h3><ul><li>Require <strong>complex passwords</strong> with <strong>multi-factor authentication (MFA)</strong>.</li><li>Enforce <strong>password expiration</strong> and <strong>disallow weak passwords</strong>.</li><li>Use <strong>password filtering solutions</strong> to block compromised credentials.</li></ul><h3>5. Limit User Enumeration via Error Messages</h3><ul><li>Modify error messages to avoid revealing <strong>whether a username exists</strong>.</li><li>Instead of &quot;Username not found&quot;, return a <strong>generic error</strong> like: “Invalid username or password”</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=018114cae668" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploiting SMTP Open Relay on Port 25 — A Security Risk Breakdown]]></title>
            <link>https://medium.com/@vinayas23913/exploiting-smtp-open-relay-on-port-25-a-security-risk-breakdown-97940ad70ba2?source=rss-76b8c0bcc3f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/97940ad70ba2</guid>
            <dc:creator><![CDATA[Vinay A S]]></dc:creator>
            <pubDate>Tue, 25 Feb 2025 14:59:23 GMT</pubDate>
            <atom:updated>2025-02-28T14:06:56.832Z</atom:updated>
            <content:encoded><![CDATA[<h3>SMTP Port 25 Exploitation: Risks and Security Measures</h3><p>I encountered this issue during my security journey. You may come across this vulnerability while performing Web application and Network penetration testing.</p><h3>Introduction</h3><p>Simple Mail Transfer Protocol (SMTP) is the backbone of email communication. However, misconfigured SMTP servers can act as <strong>open relays</strong>, allowing unauthorized users to send emails freely. This vulnerability is often exploited by spammers and malicious actors, leading to email abuse, phishing, and even blacklisting of the mail server.</p><h3>What is an SMTP Open Relay?</h3><p>An <strong>SMTP open relay</strong> is a mail server configured to allow any external user to send emails through it without authentication. In a properly configured SMTP server, email relaying should be restricted to authenticated users or specific IP addresses. Open relays were common in the early days of the internet, but due to abuse, most modern email servers prevent open relaying by default.</p><h3>How SMTP Open Relay is Exploited</h3><p>When an SMTP server is an open relay, cybercriminals can use it to:</p><ul><li>Send <strong>spam emails</strong> to thousands of recipients.</li><li>Conduct <strong>phishing attacks</strong> by impersonating legitimate domains.</li><li>Spread <strong>malware and ransomware</strong> through malicious email attachments.</li><li>Execute <strong>denial-of-service (DoS) attacks</strong> by flooding inboxes with junk messages.</li><li>Get the mail server <strong>blacklisted</strong>, making legitimate email communication difficult.</li></ul><h4>Proof of Concept:</h4><p>Step 1: Starting with an Nmap scan to check for open ports, services, and versions port 25 is open which is SMTP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*AaULWGsJcXSBwSHb8kodXw.png" /></figure><p>Step 2: After that, open msfconsole in kali linux and search</p><blockquote>search smtp_version</blockquote><p>we used Metasploit to retrieve the SMTP banner (domain name)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*nDno-xs5oddnx1lTpd620w.png" /></figure><p>Step 3: Then, we used Metasploit to enumerate the SMTP users</p><blockquote>search smtp_enum</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*hqo-eZtztEwIZj95lRwhtg.png" /></figure><p>Step 4: Here, we discovered that the user <strong>postmaster</strong> exists</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*t9ly5YPWMHm7q4CyZAM-IA.png" /></figure><p>Step 5: Then, using Netcat, we confirmed the existence of the <strong>postmaster</strong> user with the <strong>VRFY</strong> command</p><blockquote>nc &lt;IP Address&gt; &lt;port number&gt;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*9dc4m_SaaAX9zuW77SQsQg.png" /></figure><p>Step 6: Based on the discovered user and the SMTP banner, we detected an open relay vulnerability</p><blockquote>search smtp_relay</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*ilNamhJWDoUx5kZysKkkQw.png" /></figure><p>Step 7: Then, using the open relay, we sent an email on behalf of the user without valid credentials.</p><blockquote>nc &lt;IP Address&gt; &lt;port number&gt;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*L_vDheMzdyAaorAepfZv_g.png" /></figure><p><strong>Remediation:</strong></p><p>To mitigate the <strong>SMTP open relay vulnerability</strong>, it is essential to disable unauthenticated email relaying and enforce proper security configurations. Administrators should ensure that the mail server only allows email relay for <strong>trusted internal IP addresses</strong> and <strong>authenticated users</strong>. This can be achieved by modifying SMTP configurations such as smtpd_recipient_restrictions in <strong>Postfix</strong> or restricting relay permissions in <strong>Microsoft Exchange</strong>. Additionally, enabling <strong>SMTP authentication</strong>, implementing <strong>SPF, DKIM, and DMARC</strong> policies, and regularly monitoring mail server logs can help prevent abuse and spoofing attacks. These measures significantly reduce the risk of spammers and attackers exploiting the mail server for malicious activities</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97940ad70ba2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LDAP Anonymous Bind]]></title>
            <link>https://medium.com/@vinayas23913/ldap-anonymous-bind-9c023c6f9b04?source=rss-76b8c0bcc3f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c023c6f9b04</guid>
            <dc:creator><![CDATA[Vinay A S]]></dc:creator>
            <pubDate>Sat, 22 Feb 2025 09:25:05 GMT</pubDate>
            <atom:updated>2025-03-13T13:54:02.896Z</atom:updated>
            <content:encoded><![CDATA[<h3>LDAP Anonymous Bind — Port 389</h3><h4>During a recent Security Assessment, I identified an LDAP anonymous bind vulnerability, which could allow unauthorized access to directory services. In this blog, I explain how such misconfigurations occur, their security implications, and best practices to mitigate them</h4><h3>Introduction</h3><p>LDAP (Lightweight Directory Access Protocol) is a widely used protocol for managing and accessing directory services. Many organizations, including government agencies, rely on LDAP for authentication and user management. However, a common misconfiguration — <strong>Anonymous Bind Enabled</strong> — can expose sensitive information to unauthorized users.</p><p>During a security assessment of a government project, I discovered that LDAP Anonymous Bind was enabled, allowing unrestricted access to directory data. In this blog, I’ll walk through the discovery process, the potential risks, and how organizations can mitigate this issue.</p><h3>What is LDAP?</h3><p>LDAP is a protocol used to interact with directory services, storing critical information like user credentials, email addresses, and access permissions. It supports authentication and authorization for various applications.</p><h3>Common Uses of LDAP:</h3><ul><li>User authentication and Single Sign-On (SSO)</li><li>Directory lookups (retrieving user details)</li><li>Access control enforcement</li></ul><h3>What is LDAP Anonymous Bind?</h3><p>Anonymous Bind is a feature that allows users to query the LDAP directory without authentication. This setting is useful for public directories but can be a serious security risk if enabled on internal or sensitive systems.</p><h3>Why is Anonymous Bind Enabled?</h3><ul><li><strong>Ease of Access</strong>: Some organizations enable it to simplify directory lookups.</li><li><strong>Legacy System Compatibility</strong>: Older applications might rely on anonymous queries.</li><li><strong>Misconfigurations</strong>: Often enabled unintentionally, exposing data to unauthorized users.</li></ul><h3>Proof of Concept:</h3><p>Step 1: Starting with nmap scan to check for Open ports, Services and versions</p><blockquote>nmap -sV -p- -O &lt;IP Address&gt;</blockquote><p>The screenshot below shows that Port 389 is open, and the version indicates that Anonymous Bind is allowed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*duGdIHOYeh2yQPp8FTRZjQ.png" /></figure><p>Step 2: I executed this command to check whether Anonymous Bind is enabled or not</p><blockquote>ldapwhoami -x -H ldap://&lt;IP Address&gt;:389</blockquote><ul><li>ldapwhoami → Queries the LDAP directory to check the identity of the authenticated user.</li><li>-x → Uses simple authentication (instead of SASL).</li><li>-H ldap://&lt;IP Address&gt;:389 → Specifies the LDAP server (IP: 1.1.1.1) and port (389 for standard LDAP).</li></ul><p>If LDAP Anonymous Bind is enabled, this command will return &quot;anonymous&quot; or an empty string, confirming that you have access without authentication</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*H5lDL70bkCkjgSfVXcPLxg.png" /></figure><p>Step 3: Now, we can try searching for the base by using a ldap search query.</p><blockquote>ldapsearch -x -H ldap://&lt;IP Address:389 -s base -b “” “(objectClass=*)” “*” +</blockquote><h3>Breakdown of the Command:</h3><ul><li>ldapsearch → Command-line tool for querying an LDAP directory.</li><li>-x → Uses simple authentication (instead of SASL).</li><li>-H ldap://1.1.1.1:389 → Specifies the LDAP server (1.1.1.1) and port (389).</li><li>-s base → Performs a <strong>base-level</strong> search (queries only the root DSE, not full directory traversal).</li><li>-b &quot;&quot; → Sets the base DN to an empty string, meaning it searches at the <strong>root DSE level</strong>.</li><li>&quot;(objectClass=*)&quot; → Queries for <strong>all objects</strong> in the directory.</li><li>&quot;*&quot; → Requests <strong>all standard attributes</strong>.</li><li>&quot;+&quot; → Requests <strong>operational attributes</strong>, which are normally hidden (e.g., schema details, server info).</li></ul><p>Take a note of naming context/base from the output</p><p>namingContexts: dc=example, dc=com</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*6iOIhls78Ar2ZlDVVMYjYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*KRO8u3FIJHvAIYok0bZOiA.png" /></figure><p>Step 4: After that, using the <strong>naming context/base</strong>, we can enumerate LDAP users, their access details, UIDs, and other relevant information.</p><blockquote>ldapsearch -x -H ldap://1.1.1.1<a href="http://172.20.50.233:389/">:389</a> -b “dc=*******,dc=***” “(objectClass=*)”</blockquote><h3>Explanation:</h3><ul><li><strong>ldapsearch</strong> → This is the command-line tool used to perform LDAP queries.</li><li><strong>-x</strong> → Specifies simple authentication (anonymous or basic authentication instead of SASL).</li><li><strong>-H ldap://1.1.1.1:389</strong> → Defines the LDAP server to connect to.</li><li>ldap://1.1.1.1:389 → Specifies the protocol (ldap://), the IP address of the LDAP server (1.1.1.1), and the port number (389), which is the default port for LDAP.</li><li><strong>-b &quot;dc=*******,dc=***&quot;</strong> → Sets the base distinguished name (DN) for the search.</li><li>&quot;dc=*******,dc=***&quot; → Represents the domain components of the LDAP directory.</li><li>Example: If your domain is example.com, the base DN would be &quot;dc=example,dc=com&quot;.</li><li><strong>&quot;(objectClass=*)&quot;</strong> → This is the search filter.</li><li>objectClass=* means &quot;retrieve all objects,&quot; essentially fetching all directory entries.</li></ul><p>There were lots of users and here’s how their ldap details look like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*A3WBb3plIwtUvBRsU-ZMCw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*TKekedvMs6yNpHnMbbOm3Q.png" /></figure><p>Step 5: Here, you can see the <strong>objectClass</strong>, <strong>gidNumber</strong>, and <strong>memberUid</strong> attributes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*CH8ZLR9mvqFqf5B2s15ymQ.png" /></figure><p>Step 6: We can see the user roles listed here</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*ZFzdB8S3lI96PCLgWrxQ5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*26WmONEm1Llo0bDtKdJ2fA.png" /></figure><h3>Security Risks of Anonymous Bind</h3><ol><li><strong>Unauthorized Access to LDAP Data</strong></li></ol><ul><li>If <strong>anonymous bind</strong> is enabled, anyone can run this command without authentication and retrieve directory information, including <strong>user roles, group memberships, and other attributes</strong>.</li><li>This could expose <strong>sensitive details</strong> about the organization’s users and structure.</li></ul><p><strong>2. User Enumeration</strong></p><ul><li>Attackers can extract usernames, email addresses, and group memberships, which can be used for <strong>brute force attacks, phishing, and privilege escalation attempts</strong>.</li></ul><p><strong>3. Potential Data Leakage</strong></p><ul><li>Depending on the LDAP schema, <strong>phone numbers, job titles, and even password hashes (if misconfigured)</strong> could be exposed.</li></ul><p><strong>4. Privilege Escalation and Lateral Movement</strong></p><ul><li>If an attacker gains access to group memberships or administrator roles, they can craft <strong>targeted attacks</strong> to escalate privileges within the network.</li></ul><p><strong>5. Exploitation for Further Attacks</strong></p><ul><li>Attackers can use extracted information to conduct <strong>social engineering</strong>, <strong>password spraying</strong>, or <strong>Kerberoasting attacks (in Active Directory environments)</strong>.</li></ul><h3>🛡️ Mitigation Strategies</h3><p>✅ <strong>Disable Anonymous Bind</strong> if not explicitly required.<br>✅ <strong>Implement Authentication and Access Controls</strong> for LDAP queries.<br>✅ <strong>Limit Read Permissions</strong> to only necessary attributes.<br>✅ <strong>Enable Logging and Monitoring</strong> to detect unauthorized queries.<br>✅ <strong>Use LDAP over TLS (LDAPS — port 636)</strong> to secure the connection.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c023c6f9b04" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>