Guides
Pentest your own app
Tamper with requests at a breakpoint or with Rewrite rules, replay and race them, check headers and leaked secrets, on systems you own or may test.
This guide uses Cloak Proxy to probe your own app’s API for common weaknesses: tampering with a request mid-flight, replaying it with changed parameters, sending it many times at once to find race conditions and missing rate limits, checking the response security headers and for leaked secrets, and rewriting or scripting systematic edits across many requests. It finishes with how to record findings.
What you need
Section titled “What you need”| Written authorization for the target, if it isn’t yours | Keep it on file before you start |
| Cloak Proxy capturing the app, with HTTPS decrypted | See Debug a mobile app or macOS traffic |
| A test account you can safely change data with | Tampering can create, modify or delete real records |
Intercept and tamper at a breakpoint
Section titled “Intercept and tamper at a breakpoint”A breakpoint holds a request while the app waits, so you can change exactly what reaches the server.
-
Capture the request you want to probe, right-click it, and choose Tools → Breakpoint…. Leave Pause on request on. Keep the matcher tight so only this call pauses.
To pause just the next call once, choose Break on Next Request instead. It adds a request-only breakpoint for that method and URL and removes it after one request has paused, so there’s nothing to clean up. Since 0.2.0
A breakpoint scoped to one endpoint.
- Tool on/off
- Matcher — keep it tight
- Pause on request and/or response
-
Trigger the call. The Breakpoint window opens with the request held.
A held request. Change any part before it's sent.
- Request paused
- Headers, including Authorization
- Execute sends your version
- Abort drops it
-
Tamper and observe. Common checks:
Change What it probes An idin the path or body to another user’sBroken object-level authorization (IDOR) Remove or alter the Authorization header Missing authentication checks A role,isAdminor price field in the bodyMass assignment / privilege escalation Oversized or malformed body Input validation and error handling -
Click Execute to send your edit, Cancel to send the original, or Abort to drop it. If the rule also pauses the response, inspect or change what comes back.
Replay with edits
Section titled “Replay with edits”For quicker iteration than a breakpoint, resend a captured request with changes.
-
Right-click a request and choose Edit and Repeat… (⌥ ⌘ E). The Compose window opens prefilled.
-
Change a parameter, header or token and press Send (⌘ ↩). Repeat with different values to sweep an input.
-
Decode tokens and encoded values inline: select text in a request or response, right-click, and use Quick Preview to decode Base64, a JWT, URL-encoding, timestamps or JSON — useful for reading a session token or a signed parameter before you tamper with it.
Test race conditions and rate limits
Section titled “Test race conditions and rate limits”Some bugs only show up when the same request arrives many times at once: a coupon redeemed twice, a balance withdrawn twice, a login form with no rate limit. Repeat Advanced sends one captured request many times and summarizes what came back.
-
Right-click the request, such as a redeem or transfer call made with a test account, and choose Repeat Advanced… (⇧ ⌥ ⌘ R).
Repeat Advanced: how many, how many at once, and the delay between starts.
- How many requests to send
- How many run at the same time
- Wait between starts
- Start sending
-
Set Requests (up to 10,000), At the same time (up to 100) and Delay between starts (in steps of 50 ms). For a race, send a handful at once with no delay, for example 10 requests, 10 at the same time. For a rate limit, send more, one at a time.
-
Click Send followed by the count. The sheet shows a progress bar, then:
Line Shows Sent How many were sent out of the total, and how long it took. Status How many of each status code came back, such as 200 × 1 409 × 9, plusfailed ×N for requests that got no response.Time Minimum, average, p95 and maximum response time. -
Click Show in Traffic List to select the new requests. They appear under the app Cloak Proxy (Repeat), and each went through your debugging tools.
More than one success for an action that should happen once points to a race condition. All 200s where you expected 429 Too Many Requests points to a missing rate limit. Stop cancels a run that’s still sending.
Check headers and secrets
Section titled “Check headers and secrets”Open Insights (⌥ ⌘ I) to review the responses in bulk.
-
On the Security tab, read each host’s A–F grade and issues: missing HSTS/CSP/
nosniff/clickjacking protection, cookies without Secure/HttpOnly/SameSite, wildcard CORS with credentials, and disclosed software versions.Security grades and the specific header and cookie issues behind them.
- Hosts by grade
- Each issue, with Show Request
-
On the Secrets tab, look for keys, tokens in URLs, card numbers and credentials over plain HTTP. Values are masked; click Show Request to see where each came from. See Find leaked secrets.
Tamper without code using Rewrite
Section titled “Tamper without code using Rewrite”To apply the same change to every matching request or response, start with the Rewrite tool. Each rule is a list of actions, with no script to write.
-
Right-click a captured request and choose Tools › Rewrite…, or open Tools › Edit Rewrite Rules… (⌥ ⌘ R) and add a rule. To affect only your app’s traffic, type its name in Only these apps.
A Rewrite rule: each action changes one part of the request or response.
- Only these apps
- Swap the token for another user's
- Drop a parameter
- Flip a field in every response
- Add another action
-
Click Add Action and pick what to change:
Probe Action Replay as another user Request header › Set Authorizationto a second test account’s tokenMissing authentication Request header › Remove AuthorizationHidden parameters Query parameter › Set debugoradmintotrueClient-side trust Response body › Find and replace "isAdmin": falsewith"isAdmin": true, to see what the app unlocksError handling Response status › Set to 500or503 -
Use the app and watch the traffic list. Actions run in order, before Scripting and breakpoints.
Use Scripting, below, when a change needs logic, such as a value computed from the request.
Script systematic tampering
Section titled “Script systematic tampering”To apply the same change across every matching request (not one at a time), use the Scripting tool. Scripts run onRequest before a request is sent and onResponse before the app sees it.
-
Open Tools → Scripting, add a rule, and set its matcher to the host or path you’re probing.
Scripting: change every matching request or response in JavaScript.
- Tool on/off
- Run onRequest / onResponse
- Check Syntax and Snippets
- The onRequest / onResponse handlers
-
Write the change. For example, strip the auth header to test whether endpoints enforce it, or flip a flag in every response to see what the client exposes:
function onRequest(context, url, request) {// Probe missing-auth handling across every matching call:delete request.headers["Authorization"];return request;}function onResponse(context, url, request, response) {// response.body is an object for JSONconsole.log(response.statusCode, url);return response;} -
Click Check Syntax, watch the Console for
console.logoutput, and read the results in the traffic list (scripted flows are tagged Script).sharedStatepersists across scripts (for example to carry a token between calls) until you Reset sharedState.
Record findings
Section titled “Record findings”-
Highlight and comment interesting requests: right-click → Highlight by color, and Add Comment….
-
Export the evidence for your report. Use Insights → Export Report for a Markdown summary, or export the relevant requests as HAR with Redact secrets ticked so you don’t leak live tokens into the report. Highlights and comments go with them: HAR keeps comments in the standard
commentfield, and session files keep both. Redaction doesn’t change comment text, so keep secrets out of your comments. -
Export the tool rules you used (Tools → Export Rules…) so a teammate can reproduce the test.
Clean up
Section titled “Clean up”-
Turn off Breakpoint, Rewrite, Scripting and any other tool you enabled, and Reset sharedState.
-
Delete or disable the probing rules so they don’t fire later.
-
On a device, remove the Wi-Fi proxy and profile when you’re done.