<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Victor</title>
    <description>The latest articles on DEV Community by Victor (@thng_c3bdfbb790bc848d79c).</description>
    <link>https://dev.to/thng_c3bdfbb790bc848d79c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4248759%2F26d6db7a-374b-4535-a374-cc3532fb4bcc.png</url>
      <title>DEV Community: Victor</title>
      <link>https://dev.to/thng_c3bdfbb790bc848d79c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thng_c3bdfbb790bc848d79c"/>
    <language>en</language>
    <item>
      <title>TryHackMe – Corridor: Finding the Hidden Door Through IDOR</title>
      <dc:creator>Victor</dc:creator>
      <pubDate>Tue, 17 Nov 2026 04:11:50 +0000</pubDate>
      <link>https://dev.to/thng_c3bdfbb790bc848d79c/tryhackme-corridor-finding-the-hidden-door-through-idor-2iic</link>
      <guid>https://dev.to/thng_c3bdfbb790bc848d79c/tryhackme-corridor-finding-the-hidden-door-through-idor-2iic</guid>
      <description>&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;In this write-up, I will document my experience completing the &lt;strong&gt;Corridor room on TryHackMe&lt;/strong&gt;, focusing on identifying and exploiting an Insecure Direct Object Reference (IDOR) vulnerability.&lt;/p&gt;

&lt;p&gt;At first glance, the challenge looks relatively simple. The web application presents a corridor containing multiple doors. Each door represents a different location, and clicking on one redirects us to another URL.&lt;/p&gt;

&lt;p&gt;However, something interesting caught my attention: the URLs contained long hexadecimal strings that looked like MD5 hashes.&lt;/p&gt;

&lt;p&gt;Instead of randomly clicking through every door, I decided to investigate how these URLs were generated and whether the application was using predictable identifiers behind the scenes.&lt;/p&gt;

&lt;p&gt;The main objective was to understand how insecure object references can expose resources that are not directly accessible through the application's interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Understanding the Vulnerability – IDOR
&lt;/h2&gt;

&lt;p&gt;Before exploring the application, it is important to understand the vulnerability behind this challenge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IDOR (Insecure Direct Object Reference)&lt;/strong&gt; is an access control vulnerability that occurs when an application uses user-controllable identifiers to access internal resources without properly verifying whether the requester is authorized to access them.&lt;/p&gt;

&lt;p&gt;For example, consider an application that provides the following URLs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://example.com/user/1001
https://example.com/user/1002
https://example.com/user/1003
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the application does not enforce proper authorization checks, an attacker might change &lt;code&gt;1001&lt;/code&gt; to &lt;code&gt;1002&lt;/code&gt; and access another user's information.&lt;/p&gt;

&lt;p&gt;The important point is that the application trusts the supplied object reference without verifying whether the current user has permission to access the requested resource.&lt;/p&gt;

&lt;p&gt;In Corridor, the application uses MD5 hashes instead of directly exposing numerical identifiers. Although this makes the URLs look less predictable, it does not necessarily make the underlying resources secure.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Reconnaissance – Exploring the Web Application
&lt;/h2&gt;

&lt;p&gt;After deploying the target machine on TryHackMe, I accessed the assigned IP address through my browser.&lt;/p&gt;

&lt;p&gt;The first thing I noticed was a corridor containing multiple clickable doors.&lt;/p&gt;

&lt;p&gt;At this stage, I did not know what each door represented or whether there were hidden resources behind the visible interface.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.1. Initial Enumeration
&lt;/h3&gt;

&lt;p&gt;I started by interacting with several doors and observing how the application behaved.&lt;/p&gt;

&lt;p&gt;Each time I clicked a door, the browser navigated to a different URL.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://&amp;lt;TARGET_IP&amp;gt;/c4ca4238a0b923820dcc509a6f75849b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another door generated a different path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://&amp;lt;TARGET_IP&amp;gt;/c81e728d9d4c2f636f067f89cc14862c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pages themselves did not reveal much useful information.&lt;/p&gt;

&lt;p&gt;However, the URL structure immediately caught my attention.&lt;/p&gt;

&lt;p&gt;The path contained a 32-character hexadecimal string, which is a common representation of an MD5 hash.&lt;/p&gt;

&lt;p&gt;Rather than treating these values as random identifiers, I decided to investigate their origin.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2. Inspecting the Page Source
&lt;/h3&gt;

