Skip to content
schmiedecker edited this page Jul 13, 2017 · 14 revisions

hashdb v3.0-Alpha is now available for Windows, Linux, and Mac platforms. hashdb v3.0 provides the hashdb program as well as the hashdb Python module and C++ library components.

Windows

  1. Uninstall any previous version of hashdb.
  2. Download and install the hashdb and bulk_extractor Windows installers from here. A compatible version of SectorScope is also available at this link.

Linux Flavors

hashdb is expected to be compatible with several Linux flavors. Steps are shown to configure, build, and install hashdb.

Once configured, you may wish to run make check to check that various components are installed and pass tests. There are three test sets: 1) basic tests, 2) Python tests, and 3) Python interface tests. Python tests will not run if Python is not installed. Python interface tests will not run if Python-devel and SWIG are not installed or when cross-compiling to Windows.

Setup

Fedora 23

Set up the build environment:

sudo dnf update
sudo dnf groupinstall development-tools
sudo dnf install gcc-c++
sudo dnf install openssl-devel
sudo dnf install libewf-devel
sudo dnf install bzip2-devel
sudo dnf install zlib-devel
sudo dnf install swig
sudo dnf install python-devel
sudo dnf install libtool

The swig and python-devel packages are only required if you want to build the hashdb Python extension module. libtool is only required for developers who build from GitHub source.

Ubuntu 16.4 LTS x64

sudo apt-get install autoconf build-essential libssl-dev libtool-bin python-dev swig libewf-dev libbz2-dev zlib1g-dev

Fedora 20:

sudo yum update
sudo yum groupinstall development-tools
sudo yum install openssl-devel
sudo yum install libewf-devel
sudo yum install bzip2-devel
sudo yum install zlib-devel
sudo yum install gcc-c++

RHEL, CentOS:

sudo yum update
sudo yum gropuinstall development tools
sudo yum install openssl-devel
sudo yum install libewf-devel
sudo yum install bzip2-devel
sudo yum install zlib-devel

Mac using Homebrew

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install dependencies:

brew install libtool
brew install autoconf
brew install automake
brew install gcc
brew install libewf
brew install bzip2
brew install openssl

When running make, the build environment may not be able to find the compiler or packages.

To select GCC:

./configure CC=g++-6 CXX=gcc-6

If openssl/evp.h cannot be found and for example openssl is at /usr/bin/openssl but you need /usr/local/include/openssl, try helping Brew as follows, verifying the path before and after:

which openssl
brew link openssl --force
which openssl

Mac using MacPorts

sudo port install autoconf automake pkgconfig

Download hashdb

Download hashdb from .tar.gz

Please download and unzip the latest .tar.gz hashdb distribution tarball available here. For example type:

wget http://digitalcorpora.org/downloads/hashdb/hashdb-x.x.x.tar.gz
tar -xvf hashdb-x.x.x.tar.gz

Download hashdb from GitHub

Alternatively, developers may wish to build the latest source from GitHub. Clone hashdb and run bootstrap.sh:

git clone https://github.com/NPS-DEEP/hashdb.git
cd hashdb
./bootstrap.sh

Build hashdb

Build as administrator

./configure
./make
./sudo make install

Build as user

./configure --prefix=$HOME/local/ --exec-prefix=$HOME/local CPPFLAGS=-I$HOME/local/include/ LDFLAGS=-L$HOME/local/lib
make
make install

Running hashdb

The system PATH and PYTHONPATH system variables may need to be set to allow hashdb resources to be visible at the command prompt. Please see output from make install to find your paths if they are different. If you like, you might put these settings in your ~/.bashrc file.

When installed as administrator

  • The hashdb tool should automatically be accessible.
  • The hashdb.py interface can be made available by typing export PYTHONPATH=/usr/local/lib/python2.7/site-packages:/usr/local/lib64/python2.7/site-packages, which provides access the installed python.py and _python.so resources, respectively.

When installed as user

  • The hashdb tool can be made available by typing export PATH=$HOME/local/bin:$PATH.
  • The hashdb.py interface can be made available by typing export PYTHONPATH=~/local/lib/python2.7/site-packages:~/local/lib64/python2.7/site-packages, which provides access the installed python.py and _python.so resources, respectively.

Cross-compiling to Windows (Developers only)

NOTE: This section describes how to build the Windows configuration of hashdb. Users should download a pre-built Windows installer instead of doing this.

Run this setup script to set up a Fedora 23 system to cross-compile hashdb:

cd src_win
./CONFIGURE_F23.bash

To build multiple configurations, use VPATH builds. Build the Windows configuration under win32/:

mkdir win32
cd win32
mingw64-configure
make

make will create the Windows installer under win32/src_win/.

To keep configurations straight, you may wish to build your native Linux/Mac configuration under build/:

mkdir build
cd build
../configure

Compiling bulk_extractor to include hashdb

  1. Build and install hashdb.

  2. Install additional packages: flex libxml2-devel tre-devel afflib-devel sqlite-devel.

  3. Obtain and bootstrap the latest bulk_extractor from GitHub:

     git clone --recursive https://github.com/simsong/bulk_extractor.git
     cd bulk_extractor
     sh bootstrap.sh
    
  4. Then run configure, make, make install as shown for hashdb.

For further detail, please see https://github.com/simsong/bulk_extractor/wiki/Installing-bulk_extractor.