<?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 Hatem on Medium]]></title>
        <description><![CDATA[Stories by Ali Hatem on Medium]]></description>
        <link>https://medium.com/@shadow._.?source=rss-cd3590cf8630------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MNSR5xJlAdRzn86sp8KXOA.jpeg</url>
            <title>Stories by Ali Hatem on Medium</title>
            <link>https://medium.com/@shadow._.?source=rss-cd3590cf8630------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 17:39:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shadow._./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[My eCIR V2 Review ]]></title>
            <link>https://medium.com/@shadow._./my-ecir-v2-review-a16a34dcc0ff?source=rss-cd3590cf8630------2</link>
            <guid isPermaLink="false">https://medium.com/p/a16a34dcc0ff</guid>
            <dc:creator><![CDATA[Ali Hatem]]></dc:creator>
            <pubDate>Tue, 23 Sep 2025 19:58:58 GMT</pubDate>
            <atom:updated>2025-09-23T19:58:58.406Z</atom:updated>
            <content:encoded><![CDATA[<p>Sharing concise feedback on the newest release — great for anyone stepping into Incident Response.</p><p>Why eCIR? 🎯</p><p>Hands-on cert focused on incident detection, analysis, and response — practical skills you’ll actually use.</p><p>Core Skills 🧩</p><p>PCAP analysis · Threat Detection · SIEM operations (Wazuh)</p><p>Course (6 sections) 📚</p><p>1-SOC intro</p><p>2-IR: Preparation</p><p>3-IR: Detection</p><p>4-IR: Analysis</p><p>5-CTI &amp; Threat Hunting (not in the exam)</p><p>6-Digital Forensics</p><p>Exam (V2) ⏱️</p><p>10 hours · instant result ✅ · 60 questions (~34 MCQ + 26 fill-in with fixed format)</p><p>Tools/data: Wazuh SIEM, PCAP, EVTX</p><p>Random order; multiple paths to answers (PCAP or SIEM).</p><p>Don’t overlook the Disk and TOOLS folder.</p><p>Tips 💡</p><p>• Skim all questions first, then sort: quick wins → deeper analysis.</p><p>• Master the SIEM; respect the answer format (case/date/IP/hash).</p><p>• Grab easy MCQs early, then do the heavier dives.</p><p>Resources 🔗</p><p>CyberDefenders (e.g., maldoc101) · TryHackMe &amp; CyberDefenders labs</p><p>Bottom line 🏁</p><p>A practical exam that tests an analyst mindset. If you’re solid on SIEM + PCAP + EVTX and manage time well, you’re set. 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*uc5xG-pb03XtNs1Fpv108Q.png" /></figure><p>#eCIR #V2 #BlueTeam #IncidentResponse #SIEM #Wazuh #PCAP #EVTX #CyberSecurity #Review</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a16a34dcc0ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EasyWinCrack — write up]]></title>
            <link>https://medium.com/@shadow._./easywincrack-write-up-07ba1fc0e527?source=rss-cd3590cf8630------2</link>
            <guid isPermaLink="false">https://medium.com/p/07ba1fc0e527</guid>
            <dc:creator><![CDATA[Ali Hatem]]></dc:creator>
            <pubDate>Sat, 02 Aug 2025 18:30:28 GMT</pubDate>
            <atom:updated>2025-08-02T18:39:20.684Z</atom:updated>
            <content:encoded><![CDATA[<h3>EasyWinCrack — write up</h3><h3>Overview</h3><p>The target binary is a .NET executable protected with <a href="http://agile.net/">Agile.NET</a> obfuscation. The goal was to analyze the application’s license verification logic and retrieve or bypass the correct serial key.</p><h3>1. File Inspection</h3><p>Using the file utility:</p><pre>PE32 executable (GUI) Intel 80386 Mono/.Net assembly</pre><p>This confirms that the binary is a .NET assembly and can be decompiled easily with tools like dnSpy.</p><h3>2. Decompilation with dnSpy</h3><p>Opening the file in dnSpy, the code was obfuscated using <a href="http://agile.net/">Agile.NET</a>. Despite mangled names, several key methods were identified:</p><ul><li>Encrypt(string, string, string)</li><li>Decrypt(string, string, string)</li><li>oRM=(string) – responsible for decoding obfuscated strings used throughout the binary</li></ul><p>The Decrypt method performs AES decryption using a key and IV passed through the oRM=() decoder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*UlN6w_cfDhUWKXG8rlMpAA.png" /></figure><h3>3. Analyzing oRM=() String Decoder</h3><p>The oRM= function performs a character-by-character XOR operation against a static byte array (pRM) of 105 bytes.</p><p>A custom Python script was written to replicate the decoder logic and reveal the original strings passed into the decryption function.</p><h3>4. Locating Decryption Call</h3><p>Inside a method named pBM=(), the actual call to Decrypt was found:</p><pre>private void pBM=()<br>{<br>    string key = oRM=(&quot;...&quot;);<br>    string iv = oRM=(&quot;...&quot;);<br>    string cipher = oRM=(&quot;...&quot;);<br>    Decrypt(cipher, key, iv);<br>}</pre><p>All three parameters are obfuscated strings decoded at runtime by oRM=().</p><h3>5. Recovering Decoded Values</h3><p>After applying the XOR decryption using the reconstructed pRM array, the following values were retrieved:</p><ul><li><strong>Key</strong>: @7xWz!eL0#vFqN1uYp$3Kd9*Rb^Hs2Gt</li><li><strong>IV</strong>: Qz8!bV@pL#5xMn1$</li><li><strong>Cipher (Base64)</strong>: fp6znETl5rxI1ZWJU1mO/WsK9Wq2yVh/P+TFrOqoaAUasPOYHY/m4atQgSjrx6Pf</li></ul><h3>6. AES Decryption Process</h3><p>A Python script was used to perform AES decryption in CBC mode with PKCS7 padding, using the extracted key and IV:</p><pre>from Crypto.Cipher import AES<br>from base64 import b64decode<br>from Crypto.Util.Padding import unpad<br>key = b&quot;@7xWz!eL0#vFqN1uYp$3Kd9*Rb^Hs2Gt&quot;<br>iv = b&quot;Qz8!bV@pL#5xMn1$&quot;<br>cipher_b64 = &quot;fp6znETl5rxI1ZWJU1mO/WsK9Wq2yVh/P+TFrOqoaAUasPOYHY/m4atQgSjrx6Pf&quot;<br>cipher = AES.new(key, AES.MODE_CBC, iv)<br>decrypted = unpad(cipher.decrypt(b64decode(cipher_b64)), AES.block_size)<br>print(decrypted.decode())</pre><p>The decrypted output:</p><pre>2d65ddb3b015a017f061257cf2daa8831</pre><h3>7. Final Result</h3><p>The extracted string is the correct serial key required by the application:</p><p><strong>Valid Serial Key:</strong></p><pre>2d65ddb3b015a017f061257cf2daa8831</pre><h3>8. Flag</h3><pre>NCSC{2d65ddb3b015a017f061257cf2daa8831}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07ba1fc0e527" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[writeup forensics /METACTF]]></title>
            <link>https://medium.com/@shadow._./writeup-forensics-metactf-85b8779b14f1?source=rss-cd3590cf8630------2</link>
            <guid isPermaLink="false">https://medium.com/p/85b8779b14f1</guid>
            <dc:creator><![CDATA[Ali Hatem]]></dc:creator>
            <pubDate>Fri, 27 Jun 2025 08:48:16 GMT</pubDate>
            <atom:updated>2025-06-27T08:50:49.495Z</atom:updated>
            <content:encoded><![CDATA[<p>writeup for the <strong>Internal Investigation</strong> and <strong>GCM</strong> challenge in the <strong>Forensics</strong> category of the <strong>METACTF</strong> competition</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*_mGNdme-HIkK56sXz2SOSw.png" /></figure><p>At the beginning, I opened the file using <strong>FTK Imager</strong>. After a bit of searching, I discovered that there was an image downloaded by Khaled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CKGmz-8uCGbliDG_TSBzmA.png" /></figure><p>I used <strong>ExifTool</strong> to investigate any hidden information within the image.<br>and I found this cipher text :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8GUjNUk0WOq4iwra59Nl0A.png" /></figure><p>I tried decrypting the cipher text, but it didn’t work. Most likely, I need a key.</p><p>After that, I went to the Recycle Bin to look for any deleted files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fXPMgfL5A5wlAwYuUkU8Vw.png" /></figure><p>I found some files and converted them to CSV format using <strong>APT-Hunter</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M5ksUxMM_66vi6pak32Xdg.png" /></figure><p>Then, I searched further and found an <strong>encrypted command</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WL-F2u1Qy1d-ABGVUCHabw.png" /></figure><p>After decrypting the command, I found something: an <strong>IV</strong> and a <strong>key </strong>and <strong>salt</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hINrGD5kPS-bX3ohph-w0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*eYB6EYEfeqxTO_ta1zSWwQ.png" /></figure><p>try to decrypt using python</p><pre>from base64 import b64decode<br>from Crypto.Cipher import AES<br>from Crypto.Protocol.KDF import PBKDF2<br><br>cipher_text = &quot;csNYeVjbZWVtgUmK6uF2hOkI9JTUhqaUo/nLYBRPf+h6tOq6sGUEzryuB6xWMMQ+iyHSbTkRHpLzg1hURfh/f/rjGGHypoJLI9LMTGN7+XI=&quot;<br>raw = b64decode(cipher_text)<br><br>secret = &quot;S3cr3tKey123&quot;<br>salt_val = b&quot;CTFSalt2024&quot;<br>initial_vector = bytes(&quot;InitVector123&quot;.ljust(16), &quot;utf-8&quot;)<br>derived_key = PBKDF2(secret, salt_val, dkLen=32, count=1000)<br><br>aes = AES.new(derived_key, AES.MODE_CBC, initial_vector)<br>output = aes.decrypt(raw)<br><br>unpadded = output[:-output[-1]]<br>result = unpadded.decode()<br><br>print(result)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*Bi8k9VCF4r_kLYOKtU0jWw.png" /></figure><p>Alright, we found the key. Now, the next step was to search for the file.<br> After extensive searching, I couldn’t find any compressed file or anything similar.<br> But then I thought — what if it was accessed through the <strong>browser history</strong>?</p><p>Let’s extract the <strong>browser history</strong> file located at:<br> AppData\Local\Microsoft\Edge\User Data\Default\History</p><p>Using <strong>DB Browser for SQLite</strong>, let’s take a closer look and investigate.</p><p>Finally, I found a link to a file named <strong>secret</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mrneARWyGf1sh5k2SlzVVA.png" /></figure><p>At the link, I found a compressed file and a text file stating that the password for the compressed file is the password we found earlier plus the <strong>childhood nickname</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1_HzxTl7Rlyj9Oe2TODaKA.png" /></figure><p>Okay, I searched for the nickname — whether in images or elsewhere — but didn’t find anything.<br> Then I thought of an idea: to find it through the <strong>security questions</strong>.</p><p>Extracting the <strong>SAM</strong> file and using <strong>Registry Explorer</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OiItH_k7W0j6HPeKxREQOg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2eOtzcMR75Dc5dwq9_t9A.png" /></figure><p>Now, we can extract the file and get flag .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*baUmHzF6tIGZHXIDvXyM4A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*MrM6uh_0hZ6RMzE9Pyc8og.png" /></figure><p>I started by inspecting the PCAP file using tshark to extract HTTP POST request payloads, since exfiltrated data is often sent via POST.</p><p>I ran this command:</p><pre>tshark -r challenge.pcap -Y &#39;http.request.method == &quot;POST&quot;&#39; -T fields -e http.file_data</pre><p>What caught my eye was a consistent plaintext prefix in every POST payload: the string &quot;vectorsecret&quot;. Following that was what looked like encrypted binary data.</p><h4>From the traffic and some metadata, I deduced the data was encrypted with <strong>AES in GCM mode</strong>, a common choice for secure communications. AES-GCM requires an Initialization Vector (IV), or nonce, exactly 12 bytes long.</h4><p>Interestingly, &quot;vectorsecret&quot; is exactly 12 bytes, so I assumed it was the IV used throughout the communication — although using a fixed IV is not ideal security-wise, it’s common in CTFs.</p><p>Also, I found the encryption key in the metadata, represented as a hex string. After converting it to bytes, it was ready for decryption.</p><h4>Each chunk of the captured data contained:</h4><ul><li>The &quot;vectorsecret&quot; prefix (the IV)</li><li>The encrypted ciphertext</li><li>And a 16-byte authentication tag at the end (used by AES-GCM for integrity)</li></ul><p>I stripped the &quot;vectorsecret&quot; part from each chunk and kept the remaining ciphertext + tag for decryption.</p><h4>Decrypting with Python</h4><p>Using Python’s pycryptodome library:</p><ul><li>I loaded the encryption key and IV</li><li>For each data chunk, I decrypted it with AES-GCM, verifying the tag to ensure data integrity</li><li>Then concatenated all decrypted chunks to reconstruct the original file</li><li>Finally, I computed the SHA-256 hash of the fully recovered data</li></ul><pre>from Crypto.Cipher import AES<br>import hashlib<br>import binascii<br><br>key_hex = &quot;6433616462333366643361646233336664336164623333666433616462333366&quot;<br>key = bytes.fromhex(key_hex)<br><br>nonce = b&quot;vectorsecret&quot;<br><br>chunks_hex = [<br>    &quot;bfc4a6f9da8d8ea4bed10aab94a4b9315ff119d613acf14777d9ebe832d8d1d8d41a6f5967f569160708b220136c2628f106d053ec6206f430eb985995536d9f8a7d71f7b17a642c3149314292a5c4ea&quot;,<br>    &quot;ab92abbfd791dfb1bed65ba898a5ec6658a04bd215abf64260d8e9ef32d8d5ddd91a6c0c62f16940575fb3274030727bac55dd57e43050f834bdcd5b96586ec83529c5d7c195105d56d7fd80c6835db0&quot;,<br>    &quot;ffcdffb8d2cd8fb9ee870eab91f5ba3059f34b8142fca64135d1bbe93684d6d2de116f5e69f463180d03be7a483f2e22f36daa30993a43fb76eb9d0fc25b6bc82ee10f35c8f22debdd46a6fd5e11f9e7&quot;,<br>    &quot;f49af0ecd39f89b8bb910cf291a4ed310cf84cd017a1f743378febe9358c82df89406f5263a16b125158e273456e2328fa508656e26152fa6bbbcf5fca5b6f930013e7d8bd31463d8868c01783dc26b1&quot;,<br>    &quot;fa99aae8d3cddee6ed875bfac5a8ec330fa34f8445fca212358fbfe7308f848b8912695335f638470058b1204b30217ba802d156b43101af61ec9809c35f68ccd686ea961c4cec5bd30c3308bfba1082&quot;,<br>    &quot;fc98f1eb819ed9e1bbd303fb96a5b96459f64bd713a3f74d6ad2b3e73d86d0d0d718570e32a1344e5a00a375563c777af956d354e2365efb33eb980a964e38993ee700891833bfc657984c235a4330dc&quot;,<br>    &quot;ac93a8bcd89cd9b2eb840da892a5ea625df64a8444afa64e65d3efee36dad4d98943395d61f56b17520db3754130717bab04d706e23356a964b8980d905e69cb753aec9b0cd42ec09023cfa7098e7ca1&quot;,<br>    &quot;ff93aaef859883e1ea870ffbc0a3b0635aa54ad115aef24265ddbbec678bd2d9881b6b5f60f16c400458be72456e7179f002d555b16251f86be99c59c75f669bf7ebc2c25bf8a3304173aae718ba9fe0&quot;,<br>    &quot;fa9ffab5d2988cb2eb8f09f098a9b06b54fb4fdf1da3cd1d3685e1b76acfddced806695b32a16a110258b57a4a6b712fad57c155e26504a833ee9c5c96526492636099db69af56892a68494773b69306&quot;,<br>    &quot;fcc8f0ef829ddfb5bcd75caf93a9be3054f14ed311a9f314648db9ee348cde8cde1a685a65a66f435558b272403f772eaa56d702e13255fb31bb9855900969cfbcc12de51176d0d13787f81d76ca4610&quot;,<br>    &quot;ac98fce883cc83b8e68d58fcc7f6b0610ea24ddd46abf74e65d9eeea67df868cd91a6b5830f66c13525cbe70143e2d79f954845de43754fe60b59d59c15e669a222aef6d2f3d4ffa9b308ba119c4c809&quot;,<br>    &quot;f792f0b4d99081b7e58f03c0c5ffea3908b342c111bda21335daebe931d9ded9d91a395962a67d10060de57b106c727dfc5fd05ee76105ff33ec9109cb5f39ce02cb62e22f8437dbc6ea6d06947013a3&quot;,<br>    &quot;ae9cadb8d491d9e1bd820afb98f2b1635ff448d113aea34563dcecb8668cd08f8c166f5836f66d14560ab7201431707eaf01d054b33150fc37e9cd54960e699c9e1626409130f3612adefb904567c2ba&quot;,<br>    &quot;f8cdabba81cf8cb9b98d0daf99a4bd6a59f71a8445a8f71631d9bbef678ed789dd1b680e6af03d1b050db5714b392621fb53df57ef395ef46bb4935bc9506672e155b72e9916014457592a6102e8ee&quot;<br>]<br><br><br>decrypted = []<br><br>for hex_chunk in chunks_hex:<br>    data = bytes.fromhex(hex_chunk)<br>    ciphertext = data[:-16]<br>    tag = data[-16:]<br><br>    cipher = AES.new(key, AES.MODE_GCM, nonce=nonce)<br>    try:<br>        pt = cipher.decrypt_and_verify(ciphertext, tag)<br>        decrypted.append(pt)<br>    except Exception as e:<br>        print(f&quot;Error decrypting chunk: {e}&quot;)<br><br>all_data = b&#39;&#39;.join(decrypted)<br><br>with open(&quot;recovered_data.bin&quot;, &quot;wb&quot;) as f:<br>    f.write(all_data)<br><br>hashval = hashlib.sha256(all_data).hexdigest()<br>print(f&quot;METACTF{{{hashval}}}&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SR-dYvnv1mQu2-IlLglwTw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85b8779b14f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>