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 @@ ...@@ -14,18 +14,14 @@
``` ```
brew tap bell-sw/liberica 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 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: - You will need to set this Java to `JAVA_HOME` with something like:
``` ```
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) && \ 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: - and properly link it to the OpenJDK location:
``` ```
...@@ -44,15 +40,20 @@ ...@@ -44,15 +40,20 @@
## On Linux (Ubuntu / Debian-based) ## On Linux (Ubuntu / Debian-based)
*A script to install these dependencies that can be found [here](scripts/install_prereqs_ubuntu.sh).* *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: - Use `apt` to install dependencies:
``` ```
sudo apt update && \ sudo apt -y install \
sudo apt -y install build-essential autoconf libtool git-core automake && \ libpq-dev \
sudo apt -y build-dep imagemagick libmagickcore-dev libde265 libheif && \ ant build-essential autoconf libtool git-core automake git zip wget \
sudo apt -y install testdisk ant libafflib-dev libewf-dev libpq-dev libvhdi-dev libvmdk-dev git zip zlib1-dev wget && \ libheif-dev libde265-dev libmagickcore-dev imagemagick \
sudo apt -y install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \ testdisk libafflib-dev libewf-dev libvhdi-dev libvmdk-dev \
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x \ libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio 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: - 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 @@ ...@@ -63,10 +64,10 @@
sudo apt -y install bellsoft-java8-full && \ sudo apt -y install bellsoft-java8-full && \
popd 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 && \ 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: - Finally, you can verify this version of Java with:
``` ```
...@@ -131,4 +132,13 @@ ...@@ -131,4 +132,13 @@
chmod u+x ./unix_setup.sh && \ chmod u+x ./unix_setup.sh && \
./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. - 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
# 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 ...@@ -15,6 +15,8 @@ while getopts "z:i:v:" o; do
i) i)
INSTALL_DIR=${OPTARG} INSTALL_DIR=${OPTARG}
;; ;;
v) ASC_FILE=${OPTARG}
;;
*) *)
usage usage
exit 1 exit 1
...@@ -22,33 +24,33 @@ while getopts "z:i:v:" o; do ...@@ -22,33 +24,33 @@ while getopts "z:i:v:" o; do
esac esac
done done
if [[ -z "${AUTOPSY_ZIP_PATH}" ]] || [[ -z "${INSTALL_DIR}" ]]; then if [[ -z "$AUTOPSY_ZIP_PATH" ]] || [[ -z "$INSTALL_DIR" ]]; then
usage usage
exit 1 exit 1
fi fi
if [[ ! -z "${ASC_FILE}" ]] if [[ -n "$ASC_FILE" ]]
then then
VERIFY_DIR=$(pwd)/temp VERIFY_DIR=$(pwd)/temp
mkdir -p ${VERIFY_DIR} && \ KEY_DIR=$VERIFY_DIR/private
pushd ${VERIFY_DIR} && \ mkdir -p $VERIFY_DIR && \
wget https://sleuthkit.org/carrier.asc && \ sudo wget -O $VERIFY_DIR/carrier.asc https://sleuthkit.org/carrier.asc && \
gpg --homedir "${VERIFY_DIR}" --import https://sleuthkit.org/carrier.asc && \ mkdir -p $KEY_DIR && \
gpgv --homedir "${VERIFY_DIR}" --keyring "${VERIFY_DIR}/pubring.kbx" ${ASC_FILE} ${AUTOPSY_ZIP_PATH} && \ sudo chmod 600 $KEY_DIR && \
rm -r ${VERIFY_DIR} sudo gpg --homedir "$KEY_DIR" --import $VERIFY_DIR/carrier.asc && \
popd sudo gpgv --homedir "$KEY_DIR" --keyring "$KEY_DIR/pubring.kbx" $ASC_FILE $AUTOPSY_ZIP_PATH && \
sudo rm -r $VERIFY_DIR
if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
then then
popd echo "Unable to successfully verify $AUTOPSY_ZIP_PATH with $ASC_FILE" >> /dev/stderr
echo "Unable to successfully extract $AUTOPSY_ZIP_PATH to $AUTOPSY_EXTRACTED_PATH" >> /dev/stderr
exit 1 exit 1
fi fi
fi fi
zip_file_name=$(basename -- "$AUTOPSY_ZIP_PATH") ZIP_FILE_NAME=$(basename -- "$AUTOPSY_ZIP_PATH")
zip_name="${filename%.*}" ZIP_NAME="${ZIP_FILE_NAME%.*}"
AUTOPSY_EXTRACTED_PATH=$INSTALL_DIR/$zip_name AUTOPSY_EXTRACTED_PATH=$INSTALL_DIR/$ZIP_NAME
if [[ -d $AUTOPSY_EXTRACTED_PATH || -f $AUTOPSY_EXTRACTED_PATH ]] if [[ -d $AUTOPSY_EXTRACTED_PATH || -f $AUTOPSY_EXTRACTED_PATH ]]
then then
...@@ -58,10 +60,10 @@ fi ...@@ -58,10 +60,10 @@ fi
echo "Extracting $AUTOPSY_ZIP_PATH to $AUTOPSY_EXTRACTED_PATH..." echo "Extracting $AUTOPSY_ZIP_PATH to $AUTOPSY_EXTRACTED_PATH..."
mkdir -p $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 ]] if [[ $? -ne 0 ]]
then 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 exit 1
fi fi
...@@ -73,7 +75,6 @@ chmod u+x ./unix_setup.sh && \ ...@@ -73,7 +75,6 @@ chmod u+x ./unix_setup.sh && \
popd popd
if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
then then
popd
echo "Unable to setup permissions for autopsy binaries" >> /dev/stderr echo "Unable to setup permissions for autopsy binaries" >> /dev/stderr
exit 1 exit 1
else else
......
#!/bin/bash #!/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..." echo "Installing dependencies..."
# dependencies taken from: https://github.com/sleuthkit/autopsy/pull/5111/files # dependencies taken from: https://github.com/sleuthkit/autopsy/pull/5111/files
# brew install postgresql gettext cppunit && \ # brew install postgresql gettext cppunit && \
brew install ant automake libtool afflib libewf libpq testdisk imagemagick gstreamer gst-plugins-base gst-plugins-good imagemagick && \ brew install ant automake libtool afflib libewf libpq testdisk imagemagick gstreamer gst-plugins-base gst-plugins-good
brew tap bell-sw/liberica
if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
then then
echo "Unable to install necessary dependencies" >> /dev/stderr echo "Unable to install necessary dependencies" >> /dev/stderr
exit 1 exit 1
fi fi
# if BigSur or greater
echo "Installing liberica java 8..." echo "Installing liberica java 8..."
if ((OSX_MAJOR_VERSION > 11 || (OSX_MAJOR_VERSION == 11 && OSX_MAJOR_VERSION >= 2))) brew tap bell-sw/liberica && \
then brew install --cask liberica-jdk8-full
brew install --cask liberica-jdk8-full
else
brew cask install liberica-jdk8-full
fi
if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
then then
echo "Unable to install liberica java" >> /dev/stderr echo "Unable to install liberica java" >> /dev/stderr
exit 1 exit 1
fi 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) && \ export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) && \
echo "Java home is now: $JAVA_HOME" && \ 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 ]] if [[ $? -ne 0 ]]
then then
echo "Unable to properly set up JAVA_HOME." >> /dev/stderr echo "Unable to properly set up JAVA_HOME." >> /dev/stderr
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
# this script requires elevated privileges # this script requires elevated privileges
# echo "Turning on all repositories for apt..." echo "Turning on all repositories for apt..."
# sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
# if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
# then then
# echo "Failed to turn on all repositories" >> /dev/stderr echo "Failed to turn on all repositories" >> /dev/stderr
# exit 1 exit 1
# fi fi
echo "Installing all apt dependencies..." echo "Installing all apt dependencies..."
# other possible dependencies taken from https://github.com/sleuthkit/autopsy/pull/4743/files # other possible dependencies taken from https://github.com/sleuthkit/autopsy/pull/4743/files
...@@ -19,84 +19,84 @@ echo "Installing all apt dependencies..." ...@@ -19,84 +19,84 @@ echo "Installing all apt dependencies..."
# sudo apt -y install autopoint libsqlite3-dev libcppunit-dev # sudo apt -y install autopoint libsqlite3-dev libcppunit-dev
# TODO multi user dependencies? # TODO multi user dependencies?
sudo apt update && \ sudo apt update && \
sudo apt -y install build-essential autoconf libtool git-core automake && \ sudo apt -y install build-essential autoconf libtool git-core automake git zip wget ant && \
# sudo apt -y install libheif-dev libde265-dev imagemagick && \
sudo apt -y build-dep imagemagick libmagickcore-dev libde265 libheif && \ 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 libpq-dev ant \
sudo apt -y install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \ testdisk libafflib-dev libewf-dev libvhdi-dev libvmdk-dev \
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x \ libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio 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 ]] if [[ $? -ne 0 ]]
then then
echo "Failed to install necessary dependencies" >> /dev/stderr echo "Failed to install necessary dependencies" >> /dev/stderr
exit 1 exit 1
fi fi
# echo "Cloning source for libde265 and libheif..." echo "Cloning source for libde265 and libheif..."
# pushd /usr/src/ && \ pushd /usr/src/ && \
# sudo git clone https://github.com/strukturag/libde265.git && \ sudo git clone https://github.com/strukturag/libde265.git && \
# sudo git clone https://github.com/strukturag/libheif.git && \ sudo git clone https://github.com/strukturag/libheif.git && \
# popd popd
# if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
# then then
# popd popd
# echo "Failed to retrieve libde265 and libheif repos" >> /dev/stderr echo "Failed to retrieve libde265 and libheif repos" >> /dev/stderr
# exit 1 exit 1
# fi fi
# echo "Installing libde265..." echo "Installing libde265..."
# pushd /usr/src/libde265/ && \ pushd /usr/src/libde265/ && \
# sudo ./autogen.sh && \ sudo ./autogen.sh && \
# sudo ./configure && \ sudo ./configure && \
# sudo make && \ sudo make && \
# sudo make install && \ sudo make install && \
# popd popd
# if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
# then then
# popd popd
# echo "Failed to install libde265" >> /dev/stderr echo "Failed to install libde265" >> /dev/stderr
# exit 1 exit 1
# fi fi
# echo "Installing libheif..." echo "Installing libheif..."
# pushd /usr/src/libheif/ && \ pushd /usr/src/libheif/ && \
# sudo ./autogen.sh && \ sudo ./autogen.sh && \
# sudo ./configure && \ sudo ./configure && \
# sudo make && \ sudo make && \
# sudo make install && \ sudo make install && \
# popd popd
# if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
# then then
# popd popd
# echo "Failed to install libheif" >> /dev/stderr echo "Failed to install libheif" >> /dev/stderr
# exit 1 exit 1
# fi fi
# echo "Installing ImageMagick..." echo "Installing ImageMagick..."
# pushd /usr/src/ && \ pushd /usr/src/ && \
# sudo wget https://www.imagemagick.org/download/ImageMagick.tar.gz && \ sudo wget https://www.imagemagick.org/download/ImageMagick.tar.gz && \
# sudo tar xf ImageMagick.tar.gz && \ sudo tar xf ImageMagick.tar.gz && \
# pushd ImageMagick-7* && \ pushd ImageMagick-7* && \
# sudo ./configure --with-heic=yes && \ sudo ./configure --with-heic=yes && \
# sudo make && \ sudo make && \
# sudo make install && \ sudo make install && \
# popd && \ popd && \
# popd popd
# if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
# then then
# popd && popd popd && popd
# echo "Failed to install ImageMagick" >> /dev/stderr echo "Failed to install ImageMagick" >> /dev/stderr
# exit 1 exit 1
# fi fi
# sudo ldconfig sudo ldconfig
# if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
# then then
# echo "ldconfig call failed" >> /dev/stderr echo "ldconfig call failed" >> /dev/stderr
# exit 1 exit 1
# fi fi
echo "Installing bellsoft Java 8..." echo "Installing bellsoft Java 8..."
pushd /usr/src/ && \ pushd /usr/src/ && \
...@@ -107,15 +107,15 @@ sudo apt -y install bellsoft-java8-full && \ ...@@ -107,15 +107,15 @@ sudo apt -y install bellsoft-java8-full && \
popd popd
if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
then then
popd
echo "Failed to install bellsoft java 8" >> /dev/stderr echo "Failed to install bellsoft java 8" >> /dev/stderr
exit 1 exit 1
fi fi
# https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables
echo "Setting JAVA_HOME..." echo "Setting JAVA_HOME..."
export JAVA_HOME=/usr/lib/jvm/bellsoft-java8-full-amd64 && \ export JAVA_HOME=/usr/lib/jvm/bellsoft-java8-full-amd64 && \
echo "Java home is now: $JAVA_HOME" && \ 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 ]] if [[ $? -ne 0 ]]
then then
echo "Failed to set up JAVA_HOME in bash_rc" >> /dev/stderr echo "Failed to set up JAVA_HOME in bash_rc" >> /dev/stderr
......
...@@ -37,7 +37,6 @@ then ...@@ -37,7 +37,6 @@ then
popd popd
if [[ ! -d $SLEUTHKIT_SRC_DIR ]] if [[ ! -d $SLEUTHKIT_SRC_DIR ]]
then then
popd
echo "Unable to successfully clone Sleuthkit" >> /dev/stderr echo "Unable to successfully clone Sleuthkit" >> /dev/stderr
exit 1 exit 1
fi fi
...@@ -51,7 +50,6 @@ git pull && \ ...@@ -51,7 +50,6 @@ git pull && \
popd popd
if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
then then
popd
echo "Unable to reset Sleuthkit repo and pull latest on $TSK_BRANCH" >> /dev/stderr echo "Unable to reset Sleuthkit repo and pull latest on $TSK_BRANCH" >> /dev/stderr
exit 1 exit 1
fi fi
...@@ -66,7 +64,6 @@ sudo make install && \ ...@@ -66,7 +64,6 @@ sudo make install && \
popd popd
if [[ $? -ne 0 ]] if [[ $? -ne 0 ]]
then then
popd
echo "Unable to build Sleuthkit." >> /dev/stderr echo "Unable to build Sleuthkit." >> /dev/stderr
exit 1 exit 1
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment