psj-study의 등록된 링크

키자드에 등록된 총 90개의 포스트를 확인하실 수 있습니다.

Tistory

하고 싶은 일들

gdb동작원리, gdb dash board소스 분석해보기 파이썬 플라스크 알아보고 해보기 배쉬 스크립트 공부 해보기 웹 공부해보기 ctf env도커 서버 구축해보기 PHP도 공부해보기 JAVA공부 깊게 해서 안드로이드 공부도..

Tistory

[ncurses] linux ui library

linux UI library 다른 언어를 이용하면 더 쉽게 할 수 있었을텐데 하필 왜 C언어로ㅠㅠㅠ ncurses를 이용해 c언어로 ui 프로그래밍을 할 수 있다. gtk를 이용하면 더 세련되게 프로그래밍을 만들 수 있을 것이다..

Tistory

[dctf 2021] Formats last theorem

문제소스 보호기법 Canary : No NX : Yes PIE : Yes Fortify : No RelRO : FULL 문제 분석 및 페이로드 while문 때문에 fsb를 연속적으로 사용할 수 있다. Full Relro라서 rtld를 덮거나 hook 영역을 덮어야 한..

Tistory

[pwnable.tw] start

문제소스 Dump of assembler code for function _start: 0x08048060 <+0>: push esp 0x08048061 <+1>: push 0x804809d 0x08048066 <+6>: xor eax,eax 0x08048068 <+8>: xor ebx,ebx 0x0804806a <+10>: xor ecx,ec..

Tistory

[pwnble.tw] orw

문제소스 Dump of assembler code for function main: 0x08048548 <+0>: lea ecx,[esp+0x4] 0x0804854c <+4>: and esp,0xfffffff0 0x0804854f <+7>: push DWORD PTR [ecx-0x4] 0x08048552 <+10>: push ebp 0x0804..

Tistory

[dctf2021] baby_bof

문제소스 보호기법 Canary : No NX : Yes PIE : No Fortify : No RelRO : Partial 문제 분석 및 페이로드 pop rdx가 없어서 Return to csu를 써야하는 상황인데 이유를 모르겠는데 csu가 안됐다. 분명 인자는 잘..

Tistory

[BOB] BoB 10기 온라인 모집 설명회 리뷰

https://www.youtube.com/watch?v=IGjhKmlBVV4 오늘 10기BoB모집설명회를 들었다. 취약점 분석 트랙, 디지털 포렌식 트랙, 보안 컨설팅 트랙, 보안 제품 개발트랙이 있다. 내가 원하는 트랙은 최약점 분석 트랙이..

Tistory

미국 콜로니얼 파이프라인 랜섬웨어

https://www.youtube.com/watch?v=axXCnMABP3w&t=411s 현재는 57억원을 해커들에게 지급하고 키값을 받고 해결됐다고 했다. 원래는 미국 정부에서 테러리스트들에게 돈을 지급하고 협상하지 않는데 사설기업이라 5..

Tistory

[dctf2021] just_another_heap

문제소스 보호기법 Canary : Yes NX : Yes PIE : No Fortify : No RelRO : Partial 문제 분석 및 페이로드 1. create메뉴 idx를 입력받는다. name[idx]배열에 0x20 size의 힙 할당받는다 0x20만큼 할당한 힙에 n..

Tistory

[OMH CTF2021] Framed

문제소스 보호기법 Canary : No NX : Yes PIE : Yes Fortify : No RelRO : Full 문제 분석 및 페이로드 over flow가 나려면 v4 와 v5 가 0xdeadbeef 와 0xcafebabe 로 맞춰줘야 하는데 이것은 rand함수로 맞춰지..

Tistory

[JAVA] 접근 지정자

접근 지정자 자바에서는 클래스별로 멤버 변수들이 존재하기 때문에 클래스 간의 캡슐화를 위해서는 멤버 변수들에 접근할 수 있는 선을 정하는 것이 중요하다. 접근 지정자에는 4가지가 존재한다. private defau..

Tistory

[pwnable.kr] flag

