0% found this document useful (0 votes)
38 views

Lab 11

This document provides instructions for performing a man-in-the-middle attack on a DVWA (Damn Vulnerable Web Application) server using Burp Suite and cURL. It involves intercepting requests with Burp Suite to capture the PHP session ID and credentials, then using cURL to simulate a login by replaying the session cookie. Specifically, it has you: 1) Get the IP address of the target, 2) Configure Firefox and Burp Suite proxy settings, 3) Intercept the login request with Burp to extract the session data, 4) Copy the session into a cURL statement, and 5) Issue the cURL attack to hijack the authenticated session without logging in directly.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Lab 11

This document provides instructions for performing a man-in-the-middle attack on a DVWA (Damn Vulnerable Web Application) server using Burp Suite and cURL. It involves intercepting requests with Burp Suite to capture the PHP session ID and credentials, then using cURL to simulate a login by replaying the session cookie. Specifically, it has you: 1) Get the IP address of the target, 2) Configure Firefox and Burp Suite proxy settings, 3) Intercept the login request with Burp to extract the session data, 4) Copy the session into a cURL statement, and 5) Issue the cURL attack to hijack the authenticated session without logging in directly.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Lab 11: Burp Suite, Man-in-the-

middle-attack
Section 1.Get IP Address
o Instructions:
- ifconfig —a
o Notes:
- As indicated below, my IP address is 192.168.234.169.
- Please record your IP address.

Section 2: Configure Firefox Proxy Settings


Start Firefox
Instructions:
Click on Firefox
Preferences
Instructions:
Settings --> General

Preferences
Instructions:
Click on Manual proxy configurations
Type "127.0.0.1" in the HTTP Proxy Text Box
Type "8080" in the Port Text Box
Check Use the proxy server for all protocols
Click OK
Section 3: Configure Burp Suite
Start Burp Suite
Instructions:
Burpsuite

Configure proxy
Instructions:
Click on the settings tab
Verify the port is set to 8080
Turn on intercept
Instructions:
Click on the proxy tab
Click on the intercept tab
Verify the intercept button shows "intercept is on"

Section 4: Intercept with Burp Suite


Browse to DVWA's homepage
Instructions:
http://IPADDRESS/dvwa/
Replace IPADDRESS with the Fedora's IP Address obtain in (Section 1, Step 1).
Notice that the DVWA homepage will not be displayed, but instead you will get a
Connecting message.
Continue to Next Step.
Forward Request
Instructions:
Click on the Forward Button 2 times.

View History
Instructions:
Click on the proxy tab
Click on the history tab
Click on /dvwa/login.php
Click on the request tab
Click on the raw tab
Notice that a PHP cookie session is now established, even without logging to the
application.
Login to DVWA
Instructions:
Username: admin
Password: password
Click Login
Notice that the DVWA Navigation Menu will not be displayed, but instead you will
get a Connecting message.
Continue to Next Step

Forward Request
Instructions:
Click on the Forward Button 2 times.
View login.php results
Instructions:
Click on the proxy tab
Click on the history tab
Click on /dvwa/login.php line that contains method POST.
Click on the request tab
Click on the raw tab
Notice that we now have the PHP Session ID, Username and Password.

Copy Session Information


Instructions:
Highlight the PHPSESSID information (See Below)
Right Click
Copy
Start Up Notepad
Instructions:
Notepad

Paste URL into Notepad


Instructions:
Edit --> Paste
Create a curl statement
Instructions:
curl -b "security=impossible; PHPSESSID=4jj5uoqac4i9je389b0thud9ni" --location
"http://192.168.234.169/dvwa/index.php" | grep -i Welcome
We are creating a curl statement to simulate a man-in-the-middle attack.
PHP Session Note: Remember to use the PHP Session information you captured in
(Section 3).
IP Address Note: Remember to use the IP Address Captured in (Section 1, Step 1).
Highlight curl statement.
Right Click and Copy

Section 5: Curl Man-in-middle-attack


Open a console terminal
Instructions:
Click on the console terminal
Issue Attack
Instructions:
Edit --> Paste
Press <Enter> after you verify the curl statement was correctly pasted.

Start FireFox
Instructions:
Mozilla Firefox ESR
Go to Add-ons
Instructions:
Add-ons and themes

Install Cookies Manager


Instructions:
Search for cookies
Click the Install button next to Cookies Manager
Browse to DVWA's Login Page
Instructions:
http://192.168.234.169/dvwa/login.php
Replace 192.168.234.169 with the DVWA's address obtained in (Section 1, Step 1).
DO NOT LOGIN!!!

Start Cookies Manager


Instructions:
Cookies Manager
Edit PHPSESSID Cookie
Instructions:
Select the PHPSESSID cookie that was just created
Click on the edit button

You might also like