&lt;p&gt;Instead of manually clicking every door, I inspected the website's HTML source code using the browser's Developer Tools.&lt;/p&gt;

&lt;p&gt;I wanted to understand how the doors were implemented and whether their destinations were already available in the page source.&lt;/p&gt;

&lt;p&gt;This allowed me to identify the URL references associated with the different doors.&lt;/p&gt;

&lt;p&gt;An important observation was that the application used an image map with clickable areas. Each area referenced a different hexadecimal path.&lt;/p&gt;

&lt;p&gt;This gave me a useful starting point for analyzing the identifiers.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Analyzing the MD5 Hashes
&lt;/h2&gt;

&lt;p&gt;The next step was to determine whether the hexadecimal values were actually MD5 hashes.&lt;/p&gt;

&lt;p&gt;MD5 produces a 128-bit hash value, commonly represented as a 32-character hexadecimal string.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MD5("1") = c4ca4238a0b923820dcc509a6f75849b

MD5("2") = c81e728d9d4c2f636f067f89cc14862c

MD5("3") = eccbc87e4b5ce2fe28308fd9f2a7baf3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I noticed that these values matched the URLs generated when clicking the first few doors.&lt;/p&gt;

&lt;p&gt;This suggested that the application was using MD5 hashes of sequential integer values as resource identifiers.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.1. Verifying the Hash Pattern
&lt;/h3&gt;

&lt;p&gt;To verify this assumption, I used Python's built-in &lt;code&gt;hashlib&lt;/code&gt; library.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;hashlib&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;hashed_value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;hashlib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;md5&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hexdigest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{i}: {hashed_value}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output generated a sequence of hashes corresponding to the visible doors.&lt;/p&gt;

&lt;p&gt;This confirmed an important detail:&lt;/p&gt;

&lt;p&gt;The application was not generating random identifiers. It was calculating MD5 hashes from predictable integer values.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.2. Understanding the Security Problem
&lt;/h3&gt;

&lt;p&gt;At this point, I had identified the underlying pattern.&lt;/p&gt;

&lt;p&gt;The application appeared to follow this logic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Room ID
   |
   v
Convert integer to string
   |
   v
Generate MD5 hash
   |
   v
Use hash as URL path
   |
   v
Retrieve corresponding resource
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The problem was that MD5 hashing did not prevent someone from generating another valid identifier.&lt;/p&gt;

&lt;p&gt;Since the original input was predictable, I could calculate the hash for any integer without needing to reverse the hashing algorithm.&lt;/p&gt;

&lt;p&gt;This was the key observation that led to the exploitation stage.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Exploitation – Finding the Hidden Door
&lt;/h2&gt;

&lt;p&gt;After identifying the pattern, I started thinking about the possible resource identifiers.&lt;/p&gt;

&lt;p&gt;The visible doors represented sequential values from &lt;code&gt;1&lt;/code&gt; to &lt;code&gt;13&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;However, I wanted to determine whether the application accepted identifiers outside this range.&lt;/p&gt;

&lt;p&gt;I decided to test boundary values.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1. Testing the Next Sequential Value
&lt;/h3&gt;

&lt;p&gt;My first attempt was to calculate the MD5 hash of &lt;code&gt;14&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; -n &lt;span class="s2"&gt;"14"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; md5sum
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The resulting hash was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aab3238922bcc25a6f606eb525ffdc56
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I then appended this value to the target URL and accessed it through my browser.&lt;/p&gt;

&lt;p&gt;The application did not return the expected hidden resource.&lt;/p&gt;

&lt;p&gt;This indicated that simply increasing the identifier was not the correct approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.2. Thinking About the Lower Boundary
&lt;/h3&gt;

&lt;p&gt;Instead of continuing to test larger numbers, I considered the opposite direction.&lt;/p&gt;

&lt;p&gt;The visible sequence started at &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;What if the application also supported a resource identified by &lt;code&gt;0&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;I generated its MD5 hash:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; -n &lt;span class="s2"&gt;"0"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; md5sum
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cfcd208495d565ef66e7dff9f98764da
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, I modified the URL by replacing the existing hash with the newly generated value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://&amp;lt;TARGET_IP&amp;gt;/cfcd208495d565ef66e7dff9f98764da
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I submitted the request through my browser.&lt;/p&gt;

&lt;p&gt;This time, the application returned the hidden resource containing the flag.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.3. Retrieving the Flag
&lt;/h3&gt;

