This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
/
deploy.sh
executable file
·122 lines (80 loc) · 2.86 KB
/
deploy.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
#!/bin/bash
is_first_run=false
# ========================= Setup external tools =========================
if [ ! -f yara/yara ] || [ ! -f chkrootkit/chkrootkit ] ; then
is_first_run=true
if [ -f /etc/redhat-release ]; then
sudo yum -y install wget
fi
if [ -f /etc/lsb-release ]; then
sudo apt-get install wget
fi
fi
if [ ! -f yara/yara ]; then
if [ -f /etc/redhat-release ]; then
echo "Installing dependencies for yara/CentOS..."
# YARA
sudo yum -y install automake libtool make gcc
fi
if [ -f /etc/lsb-release ]; then
echo "Installing dependencies for yara/Ubuntu..."
# YARA
sudo apt-get install -y automake libtool make gcc
fi
# Build YARA from source
rm master.tar.gz
wget https://github.com/VirusTotal/yara/archive/master.tar.gz -O master.tar.gz
tar -zxf master.tar.gz
mv yara-master yara
cd yara
./bootstrap.sh
./configure
make # build without install. we'll use the binaries directly.
cd ..
fi
if [ ! -f chkrootkit/chkrootkit ] ; then
if [ -f /etc/redhat-release ]; then
echo "Installing dependencies for chkrootkit/CentOS..."
# NETSTAT
sudo yum -y install net-tools
fi
if [ -f /etc/lsb-release ]; then
echo "Installing dependencies for chkrootkit/Ubuntu..."
# NETSTAT
sudo apt-get install -y net-tools
fi
# Build chkrootkit from source
rm master.tar.gz
wget https://github.com/omri9741/chkrootkit/archive/master.tar.gz -O master.tar.gz
tar -zxf master.tar.gz
mv chkrootkit-master chkrootkit
rm master.tar.gz
cd chkrootkit
make sense
cd ..
fi
# ========================= Install Python pip if needed =========================
if [ ! -x "$(command -v pip3)" ] && [ ! -x "$(command -v pip3.6)" ]; then
echo "python3/pip not installed! installing pip..."
is_first_run=true
if [ -f /etc/redhat-release ]; then
sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm
sudo yum -y install gcc python36-devel python36-pip
fi
if [ -f /etc/lsb-release ]; then
sudo apt-get install -y python3 python3-pip
fi
fi
# ========================= 1st run =========================
if [ "$is_first_run" = true ] ; then
# ========================= Install requirements =========================
# First try to install while ignoring conflicts in order to avoid any errors
sudo python3 -m pip install --ignore-installed -r requirements.txt
sudo python3 -m pip install -r requirements.txt
# ========================= Update YARA signatures =========================
echo -e "\033[33m[*] fetching up-to-date yara signatures...\033[0m"
./update_signatures.sh
fi
# ========================= Start Linux Expl0rer =========================
echo -e "\033[33m[*] starting Linux Expl0rer...\033[0m"
sudo python3 linux_explorer.py