<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>PascalCTF on the008Killer</title>
    <link>http://www.adhikariashwin0.com.np/tags/pascalctf/</link>
    <description>Recent content in PascalCTF on the008Killer</description>
    <generator>Hugo</generator>
    <language>en</language>
    
    
    <lastBuildDate>Tue, 03 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="http://www.adhikariashwin0.com.np/tags/pascalctf/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Pascal CTF</title>
      <link>http://www.adhikariashwin0.com.np/writeups/ctfs/pascalctf/</link>
      <pubDate>Tue, 03 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.adhikariashwin0.com.np/writeups/ctfs/pascalctf/</guid>
      <description>&lt;h2 id=&#34;web-challenges&#34;&gt;Web Challenges&lt;/h2&gt;&#xA;&lt;h3 id=&#34;jshit&#34;&gt;JSHit&lt;/h3&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;jshit&#34; loading=&#34;lazy&#34; src=&#34;http://www.adhikariashwin0.com.np/writeups/ctfs/pascalctf/assets/jshit.png&#34;&gt;&#xA;This was a straightforward challenge that included a JSFuck language. Just needed to decode the text.&#xA;&lt;img alt=&#34;JSFusk Language&#34; loading=&#34;lazy&#34; src=&#34;http://www.adhikariashwin0.com.np/writeups/ctfs/pascalctf/assets/jsFusk.png&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Used &lt;a href=&#34;https://www.dcode.fr/jsfuck-language&#34;&gt;dcode.fr&lt;/a&gt; to decode the text and get the flag:&#xA;&lt;img alt=&#34;JSHit solve&#34; loading=&#34;lazy&#34; src=&#34;http://www.adhikariashwin0.com.np/writeups/ctfs/pascalctf/assets/jshitsolve.png&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;zazastore&#34;&gt;ZazaStore&lt;/h3&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;zazaStore&#34; loading=&#34;lazy&#34; src=&#34;http://www.adhikariashwin0.com.np/writeups/ctfs/pascalctf/assets/zazastore.png&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This was an online marketplace. An interesting thing was that there was a &lt;code&gt;FakeZa&lt;/code&gt; product which gave a fake flag, it hinted me that the real flag was &lt;code&gt;RealZa&lt;/code&gt; product.&#xA;&lt;img alt=&#34;fake flag&#34; loading=&#34;lazy&#34; src=&#34;http://www.adhikariashwin0.com.np/writeups/ctfs/pascalctf/assets/zazaStore_fakeza.png&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Code Analysis:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-texttext&#34; data-lang=&#34;texttext&#34;&gt;.&#xA;├── challenge.zip&#xA;└── src&#xA;    ├── app&#xA;    │   ├── package.json&#xA;    │   ├── package-lock.json&#xA;    │   ├── public&#xA;    │   │   ├── images&#xA;    │   │   │   ├── CartoonZa.png&#xA;    │   │   │   ├── ElectricZa.jpeg&#xA;    │   │   │   ├── FakeZa.jpeg&#xA;    │   │   │   ├── RealZa.jpeg&#xA;    │   │   │   └── ZazaIsBad.png&#xA;    │   │   └── style&#xA;    │   │       └── style.css&#xA;    │   ├── server.js&#xA;    │   └── views&#xA;    │       ├── cart.ejs&#xA;    │       ├── index.ejs&#xA;    │       ├── inventory.ejs&#xA;    │       └── login.ejs&#xA;    ├── docker-compose.yml&#xA;    └── Dockerfile&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;/add-cart&lt;/code&gt; function didnot validate the product so i noticed the logic flaw.&#xA;Firstly i tried to exploit a logic flaw in how JavaScript handles &lt;code&gt;NaN&lt;/code&gt; (Not-a-Number) during comparisons.&#xA;The prices object only contains specific keys (FakeZa, ElectricZa, etc.). The &lt;code&gt;/add-cart&lt;/code&gt; route does not check if the product we are adding is actually a valid item in the store.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>