Code Monkey home page Code Monkey logo

sherlock's Introduction

sherlock: a digital forensic analysis toolkit

Overview

The analysis phase of the digital forensic investigative process is very complex. This phase grows more complicated as the size and ubquity of digital devices increases. There are many tools aimed at assisting the investigator in the extraction of digital evidence; however, very few aimed at analyzing the evidence. sherlock is an open-source forensic toolkit for analyzing digital evidence. sherlock enables investigators to identify, correlate and reason about evidence.

Installation

Requires Python 2.7.14 or above

Ubuntu Installation

apt install python3

apt install python-pip

pip install -r requirements.txt

Mac OS X Installation

Install python 2 using the Homebrew package manager (https://brew.sh): brew install python2

Verify that the python2 alias is the same as the version installed with Homebrew: Python2 —version If not, link them: brew unlink python2 && brew link python2

Optionally, point the python alias to python2. This method can also be used to easily switch between python 2 and 3 https://stackoverflow.com/a/43354441

Install Graphviz: Brew install Graphviz

Install Pygraphviz: pip install pygraphviz --install-option="--include-path=/usr/local/include/graphviz/" --install-option="--library-path=/usr/local/lib/graphviz"

Install pkg-config: pip install pkg-config

Navigate to sherlock/server and install requirements: pip install -r requirements.txt

Windows Installation

Download and install python 2.7.14 from https://www.python.org/downloads/release/python-2714/

Follow these instructions to add it to your path and verify installation: https://edu.google.com/openonline/course-builder/docs/1.10/set-up-course-builder/check-for-python.html

Follow these instructions to add pip: https://dev.to/el_joft/installing-pip-on-windows

Download and install the Microsoft Visual C++ Compiler for Python 2.7 from https://www.microsoft.com/en-us/download/details.aspx?id=44266

In a command prompt window, run: pip install scipy pip install scikit-learn

Follow the steps here: https://stackoverflow.com/a/44009261 with the following modifications: for step 2: the file you want is pygraphviz‑1.3.1‑cp27‑none‑win32.whl unless you have an amd processor: pygraphviz‑1.3.1‑cp27‑none‑win_amd64.whl for step 4: run the command pip install pygraphviz-1.3.1-cp27-none-win.whl if you do not have an amd processor

Navigate to sherlock/server and install requirements: pip install -r requirements.txt

Virtualization of Application

Coming Soon

Coming Soon

Web Application

Coming Soon

Quick Start

python sherlock.py

Output:

  1. Observe Evidence
  2. Formulate Hypotheses
  3. Evaluate Hypotheses
  4. Exit

Choose a Phase: 1

Enter 1 into the prompt

Output:

Enter Filename: example.txt

Enter example.txt into the prompt, Need to give the full path information for this prompt

Output:

[1, 3, 4] [0.666666. 0.222222. 0.111111] This information is important for the determination of likelihood of a hypothesis. There is more information in the folder data

  1. Observe Evidence
  2. Formulate Hypotheses
  3. Evaluate Hypotheses
  4. Exit

Choose a Phase: 2

Enter 2 into the prompt

Output:

Enter Source Node of your Hypothesis: explorer.exe

Enter explorer.exe into the prompt

Output:

[('explorer.exe', 'AcroRd32.exe'), ('AcroRd32.exe', 'notepad.exe'), ('AcroRd32.exe', '192.168.1.115')] [('explorer.exe', 'firefox.exe'), ('firefox.exe', 'Dropbox'), ('firefox.exe', '54.201.155.11'), ('firefox.exe', '23.209.190.51')]

This is a link of paths in the graph, for example (explorer.exe - AcroRd32.exe - notepad.exe), means GUI opened a PDF document and opened notepad application.

  1. Observe Evidence
  2. Formulate Hypotheses
  3. Evaluate Hypotheses
  4. Exit

Choose a Phase: 3

Enter 3 into the prompt

Enter Source Node of your Hypothesis: explorer.exe

Enter Target Node of your Hypothesis: 192.168.1.115

explorer.exe 0.2222222 AcroRd32.exe 0.2222222 192.168.1.115 0.6666667

This are the likelihoods for each individual piece of evidence.

  1. Observe Evidence
  2. Formulate Hypotheses
  3. Evaluate Hypotheses
  4. Exit

Choose a Phase: 4

Done!

Literature

Review on the techniques used by this tool:

Exploring Digital Evidence with Graph Theory
Towards Sound Analysis of Computer Evidence

Contributors

Researchers

Imani Palmer & Young Li

Developers

Sarah Moulton & Benjamin Pollak

sherlock's People

Contributors

benjaminpollak avatar inp2 avatar suspiciouscloud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ma5onic

sherlock's Issues

Sherlock Doesn't Run as Described

When I try to run the code as described in the README.md, I have an issue with step three. I get the below error:

Traceback (most recent call last): File "./sherlock.py", line 213, in <module> evaluate(src, trg, grph) File "./sherlock.py", line 38, in evaluate if nx.has_path(grph, src, trg): File "/home/user/codingRelated/sherlock/venv/local/lib/python2.7/site-packages/networkx/algorithms/shortest_paths/generic.py", line 40, in has_path sp = nx.shortest_path(G, source, target) File "/home/user/codingRelated/sherlock/venv/local/lib/python2.7/site-packages/networkx/algorithms/shortest_paths/generic.py", line 142, in shortest_path paths = nx.bidirectional_shortest_path(G, source, target) File "/home/user/codingRelated/sherlock/venv/local/lib/python2.7/site-packages/networkx/algorithms/shortest_paths/unweighted.py", line 223, in bidirectional_shortest_path raise nx.NodeNotFound(msg.format(source, target)) networkx.exception.NodeNotFound: Either source explorer.exe or target 192.168.1.115 is not in G

Here's what seems to be the punchline: networkx.exception.NodeNotFound: Either source explorer.exe or target 192.168.1.115 is not in G

No requirements.txt dependency file

Looks like there's no requirements.txt file so most of the imports at the top of sherlock.py aren't found. I was able to resolve the issue by installing the dependencies using pip:

pip install networkx scipy reportlab matplotlib pydot pygraphviz pandas seaborn sklearn

Also, on Ubuntu 16.04 LTS I had to install the python-dev package for matplotlib, python-tk to use Tkinter, and graphviz and graphviz-dev for pygraphviz.

I can create a requirements.txt file with the dependencies and add the extra packages to the README. Are there any specific versions of the packages that we need?

Sherlock Raises a Warning

When running the example, Sherlock raises the below error:

$PATH/matplotlib/axes/_axes.py:6648: UserWarning: The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg. warnings.warn("The 'normed' kwarg is deprecated, and has been "

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.