<?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 Aws Afaneh on Medium]]></title>
        <description><![CDATA[Stories by Aws Afaneh on Medium]]></description>
        <link>https://medium.com/@awsafaneh0?source=rss-a824c3928297------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*T-EqTf1osbUL6SxHgGbGWw.jpeg</url>
            <title>Stories by Aws Afaneh on Medium</title>
            <link>https://medium.com/@awsafaneh0?source=rss-a824c3928297------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 17:51:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@awsafaneh0/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[Incident Capture — Thryve CTF Finals writeup]]></title>
            <link>https://medium.com/@awsafaneh0/incident-capture-thryve-ctf-finals-writeup-79d8299b9a7a?source=rss-a824c3928297------2</link>
            <guid isPermaLink="false">https://medium.com/p/79d8299b9a7a</guid>
            <dc:creator><![CDATA[Aws Afaneh]]></dc:creator>
            <pubDate>Sun, 23 Aug 2026 09:49:15 GMT</pubDate>
            <atom:updated>2026-08-23T09:49:15.162Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*NlVdVIc_tMjeD-UsJZVp9Q.png" /></figure><p>first of all we need to check the http packets</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ta066fy2fNqfRLbOQQ1Ouw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EuwFldA4kZ4jJns-hWym4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*b5ZL3xXEPTtwaXPO8sGbTw.png" /></figure><p>Suspicious domain is :<br> cdn.northstar-sync.com</p><p>Resolved IP :<br> 203.0.113.77</p><p>Carrier stream :<br> 10.24.8.37:52344 -&gt; 203.0.113.77:80</p><p>The stream contains normal looking bootstrap/helper requests and exactly six post requests to :<br> /api/v3/device/heartbeat</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uJfvI0yL5LKUEMgjN1J1tA.png" /></figure><p>Each POST has :<br> cache = &lt;hex&gt;</p><p>Concatenate the six cache values in TCP stream order</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EVc4zj-6xsEeDjiP34ZesA.png" /></figure><p>so we got a full image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*r9O7zqKUg7IuhAW2BjmAIg.png" /></figure><p>when we use exiftool</p><p>there’s a comment : leave-no-trace</p><p>so this is our password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gPhfhAuhOUlyV7z0aZwlIA.png" /></figure><p>there’s a zip file contain flag.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*qzhVpKF37VxVo_9DKn4EhQ.png" /></figure><p>after extract the zip file and open a flag.txt file</p><p>we got our flag :</p><pre>Thryve{six_packets_one_portrait}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79d8299b9a7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Look Up Thryve CTF finals writeup]]></title>
            <link>https://medium.com/@awsafaneh0/look-up-thryve-ctf-finals-writeup-f63eedb4f754?source=rss-a824c3928297------2</link>
            <guid isPermaLink="false">https://medium.com/p/f63eedb4f754</guid>
            <dc:creator><![CDATA[Aws Afaneh]]></dc:creator>
            <pubDate>Sun, 23 Aug 2026 09:35:10 GMT</pubDate>
            <atom:updated>2026-08-23T09:35:10.908Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*j2fmUGnbDlbqK_ihUtNCxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*Dtcl99jQtexhy4NZRlatcQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*_bj2MuGx39yKSa73xTA04w.png" /></figure><p>First this show there’s a zip file need a password</p><p>to find the password we need to look in the http</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O6uWM3b4xyPNHRgfCTMdKw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_An_uaabd7JuYyVNkyEXQ.png" /><figcaption>the first part of password is : <strong>fs0ciety_</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*LHPRdWSvCX4WtQxNjR9REw.png" /></figure><p>so the last part we need to check the ICMP seq number</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BXRwWjyfshgT5OBacrkjNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*ichU_3HoshLHd5swV7XUXA.png" /><figcaption>so the last part of the password is : <strong>S3CR3T</strong></figcaption></figure><p>so the full password is : <strong>fs0ciety_S3CR3T</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*noMUGiR3_huF5iJ_TZMkEQ.png" /></figure><p>after extract the zip file with the password <strong>fs0ciety_S3CR3T there’s a incident_photo.zip we need to ectract it with the same password fs0ciety_S3CR3T</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mGMVhGXQPY-FkqRdOA_K6g.png" /></figure><p>here’s our flag</p><pre>Thryve{Mr_R0b0T_T3ll_Y0U_TH3_S3CR3T}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f63eedb4f754" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RegReflector — FlagYard Digital Forensics WriteUp]]></title>
            <link>https://medium.com/@awsafaneh0/regreflector-flagyard-digital-forensics-writeup-fbdd1e8d3c0e?source=rss-a824c3928297------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbdd1e8d3c0e</guid>
            <dc:creator><![CDATA[Aws Afaneh]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 08:27:13 GMT</pubDate>
            <atom:updated>2026-03-11T08:27:13.589Z</atom:updated>
            <content:encoded><![CDATA[<p>In this challenge, we are given a scenario where an employee downloaded a file that appeared to be a <strong>Google Chrome installer</strong>. Shortly after running it, the workstation began experiencing <strong>severe performance issues and constant pop-up windows</strong>.</p><p>Our task was to analyze the provided <strong>system artifacts</strong> and determine what happened on the machine.</p><p>The archive mainly contained <strong>Windows Registry hives</strong>, which suggested that the malicious activity might be hidden somewhere inside the registry.</p><h3>Initial Investigation</h3><p>After extracting the archive, the files included several registry hives such as:</p><ul><li>NTUSER.DAT</li><li>other Windows system registry files</li></ul><p>Since malware often stores persistence or payloads in the registry, the logical starting point was to inspect these files.</p><p>To speed up the investigation, I used <strong>Hayabusa</strong>, a powerful tool for parsing Windows event logs and artifacts.</p><p>4</p><p>Running Hayabusa helped highlight suspicious entries and made it easier to locate unusual registry values.</p><h3>Suspicious Registry Values</h3><p>While reviewing the output, I noticed two very large registry values stored inside <strong>NTUSER.DAT</strong>.</p><p>The value names looked random:</p><pre>hDF82oB<br>orhmkbye</pre><p>The data stored in them consisted of <strong>extremely long hexadecimal strings</strong>.</p><p>Large hex strings inside the registry are often a sign that:</p><ul><li>a payload is being stored</li><li>or data has been <strong>obfuscated to avoid detection</strong></li></ul><h3>Decoding the Payload</h3><p>A hint provided in the challenge was:</p><pre>comeflywithme<br>Encoding: XOR with 1f</pre><p>This suggested that the payload might involve <strong>XOR-based obfuscation</strong>.</p><p>After extacting the registry value, the first step was converting the data from <strong>hexadecimal into raw bytes</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WxdLJWBpkVoKWdTh.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*sFKU8YZ52SXliWSH.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aqDyn0iw2hKytm1u" /></figure><p>4</p><p>Once decoded, the result turned out to be <strong>obfuscated JavaScript</strong>.</p><p>The script performed the following actions:</p><ol><li>Convert hex data into characters</li><li>Apply XOR decoding using a key</li><li>Execute the decoded script using eval()</li></ol><p>This revealed the <strong>next stage of the payload</strong>.</p><h3>PowerShell Stage</h3><p>The decoded JavaScript launched <strong>PowerShell</strong> with an embedded Base64 payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LIdSnMA2dbdxN2f-.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_hjijyEChYOvZF5I.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VPwsln11CstkFUgo.JPG" /></figure><p>After decoding the Base64 content, the PowerShell script revealed another layer.</p><p>It defined a large byte array representing <strong>shellcode</strong>, and then executed it in memory using techniques commonly seen in malware:</p><ul><li>allocating memory</li><li>writing shellcode</li><li>creating a thread to execute it</li></ul><p>This is a common <strong>fileless execution technique</strong>, allowing malware to run without dropping files to disk.</p><h3>The Second Payload</h3><p>At this point, the shellcode produced only <strong>part of the output</strong>.</p><p>Going back to the registry, the second value (orhmkbye) contained another payload following the <strong>same decoding process</strong>:</p><ol><li>Hex decoding</li><li>XOR decoding</li><li>JavaScript stage</li><li>PowerShell stage</li><li>Shellcode execution</li></ol><p>The second shellcode revealed the <strong>remaining part of the encoded flag</strong>.</p><h3>Final Decoding</h3><p>The combined output from both shellcodes produced an <strong>encoded flag string</strong>.</p><p>Using the hint provided earlier:</p><pre>XOR with 0x1f</pre><p>I applied XOR decoding to the string and recovered the final flag.</p><h3>Flag</h3><pre>FlagY{968798755218d7f42db548b0245e6263}</pre><h3>Conclusion</h3><p>This challenge demonstrated a realistic malware technique where attackers store payloads inside the <strong>Windows Registry</strong> and execute them through multiple layers of obfuscation.</p><p>The attack chain looked like this:</p><pre>Registry → Hex → XOR → JavaScript → PowerShell → Shellcode → Encoded Flag</pre><p>Techniques like these are often used by real malware to evade detection and avoid leaving artifacts on disk.</p><p>Understanding how to trace and decode each stage is an important skill in <strong>digital forensics and malware analysis</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbdd1e8d3c0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bl4d3.exe — FlagYard Reverse Engineering Writeup]]></title>
            <link>https://medium.com/@awsafaneh0/bl4d3-exe-flagyard-reverse-engineering-writeup-900c13946add?source=rss-a824c3928297------2</link>
            <guid isPermaLink="false">https://medium.com/p/900c13946add</guid>
            <dc:creator><![CDATA[Aws Afaneh]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 08:22:15 GMT</pubDate>
            <atom:updated>2026-03-11T08:22:15.833Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yAbwhGZiCwcJ1pTI_R3Rfg.png" /></figure><h3>Introduction</h3><p><strong>Bl4d3.exe</strong> is a reverse engineering challenge where the goal is to recover the correct flag by analyzing how the program validates user input.</p><p>At first glance the binary looks messy and confusing because the control flow is heavily obfuscated. Instead of a straightforward validation function, the program uses a <strong>flattened control flow</strong> structure that jumps between many small blocks.</p><p>However, once we understand how the program is structured, the validation logic becomes much easier to analyze.</p><h3>Running the Program</h3><p>When running the binary, it expects the flag as a command-line argument.</p><p>Example:</p><pre>Bl4d3.exe &lt;flag&gt;  </pre><p>If the flag is correct, the program prints a success message.</p><h3>Flag Format</h3><p>By inspecting the main function in a disassembler such as <strong>Ghidra</strong> or <strong>IDA</strong>, we can quickly notice some important checks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/0*3SWZKdB_VCWOs30K.png" /></figure><p>4</p><p>The program verifies:</p><ul><li>The argument length must be <strong>0x27 (39 characters)</strong>.</li><li>The first characters must be <strong>FlagY{</strong>.</li><li>The last character must be <strong>}</strong>.</li></ul><p>So the expected format is:</p><pre>FlagY{32_characters_here}</pre><p>This means the inner payload inside the braces contains <strong>32 characters</strong>.</p><h3>The Obfuscation Technique</h3><p>The validation logic is intentionally made hard to follow using <strong>control-flow flattening</strong>.</p><p>Instead of a normal function, the program uses a <strong>dispatcher loop</strong> that repeatedly jumps between blocks based on a state variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/0*9HS32VPbN0dAFQ5C.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/0*OIJ3Nms5JvX3Kq0v.png" /></figure><p>4</p><p>Typical structure:</p><pre>state = X</pre><pre>while (true) {<br>    switch(state) {<br>        case A:<br>            do operations<br>            state = B<br>            break<br>        case B:<br>            do operations<br>            state = C<br>            break<br>    }<br>}</pre><p>In the binary:</p><ul><li><strong>RAX</strong> acts as the state variable</li><li><strong>RCX</strong> is used as an accumulator</li><li>Different blocks manipulate RCX using arithmetic instructions</li></ul><h3>Arithmetic Checks</h3><p>Inside each block, the program reads a character from the input and performs operations such as:</p><ul><li>add</li><li>sub</li><li>xor</li><li>imul</li><li>shl</li></ul><p>Example pattern seen in the disassembly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qi9r5SsAg8VSoNQ6.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/0*F7Rc385tyKQtvlmw" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/0*ODHvHmzuWWjK6oxu" /></figure><p>4</p><p>A simplified version looks like this:</p><pre>movsx rax, byte ptr [input + offset]<br>imul rcx, rax<br>add rcx, 0x1234<br>xor rcx, 0x55</pre><pre>cmp rcx, 0xABCDEF<br>jne fail</pre><p>If the comparison fails, the program jumps to the failure routine.</p><p>If it passes, the accumulator (RCX) is reset and the program moves on to the next check.</p><h3>Important Observation</h3><p>After tracing the execution flow carefully, we notice something very helpful:</p><ul><li>Each checkpoint <strong>resets the accumulator</strong>.</li><li>Each check only depends on <strong>one input character</strong>.</li></ul><p>This means the checks are <strong>independent</strong> from each other.</p><p>So instead of solving a complicated equation involving the whole flag, we can solve <strong>each character separately</strong>.</p><h3>Solving the Checks</h3><p>The easiest solution is to recreate the arithmetic logic in a small script.</p><p>Steps:</p><ol><li>Extract the operations applied to RCX for each character position.</li><li>Reimplement them in Python.</li><li>Try possible character values until the comparison matches.</li></ol><p>Since the characters are printable ASCII, brute forcing each position is extremely fast.</p><p>Once all 32 characters are recovered, we simply place them inside the flag format.</p><h3>Final Flag</h3><p>After solving all the checks, the recovered payload is:</p><pre>d89b2c0a6d7bfcaabfd66b2b8b1d252d</pre><p>So the final flag becomes:</p><pre>FlagY{d89b2c0a6d7bfcaabfd66b2b8b1d252d}</pre><h3>Conclusion</h3><p>Even though <strong>Bl4d3.exe</strong> initially looks complicated due to heavy obfuscation, the underlying logic is actually quite simple.</p><p>The key ideas were:</p><ul><li>Recognizing <strong>control flow flattening</strong></li><li>Identifying the <strong>dispatcher pattern</strong></li><li>Noticing that each check is <strong>independent</strong></li><li>Writing a small script to recover characters automatically</li></ul><p>This challenge is a great example of how understanding common obfuscation techniques can quickly turn a difficult-looking binary into a manageable problem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=900c13946add" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>