-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvol_script.sh
70 lines (60 loc) · 1.38 KB
/
vol_script.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
#!/usr/bin/env bash
# for debug
exec 5> debug_output.txt
BASH_XTRACEFD="5"
PS4='$LINENO: '
set -x
if [ -z "$1" -o "$1" == "-h" ]; then
printf "usage:\n"
printf "\t$ vol_script.sh [imagename] [OS_profile]"
exit 1
fi
imagename=$1
profile="--profile=$2"
result_dir="result"
plugins=(
"pslist"
"pstree"
"psscan"
"netscan"
"connscan"
"dlllist"
"getsids"
"cmdscan"
"consoles"
"hivelist"
"malsysproc"
"sockscan"
"svcscan --verbose"
"malfind"
"userassist --output=text"
"shimcache --output=text"
"shellbags --output=text"
"prefetchparser"
"uninstallinfo"
"firefoxhistory"
"chromehistory"
"autoruns"
)
if [ ! -e ${result_dir} ]; then
mkdir "${result_dir}"
fi
# Proceed vol.py plugins
for var in "${plugins[@]}"
do
echo "${var}......"
vol.py -f ${imagename} ${profile} ${var} | tee "${result_dir}/${var}.txt"
echo "Done!"
echo ""
done
vol.py -f ${imagename} ${profile} shimcache | tee "${result_dir}/shimcache.txt"
cat shimcache.txt | awk '/^[0-9]{4}/{ if ($4 != "") print $0 | "sort -k4" }' > shimcache-sorted.txt
# Extract memory timeline
echo "Memory timeline......"
vol.py -f ${imagename} ${profile} timeliner --output=body > timelines.txt
vol.py -f ${imagename} ${profile} shellbags --output=body >> timelines.txt
vol.py -f ${imagename} ${profile} mftparser --output=body >> timelines.txt
mactime -b timelines.txt -z Japan > timelines.csv
echo ""
echo ""
echo "FINISHED!!!"