This repository has been archived by the owner on Jul 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathinteractive-adhd-install.sh
executable file
·1295 lines (1131 loc) · 32.8 KB
/
interactive-adhd-install.sh
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
echo
echo '#################################'
echo '# WARNING:'
echo '# The domain pometheaninfosec.com is owned by this projects old '
echo '# maintainer... You should NOT install this project at this time'
echo '#################################
exit
## GLOBALS ##
# holds whether each tool selected or not
## this is ugly and i hate it but i can't figure it
## out right now how to loop and fill
declare -a TOOLS=(
"false" "false" "false" "false" "false" "false" "false" "false" "false" "false"
"false" "false" "false" "false" "false" "false" "false" "false" "false" "false"
"false" "false" "false" "false" "false" "false" "false" "false" "false" "false"
"false" "false" "false" "false" "false" "false" "false" "false" "false" "false"
"false" "false" "false" )
# the total number of tools
NUM_TOOLS=42
# the number of tools selected
TOOL_COUNT=0
# constant variable for each tool to access the tool set
ARTILLERY=1
BEARTRAP=2
BEEF=3
COWRIE=4
CREEPY=5
CRYPTOLOCKED=6
DECLOAK=7
DEFENSEBYNUMBERS=8
DENYHOSTS=9
DOCZPY=10
GCATPOC=11
GCAT=12
GHOSTWRITING=13
HONEYBADGER=14
HONEYPORTS=15
HUMANPY=16
INVISIPORT=17
JARCOMBINER=18
JAVAWEBATTACK=19
KIPPO=20
LOCKDOWN=21
NOVA=22
OPENBAC=23
OSCHAMELEON=24
PHPHTTPTARPIT=25
PORTSPOOF=26
PSAD=27
RECONNG=28
REMUX=29
RUBBERGLUE=30
SIDEJACK=31
SIMPLEPIVOTDETECT=32
SPIDERTRAP=33
SQLITEBUGSERVER=34
SWEEPER=35
TALOS=36
TCPROOTER=37
WEBBUGSERVER=38
WEBLABYRINTH=39
WHOSTHERE=40
WINDOWSTOOLS=41
WORDPOT=42
OPENCANARY=43
# colors
GREEN='\033[1;32m'
NC='\033[0m'
YELLOW='\033[1;33m'
## Get ubuntu version number ##
ubuntu_version=`lsb_release -a 2>/dev/null | grep release -i | cut -f2`
if [ -z "$ubuntu_version" ]; then ubuntu_version="15.10"; fi
## FUNCTIONS ##
select_tools ()
{
# clear the screen
tput clear
# grab the current size of the terminal
# adjust measurements as screen is resized
## i would like to make these more dynamic.
cols=$(tput cols)
# positions for the headers
let center=${cols}/2
let head1_center=${center}-5
let head2_center=${center}-7
# space between the columns
let col_space=(${cols}-45)/4
# the indent for each column
let col1_ind=${col_space}
let col2_ind=${col_space}*2+15
let col3_ind=${col_space}*3+30
# indents for the bottom row
let bot_col1_ind=${col1_ind}/2
let bot_col2_ind=(${col2_ind}-${col1_ind})/2+${col1_ind}
let bot_col3_ind=(${col3_ind}-${col2_ind})/2+${col2_ind}
# Set the headings
# move cursor to screen location (y,x)
tput cup 3 ${head1_center}
echo -e "${YELLOW}ADHD 0.7.1${NC}"
tput sgr0
tput cup 5 ${head2_center}
echo -e "${YELLOW}Welcome to ADHD${NC}"
tput sgr0
# write the options
# check if the tool is selected so it can be highlighted green
# first column
tput cup 7 ${col1_ind}
if [ "${TOOLS[ARTILLERY]}" == "true" ]
then
echo -e "${GREEN}${ARTILLERY}) Artillery${NC}"
else
echo "${ARTILLERY}) Artillery"
fi
tput cup 8 ${col1_ind}
if [ "${TOOLS[BEARTRAP]}" == "true" ]
then
echo -e "${GREEN}${BEARTRAP}) BearTrap${NC}"
else
echo "${BEARTRAP}) BearTrap"
fi
tput cup 9 ${col1_ind}
if [ "${TOOLS[BEEF]}" == "true" ]
then
echo -e "${GREEN}${BEEF}) BeEF${NC}"
else
echo "${BEEF}) BeEF"
fi
tput cup 10 ${col1_ind}
if [ "${TOOLS[COWRIE]}" == "true" ]
then
echo -e "${GREEN}${COWRIE}) Cowire${NC}"
else
echo "${COWRIE}) Cowire"
fi
tput cup 11 ${col1_ind}
if [ "${TOOLS[CREEPY]}" == "true" ]
then
echo -e "${GREEN}${CREEPY}) Creepy${NC}"
else
echo "${CREEPY}) Creepy"
fi
tput cup 12 ${col1_ind}
if [ "${TOOLS[CRYPTOLOCKED]}" == "true" ]
then
echo -e "${GREEN}${CRYPTOLOCKED}) Cryptolocked${NC}"
else
echo "${CRYPTOLOCKED}) Cryptolocked"
fi
tput cup 13 ${col1_ind}
if [ "${TOOLS[DECLOAK]}" == "true" ]
then
echo -e "${GREEN}${DECLOAK}) Decloak${NC}"
else
echo "${DECLOAK}) Decloak"
fi
tput cup 14 ${col1_ind}
if [ "${TOOLS[DEFENSEBYNUMBERS]}" == "true" ]
then
echo -e "${GREEN}${DEFENSEBYNUMBERS}) Defense By Numbers${NC}"
else
echo "${DEFENSEBYNUMBERS}) Defense By Numbers"
fi
tput cup 15 ${col1_ind}
if [ "${TOOLS[DENYHOSTS]}" == "true" ]
then
echo -e "${GREEN}${DENYHOSTS}) DenyHosts${NC}"
else
echo "${DENYHOSTS}) DenyHosts"
fi
tput cup 16 ${col1_ind}
if [ "${TOOLS[DOCZPY]}" == "true" ]
then
echo -e "${GREEN}${DOCZPY}) Docz.py${NC}"
else
echo "${DOCZPY}) Docz.py"
fi
tput cup 17 ${col1_ind}
if [ "${TOOLS[GCATPOC]}" == "true" ]
then
echo -e "${GREEN}${GCATPOC}) GCat-POC${NC}"
else
echo "${GCATPOC}) GCat-POC"
fi
tput cup 18 ${col1_ind}
if [ "${TOOLS[GCAT]}" == "true" ]
then
echo -e "${GREEN}${GCAT}) GCat${NC}"
else
echo "${GCAT}) GCat"
fi
tput cup 19 ${col1_ind}
if [ "${TOOLS[GHOSTWRITING]}" == "true" ]
then
echo -e "${GREEN}${GHOSTWRITING}) Ghostwriting${NC}"
else
echo "${GHOSTWRITING}) Ghostwriting"
fi
tput cup 20 ${col1_ind}
if [ "${TOOLS[HONEYBADGER]}" == "true" ]
then
echo -e "${GREEN}${HONEYBADGER}) Honeybadger${NC}"
else
echo "${HONEYBADGER}) Honeybadger"
fi
# second column
tput cup 7 ${col2_ind}
if [ "${TOOLS[HONEYPORTS]}" == "true" ]
then
echo -e "${GREEN}${HONEYPORTS}) Honeyports${NC}"
else
echo "${HONEYPORTS}) Honeyports"
fi
tput cup 8 ${col2_ind}
if [ "${TOOLS[HUMANPY]}" == "true" ]
then
echo -e "${GREEN}${HUMANPY}) Human.py${NC}"
else
echo "${HUMANPY}) Human.py"
fi
tput cup 9 ${col2_ind}
if [ "${TOOLS[INVISIPORT]}" == "true" ]
then
echo -e "${GREEN}${INVISIPORT}) Invisiport${NC}"
else
echo "${INVISIPORT}) Invisiport"
fi
tput cup 10 ${col2_ind}
if [ "${TOOLS[JARCOMBINER]}" == "true" ]
then
echo -e "${GREEN}${JARCOMBINER}) Jar-Combiner${NC}"
else
echo "${JARCOMBINER}) Jar-Combiner"
fi
tput cup 11 ${col2_ind}
if [ "${TOOLS[JAVAWEBATTACK]}" == "true" ]
then
echo -e "${GREEN}${JAVAWEBATTACK}) Java Web Attack${NC}"
else
echo "${JAVAWEBATTACK}) Java Web Attack"
fi
tput cup 12 ${col2_ind}
if [ "${TOOLS[KIPPO]}" == "true" ]
then
echo -e "${GREEN}${KIPPO}) Kippo${NC}"
else
echo "${KIPPO}) Kippo"
fi
tput cup 13 ${col2_ind}
if [ "${TOOLS[LOCKDOWN]}" == "true" ]
then
echo -e "${GREEN}${LOCKDOWN}) Lockdown${NC}"
else
echo "${LOCKDOWN}) Lockdown"
fi
tput cup 14 ${col2_ind}
if [ "${TOOLS[NOVA]}" == "true" ]
then
echo -e "${GREEN}${NOVA}) Nova${NC}"
else
echo "${NOVA}) Nova"
fi
tput cup 15 ${col2_ind}
if [ "${TOOLS[OPENBAC]}" == "true" ]
then
echo -e "${GREEN}${OPENBAC}) OpenBAC${NC}"
else
echo "${OPENBAC}) OpenBAC"
fi
tput cup 16 ${col2_ind}
if [ "${TOOLS[OSCHAMELEON]}" == "true" ]
then
echo -e "${GREEN}${OSCHAMELEON}) Oschameleon${NC}"
else
echo "${OSCHAMELEON}) Oschameleon"
fi
tput cup 17 ${col2_ind}
if [ "${TOOLS[PHPHTTPTARPIT]}" == "true" ]
then
echo -e "${GREEN}${PHPHTTPTARPIT}) PHP-HTTP-Tarpit${NC}"
else
echo "${PHPHTTPTARPIT}) PHP-HTTP-Tarpit"
fi
tput cup 18 ${col2_ind}
if [ "${TOOLS[PORTSPOOF]}" == "true" ]
then
echo -e "${GREEN}${PORTSPOOF}) Portspoof${NC}"
else
echo "${PORTSPOOF}) Portspoof"
fi
tput cup 19 ${col2_ind}
if [ "${TOOLS[PSAD]}" == "true" ]
then
echo -e "${GREEN}${PSAD}) PSAD${NC}"
else
echo "${PSAD}) PSAD"
fi
tput cup 20 ${col2_ind}
if [ "${TOOLS[RECONNG]}" == "true" ]
then
echo -e "${GREEN}${RECONNG}) Recon-ng${NC}"
else
echo "${RECONNG}) Recon-ng"
fi
# third column
tput cup 7 ${col3_ind}
if [ "${TOOLS[REMUX]}" == "true" ]
then
echo -e "${GREEN}${REMUX}) Remux${NC}"
else
echo "${REMUX}) Remux"
fi
# third column
tput cup 8 ${col3_ind}
if [ "${TOOLS[RUBBERGLUE]}" == "true" ]
then
echo -e "${GREEN}${RUBBERGLUE}) Rubberglue${NC}"
else
echo "${RUBBERGLUE}) Ruberglue"
fi
tput cup 9 ${col3_ind}
if [ "${TOOLS[SIDEJACK]}" == "true" ]
then
echo -e "${GREEN}${SIDEJACK}) Sidejack${NC}"
else
echo "${SIDEJACK}) Sidejack"
fi
tput cup 10 ${col3_ind}
if [ "${TOOLS[SIMPLEPIVOTDETECT]}" == "true" ]
then
echo -e "${GREEN}${SIMPLEPIVOTDETECT}) Simple-Pivot-Detect${NC}"
else
echo "${SIMPLEPIVOTDETECT}) Simple-Pivot-Detect"
fi
tput cup 11 ${col3_ind}
if [ "${TOOLS[SPIDERTRAP]}" == "true" ]
then
echo -e "${GREEN}${SPIDERTRAP}) Spidertrap${NC}"
else
echo "${SPIDERTRAP}) Spidertrap"
fi
tput cup 12 ${col3_ind}
if [ "${TOOLS[SQLITEBUGSERVER]}" == "true" ]
then
echo -e "${GREEN}${SQLITEBUGSERVER}) SQLite Bug Server${NC}"
else
echo "${SQLITEBUGSERVER}) SQLite Bug Server"
fi
tput cup 13 ${col3_ind}
if [ "${TOOLS[SWEEPER]}" == "true" ]
then
echo -e "${GREEN}${SWEEPER}) Sweeper${NC}"
else
echo "${SWEEPER}) Sweeper"
fi
tput cup 14 ${col3_ind}
if [ "${TOOLS[TALOS]}" == "true" ]
then
echo -e "${GREEN}${TALOS}) TALOS${NC}"
else
echo "${TALOS}) TALOS"
fi
tput cup 15 ${col3_ind}
if [ "${TOOLS[TCPROOTER]}" == "true" ]
then
echo -e "${GREEN}${TCPROOTER}) TCPRooter${NC}"
else
echo "${TCPROOTER}) TCPRooter"
fi
tput cup 16 ${col3_ind}
if [ "${TOOLS[WEBBUGSERVER]}" == "true" ]
then
echo -e "${GREEN}${WEBBUGSERVER}) Web Bug Server${NC}"
else
echo "${WEBBUGSERVER}) Web Bug Server"
fi
tput cup 17 ${col3_ind}
if [ "${TOOLS[WEBLABYRINTH]}" == "true" ]
then
echo -e "${GREEN}${WEBLABYRINTH}) Weblabyrinth${NC}"
else
echo "${WEBLABYRINTH}) Weblabyrinth"
fi
tput cup 18 ${col3_ind}
if [ "${TOOLS[WHOSTHERE]}" == "true" ]
then
echo -e "${GREEN}${WHOSTHERE}) Who's There${NC}"
else
echo "${WHOSTHERE}) Who's There"
fi
tput cup 19 ${col3_ind}
if [ "${TOOLS[WINDOWSTOOLS]}" == "true" ]
then
echo -e "${GREEN}${WINDOWSTOOLS}) Windows-Tools${NC}"
else
echo "${WINDOWSTOOLS}) Windows-Tools"
fi
tput cup 20 ${col3_ind}
if [ "${TOOLS[WORDPOT]}" == "true" ]
then
echo -e "${GREEN}${WORDPOT}) Wordpot${NC}"
else
echo "${WORDPOT}) Wordpot"
fi
# bottom row
tput cup 23 ${bot_col1_ind}
echo "99) Quit"
tput cup 23 ${bot_col2_ind}
echo "100) Default Install"
tput cup 23 ${bot_col3_ind}
echo "101) Install Selected Tools"
# prompt user to select tools
tput bold
tput cup 25 15
# selects or unselects a tool
read -p "Which tools to install?: " tool_num
case $tool_num in
[123456789]|1[0123456789]|2[0123456789]|3[0123456789]|4[012])
d=${TOOLS[tool_num]};
if [ "$d" == "false" ];
then
TOOLS[${tool_num}]="true"
let TOOL_COUNT=${TOOL_COUNT}+1
else
TOOLS[${tool_num}]="false"
let TOOL_COUNT=${TOOL_COUNT}-1
fi;
select_tools;;
# not adding tools.
# quiting, installing selected tools, or default install
99|10[01]) return $tool_num;;
# continue for everything else
* ) select_tools;;
esac
}
# perform the default install
default_install()
{
bash -c "$(curl -sL https://raw.githubusercontent.com/adhdproject/buildkit/master/adhd-install.sh)"
}
selected_install ()
{
##User account specification
echo "This script will need to associate a user account with all the tools."
echo "Enter the name of a user account you want associated with the install."
echo "If you enter a new account name... It will be created."
echo -n "Enter account name [adhd]: "
read account
echo
if [ ${#account} == 0 ]; then
account="adhd"
fi
grepout=`grep "^$account:x" /etc/passwd`
if [ ${#grepout} == 0 ]; then
echo
echo "Script is creating user: $account"
adduser $account
adduser $account sudo
fi
#keygen for cowrie
if [ "${TOOLS[COWRIE]}" == "true" ]
then
cd /tmp
echo
echo
echo
echo
echo "####################################"
echo "# Need to generate keys for cowrie #"
echo "####################################"
echo
echo
ssh-keygen -t dsa -b 1024 -f ssh_host_dsa_key
fi
## somehow figure out if apt-get update works
## i needed to apd-get install apt-transport-https
apt-get update
#install git
apt-get -y install git
#general dependencies
apt-get -y install sqlite3 sqlite libmpfr-dev libmpc-dev nmap vim
#dependencies for declaok
apt-get -y install icedtea-8-plugin browser-plugin-freshplayer-pepperflash
cd /
mkdir adhd
cd adhd
mkdir 1-annoyance
mkdir 2-attribution
mkdir 3-absolution
mkdir 4-attack
cd /
if [ "${TOOLS[ARTILLERY]}" == "true" ]
then
ln -s /opt/artillery /adhd/1-annoyance/artillery
fi
if [ "${TOOLS[BEARTRAP]}" == "true" ]
then
ln -s /opt/beartrap /adhd/1-annoyance/beartrap
fi
if [ "${TOOLS[BEEF]}" == "true" ]
then
ln -s /opt/beef /adhd/4-attack/beef
fi
if [ "${TOOLS[COWIRE]}" == "true" ]
then
ln -s /opt/cowrie /adhd/1-annoyance/cowrie
fi
if [ "${TOOLS[CREEPY]}" == "true" ]
then
ln -s /opt/creepy /adhd/2-attribution/creepy
fi
if [ "${TOOLS[CRYPTOLOCKED]}" == "true" ]
then
ln -s /opt/cryptolocked /adhd/1-annoyance/cryptolocked
fi
if [ "${TOOLS[DECLOAK]}" == "true" ]
then
ln -s /opt/decloak /adhd/2-attribution/decloak
fi
if [ "${TOOLS[DEFENSEBYNUMBERS]}" == "true" ]
then
ln -s /opt/defense_by_numbers /adhd/1-annoyance/defense_by_numbers
fi
if [ "${TOOLS[DENYHOSTS]}" == "true" ]
then
ln -s /opt/denyhosts /adhd/1-annoyance/denyhosts
fi
if [ "${TOOLS[DOCZPY]}" == "true" ]
then
ln -s /opt/docz.py /adhd/2-attribution/docz.py
fi
if [ "${TOOLS[GCAT]}" == "true" ]
then
ln -s /opt/gcat /adhd/4-attack/gcat
fi
if [ "${TOOLS[GHOSTWRITING]}" == "true" ]
then
ln -s /opt/ghostwriting /adhd/4-attack/ghostwriting
fi
if [ "${TOOLS[HONEYBADGER]}" == "true" ]
then
ln -s /opt/honeybadger /adhd/2-attribution/honeybadger
ln -s /opt/honeybadgerv2 /adhd/2-attribution/honeybadgerv2
fi
if [ "${TOOLS[HUMANPY]}" == "true" ]
then
ln -s /opt/human.py /adhd/3-absolution/human.py
fi
if [ "${TOOLS[INVISIPORT]}" == "true" ]
then
ln -s /opt/invisiport /adhd/1-annoyance/invisiport
fi
if [ "${TOOLS[JARCOMBINER]}" == "true" ]
then
ln -s /opt/jar-combiner /adhd/2-attribution/jar-combiner
fi
if [ "${TOOLS[JAVAWEBATTACK]}" == "true" ]
then
ln -s /opt/java-web-attack /adhd/4-attack/java-web-attack
fi
if [ "${TOOLS[KIPPO]}" == "true" ]
then
ln -s /opt/kippo /adhd/1-annoyance/kippo
fi
if [ "${TOOLS[LOCKDOWN]}" == "true" ]
then
ln -s /opt/lockdown /adhd/3-absolution/lockdown
fi
if [ "${TOOLS[TALOS]}" == "true" ]
then
ln -s /opt/TALOS /adhd/3-absolution/TALOS
fi
if [ "${TOOLS[NOVA]}" == "true" ]
then
ln -s /opt/nova /adhd/1-annoyance/nova
fi
if [ "${TOOLS[OPENBAC]}" == "true" ]
then
ln -s /opt/OpenBAC /adhd/3-absolution/OpenBAC
fi
if [ "${TOOLS[OSCHAMELEON]}" == "true" ]
then
ln -s /opt/oschameleon /adhd/1-annoyance/oschameleon
fi
if [ "${TOOLS[PHPHTTPTARPIT]}" == "true" ]
then
ln -s /opt/PHP-HTTP-Tarpit /adhd/1-annoyance/PHP-HTTP-Tarpit
fi
if [ "${TOOLS[PORTSPOOF]}" == "true" ]
then
ln -s /opt/portspoof /adhd/1-annoyance/portspoof
fi
if [ "${TOOLS[PSAD]}" == "true" ]
then
ln -s /opt/psad /adhd/1-annoyance/psad
fi
if [ "${TOOLS[RECONNG]}" == "true" ]
then
ln -s /opt/recon-ng /adhd/4-attack/recon-ng
fi
if [ "${TOOLS[REMUX]}" == "true" ]
then
ln -s /opt/remux /adhd/1-annoyance/remux
fi
if [ "${TOOLS[RUBBERGLUE]}" == "true" ]
then
ln -s /opt/rubberglue /adhd/1-annoyance/rubberglue
fi
if [ "${TOOLS[SIDEJACK]}" == "true" ]
then
ln -s /opt/sidejack /adhd/4-attack/sidejack
fi
if [ "${TOOLS[SIMPLEPIVOTDETECT]}" == "true" ]
then
ln -s /opt/simple-pivot-detect /adhd/3-absolution/simple-pivot-detect
fi
if [ "${TOOLS[SQLITEBUGSERVER]}" == "true" ]
then
ln -s /opt/sqlitebugserver /adhd/2-attribution/sqlitebugserver
fi
if [ "${TOOLS[SPIDERTRAP]}" == "true" ]
then
ln -s /opt/spidertrap /adhd/1-annoyance/spidertrap
fi
if [ "${TOOLS[SWEEPER]}" == "true" ]
then
ln -s /opt/sweeper /adhd/3-absolution/sweeper
fi
if [ "${TOOLS[TCPROOTER]}" == "true" ]
then
ln -s /opt/tcprooter /adhd/1-annoyance/tcprooter
fi
if [ "${TOOLS[WEBBUGSERVER]}" == "true" ]
then
ln -s /opt/webbugserver /adhd/2-attribution/webbugserver
fi
if [ "${TOOLS[WEBLABYRINTH]}" == "true" ]
then
ln -s /opt/weblabyrinth /adhd/1-annoyance/weblabyrinth
fi
if [ "${TOOLS[WHOSTHERE]}" == "true" ]
then
ln -s /opt/whosthere /adhd/2-attribution/whosthere
fi
if [ "${TOOLS[WINDOWSTOOLS]}" == "true" ]
then
ln -s /opt/windows-tools /adhd/1-annoyance/windows-tools
fi
if [ "${TOOLS[WORDPOT]}" == "true" ]
then
ln -s /opt/wordpot /adhd/1-annoyance/wordpot
fi
if [ "${TOOLS[OPENCANARY]}" == "true" ]
then
ln -s /opt/opencanary /adhd/3-absolution/opencanary
fi
apt-get -y install python-dev pip
pip install --upgrade pip
if [ $ubuntu_version == "16.04" ]; then
apt-get -y install libapache2-mod-php
apt-get -y install php7.0-mysql
apt-get -y install php7.0-pgsql
apt-get -y install php7.0-sqlite
apt-get -y install php7.0-odbc
apt-get -y install php7.0-curl
apt-get -y install php-zip
fi
if [ $ubuntu_version == "15.10" ]; then
apt-get -y install php5
apt-get -y install php5-mysql
apt-get -y install php5-pgsql
apt-get -y install php5-sqlite
apt-get -y install php5-odbc
fi
echo "127.0.0.1 spy.decloak.net" >> /etc/hosts
#dependencies for oschaemeleon
apt-get -y install python-nfqueue python-gevent python-scapy
#dependencies for whosthere
apt-get -y install golang
#dependencies for cowrie
apt-get -y install libmpfr-dev virtualenv libssl-dev libffi-dev build-essential libpython-dev
apt-get -y install libmpc-dev
pip install twisted[conch] cryptography configparser pyopenssl gmpy2 service_identity pycrypto
apt-get -y install git python-twisted python-configparser python-crypto python-pyasn1 python-gmpy2 python-mysqldb python-zope.interface
#apt-get -y install git virtualenv libmpfr-dev libssl-dev libmpc-dev libffi-dev build-essential libpython-dev
#dependencies for creepy
if [ "${TOOLS[CREEPY]}" == "true" ]
then
apt-get -y install python-qt4 python-pip
pip install pytz python-qt flickrapi python-instagram yapsy tweepy google-api-python-client python-dateutil configobj dominate
fi
#dependencies for TALOS
if [ "${TOOLS[TALOS]}" == "true" ]
then
pip install netaddr
pip install twisted
pip install paramiko
fi
#dependencies for lockdown
if [ "${TOOLS[LOCKDOWN]}" == "true" ]
then
pip install splinter
fi
#dependencies for whosthere
if [ "${TOOLS[WHOSTHERE]}" == "true" ]
then
apt-get -y install golang-go
fi
#dependencies for wordpot
if [ "${TOOLS[WORDPOT]}" == "true" ]
then
pip install flask
fi
#dependencies for beartrap
if [ "${TOOLS[BEARTRAP]}" == "true" ]
then
apt-get -y install ruby
gem install getopt
fi
#dependencies for beef
if [ "${TOOLS[BEEF]}" == "true" ]
then
gem install bundler
apt-get -y install ruby-dev libsqlite3-dev libsqlite-dev
fi
#dependencies for honeyports
if [ "${TOOLS[HONEYPORTS]}" == "true" ]
then
apt-get -y install arpspoof
fi
#decloak
if [ "${TOOLS[DECLOAK]}" == "true" ]
then
apt-get -y install openjdk-7-jdk openjdk-8-jdk haxe
fi
#database mysql
## do we need this for everything?
debconf-set-selections <<< 'mysql-server mysql-server/root_password password adhd'
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password adhd'
apt-get -y install mysql-server
echo "create database weblabyrinth;" | mysql -u root --password=adhd
echo "create database webbug;" | mysql -u root --password=adhd
echo "create user 'webbuguser'@'localhost' identified by 'adhd';" | mysql -u root --password=adhd
echo "create user 'weblabyrinthuser'@'localhost' identified by 'adhd';" | mysql -u root --password=adhd
echo "grant all privileges on weblabyrinth.* to 'weblabyrinthuser'@'localhost';" | mysql -u root --password=adhd
echo "grant all privileges on webbug.* to 'webbuguser'@'localhost';" | mysql -u root --password=adhd
echo "create table weblabyrinth.crawlers (crawler_ip TEXT, crawler_rdns TEXT, crawler_useragent TEXT, first_seen INT(11), last_seen INT(11), last_alert INT(11), num_hits INT(11));" | mysql -u root --password=adhd
echo "create table webbug.requests (id TEXT, type TEXT, ip_address TEXT, user_agent TEXT, time INT(11));" | mysql -u root --password=adhd
#database postgres SOON
apt-get -y install postgresql postgresql-contrib
sudo -u postgres psql -c "CREATE USER decloakuser WITH PASSWORD 'adhd';"
sudo -u postgres psql << EOF
CREATE DATABASE decloak;
\\connect decloak
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: requests; Type: TABLE; Schema: public; Owner: decloakuser; Tablespace:
--
CREATE TABLE requests (
cip character(32),
type character varying(16),
eip character varying(16),
iip character varying(16),
dip character varying(16),
stamp timestamp without time zone DEFAULT now()
);
ALTER TABLE public.requests OWNER TO decloakuser;
--
-- Data for Name: requests; Type: TABLE DATA; Schema: public; Owner: decloakuser
--
COPY requests (cip, type, eip, iip, dip, stamp) FROM stdin;
\.
--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- PostgreSQL database dump complete
--
EOF
# This is where the installing magic happens
# package has filename X
# apt-get -y --force-yest install adhd-X
## I would really like to clean this, be able to
## do a loop with the array of tools and their
## tool names.
# if ! grep -q 'neoadhd' /etc/apt/sources.list; then
# echo "deb https://prometheaninfosec.com/neoadhd ./" >> /etc/apt/sources.list
# fi
apt-get update
if [ "${TOOLS[OPENBAC]}" == "true" ]
then
apt-get -y --force-yes install adhd-OpenBAC
fi
if [ "${TOOLS[PHPHTTPTARPIT]}" == "true" ]
then
apt-get -y --force-yes install adhd-PHP-HTTP-Tarpit
fi
if [ "${TOOLS[TALOS]}" == "true" ]
then
apt-get -y --force-yes install adhd-TALOS
fi
if [ "${TOOLS[ARTILLERY]}" == "true" ]
then
apt-get -y --force-yes install adhd-artillery
fi
if [ "${TOOLS[OPENCANARY]}" == "true" ]
then
apt-get -y --force-yes install adhd-opencanary
fi
if [ "${TOOLS[BEARTRAP]}" == "true" ]
then
apt-get -y --force-yes install adhd-beartrap
fi
if [ "${TOOLS[BEEF]}" == "true" ]
then
apt-get -y --force-yes install adhd-beef
fi
if [ "${TOOLS[COWRIE]}" == "true" ]
then
apt-get -y --force-yes install adhd-cowrie
fi
if [ "${TOOLS[CREEPY]}" == "true" ]
then
apt-get -y --force-yes install adhd-creepy
fi
if [ "${TOOLS[CRYPTOLOCKED]}" == "true" ]
then
apt-get -y --force-yes install adhd-cryptolocked
fi
if [ "${TOOLS[DECLOAK]}" == "true" ]
then
apt-get -y --force-yes install adhd-decloak
fi
if [ "${TOOLS[DEFENSEBYNUMBERS]}" == "true" ]
then
apt-get -y --force-yes install adhd-defense-by-numbers
fi
if [ "${TOOLS[DENYHOSTS]}" == "true" ]
then
apt-get -y --force-yes install adhd-denyhosts
fi
if [ "${TOOLS[DOCZPY]}" == "true" ]
then
apt-get -y --force-yes install adhd-docz.py
fi
if [ "${TOOLS[GCATPOC]}" == "true" ]