Sitemap

Write-Up: Using web proxies

5 min readFeb 23, 2026

--

The Importance of Web Proxies in Modern Web Application Security

Modern web and mobile applications rely heavily on continuous communication with back-end servers. These servers handle data processing, storage, and business logic, while user devices such as browsers and mobile phones display and interact with the processed data. Because of this strong dependency on back-end infrastructure, securing and testing back-end servers has become a critical component of application security.

A large portion of Web Application Penetration Testing focuses on analyzing and testing the HTTP/HTTPS requests exchanged between applications and back-end servers. To effectively capture, inspect, and manipulate this traffic, security professionals use specialized tools known as web proxies.

What Are Web Proxies?

Web proxies are tools positioned between a client (browser or mobile app) and a back-end server. They act as a man-in-the-middle (MITM), allowing testers to intercept, view, and modify web traffic in real time. Unlike network sniffing tools such as Wireshark, which capture all network traffic, web proxies specifically focus on web-based communication over ports like HTTP (80) and HTTPS (443).

Press enter or click to view image in full size

Web proxies are considered essential tools for web penetration testers. They simplify the process of capturing and replaying HTTP requests, making testing more efficient compared to older command-line-based methods. Once configured, a web proxy allows testers to:

  • View all outgoing HTTP requests
  • Inspect server responses
  • Intercept and modify requests before they reach the server
  • Analyze how the server handles manipulated input

This ability to intercept and alter requests is fundamental for identifying vulnerabilities.

Common Uses of Web Proxies

Although capturing and replaying HTTP requests is their primary function, web proxies offer many additional features that support comprehensive security testing. These include:

  • Web application vulnerability scanning
  • Web fuzzing
  • Web crawling
  • Application mapping
  • Web request analysis
  • Configuration testing
  • Code reviews

While specific web attacks are covered in dedicated security modules, mastering web proxy tools is essential for performing those attacks effectively. Two of the most widely used web proxy tools in the industry are Burp Suite and OWASP ZAP, both of which provide powerful features for web application testing.

Get Jordi Been’s stories in your inbox

Join Medium for free to get updates from this writer.

Intercepting Web Requests
Try intercepting the ping request on the server shown above, and change the post data similarly to what we did in this section. Change the command to read ‘flag.txt’

Press enter or click to view image in full size
Once we obtain an IP address, we check the website running on the specified port.
When we test the website, we see that it allows us to send a ping (packet) to a local address.When we test the website, we see that this is a website to send a ping (packet) to our local address
Press enter or click to view image in full size
We intercept the request through our web proxy and modify it in Repeater. Then we send the request again to analyze the server’s response.
Press enter or click to view image in full size
Next, we modify the request by adding the command cat flag.txt to read the flag.

Excersise 1: Try using the payload we used last time directly within the browser, to test how intercepting responses can make web application penetration testing easier.

Press enter or click to view image in full size
Enable response interception rules in your proxy settings.
Press enter or click to view image in full size
We force a full refresh in the browser (Ctrl + Shift + R) and intercept the request. In Burp, we see the intercepted request and click Forward. After doing this, we see the intercepted response. We then change type=”number” to type=”text” and modify maxlength=”3" to maxlength=”100". After that, we click Forward again.
When we return to the browser, we can now enter text and execute the command ls to list the contents of the current directory.
This produces the following output.

Exercise 2: Try adding a rule that automatically adds ;ls; when we click on Ping, by matching and replace the request body of the Ping request.

Press enter or click to view image in full size
The required attribute means that the form cannot be submitted if the field is empty. Therefore, we remove the required attribute in the response body. Additionally, in the request body, we change ip= to ip=;ls;.
Press enter or click to view image in full size
Now we can leave the field empty and click Ping directly. Make sure that the traffic is intercepted by the web proxy.
Press enter or click to view image in full size
We observe that the request body has automatically been modified to ip=;ls;. We click Forward to send the traffic to the web server and return to the browser.
In the browser, we see the output of the ls command displaying the contents of the current directory.

Try using request repeating to be able to quickly test commands. With that, try looking for the other flag.

