<?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 P4ndish on Medium]]></title>
        <description><![CDATA[Stories by P4ndish on Medium]]></description>
        <link>https://medium.com/@etpandish?source=rss-15b789e5ca62------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XbDgd7vHg4kKCOIh71c9bA.jpeg</url>
            <title>Stories by P4ndish on Medium</title>
            <link>https://medium.com/@etpandish?source=rss-15b789e5ca62------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 22:23:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@etpandish/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[(Sibari) challenge writeup Ethio Cybersheild CTF-2023]]></title>
            <link>https://etpandish.medium.com/sibari-challenge-writeup-ethio-cybersheild-ctf-2023-756bb2b3fe02?source=rss-15b789e5ca62------2</link>
            <guid isPermaLink="false">https://medium.com/p/756bb2b3fe02</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[web-hacking]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[P4ndish]]></dc:creator>
            <pubDate>Mon, 28 Aug 2023 18:13:11 GMT</pubDate>
            <atom:updated>2023-09-06T13:09:29.660Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8zfEVpVpkqdkTiWy5YC0GQ.png" /></figure><p>Hey there, let’s solve our web challenge with a sibari heart 😭😂.</p><ul><li><em>looking at the website it’s a blog site with registration, login and to view add.. personal blogs.</em></li><li><em>let’s register and login while doing so testing for sqli seems not possible. after that we get “phpsessid” cookies which tells us php is running and we can write our own blog posts.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OCdst1dXw6BDDoDC6vxbyA.png" /></figure><ul><li><em>so testing for xss also doesn’t work when adding blogs, so playing around we see we have password reset functionality and viewing source page we get a user called </em><em>temu which might be a user.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*-7A7poudg6FjgYsHCAdbNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*S_XGevQaK9Ke79XBqq3aUw.png" /></figure><ul><li><em>let’s try to reset others accounts password, but first let’s try to change ours and grab the request then we will try it with </em><em>temu.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_gS4Lt5-_j0FpfCzgQ9tlg.png" /><figcaption><em>original request</em></figcaption></figure><p><em>let’s modify the username part and change it to </em><em>temu like this</em></p><pre>curl &#39;http://URL/dashboard/index.php&#39;   -H &#39;Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8&#39;   -H &#39;Accept-Language: en-US,en&#39;   -H &#39;Cache-Control: max-age=0&#39;   -H &#39;Connection: keep-alive&#39;   -H &#39;Content-Type: application/x-www-form-urlencoded&#39;   -H &#39;Cookie: session=a9dda98a-0da9-4a1e-aba7-154b26dea70d.keDpukJOGEhiy6MJwyxMLLFI15M; PHPSESSID=1mvknmof2mngaiikbua60kojj3&#39;   -H &#39;Origin: http://167.71.37.240:32795&#39;   -H &#39;Referer: http://167.71.37.240:32795/dashboard/index.php&#39;   -H &#39;Sec-GPC: 1&#39;   -H &#39;Upgrade-Insecure-Requests: 1&#39;   -H &#39;User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36&#39;   --data-raw &#39;username=temu&amp;newPass=test1&#39;   --compressed   --insecure</pre><p><em>then trying to login as </em><em>temu:teset1 we successfully can login. now what?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PEgtV6AaZrlOHwG7fOD74g.png" /></figure><p><em>we can see that </em><em>temu is a moderator and he posted that they “integrted their api to their micro services”. and also viewing the source tab we get some hints indicating the api path “TODO: this filed is for /api/v1 “</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*M8OZgF8I5_J8jAGpzbKUoA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OyGR16ju9-A5vFwVrl-ugw.png" /></figure><ul><li><em>viewing </em><em>/api/v1 gives 403, let’s try to bruteforce it. lucky for us </em><em>api/v1/users.json returns some juicy results😁</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*5ap4xCUwMma0o2FASKt_8Q.png" /></figure><p><em>let’s login as admin. and boom we get the flag</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LCELSNNXWzwlAFqHPh_EFw.png" /></figure><p><em>Thanks for reading happy hacking.</em></p><p>challenge link: <a href="https://github.com/yekolotemari/Ethiopia_CyberShield_Showdown/tree/main/Web/Sibari">Github</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=756bb2b3fe02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(Fekfaki) challenge writeup Ethio Cybersheild CTF-2023]]></title>
            <link>https://etpandish.medium.com/fekfaki-challenge-writeup-ethio-cybersheild-ctf-2023-5fbd7feac0d2?source=rss-15b789e5ca62------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fbd7feac0d2</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cve-2023-24329]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[exploit]]></category>
            <dc:creator><![CDATA[P4ndish]]></dc:creator>
            <pubDate>Mon, 28 Aug 2023 14:19:44 GMT</pubDate>
            <atom:updated>2023-09-06T13:08:03.756Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UQyRGI9Fwc2JMCGHt8mf0A.jpeg" /></figure><p>Hey there, let’s solve our challenge.</p><blockquote>looking at the website we only have one functionality and seeing what’s the technology behind it we see that we are running flask with python 3.9.2</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*E31pCaKpdHoIopL52j4Qsw.png" /></figure><ul><li><em>Trying every possible exploit’s out there about flask, werkzeug seems to be not working. Let’s play with the one hope we have </em>🥺</li><li><em>The input only accepts urls and returns the given url html after fetching, so trying LFI(local file read) with file://, localhost seems to be blacklisted.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i81Yc_cxCwKGaSYgoZuD_w.png" /></figure><ul><li><em>So rule </em><strong><em>#1 break the code and get some errors, </em></strong><em>let’s type random thing and let’s see if it breaks,</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OI09vtMS8bxzcYvr7m54rw.png" /></figure><ul><li><em>now we get some errors</em>😁 and seems urllib <em>a python package seems to not parse the given input </em><em>randomthing because it’s not url formatted.</em></li><li><em>with the given hints we know that it’s latest CVE, we got the errors let’s look for the latest CVE about python or </em><em>urllib .</em></li><li><em>well let’s ask google simply, google “latest cve python” -&gt; click on the first link -&gt; (we see that we got a python3 urllib CVE registered</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_7l3kxhrMp3quaIlDHYpzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oAMIRUr3Vfj5Mo2BPhHFfw.png" /></figure><blockquote><a href="https://www.cvedetails.com/cve/CVE-2023-24329/">CVE-2023–24329</a> as stated in above it have <a href="https://www.cvedetails.com/cwe-details/20/Improper-Input-Validation.html">improper validation </a>which can be bypassed by putting [space] in front of blocked url. recommand you read this blog about the finding <a href="https://pointernull.com/security/python-url-parse-problem.html">Blog</a>.</blockquote><ul><li>we know file:// is block so if we put [space]file://etc/passwd we get our successful result without being blocked as previous.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fij0eNV0y9mlb-nQCTaYDg.png" /></figure><ul><li>now let’s read /opt/flag file :)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jjQdBqhAxuB4RVhlptMb1A.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F5KUOsm8H3O46Y%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F5KUOsm8H3O46Y%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F5KUOsm8H3O46Y%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="332" frameborder="0" scrolling="no"><a href="https://medium.com/media/876106def28046cfadd67c15bb86cad3/href">https://medium.com/media/876106def28046cfadd67c15bb86cad3/href</a></iframe><p>Thanks For Reading, happy hacking.</p><p>github link: <a href="https://github.com/yekolotemari/Ethiopia_CyberShield_Showdown/tree/main/Web/Fekfaki">LINK</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fbd7feac0d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[(be beg bet…) challenge writeup Ethio Cybersheild CTF-2023]]></title>
            <link>https://etpandish.medium.com/be-beg-bet-challenge-writeup-ethio-cybersheild-ctf-2023-9500116fe53?source=rss-15b789e5ca62------2</link>
            <guid isPermaLink="false">https://medium.com/p/9500116fe53</guid>
            <category><![CDATA[web-hacking]]></category>
            <category><![CDATA[ethiopia]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[P4ndish]]></dc:creator>
            <pubDate>Mon, 28 Aug 2023 14:10:37 GMT</pubDate>
            <atom:updated>2023-09-06T13:07:20.794Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qoN3vDKQxob7-lhattREjA.jpeg" /></figure><p>Hey there masterminds, let’s start solving our challenge. challenge link attached at the end.</p><ul><li><em>Looking at the website seems no functionality is there but if we look closley on our network tab, the response header we can see that it’s an express application.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*DQIxe4vz9w3jMllJhZoPWg.png" /></figure><ul><li><em>and view source code we can see that, we have </em><em>manifest.json file linked. browsing it gives us this json handful information,</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*Khwt2I7b-acJKeu-YdRBqg.png" /></figure><ul><li><em>intersting part is the </em><em>path object with have </em><em>&#39;dev’: ‘/stg/get?’ browsing that path give us some something like this,</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*uy13qKkCJJO0hj3sccuBpQ.png" /></figure><ul><li><em>that means it takes a url parameter called </em><em>url adding it to our previous url </em><em>http://url/stg/get?url=test and sending it we can see another hint that says,</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*z6y_Vg_ItIHyQMtk8qNFHA.png" /></figure><ul><li><em>let’s ask ankle google, what’s </em><em>hnzserver is, and we can see that </em><a href="https://www.npmjs.com/package/hnzserver"><em>hnzserver</em></a><em> is npm package was created as to fetch datas from a given url.</em></li><li><em>so if we give it a valid url it returns the html of the given url</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*JgO7J-PNgVAz7zxDmUAYcw.png" /><figcaption>http://url/stg/get?url=<a href="https://google.com/robots.txt">https://google.com/robots.txt</a></figcaption></figure><ul><li><em>so what’s next? let’s see if this npm package has some vulnerabilities in it.</em></li></ul><blockquote><em>luckly there is </em><em>Arbitrary File read on it, that we can read any server files using “</em><strong><em>/../../../../etc/passwd”</em></strong><em> </em><a href="https://security.snyk.io/package/npm/hnzserver/2.0.6"><em>blog link</em></a><em>.</em></blockquote><ul><li><em>we know that we have </em><em>express is running in some port and </em><em>hnzserver running on 8888 by default let’s try crafting the url to read </em><em>/opt/flag.txt . final url looks </em><a href="http://url/stg/get?url=http://localhost:8888/../../../../opt/flag.txt"><em>http://URL/stg/get?url=http://localhost:8888/../../../../opt/flag.txt</em></a><em> and lucky for us we get the flag.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*9SeDs2r6KRSWSABrvwVl9g.png" /><figcaption><a href="http://url/stg/get?url=http://localhost:8888/../../../../opt/flag.txt">http://URL/stg/get?url=http://localhost:8888/../../../../opt/flag.txt</a></figcaption></figure><ul><li>and that wraps it up for this challenge. thanks for reading👍</li></ul><blockquote><strong>m</strong><em>ore about </em><em>manifest.json web app manifest.</em></blockquote><p><em>Challenge link: </em><a href="https://github.com/yekolotemari/Ethiopia_CyberShield_Showdown/tree/main/Web/Be_beg_bet"><em>Github</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9500116fe53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TTS-2023 — Coding challenge walkthrough]]></title>
            <link>https://etpandish.medium.com/tts-2023-coding-challenge-walkthrough-9fd155d5655b?source=rss-15b789e5ca62------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fd155d5655b</guid>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ethiopia]]></category>
            <dc:creator><![CDATA[P4ndish]]></dc:creator>
            <pubDate>Sun, 02 Apr 2023 22:59:29 GMT</pubDate>
            <atom:updated>2023-04-02T22:59:29.788Z</atom:updated>
            <content:encoded><![CDATA[<h3>TTS-2023 — Coding challenge walkthrough</h3><p>challenge name: መመስጠር</p><p>Description:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tVw47AGRlM7SopBIxWJvvQ.png" /><figcaption>Description</figcaption></figure><blockquote><strong>Goal: The FBI needs an efficient method to decrypt messages. Write a function named decrypt(word) that receives a string that consists of small latin letters only, and returns the decrypted word.</strong></blockquote><p>thought process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*u0eRl5huX8TmxczsG4zbGQ.png" /></figure><p>Continuing Following the questions steps…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*moXGcLB4hcPeKsoWUexsGw.png" /></figure><p>Intiusion: so is this steps makes the encryption inorder to decrypt it one must follow the reverse step right? let’s do that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFonkTzT_mkg_EXTQQapFA.png" /></figure><p>after doing so we will get something like this….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3tS_YQcE-dtZDHFiC5LBCw.png" /><figcaption>answer</figcaption></figure><p>here is the final code that can solve this problem set</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XiXL7Pvdq3CUvm6wDVqK9A.png" /></figure><p>Hope you understand, Thanks for reading…</p><p>Github Link: <a href="https://github.com/yekolotemari/tts2023CTF/tree/main/Coding">Challenge_Link</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fd155d5655b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TTS-2023 CTF (AbysinniyaTravel) writeup]]></title>
            <link>https://etpandish.medium.com/tts-2023-ctf-abysinniyatravel-writeup-faf6d3c4ae7a?source=rss-15b789e5ca62------2</link>
            <guid isPermaLink="false">https://medium.com/p/faf6d3c4ae7a</guid>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[ethiopia]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[P4ndish]]></dc:creator>
            <pubDate>Wed, 22 Mar 2023 20:43:21 GMT</pubDate>
            <atom:updated>2023-03-22T20:55:00.767Z</atom:updated>
            <content:encoded><![CDATA[<p>This challenge is all about knowing how authorization and how json web tokens work. <br>challenge link down below</p><p>First time looking at the web</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7hZaMJwHeirnFCgZukWj-Q.png" /><figcaption>homepage</figcaption></figure><p>all links are redirecting to the home page except for ‘signup’ page, then trying to login and signup with the user admin is denied, so we will create new user account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0StIG-0LVJIodxuwinugFQ.png" /><figcaption>trying with admin</figcaption></figure><p>login with another account redirects us to one account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZeHji0hZbqR_v3BNFiGCw.png" /><figcaption>normal user-dashboard</figcaption></figure><p>Our goal is to find the admin-dashboard account, so when looking at the low privledged user there is no link to work with. one thing to note is that there is a cookie set while login in to normal-user account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xvyJ0dL6oM2JwdHJ6oxrOw.png" /><figcaption>burp1</figcaption></figure><p>looks like it’s JWT, decoding it will give us something like this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZIrca-BV16e0rxXJsmk_FA.png" /></figure><p>since we want the admin’s account changing the user account to admin an changing the cookie will also give us some 400 error…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rRTWiEBwmsYn5yQg_JsQ6Q.png" /><figcaption>changing the token username</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HxHLuwBcN2wYj9UiZCtdBg.png" /></figure><p>At this point we only have two choices one bruteforcing the password and cracking the JWT-Token secret-key, and our best way is cracking the jwt-token.<br>To crack the jwt token we will use <a href="https://github.com/ticarpi/jwt_tool">jwt-tool</a>, a great tool to bruteforce and sign jwt tokens</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7N3JFsblwVCMjfXXrhOW7g.png" /></figure><p>signing the key with the secret-key that we found like this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EVGlKVIVDluHVKdPdvOJkA.png" /></figure><p>trying to login with that…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JMHHzA_jd7782ItRn9pwSQ.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FbnhtSlVeo7BxC%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fkanye-cavaliers-cavs-bnhtSlVeo7BxC&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExNWFiNzg3YjY1MjMyMGQ0NWIzYWRiYjA5MzMyMDQ0NGI5ODkwMjVjZCZjdD1n%2FbnhtSlVeo7BxC%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c51fcf4971f1994db183c3f3d95667a/href">https://medium.com/media/2c51fcf4971f1994db183c3f3d95667a/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o5jK0OWzEUgHnBxoJ7ZiQA.png" /><figcaption>admin-dashboard</figcaption></figure><p><strong>boom. you solved it.</strong></p><p><strong>Reference: </strong><a href="https://book.hacktricks.xyz/pentesting-web/hacking-jwt-json-web-tokens"><strong>jwt security hacktricks</strong></a></p><p><strong>Github link:</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=faf6d3c4ae7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Felega — HackFest’22 Writeup]]></title>
            <link>https://etpandish.medium.com/felega-hackfest22-writeup-cfaf4449335b?source=rss-15b789e5ca62------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfaf4449335b</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[P4ndish]]></dc:creator>
            <pubDate>Wed, 21 Dec 2022 19:09:20 GMT</pubDate>
            <atom:updated>2022-12-21T19:09:20.108Z</atom:updated>
            <content:encoded><![CDATA[<h3>Felega — HackFest’22 Writeup</h3><p>catagory: web</p><p>As always, looking at the page we get a login page and trying the common password combination gives us invalid login .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7leKZFCTmhNG4iemEwPZg.jpeg" /></figure><p>lightweight bruteforcing the page we get /robots.txt which gives us base64 string and decoding it we get cred: dev1:p4Ssw0r3d@dev</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*_62IkwiPU0T5VfQQ7aDYow.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*iTNs1zSDeet9038kVLF6lw.jpeg" /></figure><blockquote><em>Login with the given creds as a developer we get some chats between admin and developer</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IsRkbuyITh0f5_5PQKoL4g.jpeg" /></figure><p>and looking at the Admin profile page we get a github link, and it’s the site source code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t3HJ1Yv7zPTl7JA-DKFK2A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qw75xnDetC9AfreO6dJaTg.jpeg" /></figure><p>enumerating the github if there is any commit changes, we get nothing but we see that Issues tab has 1 unclosing “issue”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2pilymUuSFO2rm83cTH9ug.jpeg" /></figure><blockquote><strong><em>Viewing </em></strong>on /index.php on line 19 :(</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*HdbEYtFOMu59EYxnOEE_iA.jpeg" /></figure><blockquote>right of the bat we see that it’s <strong>Loose Comparison</strong></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Ft69yXY8jhlrGeY2bwG%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Ft69yXY8jhlrGeY2bwG%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Ft69yXY8jhlrGeY2bwG%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="245" frameborder="0" scrolling="no"><a href="https://medium.com/media/1325e622276f15dee2059550dfbedd8b/href">https://medium.com/media/1325e622276f15dee2059550dfbedd8b/href</a></iframe><blockquote>Please read this awesome article: <a href="http://turbochaos.blogspot.com/2013/08/exploiting-exotic-bugs-php-type-juggling.html">http://turbochaos.blogspot.com/2013/08/exploiting-exotic-bugs-php-type-juggling.html</a><br><a href="https://www.php.net/manual/en/types.comparisons.php">https://www.php.net/manual/en/types.comparisons.php</a></blockquote><p><strong>intercepting the login page and trying some juggling with payload </strong><strong>admin=1&amp;password[]=1we get some juice :)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rrl9UI_rg865EWD1C7pn4A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GnvQ6ULo4f80BojkISUgQA.jpeg" /></figure><p>after redirection we get to the admin page and lastly viewing the page we get the flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QYTshHy7CdYc7Kbyn2ejIA.jpeg" /><figcaption>flag{I_L03v3_Juggl1n_4rr0und}</figcaption></figure><blockquote>Thanks For the reading, you welcomed :)<br>Link: <a href="https://github.com/yekolotemari/HackFestCTF/tree/main/Web%20Security/Felega">Github</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfaf4449335b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mizan — HackFest’22 writeup]]></title>
            <link>https://etpandish.medium.com/mizan-hackfest22-writeup-66118f470e9?source=rss-15b789e5ca62------2</link>
            <guid isPermaLink="false">https://medium.com/p/66118f470e9</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[P4ndish]]></dc:creator>
            <pubDate>Wed, 21 Dec 2022 12:04:35 GMT</pubDate>
            <atom:updated>2022-12-21T14:29:21.155Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mizan — HackFest’22 writeup</h3><p>catagory: web challenge</p><p>looking at the front page we get login page without username.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQivcDVpX_bj2wUScEEAiw.jpeg" /></figure><p>brute-forcing and random guessing seems to be a rabit hole :( <br>let’s look at the request that’s we are receiving some headers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*Qrl-GjJBx3Iqk-Dabu3gzQ.jpeg" /></figure><p>now we know it’s php server running on apache also looking at the cookie we get password=w0rdc0unt123 login with it we get invalid login…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*JfeoJ5tEVYPcuA8x3pntgQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qqlYCMgpKKRem9kz9LpYCQ.jpeg" /></figure><blockquote><strong><em>now let’s look at the common we directory files, </em></strong><strong><em>/robots.txt seems to be responding.</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PBGVGfmYvRgzuOoN7i_idA.png" /></figure><blockquote><em>Viewing </em>/index.php?debug we get the source code :( .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*or8HWY32VhGizr7iL0VDrQ.jpeg" /></figure><p>Looking at the source <br>1. it’s expecting a POST request.<br>2. it’s generating a random number with rand() function.<br>3. it’s extracting the recieved POST value with extract() .</p><pre>// what extract() function does<br>&lt;?php<br>$a = &quot;Original&quot;;<br>$my_array = array(&quot;a&quot; =&gt; &quot;Fake&quot;,&quot;b&quot; =&gt; &quot;Dog&quot;);<br>extract($my_array);<br>echo &quot;\$a = $a; \$b = $b&quot;; // Now $a = fake instead of &quot;Orginal&quot;<br>?&gt;</pre><p>4. lastly if the otpcode == password we get the flag.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FmYhd1NHQkHmZLiqN7M%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fsleepinggiant-deal-with-it-sgm-sleeping-giant-media-mYhd1NHQkHmZLiqN7M&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2FmYhd1NHQkHmZLiqN7M%2Fgiphy.gif%3Fcid%3D790b7611b6cee8770232f8c76125e5604e37104af308a497%26rid%3Dgiphy.gif%26ct%3Dg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="229" frameborder="0" scrolling="no"><a href="https://medium.com/media/a8e9a40305f3ee62106147df8338708f/href">https://medium.com/media/a8e9a40305f3ee62106147df8338708f/href</a></iframe><blockquote><strong>Solution:<br><em>since otpcode is generated before </em></strong><strong><em>extract we can change </em></strong><strong><em>$otpcode to what we want</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1g84h-W76j_DneMki_dCbw.jpeg" /><figcaption>FLAG{1_w4$_U$1ng_extr4Ct0r_}</figcaption></figure><p>Thanks for the playing….</p><p>Challenge link: <a href="https://github.com/yekolotemari/HackFestCTF/tree/main/Web%20Security/mizan">Github</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66118f470e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ChewataCTF2022 — Agelgel]]></title>
            <link>https://etpandish.medium.com/chewatactf2022-agelgel-48d618c930ac?source=rss-15b789e5ca62------2</link>
            <guid isPermaLink="false">https://medium.com/p/48d618c930ac</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[P4ndish]]></dc:creator>
            <pubDate>Mon, 21 Nov 2022 13:38:11 GMT</pubDate>
            <atom:updated>2022-11-21T13:38:11.773Z</atom:updated>
            <content:encoded><![CDATA[<h3>ChewataCTF2022 — Agelgel</h3><p>Welcome, this challenge looks confusing but when you enumerate it well it gives you a clear view about it.<br>Hint : python-agelgel</p><blockquote>source file at the end of this post.</blockquote><p>looking at the webpage, we get 2 hints, the one that’s interesting is the image at top corner. doing a simple search on the image we get it’s <strong>jinja, mostly used by python flask.</strong></p><blockquote><strong>Jinja</strong> is a fast, expressive, extensible templating engine. Special placeholders in the template allow writing code similar to Python syntax. Then the template is passed data to render the final document.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sNMdcF6NylV28BqUShjaPQ.jpeg" /><figcaption>homepage</figcaption></figure><p>So after searching for some vulnerablity you will get server-side template injection(ssti).</p><p>SSTI- where the attacker injects malicious input into a template to execute commands on the server-side. This vulnerability occurs when invalid user input is embedded into the template engine which can generally lead to remote code execution (RCE).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YXQkSZugYXT5RF7yNZYBFA.jpeg" /></figure><p>So trying some crafted ssti payloads we get that there’s some kind of filtration going on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6rwip2N8CbssYMD0GXZGWg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*ju3iCJrPm4QteG-E2Y1SvQ.jpeg" /></figure><p>Some ways to bypass that are using #,$, some of them use &lt;%. <br>testing for #{{ 7 * 7}} we get #49,<br>which it’s successful that means we can use # as starting and read /bin/Flag.txt .</p><pre>#{{ get_flashed_messages.__globals__.__builtins__.open(&quot;bin/Flag.txt&quot;).read() }}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*wXuCquyOTSCx2mybdZi6gg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5CrX4IuksAnFbzMV8w05Tw.jpeg" /></figure><p>That’s all the idea behind this challenge, hope you like the walkthrough.</p><p>Source file: <a href="https://github.com/p4ndish/ChewataCTF-2022/tree/main/Agelgel">Github Link</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48d618c930ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fendisha — ChewataCTF-2022]]></title>
            <link>https://etpandish.medium.com/fendisha-chewatactf-2022-866639f87cbd?source=rss-15b789e5ca62------2</link>
            <guid isPermaLink="false">https://medium.com/p/866639f87cbd</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[chewatactf]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[P4ndish]]></dc:creator>
            <pubDate>Sun, 20 Nov 2022 19:35:39 GMT</pubDate>
            <atom:updated>2022-11-21T18:28:21.250Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fendisha — ChewataCTF-2022</h3><p>Well, for this challenge it’s a basic web cookie maupilation techinque.<br>looking at the webpage we get a login page.</p><blockquote>source file link is at the end of this post</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6uekoFlP_EpV9xG1GKqeSA.jpeg" /><figcaption>homepage</figcaption></figure><p>not much in here looking at the view source page we get some creds…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z_0B9MYrgfJTg8uKh-VVTg.jpeg" /><figcaption>source-code</figcaption></figure><p>observing that it’s base64 and decoding it we get a credential guest:guest. after login we get welcome page…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aP-LzbVFsyyMph9ZpFmQ4w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r7ANpKu5QDp4Ug9uWUPsow.jpeg" /></figure><p>#Hint 1: when log in it’s says “ <strong>Cook’in… </strong>”<br>as always checking the view-source page not much is their, one thing that’s interesting is that the cookie looks weird.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L8dvy8uakKphZtx5xIkHZQ.jpeg" /></figure><blockquote><strong>A</strong>fter url decoding it: auth: username=guest&amp;date=2022–11–20T19:02:26+0000&amp;</blockquote><blockquote>the page says “<strong>…unfortunately i can only give the flag to the administrator” <br>not “admin” just “administrator” so…. after changing the cookie to =&gt; </strong>username=administrator&amp;date=2022–11–20T19:02:26+0000&amp;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVe98sHMK-c6PIEqbiXjBQ.jpeg" /></figure><blockquote>and refreshing the page we get the flag.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IuzwUa-qyUJbiQ3LVf5viA.jpeg" /><figcaption>flag</figcaption></figure><p>challenge source file: <a href="https://github.com/p4ndish/ChewataCTF-2022/tree/main/Fendisha">Github Link</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=866639f87cbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ChewataCTF- warmup writeup]]></title>
            <link>https://etpandish.medium.com/chewatactf-warmup-writeup-2c96657c6d76?source=rss-15b789e5ca62------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c96657c6d76</guid>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[chewatactf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[P4ndish]]></dc:creator>
            <pubDate>Sun, 20 Nov 2022 15:51:39 GMT</pubDate>
            <atom:updated>2022-11-20T19:41:59.618Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>challenge source file is at the end of this post.</blockquote><p>looking at the page looks like we get the source code…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7NVseZrMR0jGq0PMfgeg0A.jpeg" /></figure><pre>if (isset($_GET[&#39;first&#39;])){<br>    $first = $_GET[&#39;first&#39;];<br>    if ($first == md5($first)){....</pre><p>if you know about bit php, php has two main comparison modes namely loose comparisons (==) and strict comparisons(===).<br>The main diffrence is that<br>“<strong>loose comparison</strong>” checks two things by converting them to from string to number. Eg: “0e1234834” == 0 -&gt; returns true for some weired reasons.</p><p>refer : <a href="https://owasp.org/www-pdf-archive/PHPMagicTricks-TypeJuggling.pdf">https://owasp.org/www-pdf-archive/PHPMagicTricks-TypeJuggling.pdf</a></p><p>so if we found any number that match with it’s md5 hash more formally if any number say “0e{number}” == md5(number) we can pass the check and and get the flag. “0e” is referred to as scientific notation (0 * 10 ** number)!</p><p>so one example would be this<br>number = 0e215962017 (0 * 10 ** 215962017)<br>md5 = 0e2159620170e291242476940776845150308577824<br>when the md5 is decoded you get the same number as “num” which (0 * 10 ** 215962017) == 0 and (0 * 10 ** 2159620170e291242476940776845150308577824) == 0, this check will pass it as true and…..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3C4EvrKJ6RtuRBF4hD2yQg.jpeg" /><figcaption>…you get the flag.</figcaption></figure><p><strong>c</strong>onclusion: don’t ever use loose comparison ever!!!</p><blockquote>Source file : <a href="https://github.com/p4ndish/ChewataCTF-2022/tree/main/warmup">https://github.com/p4ndish/ChewataCTF-2022/tree/main/warmup</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c96657c6d76" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>