impacket
impacket copied to clipboard
Hex Encoded xp_cmdshell (aka HexP_cmdshell)
Hex encoded version of xp_cmdshell to bypass AV/SQL query blacklisting and hide code execution in logs.
Extra Credit: @danielprintke - assisted with getting a working version of this code.
Nice! What versions of MSSQL does this work on?
Nice! What versions of MSSQL does this work on?
Good question - I haven't encountered a version where the hex encoding didn't work. I would be interested to know if there is a version of MSSQL that does not allow you to assign hex encoded commands to a variable. If that is the case, I can modify the code to include both new and old command execution methods - as needed.