vagrant up your life!

slideshow: tinyurl.com/49sd-vagrant

if you don't trust us...preview at: http://preview.tinyurl.com/49sd-vagrant

whois alexrodriguez

  • whoami
    • Name - Alex
    • elrey741 on slack
  • jobs
    • work for university
    • love setting up the lab and learning new perspectives
    • being curious =D

man vagrant

  • vagrant --help
  • less vagrant
  • vagrant="happy" ; $vagrant
  • #!/bin/bash... :)
    • provisioning

Vagrant init

  • pre reqs/next steps
    • Laptop
    • 4 Gb ram
    • 20 Gb Storage
    • Virtualbox
    • Vagrant

Providers

  • Make sure you have one of these installed
    • Virtualbox #used in slideshow
    • Vmware
    • Docker
  • All these and more

apt-get install vagrant

  • Download Vagant
    • linux - 
    • mac - website above
    • windows - website above #needs  a reboot
apt-get install vagrant #whatever package manager mine is pacman

Vagrant init env

Very important to stay organized!

cd Desktop
mkdir vagrant

Powershell

Bash

mkdir vagrant

Vagrant init playing-around

# if os == Windows
mkdir vagrant-ubuntu
cd vagrant-ubuntu
# if os == Linux
mkdir vagrant-ubuntu && cd $_

# now time for some fun :)
vagrant init hashicorp/precise64
vagrant up
vagrant ssh
telnet towel.blinkenlights.nl
sudo apt-get install sl
!$
sudo apt-get install cmatrix
!$
vagrant halt
vagrant global-status
vagrant destroy
cd ..
# can always go back into directory and vagrant up

Now we vagrant

mkdir vagrant-kali
cd vagrant-kali
wget https://raw.githubusercontent.com/49thSecurityDivision/slideshows/master/2017/01-Intermediate-Monday/01-Vagrant/Vagrantfile -Outfile Vagrantfile
explorer .

Powershell

mkdir vagrant-kali && cd $_ #whatever you want to call it
wget https://raw.githubusercontent.com/49thSecurityDivision/slideshows/master/2017/01-Intermediate-Monday/01-Vagrant/Vagrantfile 
nano Vagrantfile

Bash

Customize the Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "49thsd/kali-linux-2.0-amd64"
  config.vm.box_url = "http://vagrant.49sd.com/red.box"
  config.vm.provision "shell",
    inline: "apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y"
end

Vagrantfile (change to look like this)

What do you have and next?

  • start vagrant box

 

  • Changed!!!
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: Hit:1 http://archive.linux.duke.edu/kalilinux/kali kali-rolling InRelease

Vagrant halt

  • Takeaways
    • Automation
  • My future presentations
  • have fun =)
  • Slideshows (@github)
  • Resources in speakers notes as well!

Vagrant

By 49th Security Division

Vagrant

  • 763