BeEF Module Construction

Events: Submitted by Wade on 13-Jul-08 at 11:25am

BeEF modules consist of three basic files in a directory. The first is ‘name.txt’ which is just the name displayed in the framework’s menus. The next is ‘index.php’, this is the page displayed in BeEF when the menu item is selected. The third file is the ‘template.js’ which is the file that contains the JavaScript code sent to the target. Symmetric BeEF modules are trivial to implement.
Modules can get more complex by transmitting data back from the targets using API calls like return_result(). A great starting point to understand the framework APIs is the standard alert module that comes with BeEF.

PHP reverse shell

Events: Submitted by Wade on 09-Jan-08 at 12:14am

Pentestmonkey has a great tool called php-reverse-shell. It is for elevation from web server (PHP) upload access to a reverse bindshell. The script will open an outbound TCP connection from the webserver to a host and port of your choice.