Twofish Crypter with DNS (CName) password retrieval, x64 shellcode decryption, and execution

A crypter is code that decrypts a previously encrypted payload, in this case a shellcode, and will then execute it. To encrypt it, and not do it as most others have, I chose one of the algorithms that went through the final round of AES: Twofish, by Bruce Schneier, John Kelsey, Doug Whiting, David Wagner, Chris Hall, and Niels Ferguson. But to make this one unique, I decided not to request the password to decrypt the payload from the user (usually as the first parameter to the executable in the command line) but, instead, to get it from a DNS request (CNAME record).

Polymorphic and smaller versions of three shell-storm’s x64 shellcodes, including the smallest execve /bin/sh

[Update 13 Jan 2018] ExploitDB has published the 3 shellcodes written in this blog post. Linux/x86-64 - Execute /bin/sh Shellcode (24 bytes) Linux/x86-64 - Add Map (127.1.1.1 google.lk) In /etc/hosts Shellcode (96 bytes) Linux/x86-64 - execve("/sbin/iptables", ["/sbin/iptables", "-F"], NULL) Shellcode (43 bytes)   Looking at the smallest x64 shellcodes (section Linux / Intel x86-64) in … Continue reading Polymorphic and smaller versions of three shell-storm’s x64 shellcodes, including the smallest execve /bin/sh

Custom x64 encoder with a basic polymorphic engine implementation

I'll develop a python encoder that will XOR the payload, byte by byte, with a randomly generated byte value, and also generate a polymorphic stub in x64 to decode that payload, by brute-forcing all 256 possibilities. Even though bypassing anti-virus systems is not the only purpose of encoders, it certainly is the most exciting one, and hence the detailed focus on this one subject throughout this post.

Bypassing CSRF tokens with Python’s CGIHTTPServer to exploit SQLi

There are ways to configure Burp using macros to bypass CSRF tokens on HTML forms, so we can use Burp Active Scans, Burp Intruder, Burp Repeater, and (cautiously) even Burp Proxy. There's also Grep-Extract and pitchfork attack type specifically for Intruder. And, you might even develop your Burp Extension to do it. Sqlmap has a --csrf-token and a --csrf-url for the same purpose, or you can just configure Burp as previously stated, and run sqlmap through Burp using --proxy. Now, here's another way, using CGIHTTPServer from python.