<?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 Shivam Bathla on Medium]]></title>
        <description><![CDATA[Stories by Shivam Bathla on Medium]]></description>
        <link>https://medium.com/@shivam_bathla?source=rss-5d2311c15ae2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hmpgats7m_5DkUOkH3m0jA.jpeg</url>
            <title>Stories by Shivam Bathla on Medium</title>
            <link>https://medium.com/@shivam_bathla?source=rss-5d2311c15ae2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 07:16:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shivam_bathla/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[A tale of twisted Arbitrary File Read]]></title>
            <link>https://medium.com/@shivam_bathla/a-tale-of-twisted-arbitrary-file-read-c3109a285e70?source=rss-5d2311c15ae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3109a285e70</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[arbitrary-file-read]]></category>
            <category><![CDATA[unc-path-injection]]></category>
            <dc:creator><![CDATA[Shivam Bathla]]></dc:creator>
            <pubDate>Thu, 20 Aug 2026 19:04:55 GMT</pubDate>
            <atom:updated>2026-08-20T19:04:55.241Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post, I will share with you a twisted Arbitrary File Read I encountered during one of my client engagements and how I went about exploiting it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kV8l7pkwkqYHa1xlAnk5vQ.png" /><figcaption>Reading arbitrary files but with a twist (the twist is revealed in the post) — image generated by Copilot</figcaption></figure><h3>Introduction</h3><p>In June 2026, I was pentesting one of my clients and found an interesting web application and 1 hour into the testing, I stumbled upon a functionality that would download a report (xlsx/docx formats):</p><ul><li><a href="https://client-app.testing.local/?download=fname.xls">https://client-app.testing.local/?download=fname.xls</a></li><li><a href="https://client-app.testing.local/?download=fname.doc">https://client-app.testing.local/?download=fname.doc</a></li></ul><p>An easy place to probe for an arbitrary file read, right… Indeed the application was affected as I did managed to include a valid UNC path and got a DNS pingback on my Burp Collaborator instance. Since any external requests were blocked from the application, my collaborator instance didn’t received any SMB requests, as expected.</p><h3>Twist in the plot</h3><p>The twist in the plot comes where I know the vulnerability does exists and is well within reach but all my attempts to read an arbitrary file were thrown away due to the application appending a nasty little “X” at the end of the requested file.</p><p>You see, the UNC path injection did worked but the “X” at the end doesn’t do any damage to the provided SMB path. But when I am attempting to read a file like:</p><ul><li>C:\Windows\win.ini</li><li>C:\Windows\System32\drivers\etc\hosts</li></ul><p>The “X” at the end would mess everything up and the file I requested won’t be a valid one:</p><ul><li>C:\Windows\win.iniX</li><li>C:\Windows\System32\drivers\etc\hostsX</li></ul><p>The application did append an “X” because the developers presumably decided that since the app exports <strong>.docx</strong> and <strong>.xlsx</strong> files, “X” is the common suffix character and they can use that. Atleast that is what it felt like — pretty unusual and something that I haven’t seen before. Probably that’s why I like being a pentester / red teamer — I get to navigate uncharted territories. It’s a lot of fun along with a great learning experience with a few occasional hiccups here and there. But hey, no complaints. I love it :)</p><h3>Outsmarting the situation</h3><p>Given this road-block, as a tinkerer, and having confirmed the UNC path injection and knowing the path traversal sequences work and so does arbitrary paths, I knew the vulnerability was within my reach. But just one-character was messing everything up.</p><p>So as most of you would have attempted, I tried to insert some characters to see how the application behaved, including NULL byte, new line character, a tab, a semicolon, a colon (thinking it would be treated as a an alternate steam — a random thought, probably silly, but okay, I tried, failed, learnt, and moved on). None of my attempts worked.</p><p>And then I started thinking, instead of fighting the character, why not accept it and see what all options I have at my disposal considering the “X” will always stick around.</p><p>So the question I asked myself was:</p><blockquote>Given this vulnerability, what all files can I pull out to demonstrate an impact?</blockquote><p>Now with this variant of the problem, I started looking and found some interesting observations, which is why I am writing this post.</p><p>So the interesting files in Windows that an attacker would get the most value out of would be — “.evtx” files — Windows Event Logs.</p><p>From PowerShell commands and scripts to usernames, domain names, hostnames, and all sorts of information, these files are the treasure trove.</p><p>And it felt like the perfect candidate as well — the file paths are well-known — no guesswork needed. But there’s a problem: high privileges are required to read these files. So even if I provide the path to these files, I would end up getting nothing. Unless the application runs with a high-privileged account, which wasn’t the case.</p><p>So what next? I searched more and found few files ending with an “X” but don’t need high privileges to read:</p><ul><li>C:\Windows\System32\ksxbar.ax</li><li>C:\Windows\System32\vidcap.ax</li></ul><p>And lo and behold, attempting to read these files did work. But where’s the impact in reaching these files? It’s still pretty limited.</p><p>So what other files can we read? Well, we can read an “.aspx” file as well.</p><p>For that, I attempted to figure out the webroot path, which I found via an error page. And then I attempted to read the files (“.asx” &amp; “.aspx” files — their names were in the URL).</p><h3>Conclusion</h3><p>This attempt worked and I managed to read the application source code itself. From there, the the ASPX file had references to the other file in the comments and that file was like hitting a jackpot — it had database connection string which contained a public IP address and the credentials.</p><p>The database was not accessible from outside but I managed to figure out a way to access it, using another neat trick, which is probably worth writing in another blog post.</p><p>But that was it for this one — an interesting arbitrary file read with a twist and the solutions I came up in the process of exploiting it.</p><p>Thank you for reading the post and I hope you learnt something interesting.</p><p>See you in the next post. Until next time, stay curious and keep hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3109a285e70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My CRTE Exam Journey — the good, the bad, and the ugly]]></title>
            <link>https://medium.com/@shivam_bathla/my-crte-exam-journey-the-good-the-bad-and-the-ugly-19f808e83c5d?source=rss-5d2311c15ae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/19f808e83c5d</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shivam Bathla]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 06:22:28 GMT</pubDate>
            <atom:updated>2026-08-14T06:43:11.682Z</atom:updated>
            <content:encoded><![CDATA[<h3>My CRTE Exam Journey — the good, the bad, and the ugly</h3><p>My personal experience on the course, labs, the exam and more…</p><p>Hello folks!</p><p>I hope you all are doing great. Two days ago, on 12th August 2026, I received the great news that I have passed CRTE and yesterday, I received my digital certificate. Such a great feeling after all the pain and hardwork, sleepless nights and the doubts that came in and were thrown out. It was a journey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*I60I1Yt9v8jBsUrzrMiBLQ.png" /></figure><h3>Table of Contents</h3><ul><li><a href="https://medium.com/@shivam_bathla/my-crte-exam-journey-the-good-the-bad-and-the-ugly-19f808e83c5d#f620">The Start</a></li><li><a href="https://medium.com/@shivam_bathla/my-crte-exam-journey-the-good-the-bad-and-the-ugly-19f808e83c5d#ae53">The Journey</a></li><li><a href="https://medium.com/@shivam_bathla/my-crte-exam-journey-the-good-the-bad-and-the-ugly-19f808e83c5d#29ed">The Exam</a></li><li><a href="https://medium.com/@shivam_bathla/my-crte-exam-journey-the-good-the-bad-and-the-ugly-19f808e83c5d#18bc">Post-Exam</a></li><li><a href="https://medium.com/@shivam_bathla/my-crte-exam-journey-the-good-the-bad-and-the-ugly-19f808e83c5d#ec98">Course, Labs and Exam Review</a></li><li><a href="https://medium.com/@shivam_bathla/my-crte-exam-journey-the-good-the-bad-and-the-ugly-19f808e83c5d#3ff0">Closing Thoughts</a></li></ul><h3>The Start</h3><p>During last year’s Black Friday Sale, I purchased my CRTE certification and planned to do it around March 2026 but due to some personal ups and downs (downs mostly) and the geopolitical situation in the region I worked, I wasn’t in the right state of mind to study for the exam without being interrupted.</p><p>I purchased one month of lab time to challenge myself and instead of going through the beginner course — CRTP — to lay out the foundation, I directly went for CRTE, again another challenge for my brain, to see how far I can take it.</p><p>As I already had experience performing AD assessments from my job, I knew I had a solid understanding of the basics and beyond and I was ready for the challenge that’s to come ahead.</p><p>So fast forward to July 2026, I had started my CRTE lab. What followed was a juggle between a full-time job, the exam prep, research work, and daily chores, coming all together on me.</p><p>Slowly the toll of the load started to show in my sleep time being reduced and it becoming inconsistent. The pain was real but the reward was quite promising — being able to evade defenses in an enterprise environment and moving without (or with minimal) detection.</p><p>If you know me, you would definitely know how much I am obsessed with trying to bypass defenses like EDRs, Endpoint Security Agents, Application Control Software (AppLocker, WDAC, etc.), web proxies, and so on. That’s the thing which keeps me wondering and staying up all night.</p><p>I have previously managed to find some pretty neat tricks to bypass AppLocker, a very interesting flaw in a few EDR solutions to evade any rules your SOC could create to detect malicious activities, notable amount of bypasses for multiple secure web gateways, and loads of tricks to evade and uninstall endpoint security agents without needing the uninstallation password. This stuff and researching about it brings a great deal of satisfaction to me. It bought me the title of “Trouble Maker” (from the SOC) as well. I like it too.</p><p>Well, I digressed but hopefully you now get the point how much I live for this stuff. So more than the CRTE certification itself, the aspect of it that promised me about defense evasion was such a promising thing that I wanted to learn it and add it to my skill set.</p><h3>The Journey</h3><p>The journey leading up to the exam was fun and exciting at the start but slowly it became painful — juggling everything. But I managed to do it, with a great deal of support from family and friends, more so than I could express.</p><p>After a heavy day at work, I would sit on the labs for a couple of hours, then have my meals and again back to the labs, thinking my way through, trying it out differently than what’s taught. Going off the script and seeing how things worked. That tinkering was really helpful.</p><p>I did the labs twice. First time I got the general idea of the attacks and the tooling and during my second time around, I did all my tinkering and trying out all sorts of ideas I had. All in one month time, with the limited time I could get for the studies.</p><p>By the end of the one month period, I noticed my lab time expires immediately after the weekend. So I had to make a call — to give the exam on the next weekend (after lab time expiry) or to give it before my lab time expires.</p><p>To add to the already challenging timelines I had, I chose to give it before my lab time expires. It was a good decision for me, as I could go back to my lab and copy any tools or perform some research on the attacks which I wanted to attempt on my exam.</p><h3>The Exam</h3><p>As mentioned before, I opted to do my exam before my lab time expires, so I can do it on weekends, without giving any gap between my practice and the exam time.</p><p>Before exam, I took 2 days to prepare my own cheatsheet along with gathering the reporting templates and a folder containing the minimum amount of tools I required to copy to my exam VM (as it doesn’t comes with any tools).</p><p>I read all the rules and what I had to accomplish to pass the exam along with reading the reviews from other people who took the recent version of the exam.</p><p>I woke up on exam day around 6 am and started it around 07:30 am. I wasn’t feeling any pressure, I did felt the pressure 2 years back when I gave my <a href="https://medium.com/@shivam_bathla/my-oscp-exam-day-e9dbb36c7aa4">OSCP exam</a> as well as during my OSWE exam. It really reflected how far I have come in dealing with these pressure situations. I had my calm during the complete exam, which is something I really loved.</p><p>So back to the exam — 5 minutes into it and I had compromised my first machine. And that puts me to 20% progress (you have to compromise 5 machines to get a perfect completion score).</p><p>Following that, I got more progress but there was one thing that affected my speed — some of the tools I practiced in the labs weren’t working in the exam and so I had two things to deal with now — the exam along with looking for the tools that would work to make both ends meet. It was a good run, and although initially it felt chaotic, I got the hang of it and managed to research the tools that would work for me.</p><p>With this back and forth between needing tools different from what was taught in the labs and the exam, I did started to loose some of my time and the timelines I set for myself, so much to the point that after 12 hours, I knew all the vectors to compromise the forest but had one missing link.</p><p>I wasn’t taking much breaks either — which was not a good thing and not something I would recommend either.</p><p>So after 14 hour mark, I took a big (2 hour) break (besides small meal breaks, etc.) and didn’t think of the exam or the vectors. It really helped me get back with a fresh mind and then I kept going and managed to fully compromise the first forest in less than a day (it was slow for what I planned but since I chased every rabbit hole and every potential misconfiguration I could go about abusing, I drastically had my speed reduced). But I learnt a lot even during those detours, which is a positive thing.</p><p>Then around 04:30 am I slept and woke up again around 09:30 am. During the second day I continued with where I left off and after 6 hours passed, I realized I knew the potential vectors to the compromise of the second forest but I was missing the initial vector. And I fell into more rabbit holes — big ones, where I kept pushing harder without any results.</p><p>I realized the exam will be over in about 16 hours and I needed sleep before I go back to work next day. I cannot compromise the work just because of exam. A number of thoughts crossed my mind in a split second — about me not clearing the exam, not being able to find the initial vector due to ignoring some very small detail, having to retake it, etc. And the other side of me was fighting those daemons silently along with the exam. But I overcame those intrusive thoughts and I told myself — I have already paid for the certification and I am taking it home with me.</p><p>And then I tried another attack vector and it did worked — felt like magic at that moment. But the happiness was short-lived as I made my way down into few more rabbit holes. By that point, I think I was a well-qualified rabbit hole explorer. After exploring multiple dead-ends, I finally tried what I knew would surely work and it did. Once I was past that point, I managed to move forward quickly and finish my complete exam.</p><p>In hindsight, I ignored a few details initially and chased a number of rabbit holes, some of which I could have avoided very easily but that was a part of the journey and it taught me a number of things.</p><h3>Post-Exam</h3><p>After the exam ended, it felt like I just came out of a pressure cooker — feeling so relieved and relaxed. But the battle wasn’t over — the reporting was still left and it was as important as the exam itself.</p><p>Before my lab time ended, I made sure to prepare the basic report and add all the steps and screenshots so that if I missed any single detail, I can take a screenshot while I had the access to the exam labs.</p><p>So after taking a short break and having my dinner, I started preparing my report. I took my own sweet time to prepare it as perfectly as I could — because my whole exam attempt crystallizes to that — whatever I present in the report. So it had to be very good.</p><p>After having all the evidence, I took some sleep so I could carry out my job effectively and after work, I started preparing my report. By that time my exam had ended. I finished the remaining report in about 2 hours after work. Once done, I quickly re-read it from start to end to see if I covered everything and then submitted the report.</p><p>The next morning, I received the email stating my exam report had been received and I will get back my results within 7 business days. From the reviews I read online, usually the results are received within 2–3 days. I kept a close eye on my mailbox and on 12th August 2026, I received the email stating I have passed the exam. And on 13th August 2026, I received my digital certificate.</p><h3>Course, Labs and Exam Review</h3><p>Before I close this post off and call it a day, I wanted to share my honest review of the course and if it stood off on what it promised.</p><p>I will also share my opinions on the labs and the exam, sharing what was good, and what was bad and could be improved.</p><p>Before I jump into the specifics, I really think that Nikhil and the team do deserves credit for making their courses accessible to the aspiring red teamers and their support is quite helpful and welcoming. Now going into the details about what I enjoyed and what I felt could be improved.</p><h4>The Good</h4><p>The things I enjoyed about the whole CRTE journey were:</p><ol><li>The lab support team — Quick, helpful and very co-operative.</li><li>The exam — It was well thought and very well-designed to challenge all you have learnt, and had to be earned by proving your knowledge of Active Directory and the various attacks.</li><li>The labs — Even though it was a shared environment, I didn’t faced much issues when it came to other students affecting my lab experience.</li><li>The cost — The cost of the labs and exam was quite affordable, when compared to Offsec certifications, which are quite expensive and exams like OSEP are quite outdated (based on the experience of all the people I know, who took it and the syllabus I saw).</li></ol><h4>The Bad</h4><p>The things I felt that could be improved were:</p><ol><li>The labs — They were unstable for many scenarios which didn’t worked for me (and countless other students). This was the most painful part I had to go through — missing tickets in memory or the tool not working as shown in the course/manual. And one time (only once), I managed to find the artefacts of other student which did end up affecting my experience because I thought I received the credentials in plain-text so easily, while infact they were the remnant of the fellow student’s attack attempts. Additionally, the MDE didn’t detect my attempts to touch LSASS and dump its memory — which to my surprise was very unusual and made me question that whole scenario.</li><li>The course — I felt the course promised a lot but delivered very little on the defense evasion aspects. Learning tools is good but I wanted to learn more about the methodologies which are higher up in the <a href="https://www.attackiq.com/glossary/pyramid-of-pain-2/">Pyramid of Pain</a>. A tool can be blocked but once I understand a methodology, I can adapt it to go further. Additionally, I wanted more of “why” something worked rather than just running a command and seeing that it “worked”. As I love to know how things work under the hood, I felt that the course never went to those aspects.</li><li>The lab support team — While I already mentioned how good and supportive the lab team was, in a few cases, I received very unhelpful replies of “please try it again and it will work”, to eventually find out that the lab itself had the issue and I wasted my precious 1-2 days over that. Also, the support team works mostly during the Indian Standard Time so there are times when you send your queries and you receive an answer the next morning when you are back at work and can’t try out the lab.</li></ol><h3>Closing Thoughts</h3><p>If you made it this far, thank you for your patience and curiosity. I hope you got some value out of this post.</p><p>For those who are looking for their next Active Directory certification/challenge, I tried to keep all the good points and shed some light on the bad ones so you can make a well-informed decision of whether to pursue the certification or not.</p><p>Until next time, stay curious and keep hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19f808e83c5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pentester Bytes: Zip files slipping under your nose!]]></title>
            <link>https://medium.com/@shivam_bathla/zip-files-slipping-under-your-nose-90cfbe3cdfe7?source=rss-5d2311c15ae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/90cfbe3cdfe7</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Shivam Bathla]]></dc:creator>
            <pubDate>Sat, 14 Feb 2026 18:42:34 GMT</pubDate>
            <atom:updated>2026-02-15T14:04:33.664Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s learn about Zip Slip — an interesting and critical arbitrary file overwrite vulnerability leading to RCE in certain scenarios!</p><h3>Introduction</h3><p><a href="https://snyk.io/research/zip-slip-vulnerability">Zip Slip</a> is a widespread arbitrary file overwrite critical vulnerability, which typically results in remote command execution. It was discovered and responsibly disclosed by the Snyk Security team ahead of public disclosure on 5th June 2018. It affected thousands of projects, including ones from HP, Amazon, Apache, Pivotal, and many more.</p><p><strong>Reference:</strong> <a href="https://snyk.io/research/zip-slip-vulnerability">https://snyk.io/research/zip-slip-vulnerability</a></p><p>Interestingly, it is not a vulnerability per se but a mishandling of the zip archives. If the zip archives containing relative file paths are extracted, it results in a file overwrite vulnerability. The attackers can exploit this to overwrite arbitrary files and gain access to the server. Some of the juicier targets include system files like <strong>/etc/passwd</strong>, <strong>/etc/shadow</strong>, <strong>/etc/sudoers</strong>, cron jobs, SSH keys, and more.</p><p>Like all famous vulnerabilities, Zip Slip also has a logo:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/0*BRFFz2XZ7nTFccB3.png" /></figure><p>Since many packages, frameworks and languages have functions to deal with zip files; several implementations were included in this vulnerability disclosure process. Due to this, multiple CVEs correspond to this vulnerability.</p><p>In this lab, we will learn how to exploit the Zip Slip vulnerability in a realistic environment and leverage it to gain shell access to the compromised server.</p><h3>Lab Environment</h3><p>In this lab environment, the user is going to get access to a Kali GUI instance. An image converter web app is running on the target server. It can be accessed using the tools installed on Kali at <a href="http://demo.ine.local/">http://demo.ine.local</a>.</p><p><strong>Objective:</strong> Exploit the Zip Slip vulnerability in the bulk conversion feature to gain SSH access on the server and retrieve the flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/0*Nfd5NG-omw-saDlj.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9EKuYZm7D2Prb0x08mk66A.png" /><figcaption><a href="https://my.ine.com/CyberSecurity/courses/ebd09929/cyber-security-vulnerabilities-training-library/lab/e9bf07d4-423d-4696-b0b1-c5a08c4dcfb4">https://my.ine.com/CyberSecurity/courses/ebd09929/cyber-security-vulnerabilities-training-library/lab/e9bf07d4-423d-4696-b0b1-c5a08c4dcfb4</a></figcaption></figure><h3>Tools</h3><p>The best tools for this lab are:</p><ul><li>Nmap</li><li>ssh client</li><li>ssh-keygen</li><li>Zip</li><li>A web browser</li></ul><h3>Solution</h3><p><strong>Step 1:</strong> Open the lab link to access the Kali GUI instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QqIPJ9DUTfXAsBLJ.png" /></figure><p><strong>Step 2:</strong> Check if the provided machine/domain is reachable.</p><p><strong>Command:</strong></p><pre>ping -c3 demo.ine.local </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Yqha01ljf5_LxXX3.png" /></figure><p>The provided machine is reachable.</p><p><strong>Step 3:</strong> Check open ports on the provided machine.</p><p><strong>Command:</strong></p><pre>nmap -sS -sV demo.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yiMRivcFKWKZWJp2.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b-ms8_vViNFgkEl8.png" /></figure><p>Ports 22 (SSH), 80 (HTTP), and 8080 (Werkzeug httpd) are open on the target machine.</p><p>Notice the fingerprint returned for the service running on port 80. The service returns html response, as you can notice from the highlighted parts in the above output.</p><p><strong>Step 4:</strong> Explore the provided web app and API.</p><p>Open the following URL in the browser:</p><p><strong>URL:</strong> <a href="http://demo.ine.local/">http://demo.ine.local</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iS3-cktKxw9VD_Kc.png" /></figure><p>You would be redirected to <strong>/login</strong>. An image converter web app is provided on this URL.</p><p>Open the following (API) URL in the browser:</p><p><strong>URL:</strong> <a href="http://demo.ine.local:8080/">http://demo.ine.local:8080</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jDzFJyMD49NNDm0S.png" /></figure><p>An error page is returned due to a missing template in the backend. The API must be running in debug mode, and thus, we are able to see this error page.</p><p>Click on the highlighted message (<strong>TemplateNotFound</strong> error). That should take you to the following section:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rN1vQfXPOZ0P0xrW.png" /></figure><p>Notice the application path (on the server) is revealed from the error message: <strong>/home/app/pythonAPI/API.py</strong></p><p>Make a note of this path. It will come in handy later on.</p><p><strong>Step 5:</strong> Create an account on the image converter web app.</p><p>Open the following URL:</p><p><strong>URL:</strong> <a href="http://demo.ine.local/">http://demo.ine.local</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5nmdRKMf_OVdZWKY.png" /></figure><p>Click on the <strong>Sign Up</strong> button. That would take you to the signup page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W4J4RgZIE1fizEcE.png" /></figure><p>Create a new account with the following details:</p><p><strong>E-mail:</strong> test@test.com<br><strong>Password:</strong> test</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Xft3bBt6o0ahALFu.png" /></figure><p>A success alert is shown once a new user is registered:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PZw5KXaaKIDhEvJu.png" /></figure><p>Dismiss the alert. That should take you to the <strong>/converter</strong> page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XypnqcuXa0Y-rF6c.png" /></figure><p>We can use this application to process images to generate image arts and convert images to different formats (individually and in bulk).</p><p><strong>Step 6:</strong> Take a screenshot to be used with the web application.</p><p>Right click on the page and select <strong>Take Screenshot</strong> option:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*njLoMsnJZB6Ijrha.png" /></figure><p>Click on <strong>Save full page</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9ZPeKcPmM-Ldr0_Y.png" /></figure><p>Click on the <strong>Download</strong> button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QozmlScLIu8NRi0a.png" /></figure><p>The screenshot is downloaded:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VCSEb0NJBx5c5uqO.png" /></figure><p><strong>Step 7:</strong> Generate an image art.</p><p>Upload the screenshot generated in the previous step:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8jIo-tsERHlqAIoH.png" /></figure><p>Check the available options and select the <strong>Generate Image Art</strong> option:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xj15xO7sHxMs1kGW.png" /></figure><p><strong>Note:</strong> There is one more interesting option in the above list — converting images in bulk. Keep it noted; we will return to it shortly.</p><p>Enter <strong>Hello World!</strong> as the image art text and click on the <strong>Submit</strong> button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rcyLX_HGaC09WMvg.png" /></figure><p>An image has been successfully generated:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PIh_9s01zaWxi9xc.png" /></figure><p>Click on the returned image link:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*z-i00TyCssjCtUsx.png" /></figure><p>The generated image is shown in a new tab. Notice the bottom of the image: it contains the supplied image art message (<strong>Hello World!</strong>).</p><p><strong>Step 8:</strong> Explore the bulk conversion feature.</p><p>Select <strong>Convert to another format (in bulk)</strong> option:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QxQpFUYjEK55tKj-.png" /></figure><p>Select <strong>jpg</strong> as the destination format:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0lBr1_T9yHH4bGnf.png" /></figure><p>Click on the <strong>Submit</strong> button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DIeuxq4ypsjHCT3o.png" /></figure><p><strong>Note:</strong></p><ul><li>Before submitting the image for bulk conversion, open the network window to inspect the response of the backend API.</li><li>Alternatively, you can use Burp Suite to inspect the outgoing requests and the corresponding responses.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bZM3_ec7SGjhU4de.png" /></figure><p>Notice the response states that a zip archive is expected!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GB5q9wJ9Mjs8xPR-.png" /></figure><p>In this case, the backend would take a zip archive and convert the images to another format that we select (jpg, png, bmp, etc.).</p><p><strong>Step 9:</strong> Create a malicious zip file containing relative file paths.</p><p>If the backend doesn’t deal with the zip files securely, this could open room for exploitation.</p><p>We already know the path where the API files are present (inside the <strong>/home/app/pythonAPI</strong> directory).</p><p>This suggests that the API might be running as the <strong>app</strong> user, probably created to manage all the application-related things.</p><p>If you remember, we discovered the SSH service on the target server. Since we can upload arbitrary zip files and get the server to extract those (probably unsafely), it presents an opportunity for an attacker to create/overwrite SSH keys for the <strong>app</strong> user and gain access to the target server.</p><p>The idea would be to provide a zip file that contains relative file paths instead of absolute, and we can leverage the improper handling of the zip files to overwrite the SSH keys for the user named <strong>app</strong>.</p><p>Let’s see if this plan works.</p><p>Create a pair of ssh keys in the <strong>home/app/.ssh</strong> directory:</p><p><strong>Commands:</strong></p><pre>mkdir -p home/app/.ssh</pre><pre>ssh-keygen -t rsa -b 4096</pre><pre>ls /root/home/app/.ssh</pre><p><strong>Note:</strong> Provide <strong>/root/home/app/.ssh/id_rsa</strong> as the path to save the private ssh key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sf0niS5_Op5mpTXX.png" /></figure><p>Copy the public key to <strong>authorized_keys</strong> file:</p><p><strong>Commands:</strong></p><pre>cd /root/home/app/.ssh</pre><pre>cp id_rsa.pub authorized_keys</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ywW7gBqirx-s6GYB.png" /></figure><p>Create some more nested directories and navigate to them. Then create a zip archive with relative file paths (using a number of <strong>../</strong> sequences):</p><p><strong>Commands:</strong></p><pre>mkdir -p a/b/c/d</pre><pre>cd a/b/c/d</pre><pre>zip -r images.zip ../../../../../../../home/app/.ssh/id_rsa ../../../../../../../home/app/.ssh/authorized_keys</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SagMQXN70MjI2mMP.png" /></figure><p><strong>Note:</strong> In the above image, we have used a number of <strong>../</strong> sequences. When this zip file is extracted on the backend (without considering the possibility of files with relative paths), the extracted files would be saved to the following paths:</p><ul><li>../../../../../../../home/app/.ssh/id_rsa</li><li>../../../../../../../home/app/.ssh/authorized_keys</li></ul><p>Provided we have enough <strong>../</strong> sequences to traverse up to the file system root, we can successfully overwrite/create the SSH keys for the <strong>app</strong> user.</p><p>Check the list of files in the resulting zip archive:</p><p><strong>Command:</strong></p><pre>unzip -t images.zip </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-hj1S9l6CWZhV0wh.png" /></figure><p>Notice the files in the zip archive indeed have relative paths.</p><p>Copy this crafted zip archive to the <strong>/root</strong> directory:</p><p><strong>Commands:</strong></p><pre>cp images.zip /root/</pre><pre>ls /root/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ou9SbXP4w9mLLoJL.png" /></figure><p>Now we can easily select this file for uploading it instead of going into the created directory hierarchy (that is, <strong>/root/home/.ssh/a/b/c/d/</strong>) to locate it.</p><p><strong>Step 10:</strong> Bulk convert the files in the crafted zip archive.</p><p>Upload the zip archive (<strong>/root/images.zip</strong>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*miZbhicPkBhDwmhu.png" /></figure><p>Select the <strong>Convert to another format (in bulk)</strong> option:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3B3XqFZ6-iTrnz2p.png" /></figure><p>Select <strong>jpg</strong> as the destination format:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BpPtIdrYrjk8c2I9.png" /></figure><p>Click on the <strong>Submit</strong> button:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g3Z2QDG5uD7WB6tx.png" /></figure><p>The files have been converted:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LVG9t0BNFHDlJ4We.png" /></figure><p>Click on the returned link. It would download a zip archive:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y26m1rWb1MMW5xwp.png" /></figure><p>Open it with the default application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jc7SN0ocsjZGB8Wc.png" /></figure><p>This results in an error while extracting the zip archive.</p><p>Since the provided files had relative paths, they would be extracted in a directory different from where the API expected these files to be. Therefore, the API would not have any file to be packed into the zip archive, and thus, an empty zip archive is sent back to the user.</p><p><strong>Step 11:</strong> Login to the target machine over SSH.</p><p>Now that we have (probably) placed the SSH files for the <strong>app</strong> user, we can try to log in over SSH.</p><p>Switch to the directory containing the generated SSH private key and login to the <strong>app</strong> user’s account:</p><p><strong>Commands:</strong></p><pre>cd ../../../../</pre><pre>ls</pre><pre>ssh -i id_rsa app@demo.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0_gsxmtIJqfLXPdQ.png" /></figure><p>Login requires a password. Probably the SSH files (private key and authorized key) were not placed correctly.</p><p><strong>Step 12:</strong> Upload the zip archive again.</p><p>Probably the zip archive was not extracted previously. Try uploading the same zip archive again:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2on9ffs4D7MZ1ndt.png" /></figure><p>Try to SSH into the target machine:</p><p><strong>Command:</strong></p><pre>ssh -i id_rsa app@demo.ine.local </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oNP70UdMyvIwlAgt.png" /></figure><p>This time we were successfully able to SSH into the target machine.</p><p><strong>Step 13:</strong> Retrieve the flag.</p><p><strong>Command:</strong></p><pre>ls</pre><pre>cat FLAG</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AgsiV_1vpcDcFJvz.png" /></figure><p><strong>FLAG:</strong> a1828b611769a4306a8398189c50de74</p><h3>Conclusion</h3><p>With that, we conclude this lab writeup on Zip Slip. The important part to be noted is the widespread use of Zip archives as well as the ease of exploitation of this vulnerability, giving an advantage to the adversary.</p><p>The only patch for this vulnerability is to handle Zip archives with caution, provided that they are coming from an untrusted source. Make sure to unzip the files using code that deals with files safely, doesn’t appends the relative paths (that is, “../” sequences), and also doesn’t extracts symlinks from the malicious archive.</p><p>Feel free to spread this article so that more folks can learn about ZipSlip and how to test for it.</p><p><strong>Note:</strong> If you would like to get a pentest or source code review of your web/mobile apps and APIs, and see how really secure they are, feel free to DM me on <a href="https://www.linkedin.com/in/shivambathla/">LinkedIn</a> or check out my <a href="https://shivam-bathla.github.io/">pentesting services</a>. If you know someone who might find value in my work, please refer me. Your support is great appreciated.</p><p>Until next time, keep learning and happy hacking!</p><h3>References</h3><ul><li><a href="https://snyk.io/research/zip-slip-vulnerability">Zip Slip Vulnerability</a></li><li><a href="https://github.com/snyk/zip-slip-vulnerability">Zip Slip Respository</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90cfbe3cdfe7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pentester Bytes: API Pentesting Methodology — Lack of Resources and Rate Limiting]]></title>
            <link>https://medium.com/@shivam_bathla/pentester-bytes-api-pentesting-methodology-lack-of-resources-and-rate-limiting-a7cbfd91ce1e?source=rss-5d2311c15ae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7cbfd91ce1e</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Shivam Bathla]]></dc:creator>
            <pubDate>Fri, 13 Feb 2026 10:28:52 GMT</pubDate>
            <atom:updated>2026-02-13T10:28:52.604Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pentester Bytes: API Pentesting Methodology — Lack of Resources and Rate Limiting</h3><h4>Learn how to compromise an API like a pro by leveraging the Lack of Resources and Rate Limiting!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*hKBl-32p3scwtNtX.jpg" /><figcaption><strong>Image Reference:</strong> <a href="https://apisecurity.io/encyclopedia/content/owasp/api4-lack-of-resources-and-rate-limiting.htm">https://apisecurity.io/encyclopedia/content/owasp/api4-lack-of-resources-and-rate-limiting.htm</a></figcaption></figure><h3>Introduction</h3><p>Most of the <a href="https://owasp.org/www-project-api-security/">OWASP API Security Top 10</a> list is crowded with Authorization issues. So I think it’s important to know the difference between Authentication &amp; Authorization.</p><p>If you already know it, then read on. Else, stop by and check this post out on <a href="https://medium.com/@shivam_bathla/authentication-and-authorization-for-dummies-1f77567b7c6d">Authentication and Authorization for Dummies</a>:</p><p><a href="https://medium.com/@shivam_bathla/authentication-and-authorization-for-dummies-1f77567b7c6d">Authentication and Authorization for Dummies</a></p><h3>Why these posts?</h3><p>I think it must be clear now that traditional web applications security is being matched up with the newer paradigm where APIs are ruling the world.</p><p>So the goal with these posts would be to share all you need to up your API Security game and develop a pentesting methodology.</p><p>If that sounds like something up your alley, then stick along with me and we will learn all the methodology for pentesting APIs.</p><h3>Lack of Resources and Rate Limiting</h3><p>As the name suggests, this vulnerability happens when the server doesn’t has enough resources to satisfy the requests of all the users or has missing rate limits.</p><p>Now a server might have adequate resources to satisfy user requests but let’s say that a malicious user makes the server do more work like pulling 1000s of records which are both memory and CPU intensive, let’s say. Then too the resource constraint would be there right.</p><p>And that’s where this vulnerability happens.</p><h4>Example Scenario</h4><p>Say I have an account at <em>e-shoppe.com</em> and wish to login to my account. Upon login, I receive an OTP (because I am a security aware person, so I have 2FA enabled).</p><p><em>[A few seconds later…]</em></p><p>I receive back the OTP. It’s a 4-digit OTP — all numbers.</p><p>Now my spider-sense tells me to maybe try sending multiple requests and see if I can <em>guess</em> the OTP.</p><p>So I wrote a Python script (because who doesn’t loves it) and send a lot of concurrent requests to the API.</p><p>A moment later, I discovered that the script had successfully found the correct OTP and the website happily accepted it. That was fun and it was the lack of rate limiting that led to this attack!</p><p>I believe that you now understand this vulnerability (let’s call it LoReaRL for the sake of brevity). So let’s jump on to the methodology which is the primary focus for these posts.</p><p>If you think that you understand it well, then read on. If not, then it would be quite helpful to learn it first. Else you will be missing on some things…</p><p>One great source that immediately comes to my mind is (you guessed it!) is the <a href="https://owasp.org/www-project-crapi/">OWASP’s crAPI</a>.</p><h3>Pentesting Methodology</h3><p>Now you understand LoReaRL well. Let’s see how can we hunt for this issue. And more importantly how can we escalate it!</p><p>Now depending on the application, what you would do is: <strong><em>Identify the API endpoints that do not enforce any rate-limits or accept user-input blindly and generate some heavy response based on that.</em></strong></p><p>This would be the most important thing. Because once you know which all APIs are the possible suspects, then we can proceed with the exploitation, a.k.a the fun part.</p><p>In order to hunt for these issues, try doing the following to locate the (potentially) vulnerable APIs:</p><ol><li>For an API that accepts user image, upload a very large file: 1–2 GB worth of content, and see if the backend API happily accepts it.</li><li>For an API fetching a number of records depending on user input (<strong>Ex:</strong> get the content of 100 posts or last 100 commits), see if you can request an unreasonable amount of records containing a huge data, in turn taking up a lot of resources on the backend to serve this request.</li><li>For an API see if you can send a lot of requests in a short time period. This would indicate that there are missing rate-limit checks.</li></ol><p>Sweet! Now you would have known of all the vulnerable APIs, the next step would be the exploitation.</p><h4>Exploitation</h4><ol><li>For APIs which can accept a large file or a large user input, see if the page that loads the supplied data (like the uploaded image) is slow(ish)?</li><li>For APIs that return a large set of records, see if the server becomes slow for other requests sent at the same time?</li><li>If the is no rate-limiting on the API, then see if you could send a lot of login requests to get into an account. Else too see if you can make the server unresponsive (ofcourse this must not be done unless explicitly stated in the pentesting scope).</li><li>In either case, congrats yourself since you found out an LoReaRL vulnerability! Enjoy, have fun, buy some bitcoins, start a company, go for a vacation from the bounty money or just read on…</li><li>If it didn’t worked, then worry not, look for the next issue — that is —Broken Function Level Authorization, which is the subject of our next post.</li></ol><h3>Closing Thoughts</h3><p>I hope that you now understand and are able to exploit <strong><em>Lack of Resources and Rate Limiting</em></strong> vulnerabilities right when you see one!</p><p>Feel free to spread this article so that more folks can learn about hunting for rate limiting related issues and API security in general.</p><p><strong>Note:</strong> If you would like to get a pentest or source code review of your web/mobile apps and APIs, and see how really secure they are, feel free to DM me on <a href="https://www.linkedin.com/in/shivambathla/">LinkedIn</a> or check out my <a href="https://shivam-bathla.github.io/">pentesting services</a>. If you know someone who might find value in my work, please refer me. Your support is great appreciated.</p><p>Until next time, keep learning and happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7cbfd91ce1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pentester Bytes: API Pentesting Methodology — Injection]]></title>
            <link>https://medium.com/@shivam_bathla/pentester-bytes-api-pentesting-methodology-injection-69cf8d44c939?source=rss-5d2311c15ae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/69cf8d44c939</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Shivam Bathla]]></dc:creator>
            <pubDate>Wed, 11 Feb 2026 13:00:04 GMT</pubDate>
            <atom:updated>2026-02-13T10:25:24.868Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pentester Bytes: API Pentesting Methodology — Injections</h3><h4>Let me share with you, my methodology for testing Injections (my personal favorite)!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CFJDTHslzju2WFId.png" /></figure><h3>Introduction</h3><p>Injection issues are quite interesting to me and are quite easy to exploit, and many a times (if not always), they can lead to quite severe consequences.</p><p>They can lead to RCE or XSS on the client side or some other obscure attack like Host Header Injection for instance. All in all, if you found an injection attack, chances are you might get your hands-on a big lottery, if you will.</p><p>But wait! I don’t even know what Injections mean. How am I supposed to follow along?</p><p>Worry not, we’ve got you covered. Read this post: <a href="https://medium.com/@shivam_bathla/injections-for-dummies-65f8569e34ce"><strong><em>Injections for Dummies</em></strong></a> to understand Injection attacks quite well.</p><p><a href="https://medium.com/@shivam_bathla/injections-for-dummies-65f8569e34ce">Injections for Dummies</a></p><h3>Why these posts?</h3><p>I think it must be clear now that traditional web applications security is being matched up with the newer paradigm where APIs are ruling the world.</p><p>So the goal with these posts would be to share all you need to up your API Security game and develop a pentesting methodology.</p><p>If that sounds like something up your alley, then stick along with me and we will learn all the methodology for pentesting APIs.</p><h3>Injection</h3><p>This issue happens when there is some user-supplied data mixed with the commands for some interpreter by the backend API.</p><p>Now this could be quite vague but it boils down to the following things:</p><ul><li>User-supplied data being added in the database queries, or passed directly to the ORMs, XML/JSON parsers or server-side templates, or shell without proper sanitisation.</li><li>Data coming from anything external (and possibly controlled by the untrusted entities) entering into any of the systems listed in the previous point.</li></ul><h4>Example Scenario</h4><p><em>e-shoppe.com</em> just released a new website and they are using postgres as the database and AWS Lambda as the API backend.</p><p>They ended up building a custom ORM because they feel that SQLAlchemy is too hard for their developers to learn (I really can’t comment, please ask them).</p><p>Now the thing is: their custom ORM’s code was vulnerable to SQL Injection and when I try to login to any website, that’s what I hunt for.</p><p>The injection issue was not in the obvious login/signup forms but instead in the parameters passed to one of the APIs.</p><p>When I pass an empty quote, thinks break and I get back a 500 (Internal Server Error).</p><p>Ofcourse I then tried to supply a valid query returning a response and voila! page worked.</p><p>Now I know there’s an injection issue, I use <a href="https://sqlmap.org/">sqlmap</a> just to make my job a bit easier, and get all the data. Credit cards, cash and what not ;)</p><p>And that’s what Injections are: the vulnerability that’s fun to exploit and gets you a lot of money ($$).</p><p>If you think that you understand the vulnerability in the above scenario, then read on. If not, then it would be quite helpful to learn about the vulnerability first. Else you will be missing on some things…</p><p>One great source that immediately comes to my mind is (you guessed it!) is the <a href="https://owasp.org/www-project-crapi/">OWASP’s crAPI</a>.</p><h3>Pentesting Methodology</h3><p>Now you understand Injections well, let’s see how can we hunt for this issue. And more importantly how can we escalate it!</p><p>Now depending on the application, what you would do is: <strong><em>Identify all the APIs that accept user input and pass it to some interpreter.</em></strong></p><p>This would be the most important thing. Because once you know of such APIs then only we can move forward with the exploitation.</p><h4>Exploitation</h4><ol><li>Find all such APIs accepting user input directly or indirectly. This is just a starting step, if you are able to filter APIs where this user input gets passed to some interpreter like a database engine, a shell, a JSON/XML parser or some template engine, then that’s much better.</li><li>Now try sending payloads for testing different interpreters: Command Injection, SSTI, JSON Injection, XXE, SQLi, NoSQLi, etc.</li><li>You can even send polyglot payloads and see if you get back any indicators that would help you craft more specific payloads.</li><li>If any of the above 2 points give you a success, then well done, you have found an Injection issue and you are just 1 bug report away from that amazing bounty or the cool swag!</li><li>If the above things didn’t worked or you atleast didn’t gave the responses indicating the presence of such issues, then it’s time to go blind!<br>What I mean here is that for SQLi or NoSQLi, try sending payloads that would make the response delayed by 10–20 seconds, for command injections you can try sending a request to your Burp Collaborator / RequestBin / custom cloud listener, for instance or directly get back the reverse shell. This would indicate of any blind injections and ofcourse this is not the end all, it’s just the beginning.</li><li>If nothing still worked, then don’t get disheartened, there’s a next issue that you can look out for — that is —Improper Assets Management, which is the subject of our next post.</li></ol><h3>Closing Thoughts</h3><p>I hope that you now understand and are able to exploit <strong><em>Injection</em></strong> vulnerabilities right when you see one!</p><p>One important thing to understand is that be it the traditional Web Apps or be it the APIs, both paradigms suffer from this issue.</p><p>In case of Web Apps, it’s quite prominent but in case of APIs its not that common. Not saying that it doesn’t exists but it’s less common compared to other issues that we have discussed so far, in this series.</p><p>Feel free to spread this article so that more folks can learn about hunting for injection issues and API security in general.</p><p><strong>Note:</strong> If you would like to get a pentest or source code review of your web/mobile apps and APIs, and see how really secure they are, feel free to DM me on <a href="https://www.linkedin.com/in/shivambathla/">LinkedIn</a> or check out my <a href="https://shivam-bathla.github.io/">pentesting services</a>. If you know someone who might find value in my work, please refer me. Your support is great appreciated.</p><p>Until next time, keep learning and happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69cf8d44c939" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pentester Bytes: API Pentesting Methodology — Security Misconfiguration]]></title>
            <link>https://medium.com/@shivam_bathla/pentester-bytes-api-pentesting-methodology-security-misconfiguration-d2cfba228254?source=rss-5d2311c15ae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2cfba228254</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shivam Bathla]]></dc:creator>
            <pubDate>Tue, 10 Feb 2026 16:30:51 GMT</pubDate>
            <atom:updated>2026-02-10T16:30:51.123Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pentester Bytes: API Pentesting Methodology — Security Misconfiguration</h3><h4>Let me share with you, my methodology for testing Security Misconfigurations!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*mTSGh4vTfsCnzxhc.jpg" /><figcaption><strong>Image Reference:</strong> <a href="https://apisecurity.io/owasp-api-security-top-10/api7-security-misconfiguration/">https://apisecurity.io/owasp-api-security-top-10/api7-security-misconfiguration/</a></figcaption></figure><h3>Introduction</h3><p>We are now living in a world where we have a lot of frameworks and tooling everywhere.</p><p>Want to start a web server? Great! You have a lot of options at hand: Apache, Nginx, Apache Tomcat, Caddy, Jetty, Gunicorn, Tornado, …</p><p>All these different options that you get have their own set of dials and knobs, that is, the configuration you use to set them up.</p><p>Now if you set the wrong config options, you have misconfigured a service and this can then lead to issues that you would have to pay for, later down the road.</p><p>And that’s what we will talk about today: Security Misconfigurations a.k.a Human Errors</p><h3>Why these posts?</h3><p>I think it must be clear now that traditional web applications security is being matched up with the newer paradigm where APIs are ruling the world.</p><p>So the goal with these posts would be to share all you need to up your API Security game and develop a pentesting methodology.</p><p>If that sounds like something up your alley, then stick along with me and we will learn all the methodology for pentesting APIs.</p><h3>Security Misconfiguration</h3><p>The name must be self-sufficient, I suppose. This issue happens when there is some misconfiguration which can lead to compromise of the APIs.</p><p>Now this could be quite vague but it boils down to the following things:</p><ul><li>Misconfiguration of cloud services or CMS: providing excessive privileges</li><li>TLS not enabled</li><li>Outdated (and possibly vulnerable) OS and software packages</li><li>Missing or Misconfigured CSP and CORS policies</li><li>Exposing unnecessary features to the general public</li><li>Stack traces or sensitive info being exposed via error messages</li></ul><h4>Example Scenario</h4><p><em>e-shoppe.com</em> just released a new website but forgot to disable the debug mode in production and thus if I visit any page that doesn’t exists, I get back the stack trace and all the available application routes. Not only that, I also get a console in which I can debug things and fire up system commands and thus I have remote code execution on the servers of <em>e-shoppe.com</em>!</p><p>And that’s what can happen if you misconfigure things: ofcourse it’s never advised to enable debug messages or consoles in the production environment. Also, it’s never advised to expose the staging environments to the public unless you have appropriate security checks in-place.</p><p>If you think that you understand the vulnerability in the above scenario, then read on. If not, then it would be quite helpful to learn about the vulnerability first. Else you will be missing on some things…</p><p>One great source that immediately comes to my mind is (you guessed it!) is the <a href="https://owasp.org/www-project-crapi/">OWASP’s crAPI</a>.</p><h3>Pentesting Methodology</h3><p>Now you understand BA well, let’s see how can we hunt for this issue. And more importantly how can we escalate it!</p><p>Now depending on the application, what you would do is: <strong><em>Identify all the available APIs: both development and production.</em></strong></p><p>This would be the most important thing. Because once you know of such APIs then only we can move forward with the exploitation.</p><h4>Exploitation</h4><ol><li>Find all the APIs: both in development and production mode.</li><li>For cloud services, try and see what all permissions you have and see if there are any excessive policies given to you. Same goes for CMS. If you have write access or access to modify your role or create admin users, then that ofcourse it an easy win.</li><li>For the services and applications, see if the OS packages and the libraries being used are properly patched. For instance, if you are using Flask or Django for instance and suddenly a CVE popped up for those libraries then make sure to update their version. Else get prepared to getting pwned!</li><li>See if the APIs are using TLS with strong cipher suites and any unneeded features are disabled. Also look for the security headers like CORS, CSP, Iframe related headers, and so on. If anything seems to be misconfigured then there’s an issue*.</li><li>See if the APIs return back any errors or stack traces. Fuzzing APIs would help here — try sending requests to arbitrary endpoints or send arbitrary parameters and see if anything valuable is returned back in the response.</li><li>If any of the above things worked, then voila! it’s a win.</li><li>If nothing worked, then don’t get disheartened, there’s a next issue that you can look out for — that is — Injection, which is the subject of our next post.</li></ol><p><strong>*Note:</strong> There’s an important point to be noted. Missing CSP or CORS or iframe headers is indeed a risk but not a vulnerability in general. If you don’t have an XSS for instance in a website, then CSP not being there doesn’t do any harm, does it? No right. Therefore it’s important to understand that instead of reporting anything and everything that your tools reports when you go on hunting for bugs.</p><h3>Closing Thoughts</h3><p>I hope that you now understand and are able to exploit <strong><em>Security Misconfiguration</em></strong> vulnerabilities right when you see one!</p><p>One important thing to understand is that be it the traditional Web Apps or be it the APIs, both paradigms suffer from this issue and it’s as common in case of Web Apps as it is in the API world.</p><p>It’s the human error that leads to this issue be it in the form of logic errors that then get discovered and patched or be it in the form of assigning excessive permissions or exposing error messages and stack traces, etc…</p><p>Feel free to spread this article so that more folks can learn about hunting for security misconfigurations in software stacks and API security in general.</p><p><strong>Note:</strong> If you would like to get a pentest or source code review of your web/mobile apps and APIs, and see how really secure they are, feel free to DM me on <a href="https://www.linkedin.com/in/shivambathla/">LinkedIn</a> or check out my <a href="https://shivam-bathla.github.io/">pentesting services</a>. If you know someone who might find value in my work, please refer me. Your support is great appreciated.</p><p>Until next time, keep learning and happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2cfba228254" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pentester Bytes: API Pentesting Methodology — Broken Function Level Authorization]]></title>
            <link>https://medium.com/@shivam_bathla/pentester-bytes-api-pentesting-methodology-broken-function-level-authorization-52f40f3d6e47?source=rss-5d2311c15ae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/52f40f3d6e47</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Shivam Bathla]]></dc:creator>
            <pubDate>Mon, 09 Feb 2026 19:13:28 GMT</pubDate>
            <atom:updated>2026-02-09T19:13:28.071Z</atom:updated>
            <content:encoded><![CDATA[<h3>Pentester Bytes: API Pentesting Methodology — Broken Function Level Authorization</h3><h4>Let me share with you, my methodology for testing Broken Function Level Authorization!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*VTBDCVI2tnCF0TND.jpg" /><figcaption><strong>Image Reference:</strong> <a href="https://apisecurity.io/encyclopedia/content/owasp/api5-broken-function-level-authorization.htm">https://apisecurity.io/encyclopedia/content/owasp/api5-broken-function-level-authorization.htm</a></figcaption></figure><h3>Introduction</h3><p>Most of the <a href="https://owasp.org/www-project-api-security/">OWASP API Security Top 10</a> list is crowded with Authorization issues. So I think it’s important to know the difference between Authentication &amp; Authorization.</p><p>If you already know it, then read on. Else, stop by and check this post out:</p><p><a href="https://medium.com/@shivam_bathla/authentication-and-authorization-for-dummies-1f77567b7c6d">Authentication and Authorization for Dummies</a></p><h3>Why these posts?</h3><p>I think it must be clear now that traditional web applications security is being matched up with the newer paradigm where APIs are ruling the world.</p><p>So the goal with these posts would be to share all you need to up your API Security game and develop a pentesting methodology.</p><p>If that sounds like something up your alley, then stick along with me and we will learn all the methodology for pentesting APIs.</p><h3>Broken Function Level Authorization</h3><p>The name must be self-sufficient, I suppose. This issue happens when the API would allow you to perform the unrestricted operations. The following example should make things clear.</p><h4><strong>Example Scenario</strong></h4><p>Say I have an account at <em>securebank.com</em> and wish to get my account balance.</p><p>And since I am more of a tinkerer, I use an interception proxy like <a href="https://portswigger.net/burp">Burp</a> to see what all requests go through.</p><p>Now I noticed an important thing — when I modified the request from GET to POST, and sent back the balance that I wished to have a.k.a <strong><em>1 million dollars</em></strong>. Sounds less? You can put more but let’s try if it even works my dreamer friend ;)</p><p>Now I get back my account balance after I did update it using the modified request.</p><p>What’s my balance? 1 million dollars? If yes, then hooray, I successfully found a Broken Function Level Authorization bug but more importantly, I am a millionaire now so rest of the things aside. Let me book a great holiday package…</p><p><em>[1 month later]</em></p><p>Let’s resume. So we found a great bug in the <em>securebank.com</em> — A Broken Function Level Authorization, that is, when I can use a functionality or a superpower on an object (which is a fancy way of saying an entity for the application — a user or something like this Medium post for instance) that I shouldn’t have been allowed to do, then that’s Broken Function Level Authorization (BFLA) (You can call it <strong><em>Buffalo</em></strong> since that slips off the tongue more smoothly).</p><p>That cleared, we will now jump on and see the methodology which is the primary focus for these posts.</p><p>If you think that you understand BFLA well, then read on. If not, then it would be quite helpful to learn it first. Else you will be missing on some things…</p><p>One great source that immediately comes to my mind is (you guessed it!) is the <a href="https://owasp.org/www-project-crapi/">OWASP’s crAPI</a>.</p><h3>Pentesting Methodology</h3><p>Now you understand BFLA well. Let’s see how can we hunt for this issue.</p><p>Now depending on the application, what you would do is: <strong><em>Identify what your user can and cannot do.</em></strong></p><p>This would be the most important thing. Because once you know what your user can do and especially what it cannot, then only can you proceed forth.</p><p>And more importantly you should also know what all possible functionality does the application you are pentesting provides. If that’s not clear then stop reading this and find out the powers different users get.</p><p>Once you have identified of the allow and deny list for the user account you own, try and forge the requests and try to perform restricted operations.</p><p>You cannot approve a post but can only get it’s status? Sure try to modify the GET verb to PUT/POST and see if that helps.</p><p>If it does, then you can join the access the unrestricted powers and have fun, since you’ve found BFLA in the API in question.</p><p>Next step would be to find a banking website that is vulnerable and find yourself a great vacation spot (please hack responsibly only if authorized)!</p><p>Now you might be wondering that’s too easy — and yes it is. But there are some things to think on…</p><h4>What if you can’t get a high privileged account for testing purpose?</h4><p>The answer is so simple that you already must have a feeling for it!</p><p>Go and play with the requests: modify the verbs and try using verbs like PUT/POST instead of GET and see if things did worked.</p><p>Since you would be using your account to do all the stuff you don’t need to access the other accounts. If the response indicates success for the restricted operations, that’s pretty much it — a vacation that is!</p><p>Now it should be a smooth sailing:</p><ol><li>Filter out all the requests and try to modify them to perform intrusive and possibly denied operations like account deletion or update details that you are not supposed to modify — like adding yourself to the admin group or modifying your account balance.</li><li>See if you are able to get a successful response and see things in your account — a huge balance or admin functionality being accessible rightaway.</li><li>If the answer is yes, then off you go. Congrats yourself since you found out BFLA! Enjoy, have fun, buy some bitcoins, start a company, go for a trip or just read on…</li><li>If it didn’t worked, then worry not, look for the next issue — that is — Mass Assignment, which is the subject of our next post.</li></ol><h3>Closing Thoughts</h3><p>I hope that you now understand and are able to exploit <strong><em>Broken Function Level Authorization</em></strong> vulnerabilities right when you see one!</p><p>Feel free to spread this article so that more folks can learn about Broken Function Level Authorization and API security in general.</p><p><strong>Note:</strong> If you would like to get a pentest or source code review of your web/mobile apps and APIs, and see how really secure they are, feel free to DM me on <a href="https://www.linkedin.com/in/shivambathla/">LinkedIn</a> or check out my <a href="https://shivam-bathla.github.io/">pentesting services</a>. If you know someone who might find value in my work, please refer me. Your support is great appreciated.</p><p>Until next time, keep learning and happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52f40f3d6e47" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pentester Bytes: IDOR Basics & Pentesting Methodology]]></title>
            <link>https://medium.com/@shivam_bathla/all-about-idors-basics-pentesting-methodology-fbdc73fd736d?source=rss-5d2311c15ae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbdc73fd736d</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Shivam Bathla]]></dc:creator>
            <pubDate>Sun, 08 Feb 2026 17:08:44 GMT</pubDate>
            <atom:updated>2026-02-08T17:10:26.497Z</atom:updated>
            <content:encoded><![CDATA[<h4>Let’s learn all about IDORs in a fun way!</h4><p>IDOR or Insecure Direct Object References is a vulnerability that’s quite interesting to me, because I believe that even a beginner who is very new to infosec and pentesting can find these issues.</p><p>Now, I am not claiming that these issues are very easy to find, but what I am saying is that these issues are very easy to understand and look for.</p><p>Sounds fun? Let’s dive in and learn about them!</p><h3>Introduction</h3><p>What happens to you when you see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S7I3fk0wi9X4gaFIitdBOQ.png" /></figure><p>Does your spider-sense kicks in and urges you to try out this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XPHEAOqf1mdEV3UqhJX9eQ.png" /></figure><p>That is, look for an SQLi?</p><p>Maybe it’s a yes, because that’s what has been wired into our minds as experienced pentesters.</p><p>But today I am going to discuss about what happens when you change the account (or any other parameter for that matter) to something else like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HMo1mhEMsLb0xG-noS8ncQ.png" /></figure><p>Will the application error out? Or will it show us the secrets of the other users.</p><p>Let’s talk about it.</p><h3>Root cause of IDOR: Broken Authentication &amp; Authorization</h3><p>First things first — let’s clear up the confusions on what’s authentication and what’s authorization.</p><blockquote>Why though? I wanna learn IDOR, not the theory…</blockquote><p>Woah woah woah. Hold on… IDOR happens because of broken authentication and authorization and therefore I believe that if you don’t understand the root cause, you would have half-baked knowledge which would definitely hurt more than it would help.</p><p>So let’s learn about the basics — it would be a smooth sailing, I promise :)</p><h4>TL;DR</h4><p><strong>Authentication:</strong> Who you are?</p><p><strong>Authorization:</strong> What can you do?</p><h4>Long Version</h4><p><strong>Authentication:</strong></p><p>When an entity proves its identity, that’s authentication.</p><p>To put it simply, authentication proves you are who you say you are!</p><p>Some examples could be:</p><ul><li>Your driver’s license, having the stamp of a trusted authority proves your identity!</li><li>Your office badge/identity card would be required before you are allowed to enter the office premises.</li></ul><p><strong>Authorization:</strong></p><p>When an entity proves it’s right to access a particular resource, that’s Authorization!</p><p>So authorization proves that you have right to make a particular request to a resource!</p><p>Some examples could be:</p><ul><li>With a regular id card, an employee can only access some rooms and meeting hall but cannot enter the restricted server room.</li><li>With a regular access, a visitor cannot enter the boarding area in the airport. It’s only after they have the boarding pass and verified everything, that they can enter the boarding area :)</li></ul><p>Yet another way to clear things up — see this image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9SestvSJvrLT1caF46DaDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q82qep-RlAbYVRuLR30_fw.png" /></figure><p>Now you must have a better idea on what these 2 concepts are!</p><p>If still not, then head over to this post, dedicated to AuthN and AuthZ:</p><p><a href="https://medium.com/@shivam_bathla/authentication-and-authorization-for-dummies-1f77567b7c6d">Authentication and Authorization for Dummies</a></p><p>Back to the main topic now — are you all ready for the FUN?</p><h3>What’s IDOR?</h3><p>Can you:</p><ul><li>get the details of your or other user’s account without logging in?</li><li>get the details of other user’s accounts after logging into your account?</li><li>update the details of your or other user’s account without logging in?</li><li>update the details of other user’s accounts after logging into your account?</li></ul><p>If the answer to any of these question is yes, then it’s a clear IDOR!</p><p>Now can you see a pattern?</p><p>The 1st and 3rd points correspond to Broken Authentication and the 2nd and 4th points correspond to Broken Authorization.</p><p>Ofcourse these cases might sound like too basic but history has proved that these are quite prevelant issues.</p><p><a href="https://hackerone.com/hacktivity?querystring=IDOR">Feel free to check yourself</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P3MoA85JdJhEv05xNcjVuw.png" /></figure><h3>Code Patterns responsible for IDOR</h3><p>Great! You now understand what IDOR is and why it happens, let me show you a vulnerable code pattern (a generic one) to make things much more clear:</p><pre>...<br>acct = request.args.get(&quot;acct&quot;)<br>user_info = get_user(acct)<br>...</pre><p>The user-supplied input like account id (acct) in this case comes in the request and the server trusts it to provide back the user details.</p><p>And that’s where things go wrong!</p><p>Don’t ever trust user-input folks — history has proved that time and again.</p><p>All the injection issues (SQLi, Command Injection, SSTI, XSS, HTML Injection, Host Header Injection), Open Redirects, Parameter Tampering, HTTP Parameter Pollution, etc… all happen due to this very same mistake — trusting the user-supplied input.</p><h3>The Fix</h3><p>So what’s the fix you may ask.</p><p>It’s as easy as:</p><pre>...</pre><pre>acct = get_user_acct(request.headers[&quot;token&quot;])</pre><pre>user_info = get_user(acct)</pre><pre>...</pre><p>Getting the account id from the user’s cookies or (JWT) tokens.</p><p>This would provide more credibility and safeguard your applications from this issue of IDOR.</p><p>But ofcourse the assumption here is that the tokens or cookies are tamper-proof. Else an attacker can forge the tokens or cookies and perform this attack.</p><p>As an added defense, you can even use UUIDs for the account numbers so that they are hard to guess, making the lives of attackers more harder.</p><p>Ofcourse this is not a well-rounded defense since it relies on the fact that the UUIDs would stay hidden but another attack like SQLi or some data leaks can get this information quite easily. But again, as an added defense this serves quite well.</p><h3>Playing Blind with IDORs?</h3><p>Now let’s say you found an IDOR in an application which allows you to update the details of another user, but you cannot get the details for them.</p><p>Then this is essentially a blind IDOR right. So how would you go about confirming this?</p><p>Ofcourse don’t say that you would ask the victim if things were affected xP</p><p>In these cases, you can try out this attack on 2 accounts that you own, atleast that’s what I do.</p><p>So if I have to make any modifications or data retrieval, I already know what would be my account ID for the victim account and thus I can see if there are any IDORs lying around for me.</p><h3>Hunting for IDORs</h3><p>Want to hunt for IDORs without any legal implications and drama. Instead set up some vulnerable lab environment like <a href="https://owasp.org/www-project-juice-shop/">OWASP JuiceShop</a> and try it there. Or <a href="https://shivam-bathla.github.io/">reach out</a> and I can help you build a CTF / cyber range as per your requirements.</p><h3>Closing Thoughts</h3><p>Hopefully this was all the motivation and inspiration and the knowledge that you needed to hunt for your very first IDOR.</p><p>Feel free to spread this article so that more folks can learn about IDORs and find the low-hanging issues.</p><p><strong>Note:</strong> If you would like to get a pentest or source code review of your web/mobile apps and APIs, and see how really secure they are, feel free to DM me on <a href="https://www.linkedin.com/in/shivambathla/">LinkedIn</a> or check out my <a href="https://shivam-bathla.github.io/">pentesting services</a>. If you know someone who might find value in my work, please refer me. Your support is great appreciated.</p><p>Until next time, keep learning and happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbdc73fd736d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Osquery at Scale: A Practical Infrastructure]]></title>
            <link>https://medium.com/@shivam_bathla/osquery-at-scale-a-practical-infrastructure-dad548b11fd7?source=rss-5d2311c15ae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/dad548b11fd7</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[data-lake]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Shivam Bathla]]></dc:creator>
            <pubDate>Sat, 07 Feb 2026 17:00:03 GMT</pubDate>
            <atom:updated>2026-02-07T17:00:03.107Z</atom:updated>
            <content:encoded><![CDATA[<h4>Let’s see how Osquery can be used in a production environment. We will see the bigger picture and all the puzzle pieces.</h4><h3>Introduction</h3><p>Osquery is a great OS instrumentation framework, but more often than not the scale is where the problem of endpoint security arises. So, the main problem at hand is not managing of a <strong>single machine</strong> but <strong>thousands of servers</strong> constituting of both <strong>Windows</strong> and <strong>Linux</strong> machines. And that’s where it becomes important to scale things.</p><p>And that’s what this post will address — how we can scale osquery and how the giants in the industry are using osquery at scale, for their endpoint security needs.</p><h3>Scaling Osquery</h3><h4>Step #1: Data Collection and Aggregation</h4><p>Osquery is an endpoint agent which is capable of pushing logs to the remote sources over TLS (using the appropriate plugins like <strong><em>tls</em></strong>), thus making it quite extensible. It provides built-in logger plugins for <em>filesystem</em>, <em>tls</em>, <em>syslog</em>, <em>windows_event_log</em>, <em>kinesis</em>, <em>firehose</em>, and <em>kafka_producer</em> out of the box.</p><p>And thus, you can push your logs to remote servers, S3, Kafka, Kinesis, ELK/Splunk, etc. which can then work on this data.</p><h4>Step #2: Data Analytics</h4><p>Osquery can act as a plug and play system where it can generate the logs for the relevant activities you wish to monitor — processes, networks, sockets, open files, file hashes, users, and so on…</p><p>The logs generated by Osquery are not enough on its own to provide any insights — it is as good as raw data sitting in your premise or on the cloud. To really get something out of it, you have to aggregate these logs from all of your servers and feed those to the analytics engine to make sense out of it and give you back some insights based on that analysis.</p><p>That is how the practical endpoint security infrastructures are build — they combine all the logs via a log pipeline and then use threat intelligence feeds from various reliable sources and apply that to the data. Then this information is ready for querying about threat hunting, IoCs, and endpoint monitoring in general.</p><h3>Practical Endpoint Security Infrastructure</h3><p>Let me show you the bigger picture of which Osquery is just a small part:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KYk_K46IorXYMlcOAXXWmQ.png" /><figcaption><strong>Source:</strong> <a href="https://www.youtube.com/watch?v=q3uZPI6Ki14">https://www.youtube.com/watch?v=q3uZPI6Ki14</a></figcaption></figure><p>This is what a <strong><em>Practical Endpoint Security Infrastructure</em></strong> would look like.</p><p>Osquery agent would collect the data and push it over to a remote location where the data would be aggregated and then analytics would be performed on the aggregated data to get insights and see if servers are secure or have any IoCs etc.</p><p>If we zoom in, then you would find the following flow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VfNSH1kGSoQTAsColPDKFw.png" /><figcaption><strong>Source:</strong> <a href="https://www.youtube.com/watch?v=q3uZPI6Ki14">https://www.youtube.com/watch?v=q3uZPI6Ki14</a></figcaption></figure><p>So the data once collected is aggregated. It can be sent to S3, Kinesis, Kafka, or even to remote fleet managers where one can run ad-hoc queries at real time.</p><p>The aggregated data is useless as long as some analysis is performed and that’s where the threat intel feeds come in: one can use different data sources to get such feeds and see if any of the IoCs are there in the aggregated logs.</p><p>Also, data can be pushed over to SIEM solutions like Splunk or even Graylog and ELK to set up alerts and dashboards for any suspicious activities on the server under inspection.</p><p>Once the pipeline is set and the data has been analyzed to give back the threat intelligence, you can perform threat detection, incident response, FIM and vulnerability detection, all using this processed data.</p><p>Fascinating isn’t it. That’s all the puzzle pieces at one place.</p><h3>Conclusion</h3><p>I hope you understood how Osquery fits in the bigger picture and how <strong><em>Practical Endpoint Security Infrastructure</em></strong> looks like.</p><p>If you think this is something up your alley, then why not learn more deeply on the subject.</p><p>If all this seems interesting to you, then stay tuned as I will be sharing more insightful content in the coming days on Osquery.</p><p>Whether you are a developer, pentester, SOC, or security enthusiast, you would definitely get a great value out of these posts.</p><p>Looking forward to having you onboard and learning GraphQL with me.</p><p><strong>Note:</strong> If you would like to get a pentest or source code review of your web/mobile apps and APIs, and see how really secure they are, feel free to <a href="https://shivam-bathla.github.io/">check my website</a> or DM me on <a href="https://www.linkedin.com/in/shivambathla/">LinkedIn</a> and we can discuss. If you know someone who might find value in my work, please refer me. Your support is great appreciated!</p><p>Until next time, keep learning and happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dad548b11fd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pentester Bytes: The most common GraphQL Bug]]></title>
            <link>https://medium.com/@shivam_bathla/pentester-bytes-the-most-common-graphql-bug-424cadb541bd?source=rss-5d2311c15ae2------2</link>
            <guid isPermaLink="false">https://medium.com/p/424cadb541bd</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[Shivam Bathla]]></dc:creator>
            <pubDate>Fri, 06 Feb 2026 13:39:09 GMT</pubDate>
            <atom:updated>2026-02-06T13:39:09.436Z</atom:updated>
            <content:encoded><![CDATA[<h4>Let me reveal the most common bug found in GraphQL-powered APIs!</h4><h3>Introduction</h3><p>GraphQL is such a great API paradigm that came out of Facebook and it’s relatively newer to paradigms like REST but in terms of adoption, it has achieved great success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*h9qWgCe1xd4dXlX9pMEdTA.png" /><figcaption><strong>Source:</strong> <a href="https://graphql.org/users/">https://graphql.org/users/</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*7hzdHw8duNltPMcSQt0oZQ.png" /><figcaption><strong>Source:</strong> <a href="https://graphql.org/users/">https://graphql.org/users/</a></figcaption></figure><p>Feel free to <a href="https://graphql.org/users/">check for yourself</a>.</p><p>And since it’s that popular, it makes sense for you as a pentester or a bug hunter to learn about it so that you can effectively pentest GraphQL APIs too.</p><p>By the way, GraphQL has a steep learning curve and thus getting into GraphQL pentesting is not a straight road to success like you would have had with REST APIs.</p><p>GraphQL comes with its own set of concepts and terminology and if you don’t know those things, you would have a hard time getting much value out of your pentests.</p><p>Worry not, I am going to share the solution too: We have just released a new course on <strong>Pentesting GraphQL APIs</strong> that will teach you everything right from the start and help in making you a better GraphQL API pentester.</p><h3>The most common bug</h3><p>Now as promised, let’s touch upon the most common issue that a GraphQL-powered API might have, wait for it… It’s <a href="https://www.youtube.com/watch?v=1vaXTqJGNIc">IDOR</a>!</p><p>Believe me or not, I’ve looked up on all the bugs reported for GraphQL on <a href="https://www.hackerone.com/">HackerOne</a> and most, if not all were <a href="https://www.youtube.com/watch?v=1vaXTqJGNIc">IDORs</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zPyFejgz6JZ65Vv2.png" /></figure><h4>Why IDOR?</h4><p>One of the reasons is that when developers get their hands on new stuff, which relieves some of their pain points, they tend to assume certain things which can ofcourse lead to issues. And also, many developers don’t even read the documentation.</p><p>Now this might not be true for all the developers but since this issue is quite predominant, it indeed is something that’s been overlooked quite a lot!</p><p><a href="https://graphql.org/learn/authorization/">GraphQL docs</a> clearly specify things:</p><blockquote>Delegate authorization logic to the business logic layer</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*v5MZKQdjUK4BzHHG471ltg.png" /><figcaption><strong>Source:</strong> <a href="https://graphql.org/learn/authorization/">https://graphql.org/learn/authorization/</a></figcaption></figure><p>It’s clearly mentioned that it’s your headache to deal with the authorization and thus when things are assumed, it creates a false sense of security and these issues happen.</p><p>Another reason for this issue being on top is the inherent nature of APIs in general.</p><p>APIs used by something internal to the applications and when they are exposed to the public, without taking security measures, the Authentication and Authorization bugs happen! [AuthN v/s AuthZ post here]</p><p>Also, if you check the <a href="https://owasp.org/www-project-api-security/">OWASP API Security Top 10</a> page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LxspTCYuWf0sbW7a0QAHsw.png" /><figcaption><strong>Source:</strong> <a href="https://owasp.org/www-project-api-security/">https://owasp.org/www-project-api-security/</a></figcaption></figure><p>Notice that the there are 3 issues in top 5 that are Authentication and Authorization related.</p><p>And by the way, even the others in the above list (that is, all the Top 6 issues) are due to broken Authentication and Authorization, in a way.</p><p>So now IDOR being the most common GraphQL API bug should make much more sense yeah?</p><h3>Closing Thoughts</h3><p>I hope this post gives you some direction while you pentest GraphQL-powered APIs.</p><p>And since IDOR is quite easy and most common issue in GraphQL APIs (as we just discussed), your success rate on finding a bug would definitely be much more!</p><p>If all this seems interesting to you, then stay tuned as I will be sharing more insightful content in the coming days on pentesting GraphQL APIs.</p><p>Whether you are a developer, pentester, security enthusiast, you would definitely get a great value out of these posts.</p><p>Looking forward to having you onboard and learning GraphQL with me.</p><p><strong>Note:</strong> If you would like to get a pentest or source code review of your web/mobile apps and APIs, and see how really secure they are, feel free to DM me on <a href="https://www.linkedin.com/in/shivambathla/">LinkedIn</a> and we can discuss. If you know someone who might find value in my work, please refer me. Your support is great appreciated.</p><p>Until next time, keep learning and happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=424cadb541bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>