Skip to content
Snippets Groups Projects
Commit 439c0a70 authored by Greg DiCristofaro's avatar Greg DiCristofaro
Browse files

updates and TODO at bottom of README

parent b3d4f534
No related branches found
No related tags found
No related merge requests found
......@@ -14,18 +14,14 @@
```
brew tap bell-sw/liberica
```
- Then, you can install this dependency using `brew`. On OS X Big Sur (11.2.x) or later, installation can be done as follows:
- Then, you can install this dependency using `brew`:
```
brew install --cask liberica-jdk8-full
```
for previous versions of OS X:
```
brew cask install liberica-jdk8-full
```
- You will need to set this Java to `JAVA_HOME` with something like:
```
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) && \
echo 'export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)' | tee >> ~/.bashrc >> ~/.zshrc
echo 'export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)' | tee ~/.bash_profile
```
- and properly link it to the OpenJDK location:
```
......@@ -44,15 +40,20 @@
## On Linux (Ubuntu / Debian-based)
*A script to install these dependencies that can be found [here](scripts/install_prereqs_ubuntu.sh).*
- You will need to include some repositories in order to install this software. One way to do that is to uncomment lines in your `sources.list`:
```
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
```
- Use `apt` to install dependencies:
```
sudo apt update && \
sudo apt -y install build-essential autoconf libtool git-core automake && \
sudo apt -y build-dep imagemagick libmagickcore-dev libde265 libheif && \
sudo apt -y install testdisk ant libafflib-dev libewf-dev libpq-dev libvhdi-dev libvmdk-dev git zip zlib1-dev wget && \
sudo apt -y install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x \
gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
sudo apt -y install \
libpq-dev \
ant build-essential autoconf libtool git-core automake git zip wget \
libheif-dev libde265-dev libmagickcore-dev imagemagick \
testdisk libafflib-dev libewf-dev libvhdi-dev libvmdk-dev \
libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x \
gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
```
- You will also need to install Java 8 and JavaFX to run autopsy. We recommend Liberica OpenJDK which can be installed as follows:
```
......@@ -63,10 +64,10 @@
sudo apt -y install bellsoft-java8-full && \
popd
```
- Then, you will need to set this Java to `JAVA_HOME` with something like:
- Then, you will need to set this Java to `JAVA_HOME` with something like:e
```
export JAVA_HOME=/usr/lib/jvm/bellsoft-java8-full-amd64 && \
echo 'export JAVA_HOME=/usr/lib/jvm/bellsoft-java8-full-amd64' | sudo tee >> ~/.bashrc >> ~/.zshrc
echo 'export JAVA_HOME=/usr/lib/jvm/bellsoft-java8-full-amd64' | tee ~/.profile
```
- Finally, you can verify this version of Java with:
```
......@@ -131,4 +132,13 @@
chmod u+x ./unix_setup.sh && \
./unix_setup.sh
```
- At this point, you should be able to run Autopsy with the command `./autopsy` from within the `bin` directory of the extracted folder.
\ No newline at end of file
- At this point, you should be able to run Autopsy with the command `./autopsy` from within the `bin` directory of the extracted folder.
# TODO
- align scripts with README
- open cv issues on linux?
- stalling when not running autopsy as sudo?
- troubleshooting from Running_Linux_OSX.txt
- setup development environment guide
- other installation steps
\ No newline at end of file
......@@ -15,6 +15,8 @@ while getopts "z:i:v:" o; do
i)
INSTALL_DIR=${OPTARG}
;;
v) ASC_FILE=${OPTARG}
;;
*)
usage
exit 1
......@@ -22,33 +24,33 @@ while getopts "z:i:v:" o; do
esac
done
if [[ -z "${AUTOPSY_ZIP_PATH}" ]] || [[ -z "${INSTALL_DIR}" ]]; then
if [[ -z "$AUTOPSY_ZIP_PATH" ]] || [[ -z "$INSTALL_DIR" ]]; then
usage
exit 1
fi
if [[ ! -z "${ASC_FILE}" ]]
if [[ -n "$ASC_FILE" ]]
then
VERIFY_DIR=$(pwd)/temp
mkdir -p ${VERIFY_DIR} && \
pushd ${VERIFY_DIR} && \
wget https://sleuthkit.org/carrier.asc && \
gpg --homedir "${VERIFY_DIR}" --import https://sleuthkit.org/carrier.asc && \
gpgv --homedir "${VERIFY_DIR}" --keyring "${VERIFY_DIR}/pubring.kbx" ${ASC_FILE} ${AUTOPSY_ZIP_PATH} && \
rm -r ${VERIFY_DIR}
popd
KEY_DIR=$VERIFY_DIR/private
mkdir -p $VERIFY_DIR && \
sudo wget -O $VERIFY_DIR/carrier.asc https://sleuthkit.org/carrier.asc && \
mkdir -p $KEY_DIR && \
sudo chmod 600 $KEY_DIR && \
sudo gpg --homedir "$KEY_DIR" --import $VERIFY_DIR/carrier.asc && \
sudo gpgv --homedir "$KEY_DIR" --keyring "$KEY_DIR/pubring.kbx" $ASC_FILE $AUTOPSY_ZIP_PATH && \
sudo rm -r $VERIFY_DIR
if [[ $? -ne 0 ]]
then
popd
echo "Unable to successfully extract $AUTOPSY_ZIP_PATH to $AUTOPSY_EXTRACTED_PATH" >> /dev/stderr
echo "Unable to successfully verify $AUTOPSY_ZIP_PATH with $ASC_FILE" >> /dev/stderr
exit 1
fi
fi
zip_file_name=$(basename -- "$AUTOPSY_ZIP_PATH")
zip_name="${filename%.*}"
AUTOPSY_EXTRACTED_PATH=$INSTALL_DIR/$zip_name
ZIP_FILE_NAME=$(basename -- "$AUTOPSY_ZIP_PATH")
ZIP_NAME="${ZIP_FILE_NAME%.*}"
AUTOPSY_EXTRACTED_PATH=$INSTALL_DIR/$ZIP_NAME
if [[ -d $AUTOPSY_EXTRACTED_PATH || -f $AUTOPSY_EXTRACTED_PATH ]]
then
......@@ -58,10 +60,10 @@ fi
echo "Extracting $AUTOPSY_ZIP_PATH to $AUTOPSY_EXTRACTED_PATH..."
mkdir -p $AUTOPSY_EXTRACTED_PATH && \
unzip $AUTOPSY_ZIP_PATH -d $AUTOPSY_EXTRACTED_PATH
unzip $AUTOPSY_ZIP_PATH -d $INSTALL_DIR
if [[ $? -ne 0 ]]
then
echo "Unable to successfully extract $AUTOPSY_ZIP_PATH to $AUTOPSY_EXTRACTED_PATH" >> /dev/stderr
echo "Unable to successfully extract $AUTOPSY_ZIP_PATH to $INSTALL_DIR" >> /dev/stderr
exit 1
fi
......@@ -73,7 +75,6 @@ chmod u+x ./unix_setup.sh && \
popd
if [[ $? -ne 0 ]]
then
popd
echo "Unable to setup permissions for autopsy binaries" >> /dev/stderr
exit 1
else
......
#!/bin/bash
# for macOS BigSur and later:
# based on https://www.cyberciti.biz/faq/mac-osx-find-tell-operating-system-version-from-bash-prompt/
# and https://superuser.com/questions/1425135/parsing-macos-plist-values
OSX_VERSION_STR=$(defaults read /System/Library/CoreServices/SystemVersion ProductVersion)
if [[[ $OSX_VERSION_STR =~ "([\\d*]])\\.([\\d*])\\.([\\d*])" ]]
then
OSX_MAJOR_VERSION=BASH_REMATCH[1]
OSX_MINOR_VERSION=BASH_REMATCH[2]
OSX_PATCH_VERSION=BASH_REMATCH[3]
else
echo "Unable to determine OS X version!" >> /dev/stderr
exit 1
fi
echo "Installing dependencies..."
# dependencies taken from: https://github.com/sleuthkit/autopsy/pull/5111/files
# brew install postgresql gettext cppunit && \
brew install ant automake libtool afflib libewf libpq testdisk imagemagick gstreamer gst-plugins-base gst-plugins-good imagemagick && \
brew tap bell-sw/liberica
brew install ant automake libtool afflib libewf libpq testdisk imagemagick gstreamer gst-plugins-base gst-plugins-good
if [[ $? -ne 0 ]]
then
echo "Unable to install necessary dependencies" >> /dev/stderr
exit 1
fi
# if BigSur or greater
echo "Installing liberica java 8..."
if ((OSX_MAJOR_VERSION > 11 || (OSX_MAJOR_VERSION == 11 && OSX_MAJOR_VERSION >= 2)))
then
brew install --cask liberica-jdk8-full
else
brew cask install liberica-jdk8-full
fi
brew tap bell-sw/liberica && \
brew install --cask liberica-jdk8-full
if [[ $? -ne 0 ]]
then
echo "Unable to install liberica java" >> /dev/stderr
exit 1
fi
# put this in bash_rc
# put this in bash_profile
# https://stackoverflow.com/questions/22502759/mac-os-x-10-9-setting-permanent-environment-variables
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) && \
echo "Java home is now: $JAVA_HOME" && \
echo 'export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)' | tee >> ~/.bashrc >> ~/.zshrc
echo 'export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)' | tee ~/.bash_profile ~/.bashrc
if [[ $? -ne 0 ]]
then
echo "Unable to properly set up JAVA_HOME." >> /dev/stderr
......
......@@ -3,13 +3,13 @@
# this script requires elevated privileges
# echo "Turning on all repositories for apt..."
# sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
# if [[ $? -ne 0 ]]
# then
# echo "Failed to turn on all repositories" >> /dev/stderr
# exit 1
# fi
echo "Turning on all repositories for apt..."
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
if [[ $? -ne 0 ]]
then
echo "Failed to turn on all repositories" >> /dev/stderr
exit 1
fi
echo "Installing all apt dependencies..."
# other possible dependencies taken from https://github.com/sleuthkit/autopsy/pull/4743/files
......@@ -19,84 +19,84 @@ echo "Installing all apt dependencies..."
# sudo apt -y install autopoint libsqlite3-dev libcppunit-dev
# TODO multi user dependencies?
sudo apt update && \
sudo apt -y install build-essential autoconf libtool git-core automake && \
# sudo apt -y install libheif-dev libde265-dev imagemagick && \
sudo apt -y install build-essential autoconf libtool git-core automake git zip wget ant && \
sudo apt -y build-dep imagemagick libmagickcore-dev libde265 libheif && \
sudo apt -y install testdisk ant libafflib-dev libewf-dev libpq-dev libvhdi-dev libvmdk-dev git zip zlib1-dev wget && \
sudo apt -y install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x \
gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
sudo apt -y install libpq-dev ant \
testdisk libafflib-dev libewf-dev libvhdi-dev libvmdk-dev \
libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x \
gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
if [[ $? -ne 0 ]]
then
echo "Failed to install necessary dependencies" >> /dev/stderr
exit 1
fi
# echo "Cloning source for libde265 and libheif..."
# pushd /usr/src/ && \
# sudo git clone https://github.com/strukturag/libde265.git && \
# sudo git clone https://github.com/strukturag/libheif.git && \
# popd
# if [[ $? -ne 0 ]]
# then
# popd
# echo "Failed to retrieve libde265 and libheif repos" >> /dev/stderr
# exit 1
# fi
echo "Cloning source for libde265 and libheif..."
pushd /usr/src/ && \
sudo git clone https://github.com/strukturag/libde265.git && \
sudo git clone https://github.com/strukturag/libheif.git && \
popd
if [[ $? -ne 0 ]]
then
popd
echo "Failed to retrieve libde265 and libheif repos" >> /dev/stderr
exit 1
fi
# echo "Installing libde265..."
# pushd /usr/src/libde265/ && \
# sudo ./autogen.sh && \
# sudo ./configure && \
# sudo make && \
# sudo make install && \
# popd
# if [[ $? -ne 0 ]]
# then
# popd
# echo "Failed to install libde265" >> /dev/stderr
# exit 1
# fi
echo "Installing libde265..."
pushd /usr/src/libde265/ && \
sudo ./autogen.sh && \
sudo ./configure && \
sudo make && \
sudo make install && \
popd
if [[ $? -ne 0 ]]
then
popd
echo "Failed to install libde265" >> /dev/stderr
exit 1
fi
# echo "Installing libheif..."
# pushd /usr/src/libheif/ && \
# sudo ./autogen.sh && \
# sudo ./configure && \
# sudo make && \
# sudo make install && \
# popd
# if [[ $? -ne 0 ]]
# then
# popd
# echo "Failed to install libheif" >> /dev/stderr
# exit 1
# fi
echo "Installing libheif..."
pushd /usr/src/libheif/ && \
sudo ./autogen.sh && \
sudo ./configure && \
sudo make && \
sudo make install && \
popd
if [[ $? -ne 0 ]]
then
popd
echo "Failed to install libheif" >> /dev/stderr
exit 1
fi
# echo "Installing ImageMagick..."
# pushd /usr/src/ && \
# sudo wget https://www.imagemagick.org/download/ImageMagick.tar.gz && \
# sudo tar xf ImageMagick.tar.gz && \
# pushd ImageMagick-7* && \
# sudo ./configure --with-heic=yes && \
# sudo make && \
# sudo make install && \
# popd && \
# popd
# if [[ $? -ne 0 ]]
# then
# popd && popd
# echo "Failed to install ImageMagick" >> /dev/stderr
# exit 1
# fi
echo "Installing ImageMagick..."
pushd /usr/src/ && \
sudo wget https://www.imagemagick.org/download/ImageMagick.tar.gz && \
sudo tar xf ImageMagick.tar.gz && \
pushd ImageMagick-7* && \
sudo ./configure --with-heic=yes && \
sudo make && \
sudo make install && \
popd && \
popd
if [[ $? -ne 0 ]]
then
popd && popd
echo "Failed to install ImageMagick" >> /dev/stderr
exit 1
fi
# sudo ldconfig
# if [[ $? -ne 0 ]]
# then
# echo "ldconfig call failed" >> /dev/stderr
# exit 1
# fi
sudo ldconfig
if [[ $? -ne 0 ]]
then
echo "ldconfig call failed" >> /dev/stderr
exit 1
fi
echo "Installing bellsoft Java 8..."
pushd /usr/src/ && \
......@@ -107,15 +107,15 @@ sudo apt -y install bellsoft-java8-full && \
popd
if [[ $? -ne 0 ]]
then
popd
echo "Failed to install bellsoft java 8" >> /dev/stderr
exit 1
fi
# https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables
echo "Setting JAVA_HOME..."
export JAVA_HOME=/usr/lib/jvm/bellsoft-java8-full-amd64 && \
echo "Java home is now: $JAVA_HOME" && \
echo 'export JAVA_HOME=/usr/lib/jvm/bellsoft-java8-full-amd64' | sudo tee >> ~/.bashrc >> ~/.zshrc
echo 'export JAVA_HOME=/usr/lib/jvm/bellsoft-java8-full-amd64' | tee ~/.profile ~/.bashrc
if [[ $? -ne 0 ]]
then
echo "Failed to set up JAVA_HOME in bash_rc" >> /dev/stderr
......
......@@ -37,7 +37,6 @@ then
popd
if [[ ! -d $SLEUTHKIT_SRC_DIR ]]
then
popd
echo "Unable to successfully clone Sleuthkit" >> /dev/stderr
exit 1
fi
......@@ -51,7 +50,6 @@ git pull && \
popd
if [[ $? -ne 0 ]]
then
popd
echo "Unable to reset Sleuthkit repo and pull latest on $TSK_BRANCH" >> /dev/stderr
exit 1
fi
......@@ -66,7 +64,6 @@ sudo make install && \
popd
if [[ $? -ne 0 ]]
then
popd
echo "Unable to build Sleuthkit." >> /dev/stderr
exit 1
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment