API Abuse, JWT Manipulation, and Web/API Tools
You’re assessing an application in an authorized test environment. One account requests its own invoice through an application programming interface, or API. The request contains an object identifier and a JWT. You replace the invoice identifier with one assigned to a second test account, and the server returns different data.
Then you inspect the token and find readable claims describing the user. What should you test next? The answer doesn’t begin with whichever tool has the longest feature list. It begins with the application’s expected behavior, the evidence you already have, and the boundaries of the engagement.
This topic belongs to the PenTest+ objective about performing web application attacks with appropriate tools. Within that broad objective, we’re concentrating on API abuse, JWT manipulation, and selecting tools for web and API testing. That doesn’t mean every unusual response proves a vulnerability, and it doesn’t authorize unrestricted testing. Your task is to understand the mechanism, predict what secure behavior should look like, choose a bounded test, and verify the result.
An API is an interface through which software exchanges requests and responses. To assess it well, you need more than a list of paths. You need its contract and state model. The contract describes what requests are expected, what data they require, and what responses they should produce.
The state model describes how actions and permissions depend on what has already happened. An order might be editable while it’s a draft but immutable after approval. A refund request might be valid only for a completed purchase. If you ignore those states, you can mistake intended behavior for a flaw or miss a business rule that the server fails to enforce.
Separate authentication from authorization. Authentication asks whether the system has established an identity or session. Authorization asks whether that identity may perform this action on this object. If the invoice request succeeds only because the tester has a valid token, authentication may be working.
If the same token retrieves another account’s invoice merely because its object identifier was supplied, object-level authorization may be broken. A client-supplied identifier isn’t itself a vulnerability. The important evidence is whether the server independently checks the authenticated identity’s permission for the requested object.
API assessment also covers more than object access. Broken authentication can let an attacker act under an identity the server shouldn’t accept. Uncontrolled resource consumption can allow costly or excessive operations. Server-side request forgery can arise when a server fetches a location selected by a client without sufficient restrictions.
Security misconfiguration can expose behavior that shouldn’t be available. Poor inventory management can leave old or undocumented versions reachable. Input and trust failures appear when the server accepts client assertions or upstream data without the validation its design requires. These are related risk areas, but they call for different evidence and remediation.
Now consider the token. JWT stands for JSON Web Token. It’s a compact, URL-safe representation of claims. Claims are statements carried in the token, such as an identity, an intended recipient, or a time-related value.
A commonly encountered signed form has encoded sections separated by dots. Those sections represent information about how the token is handled, its claims, and integrity protection. Encoding makes the token convenient to transport. It doesn’t automatically make the claims secret.
That distinction is critical. A JWT may use a JSON Web Signature structure to protect integrity, or a JSON Web Encryption structure when confidentiality is required. So the statement “it’s a JWT, therefore it’s encrypted” is false. If you can decode and read claims, that alone doesn’t prove the token is insecure.
You must determine how it’s protected and what information the application has chosen to place in it. Likewise, changing readable text doesn’t prove the server will trust the change. A correctly implemented signature check should detect unauthorized modification to signed content.
Your first step in an API test is to write down the expected security decision. For the invoice request, you might predict that the server will return the first account’s invoice when that account requests its own identifier, but deny access when the same account requests the second account’s identifier. Use test data created for the engagement, not unrelated customer records. Establishing the prediction before changing the request keeps the result tied to a requirement instead of treating any response difference as suspicious.
Next, choose the lowest-impact action that can confirm or reject that prediction. Replay one known-good request within the permitted environment, alter only the authorized test object identifier, and keep the identity and other inputs stable. If the server returns the second account’s invoice, compare the response with evidence from the second test account.
A success status alone is weak evidence. The server might return a generic document, cached content, or an error presented with an unexpected status. Corroborating the object owner and response content gives the observation meaning.
Suppose the request also contains a token whose claims appear to name the first account. The object identifier and token now seem inconsistent. Don’t immediately conclude that the server ignored the token, trusted the identifier, or accepted a manipulated claim.
Several explanations remain possible. The claim might not be used for authorization. The server might map the token to an identity through other information.
Your client might have sent a different token than the one you inspected. The response might come from stale data. A defensible next step holds most conditions steady, verifies the actual request sent, and changes one relevant factor within scope.
Before that action, check the engagement constraints. Is the second account an approved test identity? Is the invoice endpoint in scope?
Are state-changing requests allowed? Could repeating the request trigger notifications, billing work, or expensive processing? Is there a testing window or request-rate limit?
A technically valid test can still be the wrong professional decision when it exceeds authorization or creates avoidable operational impact. If the boundary is unclear, clarification is the next action. Silence isn’t permission to expand the test.
The same discipline applies to resource-consumption testing. An endpoint that launches reports or performs expensive searches may deserve assessment, but proving impact doesn’t require driving the service to failure. Start with documentation, ordinary requests, response timing, limits, and other low-impact evidence permitted by the rules of engagement. Escalate only when the expected value, authorization, and operational safeguards justify it. The purpose is to establish the control weakness and its likely consequence, not to create the maximum possible disruption.
JWT testing follows a similar prediction-and-verification cycle. First determine what the application is expected to validate. Relevant questions include whether the token came from an accepted issuer, is intended for this service, is still acceptable at the time of use, and carries claims appropriate to the requested operation.
The exact required checks depend on the application’s design. Seeing a claim with an administrator-like value doesn’t prove that claim grants administrative access. Documentation, normal application behavior, and controlled comparisons help reveal which claims influence a security decision.
In an authorized lab, imagine decoding a token, changing a role claim, and sending the altered token back. The server rejects it. What does that establish? It supports the narrower conclusion that this altered token wasn’t accepted in that request.
It doesn’t, by itself, prove that every required token validation is correct. The rejection could result from a signature failure, malformed encoding, expiration, the wrong endpoint, or another prerequisite. Check the response, application behavior, token format, target, and test setup before assigning the cause.
Now imagine the altered token is accepted, but the response contains only information already available to the ordinary account. Acceptance is an important observation, yet impact remains unresolved. You need to identify which security decision changed. Did the server ignore the modified claim?
Did it accept the token but apply authorization from another source? Did the request reach a public function? A supported finding connects the validation mistake to an unauthorized capability or loss of integrity. Without that connection, report the confirmed observation and the remaining uncertainty separately.
Tool selection should follow the same reasoning. Burp Suite is a strong choice when you need an intercepting web proxy to observe, capture, compare, and modify browser or API traffic under controlled conditions. It helps you see the request the client actually sent rather than relying on what you intended to send. OWASP ZAP also supports proxy-based inspection and web application testing, including automated assistance. Either tool can support evidence collection, but an automated alert still requires validation against the application’s contract, state, and authorization rules.
Postman fits a different part of the work. It’s useful for constructing and organizing API requests, supplying headers and bodies, working with collections of related requests, and comparing responses. If you’re testing the authorized invoice workflow, Postman can make identities, tokens, object identifiers, and expected states easier to keep distinct.
It doesn’t decide whether a response violates authorization. You still need the application requirement and controlled account comparison. A polished response in a client is an observation, not a validated finding.
sqlmap is selected when the evidence points toward structured query language injection and authorized automation is appropriate. It isn’t a general answer for every suspicious parameter. Confirm that the target, request, and level of automation are permitted, and prefer a bounded validation over unnecessary extraction or disruption.
Gobuster and DirBuster are associated with discovering directories and files that aren’t obvious from normal navigation. Wfuzz supports fuzzing by placing candidate input into selected parts of a request. These tools can help discover attack surface, but request volume, word lists, target paths, and timing all affect operational impact.
WPScan is specialized for assessing WordPress installations and their exposed components. That specialization makes it a better starting choice than a generic tool when the target is confirmed to be WordPress and the engagement permits that assessment. TruffleHog serves another purpose.
It looks for potential secrets in sources such as repositories and related data. A detected string isn’t automatically a valid credential, and validation must not become unauthorized access. Record where the candidate appeared, handle it as sensitive evidence, and use only the verification method the engagement allows.
The tempting mistake is to choose a tool from a keyword alone. A hidden path doesn’t automatically require fuzzing if documentation or proxy history already establishes it. A parameter named query doesn’t prove database injection. A bearer token doesn’t guarantee that it’s a JWT, encrypted, or used for authorization.
Choose Burp or ZAP when traffic interception and comparison are central, Postman when deliberate API request construction is central, and a specialized tool only when the target technology and hypothesis justify it. The question isn’t which tool is most powerful. It’s which one can produce the needed evidence with acceptable risk.
When outputs disagree, troubleshoot before escalating. If Postman receives a successful response while the browser receives a denial, compare identities, headers, cookies, body data, methods, paths, and application state. If a proxy doesn’t show a request, check whether the client is actually using it before concluding that traffic is absent.
If discovery results change between runs, consider target selection, configuration, permissions, response handling, and data freshness. Tools transform and present evidence. They don’t remove the need to verify what was tested.
A useful report preserves that chain of reasoning. State the expected control, the authorized test identities and objects, the request variation, the observed response, and the evidence that corroborates ownership or impact. Distinguish broken object authorization from broken authentication and from token-validation weakness.
Explain the consequence in terms of what an unauthorized identity could read, change, or invoke. Where uncertainty remains, say so. A report becomes more useful when remediation can be tied to the actual failed decision rather than a broad label such as insecure API.
For object authorization, that generally means ensuring the server checks permission for each requested object rather than relying on an identifier supplied by the client. For token handling, the report should identify the validation expectation that failed and the evidence supporting that conclusion, not merely say that JWT manipulation worked. For inventory problems, identify the reachable version or endpoint and why its availability matters. For resource concerns, document the control and observed behavior without overstating untested outage scenarios.
Consider a final choice. You have one hour left in an authorized test. A proxy shows that changing a test invoice identifier returns another test account’s data.
You could launch broad automated discovery across the host, or repeat one bounded comparison and preserve both accounts’ requests and responses. The second choice is stronger because it validates the existing authorization hypothesis with less operational risk. Broad discovery might be appropriate elsewhere in the plan, but it doesn’t answer the immediate question as directly.
If the comparison instead returns an inconsistent or generic response, the decision changes. You don’t yet have enough evidence to claim cross-account access. Verify the request, the object ownership, the token, and the application state. Then choose the least-impactful authorized action that resolves the uncertainty.
That habit connects technical testing to professional judgment. You’re not collecting tool output for its own sake. You’re building an evidence trail from expected behavior to observed consequence, with every step kept inside the engagement you were authorized to perform.
A sound API assessment begins with the application’s contract and state, not with a tool name. Predict the authorization or validation decision, change only what the engagement permits, and corroborate the response before calling it a finding. Treat a JWT as a claims container whose integrity or confidentiality depends on how it’s protected and validated, not as encrypted data by default. Then select the tool that best answers the specific question, whether that’s inspecting traffic, constructing requests, discovering attack surface, or examining a supported technology. Scope, evidence, bounded action, verification, and clear documentation turn isolated observations into defensible results.
Carry this question into practice: What should you test next? Review the matching episode reference for exact terminology, named tools or standards, source-derived evidence checkpoints, and review material for API Abuse, JWT Validation, and Web Testing Tools. This lesson was produced by Bare Metal Cyber dot com.