분류 전체보기

Pwnable/Dreamhack

Dreamhack - SingleByteXor

#include int main() { char ciphrtext[23] = { 0x54, 0x58, 0x6b, 0x64, 0x58, 0x75, 0x4f, 0x7b, 0x21, 0x5c, 0x7c, 0x75, 0x42, 0x4f, 0x21, 0x63, 0x4f, 0x74, 0x42, 0x75, 0x51, 0x7d, 0x6d }; char plaintext[23] = { 0x00, }; for (int i = 0; i < 256; i++) { for (int k = 0; k < 23; k++) { plaintext[k] = ciphrtext[k] ^ i; } printf("%s", plaintext); } } Simple XOR Problem

Cryptography

Dreamhack - Basic_Crypto1

#include int main() { char ciphrtext[22] = "EDVLFFUBSWRGUHDPKDFN"; char plaintext[22] = { 0x00, }; for (int i = 0; i < 26; i++) { for (int k = 0; k < strlen(ciphrtext); k++) { plaintext[k] = ciphrtext[k] - i; if (plaintext[k] < 65) { ciphrtext[k] += 26;} } printf(plaintext); printf("\n"); } } Simple Caesar Cipher Problem

Pwnable/Techniques

Pwntools for me

Freaking Shit. Last 사이버전사경연대회 본선에서 Python3 밖에 없어서 String Return 값이 byte로 출력됨. Crap. PYHTON2 ▶ normal 하게 쓰면 됨. PYTHON3 ▶ 인자로 사용할 때 b'___' 로 감싸야 됨. 출력할 때나 일반 string 으로 변경할 때 .decode()로 저주를 풀어야 함. from pwn import * # 객체 생성 r = remote("ADDR", PORT) p = process("Local_File_Address") # Data Packing p32(data, endian='big') # Default → Little Endian p64(data, endian='big') # Get Data from PLT, GOT elf =..

Lucvs
'분류 전체보기' 카테고리의 글 목록 (3 Page)