Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
** Make sure to pip install ansible, apt has an older copy **

# Instructions
* Start with Parrot HTB Edition
* Install Ansible (python3 -m pip install ansible)
* Clone and enter the repo (git clone)
* ansible-galaxy install -r requirements.yml
* Make sure we have a sudo token (sudo whoami)
* ansible-playbook main.yml

# Off-Video Changes
* Mate-Terminal Colors, I show how to configure it here (https://www.youtube.com/watch?v=2y68gluYTcc). I just did the steps in that video on my old VM to backup the color scheme, then copied it to this repo.
* Evil-Winrm/Certipy/SharpCollection/CME/Impacket, will make a video for these soon
* Updated BurpSuite Activation. Later versions of ansible would hang if a shell script started a process that didn't die. Put a timeout on the java process
1. Install Parrot HTB Edition
2. Run following commands
```
#Install Ansible
python3 -m pip install ansible --break-system-packages

#Add Ansible to PATH
export PATH="$PATH:$HOME/.local/bin"

#Clone repo
git clone https://github.com/n0isegat3/parrot-build
cd parrot-build

#Install requirements
ansible-galaxy install -r requirements.yml

#Make sure to have a sudo token
sudo whoami

#Run playbook
ansible-playbook main.yml
```
3. Enjoy

# Credits
Thank you ippsec for initial automation! You can find his repo on github.com/ippsec/parrot-build
2 changes: 1 addition & 1 deletion main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- role: "roles/configure-tmux"
- role: "roles/customize-terminal"
- role: "roles/customize-browser"
- role: "roles/configure-logging"
# - role: "roles/configure-logging"
- role: "roles/configure-system"
- role: gantsign.visual-studio-code
users:
Expand Down
4 changes: 2 additions & 2 deletions roles/configure-logging/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
- include: "ufw.yml"
- include: "auditd.yml"
- include_tasks: "ufw.yml"
- include_tasks: "auditd.yml"
2 changes: 1 addition & 1 deletion roles/configure-system/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
- include: "configure-sudoers.yml"
- include_tasks: "configure-sudoers.yml"
39 changes: 33 additions & 6 deletions roles/configure-tmux/files/.tmux.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
set -g history-limit 10000
set -g allow-rename off
# Status Bar
set-option -g status on
set -g status-justify centre

#set prefix
set -g prefix C-a
bind C-a send-prefix
unbind C-b

set -g status-bg "#008000"
set -g history-limit 100000
set -g allow-rename off

bind-key j command-prompt -p "join pain from:" "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
bind-key C send-keys " | xclip -selection clipboard"
bind-key j command-prompt -p "Join pan from:" "join-pane -s '%%'"
bind-key s command-prompt -p "Send pane to:" "joian-pane -t '%%'"

# Search Mode VI (default is emac)
set-window-option -g mode-keys vi

# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1

# Improve colors
set -g default-terminal 'tmux-256color' #tohle zakomentovat v macos, jinak tmux blbne

# VPN IP
# show host name and IP address on left side of status bar
set -g status-left-length 60
set -g status-bg green
set -g status-right-length 85
set -g status-right "#{prefix_highlight}"
set -ag status-right "#[fg=white,bg=black] #()"
set -ag status-right " "
set -ag status-right "#[fg=red,bg=black]#(ifconfig tap0 | grep 'inet ' | awk '{print $2}')"
set -ag status-right " "
set -ag status-right "#[fg=black,bg=green] %H:%M %d-%b-%y"
set -ag status-right " "
3 changes: 3 additions & 0 deletions roles/configure-tmux/files/tmux-vpn-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
IF="tun0"
if [[ $(ip addr | grep $IF) == '' ]]; then echo "VPN Down"; else ip addr show dev $IF | grep "inet\b" | awk '{print $2}'| cut -d/ -f1; fi
8 changes: 6 additions & 2 deletions roles/configure-tmux/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@
copy:
src: "{{ role_path }}/files/.tmux.conf"
dest: "{{ ansible_env.HOME }}"


- name: "Copying Tmux VPN info script"
copy:
src: "{{ role_path }}/files/.tmux.conf"
dest: "/opt"
become: true
become_method: sudo
4 changes: 2 additions & 2 deletions roles/customize-browser/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
- include: "burp.yml"
- include: "firefox.yml"
# - include_tasks: "burp.yml"
- include_tasks: "firefox.yml"
60 changes: 60 additions & 0 deletions roles/install-tools/files/ferox-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Example configuration for feroxbuster
#
# If you wish to provide persistent settings to feroxbuster, rename this file to ferox-config.toml and make sure
# it resides in the same directory as the feroxbuster binary.
#
# After that, uncomment any line to override the default value provided by the binary itself.
#
# Any setting used here can be overridden by the corresponding command line option/argument
#
wordlist = "/opt/SecLists/Discovery/Web-Content/raft-medium-directories.txt"
# status_codes = [200, 500]
# filter_status = [301]
# threads = 1
# timeout = 5
# proxy = "http://127.0.0.1:8080"
# replay_proxy = "http://127.0.0.1:8081"
# replay_codes = [200, 302]
# verbosity = 1
# parallel = 8
# scan_limit = 6
# rate_limit = 250
# quiet = true
# silent = true
# auto_tune = true
# auto_bail = true
# json = true
# output = "/targets/ellingson_mineral_company/gibson.txt"
# debug_log = "/var/log/find-the-derp.log"
# user_agent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"
# redirects = true
# insecure = true
# extensions = ["php", "html"]
# url_denylist = ["http://dont-scan.me", "https://also-not.me"]
# no_recursion = true
# add_slash = true
# stdin = true
# dont_filter = true
# extract_links = true
# depth = 1
# filter_size = [5174]
# filter_regex = ["^ignore me$"]
# filter_similar = ["https://somesite.com/soft404"]
# filter_word_count = [993]
# filter_line_count = [35, 36]
# queries = [["name","value"], ["rick", "astley"]]
# save_state = false
# time_limit = "10m"

# headers can be specified on multiple lines or as an inline table
#
# inline example
# headers = {"stuff" = "things"}
#
# multi-line example
# note: if multi-line is used, all key/value pairs under it belong to the headers table until the next table
# is found or the end of the file is reached
#
# [headers]
# stuff = "things"
# more = "headers"
18 changes: 8 additions & 10 deletions roles/install-tools/files/githubdownload.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,13 @@ def extract_tar(compressed_data, out_file):
Returns: Nothing
"""
try:
gzip_header = compressed_data.getvalue()[:10]
if gzip_header.startswith(b"\x1f\x8b"):
with gzip.open(compressed_data, "rb") as gz:
with tarfile.open(fileobj=gz, mode="r:gz") as tar:
tar.extractall(path=out_file)
return
else:
raise Exception("Unable to identify compression type")
gzip_header = compressed_data.getvalue()[:10]
if gzip_header.startswith(b"\x1f\x8b"):
tar = tarfile.open(fileobj=compressed_data)
tar.extractall(path=out_file)
return
else:
raise Exception("Unable to identify compression type")
except Exception as e:
raise Exception(e)

Expand Down Expand Up @@ -163,5 +162,4 @@ def verify_directory_exists(directory):

print("Usage: python gitdownload.py <repo> <regex> <output_directory> <name:optional>")
print("Example: python gitdownload.py jpillora/chisel _darwin_amd64.gz /tmp chisel_darwin_amd64")
sys.exit(1)

sys.exit(1)
40 changes: 32 additions & 8 deletions roles/install-tools/tasks/apt-stuff.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,46 @@
---
- name: "Updating apt repo/cache"
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
apt:
update_cache: yes
upgrade: dist
become: true
become_method: sudo

- name: "Upgrade all packages"
apt: upgrade=yes force_apt_get=yes
apt:
upgrade: full
force: yes
autoremove: yes
autoclean: yes
become: true
become_method: sudo

- name: "Installing Packages"
package:
name:
apt:
name: "{{ item }}"
state: present
with_items:
- bruteforce-salted-openssl
- cifs-utils
- crowbar
- docker.io
- exiftool
- flamerobin
- flameshot
- gcc-mingw-w64
- gss-ntlmssp
- hashcat
- heimdal-clients
- htop
- httrack
- jq
- pipx
- libsasl2-modules-gssapi-heimdal
- neo4j
- ntpdate
- flameshot
- exiftool
state: latest
- pipx
- rdesktop
- ruby
- ruby-dev
- snmp
become: true
become_method: sudo
11 changes: 11 additions & 0 deletions roles/install-tools/tasks/feroxbuster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- name: "Copying Feroxbuster Config"
copy:
src: "{{ role_path }}/files/ferox-config.toml"
dest: "/etc/feroxbuster"
become: true
become_method: sudo

- name: "Install Feroxbuster"
shell: "curl -sL https://raw.githubusercontent.com/epi052/feroxbuster/main/install-nix.sh | bash -s $HOME/.local/bin"
become: true
become_method: sudo
11 changes: 6 additions & 5 deletions roles/install-tools/tasks/gem-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@
gem:
name: "{{ item }}"
state: latest
user_install: false
loop:
- logger
- stringio
- winrm
- builder
- erubi
- evil-winrm
- gssapi
- gyoku
- httpclient
- logging
- little-plugger
- logger
- logging
- nori
- rubyntlm
- stringio
- winrm
- winrm-fs
- evil-winrm
become: true
become_method: sudo

5 changes: 5 additions & 0 deletions roles/install-tools/tasks/github-repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
loop:
- { repo: "https://github.com/Flangvik/SharpCollection", location: "/opt/SharpCollection" }
- { repo: "https://github.com/danielmiessler/SecLists", location: "/opt/SecLists" }
- { repo: "https://github.com/urbanadventurer/username-anarchy", location: "/opt/username-anarchy" }
- { repo: "https://github.com/extremecoders-re/pyinstxtractor", location: "/opt/pyinstxtractor" }
- { repo: "https://github.com/zrax/pycdc", location: "/opt/pycdc" }
become: true
become_method: sudo

Expand Down Expand Up @@ -34,6 +37,8 @@
- { repo: "carlospolop/PEASS-ng", regex: "winPEASx64.exe", location: "/opt/peas" }
- { repo: "WithSecureLabs/chainsaw", regex: "chainsaw_all_", location: "/opt/" }
- { repo: "BloodHoundAD/BloodHound", regex: "BloodHound-linux-x64.zip", location: "/opt/" }
- { repo: "vi/websocat", regex: "websocat_max.x86_64-unknown-linux-musl", location: "/opt/websocat" }
- { repo: "hashcat/hashcat", regex: ".7z", location: "/opt/hashcat" }
async: 45
poll: 0
become: true
Expand Down
16 changes: 13 additions & 3 deletions roles/install-tools/tasks/kerbrute.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
---
- name: "install Kerbrute"
shell: go install github.com/ropnop/kerbrute@master
- name: "Create kerbrute folder"
shell: "mkdir -p /opt/kerbrute"
become: true
become_method: sudo

- name: "Download kerbrute"
shell: "wget -O /opt/kerbrute/kerbrute-linux-amd64 https://github.com/ropnop/kerbrute/releases/download/v1.0.3/kerbrute_linux_amd64"
become: true
become_method: sudo

- name: "Chmod kerbrute"
shell: "chmod +x /opt/kerbrute/kerbrute-linux-amd64"
become: true
become_method: sudo
12 changes: 7 additions & 5 deletions roles/install-tools/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
- include: apt-stuff.yml
- include: kerbrute.yml
- include: github-repos.yml
- include: python-tools.yml
- include: gem-tools.yml
- include_tasks: apt-stuff.yml
- include_tasks: kerbrute.yml
- include_tasks: github-repos.yml
- include_tasks: python-tools.yml
- include_tasks: gem-tools.yml
- include_tasks: feroxbuster.yml
- include_tasks: nessus.yml
7 changes: 7 additions & 0 deletions roles/install-tools/tasks/nessus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- name: "Download Nessus Install Package"
shell: "wget https://www.tenable.com/downloads/api/v2/pages/nessus/files/Nessus-10.7.4-debian10_amd64.deb -O /tmp/nessus.deb"

- name: "Install Nessus"
shell: "dpkg -i /tmp/nessus.deb"
become: true
become_method: sudo
Loading