master
Raw Download raw file
  1---
  2- hosts: OSCp
  3  gather_facts: False
  4  tasks: 
  5  - raw: sudo apt install -y python aptitude
  6
  7- hosts: oscp
  8  tasks:
  9
 10  - name: create folders
 11    file: 
 12      path: "{{ item }}"
 13      state: directory
 14    with_items:
 15    - ~/vpn/
 16    - ~/git/
 17
 18  - name: deploy openvpn files
 19    copy:
 20      src: "{{ item }}" 
 21      dest: ~/vpn 
 22      mode: 0400
 23    with_items:
 24    - OS-27706-PWK.ovpn
 25    - oscp.passwd
 26
 27  - name: apt ppa repos
 28    apt_repository:
 29      repo: "{{ item }}"
 30      state: present
 31    become: True
 32    with_items:
 33    # msf framework apt repos, seriously... get your shit together
 34    # get it all together, and put it in a backpack all your shit, 
 35    # so it's together.  and if you got to take it somewhere, 
 36    # take it somewhere, you know, take it to the shit store and sell it, 
 37    # or put it in shit museum i dont care what you do, you just got 
 38    # to get it together. 
 39    # Get you shit together.
 40    - deb [trusted=yes] http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid main
 41    - ppa:mrazavi/openvas
 42    - ppa:ricotz/unstable
 43
 44  - name: add i386 arch (for wine)
 45    command:
 46      dpkg --add-architecture i386
 47    become: True
 48
 49  - name: apt upgrade
 50    apt: 
 51      update_cache: True
 52      cache_valid_time: 3600
 53      upgrade: safe
 54      allow_unauthenticated: True # msf framework ಠ_ಠ  
 55    become: True
 56
 57  - name: apt packages
 58    apt:
 59      name: "{{ item }}"
 60      state: latest
 61      update_cache: True
 62      cache_valid_time: 3600
 63      autoremove: True
 64      allow_unauthenticated: True # msf framework ಠ_ಠ  
 65    become: True
 66    with_items:
 67    # personal
 68    - htop
 69    - vim
 70    - bmon
 71    # oscp requirements
 72    - openvpn
 73    - mtr
 74    - netcat-traditional
 75    - nmap # and ncat
 76    - onesixtyone
 77    - nbtscan
 78    - snmp # and snmpcheck
 79    - whois
 80    - gdb
 81    - build-essential
 82    - libc6-dev-i386
 83    - mingw-w64
 84    - wine2.0
 85    - openjdk-8-jre-headless
 86    - openjdk-8-jdk-headless
 87    - atftpd
 88    - sqlmap
 89    - cewl
 90    - john
 91    - medusa
 92    - hydra
 93    - socat
 94    - cadaver
 95    - smbclient
 96    # documentation
 97    - pandoc
 98    - texlive-xetex
 99    # openvas
100    - sqlite3
101    - openvas
102    # metasploit
103    - metasploit-framework
104    # pwntools
105    - python2.7
106    - python-pip
107    - python-dev
108    - git
109    - libssl-dev
110    - libffi-dev
111
112  - name: pip packages
113    pip:
114      name: "{{ item }}"
115      state: latest
116    become: yes
117    with_items:
118    - pip
119    - pwntools
120    - pyinstaller
121    - httplib2 # fimap
122
123
124
125  - name: update alternatives
126    alternatives:
127      name: nc
128      path: /bin/nc.traditional
129    become: True
130  
131  - name: git repos (tools)
132    git: 
133      repo: "{{ item.repo }}"
134      dest: "{{ item.dest }}" 
135    become: True
136    with_items:
137      - {"repo": "https://github.com/byt3bl33d3r/pth-toolkit.git",
138         "dest": "/opt/pth-toolkit"}
139      - {"repo": "https://github.com/maurosoria/dirsearch.git",
140         "dest": "/opt/dirsearch"}
141      - {"repo": "https://github.com/offensive-security/exploit-database.git",
142         "dest": "/opt/exploit-database"}
143      - {"repo": "https://github.com/byt3bl33d3r/pth-toolkit.git",
144         "dest": "/opt/pth-toolkit"}
145      - {"repo": "https://github.com/kurobeats/fimap.git",
146         "dest": "/opt/fimap/"}
147
148  - name: git repos - create symlinks
149    file:
150      state: link
151      src: "{{ item.src }}"
152      dest: "{{ item.dest }}"
153    become: True
154    with_items:
155      - {"dest": "/usr/local/bin/pth-net", "src": "/opt/pth-toolkit/pth-net"}
156      - {"dest": "/usr/local/bin/pth-smbclient", "src": "/opt/pth-toolkit/pth-smbclient"}
157      - {"dest": "/usr/local/bin/pth-rpcclient", "src": "/opt/pth-toolkit/pth-rpcclient"}
158      - {"dest": "/usr/local/bin/pth-smbget", "src": "/opt/pth-toolkit/pth-smbget"}
159      - {"dest": "/usr/local/bin/pth-winexe", "src": "/opt/pth-toolkit/pth-winexe"}
160      - {"dest": "/usr/local/bin/pth-wmic", "src": "/opt/pth-toolkit/pth-wmic"}
161      - {"dest": "/usr/local/bin/pth-wmis", "src": "/opt/pth-toolkit/pth-wmis"}
162      - {"dest": "/usr/local/bin/dirsearch", "src": "/opt/dirsearch/dirsearch.py"}
163      - {"dest": "/usr/local/bin/searchsploit", "src": "/opt/exploit-database/searchsploit"}
164      - {"dest": "/usr/local/bin/fimap", "src": "/opt/fimap/src/fimap.py"}
165
166         
167  - name: create windows binaries folder
168    file: 
169      path: /usr/share/windows-biniaries/
170      state: directory
171      mode: 0755
172    become: True
173  - name: deploy windows binaries
174    unarchive:
175      src: http://git.kali.org/gitweb/?p=packages/windows-binaries.git;a=snapshot;h=refs/heads/master;sf=tgz
176      dest: /usr/share/windows-biniaries
177      extra_opts: ['--strip-components=1', '--show-stored-names'] # magic fu to make it deploy to the dir we want
178      remote_src: True 
179    become: True
180
181  - name: systemd openvas services
182    systemd:
183      name: "{{ item }}"
184      state: started
185    with_items:
186    - openvas-scanner
187    - openvas-manager
188    - openvas-gsa
189
190    #  - name: openvas startup commands
191    #    command: "{{ item }}" 
192    #    become: True
193    #    with_items:
194    #    - openvas-nvt-sync
195    #    - openvasmd --rebuild
196  
197  - name: vim setup
198    git: 
199      repo: "{{ item.repo }}"
200      dest: "{{ item.dest }}" 
201    with_items:
202      - {"repo": "https://github.com/VundleVim/Vundle.vim.git",
203         "dest": "~/.vim/bundle/Vundle.vim"}
204      - {"repo": "https://github.com/bryfry/home.git",
205         "dest": "~/.home"}
206
207  - name: vimrc symlink
208    file: 
209      src: ~/.home/vimrc 
210      dest: ~/.vimrc
211      state: link
212