Skip to content

Instantly share code, notes, and snippets.

@TcM1911
Last active June 25, 2018 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TcM1911/18f8b9fc689c6a0d4fa2 to your computer and use it in GitHub Desktop.
Save TcM1911/18f8b9fc689c6a0d4fa2 to your computer and use it in GitHub Desktop.
Instruction on how to setup Metasploit-framework on a Chromebook.

Run Metasploit-framework on a Chromebook

Enable Developer mode for the Chromebook

  1. Enter recovery mode by pressing Escape and Refresh, then press the power button.
  2. Press Control-D
  3. Press enter to confirm, and wait for the Chromebook to reboot.
  4. At the waring during the boot press Control-D or wait 30 seconds.

Install Crouton

To run the terminal in a separate window, install Crosh Window

Install chroot on a removable disk

sudo umount /dev/sdb1
sudo mkfs.ext4 /dev/sdb1

Remount the drive. Then run:

wget https://goo.gl/fd3zc -o crouton
cd ~/Downloads
sudo sh crouton -r kali -t core,cli-extra -p /media/removable/USB\ Drive/
sudo sh /media/removable/USB\ Drive/bin/enter-chroot

Install Metasploit-framework

Install dependancies for metasploit.

sudo apt-get -y install \
build-essential zlib1g zlib1g-dev \
libxml2 libxml2-dev libxslt-dev locate \
libreadline6-dev libcurl4-openssl-dev git-core \
libssl-dev libyaml-dev openssl autoconf libtool \
ncurses-dev bison curl wget postgresql \
postgresql-contrib libpq-dev \
libapr1 libaprutil1 libsvn1 \
libpcap-dev libsqlite3-dev

Install ruby:

\curl -L https://get.rvm.io | bash -s stable --autolibs=enabled --ruby=2.1.5
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
source ~/.rvm/scripts/rvm

Downloading the framework

git clone https://github.com/rapid7/metasploit-framework.git msf3

Setup Metasploit

Move the folder and install all gems

sudo mv msf3 /opt/
cd /opt/msf3
gem install bundler
bundle install

Setup Postgres

Create the database and hook-up metasploit

sudo /etc/init.d/postgres start
sudo -s
su postgres
(kali)postgres@localhost:/opt/msf3$ createuser msf_user -P
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
createdb --owner=msf_user msf_database

Creat config file for metasploit. Edit /opt/msf3/config/database.yml

production:
  adapter: postgresql
  database: msf_database
  username: msf_user
  password: yourmsfpassword
  host: 127.0.0.1
  port: 5432
  pool: 75
  timeout: 5
@axeljm
Copy link

axeljm commented Sep 11, 2015

cant seem to get the last part right :/
Creat config file for metasploit. Edit /opt/msf3/config/database.yml

@random-robbie
Copy link

for starting the DB

sudo /etc/init.d/postgresql start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment