<?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 catalist on Medium]]></title>
        <description><![CDATA[Stories by catalist on Medium]]></description>
        <link>https://medium.com/@catalistalone619?source=rss-bc0c16d2a9c8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fXrZJ8lGfrv6MX2r</url>
            <title>Stories by catalist on Medium</title>
            <link>https://medium.com/@catalistalone619?source=rss-bc0c16d2a9c8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 22:17:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@catalistalone619/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[picoCTF interencdec]]></title>
            <link>https://medium.com/@catalistalone619/picoctf-interencdec-e351f90ee02c?source=rss-bc0c16d2a9c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e351f90ee02c</guid>
            <dc:creator><![CDATA[catalist]]></dc:creator>
            <pubDate>Wed, 24 Jul 2024 06:42:37 GMT</pubDate>
            <atom:updated>2024-07-24T06:42:37.164Z</atom:updated>
            <content:encoded><![CDATA[<p>You have given a encrypted text with a hint “Engaging in various decoding processes is of utmost importance”.</p><blockquote>encoded message: YidkM0JxZGtwQlRYdHFhR3g2YUhsZmF6TnFlVGwzWVROclgya3lNRFJvYTJvMmZRPT0nCg==</blockquote><p>First i try to insert in dcode identifier <a href="https://www.dcode.fr/cipher-identifier">https://www.dcode.fr/cipher-identifier</a> to determine which cipher is this and determine it’s base64 encoded.</p><p>Then i start to decode it and get this</p><blockquote>b’d3BqdkpBTXtqaGx6aHlfazNqeTl3YTNrX2kyMDRoa2o2fQ==’</blockquote><p>Then i decode again using base64 by removiving “b’ and ‘ at the end that indicate the text is string. then i get</p><blockquote>wpjvJAM{jhlzhy_k3jy9wa3k_i204hkj6}</blockquote><p>finaly at take that text i get and run again dcode identifier, and i get it’s rot cipher and decode using rot cipher and get the flag.</p><h3><strong>picoCTF{caesar_d3cr9pt3d_b204adc6}</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e351f90ee02c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy Peasy]]></title>
            <link>https://medium.com/@catalistalone619/easy-peasy-6530a9e6aabc?source=rss-bc0c16d2a9c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6530a9e6aabc</guid>
            <dc:creator><![CDATA[catalist]]></dc:creator>
            <pubDate>Tue, 30 Apr 2024 20:40:08 GMT</pubDate>
            <atom:updated>2024-04-30T20:40:08.149Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>A one-time pad is unbreakable, but can you manage to recover the flag? (Wrap with picoCTF{})</blockquote><p>#!/usr/bin/python3 -u<br>import os.path</p><p>KEY_FILE = “key”<br>KEY_LEN = 50000<br>FLAG_FILE = “flag”</p><p>def startup(key_location):<br> flag = open(FLAG_FILE).read()<br> kf = open(KEY_FILE, “rb”).read()</p><p>start = key_location<br> stop = key_location + len(flag)</p><p>key = kf[start:stop]<br> key_location = stop</p><p>result = list(map(lambda p, k: “{:02x}”.format(ord(p) ^ k), flag, key))<br> print(“This is the encrypted flag!\n{}\n”.format(“”.join(result)))</p><p>return key_location</p><p>def encrypt(key_location):<br> ui = input(“What data would you like to encrypt? “).rstrip()<br> if len(ui) == 0 or len(ui) &gt; KEY_LEN:<br> return -1</p><p>start = key_location<br> stop = key_location + len(ui)</p><p>kf = open(KEY_FILE, “rb”).read()</p><p>if stop &gt;= KEY_LEN:<br> stop = stop % KEY_LEN<br> key = kf[start:] + kf[:stop]<br> else:<br> key = kf[start:stop]<br> key_location = stop</p><p>result = list(map(lambda p, k: “{:02x}”.format(ord(p) ^ k), ui, key))</p><p>print(“Here ya go!\n{}\n”.format(“”.join(result)))</p><p>return key_location</p><p>print(“******************Welcome to our OTP implementation!******************”)<br>c = startup(0)<br>while c &gt;= 0:<br> c = encrypt(c)</p><blockquote>When you connect to the attached service, first will display the flag that is decrypted with 32 bytes and continue to provide you to input to be encrypted.</blockquote><p>┌──(catalist㉿kali)-[~/PicoCTF/Cryptography]<br>└─$ nc mercury.picoctf.net 36449<br>******************Welcome to our OTP implementation!******************<br>This is the encrypted flag!<br>551257106e1a52095f654f510a6b4954026c1e0304394100043a1c5654505b6b</p><p>What data would you like to encrypt? ^C</p><blockquote>If you analyze the code very clear, you will realize the key used have length of <strong>50000</strong> and the displayed encrypted flag use this key. But very interesting this, the input text encrypted with the key starting after finishing the encrypted flag ended.</blockquote><blockquote>So if we can use all the key remain we can reuse the key from the start again, lets try this.</blockquote><p>python3 -c “print(‘A’*49968); print(‘A’*32);” | nc mercury.picoctf.net 36449 <br>******************Welcome to our OTP implementation!******************<br>This is the encrypted flag!<br>551257106e1a52095f654f510a6b4954026c1e0304394100043a1c5654505b6b</p><p>What data would you like to encrypt? Here ya go!<br>3979711d3920221d3970221d3922271d39782024623d02691d392323791d39717904691d3978276b1d3927791d3920201d3920271d3978771334696a131d3970241d392376061d3925201d3920791d397920011d3924731d3920721d3971770d1d39</p><p>d3971741d3922731d3979231d39222309671d3971751d3927271d39707279041d3978721d66751a38321d3970731d661d3920721d3922761d3925780b1d3925251d3978771d3971731d3978726b041d3923781d3978711d392525621d3920221d3920271e</p><p>What data would you like to encrypt? Here ya go!<br><strong><em>236625611d392070281d3971731d3922251d3923201d3922751d392423702f1d</em></strong></p><p>What data would you like to encrypt? ^C</p><blockquote>At the end you get this 236625611d392070281d3971731d3922251d3923201d3922751d392423702f1d, that is decrypted the same key as encrypted flag.</blockquote><blockquote>Now we have encrypted flag, encrypted text and decrypted text. Lets write the script.</blockquote><p>#!/usr/bin/python3</p><p>from pwn import *</p><p>enc_flag = bytes.fromhex(“551257106e1a52095f654f510a6b4954026c1e0304394100043a1c5654505b6b”)<br>enc_text = bytes.fromhex(“236625611d392070281d3971731d3922251d3923201d3922751d392423702f1d”)<br>dec_text = b’A’*32</p><p>key = xor(enc_text, dec_text)</p><p>print(xor(enc_flag, key).decode())</p><blockquote>If you run the above script you get this flag.</blockquote><p>┌──(catalist㉿kali)-[~/PicoCTF/Cryptography]<br>└─$ python3 otp_script.py<br>75302b38697a8717f0faee9c0fd36a57</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6530a9e6aabc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>