<?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 AfaafaBe on Medium]]></title>
        <description><![CDATA[Stories by AfaafaBe on Medium]]></description>
        <link>https://medium.com/@sahazagael3?source=rss-5277d31be097------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*L9mX4SDCyTHuU9jPooeSZQ.jpeg</url>
            <title>Stories by AfaafaBe on Medium</title>
            <link>https://medium.com/@sahazagael3?source=rss-5277d31be097------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 08:36:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sahazagael3/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[Second Job Interview — Rootme (Forensic) Writeup]]></title>
            <link>https://sahazagael3.medium.com/second-job-interview-rootme-forensic-writeup-d96ec5ec7f41?source=rss-5277d31be097------2</link>
            <guid isPermaLink="false">https://medium.com/p/d96ec5ec7f41</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[root-me]]></category>
            <category><![CDATA[second-job-interview]]></category>
            <category><![CDATA[forensics]]></category>
            <category><![CDATA[rootme-writeup]]></category>
            <dc:creator><![CDATA[AfaafaBe]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 12:00:53 GMT</pubDate>
            <atom:updated>2024-12-27T12:00:53.545Z</atom:updated>
            <content:encoded><![CDATA[<h3>Second Job Interview — Rootme (Forensic) Writeup</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iROPjQgXbXfgzoBWgZ3oTw.png" /></figure><h3>Introduction</h3><p>In this challenge, the objective is to analyze a set of files to uncover a hidden flag. The challenge involves using forensic tools like ewfmount and volatility to extract and analyze information from a memory dump to retrieve the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*ptWd4WG27DCphlH5lwDz0Q.png" /></figure><h3>Step 1: Extraction and Mounting of the Forensic Image</h3><p>The challenge begins by extracting a forensic image from the downloaded archive file.</p><p>We start by extracting the forensic.E01 file from the ch17.zip archive.</p><pre>$ unzip ch17.zip</pre><p>Next, we check the type of the forensic.E01 file using the file command.</p><pre>$ file forensic.E01<br>forensic.E01: EWF/Expert Witness/EnCase image file format</pre><p>This indicates that the file is in the <strong>Expert Witness Format (EWF)</strong>, commonly used in forensic investigations.</p><p>We use the ewfmount tool to mount the forensic.E01 image and examine its contents.</p><pre>$ ewfmount forensic.E01 ~/Documents</pre><p>After mounting, we find a single file named ewf1.</p><h3>Step 2: Extracting Files from the Mounted Image</h3><p>We check the type of the mounted file ewf1.</p><pre>$ file ewf1<br>ewf1: POSIX tar archive (GNU)</pre><p>The file is a <strong>GNU tar archive</strong>, so we proceed to extract its contents.</p><p>We use the tar command to extract the contents of the archive.</p><pre>$ tar -xf ewf1</pre><p>This gives us two files: image.dd and memory.dmp.</p><h3>Step 3: Analyzing the Memory Dump with Volatility</h3><p>We start analyzing the memory.dmp file with the imageinfo command from Volatility to determine the profile needed for further analysis.</p><pre>$ volatility -f memory.dmp imageinfo</pre><p>The tool suggests several possible profiles:</p><pre>Suggested Profile(s) : Win7SP1x64, Win7SP0x64, Win2008R2SP0x64, Win2008R2SP1x64_23418, Win2008R2SP1x64, Win7SP1x64_23418</pre><p>We choose the <strong>Win7SP1x64</strong> profile and proceed with the analysis.</p><h3>Step 4: Scanning for Interesting Files</h3><p>We use Volatility’s filescan command to search for interesting files in the memory dump.</p><pre>$ volatility -f memory.dmp --profile=Win7SP1x64 filescan</pre><p>Among the files found, we identify two that seem interesting:</p><ol><li>flag.jpg located at \Device\HarddiskVolume3\flag.jpg</li><li>flag.txt.ink located at \Device\HarddiskVolume2\Users\info\AppData\Roaming\Microsoft\Windows\Recent\flag.txt.lnk</li></ol><h3>Step 5: Extracting the Flag File</h3><p>We focus on the flag.jpg file. To extract it, we use the following command:</p><pre>$ volatility -f memory.dmp --profile=Win7SP1x64 dumpfiles -Q 0x000000001db67f20 --name -D flag</pre><p>This command allows us to extract the file into the flag directory.</p><p>After extracting the flag.jpg file, we open it and find the flag hidden within the image.</p><h3>Conclusion</h3><p>By using the <strong>Volatility</strong> tool to analyze a memory dump and searching for interesting files, we successfully extracted and opened the flag.jpg image, revealing the flag.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d96ec5ec7f41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PE x86 — RunPE Rootme (Cracking) Writeup]]></title>
            <link>https://sahazagael3.medium.com/pe-x86-runpe-rootme-cracking-writeup-9be7592fb87c?source=rss-5277d31be097------2</link>
            <guid isPermaLink="false">https://medium.com/p/9be7592fb87c</guid>
            <category><![CDATA[root-me]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[rootme-writeup]]></category>
            <dc:creator><![CDATA[AfaafaBe]]></dc:creator>
            <pubDate>Thu, 26 Dec 2024 07:51:00 GMT</pubDate>
            <atom:updated>2024-12-26T07:51:00.439Z</atom:updated>
            <content:encoded><![CDATA[<h3>PE x86 — RunPE Rootme (Cracking) Writeup</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vNlOKR9vZswmzrNoE836g.png" /></figure><h3>Introduction</h3><p>The <strong>RunPE</strong> challenge focuses on understanding the RunPE packing technique, a common method employed by packers in the Windows ecosystem. It involves unpacking the binary and performing reverse engineering to retrieve the password.</p><h3>Step 1: Unpacking</h3><p>The challenge description points out that RunPE uses API calls such as ResumeThread. To locate these calls:</p><ol><li><strong>Set Breakpoints:</strong><br>Use a debugger (e.g., x64dbg or OllyDbg) to set breakpoints on all call eax instructions in the binary.</li><li><strong>Monitor API Calls:</strong><br>Identify the ResumeThread API call. When execution pauses right before this call, dump the process memory using <strong>ProcessDump</strong>:</li></ol><pre>WINEDEBUG=+all wine pd32.exe -pid 0x390254 -o /home/afaafabe/Documents/RootMe/Cracking/PE\ x86 - RunPE/Scylla-master/pdump_0x390254.dmp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*qP5LT6LSbwFIxVvSD31RiQ.png" /></figure><h3>Step 2: Reverse Engineering</h3><p>Upon inspecting the dumped executable, you’ll find a key function that performs substitution operations on a string. The decompiled function looks as follows:</p><pre>size_t __cdecl substitutionCharacters(char *Str) {<br>  size_t result; // eax<br>  unsigned int i; // [esp+10h] [ebp-8h]<br> <br>  for (i = 0; ; ++i) {<br>    result = strlen(Str);<br>    if (i &gt;= result)<br>      break;<br>    if (Str[i] &gt; 32 &amp;&amp; Str[i] != 127)<br>      Str[i] = (Str[i] + 14) % 94 + 33;<br>  }<br>  return result;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e4DTXnV7S-CahTpIcjBFeQ.png" /></figure><h3>Observations</h3><h4>String Transformation:</h4><p>This function modifies each character in a string using the formula:</p><pre>NewChar = ((OldChar + 14) % 94) + 33</pre><p>This ensures the resulting character is printable (ASCII range 33–126).</p><h4>Dynamic Analysis:</h4><p>The function is called on the following strings:</p><ul><li>&quot;sc&gt;?650xEVD0}_E0&amp;!)&quot; (likely the password)</li><li>Other strings that provide feedback to the user (e.g., success/failure messages).</li></ul><p>The first string is compared to a value, which indicates it’s the password we need to decode.</p><h3>Step 3: Decoding the Password</h3><p>To decode the password, we need to reverse the substitution logic. Below is the Python script used to brute force the original characters:</p><pre>def permute(char):<br>    if ord(char) == 32:<br>        return char<br>    return chr((ord(char) + 14) % 94 + 33)<br><br>j = 0<br>password = &quot;sc&gt;?650xEVD0}_E0&amp;!)&quot;  # Encrypted string<br>permuted_password = &quot;&quot;<br><br>while j &lt; len(password):<br>    for i in range(32, 128):<br>        if permute(chr(i)) == password[j]:<br>            j += 1<br>            permuted_password += chr(i)<br>            print(&quot;\r&quot; + permuted_password, end=&quot;&quot;)<br>            break<br>    else:<br>        print(&quot;Character not found&quot;)<br>        j += 1</pre><h3>Output:</h3><p>The script successfully decrypts the password.</p><h3>Conclusion</h3><p>This challenge demonstrates the importance of understanding dynamic analysis and substitution algorithms. The combination of debugging, memory dumping, and reverse engineering was essential for solving the challenge.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9be7592fb87c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unminify — PicoCTF Writeup]]></title>
            <link>https://sahazagael3.medium.com/unminify-picoctf-writeup-d1a0d4a2c634?source=rss-5277d31be097------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1a0d4a2c634</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[picoctf2024]]></category>
            <category><![CDATA[unminify]]></category>
            <category><![CDATA[picoctf-writeup]]></category>
            <dc:creator><![CDATA[AfaafaBe]]></dc:creator>
            <pubDate>Wed, 25 Dec 2024 19:50:56 GMT</pubDate>
            <atom:updated>2024-12-25T19:50:56.303Z</atom:updated>
            <content:encoded><![CDATA[<h3>Unminify — PicoCTF Writeup</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UdTvPAhCM8d5WwaIuw1o6w.png" /></figure><h3>Introduction</h3><p>The challenge <strong>Unminify</strong> was fairly straightforward and involved analyzing a website with minified code to uncover the hidden flag. The description provided a clue:</p><blockquote><strong><em>“I don’t like scrolling down to read the code of my website, so I’ve squished it. As a bonus, my pages load faster!”</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EVDj-d0XBKJ_J5HMpVHrIA.png" /></figure><h3>Steps to Solve</h3><h3>Viewing the Source Code</h3><p>After launching the challenge instance, I used <strong>Ctrl + U</strong> to view the source code of the website. This revealed the full HTML content of the page, albeit in a minified format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Tklwv2Jc4cK8L49nvbWAg.png" /></figure><h3>Searching for the Flag</h3><p>To locate the flag quickly, I used <strong>Ctrl + F</strong> to search for the string picoCTF{. Within seconds, I found the flag embedded in a class name:</p><pre>class=&quot;picoCTF{pr3tty_c0d3_622b2c88}&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C1YlxOF-rGzb3zrq8az9cQ.png" /></figure><h3>Conclusion</h3><p>This challenge demonstrated how simple techniques like viewing the source code and performing a keyword search can yield results quickly. While it was straightforward for an experienced solver, it highlights the importance of fundamental web inspection skills for CTF beginners.</p><p><strong>Flag:</strong> picoCTF{pr3tty_c0d3_622b2c88}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1a0d4a2c634" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WebDecode — PicoCTF Writeup]]></title>
            <link>https://sahazagael3.medium.com/webdecode-picoctf-writeup-993e49e9c886?source=rss-5277d31be097------2</link>
            <guid isPermaLink="false">https://medium.com/p/993e49e9c886</guid>
            <category><![CDATA[picoctf2024]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[base64-decoding]]></category>
            <category><![CDATA[web-exploitation]]></category>
            <category><![CDATA[challenges-cybersecurity]]></category>
            <dc:creator><![CDATA[AfaafaBe]]></dc:creator>
            <pubDate>Wed, 25 Dec 2024 19:32:21 GMT</pubDate>
            <atom:updated>2024-12-25T19:32:21.920Z</atom:updated>
            <content:encoded><![CDATA[<h3>WebDecode — PicoCTF Writeup</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Naoq59RJUcBAZJHr4-wEAw.png" /></figure><h3>Introduction</h3><p>The challenge, <strong>WebDecode</strong>, required us to explore a website using web inspector tools to uncover a hidden flag. The challenge description was brief:</p><blockquote><strong><em>“Do you know how to use the web inspector? Additional details will be available after launching your challenge instance.”</em></strong></blockquote><p>Upon launching the instance, a simple website was provided. At first glance, the task appeared straightforward, but like most CTF challenges, simplicity often hides complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0qQbega-3npoNEPsbrHySw.png" /></figure><h3>Steps to Solve</h3><h3>Initial Inspection</h3><p>As soon as the instance launched, I began inspecting the website using <strong>Ctrl + Shift + C</strong>, a standard method for analyzing the source code, scripts, CSS, and comments.<br>I systematically went through each section of the page, searching for potential hints like picoCTF{} or suspicious elements in the scripts. However, after several minutes of investigation, I couldn’t find anything conclusive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bYiERZ9dRAbnXXSdHmR7Zw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2fSf35Po5RcyuoIziLI-jA.png" /></figure><h3>Exploring Further</h3><p>Realizing I might have missed something, I noticed additional sections on the website, such as a button labeled <strong>&quot;About Me&quot;</strong>. After clicking on it and inspecting the new page, I finally spotted a suspicious script containing the following variable:</p><pre>notify_true=&quot;cGljb0NURnt3ZWJfc3VjYzNzc2Z1bGx5X2QzYzBkZWRfMDdiOTFjNzl9&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yq1N8E7rwcZW9sPE-89UUw.png" /></figure><h3>Decoding the Base64 String</h3><p>I copied the string and used <strong>Dcode</strong>, an online tool, to decode it. By selecting the “Base64 Decode” function, I successfully obtained the flag:</p><pre>picoCTF{web_succ3ssfully_d3c0ded_07b91c79}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xYuIL8GK_WIJmb2nRfvCAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LcfV4fH8VWj4i8Xau1u9w.png" /></figure><h3>Conclusion</h3><p>This challenge taught me the importance of thoroughly exploring every corner of a website, including seemingly harmless sections like “About Me.” It also highlighted the value of browser inspection tools for analyzing scripts and uncovering hidden clues.</p><p>Thank you for reading this writeup! See you in the next CTF adventure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=993e49e9c886" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>