From fde30b2141d70b0bc2ed0b178d06729a185d5b83 Mon Sep 17 00:00:00 2001 From: CPol Date: Mon, 27 Jun 2022 17:09:07 +0000 Subject: [PATCH] GitBook: [#3287] No subject --- SUMMARY.md | 6 +-- .../pentesting-web/graphql.md | 2 +- ...ngling-markup-html-scriptless-injection.md | 50 +++++++++---------- .../web-vulnerabilities-methodology.md | 2 +- .../{xs-search.md => xs-search/README.md} | 35 ++++++++++--- .../README.md | 0 .../css-injection-code.md | 0 7 files changed, 57 insertions(+), 38 deletions(-) rename pentesting-web/{xs-search.md => xs-search/README.md} (90%) rename pentesting-web/{dangling-markup-html-scriptless-injection => xs-search}/html-injection-char-by-char-exfiltration/README.md (100%) rename pentesting-web/{dangling-markup-html-scriptless-injection => xs-search}/html-injection-char-by-char-exfiltration/css-injection-code.md (100%) diff --git a/SUMMARY.md b/SUMMARY.md index 6136311a2..24a1364cc 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -434,8 +434,6 @@ * [Cross-site WebSocket hijacking (CSWSH)](pentesting-web/cross-site-websocket-hijacking-cswsh.md) * [CSRF (Cross Site Request Forgery)](pentesting-web/csrf-cross-site-request-forgery.md) * [Dangling Markup - HTML scriptless injection](pentesting-web/dangling-markup-html-scriptless-injection.md) - * [HTML Injection / Char-by-char Exfiltration](pentesting-web/dangling-markup-html-scriptless-injection/html-injection-char-by-char-exfiltration/README.md) - * [CSS Injection Code](pentesting-web/dangling-markup-html-scriptless-injection/html-injection-char-by-char-exfiltration/css-injection-code.md) * [Deserialization](pentesting-web/deserialization/README.md) * [NodeJS - \_\_proto\_\_ & prototype Pollution](pentesting-web/deserialization/nodejs-proto-prototype-pollution/README.md) * [Client Side Prototype Pollution](pentesting-web/deserialization/nodejs-proto-prototype-pollution/client-side-prototype-pollution.md) @@ -521,7 +519,9 @@ * [Steal Info JS](pentesting-web/xss-cross-site-scripting/steal-info-js.md) * [XSS in Markdown](pentesting-web/xss-cross-site-scripting/xss-in-markdown.md) * [XSSI (Cross-Site Script Inclusion)](pentesting-web/xssi-cross-site-script-inclusion.md) -* [XS-Search](pentesting-web/xs-search.md) +* [XS-Search](pentesting-web/xs-search/README.md) + * [HTML Injection / Char-by-char Exfiltration](pentesting-web/xs-search/html-injection-char-by-char-exfiltration/README.md) + * [CSS Injection Code](pentesting-web/xs-search/html-injection-char-by-char-exfiltration/css-injection-code.md) ## ⛈ Cloud Security diff --git a/network-services-pentesting/pentesting-web/graphql.md b/network-services-pentesting/pentesting-web/graphql.md index c84bbff01..f33155a45 100644 --- a/network-services-pentesting/pentesting-web/graphql.md +++ b/network-services-pentesting/pentesting-web/graphql.md @@ -307,7 +307,7 @@ However, note that the new default cookie value of the `samesite` flag of Chrome Note that it's usually possible to send the **query** **request** also as a **GET** **request and the CSRF token might not being validated in a GET request.** -Also, abusing a [**XS-Search**](../../pentesting-web/xs-search.md) **attack** might be possible to exfiltrate content from the GraphQL endpoint abusing the credentials of the user. +Also, abusing a [**XS-Search**](../../pentesting-web/xs-search/) **attack** might be possible to exfiltrate content from the GraphQL endpoint abusing the credentials of the user. For more information **check the** [**original post here**](https://blog.doyensec.com/2021/05/20/graphql-csrf.html). diff --git a/pentesting-web/dangling-markup-html-scriptless-injection.md b/pentesting-web/dangling-markup-html-scriptless-injection.md index c5d3ef9bb..b377ba873 100644 --- a/pentesting-web/dangling-markup-html-scriptless-injection.md +++ b/pentesting-web/dangling-markup-html-scriptless-injection.md @@ -1,4 +1,4 @@ - +# Dangling Markup - HTML scriptless injection
@@ -16,17 +16,16 @@ Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com)
- -# Resume +## Resume This technique can be use to extract information from a user when an **HTML injection is found**. This is very useful if you **don't find any way to exploit a** [**XSS** ](xss-cross-site-scripting/)but you can **inject some HTML tags**.\ It is also useful if some **secret is saved in clear text** in the HTML and you want to **exfiltrate** it from the client, or if you want to mislead some script execution. Several techniques commented here can be used to bypass some [**Content Security Policy**](content-security-policy-csp-bypass/) by exfiltrating information in unexpected ways (html tags, CSS, http-meta tags, forms, base...). -# Main Applications +## Main Applications -## Stealing clear text secrets +### Stealing clear text secrets If you inject `test ``` -## Stealing forms +### Stealing forms ```markup @@ -68,11 +67,11 @@ steal me'test Then, the forms that send data to path (like `
`) will send the data to the malicious domain. -## Stealing forms 2 +### Stealing forms 2 Set a form header: `` this will overwrite the next form header and all the data from the form will be sent to the attacker. -## Stealing forms 3 +### Stealing forms 3 The button can change the URL where the information of the form is going to be sent with the attribute "formaction": @@ -82,7 +81,7 @@ The button can change the URL where the information of the form is going to be s An attacker can use this to steal the information. -## Stealing clear text secrets 2 +### Stealing clear text secrets 2 Using the latest mentioned technique to steal forms (injecting a new form header) you can then inject a new input field: @@ -98,7 +97,7 @@ You can do the same thing injecting a form and an `