summaryrefslogtreecommitdiffstats
path: root/docs/writeups/ImaginaryCTF_2021/stings.txt
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2021-08-03 19:53:26 -0400
committerMalfurious <m@lfurio.us>2021-08-03 19:53:26 -0400
commit5970194d1303e16364ff1405f974c995de46203b (patch)
treed3f748eeb0112205bb7784bd353b22376ee827ae /docs/writeups/ImaginaryCTF_2021/stings.txt
parentef6e3a502bf8498a8f641eb3dad11d3065359bbb (diff)
parentaa9da0f6f27759f5f3201bafb0e52f41367f08ef (diff)
downloadlib-des-gnux-5970194d1303e16364ff1405f974c995de46203b.tar.gz
lib-des-gnux-5970194d1303e16364ff1405f974c995de46203b.zip
Merge tag 'pull-duso-imaginary-writeups' of https://github.com/Dusoleil/lib-des-gnux
Writeups and other tools/docs from ImaginaryCTF from Dusoleil. * tag 'pull-duso-imaginary-writeups' of https://github.com/Dusoleil/lib-des-gnux: Adding Initial Commit of the Sploit Tool Adding Various Docs Adding Various Small Tools Git Ignore __pycache__ for All Tools Writeups from Imaginary CTF 2021
Diffstat (limited to '')
-rw-r--r--docs/writeups/ImaginaryCTF_2021/stings.txt35
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/writeups/ImaginaryCTF_2021/stings.txt b/docs/writeups/ImaginaryCTF_2021/stings.txt
new file mode 100644
index 0000000..906dc21
--- /dev/null
+++ b/docs/writeups/ImaginaryCTF_2021/stings.txt
@@ -0,0 +1,35 @@
+The Service
+-----------
+we're given an executable
+
+when run, a picture of a bee is printed out and it asks us for a password
+
+if we're wrong, it exits
+
+if we're right, it also exits, but what we entered is the flag
+
+
+
+Reversing
+---------
+looking at the disassembly...
+
+there is a massive string which, after examining, seems to be the bee picture
+
+there are real stack canaries and the addresses change after first run in gdb, so pwn protections
+
+the bee picture is brought onto the stack
+
+a bunch of processing with it is done
+
+at some point it asks for input
+
+there is a loop that compares each character of the input to each character of the resulting buffer after the processing earlier
+
+it expects each character of the input to be -1 from the character in the buffer (you enter "ictf", but the buffer contains "jdug")
+
+
+
+Getting the flag from runtime memory
+------------------------------------
+we can just run the program in gdb, break before inputting, check the status of the buffer, do the character shift in python, and then we have the input it wants (and the flag)