Tag Archives: Assembly
Roll your own 64-bit Linux reverse TCP shellcode
Reverse TCP or “connect-back” shellcode connects to a predetermined host and presents a shell from the system where the code is running. If you didn’t already know that, or you don’t understand what that means, you’re in the wrong place. … Continue reading
Compile assembly directly to shellcode
For some reason, there’s no really easy way to compile assembly directly to shellcode. The closest thing I’ve found to convert binary to shellcode is this bash one-liner from commandlinefu that parses the output from objdump:
|
1 2 3 |
objdump -d ./PROGRAM|grep '[0-9a-f]:'|grep -v 'file'|cut -f2 -d:|cut -f1-6 -d' '|tr -s ' '|tr 't' ' '|sed 's/ $//g'|sed 's/ /\x/g'|paste -d '' -s |sed 's/^/"/'|sed 's/$/"/g' |
nasm2shell, as2shell and … Continue reading
Tiny 64-bit ELF executables
Several years ago I read an excellent guide to ELF executables called “A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux.” It outlines some of the factors that contribute to overhead in ELF executables, and goes to great … Continue reading
Run MenuetOS from a CD (or an ISO in VirtualBox)
MenuetOS is a full-featured operation system that can fit onto a 1.44 megabyte floppy (if you can find one). In its 1.44 megabytes, Menuet OS has: A GUI with menus and windowing A functional networking stack Audio and video codecs 3D … Continue reading
The BIOS Keyboard Flags Register
The “Hello World” MBR Tutorial explained the creation of a simple MBR program to display a message on the screen. This code builds on the first tutorial by adding code to check if a shift key is being pressed. If the … Continue reading
“Hello World” in 64-bit Linux Assembly
I wrote my first Linux assembly program a long time ago, for 32-bit x86 architecture. Although that exact same program (described here) will still compile and run on a 64-bit Intel processor without modification, it can only do so because … Continue reading
“Hello World” in 32-bit Linux Assembly (NASM)
Writing a 32 bit “Hello World” program in NASM is a good first step for anyone that wants to learn Linux assembly. Whether you’re a programmer who wants to try some assembly optimization or an aspiring shellcoder, there’s no avoiding … Continue reading