< "SWING_JJANG" is not plaintext >
< 문제 풀이>
해당 파일을 다운 받고 ollydbg를 열어본다.
해당 부분을 보면 맞는 pw를 입력해야 correct가 출력된다.
그러면 pw를 구하는 문제다.
코드에 이러한 문장이 있어서 이게 pw가 아닐까 할 수도 있지만, 이건 암호화된 문장이다.
IDA를 보면서 어떻게 암호화가 된 건지 확인해주고, 이를 참고하여 복호화 코드를 짜주면 된다.
import string
def decrypt(encryptstr):
result = ""
for char in encryptstr:
if char.isupper():
result += chr((ord(char) - ord('A') + 21) % 26 + ord('A'))
elif char.islower():
result += chr((ord(char) - ord('a') + 16) % 26 + ord('a'))
elif char.isdigit():
result += chr((ord(char) - ord('0') + 7) % 10 + ord('0'))
else:
result += char
return result
encrypted_password = "SWING_JJANG"
decrypted_password = decrypt(encrypted_password)
print("Decrypted password:", decrypted_password)
이렇게 작성하면 된다.
Decrypted password: NRDIB_EEVIB
이렇게 나온 password를 입력하면, 아래와 같이 correct!가 나온다.
'리버싱' 카테고리의 다른 글
[7주차] 문제 풀기 (0) | 2024.06.04 |
---|---|
[SWING G4M3] reversing - "SWING_JJANG" is not plaintext (0) | 2024.05.23 |
[5주차] abex' crack me #4, #5 write up (0) | 2024.05.13 |
리버싱 기능 요약 (0) | 2024.05.02 |
[4주차] 가상메모리(VA) 구조 분석 (0) | 2024.04.30 |