
Collecting & Hunting for IOCs with gusto and style
.. image:: https://github.com/rastrea2r/rastrea2r/blob/master/logo.png :align: center :alt: logo
.. image:: https://travis-ci.org/rastrea2r/rastrea2r.svg?branch=master :target: https://travis-ci.org/rastrea2r/rastrea2r.svg?branch=master :alt: travis-ci for master branch
.. image:: https://readthedocs.org/projects/rastrea2r/badge/?version=latest :target: http://rastrea2r.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
.. image:: http://www.repostatus.org/badges/1.1.0/active.svg :alt: Project Status: Active - The project has reached a stable, usable state and is being actively developed. :target: http://www.repostatus.org/#active
.. image:: https://github.com/toolswatch/badges/blob/master/arsenal/usa/2018.svg :alt: Black Hat Arsenal 2018 :target: https://www.blackhat.com/us-18/arsenal/schedule/index.html#rastrea2r-reloaded-collecting-38-hunting-for-iocs-with-gusto-and-style-12103
Ever wanted to turn your AV console into an Incident Response & Threat Hunting machine? Rastrea2r (pronounced "rastreador" - hunter- in Spanish) is a multi-platform open source tool that allows incident responders and SOC analysts to triage suspect systems and hunt for Indicators of Compromise (IOCs) across thousands of endpoints in minutes. To parse and collect artifacts of interest from remote systems (including memory dumps), rastrea2r can execute sysinternal, system commands and other 3rd party tools (including the custom scripts) across multiples endpoints, saving the output to a centralized share for automated or manual analysis. By using a client/server RESTful API, rastrea2r can also hunt for IOCs on disk and memory across multiple systems using YARA rules. As a command line tool, rastrea2r can be easily integrated within McAfee ePO, as well as other AV consoles and orchestration tools, allowing incident responders and SOC analysts to collect forensic evidence and hunt for IOCs without the need for an additional agent, with 'gusto' and style!
Presented at BlackHat Arsenal 2016 and 2018!
rastrea2r at BlackHat Arsenal 2018 <https://www.blackhat.com/us-18/arsenal/schedule/#rastrea2r-reloaded-collecting-38-hunting-for-iocs-with-gusto-and-style-12103>_.rastrea2r at BlackHat Arsenal 2016 <https://www.blackhat.com/us-16/arsenal.html#rastrea2r>_.Rastrea2r now also supports pushing the Scan Results to a Restful Server using HTTP. This functionality allows the users to deploy rastrea2r on their enterprises so that they can execute different rastrea2r commands to collect and triage the data and later store the Yara disk or Yara Mem results onto the Server for further analysis.
A high level design of the rastrea2r deployment on end points can be seen as below:
.. image:: https://github.com/rastrea2r/rastrea2r/blob/master/docs/images/Deploy_Rastrea2r.png :width: 200px :align: center :height: 100px :alt: Rastrea2r end point deployment
Rastrea2r allows users to specify the list of commands or batch scripts to be executed during "triage" via a configuration file, which is located here <https://github.com/rastrea2r/rastrea2r/blob/master/src/rastrea2r/rastrea2r.ini>_.
Notes
For memdump and triage modules, SMB shares must be set up in this specific way:
Binaries (sysinternals, batch files and others) must be located in a shared folder called TOOLS (read only)
\\path-to-share-foldertools
Output is sent to a shared folder called DATA (write only)
\path-to-share-folderdata
For yara-mem and yara-disk scans, the yara rules must be present in the rastrea2r server before using the commands
.. code-block:: console
$git clone https://github.com/rastrea2r/rastrea2r.git
$cd rastrea2r
.. code-block:: console
$make help
help - display this makefile's help information
venv - create a virtual environment for development
clean - clean all files using .gitignore rules
scrub - clean all files, even untracked files
test - run tests
test-verbose - run tests [verbosely]
check-coverage - perform test coverage checks
check-style - perform pep8 check
fix-style - perform check with autopep8 fixes
docs - generate project documentation
check-docs - quick check docs consistency
serve-docs - serve project html documentation
dist - create a wheel distribution package
dist-test - test a wheel distribution package
dist-upload - upload a wheel distribution package
.. code-block:: console
$make venv
//Upon successful creation of the virtualenvironment, enter the virtualenvironment as instructed, for ex:
$source /Users/ssbhat/.venvs/rastrea2r/bin/activate
Start the rastrea2r server by referring to: https://rastrea2r-server.readthedocs.io/en/latest/?badge=latest
Now execute the client program, depending on which platform you are trying to scan choose the target python script appropriately. Currently Windows, Linux and Mac platforms are supported.
.. note:: Following instructions explain the steps on a Windows, but on Mac and linux the steps should follow the same except that you would execute the client from the specified platform folder. On Windows PC's, make file system is not supported and if you need to execute rastrea2r client then you need to create the virtualenvironment manually and install the dependencies on it using pip install -r requirements.txt.
.. code-block:: console
$python rastrea2r_windows.py -h usage: rastrea2r_windows.py [-h] [-v] {yara-disk,yara-mem,triage,memdump,triage,web-hist,prefetch} ...
Rastrea2r RESTful remote Yara/Triage tool for Incident Responders
positional arguments: {yara-disk,yara-mem,triage,memdump,triage,web-hist,prefetch}
modes of operation yara-disk Yara scan for file/directory objects on disk yara-mem Yara scan for running processes in memory memdump Acquires a memory dump from the endpoint triage Collect triage information from endpoint web-hist Generates web history for specified user account prefetch Generates prefetch view collect Acquires artifacts from the endpoint