aboutsummaryrefslogtreecommitdiff
path: root/shellcode/simple.c
diff options
context:
space:
mode:
authortoni <matzeton@googlemail.com>2014-08-01 00:09:09 +0200
committertoni <matzeton@googlemail.com>2014-08-01 00:09:09 +0200
commitd2eb384103e818abad068e4c481afcec2deeacfc (patch)
treee08f65530304b5492c6627aea789705c61447fc3 /shellcode/simple.c
parentf2371a6b48d7f76fc07564f4e1e4d64e643a897e (diff)
- building shellcode with C
Diffstat (limited to 'shellcode/simple.c')
-rw-r--r--shellcode/simple.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/shellcode/simple.c b/shellcode/simple.c
new file mode 100644
index 0000000..bf2bf43
--- /dev/null
+++ b/shellcode/simple.c
@@ -0,0 +1,11 @@
+/*
+ * gcc -c -Wall -fpic -Os shellcode.c -o shellcode.o
+ * ld -N -Ttext 0x0 -e _start -Map shellcode.map shellcode.o -o shellcode
+ * objcopy -R .note -R .comment -S -O binary shellcode shellcode.bin
+ */
+
+int _start(void) {
+ while (1) {
+ }
+ return (0);
+}