summaryrefslogtreecommitdiff
path: root/kali.yml
diff options
context:
space:
mode:
authorDan Fedele <dan.fedele@gmail.com>2022-11-06 17:14:38 -0500
committerDan Fedele <dan.fedele@gmail.com>2022-11-06 17:14:38 -0500
commitd35bf7f3c52f5719558f73b77ed1fc34e6997e89 (patch)
tree808ce3eabe1ee04d642bd7fcc5085867cff09c0f /kali.yml
parentc1c81a728173638abf84ad21df34d398fa956240 (diff)
Post CFC version test
Diffstat (limited to 'kali.yml')
-rw-r--r--kali.yml119
1 files changed, 71 insertions, 48 deletions
diff --git a/kali.yml b/kali.yml
index fea5dfb..4bf2127 100644
--- a/kali.yml
+++ b/kali.yml
@@ -9,6 +9,10 @@
ysoserial_jar: "https://github.com/frohoff/ysoserial/releases/latest/download/ysoserial-all.jar"
kitty_installer: "https://sw.kovidgoyal.net/kitty/installer.sh"
tasks:
+ - ansible.builtin.fail:
+ msg: "This playbook must be run properly! Execute sudo bash setup.sh"
+ when: tmux is not defined or zsh_func is not defined
+
- name: Add Docker repo key
ansible.builtin.shell: curl -fsSL {{ docker_repo_key }} | gpg --dearmor --batch --yes -o /etc/apt/trusted.gpg.d/docker-ce-keyring.gpg
@@ -33,53 +37,60 @@
- name: Installing one-off packages from package manager
ansible.builtin.package:
name:
- - gawk
- - terminator
- - jxplorer
- - seclists
- - gobuster
- - python3
- - python3-dev
- - python3-pip
+ - bloodhound
+ - build-essential
+ - bytecode-viewer
+ - clang
+ - cmake
- crackmapexec
- - neo4j
+ - curl
- default-jdk
- default-jre
- - rlwrap
- - eog
- - xclip
- - steghide
- - git
- - ltrace
- - strace
- - gdb
- - gdbserver
- docker
- docker-compose
+ - eog
+ - feroxbuster
+ - flex
- forensics-extra
- - ncat
+ - gawk
+ - gdb
+ - gdbserver
+ - ghidra
+ - git
+ - gobuster
+ - golang-go
- jq
- - powershell
- - samba
- - tmux
- - libssl-dev
+ - jxplorer
- libffi-dev
- - build-essential
+ - liblzma-dev
+ - libssl-dev
+ - libxml2-dev
+ - ltrace
+ - ncat
+ - neo4j
+ - ntpdate
+ - mingw-w64
+ - patch
+ - powershell
+ - python3
+ - python3-dev
+ - python3-pip
+ - p7zip-full
- remmina
+ - rlwrap
+ - samba
+ - seclists
+ - steghide
+ - strace
- sublime-text
- - golang-go
- - ghidra
- - bytecode-viewer
- - ntpdate
- - bloodhound
+ - terminator
+ - tmux
+ - xclip
+ - xfce4-terminal
- zaproxy
+ - zlib1g-dev
state: latest
- - name: Install ShellUp!
- ansible.builtin.git:
- repo: 'https://github.com/AgroDan/shellup.git'
- dest: /opt/shellup
-
- name: Install pwntools
ansible.builtin.pip:
name: git+https://github.com/Gallopsled/pwntools.git@dev
@@ -207,36 +218,48 @@
set mouse=
set ttymouse=
- - name: Getting all interactive users <<hack hack hack>>
+ - name: Getting all interactive users
ansible.builtin.shell: "awk -F: '{ if (($3 >= 1000 && $3 != 65534) || $3 == 0) print $1}' /etc/passwd"
register: users
-
+
+ - name: Add sudo-NOPASSWD to users
+ loop: "{{ users.stdout_lines }}"
+ ansible.builtin.lineinfile:
+ path: /etc/sudoers
+ state: present
+ insertafter: EOF
+ line: "{{ item }} ALL=(ALL) NOPASSWD: ALL"
+ validate: /usr/sbin/visudo -cf %s
+
- name: Initialize Gef for all users
ansible.builtin.script: /opt/gef/scripts/gef.sh
become_user: "{{ item }}"
loop: "{{ users.stdout_lines }}"
- - name: Copying over bashrc file to all users
+ - name: Copying over zsh functions file for all users
ansible.builtin.copy:
- src: /tmp/master-bashrc
- dest: "~{{ item }}/.bashrc"
+ src: "{{ zsh_func }}"
+ dest: "~{{ item }}/.zsh_functions"
owner: "{{ item }}"
group: "{{ item }}"
mode: '0640'
loop: "{{ users.stdout_lines }}"
- - name: Copying over bash functions file for all users
- ansible.builtin.copy:
- src: /tmp/master-bash_functions
- dest: "~{{ item }}/.bash_functions"
+ - name: Enabling zsh functions
+ loop: "{{ users.stdout_lins }}"
+ ansible.builtin.blockinfile:
+ path: "~{{ item }}/.zshrc"
+ state: present
+ insertafter: EOF
owner: "{{ item }}"
- group: "{{ item }}"
- mode: '0640'
- loop: "{{ users.stdout_lines }}"
-
+ block: |
+ if [ -f ~/.zsh_functions ]; then
+ source ~/.zsh_functions
+ fi
+
- name: Copying over tmux config to all users
ansible.builtin.copy:
- src: /tmp/master-tmux_conf
+ src: "{{ tmux }}"
dest: "~{{ item }}/.tmux.conf"
owner: "{{ item }}"
group: "{{ item }}"