![[ hackctf ] Classic Cipher 포스팅 썸네일 이미지](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FCjq95%2Fbtra8AKPSiF%2FPCYxjUyH1fCrOSLzJttg80%2Fimg.png)
War Games/hack-ctf
[ hackctf ] Classic Cipher
문제소스 저기 문자열을 거꾸로 뒤집어 카이사르 복호화 사이트에 넣기 ! 복호화 사이트 : http://theblob.org/rot.cgi
War Games/hack-ctf
[ hackctf ] Classic Cipher
문제소스 저기 문자열을 거꾸로 뒤집어 카이사르 복호화 사이트에 넣기 ! 복호화 사이트 : http://theblob.org/rot.cgi
War Games/hack-ctf
[ HackCTF ] Smooth Cipher1
문제소스 문자열 같이 생겨서 카이사르 아니면 비즈네르 암호화이다. 카이사르는 안되고 비즈네르 복호화 사이트에서 돌려봤다. 플래그는 복호화 안 되서 따로 돌려봤다. 복호화 사이트 : https://www.guballa.de/vigenere-solver
War Games/hack-ctf
[ hackctf ] great binary
플래그를 이진수로 줬따 01001000 01100001 01100011 01101011 01000011 01010100 01000110 01111011 01100011 01110010 01111001 01110000 01110100 01101111 01011111 01110110 00110010 01110010 01111001 01011111 01100101 01100001 01110011 01111001 01011111 01110000 01110010 00110000 01100010 00110001 01100101 01101101 01111101 data = "01001000 01100001 01100011 01101011 01000011 01010100 01000110 01111011 01100011..
War Games/hack-ctf
[hact-ctf] sysrop
문제소스 __int64 __fastcall main(__int64 a1, char **a2, char **a3) { char buf; // [rsp+0h] [rbp-10h] setvbuf(stdout, 0LL, 2, 0LL); setvbuf(stdin, 0LL, 2, 0LL); read(0, &buf, 0x78uLL); return 0LL; } 1. 길이 제한이 0x78인 read함수 호출, 출력함수가 없다. 보호기법 Canary : No NX : Yes PIE : No Fortify : No RelRO : Partial 문제 분석 및 페이로드 ROP를 진행해야 되는데 길이 제한이 있다. 그래서 main으로 다시 돌아가 read함수를 재활용 했다. 출력함수가 없어서 libc leak이 힘들다. 그래서 문..
War Games/hack-ctf
[hack-ctf] childheap (stdout leak)
문제 소스 main 함수 // local variable allocation has failed, the output may be wrong! int __cdecl __noreturn main(int argc, const char **argv, const char **envp) { int v3; // [rsp+Ch] [rbp-4h] Init(*(_QWORD *)&argc, argv, envp); while ( 1 ) { while ( 1 ) { menu(); v3 = input_number(); if ( v3 != 1 ) break; Malloc(); } if ( v3 != 2 ) exit(0); Free(); } } malloc 함수 unsigned __int64 Malloc() { int v0; //..
War Games/hack-ctf
[hactctf] RTC
문제 소스 int __cdecl main(int argc, const char **argv, const char **envp) { char buf; // [rsp+0h] [rbp-40h] setvbuf(stdin, 0LL, 2, 0LL); write(1, "Hey, ROP! What's Up?\n", 0x15uLL); return read(0, &buf, 0x200uLL); } 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : ENABLED PIE : disabled RELRO : Partial 문제 분석 및 페이로드 일반적인 ROP와 다르게 gadget이 부족하다는 것을 알 수 있다. --> RTC이용 /bin/sh를 bss영역에 써주..
War Games/hack-ctf
[hackctf] Unexploitable #1
문제 소스 int __cdecl main(int argc, const char **argv, const char **envp) { char s; // [rsp+0h] [rbp-10h] setvbuf(stdout, 0LL, 2, 0LL); setvbuf(stdin, 0LL, 2, 0LL); fwrite("Easy RTL ha? You even have system@plt!\n", 1uLL, 0x27uLL, stdout); fflush(stdin); fgets(&s, 64, stdin); return 0; } 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : ENABLED PIE : disabled RELRO : Partial 문제 분석 및..
War Games/hack-ctf
[hackctf] you_are_silver
문제 소스 int __cdecl main(int argc, const char **argv, const char **envp) { char s; // [rsp+0h] [rbp-30h] int v5; // [rsp+28h] [rbp-8h] int v6; // [rsp+2Ch] [rbp-4h] setvbuf(stdout, 0LL, 2, 0LL); v6 = 50; puts("Please enter your name"); fgets(&s, 0x2E, stdin); printf(&s, 0x2ELL); v5 = get_tier(v6); printf((const char *)v5); return 0; } signed __int64 __fastcall get_tier(signed int a1) { signed __in..
War Games/hack-ctf
[hackctf] ROP
문제 소스 ssize_t vulnerable_function() { char buf; // [esp+0h] [ebp-88h] return read(0, &buf, 256u); } 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : ENABLED PIE : disabled RELRO : Partial 문제 분석 및 페이로드 classic한 ROP from pwn import * context.log_level='debug' #p=process("./rop",env={"LD_PRELOAD":"./libc.so.6"}) p=remote("ctf.j0n9hyun.xyz", 3021) e=ELF("./rop") libc=ELF("./libc.so...
War Games/hack-ctf
[hackctf] UAF
문제 소스 int __cdecl __noreturn main(int argc, const char **argv, const char **envp) { int v3; // eax char buf; // [esp+8h] [ebp-10h] unsigned int v5; // [esp+Ch] [ebp-Ch] v5 = __readgsdword(0x14u); setvbuf(stdout, 0, 2, 0); setvbuf(stdin, 0, 2, 0); while ( 1 ) { while ( 1 ) { menu(); read(0, &buf, 4u); v3 = atoi(&buf); if ( v3 != 2 ) break; del_note(); } if ( v3 > 2 ) { if ( v3 == 3 ) { print_note..