<?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 Yousef Abdelrahman on Medium]]></title>
        <description><![CDATA[Stories by Yousef Abdelrahman on Medium]]></description>
        <link>https://medium.com/@yousef.oya?source=rss-c9c17813114c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gLuGV4KffgbwtvHlFvgQTQ.jpeg</url>
            <title>Stories by Yousef Abdelrahman on Medium</title>
            <link>https://medium.com/@yousef.oya?source=rss-c9c17813114c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:39:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yousef.oya/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[Memory Forensics | TryHackMe]]></title>
            <link>https://medium.com/@yousef.oya/memory-forensics-tryhackme-4b729491720c?source=rss-c9c17813114c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b729491720c</guid>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[forensics]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[volatility]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Yousef Abdelrahman]]></dc:creator>
            <pubDate>Sun, 20 Apr 2025 22:27:25 GMT</pubDate>
            <atom:updated>2025-04-20T22:29:47.422Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SXMevpgkehHlPB4ueMXv8A.png" /></figure><h3>Introduction</h3><p>Perform memory forensics to find the flags. If you are having trouble, maybe check out the volatility room first.</p><p>Enjoy!</p><h3>Task: Login</h3><p>Upon beginning the first task after the <em>introduction</em>, we are provided with a memory dump file named Snapshot6_1609157562389.vmem.</p><p>To begin the analysis, the first step is to gather basic information about the memory image. For this purpose, I used Volatility — a powerful memory forensics framework. Specifically, I ran the imageinfo plugin to extract metadata such as the profile of the operating system used, time of capture, and other relevant details. Below is the command I executed:</p><pre>./volatility_2.6_lin64_standalone -f /path/to/file imageinfo</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ExeZ1r251dIkzqfBrlT6PQ.png" /></figure><p>From the imageinfo output, we observe that the suggested profiles include Win7SP1x64 and WindowsAMD64PagedMemory. This indicates that the memory image was taken from a 64-bit Windows 7 system with Service Pack 1.<br>We will benefit from it later.</p><p>The objective of this task is to answer the question: <br><strong>“ What is John’s password? ”</strong></p><p>Given that we are searching for user <strong>credentials</strong>, I began by identifying the appropriate Volatility plugin for password extraction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*nXSMxBRZL0Hd3utJekFHpA.png" /></figure><p>To proceed, I executed the hashdump plugin using the appropriate profile identified earlier (Win7SP1x64) to extract user password hashes from the memory image:</p><pre>./volatility_2.6_lin64_standalone -f path/to/file --profile=Win7SP1x64 hashdump</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_QJS04tTH3wbA6a8HIYsg.png" /></figure><p>The plugin successfully retrieved the following hash for the user <strong>John</strong>:</p><pre>John:1001:aad3b435b51404eeaad3b435b51404ee:47fbd6536d7868c873d5ea455f2fc0c9:::</pre><p>To recover the plaintext password from John’s NTLM hash, I saved the hash output into a file named hash.txt. Then, I used <a href="https://en.wikipedia.org/wiki/John_the_Ripper"><strong>John the Ripper</strong></a> with the widely used <a href="https://github.com/praetorian-inc/Hob0Rules/blob/master/wordlists/rockyou.txt.gz">rockyou.txt</a> wordlist to perform a dictionary attack. The command used was:</p><pre>john --wordlist=~/Documents/CommonWords/rockyou.txt --format=NT hash.txt</pre><p><strong>NOTE: </strong>The --format=NT flag specifies that the hash is in NTLM format, ensuring John applies the correct cracking algorithm.</p><p>Shortly after execution, John successfully cracked the password:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*YmxsyVnXjnm7jQIRC-N5tg.png" /></figure><h3>Task: Analysis</h3><p><em>On arrival a picture was taken of the suspect’s machine, on it, you could see that John had a command prompt window open. The picture wasn’t very clear, sadly, and you could not see what John was doing in the command prompt window.</em></p><p><em>To complete your forensic timeline, you should also have a look at what other information you can find, when was the last time John turned off his computer?</em></p><p>This task consists of two questions:</p><ol><li><strong>When was the machine last shutdown?</strong></li><li><strong>What did John write?</strong></li></ol><p><strong>Question 1</strong>: When was the machine last shutdown?</p><p>As with the previous task, I began by identifying the appropriate profile using the imageinfo plugin. The result once again indicated the profile Win7SP1x64 again.</p><p>To determine the last shutdown time of the system, I utilized the shutdowntime plugin, which parses relevant event log data from memory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Smhp0KsgXEBnhM4p9F3osQ.png" /></figure><p><strong>Question 2</strong>: What did John write?</p><p>To determine what John typed into the <strong>console</strong>, I needed to inspect any commands or text input recorded during the session. Volatility provides a useful plugin called consoles, which extracts input/output from command prompt sessions found in memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cQJml9jj9sAoxSJVYeUPyg.png" /></figure><p>I believe it’s reasonable to conclude that this is the intended answer.</p><h3>Task: TrueCrypt</h3><p><em>A common task of forensic investigators is looking for hidden partitions and encrypted files, as suspicion arose when TrueCrypt was found on the suspect’s machine and an encrypted partition was found. The interrogation did not yield any success in getting the passphrase from the suspect, however, it may be present in the memory dump obtained from the suspect’s computer.</em></p><p><strong>Question:</strong> What is the TrueCrypt passphrase?</p><p>To extract the <a href="https://www.gbls.org/sites/default/files/Privacy%20Law%20Tools%20and%20Network%20Changes_0.pdf"><strong>TrueCrypt </strong></a>passphrase from the memory image, I used Volatility’s truecryptpassphrase plugin. This plugin is designed to search for potential passphrases and related cryptographic materials associated with TrueCrypt volumes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1HqKkNZXI4dvZD9NFcHLDg.png" /></figure><p>That wraps up the analysis for this TryHackMe memory forensics challenge. I hope you found the walkthrough insightful and helpful in understanding how to extract valuable information from memory images using Volatility.</p><p><strong>Thanks for reading — I hope you enjoyed it and learned something new.<br> See you in the next challenge!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b729491720c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mr Robot CTF | TryHackMe]]></title>
            <link>https://medium.com/@yousef.oya/mr-robot-ctf-tryhackme-371f9f6a550b?source=rss-c9c17813114c------2</link>
            <guid isPermaLink="false">https://medium.com/p/371f9f6a550b</guid>
            <category><![CDATA[reverse-shell]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[roots]]></category>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[mr-robot]]></category>
            <dc:creator><![CDATA[Yousef Abdelrahman]]></dc:creator>
            <pubDate>Mon, 10 Mar 2025 19:26:07 GMT</pubDate>
            <atom:updated>2025-03-10T19:26:07.392Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello! I’m yousefoya, welcome to my first writeup.</p><p>I aim to write every challenge that contributes to developing my skills in CTF challenges, Without any additional words, let’s start with the challenge:</p><p><a href="https://tryhackme.com/room/mrrobot"><strong>Mr Robot CTF</strong></a> is a challenge adapted from a famous series called <a href="https://www.imdb.com/title/tt4158110/">Mr Robot</a> and the gool is to root the machine and find all 3 keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VPvJs39ZwamrsnmTSIJ7nw.png" /></figure><p>After Scanning the target-ip we found that it has HTTP port that is open,<br>I did not find anything useful on the website interface but feel free to play around cause its quite entertaining!</p><p>So I started using a tool called <a href="https://github.com/OJ/gobuster"><strong>gobuster</strong></a><strong> </strong>that reveals a subdirectories of a website.<br>Printing all the (Status: 200) we got these directories:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*fFXLdFc2zhfgRxuYnk_Kjw.png" /></figure><p>I got feeling that these 3 directories (/license , /readme ,/robots , AND MORE) will be useful for me, Starting with<strong>/license</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GL6qBx8vlQI2KEkwqCuwRQ.png" /><figcaption>/license</figcaption></figure><p>After inspecting the page I found a <a href="https://en.wikipedia.org/wiki/Base64">Base64 </a>coded text, Lest decode it using any web browser such as <a href="https://gchq.github.io/CyberChef/"><strong>CyberChef</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*mAW4biPF13eMEObscmVB5A.png" /></figure><p>The output looks like a credential ( username:password ), Lets save it incase we needed it later.</p><p>Completing our process, we entered <strong>/readme</strong> and found nothing useful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*6o8DQnks1kcHLPZ2lYUquA.png" /><figcaption>/readme</figcaption></figure><blockquote>Next I entered <strong>/robots.txt </strong>and found something interesting,<br>1- fsocity.dic<br>2-<strong> key-1-of-3.txt </strong>which is the first key of three</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*gu2kEpMLinlT3eaTEreHcw.png" /></figure><blockquote><strong>What are we waiting for?? lets get the first key!</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*oYMV7UhW7NENxHc-c1jEUw.png" /></figure><p>So far everything is simple and clear, we got the first key and a credential which may be useful, Let’s continue our work.</p><p>We notice that there is a login page within the result of the <strong>gobuster</strong> function, it’s <strong>/wp-login</strong> I realized that “wp” is an abbreviation for <a href="https://en.wikipedia.org/wiki/WordPress"><strong>wordpress</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*1EYWCsdBGeXiIWRgq3J-4A.png" /></figure><p>I entered the credential which we got before (after decoded the base64 text)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K_1aNvoB2a2YynguglvTaA.png" /></figure><p>Boom!! Haha it worked.<br>I went straight to users and I find out that elliot is the administrator:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cBBa4-qO_Amif87lKXREHw.png" /></figure><p>In <strong>WordPress</strong> while you’re an administrator you can edit the Templates<br>by going to “<em>Appearance-&gt; Editor</em>” on <em>Templates</em> I entered an php page so that I can edit it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*71GhFJamQjYwDDqfAvE-lw.png" /></figure><p>So, since we are the admin, it occurred to me to execute a malicious code called “Reverse shell” in a php page.<br>in case to complete this process, I went to <a href="https://www.revshells.com/"><strong>Reverse Shell Generator</strong></a><strong> </strong>site that provides the code for free.</p><p>After pasting the code and upload it, I made it do its work on <em>port 9001<br></em>So now I have to listen on that port and then execute the page.<br>Typing the following command and then execute the page:</p><pre>nc -lvnp 9001</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*DlsEzN3La-479Qhosf_kpw.png" /></figure><p><strong>It worked!!</strong></p><p>Now on /home/robot we got 2 files;<br>1- <strong>/key-2-of-3.txt</strong> <em>Which Has The Key</em><br>2- <strong>/password.raw-md5</strong> <em>md5 is a hash algorithm</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*mU7NOieCkRm955JLm9dbUA.png" /></figure><p>After trying to read the secound key file I got ( Permission denied )<br>And after reading the password.raw-md5 file I got another credential</p><blockquote>username: robot<br>password: ( To get it we must crack the hashed password )</blockquote><p>I used a website called <a href="https://www.dcode.fr/en"><strong>dCode</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*3qoIaGNEkGO5ARazJQFnRw.png" /></figure><p><strong>And I got the Password!<br></strong>So I’m ready to log in as robot since I have the password;</p><pre>su robot</pre><blockquote><strong>And now lets try to read the second key:</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/1*xUPv3_2idQoT7IZY-kn8Dw.png" /></figure><p><strong>Thats it we got the second key!!</strong></p><p>So now I aim to enter <strong>/root</strong> directory and to complete this I must have root privileges, which means login as root.</p><p>In case to solve this problem I must achieve a process called<a href="https://en.wikipedia.org/wiki/Privilege_escalation"> <strong>Linux privilege escalation</strong></a> so I went to a site called <a href="https://gtfobins.github.io/"><strong>GTFOBins</strong></a>;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MEGNy7pYEW9HTBkcJLPRpQ.png" /></figure><p>At first I tried Find (Shell) exploit and it didn’t work:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*MXJbdUoedr33cIdftdFklA.png" /><figcaption>(I still robot)</figcaption></figure><p>….. That’s ok I’ll try another method, What about <strong>nmap interactive</strong> <strong>mode </strong>which available on versions 2.02 to 5.21?.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*5UZxtmVM_-0AXqMmWXAj7g.png" /></figure><blockquote>It Worked as we can see I’m now root.<br>Lets enter the <em>/root</em> directory;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/271/1*r4tSW5q7c1ObhtXu244r-w.png" /></figure><p>After listing the directory we got 2 files: <br>1- firstboot_doneWhich we found empty<br>2- key-3-of-3.txt Which has the last key</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*x8gX2u5XtudvYUOEBEH_KA.png" /></figure><p><strong>That’s all, I hope you guys enjoyed reading The write-up and benefited from it.<br>See you guys on another write-ups !!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=371f9f6a550b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>