changed repo structure
This commit is contained in:
18
2024/cscg/rev/intro_rev_2/Dockerfile
Normal file
18
2024/cscg/rev/intro_rev_2/Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
# run via docker compose :)
|
||||
|
||||
FROM ubuntu:22.04
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get -y install socat
|
||||
|
||||
RUN useradd -d /home/ctf/ -m -p ctf -s /bin/bash ctf
|
||||
RUN echo "ctf:ctf" | chpasswd
|
||||
|
||||
WORKDIR /home/ctf
|
||||
|
||||
COPY rev2 .
|
||||
COPY flag.txt .
|
||||
|
||||
USER ctf
|
||||
CMD socat -ddd TCP4-LISTEN:1024,fork,reuseaddr exec:./rev2,pty,echo=0,raw,iexten=0
|
||||
9
2024/cscg/rev/intro_rev_2/decode_password.py
Normal file
9
2024/cscg/rev/intro_rev_2/decode_password.py
Normal file
@@ -0,0 +1,9 @@
|
||||
encoded_passwd = b"\x02\xea\x02\xe8\xfc\xfd\xbd\xfd\xf2\xec\xe8\xfd\xfb\xea\xf7\xfc\xef\xb9\xfb\xf6\xea\xfd\xf2\xf8\xf7\x00"
|
||||
|
||||
def decode(char: int):
|
||||
return chr((char + 0x77) & 0xFF)
|
||||
|
||||
password = ""
|
||||
for char in encoded_passwd:
|
||||
password += decode(char)
|
||||
print(password)
|
||||
1
2024/cscg/rev/intro_rev_2/flag.txt
Normal file
1
2024/cscg/rev/intro_rev_2/flag.txt
Normal file
@@ -0,0 +1 @@
|
||||
CSCG{testflag}
|
||||
BIN
2024/cscg/rev/intro_rev_2/rev2
Executable file
BIN
2024/cscg/rev/intro_rev_2/rev2
Executable file
Binary file not shown.
BIN
2024/cscg/rev/intro_rev_2/rev2.bndb
Normal file
BIN
2024/cscg/rev/intro_rev_2/rev2.bndb
Normal file
Binary file not shown.
Reference in New Issue
Block a user