<?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 Riyan Yan on Medium]]></title>
        <description><![CDATA[Stories by Riyan Yan on Medium]]></description>
        <link>https://medium.com/@riyanyan2?source=rss-74a01cb2069c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*AI2PIm1v4kmjyMajvoW53w.jpeg</url>
            <title>Stories by Riyan Yan on Medium</title>
            <link>https://medium.com/@riyanyan2?source=rss-74a01cb2069c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 12:10:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@riyanyan2/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[Unsecured Memcached Server Leading to Sensitive Information Disclosure]]></title>
            <link>https://medium.com/@riyanyan2/unsecured-memcached-server-leading-to-sensitive-information-disclosure-dfa2bd2dfdb4?source=rss-74a01cb2069c------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfa2bd2dfdb4</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[pentest]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Riyan Yan]]></dc:creator>
            <pubDate>Sun, 27 Apr 2025 08:02:09 GMT</pubDate>
            <atom:updated>2025-04-27T08:02:09.059Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dWanIgoMRNLo0Nkn" /><figcaption>Photo by <a href="https://unsplash.com/@ikukevk?utm_source=medium&amp;utm_medium=referral">Kevin Ku</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>While performing reconnaissance on a web application, I discovered a vulnerability related to an unsecured Memcached server. During the reconnaissance phase, I accidentally found an open port, 11211 (Memcached), which was publicly accessible. Upon further inspection, I identified that this open port posed a critical security risk, especially because it could be accessed without any authentication. Memcached is typically used by servers to exchange and cache data for faster processing. In this case, I was able to connect to the Memcached service using a simple Telnet command without any authentication, exposing the server to potential sensitive information disclosure.</p><p><strong>Check port open</strong></p><p>nmap -sC -sV -p1121 &lt;server&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*vdGtBc0Xij4xftZOrRttWQ.png" /><figcaption>Sample of finding port memcached open</figcaption></figure><p>then i try to connect with telnet. whooaaa, it’s login,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*5Ft-ilHOri4gAdKKa9E6GQ.png" /><figcaption>sample login with nmap</figcaption></figure><p>After successfully logging in, I attempted to perform banner grabbing by issuing the <strong>stats </strong>command as shown above. Subsequently, I proceeded to inspect the contents of the memory cache to identify any sensitive information stored within the server.</p><p>echo -e “stats cachedump 3 10\n” | nc &lt;server&gt; 11211</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*2EqYhQFhIkm2rAZYPwzV1g.png" /><figcaption>sample of memcache dump</figcaption></figure><p>echo -e “get &lt;memcached-id&gt;\n” | nc &lt;server&gt; 11211</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*-dWNkouTwXSefd3WGVKOuw.png" /><figcaption>sample get data</figcaption></figure><p>From the dumped Memcached data, I attempted to access one of the entries and discovered an internal IP address, which was likely associated with an important server or application. Additionally, it is possible to retrieve user session cookies from the memory cache, which could be extremely dangerous if accessed publicly, as it could lead to unauthorized access or further exploitation.</p><p>Next, we will attempt to write data into the accessible Memcached server using the following command:</p><p>(echo -e “set pentest_key 0 3600 14\r\nthis_is_a_test\r\n”; sleep 1) | nc &lt;server&gt; 11211</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*sDdz1fHlBSx2_8vMk4doGg.png" /><figcaption>sample of write data</figcaption></figure><p>Now, we will verify the data that we previously inserted into the Memcached server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*wBe2nzBvjOORhAN6FRT9Pg.png" /><figcaption>sample data write into memcached</figcaption></figure><p>Memcached is a high-performance, distributed memory caching system designed to speed up dynamic web applications by reducing the load on databases.<br>It temporarily stores data and objects in RAM, allowing applications to retrieve information quickly without querying the database repeatedly.</p><p>CVSS score for this vulnerability is : <strong>CRITICAL</strong></p><p>CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVlpJTS-ckIIz6yNVOXySg.png" /></figure><p>I am a newbie, and if there are any mistakes or shortcomings, please feel free to comment. I am continuously learning and working on improving myself. All the information I have written is the result of my learning and personal notes, as I tend to forget things and write them down to avoid forgetting. Therefore, the information I share is purely for educational purposes and personal record-keeping. I do not take responsibility for anything beyond that.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfa2bd2dfdb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>