XORpass : Encoder To Bypass WAF Filters Using XOR Operations

XORpass is an encoder to bypass WAF filters using XOR operations.

Installation & Usage

git clone https://github.com/devploit/XORpass
cd XORpass

$ php encode.php STRING
$ php decode.php “XORed STRING”

Example of bypass

Using clear PHP function:

Also Read – JSONBee : A Ready To Use JSONP Endpoints/Payloads To Help Bypass Content Security Policy Of Different Websites

Using XOR bypass of that function:

$ php encode.php system # return A
$ php encode.php ls # return B

payload == A(B)

Why does PHP treat our payload as a string?

The ^ is the exclusive or operator, which means that we’re in reality working with binary values. So lets break down what happens.

The XOR operator on binary values will return 1 where just one of the bits were 1, otherwise it returns 0 (0^0 = 0, 0^1 = 1, 1^0 = 1, 1^1 = 0). When you use XOR on characters, you’re using their ASCII values. These ASCII values are integers, so we need to convert those to binary to see what’s actually going on.

A = 65 = 1000001
S = 83 = 1010011
B = 66 = 1000010

A 1000001
^
S 1010011
^
B 1000010
——————————
result 0010010 = 80 = P

A^S^B = P

If we do an ‘echo “A”^”S”^”B”;’ PHP will return us a P as we see.

R K

Recent Posts

garak, LLM Vulnerability Scanner : The Comprehensive Tool For Assessing Language Model Security

garak checks if an LLM can be made to fail in a way we don't…

13 hours ago

Vermilion : Mastering Linux Post-Exploitation For Red Team Success

Vermilion is a simple and lightweight CLI tool designed for rapid collection, and optional exfiltration…

13 hours ago

AD-CS-Forest-Exploiter : Mastering Security Through PowerShell For AD CS Misconfiguration

ADCFFS is a PowerShell script that can be used to exploit the AD CS container…

13 hours ago

Usage Of Tartufo – A Comprehensive Guide To Securing Your Git Repositories

Tartufo will, by default, scan the entire history of a git repository for any text…

13 hours ago

Loco : A Rails-Inspired Framework For Rust Developers

Loco is strongly inspired by Rails. If you know Rails and Rust, you'll feel at…

2 days ago

Monolith : The Ultimate Tool For Storing Entire Web Pages As Single HTML Files

A data hoarder’s dream come true: bundle any web page into a single HTML file.…

2 days ago