Procedures for Integrating BeEF and Armitage

April 1, 2016 | Views: 8653

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

For 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 off

9) 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.

Save

Save

Share with Friends
FacebookTwitterLinkedInEmail
Use Cybytes and
Tip the Author!
Join
Share with Friends
FacebookTwitterLinkedInEmail
Ready to share your knowledge and expertise?
4 Comments
  1. thanks for all the comments

  2. thx for great tut, worked on cobaltstrike to thxxxxxxxxxxxxx

  3. in video please ?

Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge

 

Cybrary|0P3N

Is Linux Worth Learning in 2020?
Views: 331 / December 14, 2019
How do I Get MTA Certified?
Views: 923 / December 12, 2019
How much does your PAM software really cost?
Views: 1376 / December 10, 2019
How Do I Get into Android Development?
Views: 1754 / December 8, 2019

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel