From 14b33f1b7c5c761cc089dede4fa6aeb187ff66ac Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 22 Jan 2012 06:16:39 +0100 Subject: Add 32bit shellcode. --- build-and-run-shellcode.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 build-and-run-shellcode.sh (limited to 'build-and-run-shellcode.sh') diff --git a/build-and-run-shellcode.sh b/build-and-run-shellcode.sh new file mode 100755 index 0000000..0a8a34b --- /dev/null +++ b/build-and-run-shellcode.sh @@ -0,0 +1,6 @@ +#!/bin/sh +if [ "$1" == "32" ]; then + nasm -o /dev/stdout shellcode-32.s | msfencode4.0 -t c -e generic/none -b '\x00' > harness.c && echo "void main() { (*(void(*)())buf)(); }" >> harness.c && gcc -m32 -fno-stack-protector -z execstack -o harness harness.c && ./harness +else + nasm -o /dev/stdout shellcode-64.s | msfencode4.0 -t c -e generic/none -b '\x00' > harness.c && echo "void main() { (*(void(*)())buf)(); }" >> harness.c && gcc -fno-stack-protector -z execstack -o harness harness.c && ./harness +fi -- cgit v1.2.3-59-g8ed1b