완료됨
Got flag but wrong answer
from pwn import *

elf = ELF('./crc')

p = process(elf.path)

print(p.recv())
p.send(b'e546044287cb085d5e65f266935dd3849e121aaa3eaaa86b8745b2b54da8062f' + b'\n')

print(p.recv())
prem0 = [103, 198, 105, 115,  81, 255,  74, 236,  41, 205, 
  186, 171, 242, 251, 227,  70, 124, 194,  84, 248, 
   27, 232, 231, 141, 118,  90,  46,  99,  51, 159, 
  201, 154, 102,  50,  13, 183,  49,  88, 163,  90, 
   37,  93,   5,  23,  88, 233,  94, 212, 171, 178, 
  205, 198, 155, 180,  84,  17,  14, 130, 116,  65, 
   33,  61, 220, 135]

target2 = [25,  44,  78,  36,  50,  53, 127,  35,  94,  49, 
  111,  98,  86,  94,  22, 120,  47,  38,   7,  90, 
   80,  33,  72,  67,  45,  10,  97,  25,  23,   4, 
   43,  83,  23, 106, 115,  29, 103,  11,   5,  60, 
   10,  22, 105,  75,   9,  74,  15,  12,  93, 107, 
   48,  41, 126,  24,  10,  72,  68,  54,  88, 116, 
   90,  30,  17,  55]

for i in range(64):
    target2[i] = (target2[i] - prem0[i]) % 256
        
print(bytes(target2))
p.send(bytes(target2) + b'\n')
print(p.recv())
p.close()

Running this script i got the flag from the program but it says wrong answer when i submit the flag. Where did i get wrong?

#reversing
작성자 정보
더 깊이 있는 답변이 필요할 때
드림핵 팀과 멘토에게 직접 문의해 보세요!
답변 1

Your solver logic in stage 2 does not match the one in the binary. Looking at your solver code, I don't think you've made a trivial mistake. I think you've missed something in your stage 2 reversing. I'd like you to find the detail yourself.

2024.09.26. 03:09