Press enter or click to view image in full size
We start intercepting the traffic again using our web proxy when sending a ping request through the browser. We receive a 200 OK response from the web server. We then send the intercepted request to Burp Repeater and modify the request body there. Note that the HTTP match and replace rules from the previous exercise are still active.
Press enter or click to view image in full size
Since we do not know the directory structure on the server, we attempt directory traversal using ls ../../../../../ to move up multiple levels in the filesystem and determine whether we can reach the root directory (/).
Press enter or click to view image in full size
Once the root directory is displayed, we notice another flag.txt file. We can read its contents using cat ../../../../../flag.txt. And we got the flag!

The string found in the attached file has been encoded several times with various encoders. Try to use the decoding tools we discussed to decode it and get the flag.

Press enter or click to view image in full size
Download the file and decode the flag.

Try running ‘auxiliary/scanner/http/http_put’ in Metasploit on any website, while routing the traffic through Burp. Once you view the requests sent, what is the last line in the request?

Press enter or click to view image in full size
Open Metasploit and select the payload auxiliary/scanner/http/http_put. Then configure the required options. Make sure your web proxy is intercepting the requests.Open metasploit and choose payload auxiliary/scanner/http/http_put. Then fill in the options. Make sure your web proxy is intercepting the requests.
Press enter or click to view image in full size
After sending the request, observe the last line of the HTTP request in your proxy.

Use Burp Intruder to fuzz for ‘.html’ files under the /admin directory, to find a file containing the flag.

Press enter or click to view image in full size
Send the intercepted request to Intruder and modify the first line to: GET /admin/$$.html HTTP/1.1
Then start the attack.
Press enter or click to view image in full size
Filter the results by Status Code, and you will notice a 200 OK response for the entry 2010.
Press enter or click to view image in full size
We have successfully obtained the flag.

Skills Assessment — Using Web Proxies

The /admin.php page uses a cookie that has been encoded multiple times. Try to decode the cookie until you get a value with 31-characters. Submit the value as the answer.

Press enter or click to view image in full size
Intercept the request using the web proxy. Select and copy the cookie value from the Cookie header and send it to Decoder. Intercept the request with the web proxy. Select an copy the cookie value from the cookie header and send this to Decoder.
Press enter or click to view image in full size
The Base64-decoded value contains a 31-character string.

Once you decode the cookie, you will notice that it is only 31 characters long, which appears to be an md5 hash missing its last character. So, try to fuzz the last character of the decoded md5 cookie with all alpha-numeric characters, while encoding each request with the encoding methods you identified above. (You may use the “alphanum-case.txt” wordlist from Seclist for the payload)

Press enter or click to view image in full size
Capture the request again and send it to Intruder.
Press enter or click to view image in full size
Replace the default cookie value with the MD5 hash 3dac93b8cd250aa8c1a36fffc79a17a obtained in the previous question. Select the value and click Add § to mark it as a payload position. Under Payload Options, load the file alphanum-case.txt as the wordlist. Under Payload Processing, click Add and select Add prefix as the processing rule. Paste the MD5 hash as the prefix. Then add the following processing rules: Base64-encode and Encode as ASCII hex. After configuring everything, click Start Attack.
Press enter or click to view image in full size
Filter the results by Response Size. You will notice that responses with a size of 1248 bytes contain the flag.

You are using the ‘auxiliary/scanner/http/coldfusion_locale_traversal’ tool within Metasploit, but it is not working properly for you. You decide to capture the request sent by Metasploit so you can manually verify it and repeat it. Once you capture the request, what is the ‘XXXXX’ directory being called in ‘/XXXXX/administrator/..’?

Press enter or click to view image in full size
This module attempts to exploit a directory traversal vulnerability in the locale attribute. You can provide any URL as RHOST. Before executing this payload, ensure that your web proxy is intercepting the requests.
Press enter or click to view image in full size
From the intercepted requests, we can observe that the msfconsole module is sending requests to the CFIDE directory.

I hope the explanation was somewhat clear and useful to you.

It is important to understand the material in this module thoroughly so that you can apply these techniques effectively whether in a test environment or during a real penetration test.

:-)

--

--

Jordi Been
Jordi Been

Written by Jordi Been

CPTS, OSCP+, OSCP, PNPT, PJPT, CAT & Sec+