Pwnable

    훈폰정음

    Writeup File information Code Main int __cdecl main(int argc, const char **argv, const char **envp){ alarm(0x3Cu); setvbuf(stdout, 0LL, 2, 0LL); setvbuf(stdin, 0LL, 2, 0LL); setvbuf(stderr, 0LL, 2, 0LL); puts(asc_11C0); while ( 1 ) { menu(); switch ( off_1214 ) { case 1u: add(); break; case 2u: edit(); break; case 3u: delete(); break; case 4u: check(); break; case 5u: exit(0); return; default: p..

    풍수지리설

    Writeup File information Code Main int __cdecl __noreturn main(int argc, const char **argv, const char **envp) { char v3; // [esp+3h] [ebp-15h] int v4; // [esp+4h] [ebp-14h] size_t v5; // [esp+8h] [ebp-10h] unsigned int v6; // [esp+Ch] [ebp-Ch] ​ v6 = __readgsdword(0x14u); setvbuf(stdin, 0, 2, 0); setvbuf(stdout, 0, 2, 0); alarm(0x3Cu); while ( 1 ) { puts("0: Add a Location"); puts("1: Delete a ..

    HackCTF UAF

    가장 처음 uaf를 풀었을 때와 다른 방법으로 풀어버렸다. 처음 heap에 접했을 때는 break point를 걸은 후 chunk 할당을 보면서 풀었지만 이번에는 이런 식으로 할당되겠다고 생각하면서 풀어보았다. Writeup File information Code Main 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); wh..

    HackCTF Beginner_Heap

    heap공부를 다시 시작할 겸 풀었던 문제들 write-up을 써보려 한다. 그중 가장 먼저 풀었던 hackctf beginner_heap writeup이다! Writeup File information Code Main void __fastcall __noreturn main(__int64 a1, char **a2, char **a3) { void *v3; // ST10_8 void *v4; // ST18_8 char s; // [rsp+20h] [rbp-1010h] unsigned __int64 v6; // [rsp+1028h] [rbp-8h] ​ v6 = __readfsqword(0x28u); v3 = malloc(16uLL); *v3 = 1; *(v3 + 1) = malloc(8uLL); v4 =..

    pwnable.tw orw

    orw Writeup File information Code main int __cdecl main(int argc, const char **argv, const char **envp) { orw_seccomp(); printf("Give my your shellcode:"); read(0, &shellcode, 0xC8u); (shellcode)(); return 0; } orw_seccomp 함수 호출 후 read로 shellcode에 입력받고 shellcode를 실행시킨다. orw_seccomp() unsigned int orw_seccomp() { __int16 v1; // [esp+4h] [ebp-84h]char *v2; // [esp+8h] [ebp-80h]char v3; // [esp+Ch]..

    pwnable.tw start

    start 처음에 조금 방황을했지만 보호기법을 꼭 생각하자보호기법이 꺼져있으면 다 이유가있음 nx bit disabled 인것으로 shell code를 이용해야 하는것을 바로 알아차려야 했었다… 계속 syscall 어떻게 이용할까만 생각을해버려서 시간만 날려버렸다. .text:08048060 _start proc near ; DATA XREF: LOAD:08048018↑o .text:08048060 push esp .text:08048061 push offset _exit .text:08048066 xor eax, eax .text:08048068 xor ebx, ebx .text:0804806A xor ecx, ecx .text:0804806C xor edx, edx .text:0804806E push..