Favourite byte

2023. 1. 31. 18:48·Wargame/Cryptohack
728x90
반응형

1. intro

2. code 및 분석

2.1.  code

N/A

 

2.2. 분석

문제 설명을 보면 싱글 바이트와 xor 했다고 되어있다.

그러므로 0x1부터 0xff까지 쭉 뽑아보면 답이 나올 것이다.

 

조금 더 빠르게 하려면 아무래도 flag 형식이 crypto 이기에 첫 문자가 c인 경우만 추려내도 좋을 것이다.

 

3. exploit

e = bytes.fromhex('73626960647f6b206821204f21254f7d694f7624662065622127234f726927756d')
d = ''

for i in range(0xff):
    for j in range(len(e)):
        d += chr(e[j] ^ i)
    if d[0] == 'c':
        print(d)
    d = ''

 

┌──(kali㉿kali)-[~/Downloads]
└─$ python solve.py
crypto{0x10_15_my_f4v0ur173_by7e}
728x90
반응형
저작자표시 비영리 변경금지 (새창열림)

'Wargame > Cryptohack' 카테고리의 다른 글

Greatest Common Divisor  (2) 2023.02.01
You either know, XOR you don't  (0) 2023.02.01
XOR properties  (0) 2023.01.31
XOR Starter  (0) 2023.01.31
Bytes and Big Integers  (0) 2023.01.31
'Wargame/Cryptohack' 카테고리의 다른 글
  • Greatest Common Divisor
  • You either know, XOR you don't
  • XOR properties
  • XOR Starter
wyv3rn
wyv3rn
아저씨의 흔한 취미. wyv3rn#1249
  • wyv3rn
    think storage
    wyv3rn
  • 전체
    오늘
    어제
    • 분류 전체보기 (500)
      • To do list (7)
        • Doing (1)
        • Complete (6)
      • Diary (35)
      • Tips & theory (77)
      • Kernel Exploit (27)
        • Theory (15)
        • Exercise (5)
      • Wargame (313)
        • pwn.college (34)
        • Dreamhack (148)
        • pwnable.kr (15)
        • Lord of Sqlinjection (3)
        • Cryptohack (20)
        • Root me (27)
        • CodeEngn (4)
        • Exploit Education (22)
        • ROP Emporium (8)
        • H4C (10)
        • Hackerchool (22)
      • CTF (41)
        • Solved (39)
        • Unsolved (2)
      • Script (0)
      • RubiyaLap (0)
  • 블로그 메뉴

    • 홈
    • 방명록
  • 링크

  • 공지사항

    • PWN wargame 모음 (및 느낀점)
    • 비공개 글들에 대해.
    • 뭐라도 하나 얻어가시길...
  • 인기 글

  • 태그

    BOF
    lob
    hackerschool
    ROOT ME
    exploit education
    heap
    cryptohack
    libc
    rop
    phoenix
    32bit
    pwnable.kr
    Format String Bug
    docker
    _IO_FILE
    CANARY
    x64
    tcache
    pwntools
    vtable
    RTL
    root-me
    dreamhack
    Buffer Overflow
    Me
    la ctf
    FSB
    64bit
    x86
    root
  • 최근 댓글

  • 최근 글

  • 250x250
    반응형
  • hELLO· Designed By정상우.v4.10.3
wyv3rn
Favourite byte
상단으로

티스토리툴바