Register

2023. 1. 31. 09:52·Wargame/Cryptohack
728x90
반응형

1. intro

2. code 및 분석

2.1.  code

 

2.2. 분석

리버싱을 위해 하는 크립토 공부.

가입부터 크립토를 요구한다 ㅋㅋㅋ

 

Roman emperor's cipher는 Ceasar cipher를 이야기하며,

아래 링크와 같이 shift cipher다.

https://en.wikipedia.org/wiki/Caesar_cipher

 

Caesar cipher - Wikipedia

From Wikipedia, the free encyclopedia Simple and widely known encryption technique The action of a Caesar cipher is to replace each plaintext letter with a different one a fixed number of places down the alphabet. The cipher illustrated here uses a left sh

en.wikipedia.org

 

단순하기에 고민할 필요가 없다.

코딩만 잘 하면 된다.

 

3. exploit

몇번째 shift인지 알 수 없으니 A~Z까지 다 해서 정상적인 단어만 찾으면 된다.

e = 'DWZLOKD SQNOGX FZQLDMS BQNTBG'
d = ''

for i in range(1,24):
    for j in range(len(e)):
        if ord(e[j]) == 0x20:
            d += e[j]
        else:
            check = ord(e[j]) + i
            if check > 0x5a:
                d += chr(check - 0x5a + 0x40)
            else:
                d += chr(check)
    print(d)
    d = ''
728x90
반응형
저작자표시 비영리 변경금지 (새창열림)

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

Base64  (0) 2023.01.31
Hex  (0) 2023.01.31
ASCII  (0) 2023.01.31
Great Snakes  (0) 2023.01.31
Finding Flags  (0) 2023.01.31
'Wargame/Cryptohack' 카테고리의 다른 글
  • Hex
  • ASCII
  • Great Snakes
  • Finding Flags
wyv3rn
wyv3rn
아저씨의 흔한 취미. wyv3rn#1249
  • wyv3rn
    think storage
    wyv3rn
  • 전체
    오늘
    어제
    • 분류 전체보기 (500) N
      • To do list (7) N
        • Doing (1) N
        • Complete (6)
      • Diary (35)
      • Tips & theory (77)
      • Kernel Exploit (27) N
        • Theory (15)
        • Exercise (5) N
      • 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) N
        • Solved (39) N
        • Unsolved (2)
      • Script (0)
  • 블로그 메뉴

    • 홈
    • 방명록
  • 링크

  • 공지사항

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

  • 태그

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

  • 최근 글

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

티스토리툴바