Quantcast
Channel: un-excogitate.org » Computers
Viewing all articles
Browse latest Browse all 5

Security Tools – Don’t re-invent the wheel when there’s a whole car available

$
0
0

One of the biggest issues I had with BeEF when I started contributing to the project was the administrative interface. Primarily this was due to being absolutely spoilt by Metasploit’s “msfconsole” interface, it just felt so natural to run everything from the command line, it made it trivial to ssh into EC2 instances running MSF, or even just locally, it didn’t matter, the “show” command making it so easy to iterate through a fairly complex hierarchy of information.

So I took some time out to try and figure out how we could implement another UI for BeEF, and naturally I started to look into how MSF did it, and then I came across their fantastic Rex Library, now packaged as a gem for easy distribution and installation over here: https://github.com/hammackj/rex. (Cheers @hammackj). Now, at this point the console interface for BeEF is still non-trunk material, and it’s more of a remote-control interface, i.e. talking via the admin JSON interface that exists within the “Admin” BeEF extension.

It was through this process that I really came to appreciate the awesome work the Metasploit team had done in the construction of Rex, I mean immediately just by performing a quick “# gem install librex” and then including a “require ‘rex’” into your code you have access to an incredibly powerful console based interface with tab completion, multiple level stacks (think beef > zombie > command), a job management system, and this is just the stuff the BeEF console’s using. Lets not forget logging, encoding, sockets and much much more.

If you’re building any security tools in ruby, nay, any tool in ruby that requires this sort of interface (and lets not forget how extensive msf is, so sure you can use Rex to drive a web-ui, console, cli, whatever) I think you’d have a hard time trying to find anything as effective and full-featured as Rex. In addition you’ll find that new features come out quite consistently too, like their JS obfuscator.

By separating the remote control library from the Rex console driver UI, I was then also able to drop the exact same remote control library into the recently announced MSF BeEF Plugin (early version available here).

You can see the console in action here (the current version in the trunk has been updated though, so it’s a lot neater than this):

And the MSF BeEF Plugin here:


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images