-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·49 lines (38 loc) · 1.59 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·49 lines (38 loc) · 1.59 KB
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
#!/bin/bash
#
# Dependency installer for ProcessFuzzyHash (Volatility 3 / Python 3).
#
# It installs the system libraries, creates a virtualenv and installs
# Volatility 3 plus the fuzzy-hash backends used by the plugin.
#
# The original Volatility 2.6 installer (Python 2.7 + jessie-backports) is
# preserved on the `volatility2-latest` branch.
#
# Override the virtualenv location with: VENV=/path/to/venv ./setup.sh
set -e
VENV="${VENV:-$HOME/.venv-vol3}"
PLUGIN_DIR="$(cd "$(dirname "$0")" && pwd)"
echo "[*] Installing system dependencies (sudo may prompt for a password)..."
sudo apt-get update
sudo apt-get install -y \
build-essential cmake git \
python3 python3-dev python3-venv python3-pip \
libfuzzy-dev libffi-dev ssdeep
echo "[*] Creating a virtualenv at: $VENV"
python3 -m venv "$VENV"
"$VENV/bin/pip" install --upgrade pip wheel
echo "[*] Installing required Python 3 packages..."
# volatility3: the framework; pefile: PE parsing; python-tlsh & ssdeep: hashing.
# (dcfldd is bundled with the plugin -- pure Python, no dependency.)
"$VENV/bin/pip" install volatility3 pefile python-tlsh ssdeep
echo "[*] Installing optional sdhash backend (fuzzyhashlib)..."
"$VENV/bin/pip" install fuzzyhashlib || \
echo " [!] fuzzyhashlib (sdhash) failed to install; the other algorithms still work."
cat <<EOF
Done!
Run the plugin with the virtualenv's interpreter, e.g.:
$VENV/bin/vol -p "$PLUGIN_DIR" -f memory.dmp processfuzzyhash \\
--mode pe --algorithm ssdeep --name svchost.exe
Available algorithms: ssdeep, tlsh, dcfldd (bundled) and -- if fuzzyhashlib
installed above -- sdhash.
EOF