From d0e68f51eae112447289f2bcf541c4a4882ec741 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sun, 22 Aug 2021 09:24:04 -0400 Subject: Add Makefile for shellcode templates The shell*.asm files are considered the default programs and the expected use-case for utilizing the templates is to edit these files to implement the desired shellcode. I figure that literal shellcode makes the most sense of what to expect by default. 'make all' will assemble and link the shellcode (so it can actually be directly executed via the output elf files), and feed the disassembly into shelltool for use elsewhere. Signed-off-by: Malfurious --- templates/shellcode/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 templates/shellcode/Makefile (limited to 'templates/shellcode') diff --git a/templates/shellcode/Makefile b/templates/shellcode/Makefile new file mode 100644 index 0000000..2e67adc --- /dev/null +++ b/templates/shellcode/Makefile @@ -0,0 +1,17 @@ +.PHONY: all + +all: shell32.elf shell64.elf + @objdump -d shell32.elf | ./shelltool.py + @objdump -d shell64.elf | ./shelltool.py + +shell32.o: shell32.asm + nasm -f elf shell32.asm -o shell32.o + +shell32.elf: shell32.o + ld -melf_i386 shell32.o -o shell32.elf + +shell64.o: shell64.asm + nasm -f elf64 shell64.asm -o shell64.o + +shell64.elf: shell64.o + ld shell64.o -o shell64.elf -- cgit v1.2.3