&lt;p&gt;The hidden endpoint was accessible even though it was not represented by any of the visible doors.&lt;/p&gt;

&lt;p&gt;This demonstrated that the application was accepting a predictable object reference without adequately restricting access to the underlying resource.&lt;/p&gt;

&lt;p&gt;The challenge was completed after retrieving the flag and submitting it to TryHackMe.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flag:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flag{&amp;lt;FLAG&amp;gt;}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  6. Technical Analysis – Why Did This Work?
&lt;/h2&gt;

&lt;p&gt;The interesting part of Corridor is not the MD5 algorithm itself. It is how the application used the hash as a resource identifier.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.1. MD5 Is Not Encryption
&lt;/h3&gt;

&lt;p&gt;One important distinction is that MD5 is a hashing algorithm, not an encryption algorithm.&lt;/p&gt;

&lt;p&gt;Encryption is designed to be reversible using the appropriate decryption key.&lt;/p&gt;

&lt;p&gt;Hashing is designed to be a one-way transformation.&lt;/p&gt;

&lt;p&gt;However, this does not mean that MD5 hashes of predictable values are impossible to identify.&lt;/p&gt;

&lt;p&gt;For example, if an application calculates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;hashlib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;md5&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hexdigest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An attacker can calculate the same value independently.&lt;/p&gt;

&lt;p&gt;There is no secret involved in generating the hash.&lt;/p&gt;

&lt;p&gt;Therefore, hashing a sequential integer does not provide meaningful protection against enumeration.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.2. The Root Cause
&lt;/h3&gt;

&lt;p&gt;The underlying security issue can be summarized as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The application used predictable integer values as resource identifiers.&lt;/li&gt;
&lt;li&gt;It converted those identifiers into MD5 hashes.&lt;/li&gt;
&lt;li&gt;The resulting hashes were exposed through URLs.&lt;/li&gt;
&lt;li&gt;The application allowed direct requests using those identifiers.&lt;/li&gt;
&lt;li&gt;The server did not adequately enforce authorization restrictions on the requested resource.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The hash provided obscurity, not authorization.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.3. Why This Is an IDOR Vulnerability
&lt;/h3&gt;

&lt;p&gt;IDOR occurs when an attacker can manipulate an object reference to access a resource they should not be able to access.&lt;/p&gt;

&lt;p&gt;In this challenge, manipulating the URL path allowed me to access a resource that was not linked through the normal interface.&lt;/p&gt;

&lt;p&gt;The important security lesson is that hiding an identifier does not replace server-side access control.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Security Impact
&lt;/h2&gt;

&lt;p&gt;In a real-world application, similar implementation mistakes could have serious consequences.&lt;/p&gt;

&lt;p&gt;Depending on the resources exposed, an attacker might be able to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access other users' private information.&lt;/li&gt;
&lt;li&gt;Retrieve confidential documents.&lt;/li&gt;
&lt;li&gt;View internal application resources.&lt;/li&gt;
&lt;li&gt;Access administrative functionality.&lt;/li&gt;
&lt;li&gt;Modify or delete resources belonging to other users.&lt;/li&gt;
&lt;li&gt;Discover endpoints that are not exposed through the normal interface.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The impact depends on the application's functionality and the permissions enforced by the backend.&lt;/p&gt;

&lt;p&gt;For example, an IDOR vulnerability in a financial application could expose transaction information or potentially allow unauthorized modifications to financial records.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Mitigation and Prevention
&lt;/h2&gt;

&lt;p&gt;There are several ways developers can prevent this type of vulnerability.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.1. Implement Server-Side Authorization
&lt;/h3&gt;

&lt;p&gt;Every request should be checked against the authenticated user's permissions.&lt;/p&gt;

&lt;p&gt;The application must verify that the requester is authorized to access the requested resource, regardless of whether the identifier is numerical, hashed, or randomly generated.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.2. Avoid Predictable Resource Identifiers
&lt;/h3&gt;

&lt;p&gt;Using randomly generated identifiers, such as UUIDs, can make enumeration more difficult.&lt;/p&gt;

&lt;p&gt;However, this should only be considered an additional security measure.&lt;/p&gt;

&lt;p&gt;Random identifiers do not replace proper authorization checks.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.3. Apply Object-Level Access Control
&lt;/h3&gt;

