Showing posts with label metasploit. Show all posts
Showing posts with label metasploit. Show all posts

Monday, March 6, 2017

how to install beef on debian 8 or ubuntu 16


BeEF is short for The Browser Exploitation Framework. It is a penetration testing tool that focuses on the web browser.

Amid growing concerns about web-borne attacks against clients, including mobile clients, BeEF allows the professional penetration tester to assess the actual security posture of a target environment by using client-side attack vectors. Unlike other security frameworks, BeEF looks past the hardened network perimeter and client system, and examines exploitability within the context of the one open door: the web browser. BeEF will hook one or more web browsers and use them as beachheads for launching directed command modules and further attacks against the system from within the browser context.

Installation

sudo apt-get update
sudo apt-get install curl git
curl -sSL https://raw.githubusercontent.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.1.5
rvm use 2.1.5 -- default
gem install bundler

Download BeEF

cd
git clone git://github.com/beefproject/beef.git

Install gems and launch

cd beef
bundle install
ruby beef

Update/Upgrade

cd beef
git pull origin master
bundle install
./update-beef

Thursday, January 5, 2017

Installing armitage on debian or ubuntu

What is Armitage?

Armitage is a scriptable red team collaboration tool for Metasploit that visualizes targets, recommends exploits, and exposes the advanced post-exploitation features in the framework.

Installing armitage
$ curl -# -o /tmp/armitage.tgz http://www.fastandeasyhacking.com/download/armitage150813.tgz
$ sudo tar -xvzf /tmp/armitage.tgz -C /opt
$ sudo ln -s /opt/armitage/armitage /usr/local/bin/armitage
$ sudo ln -s /opt/armitage/teamserver /usr/local/bin/teamserver
$ sudo sh -c "echo java -jar /opt/armitage/armitage.jar \$\* > /opt/armitage/armitage"
$ sudo perl -pi -e 's/armitage.jar/\/opt\/armitage\/armitage.jar/g' /opt/armitage/teamserver



First Run

$ armitage

Wednesday, January 4, 2017

installing metasploit framework on debian 8 or ubuntu 14+


installing the metasploit on debian isn't Difficult

this guide is very simple

first setup you need to update your system with apt-get:

$ sudo apt-get update
$ sudo apt-get upgrade


now you should install the dependent packages for matasploit

$ sudo apt-get install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev curl zlib1g-dev


now you gonna Installing Ruby using RVM

RVM stands for Ruby Version Manager. Which provides efficient way to install and manage ruby version independently. Install latest stable version of RVM on your system using following command. This command will automatically download all required files and install on your system.

$ cd
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -L https://get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm
$ echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
$ source ~/.bashrc
$ RUBYVERSION=$(wget https://raw.githubusercontent.com/rapid7/metasploit-framework/master/.ruby-version -q -O - )
$ rvm install $RUBYVERSION
$ rvm use $RUBYVERSION --default
$ ruby -v
$ gem install rails
$ rails -v



install nmap


you should have nmap for scanning network to install it go here

Configuring Postgres SQL Server

We start by switching to the postgres user so we can create the user and database that we will use for Metasploit

$ sudo -s
# su postgres



Now we create the user and Database, do record the database that you gave to the user since it will be used in the database.yml file that Metasploit and Armitage use to connect to the database

# createuser msf -P -S -R -D
# createdb -O msf msf
# exit
# exit



Installing Metasploit Framework

$ cd /opt $ sudo git clone https://github.com/rapid7/metasploit-framework.git
$ sudo chown -R `whoami` /opt/metasploit-framework
$ cd



Install using bundler the required gems and versions:

$ cd metasploit-framework
$ rvm --default use ruby-${RUByVERSION}@metasploit-framework
$ gem install bundler
$ bundle install



Lets create the links to the commands so we can use them under any user and not being under the framework folder:

$ cd metasploit-framework
$ sudo bash -c 'for MSF in $(ls msf*); do ln -s /opt/metasploit-framework/$MSF /usr/local/bin/$MSF;done'



Lets create the database.yml file that will contain the configuration parameters that will be use by framework:

$ sudo nano /opt/metasploit-framework/config/database.yml


Copy the YAML entries and make sure you provide the password you entered in the user creating step in the password field for the database

production:
adapter: postgresql
database: msf
username: msf
password: yourmsfpassword
host: 127.0.0.1
port: 5432
pool: 75
timeout: 5



Create and environment variable so it is loaded by Armitage and by msfconsole when running and load the variable in to your current shell:


$ sudo sh -c "echo export MSF_DATABASE_CONFIG=/opt/metasploit-framework/config/database.yml >> /etc/profile"

$ source /etc/profile



First Run

$ msfconsole