Ready to Start Your Career?

Procedures for Integrating BeEF and Armitage

rubins 's profile image

By: rubins

April 1, 2016

Procedures for Integrating BeEF and Armitage - CybraryFor me, Armitage is one of the best ways to convince people about the threats in cyber space. Its GUI could be easily understand by ordinary users. It's unlike CLI, through which you'd have a hard time explaining what's happening to the audience, even if you've already had a meterpreter session.In the past, I tried to search the web for information on how to do set up BeEF and Armitage. A lot of tutorials are available, but I don't think there's one there that's complete, or I may not have found it.This tutorial is a compilation of tutorials I found on the web that work. I wanted to share this, hoping it could help others solve the problem of integrating BeEF and Armitage. My last test with this was on Kali Linux Rolling Edition 64 bits on 25 March 2016: 1) Download the cortana scripts by rsmudge in your specified folder> I prefer the /opt folder# git clone https://github.com/rsmudge/cortana-scripts.git 2) Download and install BeEF Metasploit Plugin from Christian Frichot GitHub repository> download at https://github.com/xntrik/beefmetasploitplugin> unzip the file (you can use GUI to unzip)> rename the folder beef_strike> move this folder into the root directory 3) Download and install all Java dependencies libraries> http://ow.ly/JMx09> extract the file >> this will be the lib folder (you can use GUI to unzip)> download at http://sourceforge.net/projects/json-lib/files/> download at http://sourceforge.net/projects/ezmorph/> move the two jar files into the lib folder, overwrite when prompted> move the lib folder into beef_strike folder in your root, overwrite when prompted 4) Install the following gems# gem install hpricot# gem install json 5) Folder installation> copy these files into your metasploit folder from beef_strike folder in your root> beef.rb inside plugins folder into /usr/share/metasploit-framework/plugins/ folder> beef/ inside the lib folder into /usr/share/metasploit-framework/lib/ folder> copy the file BeefLib.jar from your /cortana-scripts/beef_strike/ folder to/root/beef_strike/ folder 6) Edit beef-xss config.yaml# nano /usr/share/beef-xss/config.yaml> at the bottom, change this:metasploit:enable: false> to this:metasploit:enable: true> save the file, then exit 7) Edit the file metasploit config.yaml# nano /usr/share/beef-xss/extensions/metasploit/config.yaml> change this:host: "127.0.0.1"> to this:host: "192.168.1.101"  >> your IP> Then, change this:callback_host: "127.0.0.1"> to this:callback_host: "192.168.1.101"   >> your IP> Then, change this:{os: 'custom', path: ''}> to this:{os: 'custom', path: '/usr/share/metasploit-framework/'}> Save the file, then exit 8) Load the cortana script into Armitage> first, we must run Apache then BeEF# service apache2 start# service beef-xss start> second, is to run postgresql then Armitage# service postgresql start> optional: if this is the first time you're running msfconsole or Armitage, run this first# msfdb init> when completed, run Armitage thru the Main menu> in Armitage> click Armitage menu> go to scripts> click on load> browse the beef_strike.cna inside the /cortana-scripts/beef_strike/> never use the outdated beef_strike.cna inside the /cortana-scripts/ folder> go to BeEF menu> go to start> go to connect> in my situation, I encountered problem with running Armitage; the screen will turn gray blank> I force a shutdown by pressing the power button till off9) My tested solution> boot the system> completely update and upgrade the system# apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && reboot> when the system reboots, I give the same command without reboot# apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y> when completed, I give the clean command# apt-get clean && apt-get autoclean> when completed, repeat the process of running Apache and beef then postgresql then Armitage# service apache2 start# service beef-xss start# service postgresql start> when completed, run Arimtage thru the Main menu> in Armitage> click Armitage menu> go to scripts> click on load> browse the beef_strike.cna inside the /cortana-scripts/beef_strike/> never use the outdated beef_strike.cna inside the /cortana-scripts/ folder> go to BeEF menu> go to start> go to connect That's all. I hope this helps.SaveSave
Schedule Demo