&lt;p&gt;The backend should validate ownership and permissions before returning or modifying an object.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_document&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;document_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;document&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;database&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_document&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;document_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;owner_id&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;PermissionError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Access denied"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;document&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example illustrates the importance of checking ownership rather than trusting the supplied identifier.&lt;/p&gt;

&lt;h3&gt;
  
  
  8.4. Perform Security Testing
&lt;/h3&gt;

&lt;p&gt;Developers should regularly test direct object references and authorization boundaries.&lt;/p&gt;

&lt;p&gt;Useful testing approaches include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Changing resource identifiers manually.&lt;/li&gt;
&lt;li&gt;Testing sequential and boundary values.&lt;/li&gt;
&lt;li&gt;Inspecting HTTP requests and responses.&lt;/li&gt;
&lt;li&gt;Testing access between different user accounts.&lt;/li&gt;
&lt;li&gt;Reviewing backend authorization logic.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  9. Key Takeaways
&lt;/h2&gt;

&lt;p&gt;Completing Corridor helped reinforce several important web security concepts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Never trust identifiers supplied by clients.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;URLs and request parameters can be manipulated. Every resource request needs proper server-side validation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Hashing does not equal authorization.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MD5 hashes of predictable values can be generated easily. They should never be treated as a security boundary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Always inspect the application structure.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Looking at the HTML source revealed useful information about how the application generated its endpoints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Test boundary conditions.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Testing values outside the visible range was what eventually led me to the hidden resource.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Understand the difference between obscurity and security.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A resource that is difficult to discover is not necessarily protected. Real security comes from correctly implemented authentication and authorization mechanisms.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. Conclusion
&lt;/h2&gt;

&lt;p&gt;Corridor is a short but valuable introduction to IDOR vulnerabilities.&lt;/p&gt;

&lt;p&gt;What initially appeared to be a simple web application with several clickable doors turned into an interesting exercise in URL analysis, hash identification, and resource enumeration.&lt;/p&gt;

&lt;p&gt;The most important discovery was that the application used MD5 hashes of sequential integers as resource identifiers. By identifying this pattern and testing a boundary value, I was able to access a hidden endpoint that was not available through the normal interface.&lt;/p&gt;

&lt;p&gt;My biggest takeaway from this challenge is that &lt;strong&gt;security should never depend on how difficult an identifier looks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whether an application uses sequential numbers, MD5 hashes, or UUIDs, the backend must always verify that the requester has permission to access the requested resource.&lt;/p&gt;

&lt;p&gt;That is the fundamental lesson behind IDOR, and it is something I will keep in mind when both developing and testing web applications.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Author:&lt;/strong&gt; Victor Hoang&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; TryHackMe&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Room:&lt;/strong&gt; &lt;a href="https://tryhackme.com/room/corridor" rel="noopener noreferrer"&gt;Corridor&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Topics:&lt;/strong&gt; Web Security | IDOR | MD5 | Access Control | Enumeration&lt;/p&gt;

</description>
      <category>tryhackme</category>
      <category>idor</category>
      <category>websecurity</category>
      <category>md5</category>
    </item>
    <item>
      <title>TryHackMe — Lo-Fi: Exploiting Path Traversal Vulnerability with Burp Suite</title>
      <dc:creator>Victor</dc:creator>
      <pubDate>Tue, 17 Nov 2026 03:21:28 +0000</pubDate>
      <link>https://dev.to/thng_c3bdfbb790bc848d79c/tryhackme-lo-fi-exploiting-path-traversal-vulnerability-with-burp-suite-4jm9</link>
      <guid>https://dev.to/thng_c3bdfbb790bc848d79c/tryhackme-lo-fi-exploiting-path-traversal-vulnerability-with-burp-suite-4jm9</guid>
      <description>&lt;h1&gt;
  
  
  TryHackMe Lo-Fi: Exploiting a Path Traversal Vulnerability with Burp Suite
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;In this write-up, I will document my experience completing the &lt;strong&gt;Lo-Fi room on TryHackMe&lt;/strong&gt;, focusing on identifying and exploiting a Path Traversal vulnerability in a web application.&lt;/p&gt;

&lt;p&gt;During this challenge, I used &lt;strong&gt;Burp Suite&lt;/strong&gt; to intercept and manipulate HTTP requests, investigate how the application handled file paths, and exploit insufficient input validation to access files outside the intended web directory.&lt;/p&gt;