문제소스 __int64 __fastcall start(__int64 a1) { __int64 v1; // rdx __int64 result; // rax char v3; // dl ((void (*)(void))loc_44A770)(); result = sub_44A560(v1, a1, v1, 0LL); v3 = *(_BYTE *)(a1 + 4..

Tistory

[pwnable.kr] passcode

문제소스 #include #include void login(){ int passcode1; int passcode2; printf("enter passcode1 : "); scanf("%d", passcode1); fflush(stdin); // ha! mommy told me that 32bit is vulnerable to brutefor..

Tistory

[pwnable.kr] random

문제소스 #include int main(){ unsigned int random; random = rand(); // random value! unsigned int key=0; scanf("%d", &key); if( (key ^ random) == 0xdeadbeef ){ printf("Good!\n"); system("/bin/cat f..

Tistory

[pwntools] ssh로 서버 접속하여 파일 실행하기

pwnable.kr mistake 라업들을 뒤져보다가 포너블.kr서버에서 접속하여 하지 않고 외부에서 폰툴로 문제를 풀 수가 있다. from pwn import * p = ssh(user="mistake",host="pwnable.kr", port=2222,password="gues..

Tistory

[pwntools] sendafter send차이

오류내용 pwnable.kr mistake문제를 pwntools로 ssh접속 중에 p.recv() p.send()를 p.sendafter("~~~",pay)이렇게 바꿔줬는데 익스플로잇이 잘 안됐다. 이유는 ~~의 내용이 중간에 네트워크 중에서 손실이 됬거나..

Tistory

[pwnable.kr] mistake

문제소스 #include #include #define PW_LEN 10 #define XORKEY 1 void xor(char* s, int len){ int i; for(i=0; i 0)){ printf("read error\n"); close(fd); return 0; } char pw_buf2[PW_LEN+1]; printf("input..

Tistory

[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; }..

Tistory

[Tistory] Tstory 설정

티스토리 설정 정리글 1. 티스토리 스킨 스킨 티스토리 #2 2. code highlight 3. 폰트 눈누에서 메이플스토리 noonnu.cc/font_page/427 눈누 - 상업용 무료한글폰트 사이트 넥슨 메이플스토리 Bold - 넥슨 noonnu..

Tistory

[pwnable.kr] fd

문제소스 #include #include #include char buf[32]; int main(int argc, char* argv[], char* envp[]){ if(argc 문제 분석 및 페이로드 read의 file 디스크럽터 값이 0이 되어야 한다. 즉, 입력값을 0x1234주어..

Tistory

[pwnable.kr] collison

문제소스 #include #include unsigned long hashcode = 0x21DD09EC; unsigned long check_password(const char* p){ int* ip = (int*)p; int i; int res=0; for(i=0; i 문제 분석 및 페이로드 0x21d909ec=5의 배..

Tistory

[pwnable.kr] bof

문제소스 #include #include #include void func(int key){ char overflowme[32]; printf("overflow me : "); gets(overflowme); // smash me! if(key == 0xcafebabe){ system("/bin/sh"); } else{ printf("Nah....

Tistory

[HITCON] LAB15

문제소스 #include #include #include #include #include using namespace std; char nameofzoo[100]; class Animal { public : Animal(){ memset(name,0,24); weight = 0; } virtual void speak(){;} virtual vo..

Tistory

[HITCON] LAB12

문제소스 #include #include #include #include #include #include #include #include #define TIMEOUT 60 struct flower{ int vaild ; char *name ; char color[24] ; }; struct flower* flowerlist[100] ; unsi..

Tistory

[HITCON] LAB13

문제소스 #include #include #include void read_input(char *buf,size_t size){ int ret ; ret = read(0,buf,size); if(ret <=0){ puts("Error"); _exit(-1); } } struct heap { size_t size ; char *content ;..

Tistory

[HITCON] LAB14

문제소스 #include #include #include void read_input(char *buf,size_t size){ int ret ; ret = read(0,buf,size); if(ret <=0){ puts("Error"); _exit(-1); } } char *heaparray[10]; unsigned long int magic..

Tistory

Linux Security Check정리

Security Check > malloc과 free함수를 쓸 때 악의적인 행위를 하지 못하게 함수 내부적으로 검증 단계가 존재한다. > 대표적으로 malloc에서 2가지, free에서 7가지, Unlink에서 2가지 검증 단계를 거친다. Mall..

Tistory

[HITCON] LAB10

문제소스 #include #include #include struct note { void (*printnote)(); char *content ; }; struct note *notelist[5]; int count = 0; void print_note_content(struct note *this){ puts(this->content); }..

Tistory

[HITCON] LAB11

문제소스 #include #include #include #include #include #include struct item{ int size ; char *name ; }; struct item itemlist[100] = {0}; int num ; void hello_message(){ puts("There is a box with mag..

Tistory

[HITCON] LAB7

문제 소스 #include #include #include #include unsigned int password ; int main(){ setvbuf(stdout,0,2,0); char buf[100]; char input[16]; int fd ; srand(time(NULL)); fd = open("/dev/urandom",0); read..

Tistory

[HITCON] LAB8

문제 소스 #include int magic = 0 ; int main(){ char buf[0x100]; setvbuf(stdout,0,2,0); puts("Please crax me !"); printf("Give me magic :"); read(0,buf,0x100); printf(buf); if(magic == 0xda){ system..

Tistory

[HITCON] LAB9

문제 소스 #include #include #include char buf[200] ; void do_fmt(){ while(1){ read(0,buf,200); if(!strncmp(buf,"quit",4)) break; printf(buf); } return ; } void play(){ puts("=====================")..

Tistory

[HITCON] LAB2(seccomp)

문제 소스 문제 분석 및 페이로드 seccomp로 인해 system("/bin/sh")이렇게 사용 X fopen write등 다른 함수를 사용하는 쉘코드를 이용한다. from pwn import * context.log_level='debug' context.arch='i386'..

Tistory

[HITCON] LAB3

문제 소스 #include char name[50]; int main(){ setvbuf(stdout,0,2,0); printf("Name:"); read(0,name,50); char buf[20]; printf("Try your best:"); gets(buf); return ; } 보호기법 Reading symbols from ./..

Tistory

[HITCON] LAB4

문제 소스 #include void See_something(unsigned int addr){ int *address ; address = (int *)addr ; printf("The content of the address : %p\n",*address); }; void Print_message(char *mesg){ char buf[48..

Tistory

[HITCON] LAB5

문제 소스 #include int main(){ char buf[20]; puts("ROP is easy is'nt it ?"); printf("Your input :"); fflush(stdout); read(0,buf,100); } 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disab..

Tistory

[HITCON] LAB6

문제 소스 #include int count = 1337 ; int main(){ if(count != 1337) _exit(1); count++; char buf[40]; setvbuf(stdout,0,2,0); puts("Try your best :"); read(0,buf,64); return ; } 보호기법 gdb-peda$ ch..

Tistory

[docker] pwnable docker환경 세팅하기

도커환경에서 리눅스 버전 세팅하기 매 번 vm으로 바이너리 받고 환경 세팅해주고, 호환성도 맞지 않아 디버깅도 잘 되지 않아 악순환이 번복되고 있었다. 그래서 해결책으로 vm snapshot까지 살 생각했었다. 이..

Tistory

[Ubuntu] 리눅스 버전 확인법

리눅스 버전 확인법 1. cat /etc/issue 2. uname 3. lsb_release -a

Tistory

[Unbuntu] heap info Error

GEF는 heap명령어가 됨 BUT Peda에서 heap info가 안되는 이유 문제 libc버전에 맞는 패키지 설치가 잘 안되어 있기 때문에 그렇다. 1. set verbose on 2. run 하면 ~~~짜라락 뜬다. 3. reading symbols from ~~~..

Tistory

[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..

Tistory

[HITCON] LAB1

문제 소스 #include #include void get_flag(){ int fd ; int password; int magic ; char key[] = "Do_you_know_why_my_teammate_Orange_is_so_angry???"; char cipher[] = {7, 59, 25, 2, 11, 16, 61, 30, 9, 8..

Tistory

[java] 자바 에러 일기

1. this 키워드 이슈 this 키워드를 사용할 때 일반 변수 선언과 다르게 세미콜론으로 문장단위로 컴파일 되는 것을 볼 수가 있다. 2. main함수 static 이슈 public void main이라고 쓰니 play버트이 안나옴 -->..

Tistory

공부 방법에 대한 나의 DATA

시험 공부하다가 환멸이 나와서 지금까지 21년 인생을 살면서 쌓아온 나만의 공부에 대한 생각을 정리해보겠다. 일단 어느 분야든 타고난 천재는 있다고 생각한다. 실제로 고등학교 때 수업시간에 맨날 자고 수학..

Tistory

[docker] docker 에러 일기

에러 내용 도커 zsh쉘로 접속하기 docker 접속 시에 /bin/bash쉘로 접속되어 도커 이미지를 구해 로딩해도 불편하고 에로사항이 많다. 이를 해결하기 위해 물어보고 다니고 서칭 결과 power shell또는 cmd 창에서..

Tistory

[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..

Tistory

[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);..

Tistory

[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 h..

Tistory

[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,..

Tistory

[hackctf] Beginner_Heap

문제 소스 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] v..

Tistory

[hackctf] Look at me

문제 소스 int __cdecl main(int argc, const char **argv, const char **envp) { int v3; // ST1C_4 setvbuf(stdout, 0, 2, 0); v3 = getegid(); setresgid(v3, v3, v3); look_at_me(); return 0; } _BYTE *look..

Tistory

[hackctf] gift

문제 소스 int __cdecl main(int argc, const char **argv, const char **envp) { char s; // [esp+0h] [ebp-84h] alarm(0x3Cu); setvbuf(stdout, 0, 2, 0); setvbuf(stdin, 0, 2, 0); setvbuf(stderr, 0, 2, 0);..

Tistory

[hackctf] Pwning

문제 소스 int vuln() { char nptr; // [esp+1Ch] [ebp-2Ch] int v2; // [esp+3Ch] [ebp-Ch] printf("How many bytes do you want me to read? "); get_n((int)&nptr, 4u); v2 = atoi(&nptr); if ( v2 > 32 ) ret..

Tistory

[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..

Tistory

[hackctf] RTL_World

문제 소스 int __cdecl main(int argc, const char **argv, const char **envp) { int result; // eax int v4; // [esp+0h] [ebp-A0h] int v5; // [esp+10h] [ebp-90h] char buf; // [esp+14h] [ebp-8Ch] void *v..

Tistory

[hackctf] Poet

문제 소스 int __cdecl __noreturn main(int argc, const char **argv, const char **envp) { setvbuf(_bss_start, 0LL, 2, 0LL); puts(s); while ( 1 ) { get_poem(); get_author(); rate_poem(); if ( dword_60..

Tistory

[hackctf] 1996

문제 소스 int __cdecl main(int argc, const char **argv, const char **envp) { __int64 v3; // rdx __int64 v4; // rax __int64 v5; // rdx __int64 v6; // rbx char *v7; // rax __int64 v8; // rdx __int64..

Tistory

[hackctf] Random Key

문제 소스 int __cdecl __noreturn main(int argc, const char **argv, const char **envp) { unsigned int v3; // eax int v4; // [rsp+0h] [rbp-10h] int v5; // [rsp+4h] [rbp-Ch] unsigned __int64 v6; // [r..

Tistory

[hackctf] RTL_Core

문제 소스 int __cdecl main(int argc, const char **argv, const char **envp) { char s; // [esp+Ch] [ebp-1Ch] setvbuf(_bss_start, 0, 2, 0); puts(&::s); printf("Passcode: "); gets(&s); if ( check_passc..

Tistory

[hackctf] x64 Simple_size_BOF

문제 소스 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : disabled PIE : disabled RELRO : Partial 문제 분석 및 페이로드 from pwn import * context.arch='x86_64' p=process("./Si..

Tistory

[hackctf] Simple_Overflow_ver_2

문제 소스 ctf.j0n9hyun.xyz/challenges#Simple_Overflow_ver_2 HackCTF Do you wanna be a God? If so, Challenge! ctf.j0n9hyun.xyz 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : d..

Tistory

[hackctf] offset

문제 소스 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : ENABLED PIE : ENABLED RELRO : FULL 문제 분석 및 페이로드 1. gets함수가 있으나 pie보호 기법이 걸려 ret over write를..

Tistory

[hackctf] BOF_PIE

문제 소스 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : ENABLED PIE : ENABLED RELRO : Partial 문제 분석 및 페이로드 welcome함수가 맵핑되는 주소가 leak되니 welcome함수로부터..

Tistory

[hackctf] Yes or no

문제 소스 int __cdecl main(int argc, const char **argv, const char **envp) { int v3; // eax int v4; // eax int v5; // ecx int v6; // eax int v7; // eax char s; // [rsp+Eh] [rbp-12h] int v10; // [rs..

Tistory

[hackctf] bof_basic #1

문제 소스 Dump of assembler code for function main: 0x080484cb <+0>: lea ecx,[esp+0x4] 0x080484cf <+4>: and esp,0xfffffff0 0x080484d2 <+7>: push DWORD PTR [ecx-0x4] 0x080484d5 <+10>: push ebp 0x080..

Tistory

[hackctf] bof_basic #2

문제 소스 메인함수 Dump of assembler code for function main: 0x080484cd <+0>: lea ecx,[esp+0x4] 0x080484d1 <+4>: and esp,0xfffffff0 0x080484d4 <+7>: push DWORD PTR [ecx-0x4] 0x080484d7 <+10>: push..

Tistory

[hackctf] basic_fsb

문제 소스 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : disabled PIE : disabled RELRO : Partial 문제 분석 및 페이로드 from pwn import * context.log_level='debug' p=process(..

Tistory

[hackctf] 내 버퍼가 흘러넘친다

문제 소스 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : disabled PIE : disabled RELRO : Partial 문제 분석 및 페이로드 from pwn import * context.arch='x86' p=process("./prob1..

Tistory

[hackctf] x64 Buffer Overflow

문제 소스 ctf.j0n9hyun.xyz/challenges HackCTF Do you wanna be a God? If so, Challenge! ctf.j0n9hyun.xyz 보호기법 gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : ENABLED PIE : disabled..

Tistory

Linux환경 터미널에서 빠르게 파일 다운로드 하는 법(wget)

방법 예시 아래 코드를 참고해보자 (py2.7) root@ubuntu:/home/psj/pwn_dream/tcache_dup2# wget "원하는 링크 주소" 예를 들어서 dreamhack에서 원하는 문제를 리눅스 환경에서 빠르게 다운로드 하고 싶으면 1...

Tistory

리눅스에서 subl설치법

설치법 아래 코드 차례대로 진행 단, root권한인 상태로 진행해야됌 sudo apt update sudo apt install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.subl..

Tistory

2021 Plan

지금까지 요약 2020년 12월 -학교 기말고사 -네트워크 공부 2021년 1월 -소켓프로그래밍 공부 -리눅스 공부 -운영체제 공부 -시스템 해킹 공부 시작(20일쯤부터 시작) 2021년 2월 -FTZ풀이 -LOB풀이 -..

Tistory

익스 안 될 때 1. system함수 이용할 땐 18.04버전인지 확인하고 스택정렬 확인해보기 2. 로되리안 확인해보기 3. LD_PRELOAD설정해보기 4. full relro시에 hook https://aceatom.tistory.com/m/371?category=7269..

Tistory

[hact ctf] 풍수지리설 분석 자료

from pwn import * dns,port="ctf.j0n9hyun.xyz",3028 p=remote(dns,port) #p=process("./fengshui",env={"LD_PRELOAD":"./libc.so.6"}) e=ELF("./fengshui") libc=ELF("./libc.so.6") def add(des_size,name,txt_..

Tistory

python vim 설정

vi 설정법 (python 최적화 버전) 1. vi ~/.vimrc 2. 아래 코드 복사 붙여넣기 (복붙 방법: ctrl+insert(복사) , shift+insert(붙여넣기), 정렬 잘 안될 시에 :set paste) syntax on filetype indent plugin on let..

Tistory

Unsafe Unlink 정리

Unsafe Unlink 쓸 수 있는 상황 1. malloc으로 할당 받은 힙의 주소를 전역 변수에서 관리해야 함. 2. 힙 최소 2개이상에 두 번째 힙의 헤더를 조작할 수 있어야 한다. Unlink의 역할 Unlink는 freelist에 있는 힙..

Tistory

[JAVA] Scanner Class 사용법

Scanner란? C언어의 scanf함수 기능과 비슷한 자바 클래스이다. JDK 1.5부터 사용 가능하고 정수 실수 문자열 등을 입력받을 수 있다. Scanner사용법 import java.util.Scanner; Scanner클래스를 사용하기 위해서..

Tistory

[shakti CTF2021] signal dROPer

문제소스 보호기법 문제 분석 및 페이로드 문제 분석 text file은 살아있으나 아이다 데이터베이스 파일이 날라가서 죄송합니다ㅠㅠㅠ 익스플로잇 코드를 보시면 이해가 빠르실 겁니다. from pwn import * #con..

Tistory

[자료구조] 스택과 큐

먼저 스택과 큐를 C++를 이용해서 쉽게 구현하기 위해서는 템플릿 함수에 대해서 알고 넘어가야 한다. 템플릿 함수에 대해 간략히 소개해보겠다. 템플릿(Template) 함수란 템플릿 함수란 함수의 return형과 인자형..

Tistory

[C++] 복사 생성자, 깊은 복사와 얕은 복사

C++의 초기화 방법 C++에서는 int num=20; int &ref=num;과 int num(20); int &ref(num);으로 두 가지 초기화 방법이 있고 두 가지 결과 또한 동일합니다. 하지만 이것은 변수와 변수간의 초기화 방법일 뿐이고 객..

Tistory

내것으로 만들어야할 내용들

gdb 설명 http://korea.gnu.org/manual/release/gdb/gdb.html#SEC1 http://korea.gnu.org/manual/release/gdb/gdb.html#SEC1 korea.gnu.org .init_array .fini_array설명 https://wogh8732.tistory.com/228 main..

Tistory

[AngstromCTF2021] stickystacks

문제 소스 #include #include #include typedef struct Secrets { char secret1[50]; char password[50]; char birthday[50]; char ssn[50]; char flag[128]; } Secrets; int vuln(){ char name[7]; Secrets boshs..

Tistory

[dreamhack] string

문제 소스 #include #include #include #include #include void alarm_handler() { puts("TIME OUT"); exit(-1); } void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); se..

Tistory

[dreamhack] iofile_vatble

문제 소스 #include #include #include #include char name[8]; void alarm_handler() { puts("TIME OUT"); exit(-1); } void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0..

Tistory

[dreamhack] iofile_vatable_check

문제 소스 #include #include #include #include #include FILE * fp; void alarm_handler() { puts("TIME OUT"); exit(-1); } void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IO..

Tistory

[dreamhack] iofile_aw

문제 소스 // gcc -o iofile_aw iofile_aw.c -fno-stack-protector -Wl,-z,relro,-z,now #include #include #include #include #include char buf[80]; int size = 512; void alarm_handler() { puts("TIME OUT")..

Tistory

[dreamhack] house_of_force

문제 소스 // gcc -o force force.c -m32 -mpreferred-stack-boundary=2 #include #include #include #include #include int *ptr[10]; void alarm_handler() { puts("TIME OUT"); exit(-1); } void initialize()..

Tistory

[dreamhack] house_of_spirit

문제 소스 // gcc -o hos hos.c -fno-stack-protector -no-pie #include #include #include #include #include char *ptr[10]; void alarm_handler() { exit(-1); } void initialize() { setvbuf(stdin, NULL, _IO..

Tistory

[dreamhack] tcache_dup

문제 소스 // gcc -o tcache_dup tcache_dup.c -no-pie #include #include #include #include char *ptr[10]; void alarm_handler() { exit(-1); } void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbu..

Tistory

[dreamhack] tcache_dup2

문제 소스 #include #include #include #include char *ptr[7]; void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); } void create_heap(int idx) { size_t size; if( idx..

1