<?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 Liv on Medium]]></title>
        <description><![CDATA[Stories by Liv on Medium]]></description>
        <link>https://medium.com/@terminatorLM?source=rss-edca9d248b05------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*br-muruAHEmBVxtWNnZKXQ.png</url>
            <title>Stories by Liv on Medium</title>
            <link>https://medium.com/@terminatorLM?source=rss-edca9d248b05------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 12:23:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@terminatorLM/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[Abusing Facebook’s feature for a permanent account confusion (logic vulnerability)]]></title>
            <link>https://medium.com/@terminatorLM/abusing-facebooks-feature-for-a-permanent-account-confusion-logic-vulnerability-d7f5160f373a?source=rss-edca9d248b05------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7f5160f373a</guid>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Liv]]></dc:creator>
            <pubDate>Tue, 31 May 2022 16:16:48 GMT</pubDate>
            <atom:updated>2022-05-31T16:19:47.837Z</atom:updated>
            <content:encoded><![CDATA[<h3>Abusing Facebook’s feature for a permanent account confusion(logic vulnerability)</h3><p>TLDR; Logic vulnerability on Facebook led to 2FA bypass/denial of service by locking users to login into the attacker’s controlled account forever</p><p><strong>Introduction<br></strong>Hey, it’s Liv again. I had 2 days off work and I decided to research Facebook! While researching Facebook&#39;s main domain, I noticed that the signup functionality acts like a login functionality which was weird to me and caught my eye as an attacker.</p><p>After signing up and logging in a couple of times I noticed Facebook uses a typo detection feature to help users log in to their accounts more easily.<br>While researching this feature, I stumbled upon this page that explains this <strong>“Fuzzy login”</strong> feature and I verified it’s intended-</p><blockquote><a href="https://m.facebook.com/whitehat/education/false-positives/#fuzzymatch">https://m.facebook.com/whitehat/education/false-positives/#fuzzymatch</a></blockquote><p>The fuzzy logging is implemented for years and is well documented, sounds like a tough challenge, I like challenges.</p><p><strong>Figuring it out</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*uMHZ9tuK9cVISCFtop97AQ.png" /><figcaption>Facebook’s signup</figcaption></figure><p>Signing up with an already used email and a wrong password I noticed I get redirected to the recover password page. The behavior described above lets me enumerate existing emails attached to accounts (which can be considered a vulnerability, worth noting).</p><p><strong>Getting into business<br></strong>I tried to figure out the fuzzy logging behavior by playing with the email parser adding {}, dots,%20 to the email I sign up with, and found something odd. When signing up an account with 2 nearly identical emails and identical passwords- One account logins to the second account due to the fuzzy login.</p><p>The research consisted testing scenarios of the account confusion possibility and how the logic works:<br>- The date of birth, first and last name do not impact the behavior of the vulnerability.<br>- Tested different emails with the same password to login through the signup functionality:<br>For example, <strong>hunter1231@gmail.com </strong>will simulate the victim.<br>Signing up with the following emails provided the account confusion- <strong>hunt</strong>1231@gmail.com<br><strong>hh</strong>unter1231@gmail.com- The double character scenario works for all scenarios/edge cases (not only for this specific example)<br>hunter1231@<strong>protonmail</strong>.com</p><p>Therefore, an attacker can target an account and signup with a nearly identical email and the same password as the target, then, every time the victim logins in to his account- the account confusion will happen and he will log in to the account of the attacker <strong>forever </strong>until contacting with Facebook.</p><p>Attackers can use the account confusion vulnerability to leverage an attack and use it as a privilege escalation technique.<br>In a scenario an attacker has compromised a user’s account but is unable to pass the 2FA stage- most chances he can not do anything impactful to the victim security-wise.</p><p>Although, with the vulnerability, attackers can disable victims from logging into their accounts forever.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q316WwffIaY3i6nejSU4Cg.png" /><figcaption><strong>Attacking the victim’s test account after suspending my attacker’s account on purpose</strong></figcaption></figure><p><strong>Concluding attack scenarios and impact<br></strong>- Denial of service by disabling the attacker’s account beforehand and confusing the victim to login into the attacker’s disabled account. Full disable of the victim&#39;s account which can not be restored until contacting with the Facebook team.<br>- Phishing victims by creating a mimic of their account, then watch their activity and private data by logging into the same account later on and checking the activity log and even payment methods added.<br>- Ransomware attacks claiming their user has been compromised, in order for it to be unlocked- do 1,2,3.<br>- Such as login CSRF vulnerabilities, can also weaponize Self XSS.</p><p>Thank you for reading, Feel free to dm me on twitter- <a href="https://twitter.com/terminatorLM"><strong>https://twitter.com/terminatorLM</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7f5160f373a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NahamCon CTF 2022- DeafCon (Web- Hard)]]></title>
            <link>https://medium.com/@terminatorLM/nahamcon-ctf-2022-deafcon-web-hard-cf2b9aca3a83?source=rss-edca9d248b05------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf2b9aca3a83</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ssti]]></category>
            <category><![CDATA[nahamcon]]></category>
            <dc:creator><![CDATA[Liv]]></dc:creator>
            <pubDate>Sun, 01 May 2022 18:19:05 GMT</pubDate>
            <atom:updated>2022-05-01T18:19:20.256Z</atom:updated>
            <content:encoded><![CDATA[<h3>NahamCon CTF 2022- DeafCon (Web Hard)</h3><p><strong>TLDR; SSTI without spacebars with a Unicode normalization bypass</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5cg8pD3wJot1SmSxFXNrIg.png" /></figure><p>Get ready for the 2022 DeafCon? Sounds interesting!<br>Cool, so what have we got here? Username and email inputs are sent in a POST request to a PDF generator which generates our lovely ticket:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2E__6TTwaYHgUiOUHGXo8Q.png" /></figure><p>Ahhh… PDF generators! What can go wrong?</p><p>In some PDF generators like wkhtmltopdf and weasyprint, It’s possible to inject server-side XSS and escalate it to SSRF/Reading Files from the server. I knew this trick beforehand, so server-side XSS is the first thing that came to my mind.</p><p>My go-to attack flow was injecting &lt;script&gt;document.write(1)&lt;/script&gt; to check if it is rendering the XSS and outputting 1. From there I could escalate to SSRF with an &lt;iframe&gt; tag and maybe even get the flag through file:// protocol. Unfortunately, the CTF is rated hard, and for a reason:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*1c4lGWTVe-7EjMEIcZSIbA.png" /><figcaption>&lt;&gt; are blocked by a regex specified in RFC5322</figcaption></figure><p>I thought about email bypasses, some parts of emails are marked as tags and I may slip in a payload there that will be ignored by the mail server.<br>For example-</p><blockquote>terminator+{payload}@mymail.com, terminator-(payload)@mymail.com</blockquote><p>In the example above, the characters + - () and {} can be used for tagging on some occasions.</p><p>None of the email bypasses worked and I got blocked again with a different 400 message saying:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m8DSL7GkstR4ih6FBw5XyA.png" /></figure><p>This specific error led me to the thought of regex bypasses to inject the XSS. I tried some of the common ones- CRLF injection, Parameter pollution, is the WAF using startswith or endswith? Is it using a recursive check?<br>I have tried enough of those and started to think maybe I’m in a <strong>rabbit hole</strong>.</p><p><strong>Rewind to escape the awful rabbit hole<br></strong>Left the XSS aside, I tried command injection and SSRF through the email parameter and it did not work.</p><p>I was thinking of more attack paths, then thought about what can a PDF generator and email parser be vulnerable to, SSTI (Server Side Template Injection).<br>I knew it was it at the moment I thought about it, it matches with the email RFC, and has a severe impact which may lead to solving the CTF.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qLGcateKFcFDiYKYRXfdsA.png" /><figcaption>SSTI POC {{8*8}} resolves to 64</figcaption></figure><p>It worked, I can’t believe I was stuck on the XSS attack path for so long.<br>SSTI is the way to go, but as you might remember- parenthesis are not allowed!<br>I started my SSTI enumeration and noticed it’s a Jinja2 Python’s template engine, which makes sense.</p><p>*What can we do with an SSTI without parenthesis you asked? A lot but can’t execute commands ☹<br>*<strong>What can we do with an SSTI after bypassing the parenthesis check you asked? Execute commands and get the flag😊</strong></p><p><strong>Unicode normalization<br></strong>I was trying a lot of filter bypasses, It’s a blackbox approach after all so you never know what can work on the backend side.<br>Later on, after a couple of tries, I noticed that some special characters are getting parsed and normalized when generated by the PDF generator.</p><p>By reading about some filter bypasses, I stumbled upon a Unicode normalization filter bypass which I knew existed before but did not try yet. Seems like it should work and bypass the parenthesis check, as I noticed before, special characters are normalized after the PDF generation.</p><p>Injecting the final SSTI payload with the Unicode normalized parenthesis, I got RCE!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_7XTNkj8PGSLM45azH3PiQ.png" /><figcaption>Executing ‘id’ command</figcaption></figure><p><strong>SSTI Weaponization without spacebars<br></strong>Another problem is that RFC-5322 does not accept <strong>spacebars</strong> in the email regex. What we can do to get around this obstacle is pop a <strong>web shell</strong>, then pass any command we want to execute into it and get the flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oOU_HgNI4tXRMOHurXQGAQ.png" /><figcaption>Flag acquired!</figcaption></figure><p><strong>Key takeaways –<br></strong>-Blackbox is hard!<br>-Don’t give up fast, but also try other ways and attack paths<br>-CTFs are fun and a good learning experience 😊</p><p><strong>Nice to know references -<br>- </strong>Unicode normalization cheatsheet-<br><a href="https://appcheck-ng.com/wp-content/uploads/unicode_normalization.html">https://appcheck-ng.com/wp-content/uploads/unicode_normalization.html</a><br><strong> - </strong>Ben Sadeghipour (Nahamsec)- Owning The Cloud Through Server Side Request Forgery- DEF CON 27 Conference- <br><a href="https://www.youtube.com/watch?v=o-tL9ULF0KI">https://www.youtube.com/watch?v=o-tL9ULF0KI</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf2b9aca3a83" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Small bugs are more dangerous than you think]]></title>
            <link>https://medium.com/@terminatorLM/small-bugs-are-more-dangerous-than-you-think-9411618191ab?source=rss-edca9d248b05------2</link>
            <guid isPermaLink="false">https://medium.com/p/9411618191ab</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Liv]]></dc:creator>
            <pubDate>Fri, 01 Apr 2022 14:50:41 GMT</pubDate>
            <atom:updated>2022-11-29T14:46:04.706Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*KF0NUciLAkW6szA-k8PyJg.jpeg" /></figure><blockquote>Hello hackers, I am Liv, a web security researcher and a full-stack developer.</blockquote><p><strong>The useless open redirect<br></strong>Let’s cut straight to the chase, I was presented with a stock marketing target which seems pretty strange at first glance at the login page -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uVLWB5L8OKHsbA_51Cy-YA.png" /></figure><p>If you are familiar with Open Redirects vulnerability, it would be intriguing for you to see the Remote Page Layout URL Redirect input at first.<br>Well… not so easy -<br>I started testing by putting some URLs in the input to test the behavior of the functionality, is there a whitelist of approved URLs? or is it just straightforward no filter redirect to any website I want.<br>After some testing, it seems like nothing is there, the page is not redirected after logging in, no nothing!</p><p>I moved on and tried to test for the other parameters, then I figured out an odd behavior. When putting any character which is not null in the field Remote Page Layout URL, combined with the Redirect field, I got an open redirect when logging in.</p><p>Ok, nice, very strange and weird, but nice! When trying to escalate further, seems like the web application returns an error code in the GET parameter as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eFOHfjmeUkhWAYBNjaAr0Q.png" /><figcaption><strong>PII is not leaked</strong></figcaption></figure><p>*javascript:alert() did not work either :(</p><p>I tried to put the variables with the payload in the URL to craft an open redirect phishing link to send, but again this strange target did not reflect the value from the GET parameter to the HTML input even after testing the JS, HTML, and debugging it. Useless open redirect with no way to even pass it to other users?<br>Not quite, stay with me.</p><p><strong>Stored XSS, but a selfish one<br></strong>Later on, I tested the nickname input field for XSS, again, GET params does not reflect on the login page. I tried injecting the payload and search for a second-order XSS on the index page after logging in. Unfortunately, all the inputs seemed filtered or HTML encoded but wait a second… I went back to the login page for more testing and I saw something interesting!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZyTeoFCMFAzuJPQSLgcTHA.png" /></figure><p>The nickname parameter is not sanitized, and even better, it is stored on the server after logging in. Let’s fix the payload and execute XSS -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*87Ipic3CeiuPhVigyuU_Eg.png" /><figcaption><strong>“&gt;&lt;script&gt;print()&lt;/script&gt;</strong></figcaption></figure><p>We got a Stored XSS this is it right?<br>1. Self Stored XSS :(<br>2. The XSS fires only when the user navigates back to the login page which can be good to steal his cookies after he logged in but not so doable.</p><p><strong>Chaining bugs for the win<br></strong>And then it hit me… What if I combine a Login CSRF (This type of CSRF is usually not protected due to the nature of the attack), the open redirect I found before, and the Stored XSS all together?<br>It goes like this:<br>1. The victim enters my website, POST Login CSRF is fired automatically with the open redirect payload in it, and the XSS payload.<br>2. The open redirect payload is the login page of the website.<br>3. Victim logins to the website, redirected after logging in back to the login page and the XSS executes instantly.</p><p>I talked with my fellow partner <a href="https://medium.com/u/9a3bd0786a69">Osher Zbadi</a> to make it happen together and we coded a POC.<br>Remember the error code from the redirect before?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VPmzKVw_b3jq2tBs_KwlXg.png" /></figure><p>The attack failed. We were very disappointed but there is no way I am giving up on this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*BIzDW0XBVFMo9BoD0Bd_-g.gif" /></figure><p><strong>Tricking the parser<br></strong>We thought about how can we bypass this error code, the point is I control the redirect URL. The error code is added as a GET parameter, what if I add a fragment at the end of the open redirect URL to make the server ignore the error code when parsing the URL?<br>For those of you who are not familiar- “A fragment is an internal page reference, sometimes called a named anchor. It usually appears at the end of a URL and begins with a hash (#) character followed by an identifier.”<br>This trick can work because the browser ignores everything after the fragment is declared in the URL.</p><p>Therefore, the server interprets the URL as a regular login URL, the saved parameters with the XSS are returned as a response from the server and the XSS executes :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*-1-I2El9lU6Sj6fSK0Rrtw.gif" /><figcaption>Note: The CSRF can be automatically executed by auto submit</figcaption></figure><p>Me and <a href="https://medium.com/u/9a3bd0786a69">Osher Zbadi</a> were so happy to see it worked!<br>We reported it to the target and it got fixed ASAP.</p><p><strong>Considering the final impact and a key takeaway<br></strong>The website uses HTTP basic authentication, so if the victim is logged in, attackers can potentially restrict him from logging in by redirecting him every time he enters the login page. Also, stealing his cookies and even popping up an iframe to make a clickjacking attack or phishing the HTTP basic auth creds.</p><p>The key takeaway to take from this writeup is to never underestimate a low severity bug, sometimes it can be escalated by chaining it with other bugs and getting you a bounty or a smile on your face.</p><p>Thank you for your time reading my writeup, I hope you learned something new or at least had a smile or two (see what I did there?)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9411618191ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>