<?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 mrfa3i on Medium]]></title>
        <description><![CDATA[Stories by mrfa3i on Medium]]></description>
        <link>https://medium.com/@mrfa3i?source=rss-2ad9dabeec89------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Cr4LzAxmRYXpGpbs8IZdBA.png</url>
            <title>Stories by mrfa3i on Medium</title>
            <link>https://medium.com/@mrfa3i?source=rss-2ad9dabeec89------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 17:15:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mrfa3i/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[UOFTCTF — Forensics Writeup]]></title>
            <link>https://medium.com/@mrfa3i/uoftctf-forensics-writeup-40fdf89b38f0?source=rss-2ad9dabeec89------2</link>
            <guid isPermaLink="false">https://medium.com/p/40fdf89b38f0</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[forensics]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <dc:creator><![CDATA[mrfa3i]]></dc:creator>
            <pubDate>Mon, 15 Jan 2024 17:13:08 GMT</pubDate>
            <atom:updated>2024-01-15T17:14:16.632Z</atom:updated>
            <content:encoded><![CDATA[<h3>UOFTCTF 2024 — Forensics Writeup</h3><h3>No grep Challenge :</h3><blockquote>Use the VM from Hourglass to find the 2nd flag on the system !</blockquote><blockquote>Download Link : <a href="https://storage.googleapis.com/hourglass-uoftctf/ctf_vm.zip">https://storage.googleapis.com/hourglass-uoftctf/ctf_vm.zip</a> (.ova) 10 GB</blockquote><p>After downloading the zip file, I extracted the <strong>ctf_vm.ova</strong> file and extracted the <strong>ctf_vm0disk001.vmdk<em> </em></strong>(virtual machine disk) using <strong>WinRAR</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*OKT39CPNYq8GClmJb8KmXQ.png" /><figcaption>WinRAR</figcaption></figure><p>After that, I used <a href="https://www.autopsy.com/download/"><strong>Autopsy</strong> </a>to analyze the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p-g0Ap_ENSOPTQOv3TX1GQ.png" /><figcaption>Autopsy</figcaption></figure><p>So the first thing I looked at was <strong>Powershell history</strong>.</p><p><strong>Powershell history</strong> Path :</p><p><em>/Users/analyst/AppData/Roaming/Microsoft/Windows/PowerShell/PSReadLine/ConsoleHost_history.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mpK9P5Xqh2pv2TSlvFdTrA.png" /><figcaption><em>ConsoleHost_history.txt</em></figcaption></figure><p>Here I found an interesting <strong>PowerShell script (.ps1)</strong>, so let’s take a look at the file contents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*I5LaXJYMXFY5n1Q3w9jPYQ.png" /><figcaption>update.ps1</figcaption></figure><p>It’s an <strong>XOR</strong>, so we have the <strong>key </strong>and the <strong>cipher text</strong>. Let’s decode it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mGk1Prave12QbsJO-jkAWg.png" /><figcaption>Cyberchef</figcaption></figure><p>flag1 : uoftctf{0dd_w4y_t0_run_pw5h}</p><h3>Hourglass Challenge :</h3><blockquote>No EDR agent once again, we imaged this workstation for you to find the evil !In this challenge, I used a simple way, and it’s useful to understand what the newest files are that were created or renamed by the users or attackers.</blockquote><p>I recommend reading this article about the <a href="https://www.orionforensics.com/forensics-tools/ntfs-journal-viewer-jv/"><strong>NTFS $UsnJrnl</strong></a><strong> </strong>file.</p><p>NTFS <strong>$UsnJrnl</strong> Path :</p><p><strong><em>$Extend\$USNJrnl</em></strong></p><p><strong>$J</strong> (where the most important data reside) and <strong>$Max</strong>.</p><p><strong><em>$USNJrnl</em></strong><em>: </em>provides high-level monitoring of file and folder changes, such as creation, deletion, and renaming.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y3ivma8lJf8lTwj0ZQ0OOw.png" /><figcaption><em>$USNJrnl$J</em></figcaption></figure><p>extract the <strong><em>$USNJrnl</em>$J</strong> file and use the <a href="https://ericzimmerman.github.io/#!index.md"><strong>MFTCmd Eric Zimmerman tool</strong></a> to parse the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*cCrxyWTXFW61fznSbd6sKQ.png" /><figcaption>MFTCmd</figcaption></figure><p>then open the <strong>CSV </strong>file via the <a href="https://ericzimmerman.github.io/#!index.md">Timeline Explorer Zimmerman </a>tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qMQXm3tx9aNzYfHSDBHOdA.png" /><figcaption>Timeline Explorer</figcaption></figure><p>Here we can see a new text file was created, “<strong><em>New Text Document.txt.”</em></strong> I used the <strong>RenameOldname</strong> to filter the <strong>Update Reasons column</strong> to find the old name of the text file before renaming it to the new name.</p><p>So let’s see what the new name of the file is. Now I will use the <strong>entry number</strong> value as a filter, so let’s see what the “<strong><em>New Text Document.txt” </em></strong>file with the <strong>entry number (111631) was </strong>renamed to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FVS_N1mwtpwobCfqj7db3A.png" /><figcaption>flag.txt</figcaption></figure><p><strong>flag.txt</strong> Path :</p><p><em>/Users/analyst/Desktop/flag.txt.txt</em></p><p>It was renamed <strong>flag.txt</strong>, and it contains a fake flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hkVTSzsSIfoLkHEgGPGmDA.png" /><figcaption>flag.txt</figcaption></figure><p>So let’s see the other one with <strong>entry number 36441,</strong> which was renamed to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BhS-8JHbBjx2ebnfWUXX9w.png" /><figcaption>settings.txt</figcaption></figure><p>It was renamed to <strong>settings.txt</strong> lets see its contents :</p><p><strong>settings.txt</strong> file Path :</p><p>/Windows/DiagTrack/Settings/settings.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oHwQ2oS6GO2V8qPK8G6naA.png" /><figcaption>settings.txt</figcaption></figure><p>I found this base64 in the file contents, and after decoding it, I got the flag:</p><pre>echo &quot;Ky0tCiB1b2Z0Y3Rme1Q0c0tfU2NoM0R1bDNyX0ZVTn0KKy0t&quot; | base64 -d<br>+--<br> uoftctf{T4sK_Sch3Dul3r_FUN}<br>+--</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40fdf89b38f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CATF 23 : P13 (Digital Forensics)]]></title>
            <link>https://medium.com/@mrfa3i/catf-23-p13-digital-forensics-7697a0f6edb7?source=rss-2ad9dabeec89------2</link>
            <guid isPermaLink="false">https://medium.com/p/7697a0f6edb7</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[forensics]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[mrfa3i]]></dc:creator>
            <pubDate>Fri, 28 Jul 2023 17:57:52 GMT</pubDate>
            <atom:updated>2023-08-08T16:39:46.475Z</atom:updated>
            <content:encoded><![CDATA[<p># P13 [500 pts]</p><p>**Category:** Forensics<br>**Solves:** 1</p><p>Description<br>We captured this traffic from P13s computer so can you help him?(Note: some Osint required)</p><p>Q1 - we need help locating the hiding place of Cu713s script once u find it we need the full url ?</p><p>Q2 - Once you have retrieved the file, use it to find the location of the city where Cu713s friends went. What is the city name?flag format CATF{Q1_Q2}\</p><p>Author : MM0X</p><p>Firstly i found an encrypted php ( its an image inside a php file ) file in HTTP then i exported the file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*os6X4UIB5z8DBslv6019Tg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TsgHjcXxiPCUv310daaLJQ.png" /></figure><p>The challenge wants me to find the script that used to encrypt the image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y5Uz0jrTylhcvApl1KbMIQ.png" /></figure><p>I filtered “data” in pcap file and i found this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*SnKHwX3bo9YY30poGAyOPg.png" /></figure><p>I found this suspicious name so i did osint on this name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*uMN05IdP8k0GKBS8rt70OA.png" /></figure><p>Using sherlock tool i was able to find this github repo</p><p><a href="https://github.com/Cu713?tab=overview&amp;from=2023-05-01&amp;to=2023-05-31">Cu713 - Overview</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Tu9O_x2wDKeXQwuaKu-Hw.png" /></figure><p>I found a 3 commites :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LmDZR0CV9-a3qMNBdxkU8Q.png" /></figure><h4>Q1 Answer:</h4><p><a href="https://github.com/Cu713/Secr3t/commit/d3c2ff53863d0fcc6f55c79d0d6799d40ca92820">Create hidden · Cu713/Secr3t@d3c2ff5</a></p><p>Encryption script :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*yeoyrLQFPz_V-NY7D-YgYw.png" /></figure><p>I reversed this code</p><pre>def unswap(bytearray_):<br>    if len(bytearray_) &lt; 2:<br>        return bytearray_<br><br>    result = []<br>    for i in range(0, len(bytearray_) - 1, 2):<br>        result.extend([bytearray_[i+1], bytearray_[i]])<br>    if len(bytearray_) % 2 == 1:<br>        result.append(bytearray_[-1])<br>    return bytearray(result)<br>def dec(file):<br>    key = [255, 216, 255 ,224] #{FF D8 FF E0] 00 10 4A 46 49 46 00 01 ,key=file[:4] , .jpeg<br>    print(&quot;key =&quot;,key,sep=&quot;&quot;)<br>    decrypted = bytearray()<br>    for i in range(4, len(file)):<br>        decrypted.append(file[i] ^ key[(i-4) % len(key)])<br>    return decrypted<br>with open(&quot;panel.php&quot;, &#39;rb&#39;) as f:<br>    file_content = f.read()<br>unswapped_encrypted = unswap(file_content)<br>decrypted = dec(unswapped_encrypted)<br>with open(&quot;dec&quot;, &#39;wb&#39;) as f:<br>    f.write(decrypted)</pre><h3>NOTE : Don’t forget to Delete the “headers” and “data” from php file.</h3><p>After that i run this script :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*4nvZI1xu_cz6rc_qzGOtEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0j5gBrPnIWdREwsMJ7YMrg.png" /></figure><p>The decrypted file its corrupted, so i edited the file by insert 8 bytes in the first line and delete the last 4 bytes to make it a valid “jpeg” file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*GMFc5uI44UicIp7d-DOWng.png" /><figcaption>insert 8 bytes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*haQJywPuZrp7H1ljQZTXoQ.png" /><figcaption>last 4 bytes</figcaption></figure><p>then i got the valid image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7awuA4yZ0AOzjOpIHJoB0w.jpeg" /></figure><p>I used google lens and i found this place in “Dublin”</p><h4>Q2 Answer : Dublin</h4><blockquote>The flag : CATF{<a href="https://github.com/Cu713/Secr3t/commit/d3c2ff53863d0fcc6f55c79d0d6799d40ca92820">https://github.com/Cu713/Secr3t/commit/d3c2ff53863d0fcc6f55c79d0d6799d40ca92820</a>_Dublin}</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fJQQ9M-uOM9PfCVlM7r5aQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7697a0f6edb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: TrueSecrets]]></title>
            <link>https://medium.com/@mrfa3i/htb-truesecrets-c02c7141fe0c?source=rss-2ad9dabeec89------2</link>
            <guid isPermaLink="false">https://medium.com/p/c02c7141fe0c</guid>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[hack-the-box-writeup]]></category>
            <dc:creator><![CDATA[mrfa3i]]></dc:creator>
            <pubDate>Wed, 19 Apr 2023 17:40:29 GMT</pubDate>
            <atom:updated>2023-04-19T20:32:51.674Z</atom:updated>
            <content:encoded><![CDATA[<p>Hack The Box(Forensics Challenge)</p><p><em>CHALLENGE DESCRIPTION: Our cybercrime unit has been investigating a well-known APT group for several months. The group has been responsible for several high-profile attacks on corporate organizations. However, what is interesting about that case, is that they have developed a custom command &amp; control server of their own. Fortunately, our unit was able to raid the home of the leader of the APT group and take a memory capture of his computer while it was still powered on. Analyze the capture to try to find the source code of the server.</em></p><h3>Solution:</h3><p><strong>Step 1</strong>: I wanted to know what is the profile name provided within this memory:</p><p><strong>Step 2</strong>:I searched all of the mem files and I found this (backup_development.zip) it seems like an interesting file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q86eq04hPb7J_qB2CJliJA.png" /></figure><p><strong>Step 3</strong>: So by using (the dumpfiles) plugin I dumped this file and I wanted to see what is in the zip file :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*yJCFlvJI0ote7Jvj05UHxA.png" /></figure><p><strong>Step 4</strong>:After I extracted it, I found a (.tc) file “TrueCrypt”;</p><p>I used VeraCrypt (<strong>https://veracrypt.eu/en/Downloads.html)</strong> to mount the file but it has a password, I found The password by using the “truecryptpassphrase” plugin like that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZxIQgP3ZEBzcr55HB2mrlA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*luM6ACTrCNTWMA0Qeo-jTQ.png" /></figure><p><strong>Step 5: </strong>I opened the file By VeraCrypt and mount it with a password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/261/1*owhx5RYGNoXkRXQA8wXlpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/245/1*St_5_a4E3TBBp9NpAPZG-A.png" /></figure><p>Inside the disk, I found the folder “<strong>malware_agent</strong>” which contains four files:</p><p>1-C# Encryption Script.</p><p>2-Three files are Encrypted by the given script(DES).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*Qcxl5wBXzpbSLDk36xgv7Q.png" /></figure><p><strong>Step 6: </strong>Inside the C# script I found “iv+key” I used it to decrypt the files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*1aZHAn_4RzeFV_wPD1djFA.png" /></figure><p>I used this online tool (DES): <a href="https://devtoolcafe.com/tools/des">https://devtoolcafe.com/tools/des</a></p><h4>Note: Decode the files line by line.</h4><p>I tried to decrypt all the files</p><p>File1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7we5e5KCtHb6j7ESQ6H1VQ.png" /></figure><p>File2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oD2VJWq7zJikPzOXqh_THw.png" /></figure><p>File3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tL8bDKbgiqOQo9nOwzQbpg.png" /></figure><p>And found the flag in the third file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*aPXL0wUX06SO4G7DnUdBcA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c02c7141fe0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>