<?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 Ali Ahmed Ali Abdelmaksoud on Medium]]></title>
        <description><![CDATA[Stories by Ali Ahmed Ali Abdelmaksoud on Medium]]></description>
        <link>https://medium.com/@aa1493264?source=rss-561bcd75ae5d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QcejANAZxUWXs5sxxYQB2Q.jpeg</url>
            <title>Stories by Ali Ahmed Ali Abdelmaksoud on Medium</title>
            <link>https://medium.com/@aa1493264?source=rss-561bcd75ae5d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 08:42:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aa1493264/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[TryHackMe Hacker Holidays 2026 — Day 9: CryptoCabana Walkthrough (T2)]]></title>
            <link>https://medium.com/@aa1493264/tryhackme-hacker-holidays-2026-day-9-cryptocabana-walkthrough-t2-109891465cb4?source=rss-561bcd75ae5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/109891465cb4</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[microsoft-azure]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[hacker-holidays-2026]]></category>
            <dc:creator><![CDATA[Ali Ahmed Ali Abdelmaksoud]]></dc:creator>
            <pubDate>Thu, 06 Aug 2026 00:41:31 GMT</pubDate>
            <atom:updated>2026-08-06T00:41:31.284Z</atom:updated>
            <content:encoded><![CDATA[<p>⚠️ This walkthrough contains spoilers. No passwords, credentials, cracked hashes, or flags are included.</p><h3>Room Information</h3><ul><li><strong>Platform:</strong> <a href="https://tryhackme.com/">TryHackMe</a></li><li><strong>Event:</strong> <a href="https://tryhackme.com/hackerholidays">Hacker Holidays 2026</a></li><li><strong>Day:</strong> 9</li><li><strong>Room:</strong> CryptoCabana</li><li><strong>Category:</strong> Cloud Security</li><li><strong>Difficulty:</strong> Medium</li><li><strong>Cloud Provider:</strong> Microsoft Azure</li><li><strong>Tool Used:</strong> Azure CLI</li></ul><h3>Challenge Overview</h3><p>The goal was to inspect the CryptoCabana web application, identify exposed Azure access, investigate the connected cloud resources, and locate the secrets needed to complete the room.</p><h3>Step 1: Inspect the JavaScript File</h3><p>The application loaded a publicly accessible app.js file.</p><p>After reviewing the file, an Azure Shared Acces Signature token was discovered.</p><p>The token value has been removed from this writeup.</p><pre>SAS=&quot;&lt;REDACTED_SAS_TOKEN&gt;&quot;</pre><h3>Step 2: List the Storage Containers</h3><p>The SAS token was used with Azure CLI to list the accessible containers:</p><pre>az storage container list \<br>  --account-name cryptocabanaf5scjagc \<br>  --sas-token &quot;$SAS&quot; \<br>  --output table</pre><p>The output revealed an interesting container named:</p><pre>vault</pre><h3>Step 3: List the Blobs</h3><p>The following command was used to list the files inside the vault container:</p><pre>az storage blob list \<br>  --account-name cryptocabanaf5scjagc \<br>  --container-name vault \<br>  --sas-token &quot;$SAS&quot; \<br>  --output table</pre><p>A file named backup-service-account.json was discovered.</p><h3>Step 4: Download the Service Account File</h3><p>The file was downloaded using Azure CLI:</p><pre>az storage blob download \<br>  --account-name cryptocabanaf5scjagc \<br>  --container-name vault \<br>  --name backup-service-account.json \<br>  --file ./backup-service-account.json \<br>  --sas-token &quot;$SAS&quot;</pre><p>The file was then inspected:</p><pre>cat ./backup-service-account.json</pre><p>It contained Azure Service Principal authentication information.</p><p>The credential values have been removed from this writeup.</p><pre>{<br>  &quot;client_id&quot;: &quot;&lt;REDACTED&gt;&quot;,<br>  &quot;client_secret&quot;: &quot;&lt;REDACTED&gt;&quot;,<br>  &quot;tenant_id&quot;: &quot;&lt;REDACTED&gt;&quot;<br>}</pre><h3>Step 5: Authenticate Using the Service Principal</h3><p>The extracted Service Principal was used to authenticate to Azure:</p><pre>az login \<br>  --service-principal \<br>  --username &quot;&lt;CLIENT_ID&gt;&quot; \<br>  --password &quot;&lt;CLIENT_SECRET&gt;&quot; \<br>  --tenant &quot;&lt;TENANT_ID&gt;&quot;</pre><p>The authentication was successful, allowing access to additional Azure resources.</p><h3>Step 6: List the Key Vault Secrets</h3><p>The following command was used to list the secrets stored in the Azure Key Vault:</p><pre>az keyvault secret list \<br>  --vault-name ccabana-kv-f5scjagc \<br>  --output table</pre><p>Three relevant secrets were discovered:</p><pre>key-shard-1<br>key-shard-2<br>key-shard-3</pre><p>Their values are not included in this writeup.</p><h3>Step 7: Retrieve the Secret Shards</h3><p>The first and third secret values were retrieved using:</p><pre>az keyvault secret show \<br>  --name key-shard-1 \<br>  --vault-name ccabana-kv-f5scjagc \<br>  --query value \<br>  --output tsv</pre><pre>az keyvault secret show \<br>  --name key-shard-3 \<br>  --vault-name ccabana-kv-f5scjagc \<br>  --query value \<br>  --output tsv</pre><p>The current value of key-shard-2 did not provide the expected result.</p><p>This suggested that the required value existed in an older version of the secret.</p><h3>Step 8: List Previous Secret Versions</h3><p>Azure Key Vault stores a new version whenever a secret is updated.</p><p>The available versions of key-shard-2 were listed using:</p><pre>az keyvault secret list-versions \<br>  --name key-shard-2 \<br>  --vault-name ccabana-kv-f5scjagc \<br>  --output table</pre><p>The creation dates were compared to identify the older version.</p><h3>Step 9: Retrieve the Old Version</h3><p>The previous version of the secret was retrieved using its version ID:</p><pre>az keyvault secret show \<br>  --name key-shard-2 \<br>  --vault-name ccabana-kv-f5scjagc \<br>  --version &quot;&lt;OLD_VERSION_ID&gt;&quot; \<br>  --query value \<br>  --output tsv</pre><p>This returned the required middle shard.</p><p>The room was completed by combining the three secret values in the correct order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rKEdddYYRclEiZ7aXo9Frw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iaNpRnYrPLXcvgefVmm1-w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=109891465cb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BoroCTF — Cryptography Challenges]]></title>
            <link>https://medium.com/@aa1493264/boroctf-cryptography-challenges-1ef61ea239be?source=rss-561bcd75ae5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ef61ea239be</guid>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[t2]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[boro-ctf]]></category>
            <dc:creator><![CDATA[Ali Ahmed Ali Abdelmaksoud]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 18:01:01 GMT</pubDate>
            <atom:updated>2026-06-17T18:01:01.700Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>BoroCTF Cryptography Challenges</strong></h3><h3><strong>1- A Basic Start</strong></h3><h4><strong>Challenge Description</strong></h4><p>The Boro Cyber Division had been monitoring a group of local hackers. Their messages were previously encoded using Base64, but they changed to a different encoding method. The goal is to identify the new encoding and decode the conversation.</p><h4><strong>Step 1: Decode the Original Message</strong></h4><p>The first encoded message starts with:</p><pre>VXNlcjE6IEhleSwgSSB0aGluay...</pre><p>The character set and the == padding at the end indicate that it is Base64.</p><p>After decoding it, we get:</p><pre>User1: Hey, I think the Boro team is onto us!<br>User2: No Way! They&#39;re going to send the CTF participants after us!<br>User3: It&#39;ll be okay, we&#39;ll move to another base encoding!</pre><p>The final sentence provides an important hint:</p><pre>we&#39;ll move to another base encoding!</pre><p>This suggests that the new message is encoded using another Base encoding format.</p><h4><strong>Step 2: Identify the New Encoding</strong></h4><p>The newly encoded text contains many special characters, including:</p><pre>_ + [ / , # ] &amp; : % { ! . ; @ $ ^ &lt; &gt; |</pre><p>This does not match Base64, because Base64 only uses letters, numbers, /, +, and optional = padding.</p><p>The large range of printable ASCII characters strongly suggests Base91 encoding.</p><h4><strong>Step 3: Decode the Base91 Message</strong></h4><p>Using CyberChef:</p><ol><li>Paste the text under After New encoding.</li><li>Search for the operation:</li></ol><pre>From Base91</pre><ol><li>Apply the operation.</li></ol><p>The decoded message is:</p><pre>User1: Okay we&#39;re on the new encoding.<br>User2: You wonder if anyones ever reading your messages?<br>User1: Nope. boroCTF{B@5ics_0f_B@si6s}</pre><h4><strong>Flag</strong></h4><pre>boroCTF{B@5ics_0f_B@si6s}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q7Q3lsq9dwkS2k2SM3A1lA.png" /></figure><h3><strong>2- Et Tu, Brute</strong></h3><h4><strong>Challenge Description</strong></h4><p>Stabbed by his own men. Each stab wound marked how betrayed he was. Can you reverse the damage?</p><p>The encrypted text is:</p><pre>erurFWI{@iu13qgq0pru3}</pre><h4>Identifying the Cipher</h4><p>The title <strong>“Et Tu, Brute”</strong> is a reference to Julius Caesar, which strongly suggests that the message was encrypted using a <strong>Caesar cipher</strong>.</p><p>A Caesar cipher shifts each alphabetical character by a fixed number of positions.</p><h4>Decoding the Message</h4><p>Trying the traditional Caesar shift of 3, we move every letter three positions backward:</p><pre>e → b<br>r → o<br>u → r<br>r → o<br>F → C<br>W → T<br>I → F</pre><p>Therefore:</p><pre>erurFWI</pre><p>becomes:</p><pre>boroCTF</pre><p>Decoding the entire ciphertext gives:</p><pre>boroCTF{@fr13ndn0mor3}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BKmnx1hPkDsEAGJro_9DQA.png" /></figure><h3>3- Not the Flag</h3><h4>Challenge Description</h4><p><em>So is this not the flag? If its not not, then what else?</em></p><p>The challenge provides the following hexadecimal bytes:</p><pre>9d 90 8d 90 bc ab b9 84 8b 97 ce db a0 96 8c a0 91 cf 8b a0 91 90 8b a0 8b 97 cc a0 99 93 bf 98 82</pre><h4>Identifying the Operation</h4><p>The repeated use of the word <strong>“not”</strong> in both the title and description suggests the use of the <strong>bitwise NOT operation</strong>.</p><p>A bitwise NOT reverses every bit:</p><pre>0 → 1<br>1 → 0</pre><p>For an 8-bit value, it can be calculated as:</p><pre>decoded_byte = encrypted_byte XOR 0xFF</pre><p>For example:</p><pre>9d = 10011101<br>NOT  = 01100010<br>62 = b</pre><p>Applying the same operation to the first four bytes:</p><pre>9d → 62 → b<br>90 → 6f → o<br>8d → 72 → r<br>90 → 6f → o</pre><p>This produces:</p><pre>boro</pre><p>which confirms that the correct operation is bitwise NOT.</p><h4>CyberChef Solution</h4><ol><li>Paste the hexadecimal data into CyberChef.</li><li>Add the <strong>From Hex</strong> operation.</li><li>Add the <strong>NOT</strong> operation.</li></ol><p>The decoded message is:</p><pre>boroCTF{th1$_is_n0t_not_th3_fl@g}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iz0EGZ0UtxGCY5VICFpb0g.png" /></figure><h3>4- Disco</h3><h4>Challenge Description</h4><p>The hexagonal colors are simply beautiful.</p><p>The challenge provides an image containing several colored squares.</p><h4>Identifying the Technique</h4><p>The phrase <strong>“hexagonal colors”</strong> hints at hexadecimal color codes.</p><p>Each color can be represented in RGB hexadecimal format:</p><pre>#RRGGBB</pre><p>For example:</p><pre>RGB(98, 111, 114) → #626f72</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*cSOSV9ERATl0Azll6eVcoQ.png" /></figure><p>Reading the colored squares from left to right and from top to bottom gives:</p><pre>#626f72 → bor<br>#6f4354 → oCT<br>#467b6e → F{n<br>#457633 → Ev3<br><br>#725f6c → r_l<br>#302465 → 0$e<br>#5f596f → _Yo<br>#55345f → U4_<br><br>#426540 → Be@<br>#747d00 → t}</pre><p>The final black squares are empty padding, so they can be ignored.</p><h4>Combining the Hex Values</h4><p>After removing the # symbols and joining the values together:</p><pre>626f726f4354467b6e457633725f6c3024655f596f55345f426540747d00</pre><p>This is valid hexadecimal-encoded ASCII.</p><h4>Decoding the Hexadecimal</h4><p>Using CyberChef:</p><ol><li>Paste the combined hexadecimal string.</li><li>Add the <strong>From Hex</strong> operation.</li></ol><p>The decoded result is:</p><pre>boroCTF{nEv3r_l0$e_YoU4_Be@t}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fg9aX1vr5I3EGsm_6VZ6PA.png" /></figure><h3>5- Babel’s Vault</h3><h4>Challenge Description</h4><p>My friend sent me a random codebase with a Library of Babel implementation. Apparently the author is well known to hide secrets in his code, but I don’t see any here.</p><p>The challenge provides two files:</p><pre>AUTHORSNOTE.txt<br>babel.py</pre><h4>Analysis</h4><p>The Python program provides two options:</p><pre>1) Generate a 940-character page<br>2) Generate a 15x15 image</pre><p>The first important observation is that the text inside AUTHORSNOTE.txt is exactly <strong>940 characters long</strong>.</p><p>This is the same number of characters generated by the page_from_seed() function.</p><p>The program uses the following alphabet:</p><pre>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz., </pre><p>This alphabet contains 55 characters.</p><p>The page_from_seed() function converts a seed into characters using division by 55. This means that the page is created using a Base-55 system.</p><h4>Recovering the Seed</h4><p>Because we already have the generated 940-character page, we can reverse the process.</p><p>The following script:</p><ol><li>Reads AUTHORSNOTE.txt.</li><li>Reads the alphabet and large offset from babel.py.</li><li>Converts every character back to its position in the alphabet.</li><li>Rebuilds the original number.</li><li>Subtracts the offset to recover the seed.</li></ol><pre>import re<br><br># Read the two challenge files<br>with open(&quot;AUTHORSNOTE.txt&quot;, &quot;r&quot;, encoding=&quot;utf-8&quot;) as file:<br>    note = file.read().rstrip(&quot;\n&quot;)<br>with open(&quot;babel.py&quot;, &quot;r&quot;, encoding=&quot;utf-8&quot;) as file:<br>    code = file.read()<br><br># Get the alphabet from babel.py<br>alphabet = re.search(<br>    r&#39;ALPHABET = &quot;([^&quot;]+)&quot;&#39;,<br>    code<br>).group(1)<br><br># Get the large number used in: seed += number<br>page_offset = int(<br>    re.search(r&quot;seed \+= (\d+)&quot;, code).group(1)<br>)<br><br># Reverse the Base-55 process<br>page_number = 0<br>for character in reversed(note):<br>    character_value = alphabet.index(character)<br>    page_number = page_number * 55 + character_value<br><br># Recover the original seed<br>seed = page_number - page_offset<br><br>print(&quot;Recovered seed:&quot;)<br>print(seed)</pre><h4>Using the Recovered Seed to Generate the Image</h4><p>After running the script, it prints a very large seed.</p><p>Next, run the original program:</p><pre>python babel.py</pre><p>Choose option:</p><pre>2</pre><p>Then paste the recovered seed:</p><pre>seed: 3544280111473730708053245299989391042767576758035584864941532983135054385557471251704821961386898312952351964196705929826341249470519527773307760368822866900966805815753783068278548889349543836665523403111718186997472794240513576677869825688599823331092898287899996264278269354262097367564267677985828908400500707121377219995176583385300541638295354464311206278755010401435473144570173464172412737197483163126708640611111755946517658691304892609064813042342902954285745650501185977562418697449354739194065674403430633124423296499205604238088150946292640221318345446017156426656091977240638980387148703351277645718842961379999132951403363512627382489422678491488260403398014102112968841831936470901996301563503272667081474922124353314684967385101874673580717751673824894005780231341138701194842806792826036185271997590257184157891029079248272716184428615345223572737800771414583827486604012918447453378619139203425502567588311766937531579471783883776921510463902447459192002903668439339367698561804477554118223057356090123647104536282589308133717504102614630566883587793581106113480594140252677079605252667084920586048774567258627948087729764085140275916850838797734645018228017677186615682342298879202024669682833247709455595753390238081225529423581678612691506078696488969557625809042278231192266386181580425562138375768960369481077336572739704208027288671754433737184214354385513799418186944719726773638087678099468872627724951847353139326170823503076712157094294102124260693786209747036334374672803533982161185253867480624793999071119742671106483530069107239229961312135991856193140594125119069798791918711379760316393071486770088819</pre><p>The program generates a 15×15 image and also prints its raw RGB values.</p><p>The image looks almost black because most RGB values are very small.</p><p>However, the secret is hidden inside the raw RGB numbers.</p><h4>Extracting the Hidden Indexes</h4><p>The RGB values start like this:</p><pre>0 0 7 0 1 6 0 3 5 0 4 4 ...</pre><p>Joining them produces:</p><pre>007016035044...</pre><p>Splitting the result into groups of three gives:</p><pre>007 016 035 044 103 137 234 255 ...</pre><p>These numbers are indexes inside AUTHORSNOTE.txt.</p><p>For example:</p><pre>Index 007 → b<br>Index 016 → o<br>Index 035 → r<br>Index 044 → o</pre><p>Using all the indexes reveals:</p><pre>boroCTFoneSeedCipherInInfinity</pre><p>Adding the flag braces gives:</p><pre>boroCTF{oneSeedCipherInInfinity}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3nLBLooyvyd3v4oJpzBMiw.png" /></figure><h3>6- Boro Coin 1</h3><h4>Challenge Description</h4><p>We have a government seized Boro Wallet with 51.42 bc before any transactions occurred. Sadly, the suspect refuses to give us the private key. Can you retrieve the key?</p><p>Boro Coin uses standard secp256k1 ECDSA. A transaction hash is generated by taking the SHA-256 of the string format: “sender:recipient:amount” (Colons included!) The JSON will give you all the transactions ever made with the wallet.</p><p>Note: This challenge does not contain a flag. You will need to submit the private key (lowercase hex, no prefix) as the flag. Example: boroCTF{7f2a4b…}</p><h4>Analysis</h4><p>Each ECDSA signature contains two values:</p><pre>(r, s)</pre><p>ECDSA also uses a temporary secret value called the nonce:</p><pre>k</pre><p>The nonce must be unique for every signature.</p><p>If the same nonce is reused, the same r value appears in multiple signatures.</p><p>This allows us to recover the nonce and then calculate the private key.</p><h4>Finding the Repeated r Value</h4><p>After parsing the DER-encoded signatures and comparing their r values, two transactions were found to have the same r value:</p><pre>Transaction 4<br>Transaction 19</pre><p>The repeated value is:</p><pre>r = 2cbda85fc21f5e62f94d8378d2dad1a05bc5d5522d5a717f2bdf1df13d558ec7</pre><p>This confirms that the same nonce was reused.</p><h4>Transaction 4</h4><p>The transaction information is:</p><pre>Sender: Suspect<br>Recipient: FranklinGothic<br>Amount: 21.68</pre><p>The exact string used to generate the hash is:</p><pre>Suspect:FranklinGothic:21.68</pre><p>Its s value is:</p><pre>s1 = 4b2f38c18c2a933f81112350ae048f0162feaaed599f827180944ea3203570de</pre><h4>Transaction 19</h4><p>The transaction information is:</p><pre>Sender: Suspect<br>Recipient: ForeverFlames<br>Amount: 45.46</pre><p>The exact string used to generate the hash is:</p><pre>Suspect:ForeverFlames:45.46</pre><p>Its s value is:</p><pre>s2 = 7db2d815212aab6b986d0a403b724ad5fd57d2d9e826bf2893e29d9d179d59f3</pre><h4>Generating the Transaction Hashes</h4><p>The two hashes are generated using SHA-256:</p><pre>z1 = SHA256(&quot;Suspect:FranklinGothic:21.68&quot;)</pre><pre>z2 = SHA256(&quot;Suspect:ForeverFlames:45.46&quot;)</pre><p>These hashes are needed to recover the reused nonce.</p><h4>Recovering the Nonce</h4><p>When the same nonce is used in two ECDSA signatures, it can be calculated using:</p><pre>k = (z1 - z2) × (s1 - s2)⁻¹ mod n</pre><p>Where n is the order of the secp256k1 curve.</p><p>The recovered nonce is:</p><pre>842d22462a557c342a77a28c521ed84948cdd80167511542ecd88810431625a6</pre><h4>Recovering the Private Key</h4><p>After recovering the nonce, the private key can be calculated using:</p><pre>private_key = (s1 × k - z1) × r⁻¹ mod n</pre><p>The recovered private key is:</p><pre>1b7ba9dafeb7c7a30fd8043a656c3ab89509db070dbd48b593d8e266b56ca22d</pre><h4>Solving with Python</h4><p>The following script searches for a repeated r value and calculates the private key:</p><pre>import hashlib<br>import json<br><br>N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141<br><br>def parse_der(signature_hex):<br>    signature = bytes.fromhex(signature_hex)<br><br>    index = 2<br>    <br>    r_length = signature[index + 1]<br>    r_start = index + 2<br>    r_end = r_start + r_length<br>    r = int.from_bytes(signature[r_start:r_end], &quot;big&quot;)<br>    <br>    index = r_end<br>   <br>    s_length = signature[index + 1]<br>    s_start = index + 2<br>    s_end = s_start + s_length<br>    s = int.from_bytes(signature[s_start:s_end], &quot;big&quot;)<br>    <br>    return r, s<br><br>def get_hash(transaction):<br>    message = (<br>        f&quot;{transaction[&#39;sender&#39;]}:&quot;<br>        f&quot;{transaction[&#39;recipient&#39;]}:&quot;<br>        f&quot;{transaction[&#39;amount&#39;]}&quot;<br>    )<br><br>    return int.from_bytes(<br>        hashlib.sha256(message.encode()).digest(),<br>        &quot;big&quot;<br>    )<br><br><br>with open(&quot;transactions.json&quot;, &quot;r&quot;) as file:<br>    transactions = json.load(file)<br><br><br>seen = {}<br><br>for name, transaction in transactions.items():<br>    r, s = parse_der(transaction[&quot;signature_der&quot;])<br><br>    if r not in seen:<br>        seen[r] = (name, transaction, s)<br>        continue<br><br>    first_name, first_transaction, s1 = seen[r]<br><br>    z1 = get_hash(first_transaction)<br>    z2 = get_hash(transaction)<br><br>    k = (<br>        (z1 - z2)<br>        * pow((s1 - s) % N, -1, N)<br>    ) % N<br><br>    private_key = (<br>        (s1 * k - z1)<br>        * pow(r, -1, N)<br>    ) % N<br><br>    print(&quot;Repeated r found in:&quot;, first_name, &quot;and&quot;, name)<br>    print(&quot;Private key:&quot;, f&quot;{private_key:064x}&quot;)</pre><p>The script produces:</p><pre>Repeated r found in: Transaction 4 and Transaction 19<br><br>Private key:<br>1b7ba9dafeb7c7a30fd8043a656c3ab89509db070dbd48b593d8e266b56ca22d</pre><h4>Flag</h4><pre>boroCTF{1b7ba9dafeb7c7a30fd8043a656c3ab89509db070dbd48b593d8e266b56ca22d}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oq_gGZFTpX8Ek0xNLWZycA.png" /></figure><h3>7- Boro Coin 2</h3><h4>Challenge Description</h4><p>In the previous challenge, we recovered the private key of the suspect’s Boro Coin wallet.</p><p>In this challenge, we need to create a valid transaction signature.</p><p>The transaction must:</p><pre>Send all remaining coins<br>To: Boro_Confiscation_Committee</pre><p>The challenge also tells us to reuse the same nonce from Boro Coin 1.</p><p>The final answer must be the DER-encoded ECDSA signature:</p><pre>boroCTF{signature}</pre><h4>Calculating the Wallet Balance</h4><p>The wallet originally contained:</p><pre>51.42 BC</pre><p>After calculating all incoming and outgoing transactions:</p><pre>Total incoming = 2300.21 BC<br>Total outgoing = 2319.28 BC</pre><p>The remaining balance is:</p><pre>51.42 + 2300.21 - 2319.28 = 32.35 BC</pre><p>Transaction 13 sends coins from Suspect to Suspect, so it does not change the wallet balance.</p><p>Therefore, the new transaction amount is:</p><pre>32.35</pre><h4>Building the Transaction Message</h4><p>The transaction hash format is:</p><pre>sender:recipient:amount</pre><p>The sender is:</p><pre>Suspect</pre><p>The recipient is:</p><pre>Boro_Confiscation_Committee</pre><p>The amount is:</p><pre>32.35</pre><p>Therefore, the exact message is:</p><pre>Suspect:Boro_Confiscation_Committee:32.35</pre><h4>Hashing the Transaction</h4><p>The message is hashed using SHA-256:</p><pre>z = SHA256(&quot;Suspect:Boro_Confiscation_Committee:32.35&quot;)</pre><p>The resulting hash is:</p><pre>3e51ea97b266bc71556ea51d9a47d5407d3f53ffbb1638fb8a86f064d06d71bd</pre><h4>Reusing the Previous Values</h4><p>From Boro Coin 1, we recovered the private key:</p><pre>d = 1b7ba9dafeb7c7a30fd8043a656c3ab89509db070dbd48b593d8e266b56ca22d</pre><p>We also recovered the reused nonce:</p><pre>k = 842d22462a557c342a77a28c521ed84948cdd80167511542ecd88810431625a6</pre><p>Because we are reusing the same nonce, the r value stays the same:</p><pre>r = 2cbda85fc21f5e62f94d8378d2dad1a05bc5d5522d5a717f2bdf1df13d558ec7</pre><h4>Generating the New Signature</h4><p>The ECDSA s value is calculated using:</p><pre>s = k⁻¹ × (z + r × d) mod n</pre><p>Where:</p><ul><li>z is the new transaction hash.</li><li>r is the repeated signature value.</li><li>d is the private key.</li><li>k is the reused nonce.</li><li>n is the order of the secp256k1 curve.</li></ul><p>The new s value is:</p><pre>033a47e398c6d81b053a235884c13b41f5618a6fa85715198a09beefdd5c3342</pre><p>The new ECDSA signature values are:</p><pre>r = 2cbda85fc21f5e62f94d8378d2dad1a05bc5d5522d5a717f2bdf1df13d558ec7<br>s = 033a47e398c6d81b053a235884c13b41f5618a6fa85715198a09beefdd5c3342</pre><h4>Encoding the Signature</h4><p>The challenge expects the signature in DER format.</p><p>The DER structure is:</p><pre>30 [length]<br>   02 [r length] [r]<br>   02 [s length] [s]</pre><p>After encoding r and s, the final signature is:</p><pre>304402202cbda85fc21f5e62f94d8378d2dad1a05bc5d5522d5a717f2bdf1df13d558ec70220033a47e398c6d81b053a235884c13b41f5618a6fa85715198a09beefdd5c3342</pre><h4>Flag</h4><pre>boroCTF{304402202cbda85fc21f5e62f94d8378d2dad1a05bc5d5522d5a717f2bdf1df13d558ec70220033a47e398c6d81b053a235884c13b41f5618a6fa85715198a09beefdd5c3342}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OLvt4pabghkYLgPqv9PufQ.png" /></figure><h3>8- Efficient Encryption</h3><h4>Challenge Description</h4><p>I forgot my flag on the top shelf but i’m too short to reach it :’(. Can you grab it for me?</p><p><em>Note</em> — This challenge does not contain the flag format. Example answer: boroCTF{S0lv3d}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*6CzawurkCBRp6VAzyNwiSA.png" /></figure><h4>Identifying the Puzzle</h4><p>The image looks like a Sudoku puzzle.</p><p>Instead of the numbers 1–9, it uses these nine symbols:</p><pre>@<br>1<br>A<br>L<br>N<br>Q<br>R<br>S<br>T</pre><p>The normal Sudoku rules still apply:</p><ul><li>Every row must contain all nine symbols.</li><li>Every column must contain all nine symbols.</li><li>Every 3×3 box must contain all nine symbols.</li></ul><h4>Solving the Grid</h4><p>The completed grid is:</p><pre>L  @  T | 1  N  S | Q  A  R<br>1  S  R | T  Q  A | L  @  N<br>N  Q  A | L  @  R | T  1  S<br>------- + ------- + -------<br>@  A  1 | R  S  L | N  Q  T<br>S  R  N | Q  T  1 | A  L  @<br>Q  T  L | @  A  N | S  R  1<br>------- + ------- + -------<br>T  1  S | A  R  Q | @  N  L<br>A  L  @ | N  1  T | R  S  Q<br>R  N  Q | S  L  @ | 1  T  A</pre><h4>Reading the Top Shelf</h4><p>The challenge says that the flag is on the <strong>top shelf</strong>.</p><p>Therefore, we read the first row from left to right:</p><pre>L @ T 1 N S Q A R</pre><p>Joining the characters gives:</p><pre>L@T1NSQAR</pre><p>The beginning uses leetspeak:</p><pre>@ → A<br>1 → I</pre><p>So the text represents:</p><pre>LATIN SQUARE</pre><p>This also describes the structure used by the puzzle.</p><h4>Flag</h4><pre>boroCTF{L@T1NSQAR}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HrCQ9ud1-IwDKHADH2nb5A.png" /></figure><h3>9- Flipper’s Dilemma</h3><h4>Challenge Description</h4><p>Why do we flip a coin when we have to make a hard choice? Maybe the flipping here isn’t so random. I flipped it once yet still 0x15 times.</p><p>wzgzVASnS4|eE${J%`&gt;h</p><h4>Identifying the Technique</h4><p>The word <strong>flipping</strong> hints at the XOR operation.</p><p>XOR can flip individual bits depending on the key being used.</p><p>The value:</p><pre>0x15</pre><p>is a hexadecimal number and represents the XOR key.</p><p>Therefore, each character of the encrypted text must be XORed with:</p><pre>0x15</pre><h4>Testing the First Character</h4><p>The first encrypted character is:</p><pre>w</pre><p>Its ASCII hexadecimal value is:</p><pre>w → 0x77</pre><p>XORing it with 0x15:</p><pre>0x77 XOR 0x15 = 0x62</pre><p>The ASCII character represented by 0x62 is:</p><pre>b</pre><p>This confirms that XOR with 0x15 is the correct technique.</p><h4>Decoding with CyberChef</h4><p>Using CyberChef:</p><ol><li>Paste the encrypted text:</li></ol><pre>wzgzVASnS4|eE${J%`&gt;h</pre><ol><li>Add the <strong>XOR</strong> operation.</li><li>Set the key format to <strong>Hex</strong>.</li><li>Enter the key:</li></ol><pre>15</pre><p>The decoded result is:</p><pre>boroCTF{F!ipP1n_0u+}</pre><h4>Flag</h4><pre>boroCTF{F!ipP1n_0u+}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uP6GSGohFlk_iaoKCnZEBg.png" /></figure><h3>10- So Many Layers</h3><h4>Challenge Description</h4><p>Makes me cry.</p><p>00110101 00111001 00110110 01000100 00110011 00111001 00110111 00111001 00110110 00110010 00110011 00110000 00110100 01000101 00110101 00110101 00110101 00110010 00110110 01000101 00110111 00110100 00110100 01000100 00110100 00111001 00110101 00110111 00110111 00110011 00110111 01000001 00110101 00111000 00110011 00110010 00110100 00110110 00110100 01000110 00110101 00111000 00110111 01000001 00110100 00110010 00110111 00110101 00110100 01000100 00110101 00110111 00110011 00111001 00110111 00110101 00110101 00111000 00110110 01000101 00110011 00110000 00110011 01000100</p><h4>Decoding the Binary Layer</h4><p>Each group contains eight binary bits, representing one ASCII character.</p><p>For example:</p><pre>00110101 → 5<br>00111001 → 9<br>00110110 → 6<br>01000100 → D</pre><p>Converting all complete binary groups to ASCII gives:</p><pre>596D397962304E55526E744D4957737A5832464F587A42754D573975586E303D</pre><p>Identifying the Hexadecimal Layer</p><p>The result contains only hexadecimal characters:</p><pre>0–9<br>A–F</pre><p>Therefore, the next layer is hexadecimal encoding.</p><p>Decoding the hexadecimal string gives:</p><pre>Ym9yb0NURntMIWszX2FOXzBuMW9uXn0=</pre><h4>Identifying the Base64 Layer</h4><p>The new result has the format of a Base64-encoded string.</p><pre>Ym9yb0NURntMIWszX2FOXzBuMW9uXn0=</pre><h4>Flag</h4><pre>boroCTF{L!k3_aN_0n1on^}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1O5-AyRYsZhqrcvReCg8Rw.png" /></figure><h3>11- Flight</h3><h4>Challenge Description</h4><p>dark, darker, yet darker.</p><p>♌︎□︎❒︎□︎👍︎❄︎☞︎❀︎⬥︎✋︎■︎♑︎📂︎■︎🕯︎♉︎✏︎⧫︎❝︎</p><p>The description says:</p><pre>dark, darker, yet darker.</pre><h4>Identifying the Technique</h4><p>The title <strong>Flight</strong> hints at the word:</p><pre>Wings</pre><p>The phrase “dark, darker, yet darker” also hints at the character W. D. Gaster from Undertale.</p><p>Gaster is commonly connected with the <strong>Wingdings</strong> font.</p><p>Therefore, the provided symbols should be decoded as Wingdings.</p><h4>Decoding the Symbols</h4><p>Using a Wingdings translator, the symbols decode as follows:</p><pre>♌︎□︎❒︎□︎ → boro</pre><pre>👍︎❄︎☞︎ → CTF</pre><pre>❀︎ → {</pre><pre>⬥︎✋︎■︎♑︎ → wIng</pre><pre>📂︎■︎🕯︎ → 1n&#39;</pre><pre>♉︎✏︎⧫︎ → _!t</pre><pre>❝︎ → }</pre><h4>Combining the Result</h4><p>Joining all the decoded parts gives:</p><pre>boroCTF{wIng1n&#39;_!t}</pre><h4>Flag</h4><pre>boroCTF{wIng1n&#39;_!t}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TtLNZCZJaOhh4zn4s-QsVg.png" /></figure><h3>12- Qwerty!</h3><h4>Challenge Description</h4><p>I am so very sorry…. I made a lot of typos :(</p><p>I should rot in hell 😭</p><p>?AEAGJ8NJF,\0[d5JcE-</p><h4>Identifying the First Layer</h4><p>The word:</p><pre>rot</pre><p>suggests using a ROT cipher.</p><p>Because the encrypted text contains letters, numbers, and symbols, ROT13 is not enough.</p><p>ROT47 is more suitable because it works with printable ASCII characters, including:</p><pre>Letters<br>Numbers<br>Symbols</pre><h4>Applying ROT47</h4><p>Applying ROT47 to:</p><pre>?AEAGJ8NJF,\0[d5JcE-</pre><p>produces:</p><pre>nptpvyg}yu[-_,5dy4t\</pre><p>The result is still unreadable, so another layer remains.</p><h4>Identifying the Keyboard Shift</h4><p>The challenge title is:</p><pre>Qwerty!</pre><p>The description also mentions many typing mistakes.</p><p>Looking at the ROT47 result, every character appears to be the key directly to the right of the intended character on a QWERTY keyboard.</p><p>For example:</p><pre>n → b<br>p → o<br>t → r<br>p → o<br>v → c<br>y → t<br>g → f<br>} → {</pre><p>Reading the key directly to the left of every character gives:</p><pre>boroctf{typ0)m4st3r]</pre><h4>Correcting the Remaining Typos</h4><p>The challenge says that the author made several typos.</p><p>The remaining mistakes are:</p><pre>ctf → CTF</pre><p>The Shift key was not used.</p><pre>) → _</pre><p>These are nearby keys on the number row.</p><pre>] → }</pre><p>These use the same keyboard key, but } requires Shift.</p><p>After correcting the mistakes, we get:</p><pre>boroCTF{typ0_m4st3r}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DKBotocOz7g8DSwzjzJEPw.png" /></figure><h3>13- Anatomically Incorrect</h3><h4>Challenge Description</h4><p>Hey, I found this random assortment of characters on the ground in class. What does it mean?</p><p>1s2 2s2 2p6 3s2 3p6 4s2 3d10 4p4 1s2 2s2 2p6 3s2 3p6 1s2 2s2 2p6 3s2 3p6 4s2 3d3 1s2 2s2 2p6 3s2 3p6 4s2 3d10 4p6 5s2 4d2 1s2 2s2 2p6 3s2 3p6 4s2 3d10 4p6 5s2 4d10 5p6 6s2 4f14 5d10 6p6 7s2 5f13 1s2 2s2 2p6 3s2 3p4 1s2 2s2 1s2 2s2 2p6 3s2 3p6 4s2 3d10 4p6 5s2 4d10 5p6 6s2 4f14 5d10 6p6 7s2 5f14 6d9 1s2 2s2 2p6 3s2 3p6 4s2 3d10 4p6 5s2 4d10 5p6 6s2 4f14 5d10 6p6 7s2 5f14 6d10 7p3 1s2 2s2 2p6 3s2 3p6 4s2 3d10 4p6 5s2 4d10 5p6</p><p>This challenge does not contain boroCTF in the solution. Please put in the format boroCTF{ExAmPlE}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zGE3I7j_mJgCFeGyWDzS3w.png" /></figure><h4>Identifying the Technique</h4><p>The values such as:</p><pre>1s2<br>2s2<br>2p6<br>3s2</pre><p>are electron configurations.</p><p>Each complete electron configuration represents one chemical element.</p><p>A new configuration begins whenever 1s2 appears again.</p><p>For example, the first configuration is:</p><pre>1s2 2s2 2p6 3s2 3p6 4s2 3d10 4p4</pre><p>To find the element, add the number of electrons:</p><pre>2 + 2 + 6 + 2 + 6 + 2 + 10 + 4 = 34</pre><p>Atomic number 34 is Selenium:</p><pre>Se</pre><h4>Separating the Configurations</h4><p>Splitting the provided text whenever a new 1s2 appears gives ten electron configurations.</p><p>Adding the electron values produces:</p><pre>34<br>18<br>23<br>40<br>101<br>16<br>4<br>111<br>115<br>54</pre><p>These atomic numbers represent:</p><pre>34  → Se<br>18  → Ar<br>23  → V<br>40  → Zr<br>101 → Md<br>16  → S<br>4   → Be<br>111 → Rg<br>115 → Mc<br>54  → Xe</pre><h4>Using the Incorrect Periodic Table</h4><p>The title is:</p><pre>Anatomically Incorrect</pre><p>The positions in the circular table represent elements, but the characters written inside the positions are incorrect.</p><p>We locate each atomic number in the provided table and read the characters written in its position:</p><pre>34  → I<br>18  → F<br>23  → Oo<br>40  → N<br>101 → Ed<br>16  → Ht<br>4   → E<br>111 → Fl<br>115 → Ag<br>54  → S</pre><h4>Combining the Characters</h4><p>Joining the characters in the same order gives:</p><pre>I + F + Oo + N + Ed + Ht + E + Fl + Ag + S</pre><p>The final result is:</p><pre>IFOoNEdHtEFlAgS</pre><p>The capitalization must be preserved exactly as it appears in the table.</p><h4>Flag</h4><pre>boroCTF{IFOoNEdHtEFlAgS}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q74w8mDjJsjh28nAydCk4A.png" /></figure><h3>14- Johnny Boy</h3><h4>Challenge Description</h4><p>One of our sysadmins recently quit after we had our third data breach this year. We need to access the logs of the time before he left but they are all in encrypted zips. We remember he used pretty similar passwords each time.</p><h4>Identifying the Technique</h4><p>Reading the archive names in order gives:</p><pre>USE JOHN THE RIPPER</pre><p>This tells us to use <strong>John the Ripper</strong> to recover the ZIP passwords.</p><p>For every archive, we first extract its password hash using zip2john.</p><p>Then, we crack the hash using the rockyou.txt wordlist.</p><h4>Cracking the First Archive</h4><p>Convert the first ZIP file into a format supported by John:</p><pre>zip2john a_USE.zip &gt; use_hash.txt</pre><p>Run John with the RockYou wordlist:</p><pre>john --wordlist=/usr/share/wordlists/rockyou.txt use_hash.txt</pre><p>The recovered password is:</p><pre>chips</pre><p>Extract the archive:</p><pre>7z x a_USE.zip</pre><p>Enter:</p><pre>chips</pre><h4>Cracking the Second Archive</h4><p>Generate the hash:</p><pre>zip2john b_JOHN.zip &gt; john_hash.txt</pre><p>Crack it:</p><pre>john --wordlist=/usr/share/wordlists/rockyou.txt john_hash.txt</pre><p>The recovered password is:</p><pre>fishandchips</pre><p>Extract the archive:</p><pre>7z x b_JOHN.zip</pre><p>The log contains messages warning that the password is insecure:</p><pre>[2026] INFO PASSWORD INSECURE PLEASE MOVE LOGS<br>[2026] MESSAGE SYSADMIN &quot;fine I&#39;ll move them&quot;</pre><h3>Cracking the Third Archive</h3><p>Generate the hash:</p><pre>zip2john c_THE.zip &gt; the_hash.txt</pre><p>Run John:</p><pre>john --wordlist=/usr/share/wordlists/rockyou.txt the_hash.txt</pre><p>The password is:</p><pre>sunchips</pre><p>Extract the archive:</p><pre>7z x c_THE.zip</pre><p>The log contains another warning:</p><pre>[2026] INFO PLEASE MAKE BETTER PASSWORDS<br>[2026] SYSADMIN MESSAGE &quot;NO&quot;</pre><h4>Identifying the Password Pattern</h4><p>The recovered passwords are:</p><pre>chips<br>fishandchips<br>sunchips</pre><p>All three passwords contain the word:</p><pre>chips</pre><p>This confirms the challenge description that the system administrator used very similar passwords.</p><h4>Cracking the Final Archive</h4><p>Generate the final hash:</p><pre>zip2john d_RIPPER.zip &gt; ripper_hash.txt</pre><p>A normal RockYou attack does not recover the password:</p><pre>john --wordlist=/usr/share/wordlists/rockyou.txt ripper_hash.txt</pre><p>The administrator probably modified a common password slightly.</p><p>John can automatically create password variations using rules:</p><pre>john --wordlist=/usr/share/wordlists/rockyou.txt --rules ripper_hash.txt</pre><p>The recovered password is:</p><pre>chip!</pre><p>The administrator changed:</p><pre>chips → chip!</pre><h4>Reading the Final Log</h4><p>Extract the archive:</p><pre>7z x d_RIPPER.zip</pre><p>Enter the password:</p><pre>chip!</pre><p>Read the log:</p><pre>cat RIPPER.log</pre><p>The output contains:</p><pre>[2026] ALL PASSWORDS HAVE BEEN BREACHED<br>[2026] SYSADMIN MESSAGE &quot;boroCTF{L@_R11pP3r;}&quot;</pre><h4>Flag</h4><pre>boroCTF{L@_R11pP3r;}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NyPLxvWdvTkAG2SC0lR2UA.png" /></figure><blockquote>Best Regards,</blockquote><blockquote>Vli_T2</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iaNpRnYrPLXcvgefVmm1-w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ef61ea239be" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>