-
Notifications
You must be signed in to change notification settings - Fork 2
/
attacker.yml
236 lines (195 loc) · 5.25 KB
/
attacker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
---
- hosts: localhost
any_errors_fatal: true
gather_facts: no
tasks:
- name: Update the machine
tags: upd
yum:
update_only: yes
- name: Install General Essential packages
tags: essentials
yum:
name:
- nano
- net-tools
- tcpdump
- nmap
- wireshark
- git
- wget
- iproute
- psmisc
- yum-utils
- chrony
- telnet
- iptables-services
- gcc
- scl-utils
- centos-release-scl
- hping3
state: present
- name: install several packages after deleting iptables
tags: iptables
yum:
name:
- iptables
- iproute
- dhclient
- plymouth
- initscripts
- kbd
- kexec-tools
- dracut
- firewalld
- iptables-services
- mlocate
state: present
- name: configure NTP
tags: NTP
shell: |
updatedb
timedatectl set-ntp true
timedatectl set-timezone Europe/Berlin
- name: Install essential Packages to run "thc-ipv6" repo Toolkit
tags: thc
yum:
name:
- libpcap-devel
- openssl-devel
- libnetfilter_queue-devel
- gcc
state: present
- name: Clone thc-ipv6 github repository
tags: thc
git:
repo: https://github.com/vanhauser-thc/thc-ipv6.git
dest: /root/hacker-tool
clone: yes
update: yes
- name: Play around withing the repo
tags: thc
shell: make all && make install
args:
chdir: /root/hacker-tool
- name: Create attack script
tags: thc
ansible.builtin.template:
src: /root/DS-Lite_Test_Bed/files/attack.txt
dest: /root/attack.sh
owner: root
mode: '755'
- name: install several essential packages for thc-hydra
tags: hydra
yum:
name:
- dnf
- libssh-devel
- pcre-devel
- gtk2-devel
- mariadb-devel
- postgresql-devel
- libsvm-devel
- libgcrypt-devel
- desktop-file-utils
state: present
- name: Clone "thc-hydra" github repository
tags: hydra
git:
repo: https://github.com/vanhauser-thc/thc-hydra
dest: /root/hydra
clone: yes
update: yes
- name: Play around withing the repo
tags: hydra
shell: |
dnf --enablerepo=powertools install libidn-devel -y
./configure
make
make install
args:
chdir: /root/hydra
- name: Create hydra attack script
tags: hydra
ansible.builtin.template:
src: /root/DS-Lite_Test_Bed/files/attack-2.txt
dest: /root/attack-2.sh
owner: root
mode: '755'
- name: Download the pre-compiled version of Dns64perf++ tool
tags: dns64
shell: wget rs1.sze.hu/~lencse/p101-dns64perfpp-a.tgz
args:
chdir: /root/
- name: extract the compressed file
tags: dns64
shell: tar -xvf p101-dns64perfpp-a.tgz
args:
chdir: /root/
- name: install several essential packages for dns64
tags: dns64
yum:
name:
- centos-release-scl
- llvm-toolset-7
state: present
# in case of erros while running the last module: -
# make
# make -std=c++1y -pedantic
# make install
# make install -std=c++1y -pedantic
- name: Play around within the repo
tags: dns64
shell: |
scl enable llvm-toolset-7 bash
yum install clang -y
make
sleep 5 # wait till make stuff is finished
make install
args:
chdir: /root/dns64perfpp-a
- name: Create dns64perf++ attacking script
tags: dns64
ansible.builtin.template:
src: /root/DS-Lite_Test_Bed/files/attack-3.txt
dest: /root/attack-3.sh
owner: root
mode: '755'
- name: Solve an issue of "GLIBCXX_3.4.21 not found" part 1
tags: dns64
shell: |
wget https://repo.anaconda.com/archive/Anaconda3-2019.07-Linux-x86_64.sh
args:
chdir: /root/
- name: Solve an issue of "GLIBCXX_3.4.21 not found" part 2
tags: dns64
shell: |
sh Anaconda3-2019.07-Linux-x86_64.sh
cp anaconda3/lib/libstdc++.so.6.0.26 /usr/lib64
rm /usr/lib64/libstdc++.so.6
ln -s /usr/lib64/libstdc++.so.6.0.26 /usr/lib64/libstdc++.so.6
args:
chdir: /root/
- name: Solve an issue of "too many open files" part 1 insert line "/etc/security/limits.conf"
tags: files
lineinfile:
path: /etc/security/limits.conf
regexp: '^#<domain> <type> <item> <value>'
line: "#<domain> <type> <item> <value> \nroot hard nofile 1000000"
- name: Add or modify nofile hard limit for the root user
tags: files
pam_limits:
domain: root
limit_type: hard
limit_item: nofile
value: 64000
- name: Solve an issue of "too many open files" part 2
tags: files
shell: ulimit -n 65536
- name: Create auto-script to automate dns64perf++ Attack
tags: script
ansible.builtin.template:
src: /root/DS-Lite_Test_Bed/files/auto-attack.txt
dest: /root/auto-attack.sh
owner: root
mode: '755'