JavaScript Analysis for Pentesters#2296
Open
carlospolop wants to merge 1 commit into
Open
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://kpwn.de/posts/javascript-analysis-for-pentesters/ Content Categories: Based on the analysis, this content was categorized under "Pentesting Web -> Web Vulnerabilities Methodology / JWT Vulnerabilities / XSS -> Debugging Client Side JS; potentially a dedicated 'JavaScript Analysis for Pentesters' subsection". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
JavaScript Analysis for Pentesters
This post is a practical methodology for analyzing client-side JavaScript during web penetration tests. It explains how to collect JavaScript assets, discover hidden endpoints and secrets, identify dangerous sinks, debug runtime behavior, bypass client-side protections, extract a client-side JWT signing key from obfuscated code, persistently override browser-loaded scripts, and defeat common protections generated by
🔧 Technical Detailsobfuscator.io.Client-side validation bypass with runtime variable editing: If a web application filters input only in JavaScript, place a breakpoint before the request is built, step through the handler, and edit the sanitized variable in the debugger's
Scopepanel before resuming execution. In the demonstrated ping service, the payload127.0.0.1;idis reduced by the regex[^a-z0-9._-]to127.0.0.1id. Editing the runtime variable back to127.0.0.1;idlets the original JavaScript generate a valid signed JWT containing the command-injection payload, resulting in backend execution ofid.Finding JavaScript execution entry points: When an HTML element has no obvious
onclickattribute, inspect it in developer tools and check theEvent Listenerstab. Clicking the linked listener location jumps to the relevant JavaScript function. Alternatively, set a breakpoint onAny XHR/fe...🤖 Agent ActionsUpdated
src/pentesting-web/xss-cross-site-scripting/debugging-client-side-js.md.Added concise new coverage for:
wget, LinkFinder, TruffleHog, and sink greppingValidation:
git diff --checkpassedmdbook buildcould not run becausemdbookis not installed in this environment (/bin/bash: mdbook: command not found)This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.