Guides
Pentest your own app
Intercept and tamper with requests at a breakpoint, replay with edits, check security headers and leaked secrets, and script systematic tampering — on systems you own or are authorized to 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, checking the response security headers and for leaked secrets, and 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.
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… (
<kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>E</kbd>). The Compose window opens prefilled. -
Change a parameter, header or token and press Send (
<kbd>⌘</kbd> <kbd>↩</kbd>). 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.
Check headers and secrets
Section titled “Check headers and secrets”Open Insights (<kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>I</kbd>) 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.
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.
-
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, 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.