&lt;p&gt;The primary objective was to understand how Path Traversal vulnerabilities work in real-world web applications and how attackers can abuse them to access sensitive files on a server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tools used:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TryHackMe — Lo-Fi room&lt;/li&gt;
&lt;li&gt;Burp Suite Community Edition&lt;/li&gt;
&lt;li&gt;Web Browser&lt;/li&gt;
&lt;li&gt;HTTP request interception and manipulation&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Understanding Path Traversal
&lt;/h2&gt;

&lt;p&gt;Path Traversal, also known as Directory Traversal, is a web application vulnerability that allows an attacker to access files and directories outside the application's intended directory.&lt;/p&gt;

&lt;p&gt;This vulnerability commonly occurs when an application accepts user-controlled input to construct file paths without properly validating or sanitizing the input.&lt;/p&gt;

&lt;p&gt;For example, consider a web application that retrieves files using a parameter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="na"&gt;http://target.com/image?file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;logo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;png&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the application directly uses the supplied filename to access a file on the server, an attacker may manipulate the parameter to navigate outside the intended directory.&lt;/p&gt;

&lt;p&gt;A typical Path Traversal payload is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;../../../etc/passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Understanding the payload
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Explanation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;../&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Moves one directory level up&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;../../&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Moves two directory levels up&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;../../../&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Moves three directory levels up&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/etc/passwd&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Linux file containing local user account information&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The vulnerability becomes exploitable when the application does not prevent directory traversal sequences.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Reconnaissance and Initial Investigation
&lt;/h2&gt;

&lt;p&gt;After starting the TryHackMe machine, I accessed the target web application through the provided browser.&lt;/p&gt;

&lt;p&gt;The first step was to explore the application's functionality and identify potential entry points.&lt;/p&gt;

&lt;p&gt;During this process, I paid attention to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;URL parameters.&lt;/li&gt;
&lt;li&gt;File-loading functionality.&lt;/li&gt;
&lt;li&gt;HTTP GET requests.&lt;/li&gt;
&lt;li&gt;Parameters that appeared to reference images or other resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One important observation was that the application appeared to retrieve resources based on user-controlled input.&lt;/p&gt;

&lt;p&gt;This behavior suggested a potential attack surface for Path Traversal.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Exploitation Using Burp Suite
&lt;/h2&gt;

&lt;p&gt;To investigate and exploit the suspected Path Traversal vulnerability, I used &lt;strong&gt;Burp Suite Intruder&lt;/strong&gt; to automate HTTP request manipulation and test different directory traversal payloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Intercept the HTTP Request
&lt;/h3&gt;

&lt;p&gt;First, I accessed the target web application through my browser with Burp Suite Proxy enabled.&lt;/p&gt;

&lt;p&gt;I intercepted the HTTP request and identified the parameter responsible for retrieving files from the server.&lt;/p&gt;

&lt;p&gt;After identifying the potentially vulnerable parameter, I sent the request to Burp Suite Intruder.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Configure Payload Positions
&lt;/h3&gt;

&lt;p&gt;Inside the Intruder tab, I selected the parameter value that I wanted to test and configured it as a payload insertion position.&lt;/p&gt;

&lt;p&gt;This allowed me to dynamically replace the original parameter value with different traversal payloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Configure Path Traversal Payloads
&lt;/h3&gt;

&lt;p&gt;I configured a list of directory traversal payloads to test whether the application properly restricted access to its filesystem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example payloads:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;../
../../
../../../
../../../../
../../../../../etc/passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These payloads were designed to navigate through parent directories and attempt to access files outside the application's intended directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Execute the Intruder Attack
&lt;/h3&gt;

&lt;p&gt;After configuring the payload positions and payload list, I launched the Intruder attack.&lt;/p&gt;

&lt;p&gt;Burp Suite automatically generated and sent multiple HTTP requests, replacing the selected parameter with each configured payload.&lt;/p&gt;

&lt;p&gt;This helped me efficiently test different traversal patterns without manually modifying every request.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Analyze HTTP Responses
&lt;/h3&gt;

&lt;p&gt;After the attack completed, I examined the response results to identify differences between the requests.&lt;/p&gt;

&lt;p&gt;I focused on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTTP status codes.&lt;/li&gt;
&lt;li&gt;Response lengths.&lt;/li&gt;
&lt;li&gt;Response bodies.&lt;/li&gt;
&lt;li&gt;Differences in server behavior.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A response containing the contents of an unauthorized file would indicate successful exploitation of the Path Traversal vulnerability.&lt;/p&gt;

