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:
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.
Introduction to the Model Context Protocol (MCP) The Model Context Protocol (MCP) is an open…
While file extensions in Linux are optional and often misleading, the file command helps decode what a…
The touch command is one of the quickest ways to create new empty files or update timestamps…
Handling large numbers of files is routine for Linux users, and that’s where the find command shines.…
Managing files and directories is foundational for Linux workflows, and the mv (“move”) command makes it easy…
Creating directories is one of the earliest skills you'll use on a Linux system. The mkdir (make…