____ _ _ ____ ____ ____ _ _ _ _ _____ ____ | __ )| | | | _ \| _ \| _ \| | | | \ | |_ _/ ___| | _ \| | | | |_) | |_) | |_) | | | | \| | | | \___ \ | |_) | |_| | __/| __/| _ <| |_| | |\ | | | ___) | |____/ \___/|_| |_| |_| \_\\___/|_| \_| |_| |____/
Core Function: Burp Suite is an integrated graphical platform for performing comprehensive security testing of web applications.
Primary Use-Cases:
Intercepting, inspecting, and modifying web traffic (HTTP/S).
Automated crawling and mapping of application attack surfaces.
Performing automated and custom fuzzing attacks to discover vulnerabilities.
Analyzing application randomness and session token strength.
Managing and reporting on web application security assessments.
Penetration Testing Phase: Burp Suite is a cornerstone tool used throughout the active phases of a penetration test, including Information Gathering, Vulnerability Analysis, and Exploitation.
Brief History: Originally created by Dafydd Stuttard under the company name PortSwigger, Burp Suite has evolved from a simple proxy tool into the de-facto industry standard for hands-on web application security testing. Its modular design and powerful automation capabilities have made it an indispensable part of a professional penetration tester's toolkit for over a decade.
This section covers the basic commands for installing Burp Suite on a Kali Linux distribution and viewing its command-line launch options. While Burp Suite is a GUI-based tool, these command-line flags provide essential control over its startup behavior, project files, and configurations.
Objective: Check for Existing Installation
This command uses dpkg to query the status of the burpsuite package.
Command:
Bash
dpkg -s burpsuite
Command Breakdown:
dpkg: The Debian package manager command-line tool.
-s: The flag to show the status of a specified package.
burpsuite: The name of the package to query.
Ethical Context & Use-Case: Before installing any tool, it's best practice to verify if it's already present on the system. This avoids redundant installations and potential conflicts. This is a fundamental step in maintaining a clean and efficient testing environment.
--> Expected Output:
Package: burpsuite Status: install ok installed Priority: optional Section: net Installed-Size: 274770 Maintainer: Kali Developers <devel@kali.org> Architecture: all Version: 2025.3.4-0kali1 Description: integrated platform for performing security testing of web applications Burp Suite is an integrated platform for performing security testing of web applications. Its various tools work seamlessly together to support the entire testing process, from initial mapping and analysis of an application's attack surface, through to finding and exploiting security vulnerabilities. . Burp gives you full control, letting you combine advanced manual techniques with state-of-the-art automation, to make your work faster, more effective, and more fun. Homepage: https://portswigger.net/burp/
(Note: The exact version and size may vary.)
Objective: Install Burp Suite
This command uses the Advanced Package Tool (apt) to install the burpsuite package from the configured repositories.
Command:
Bash
sudo apt install burpsuite -y
Command Breakdown:
sudo: Executes the command with superuser (root) privileges.
apt: The command-line utility for managing software packages.
install: The apt command to install a package.
burpsuite: The name of the package to install.
-y: Automatically answers "yes" to any prompts during the installation process.
Ethical Context & Use-Case: During the setup phase of a penetration test, you must ensure all necessary tools are installed on your testing machine. This command securely and efficiently installs Burp Suite from the official Kali Linux repositories, guaranteeing a legitimate and untampered version of the software.
--> Expected Output:
Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: burpsuite 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/268 MB of archives. After this operation, 275 MB of additional disk space will be used. Selecting previously unselected package burpsuite. (Reading database ... 312456 files and directories currently installed.) Preparing to unpack .../burpsuite_2025.3.4-0kali1_all.deb ... Unpacking burpsuite (2025.3.4-0kali1) ... Setting up burpsuite (2025.3.4-0kali1) ... Processing triggers for man-db (2.11.2-2) ...
Objective: View the Help Menu
This command launches Burp Suite with the --help flag to display all available startup options.
Command:
Bash
burpsuite --help
Command Breakdown:
burpsuite: The executable for the Burp Suite application.
--help: The flag to print the help message and exit.
Ethical Context & Use-Case: Understanding the command-line options is crucial for advanced users. It allows for scripted startups, loading specific project files for different client engagements, and customizing memory allocation, which is essential for managing large and complex web application assessments.
--> Expected Output:
Usage: --help Print this message --version Print version details --disable-extensions Prevent loading of extensions on startup --diagnostics Print diagnostic information --use-defaults Start with default settings --collaborator-server Run in Collaborator server mode --collaborator-config Specify Collaborator server configuration file; defaults to collaborator.config --data-dir Specify data directory --project-file Open the specified project file; this will be created as a new project if the file does not exist --developer-extension-class-name Fully qualified name of locally-developed extension class; extension will be loaded from the classpath --config-file Load the specified project configuration file(s); this option may be repeated to load multiple files --user-config-file Load the specified user configuration file(s); this option may be repeated to load multiple files --auto-repair Automatically repair a corrupted project file specified by the --project-file option --unpause-spider-and-scanner Do not pause the Spider and Scanner when opening an existing project --disable-auto-update Suppress auto update behavior
Objective: Launch Burp Suite with a Specific Project File
This command starts Burp Suite and instructs it to load an existing project file or create a new one if it doesn't exist.
Command:
Bash
burpsuite --project-file=/home/kali/projects/client-a.burp
Command Breakdown:
burpsuite: The application executable.
--project-file: The flag to specify a project file.
/home/kali/projects/client-a.burp: The absolute path to the project file.
Ethical Context & Use-Case: In a professional penetration testing engagement, maintaining separate project files for each client is a non-negotiable requirement for organization and data segregation. This command allows you to load the entire state of a previous session, including the target scope, sitemap, proxy history, and tool configurations, ensuring a seamless continuation of your assessment.
[VISUAL OUTPUT: The Burp Suite splash screen appears, followed by the main dashboard. The project file /home/kali/projects/client-a.burp is loaded, and the window title reflects the project name.]
Objective: Start Burp Suite with a Custom Configuration File
This command launches Burp Suite and applies a pre-saved configuration file, which can contain settings for the proxy, scanner, user interface, and more.
Command:
Bash
burpsuite --config-file=/home/kali/configs/api_testing_config.json
Command Breakdown:
burpsuite: The application executable.
--config-file: The flag to load a project-level configuration file.
/home/kali/configs/api_testing_config.json: The path to the JSON configuration file.
Ethical Context & Use-Case: Efficiency is key during an assessment. Penetration testers often create different configuration files for various testing scenarios (e.g., testing a REST API vs. a standard web application). This command allows you to instantly load a tailored testing environment, saving significant time on manual reconfiguration and ensuring consistency across tests.
[VISUAL OUTPUT: Burp Suite launches. A dialog box confirms that the configuration from api_testing_config.json has been loaded, potentially altering settings like Proxy listeners or live scanning options visible in the UI.]
Objective: Launch Burp Suite with Extensions Disabled
This command starts Burp Suite without loading any installed extensions (BApps).
Command:
Bash
burpsuite --disable-extensions
Command Breakdown:
burpsuite: The application executable.
--disable-extensions: The flag that prevents extensions from being loaded on startup.
Ethical Context & Use-Case: Occasionally, an installed extension may cause instability, performance issues, or conflicts with the target application. This command is a critical troubleshooting step, allowing you to launch a "clean" instance of Burp Suite to determine if an extension is the source of a problem. It ensures the core tool's reliability when you need it most.
[VISUAL OUTPUT: Burp Suite launches normally, but the Extender tab shows an empty list of installed extensions, and no extension-related output appears in the console or event log.]
Burp Suite's power comes from its integrated set of tools. The following "examples" are structured as tasks performed within the GUI, representing the core workflow of a web application penetration tester.
The Proxy is the heart of Burp Suite, sitting between your browser and the target application, allowing you to inspect and manipulate all traffic.
Objective: Intercept and Modify an HTTP GET Request
Action/Steps:
Launch Burp Suite and configure your browser to use the Burp Proxy listener (typically 127.0.0.1:8080).
In the Burp Suite UI, navigate to the Proxy > Intercept tab.
Ensure the "Intercept is on" button is active.
In your browser, navigate to a page on your target application (e.g., http://example.com/profile?id=123).
The request will be captured and displayed in the Intercept tab.
Modify the id parameter value from 123 to 124.
Click the "Forward" button to send the modified request to the server.
Configuration Breakdown:
Proxy Listener: The local IP and port Burp listens on for traffic from the browser.
Intercept On/Off: The master switch to enable or disable the interception of requests.
Forward Button: Sends the currently displayed request (modified or not) to its destination.
Ethical Context & Use-Case: This is the most fundamental technique in web application testing. By intercepting a request, a tester can manipulate parameters to test for vulnerabilities like Insecure Direct Object References (IDOR). For instance, changing id=123 to id=124 could test whether you can view another user's profile, which would be a critical security flaw. This must only be done on applications you are authorized to test.
[VISUAL OUTPUT: The Proxy > Intercept tab shows the raw HTTP GET request. The id=123 parameter is highlighted, showing the user has edited it to id=124. The response from the server for user 124's profile is then visible in the HTTP history.]
Objective: Drop a Specific Request
Action/Steps:
With interception enabled in the Proxy > Intercept tab, wait for a request to be captured.
Analyze the request. If it is irrelevant to your testing (e.g., a request to a third-party analytics service), click the "Drop" button.
Configuration Breakdown:
Drop Button: Discards the intercepted request entirely, preventing it from ever being sent to the server.
Ethical Context & Use-Case: During an assessment, a web application generates a lot of "noise"—requests to trackers, ad networks, or content delivery networks that are not in scope. The "Drop" function allows a tester to efficiently discard this traffic, keeping the focus and the proxy history clean and relevant to the target application's security.
[VISUAL OUTPUT: An intercepted request to google-analytics.com is displayed in the Intercept tab. After clicking "Drop," the request disappears, and the browser waiting for the request eventually times out or moves on.]
Objective: Add a Target to Scope
Action/Steps:
Navigate to the Proxy > HTTP history tab.
Browse the target application to populate the history.
Right-click on a request made to the target domain (e.g., https://authorized-target.com).
In the context menu, select "Add to scope".
A dialog will ask if you want to stop sending out-of-scope items to the history. Select "Yes".
Configuration Breakdown:
Scope: A crucial feature that defines the boundaries of your test. Burp Suite uses the scope to control which requests are logged, scanned, and displayed in the Target sitemap.
HTTP History: A log of all requests that have passed through the proxy.
Ethical Context & Use-Case: Defining a clear scope is the most important first step in any professional penetration test. It ensures you are only testing assets you have explicit permission to assess. Adding a target to scope in Burp focuses the tool's powerful features, like the scanner and sitemap, only on the authorized targets, preventing accidental or illegal testing of out-of-scope systems.
[VISUAL OUTPUT: The Target > Scope tab now shows https://authorized-target.com as a defined target. The Proxy > HTTP history tab now visually grays out or hides requests to other domains.]
Objective: Create a Proxy Match and Replace Rule
Action/Steps:
Navigate to the Proxy > Options tab.
Scroll down to the "Match and Replace" section and click "Add".
Create a new rule:
Type: Request header
Match: User-Agent: .*
Replace: User-Agent: HACKR-Testing-Bot/1.0
Comment: Custom User-Agent for identification
Ensure the checkbox next to the rule is enabled.
Configuration Breakdown:
Match and Replace: A powerful feature that allows automatic modification of requests and responses based on regular expressions.
Rule Type: Specifies which part of the HTTP message to modify (e.g., request body, response header).
Ethical Context & Use-Case: During an authorized penetration test, it's often professional courtesy—and sometimes a requirement—to use a custom User-Agent string. This allows system administrators and security teams on the client's side to easily identify traffic coming from the testing team in their logs and differentiate it from real user traffic or a genuine attack.
[VISUAL OUTPUT: The "Match and Replace" table in the Proxy Options now lists the new User-Agent rule. In the Proxy HTTP history, every subsequent outgoing request now shows the User-Agent: HACKR-Testing-Bot/1.0 header.]
Repeater allows you to take any request, modify it endlessly, and resend it to observe how the server responds. It is the primary tool for manual vulnerability discovery.
Objective: Test for SQL Injection using Repeater
Action/Steps:
In the Proxy > HTTP history, find a request with a parameter, such as GET /products?id=5.
Right-click the request and select "Send to Repeater".
Navigate to the Repeater tab. The request will be pre-loaded.
Click "Send" to get a baseline response.
In the request panel, modify the id parameter to id=5'.
Click "Send" again.
Observe the response panel for changes, such as a database error message, a different HTTP status code, or a change in content length.
Configuration Breakdown:
Request Panel: The left-hand panel where you can edit the raw HTTP request.
Response Panel: The right-hand panel that displays the server's response to the crafted request.
Send Button: Transmits the request from the request panel to the server.
Ethical Context & Use-Case: Repeater is the surgeon's scalpel for vulnerability testing. This specific use-case demonstrates a basic manual check for SQL Injection. By sending a single quote ('), we attempt to break the SQL query on the backend. If the application returns a database error, it's a strong indicator of a vulnerability. This controlled, single-request method is perfect for careful, non-disruptive probing of an authorized target.
[VISUAL OUTPUT: The Repeater UI is shown. The left panel contains the request with id=5'. The right panel displays the server's response, which now includes a verbose SQL error message like "You have an error in your SQL syntax..."]
Objective: Test for Path Traversal
Action/Steps:
Find a request in your proxy history that appears to be loading a file, e.g., GET /viewfile?name=report.pdf.
Send this request to Repeater.
In the Repeater request panel, modify the name parameter to test for path traversal. Try payloads like:
name=../../../../etc/passwd
Click "Send" after each modification and analyze the response.
Configuration Breakdown:
Payload Modification: The core activity in Repeater is changing parameter values or other parts of the request to test security flaws.
Response Rendering: The response panel has a "Render" tab that will attempt to display the response as a web page, which can be useful for confirming successful file inclusion.
Ethical Context & Use-Case: Path Traversal vulnerabilities allow an attacker to read arbitrary files from the server. By using Repeater to send controlled payloads like ../../etc/passwd, a penetration tester can safely determine if the application is vulnerable without using automated scanners, which might be too noisy. A successful test would return the contents of the /etc/passwd file, a critical finding in any assessment.
[VISUAL OUTPUT: The Repeater's response panel shows the raw text content of a typical /etc/passwd file, starting with root:x:0:0:root:/root:/bin/bash.]
Intruder is a powerful tool for automating custom attacks. It can iterate through lists of payloads, sending a request for each one and logging the results.
Objective: Fuzz for Usernames (Enumeration)
Action/Steps:
Capture a failed login request (e.g., POST to /login) and send it to Intruder.
Go to the Intruder > Positions tab. The request will be displayed.
Click "Clear §" to remove default payload markers.
Highlight the value of the username parameter (e.g., user=test) and click "Add §".
Go to the Attack type dropdown and select Sniper.
Go to the Payloads tab. Under "Payload Options [Simple list]", click "Add" and enter a list of potential usernames (e.g., admin, administrator, root, user).
Click the "Start attack" button.
Configuration Breakdown:
Payload Markers (§): These special characters tell Intruder where to insert the payloads.
Attack Type (Sniper): This type uses a single payload set and iterates through it, placing one payload at a time into the defined position. It's perfect for username enumeration.
Payload Set: The list of strings (in this case, usernames) that Intruder will use for the attack.
Ethical Context & Use-Case: During an authorized test, an ethical hacker may need to determine valid usernames on an application. The login page often gives different responses for "invalid username" versus "invalid password." By automating this check with Intruder, a tester can efficiently identify valid accounts by looking for subtle differences in the server's responses (e.g., response length or specific error messages), which is a valuable piece of information for subsequent password attacks.
[VISUAL OUTPUT: A new Intruder attack window opens, showing a table of results. Each row represents a request. The "Payload" column shows admin, administrator, etc. The "Length" column for the admin payload is different from the others, indicating a different server response and thus a likely valid username.]
Objective: Brute-Force a 4-Digit PIN
Action/Steps:
Capture a request to a PIN validation endpoint (e.g., POST /validate_pin) and send it to Intruder.
Go to the Intruder > Positions tab and mark the PIN parameter (e.g., pin=1111) as the payload position.
Go to the Payloads tab.
Set the "Payload type" to Numbers.
Configure the number range:
From: 0
To: 9999
Step: 1
Configure number formatting options:
Min integer digits: 4
Max integer digits: 4
Click "Start attack".
Configuration Breakdown:
Payload Type (Numbers): An efficient, built-in payload generator for numeric sequences.
Number Formatting: Ensures that all generated numbers are padded with leading zeros to meet the required 4-digit format (e.g., 0001, 0002).
Ethical Context & Use-Case: Many applications use weak PINs for authentication or session validation. This Intruder configuration allows a tester to perform a comprehensive brute-force attack against a 4-digit PIN endpoint within an authorized testing scope. The results can be sorted by response length or HTTP status to quickly identify the correct PIN, demonstrating a critical authentication vulnerability to the client.
[VISUAL OUTPUT: The Intruder attack window displays results for payloads 0000 through 9999. One row, for payload 1337, shows a 302 Found status code and a different response length, while all others show a 200 OK with a "PIN Invalid" message.]
Decoder is a utility for transforming data, while Comparer is a visual diff tool for comparing requests or responses.
Objective: Decode a Base64 Encoded Parameter
Action/Steps:
In your Proxy history, find a request that contains what appears to be a Base64 encoded string (e.g., a parameter like data=eyJuYW1lIjoiSm9obiJ9).
Highlight the encoded string eyJuYW1lIjoiSm9obiJ9.
Right-click and select "Send to Decoder".
Navigate to the Decoder tab. The string will be in the input field.
In the "Decode as" menu on the right, select Base64. The decoded text will appear in the output field.
Configuration Breakdown:
Input Field: The top panel where you paste the data to be transformed.
Output Field: The bottom panel that shows the result of the transformation.
"Decode as" Menu: A list of common encoding and hashing formats for quick decoding.
Ethical Context & Use-Case: Developers sometimes use simple encoding like Base64 to obfuscate data, believing it provides security. It does not. A penetration tester must be able to quickly decode this data to understand what the application is transmitting. In this case, decoding the string reveals a JSON object ({"name":"John"}), which can then be manipulated and re-encoded to test for other vulnerabilities like privilege escalation or injection.
[VISUAL OUTPUT: The Decoder tab shows eyJuYW1lIjoiSm9obiJ9 in the top box. In the box below, after selecting "Decode as: Base64", the text {"name":"John"} is displayed.]
Objective: Compare Two Responses in Comparer
Action/Steps:
From your Proxy history or Repeater, find two responses you want to compare. For example, the response for a valid user and an invalid user.
Right-click the first response and select "Send to Comparer".
Right-click the second response and also select "Send to Comparer".
Navigate to the Comparer tab. The two items will be loaded.
Select "Words" or "Bytes" at the bottom to perform the comparison.
Configuration Breakdown:
Item Loading: Comparer can be loaded with any two pieces of text, typically HTTP requests or responses.
Comparison Mode (Words/Bytes): "Words" provides a more human-readable diff, highlighting changes in text, while "Bytes" provides a low-level, byte-by-byte comparison.
Ethical Context & Use-Case: Comparer is essential for spotting subtle differences that indicate a vulnerability. For example, when testing for a blind SQL injection, a successful query might result in only a one-word change deep within a large HTML response. Manually finding this change is nearly impossible. Comparer automates this process, visually highlighting the exact differences and allowing the tester to confirm the vulnerability with certainty.
[VISUAL OUTPUT: The Comparer window shows two large HTML responses side-by-side. The left response contains the text "Welcome back, user!", while the right one contains "Welcome back, admin!". The words "user" and "admin" are highlighted in different colors to show the modification.]
While Burp Suite is primarily a GUI tool, its output can be saved and processed by powerful command-line utilities to extract and analyze data efficiently.
Objective: Extract All Unique Endpoints from Proxy History using grep and sort
Action/Steps:
In Burp Suite, go to the Proxy > HTTP history tab.
Select all requests for the in-scope target.
Right-click and choose "Save items". Save the file as history.xml.
In a terminal, run the following command to parse the XML, extract URLs, clean them, and find unique endpoints.
Command:
Bash
cat history.xml | grep -oP '<url><!\[CDATA\[.*?\]\]></url>' | sed -e 's/<\/\?url><!\[CDATA\[//g' -e 's/\]\]>//g' | cut -d '?' -f 1 | sort -u
Command Breakdown:
cat history.xml: Reads the content of the saved history file.
|: A pipe, which sends the output of the previous command as input to the next.
grep -oP '<url>...': Uses Perl-compatible regular expressions (-P) to find and output only (-o) the full URL tags.
sed -e 's/...//g': Uses the stream editor sed to perform two substitutions (-e) to remove the XML tags, leaving only the URL.
cut -d '?' -f 1: Splits each URL string by the ? delimiter and keeps only the first part, effectively removing the query string.
sort -u: Sorts the list of endpoints alphabetically and removes duplicate entries (-u).
Ethical Context & Use-Case: During the reconnaissance phase of a test, understanding the complete attack surface is critical. While Burp's Target sitemap is excellent, sometimes a simple, clean list of all unique endpoints is required for scripting or reporting. This command chain provides a rapid way to process a large Burp history file and generate such a list, which can then be fed into other tools or used for manual analysis.
--> Expected Output:
https://authorized-target.com/ https://authorized-target.com/about https://authorized-target.com/api/login https://authorized-target.com/api/users https://authorized-target.com/contact https://authorized-target.com/dashboard https://authorized-target.com/login https://authorized-target.com/profile https://authorized-target.com/static/main.js
Objective: Find Interesting Responses from Intruder Results using awk
Action/Steps:
In a Burp Intruder attack window, select all results.
Go to the "Save" menu and choose "Results table".
Save the results as a comma-delimited text file named intruder_results.csv.
In a terminal, use awk to parse the CSV and print requests that resulted in a specific response length (e.g., a length that indicates a successful login).
Command:
Bash
awk -F',' '$3 == 302 { print "Found interesting payload:", $2 }' intruder_results.csv
Command Breakdown:
awk: A powerful pattern-scanning and text-processing language.
-F',': Sets the field separator to a comma, for parsing the CSV file.
'$3 == 302 { ... }': This is the awk script. It checks if the third column ($3, which is typically the status code) is equal to 302.
print "Found...", $2: If the condition is met, it prints a message along with the content of the second column ($2), which is the payload that was used.
intruder_results.csv: The input file.
Ethical Context & Use-Case: An Intruder attack can generate thousands of results. Manually sifting through them is inefficient and prone to error. This command automates the analysis. For example, in a password brute-force attack, a successful attempt might result in a 302 Found (redirect) status code, while all failures result in 200 OK. This awk one-liner instantly filters a massive result set to pinpoint the exact payload that succeeded.
--> Expected Output:
Found interesting payload: P@ssword123 Found interesting payload: Qwerty!
Objective: Search All Responses in a Saved Project for a Specific Error String
Action/Steps:
Save your Burp project as client-a.burp. Note that Burp project files are archives.
Unzip the project file into a directory to access the raw request/response data.
Use grep recursively to search all the raw response files for a specific string that might indicate a vulnerability (e.g., "SQL syntax").
Command:
Bash
unzip client-a.burp -d client-a_files && grep -r "SQL syntax" client-a_files/
Command Breakdown:
unzip client-a.burp -d client-a_files: Unzips the Burp project file into a new directory named client-a_files.
&&: A shell operator that executes the second command only if the first one succeeds.
grep -r "SQL syntax" client-a_files/: Recursively (-r) searches for the string "SQL syntax" within all files in the client-a_files directory.
Ethical Context & Use-Case: Sometimes after a long testing session, you might want to perform a global search for specific keywords or error messages across every single response received. This could be to find all occurrences of a specific error code, an email address, or, as in this example, a string indicating a potential SQL injection that was missed during initial analysis. This technique allows for a thorough post-assessment data mining exercise on an authorized project file.
--> Expected Output:
client-a_files/13/2.resp:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 client-a_files/45/8.resp:Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/users.php on line 88. SQL syntax error.
Leveraging AI, particularly through scripting, can significantly enhance the analysis of data generated by Burp Suite, turning raw output into actionable intelligence.
Objective: Visualize Intruder Attack Results with Python to Find Anomalies
This script uses Python with pandas and matplotlib to parse exported Intruder results and create a scatter plot of response lengths, making it easy to spot outliers that represent interesting server behavior.
AI Integration Script (Python):
Python
import pandas as pd
import matplotlib.pyplot as plt
# Ethical Pre-computation: Assume an Intruder attack was run and results were
# saved as 'intruder_results.csv'. The columns are assumed to be:
# Position, Payload, Status, Length, Time
# This script analyzes that pre-existing data from an authorized test.
csv_file = 'intruder_results.csv'
# Use pandas to read the CSV data
try:
df = pd.read_csv(csv_file)
df.columns = ['Position', 'Payload', 'Status', 'Length', 'Time']
except FileNotFoundError:
print(f"Error: The file {csv_file} was not found. Please export from Burp Intruder.")
exit()
# Create a scatter plot
plt.figure(figsize=(12, 6))
plt.scatter(df.index, df['Length'], alpha=0.5)
# Highlight anomalies (e.g., response lengths that deviate significantly)
mean_length = df['Length'].mean()
std_dev = df['Length'].std()
anomalies = df[abs(df['Length'] - mean_length) > 2 * std_dev]
plt.scatter(anomalies.index, anomalies['Length'], color='red', label='Anomalies')
# Add labels and title for the report
plt.title('Intruder Response Length Analysis')
plt.xlabel('Request Number')
plt.ylabel('Response Length (Bytes)')
plt.legend()
plt.grid(True)
# Save the plot for the penetration test report
plt.savefig('intruder_analysis_plot.png')
print("Analysis complete. Plot saved to intruder_analysis_plot.png")
print("\nAnomalous Payloads Found:")
print(anomalies[['Payload', 'Status', 'Length']])
Script Breakdown:
import pandas as pd: Imports the pandas library for data manipulation, aliased as pd.
import matplotlib.pyplot as plt: Imports the pyplot module for data visualization.
pd.read_csv(csv_file): Reads the Burp Intruder CSV export into a pandas DataFrame.
plt.scatter(...): Creates a scatter plot with the request number on the x-axis and response length on the y-axis.
df[abs(df['Length'] - mean_length) > 2 * std_dev]: This is the core AI/ML logic. It uses a simple statistical method (standard deviation) to identify any data points (responses) that are significant outliers from the norm.
plt.savefig(...): Saves the generated chart as an image file.
Ethical Context & Use-Case: In a blind vulnerability assessment (like blind SQLi or content discovery), the only indicator of success is often a subtle change in response length. A Python script can programmatically ingest thousands of data points from an Intruder attack and use statistical analysis to identify anomalous responses that a human might miss. Generating a plot provides clear, visual evidence for a penetration test report, making the findings easier for the client to understand.
[VISUAL OUTPUT: A scatter plot image named intruder_analysis_plot.png. The plot shows hundreds of blue dots clustered around a central horizontal line (the average response length). A few red dots are scattered far above or below this line, clearly marked as anomalies.] --> Expected Output:
Analysis complete. Plot saved to intruder_analysis_plot.png
Anomalous Payloads Found:
Payload Status Length
1337 OR 1=1 200 15432
2501 admin'# 200 15432
8080 ../../ 200 812
Objective: Generate Context-Aware Wordlists with an LLM for Burp Intruder
This example demonstrates how to use a Large Language Model (LLM) to generate a highly specific wordlist for fuzzing directories or files based on the context of the target application.
AI Integration Script (Python with OpenAI API):
Python
import openai
import os
# Ethical Pre-computation: This script assumes the user has an API key and
# is authorized to perform directory enumeration on the target.
# The goal is to create a smarter wordlist than a generic one.
# Set your API key (best practice is to use environment variables)
# openai.api_key = os.getenv("OPENAI_API_KEY")
# For this example, we'll use a placeholder.
openai.api_key = "YOUR_API_KEY_HERE"
app_context = """
The web application is for a hospital patient management system.
It is built with Java Spring Boot and uses a Tomcat server.
Known sections include patient records, billing, appointments, and a doctor's portal.
"""
prompt = f"""
Based on the following application context, generate a wordlist of 50 potential
hidden file or directory names for security testing.
Include common framework-related paths and business-logic-related paths.
The output should be a single column of text, with one word per line.
Application Context:
{app_context}
"""
try:
response = openai.Completion.create(
engine="text-davinci-003",
prompt=prompt,
max_tokens=200,
temperature=0.5
)
wordlist = response.choices[0].text.strip()
# Save the wordlist to a file for Burp Intruder
with open("ai_generated_wordlist.txt", "w") as f:
f.write(wordlist)
print("AI-generated wordlist saved to ai_generated_wordlist.txt")
print("\n--- Sample from Wordlist ---")
print("\n".join(wordlist.split('\n')[:10])) # Print first 10 lines
except Exception as e:
print(f"An error occurred: {e}")
print("Please ensure your API key is correctly configured.")
Script Breakdown:
import openai: Imports the official OpenAI Python library.
app_context: A string containing information gathered about the target during reconnaissance.
prompt: The carefully crafted instruction given to the LLM, telling it what kind of wordlist to generate based on the context.
openai.Completion.create(...): The function call that sends the prompt to the AI model.
engine="text-davinci-003": Specifies which AI model to use.
with open(...): Saves the AI's response to a text file.
Ethical Context & Use-Case: Generic wordlists like rockyou.txt are often inefficient for discovering hidden application endpoints. An LLM can be used as an intelligent assistant to generate a much smaller, higher-quality, and context-specific wordlist. By providing the AI with details about the application's purpose and technology stack (discovered during authorized recon), the resulting list is more likely to contain valid names (e.g., /actuator/health, /patient-api, /billing/export), making fuzzing attacks in Burp Intruder faster and more effective.
--> Expected Output:
AI-generated wordlist saved to ai_generated_wordlist.txt --- Sample from Wordlist --- WEB-INF META-INF actuator env health metrics jolokia patient-records admin-portal doctor-login
This guide and all information contained within are intended for educational purposes only. The tools, techniques, and procedures described are designed for use by cybersecurity professionals and students in legally authorized and ethical contexts.
Permission is mandatory. You must have explicit, written permission from the owner of a system or network before conducting any form of security testing. Performing these actions on systems for which you do not have authorization is illegal and can result in severe civil and criminal penalties.
The author, instructor, and any associated platforms (including Udemy) bear no responsibility or liability for any misuse or illegal application of the information presented. The user assumes full responsibility for their own actions. By proceeding with this material, you acknowledge and agree to use this knowledge lawfully and ethically. Cybersecurity is about protecting systems, not harming them.