Skip to content
Sliim edited this page Feb 13, 2016 · 7 revisions

Since pentest-env 0.5.0, customizations are stored in $HOME/.pentestrc file as YAML format. An example of configuration file is available at the root of this repository named pentestrc.example

You can copy and edit it for your needs:

cp pentestrc.example ~/.pentestrc

Here is a minimal configuration:

scripts_path: ~/.pentest.d/scripts
targets_path: ~/.pentest.d/targets
targets: []

This setup set your scripts and targets directories used by pentest-env. It also set an empty target list.. if you just want to run a Kali instance..

Setup targets

You can easily deploy targets with your kali instance. pentest-env comes with some targets ready to use. See the targets page to have a full list of available targets. TODO You can also add your own targets in your targets_path directory and use them in your targets list.

To setup targets to deploy, add the target name in the targets array of your $HOME/.pentestrc:

scripts_path: ~/.pentest.d/scripts
targets_path: ~/.pentest.d/targets
targets: [dvwa vicnum]

Instance customizations

You can perform many customizations for each pentest-env instances.

Available customizations are:

  • packages - An array of apt packages to install
  • commands - List of command to run as inline shell script
  • scripts - List of scripts to execute. They must be located in scripts_path directory
  • synced_folders - Hash of forlders to sync with the instance

Just add the instance name as a key in your $HOME/.pentestrc, and define each customizations you need

Example for Kali instance and DVWA target:

kali:
  packages: [git-core]
  commands:
  - curl https://opscode-omnibus-packages.s3.amazonaws.com/debian/6/x86_64/chef_12.0.3-1_amd64.deb -o chef.deb && sudo dpkg -i chef.deb
  scripts: [openvas.sh]
  synced_folders: 
    data: /pentest-data
dvwa:
  packages: [git-core]

Pentest Chef repo

chef-solo is used as the provisioner. You need to init git submodules to provision your Kali with provided roles in pentest-chef-repo (See install instruction). If this submodule is missing, kali provisioning will be ignored.

You can add/remove some roles to you Kali linux by editing the provisioning section in Vagrantfile. For example:

kali.vm.provision :chef_solo do |chef|
  ...
  chef.add_recipe('apt')
  chef.add_role('kali-full')
  chef.add_role('faraday')
end

See pentest-chef-repo for a detailed list of available roles.

Clone this wiki locally