/usr/sbin/update-grr-client-templates is in grr-client-templates-installer 3.1.0.2+dfsg-4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
set -eu
baseurl=https://raw.githubusercontent.com/google/grr/v3.1.0.2
destdir=/usr/share/grr-server/
workdir=""
usagetext="\
Usage: $0 [ options ]
-d, --destdir
Set base download directory (default: $destdir)
-u, --baseurl
Set Base URL (default: $baseurl)
-w, --workdir
Set working directory (default: temporary directory)
-h, --help
This help
"
rc=$(getopt -n "$0" -s sh -o u:d:w:h --longoptions baseurl:,destdir:,workdir:,help -- "$@")
eval set -- "$rc"
while true; do
case $1 in
-d|--destdir) destdir="$2"; shift 2 ;;
-u|--baseurl) baseurl="$2"; shift 2 ;;
-w|--workdir) workdir="$2"; shift 2 ;;
-h|--help)
echo "$usagetext" >&2
exit 0 ;;
--)
shift
break ;;
*)
cat <<EOF >&2
$0: $1: Unknown option
$usagetext
EOF
exit 1 ;;
esac
done
if [ -z "$workdir" ]; then
workdir=$(mktemp -d grr-client-download.XXXXXXXX)
trap 'rm -rf $workdir' EXIT
else
mkdir -p "$workdir"
workdir="$(realpath "$workdir")"
fi
echo "Working directory: $workdir"
download() {
local src="$1"
local dest="${2:-$src}"
test -z "$dest" && dest="$src"
mkdir -p "$(dirname "$dest")"
wget -c -O "$dest" "$baseurl/$src"
}
cd "$workdir"
echo "Downloading grr-response-template Python package ..."
wget -c https://storage.googleapis.com/releases.grr-response.com/grr-response-templates-3.1.0.post2.tar.gz
# python -mpip install --system --prefix="$(pwd)" grr-response-templates-3.1.0.post2.tar.gz
tar -xzf grr-response-templates-3.1.0.post2.tar.gz \
grr-response-templates-3.1.0.post2/components/ \
grr-response-templates-3.1.0.post2/templates/
mv grr-response-templates-3.1.0.post2 grr-response-templates
echo "Downloading extra binaries from GRR 3.1.0.2 Github repository ..."
download "executables/windows/GRRNanny_Win32.exe"
download "executables/windows/GRRNanny_x64.exe"
download "executables/windows/templates/unzipsfx/unzipsfx-amd64.exe"
download "executables/windows/templates/unzipsfx/unzipsfx-i386.exe"
download "binaries/OSXPMem-ng-signed.tar.gz" \
"resources/MacPmem.kext.tgz"
download "binaries/winpmem_amd64_1.6.1.sys" \
"resources/WinPmem/winpmem_x64.sys"
download "binaries/winpmem_i386_1.6.1.sys" \
"resources/WinPmem/winpmem_x86.sys"
echo "Installing downloaded binaries to $destdir ..."
mkdir -p "$destdir"
cp -r -t "$destdir" executables resources grr-response-templates
|