<?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 Kanishkark on Medium]]></title>
        <description><![CDATA[Stories by Kanishkark on Medium]]></description>
        <link>https://medium.com/@kanishkark1411?source=rss-597a81b4886a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Bqt4oRRor6U91qxV</url>
            <title>Stories by Kanishkark on Medium</title>
            <link>https://medium.com/@kanishkark1411?source=rss-597a81b4886a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:30:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kanishkark1411/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[VinterBash 2026 — Author Writeup and Exp]]></title>
            <link>https://medium.com/@kanishkark1411/vinterbash-2026-author-writeup-and-exp-c61df7d93cc4?source=rss-597a81b4886a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c61df7d93cc4</guid>
            <dc:creator><![CDATA[Kanishkark]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 04:12:17 GMT</pubDate>
            <atom:updated>2026-08-10T07:05:22.486Z</atom:updated>
            <content:encoded><![CDATA[<p>This was my very first time creating and hosting challenges for a Capture The Flag (CTF) competition!</p><p><strong>VinterBash</strong> is a school-level CTF designed to introduce the younger generation to cybersecurity and spark their interest in the field. Since the target audience consisted of school students, I created four challenges spanning different difficulty levels and categories:</p><ul><li><strong>Reverse Engineering:</strong> 2 Challenges (1 Beg ( 1solves), 1 Med (0 solves))</li><li><strong>Binary Exploitation:</strong> 1 Challenge (Beginner (2 solves))</li><li><strong>Cryptography:</strong> 1 Challenge (Medium (0 solves))</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XnXMzICZ0rqog87t1JAiLQ.jpeg" /></figure><h3>The Setup Experience</h3><p>The CTF was hosted at <a href="https://medium.com/u/8248e0e9affc">Vetrithirumaganv</a>’s school as part of the broader VinterBash event. I had the chance to collaborate with him, helping set up the core infrastructure using a CTFd image alongside authoring the challenges.</p><p>Because I’m an outsider and not a student at the school, I couldn’t be there at the venue on the actual event day 😢. However, I managed to finish crafting the challenges on time and even “infiltrated” the campus a day prior to get the infra up and running!</p><p>A massive thanks to <a href="https://medium.com/u/8248e0e9affc">Vetrithirumaganv</a> for giving me this opportunity and for such a great learning experience.</p><h3>1) Knight’s Venture</h3><p><strong>Category:</strong> Reverse Engineering<br><strong>Summary:</strong> A classic reversing challenge containing a 3-part flag. It’s pretty straightforward once you map out how each part of the flag is processed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*p6Jub0V9hQ-099FkIAcPkg.png" /></figure><p>Decompiling the provided binary reveals that it expects a <strong>15-character input</strong> before calling a verification function..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*d-MpgLMhwDMUazAvRbPyHg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*xHSN0lqRpC2J5wGnVRSP_g.png" /></figure><p>Upon inspecting this function, we notice it compares our input against a hardcoded string to validate it. Inside, there’s also an additional function call that seems unclear at first glance, but we can hold off on that for now since our immediate goal is simply bypassing this check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*U2sDYOcSPdfK5ZC01xxubA.png" /></figure><p>Looking closer, we get the exact input required to pass. Before doing so, however, any input passed yields a <strong>14-byte hexadecimal value</strong>. Noticeably, the string needed for the bypass and this output share the same length, hinting at a direct relationship between them.</p><p>Since we can bypass this check without overcomplicating the math just yet, let’s move right into the second part…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*n8Xn-jvUZQW1Yo8JVPs0DQ.png" /></figure><p>It’s asking for step, which could be a number/Integer lets investigate in the binary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*4hwiuKUrac9SRLwe92eJQw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*7tgIoejNitSG2t1ru4-g0A.png" /></figure><p>This functions gets the number, and calls a function called ror8,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*iucFavjNi6N2Sz1U7rc_0Q.png" /></figure><p>This performs a right circular shift to the arg1 by arg2 times.</p><p>the main function checks the input in range of 0–7, which means this shift is in the range of 0–7, it performs shifting on the data and xors with a key. Now lets text its behavior on what it does.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*-rGpmHt1rYV61bSfL-CQrg.png" /></figure><p>2 gives some random Hex, and it fails, this means the shift didnt match, and we know the output must be a alnum character, brute forcing the shift we get <strong>N3v3r</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*XB0-DjTedGrDWIarVxHkag.png" /></figure><p>Now all it remains is the last part,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*9h07q20KAsfHx6skj8vouA.png" /></figure><p>we have a cipher _J3bz4g5}, which is hard coded and its taking a number 9 as input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*qF8jnK-YEckw5AhXFqXhaw.png" /></figure><p>Its a classic Shift cipher and its straight forward, the only catch is it needs a input of size 8 to decrypt, its not using the input values at all.</p><p>so that&#39;s it right, we solved 3 parts lets see what&#39;s the output is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*ZA3QW0UL2NUOQINdDZW15w.png" /></figure><p>the first part is still missing, how to find it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*GXh25gRUTFvMp2ae7uTwzw.png" /></figure><p>The Output is from a crypto system, of XORing with a key, the key is unknown. We know the plain text and cipher text by doing Known-Plain-text attack we can find the key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*ULiQR5TVzyi2FclMPYOsJQ.png" /></figure><blockquote>Key = 24713537323d6d0b7c27550f4c70</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*XLeR0v-TDxYS_vBsCBZ9ag.png" /></figure><p>XORing the key with the cipher text gives us the original value which is</p><blockquote>VBCtf{D35t1ny_N3v3r_B3tr4y5}</blockquote><h3>Bad RNG</h3><p><strong>Category:</strong> Cryptography<br><strong>Summary: </strong>Classic Pseudo random number generator vulnerability in RSA.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*UxAuJyDavW25T8aPvZD71A.png" /></figure><p>A challenge with 2 output files, the code provided are as follows</p><pre>import random<br>from Crypto.Util.number import bytes_to_long, isPrime<br>from Crypto.Util.Padding import pad<br><br>FLAG = b&quot;VBCtf{H0p3_y0u_didnt_4ctually_th1nk_1_w0uld_g1v3_y0u_th3_fl4g}&quot;<br><br>def gen_prime(bits):<br>    while True:<br>        candidate = random.getrandbits(bits) | (1 &lt;&lt; (bits - 1)) | (1 &lt;&lt; (bits - 2)) | 1<br>        if isPrime(candidate):<br>            return candidate<br><br>def main():<br>    seed = random.SystemRandom().getrandbits(8)<br>    random.seed(seed)<br><br>    p = gen_prime(512)<br>    q = gen_prime(512)<br>    n = p * q<br>    e = 65537<br><br>    m = bytes_to_long(FLAG)<br>    c = pow(m, e, n)<br>    file_name = f&quot;output.txt&quot;<br>    with open(file_name, &quot;w&quot;) as f:<br>        f.write(f&quot;n = {n}\n&quot;)<br>        f.write(f&quot;e = {e}\n&quot;)<br>        f.write(f&quot;c = {c}\n&quot;)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><pre>n = 164835838152759236911694385559922738257179460057628447082950790740095016631754032397115481170601007153994452512295591347900846879947921579466372039032945274151255031137229016881790349869835356335754602882688852523010479029674984932878099905794867119010535806396401523907081563303479364631859753022881822100673<br>e = 65537<br>c = 120754471972949042501767894162652402894634671278490404261265224804320117781926994993790084377344879530191171442172577990589035558103230413712966165728958146303181005804637132539719933461958692054736354288413275288971621373682442666494458403845586388038682027608371642773746058738927206535821393149164624496239</pre><p>Here we can see this is a simple an straight forward RSA with a random number, since the bits length is 8, its pretty easy to solve with buteforce.</p><pre>import random<br>import time<br>from Crypto.Util.number import isPrime, long_to_bytes<br>n = 164835838152759236911694385559922738257179460057628447082950790740095016631754032397115481170601007153994452512295591347900846879947921579466372039032945274151255031137229016881790349869835356335754602882688852523010479029674984932878099905794867119010535806396401523907081563303479364631859753022881822100673<br>e = 65537<br>c = 120754471972949042501767894162652402894634671278490404261265224804320117781926994993790084377344879530191171442172577990589035558103230413712966165728958146303181005804637132539719933461958692054736354288413275288971621373682442666494458403845586388038682027608371642773746058738927206535821393149164624496239<br><br>start = time.perf_counter()<br><br>def gen_prime(bits):<br>    while True:<br>        candidate = random.getrandbits(bits) | (1 &lt;&lt; (bits - 1)) | (1 &lt;&lt; (bits - 2)) | 1<br>        if isPrime(candidate):<br>            return candidate<br><br>for seed in range(2**8):<br>    random.seed(seed)<br>    p = gen_prime(512)<br>    if n%p == 0:<br>        print(f&quot;[+] found seed = {seed}&quot;)<br>        q = n // p<br>        phi = (p - 1) * (q - 1)<br>        d = pow(e, -1, phi)<br>        m = pow(c, d, n)<br>        print(long_to_bytes(m))<br>        end = time.perf_counter()<br>        print(f&quot;[+] Time taken: {end - start:.2f} seconds&quot;)<br>        break<br>else:<br>    print(&quot;[-] seed not found&quot;)</pre><p>This is solvable, but takes a long time(not long for ²⁸, but if the key space is large the it will take significant delay, to make this faster we can use gmpy2 which has a much faster is_prime (Miller-Rabin implemented in C via GMP) compared to Crypto.Util.number.isPrime, and native mpz integers speed up the modular arithmetic on the 1024-bit n as well.</p><p>Other challenges</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*oFB68FMbTraaa-RWXWvIrg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*mMhLrnzBO3RWEluCHuaz-w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c61df7d93cc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ESPILON 2026 WriteUps]]></title>
            <link>https://medium.com/@kanishkark1411/espilon-2026-writeups-729f311b6d85?source=rss-597a81b4886a------2</link>
            <guid isPermaLink="false">https://medium.com/p/729f311b6d85</guid>
            <category><![CDATA[embedded-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hardware-security]]></category>
            <category><![CDATA[esp32]]></category>
            <dc:creator><![CDATA[Kanishkark]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 07:10:59 GMT</pubDate>
            <atom:updated>2026-03-30T09:02:55.506Z</atom:updated>
            <content:encoded><![CDATA[<p>A Complete Beginner to Embedded security with background in Cybersecurity, Trying my first ever Embedded security challenges, i have tried few challenges in hardware on other CTFs, but never got too much into them, bought my first ever microcontroller for this CTF. Embedded Sec is kinda interesting then traditional app/cloud sec.</p><p><a href="https://ctftime.org/event/3179">ESPILON CTF</a> — hardware, IoT &amp; OT-focused Capture The Flag competition. No web exploitation, no classical pwn this is about real-world embedded security.</p><p>I managed to get 27th place among 268 participants(solved at least 1) getting a top 10% in my first ever embedded sec CTF is great at least for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*udh5_Km0Vh9O4E_MCyw3_g.png" /></figure><p>Here’s the list of challenges i happened to solve, Thanks to the Organiser for helping me on the right track. I thought of writing this write up on last day of the CTF, saw the timings wrong and i dont have screenshots for few of them, ill write things i can recreate and will update once i get the challenges zip.</p><p>Happy reading, remainder im a complete noob to this, so this might feel very basic or even wrong in some places if ur expert in Hardware sec. with tha lets get into the challenges.</p><h3>IOT</h3><h4><a href="https://ctf.espilon.net/challenges#Nurse%20Call-11">Nurse Call</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*ryTREtEnFXz-FRZ9fNRcaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*EKc45touAtm9eLOLE8Ir-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*8kohvDbBkdx0Dt7MmO0EwQ.png" /></figure><p>In this challenge we are given access to a shell, which has a lot of directories like /logs, /tools, etc. We are told, the room 013 is generating request despite being shut down long back, it still talks over the common BUS, even after it being closed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*MOPVM2yGVIcgCdpCA4x6wQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*0-ItiI5UDydWG8A32AY7iw.png" /></figure><p>Inspecting the log, we find the module from room 013 which is contacting has id LAIN, not 013, which later gets confirmed as its name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*p9EyuHBQpb2nNkBUl7UVZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*0d5dVuUOXjd6iH5oBWvLzg.png" /></figure><p>we need to use the reviel.sh with the name not id. From this we know to call it using — id and the name as parameter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*Eb0HFdNwcIQXoFRr4NurEA.png" /></figure><h4>Let’s All Hate UART</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*o6trbwB0bhVOWtWhr3SSyA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hZPvfwBbcDsY1vYDDy65hA.png" /></figure><p>In this challenge we are given 2 instances one is to write and one is to listen, from the instance we need debug mode enabled to read contents of the NVS flash. NVS (Non-Volatile Storage) is a small section of the ESP32’s flash memory used to store key-value pairs like settings or calibration data that persist even after the device is powered off or restarted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*X0ekrZIidih9UH58RQ_-7w.png" /></figure><p>From this we can see the public data is from 0x3ffb0000–0x3ffb1000</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*gU_d4JFX-2HFjam3PVdsOQ.png" /></figure><p>We find a string which looks like base64, upon decryption we get the debug token. dGgzcmFweV9tMGR1bGU9 =&gt; <strong>th3rapy_m0dule=</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QHXO1xHkd8IZOWfLmkFHUw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*LSjDxV_13ZRCW9MycSVqIQ.png" /></figure><p>After accessing the nvs, we find the crypto flag, i initially thought it was encrypted using AES, since there where places which has placeholder for AES key and IV. looked for strings in binary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*OBlkHtQEKJF9DbsL8XMIHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*EOhO-6MVrDKL_Q3K9PBY_A.png" /></figure><p>Later realized the bit length doesn&#39;t match a AES 256 size and i was looking on what it could be and tried Known key attack, the binar is this</p><p>12 1A 02 0C 08 18 07 29 30 70 25 3D 0D 2B 32 24 16 34 29 70 24 21 0D 21 75 24 2A 62 33 77 25 30 2F, we know the flag starts with ESPILON{</p><p>0x12 ^ 0x45 = 0x57 →<strong>W</strong>0x1A ^ 0x53 = 0x49 →<strong>I</strong>0x02 ^ 0x50 = 0x52→<strong>R</strong> <br>0x0C ^ 0x49 = 0x45 →<strong>E</strong> 0x08 ^ 0x4C = 0x44 → <strong>D</strong> 0x18 ^ 0x4F = 0x57 → <strong>W</strong> <br>0x07 ⊕ ^ 0x4E = 0x49 → <strong>I</strong> 0x29 ^ 0x7B = 0x52 → <strong>R</strong></p><p>so using known plaintext attack we can get the xor key as WIRED.</p><p>with that u get <strong>ESPILON{welc0me_t0_the_w1red_w0rld}</strong></p><h4><a href="https://ctf.espilon.net/challenges#LAIN_Br34kC0r3%20V2-15">LAIN_Br34kC0r3 V2</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*hHkCUW4YITBwbQi15zUJ0w.png" /></figure><p>Same Fashion, we get a huge base54 dump when we give dump_flash, this is the nvs flash dump, write it to a file, and clean the output like the starting texts are also written into the file, so using grep and parameters like =$ will get lines ending with =.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*PCCV-hkWf-uUJ9qIs1xfFw.png" /></figure><p>from the instance we can get the Encrypted flag, its AES-256-CBC, which is impossible to brute force, so we need to ifnd the flag in the dump.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*cN11KkcwoxWZ34JIq0OUFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*_TVxiyw_51K3sQKdXRO1zQ.png" /></figure><p>After decoding the base64, we need to look for the key, some known keywords are IV, Key and Lain. from this we get the key and IV.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*6AbmPRBDv8sfVKjUApepEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*LuEU_p4-tzmHoNoKW_38vQ.png" /></figure><p>Decrypting it with the key and IV gives us the flags ESPILON{Esp32_fl4sh_dump_r3v3rs3d}</p><h3>HARDWARE:</h3><h4>Serial Exp 00:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*9A9E9NH5JORjyxj8Na8FzA.png" /></figure><p>4c41494e → LAIN<br>3030 → 00</p><p>Decode B :<br>0x40 ^ 0x13 = 0x53 →<strong> </strong><strong><em>S </em></strong>0x56 ^ 0x13 = 0x45 →<strong><em> </em></strong><strong><em>E</em></strong> 0x41 ^ 0x13 = 0x52 → <strong><em>R</em></strong><br>0x5A ^ 0x13 = 0x49 → <strong><em>I </em></strong>0x52 ^ 0x13 = 0x41 →<em> </em><strong><em>A</em></strong><em> </em>0x5F ^ 0x13 = 0x4C →<strong><em> </em></strong><strong><em>L</em></strong><em><br></em>frag_b → <em>SERIAL</em><br>LAIN-SERIAL-00</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*by5BlqeE38ML-YQUdiSCTA.png" /></figure><h4>Glitch the Wired</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*-u-nNL3jZWrJrxkK96yZeg.png" /></figure><p>In this challenge we are given access to a <strong>WIRED-MED Fault Injection Interface</strong> — a simulated voltage glitching lab targeting a Secure Boot Module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*mcLhmVHWupz3y4MbJeoBfA.png" /></figure><p>Running help reveals the available commands: observe, set_delay, set_width, arm, trigger, and read_console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*d5IHpA3iqsxGPv8IDowRrA.png" /></figure><p>The target is clear, we need to glitch during SIG_VERIFY (cycles 3200–3400) to skip the signature check and let the boot continue as if verification passed. We set the delay to hit right at the start of SIG_VERIFY and keep the pulse width tight:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*2JJmN5k3FutELpTLoc55mg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*QUAs5B_Y5729yvxS-tKYSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*9zpCGgOHyRHBZRD23zcQcQ.png" /></figure><h4>WIRED SPI Exfil</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/435/1*TFI8LQd7kXyZ9Dx0OJggxA.png" /></figure><p>In this challenge, we interact with an SPI flash memory device. Given some partition is hidden and its not listed on the partition table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*VN-qmRRQO_o-zoWrEpsQvw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*87IuJZO0WzLNjnlo-0_w3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*smw53x_a5p5GHop08hFSdg.png" /></figure><p>Running tx 03 3f 00 40 reads a 64-byte block from the flash, and the first read reveals something interesting — the ASCII sidebar shows WIRED_HIDDEN_PARTITION.<br>After Probing the partition fro some key or algortihm, i came back to known-plaintext attack since we know the flag format starts with ESPILON{.<br>The raw encrypted bytes from the dump are:<br>12 1A 02 0C 08 10 1D 2B 3A 27 78 0D …<br>XORing each byte against the known plaintext ESPILON{:<br>0x12 ^ 0x45 = 0x57 → <strong><em>W</em></strong><em> </em>0x1A ^ 0x53 = 0x49 → <strong><em>I </em></strong>0x02 ^ 0x50 = 0x52 → <strong><em>R</em></strong><br>0x0C ^ 0x49 = 0x45 → <strong><em>E </em></strong>0x08 ^ 0x4C = 0x44 → <strong><em>D </em></strong>0x10 ^ 0x4F = 0x5F → <strong><em>_</em></strong><br>0x1D ^ 0x4E = 0x53 → <strong><em>S </em></strong>0x2B ^ 0x7B = 0x50 → <strong><em>P </em></strong>0x3A ^ 0x49 = 0x49→ <strong><em>I</em></strong><br>This reveals the XOR key: <strong><em>WIRED_SPI</em></strong><br>Decrypting the full ciphertext with this repeating key gives us the flag:<br>ESPILON{sp1_fl4sh_3xf1ltr4t3d}</p><h3>ESP:</h3><p>For this we need a ESP32 to perform the tasks, i bought my first every ESP32, didnt even know how to interact with it, then learnt what baud rate is, how to flash a ESP etc.<br>there are few challenges using ESP32.</p><h4><a href="https://ctf.espilon.net/challenges#Hello-ESP-10">Hello-ESP</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*8RnReovLNZV3oJyjma5B4Q.png" /></figure><p>In this challenge we are given 3 binary files — bootloader.bin, partition-table.bin, and hello-espilon.bin. The goal is to flash these onto an ESP32 and see what it outputs over serial.</p><p>We flash the binaries using esptool:</p><pre>python -m esptool --chip esp32 --port COM6 --baud 115200 write_flash -z \<br>  0x1000 bootloader.bin \<br>  0x8000 partition-table.bin \<br>  0x10000 hello-espilon.bin<br>```</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*xE4HXIuac1OIn0pVXsp14Q.png" /></figure><p>Encrypted flag: 09 12 19 07 00 0E 07 35 3F 35 7D 3C 38 1E 3D 26 7F 1E 3E 7F 3E 72 34<br>XOR Key: 4C 41 49 4E =&gt; LAIN</p><p>09 ^ 4C = E<br>12 ^ 41 = S<br>19 ^ 49 = P<br>07 ^ 4E = I<br>00 ^ 4C = L<br>0E ^ 41 = O<br>07 ^ 49 = N<br>35 ^ 4E = {<br>… and so on</p><p>Flag: ESPILON{st4rt_th3_w1r3}</p><h4><a href="https://ctf.espilon.net/challenges#Jnouned%20Routeur-6">Jnouned Router</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*VlLsTlPaHoHNV6HCCdv6pg.png" /></figure><p>We are given a firmware and supposed to find a way to get admin creds, this is a easy and straight forward one. You have to probe the firmware binary file for strings and using some grep we can find the admin creds in plain sight as <strong>jnoun-admin-2022</strong></p><p>and logging in will give u the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*f4e9a43sb1WnuFVu13dvSA.png" /></figure><h3>OT</h3><h4>Tachibana SCADA</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*cM4TutrNgliKxmXl93kKXg.png" /></figure><p>In this challenge we are given access to an OPC-UA server. We start by enumerating all available namespaces:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*Q0lZR5ZM_DJdOZAIRlU2pg.png" /></figure><p>[0] <a href="http://opcfoundation.org/UA/">http://opcfoundation.org/UA/</a><br> [1] urn:freeopcua:python:server<br> [2] urn:tachibana:scada<br> [3] urn:tachibana:eiri:kids</p><p>3 is sus. so we are probing through the 3rd namespace for methods and arguments needed for those methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_cUhnXc2pXp0j_k7PtMzWw.png" /></figure><p>We can see there’s a namespace under EiriMisami called KIDS_Project, which has an activation key(Class 2 — Variable) inside it, a Backdoor(Class 1 — Object), which has Authenticate (Class 4 — Method) and ExtractResearchData (Class 4 — Method), its clear</p><p>we need to authenticate ourself by calling EiriMasami &gt; Backdoor &gt; Authenticate (Class 4 = Method), and extract data by calling EiriMasami &gt; Backdoor &gt; ExtractResearchData (Class 4 = Method)</p><p>Inspecting the method arguments for Authenticate:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FexIet1DDAdikRH1vAlxxQ.png" /></figure><p>[Argument(Name=’username’, DataType=NodeId(Identifier=12, NamespaceIndex=0, NodeIdType=&lt;NodeIdType.TwoByte: 0&gt;), ValueRank=-1, ArrayDimensions=[], Description=LocalizedText(Locale=None, Text=<strong><em>’</em></strong><strong><em>Username for authentication’</em></strong>)), Argument(Name=’key_hash’, DataType=NodeId(Identifier=15, NamespaceIndex=0, NodeIdType=&lt;NodeIdType.TwoByte: 0&gt;), ValueRank=-1, ArrayDimensions=[], Description=LocalizedText(Locale=None, Text=<strong><em>’</em></strong><strong><em>Key hash — 16-byte truncated SHA-256 of the project name’</em></strong>))]</p><p>so brute forcing known username and project name</p><pre>users = [&quot;eiri&quot;, &quot;eiri.masami&quot;, &quot;masami&quot;, &quot;admin&quot;, &quot;kids&quot;]<br>projects = [&quot;KIDS&quot;, &quot;kids&quot;, &quot;KIDS_Project&quot;, &quot;Protocol7&quot;]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*jZ4D3feeF92kN9rXQJ4rUQ.png" /></figure><p>We get the flag.</p><p>Overall it was a fun experience, i couldnt write few of the solved challenges will keep on updating this once i get time.</p><p>Anyways Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=729f311b6d85" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>