-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from SamuraiWTF/5.0-dev
5.0 dev
- Loading branch information
Showing
93 changed files
with
6,136 additions
and
726 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,39 @@ | ||
# vagrant | ||
.vagrant | ||
|
||
*.log | ||
.DS_Store | ||
# misc | ||
config/home/Burp* | ||
|
||
# ansible | ||
*.retry | ||
.venv/* | ||
.vscode/* | ||
|
||
# OSX | ||
.DS_Store | ||
|
||
# packer folders | ||
packer_cache/ | ||
output-*-iso/ | ||
|
||
# log + tmp files | ||
*.swp | ||
*.swo | ||
*.box | ||
*.log | ||
|
||
# secret files | ||
**/__pycache__ | ||
variables.json | ||
secrets.txt | ||
scripts/setup/env_vars | ||
|
||
## automated packer files | ||
samurai.json | ||
# compressed config folder | ||
.idea/* | ||
**/.ansible | ||
**/~* | ||
*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "base/packer/scripts/build/bento"] | ||
path = base/packer/scripts/build/bento | ||
url = https://github.com/chef/bento.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Base box Requirements | ||
|
||
Moved into the /docs/basebox.md of this repository so they can be published to the SamuraiWTF website. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Amazon Linux Notes | ||
There is a Ansible playbook available for Amazon Linux (i.e. to set up SamuraiWTF in a AWS Workspaces). | ||
This is for online classrooms. There are some caveats to this build: | ||
|
||
* You must start with a Amazon Linux workspace. 4GB Ram is sufficient. Disk size can be 20GB or more. | ||
* The build sets up targets and tools but some customizations, such as desktop wallpaper, must be completed manually. | ||
* AWS terms of services does not allow any hacking / scanning from workspaces. Therefore it is recommended that you remove the default outbound rule for the workspaces Security Group, so that no traffic will be able to leave the workspace. Strictly speaking, once SamuraiWTF is installed and configured, internet access outbound should no longer be needed. All the target apps are contained within the environment as local destinations. | ||
|
||
## Amazon Linux Installation | ||
* Create a Workspace (4+GB Ram, 20+ GB user disk space) | ||
* Log in, open a terminal, and run each of the the commands under [install/amazon-linux/aws_workspace_bootstrap.sh](https://raw.githubusercontent.com/SamuraiWTF/samuraiwtf/amazon-linux/install/amazon-linux/aws_workspace_bootstrap.sh) in this branch. | ||
* Type your workspace password when prompted for your *BECOME Password*. This is what the Ansible playbook uses for sudo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
$bootstrapscript = <<-SCRIPT | ||
echo ">>>>>>>>>>>>> Installing the UI..." | ||
yum -y update | ||
yum install -y xorg-x11-xinit libXfont xorg-x11-xauth | ||
yum install -y xorg-x11-drv-libinput xorg-x11-drv-keyboard xorg-x11-drv-vmmouse xorg-x11-drv-vmware xorg-x11-server-Xvfb xdg-user-dirs-gtk xz xz-libs | ||
yum install -y gdm | ||
amazon-linux-extras install mate-desktop1.x -y | ||
bash -c 'echo PREFERRED=/usr/bin/mate-session > /etc/sysconfig/desktop' | ||
amazon-linux-extras install epel -y | ||
amazon-linux-extras install ansible2 -y | ||
yum install -y git | ||
git clone --depth=1 --single-branch --branch "5.0-dev" https://github.com/SamuraiWTF/samuraiwtf.git /tmp/samuraiwtf | ||
pushd /tmp/samuraiwtf | ||
ansible-playbook -K base/amazon-linux/vagrant_playbook.yml | ||
katana --update | ||
katana install katana | ||
systemctl enable samurai-katana | ||
katana start katana | ||
SCRIPT | ||
|
||
|
||
Vagrant.configure("2") do |config| | ||
|
||
config.vm.box = "bento/amazonlinux-2" | ||
|
||
|
||
config.vm.define "samuraiwtf", primary: true do |samuraiwtf| | ||
samuraiwtf.vm.host_name = "SamuraiWTF" | ||
|
||
samuraiwtf.vm.provider "virtualbox" do |vb| | ||
# Display the VirtualBox GUI when booting the machine | ||
vb.gui = true | ||
vb.name = "SamuraiWTF-5" | ||
# Customize the amount of memory on the VM: | ||
vb.memory = "4096" | ||
vb.customize ["modifyvm", :id, "--vram", "128"] | ||
vb.customize ["modifyvm", :id, "--cpus", "2"] | ||
vb.customize ["modifyvm", :id, "--graphicscontroller", "vmsvga"] | ||
|
||
end | ||
|
||
samuraiwtf.vm.provision "shell", inline: $bootstrapscript | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
sudo amazon-linux-extras install ansible2 | ||
|
||
pushd "$DIR"/../.. || exit | ||
|
||
sudo ansible-playbook -K base/amazon-linux/local_playbook.yml | ||
|
||
if [[ "$1" == "--develop" ]]; then | ||
sudo ln -s "$(pwd)/katana/" /opt/katana | ||
else | ||
sudo mkdir -p /opt/katana | ||
sudo cp -R katana/* /opt/katana/ | ||
fi | ||
|
||
popd |
Oops, something went wrong.