aboutsummaryrefslogtreecommitdiff
path: root/roles/sliver-c2/tasks/sliver_install.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/sliver-c2/tasks/sliver_install.yaml')
-rw-r--r--roles/sliver-c2/tasks/sliver_install.yaml35
1 files changed, 35 insertions, 0 deletions
diff --git a/roles/sliver-c2/tasks/sliver_install.yaml b/roles/sliver-c2/tasks/sliver_install.yaml
new file mode 100644
index 0000000..3f0e029
--- /dev/null
+++ b/roles/sliver-c2/tasks/sliver_install.yaml
@@ -0,0 +1,35 @@
+- name: import sliver gpg key
+ shell: |
+ gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 4449039C
+
+- name: get latest sliver-server binary URL
+ shell: |
+ curl -sSLf https://api.github.com/repos/BishopFox/sliver/releases/latest \
+ | grep -i browser_download_url \
+ | grep -i sliver-server_linux \
+ | grep -v sig \
+ | head -1 \
+ | cut -d '"' -f 4
+ register: sliver_url
+ changed_when: false
+
+- name: create sliver directory
+ file:
+ path: "{{ install_path }}"
+ state: directory
+ mode: '0755'
+
+- name: download sliver-server binary
+ get_url:
+ url: "{{ sliver_url.stdout }}"
+ dest: "{{ install_path }}/sliver-server"
+ mode: '0755'
+
+- name: symlink sliver binaries
+ file:
+ src: "{{ install_path }}/{{ item }}"
+ dest: "/usr/local/bin/{{ item }}"
+ state: link
+ force: true
+ loop:
+ - sliver-server