&lt;p&gt;This demonstrated how automated HTTP request testing can help identify weaknesses in web application file-handling mechanisms.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Technical Analysis: Why Did the Vulnerability Work?
&lt;/h2&gt;

&lt;p&gt;The root cause of Path Traversal is generally insecure file-handling logic.&lt;/p&gt;

&lt;p&gt;Consider the following vulnerable Python example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;flask&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;send_file&lt;/span&gt;

&lt;span class="nd"&gt;@app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/download"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;download&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;filename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"file"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;send_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/var/www/files/"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application directly concatenates user input with a predefined directory.&lt;/p&gt;

&lt;p&gt;An attacker could provide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;../../../etc/passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The resulting path could point outside the intended directory.&lt;/p&gt;

&lt;p&gt;The key security issue is the absence of proper path validation and access restrictions.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Security Impact
&lt;/h2&gt;

&lt;p&gt;Path Traversal can have several security implications depending on the application's permissions and implementation.&lt;/p&gt;

&lt;p&gt;Potential impacts include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sensitive Information Disclosure:&lt;/strong&gt; Unauthorized access to configuration files, application source code, credentials, or system files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Credential Exposure:&lt;/strong&gt; Access to files containing usernames, passwords, API keys, or other sensitive information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application Compromise:&lt;/strong&gt; Disclosure of configuration details that may help attackers identify further vulnerabilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privilege Escalation Opportunities:&lt;/strong&gt; Exposed information may assist attackers in conducting additional attacks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The actual impact depends on which files are accessible and the privileges of the application process.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Mitigation and Prevention
&lt;/h2&gt;

&lt;p&gt;Developers should implement multiple layers of protection to prevent Path Traversal vulnerabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 1. Input Validation
&lt;/h3&gt;

&lt;p&gt;Validate user input and reject unexpected path separators or traversal sequences when they are not required.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 2. Canonicalize File Paths
&lt;/h3&gt;

&lt;p&gt;Resolve paths to their canonical form and verify that the resulting path remains within the intended directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 3. Use Allowlisting
&lt;/h3&gt;

&lt;p&gt;Instead of accepting arbitrary filenames, map user-provided identifiers to predefined files.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 4. Apply Least Privilege
&lt;/h3&gt;

&lt;p&gt;Ensure that the web application runs with restricted filesystem permissions and cannot access unnecessary sensitive files.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 5. Secure File Handling
&lt;/h3&gt;

&lt;p&gt;Use safe file-handling APIs and enforce directory boundaries before accessing files.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Key Takeaways
&lt;/h2&gt;

&lt;p&gt;Completing the Lo-Fi room helped me better understand the practical exploitation of Path Traversal vulnerabilities.&lt;/p&gt;

&lt;p&gt;The most important lessons I learned were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to identify potentially vulnerable file-handling parameters.&lt;/li&gt;
&lt;li&gt;How to intercept HTTP requests using Burp Suite Proxy.&lt;/li&gt;
&lt;li&gt;How to manipulate requests with Burp Suite Intruder.&lt;/li&gt;
&lt;li&gt;How directory traversal sequences can bypass intended directory boundaries.&lt;/li&gt;
&lt;li&gt;How to analyze HTTP responses to validate a suspected vulnerability.&lt;/li&gt;
&lt;li&gt;Why proper input validation and filesystem access restrictions are essential.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  9. Conclusion
&lt;/h2&gt;

&lt;p&gt;This challenge provided practical experience with one of the fundamental vulnerabilities in web application security.&lt;/p&gt;

&lt;p&gt;More importantly, it demonstrated how a seemingly simple file-loading functionality can introduce a serious security risk when user-controlled input is not properly validated.&lt;/p&gt;

&lt;p&gt;I will continue improving my practical penetration-testing skills through TryHackMe challenges and hands-on security labs, with a particular focus on web application vulnerabilities and security testing methodologies.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Lab:&lt;/strong&gt; TryHackMe — Lo-Fi&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Category:&lt;/strong&gt; Web Application Security&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Vulnerability:&lt;/strong&gt; Path Traversal / Directory Traversal&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Exploitation Tool:&lt;/strong&gt; Burp Suite (Proxy and Intruder)&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>infosec</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
