Code Monkey home page Code Monkey logo

rleapp's Introduction

RLEAPP

Returns Logs Events And Protobuf Parser

If you want to contribute hit me up on twitter: https://twitter.com/AlexisBrignoni

Requirements

Python 3.9 or above (older versions of 3.x will also work with the exception of one or two modules)

Dependencies

Dependencies for your python environment are listed in requirements.txt. Install them using the below command. Ensure the py part is correct for your environment, eg py, python, or python3, etc.

py -m pip install -r requirements.txt
or
pip3 install -r requirements.txt

To run on Linux, you will also need to install tkinter separately like so:

sudo apt-get install python3-tk

To install dependencies offline Troy Schnack has a neat process here: https://twitter.com/TroySchnack/status/1266085323651444736?s=19

Usage

CLI

$ python rleapp.py -t <zip | tar | fs | gz> -i <path_to_extraction> -o <path_for_report_output>

GUI

$ python rleappGUI.py 

Help

$ python rleapp.py --help

Contributing artifact plugins

Each plugin is a Python source file which should be added to the scripts/artifacts folder which will be loaded dynamically each time RLEAPP is run.

The plugin source file must contain a dictionary named __artifacts_v2__ at the very beginning of the module, which defines the artifacts that the plugin processes. The keys in the __artifacts_v2__ dictionary should be IDs for the artifact(s) which must be unique within RLEAPP. The values should be dictionaries containing the following keys:

  • name: The name of the artifact as a string.
  • description: A description of the artifact as a string.
  • author: The author of the plugin as a string.
  • version: The version of the artifact as a string.
  • date: The date of the last update to the artifact as a string.
  • requirements: Any requirements for processing the artifact as a string.
  • category: The category of the artifact as a string.
  • notes: Any additional notes as a string.
  • paths: A tuple of strings containing glob search patterns to match the path of the data that the plugin expects for the artifact.
  • function: The name of the function which is the entry point for the artifact's processing as a string.

For example:

__artifacts_v2__ = {
    "cool_artifact_1": {
        "name": "Cool Artifact 1",
        "description": "Extracts cool data from database files",
        "author": "@username",
        "version": "0.1",
        "date": "2022-10-25",
        "requirements": "none",
        "category": "Really cool artifacts",
        "notes": "",
        "paths": ('*/com.android.cooldata/databases/database*.db',),
        "function": "get_cool_data1"
    },
    "cool_artifact_2": {
        "name": "Cool Artifact 2",
        "description": "Extracts cool data from XML files",
        "author": "@username",
        "version": "0.1",
        "date": "2022-10-25",
        "requirements": "none",
        "category": "Really cool artifacts",
        "notes": "",
        "paths": ('*/com.android.cooldata/files/cool.xml',),
        "function": "get_cool_data2"
    }
}

The functions referenced as entry points in the __artifacts__ dictionary must take the following arguments:

  • An iterable of the files found which are to be processed (as strings)
  • The path of RLEAPP's output folder(as a string)
  • The seeker (of type FileSeekerBase) which found the files
  • A Boolean value indicating whether or not the plugin is expected to wrap text

For example:

def get_cool_data1(files_found, report_folder, seeker, wrap_text):
    pass  # do processing here

Plugins are generally expected to provide output in RLEAPP's HTML output format, TSV, and optionally submit records to the timeline. Functions for generating this output can be found in the artifact_report and ilapfuncs modules. At a high level, an example might resemble:

__artifacts_v2__ = {
    "cool_artifact_1": {
        "name": "Cool Artifact 1",
        "description": "Extracts cool data from database files",
        "author": "@username",  # Replace with the actual author's username or name
        "version": "0.1",  # Version number
        "date": "2022-10-25",  # Date of the latest version
        "requirements": "none",
        "category": "Really cool artifacts",
        "notes": "",
        "paths": ('*/com.android.cooldata/databases/database*.db',),
        "function": "get_cool_data1"
    }
}

import datetime
from scripts.artifact_report import ArtifactHtmlReport
import scripts.ilapfuncs

def get_cool_data1(files_found, report_folder, seeker, wrap_text):
    # let's pretend we actually got this data from somewhere:
    rows = [
     (datetime.datetime.now(), "Cool data col 1, value 1", "Cool data col 1, value 2", "Cool data col 1, value 3"),
     (datetime.datetime.now(), "Cool data col 2, value 1", "Cool data col 2, value 2", "Cool data col 2, value 3"),
    ]
    
    headers = ["Timestamp", "Data 1", "Data 2", "Data 3"]
    
    # HTML output:
    report = ArtifactHtmlReport("Cool stuff")
    report_name = "Cool DFIR Data"
    report.start_artifact_report(report_folder, report_name)
    report.add_script()
    report.write_artifact_data_table(headers, rows, files_found[0])  # assuming only the first file was processed
    report.end_artifact_report()
    
    # TSV output:
    scripts.ilapfuncs.tsv(report_folder, headers, rows, report_name, files_found[0])  # assuming first file only
    
    # Timeline:
    scripts.ilapfuncs.timeline(report_folder, report_name, rows, headers)

Acknowledgements

This tool is the result of a collaborative effort of many people in the DFIR community.

rleapp's People

Contributors

abrignoni avatar dfir-tb avatar fotoratte avatar fulltang avatar gforce4n6 avatar jameshabben avatar jijames avatar johann-plw avatar markmckinnon avatar metadataforensics avatar ramseys1990 avatar sacx13 avatar snoop168 avatar sqlmcgee avatar stark4n6 avatar theatropos4n6 avatar thekatecain avatar troyschnack avatar upintheairsheep2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rleapp's Issues

chaseReturnsRTL.py broken

Currently chaseReturnsRTL.py is broken. PyPDF2 has deprecated several functions used AND the format has now changed for the returns (at least for my current return).

I am currently working on fixing it as time permits and will create a pull request once I am done.

Unused iTunes Code

what's your thought about including the itunes specific code in all xLEAPP from the search_files.py file in iLEAPP. it would allow that file to me synced across tool versions easier with a directory compare tool rather than having to open and confirm that class is the only change. the non itunes tools would just not initiate the class so i don't think it would create any issue.

image

Single Purpose files?

I wanted to pose a question here to possibly help out with maintainability and targeting individual items in a better way. I've noticed that some modules target multiple files (Example: snapchatConv.py) and will extract information under a broad umbrella. I recommend we entertain the idea of splitting these files into individual files.

Example: snapchatConv.py becomes:
snapchatGeo.py
snapchatAiConv.py
snapchatCallLogs.py
snapchatConv.py
etc.

This way if someone is only looking to extract geo locations then they can target that module specifically. This also helps in case a file format changes, we know which file to begin correcting.

Processing failed - tarfile.ReadError: invalid header when selecting .gz file

Hi, I am running this on a windows 10 machine with python version 3.11.0. When running the the rleappGUI.py script I selected a .gz file to parse through with the two twitter return options enabled. Upon doing this I got a "tarfile.ReadError: invalid header" error. I have not made any modifications that would have caused this. Below is the full error message:
Had an exception in Seeker - see details below. Terminating Program!
Traceback (most recent call last):
File "rleapp.py", line 110, in crunch_artifacts
File "scripts\search_files.py", line 63, in __init__
File "tarfile.py", line 1652, in open
File "tarfile.py", line 1705, in gzopen
File "tarfile.py", line 1682, in taropen
File "tarfile.py", line 1542, in __init__
File "tarfile.py", line 2362, in next
tarfile.ReadError: invalid header

I will say that it can take in a file that is .tar.gz but not just .gz. I am fairly new to using .gz files so if it is an error on my end I apologize.

Add support for Apple/iCloud GDPR zip files!

Apple has a GDPR export feature on their privacy website that allows you do download some of your data. The zip files are separately exported and downloaded. I emailed you a zip file with all the zip files of iCloud apple GDPR zips minus the photos and iCloud Drive because otherwise it would be TOO BIG. So create a dummy account to get the data.

Snapchat Artifacts not working

I am currently trying to use the snapchat artifacts, however, they are not producing any output when they should be. I am unsure what is causing this. I am running it off Python version 3.11.2 and am on Windows 10. I have attached a screengrab of the processed files list.
image

Chrome OS Settings is incomplete

The data in chromeOSSettings.py only phrases “Priority Preferences” not all preferences. Please add support for the “OS Settings” area.
], "OS Preference": [ {"preference": { "name": "OobeMarketingOptInScreenFinished", "value": "true" }}, {"preference": { "name": "ash.filesapp.ui_prefs_migrated", "value": "true" }}, {"preference": { "name": "launcher.result_ever_launched", "value": "true" }}, {"preference": { "name": "settings.language.enabled_extension_imes_syncable", "value": "\"\"" }}, {"preference": { "name": "settings.restore_apps_and_pages", "value": "2" }}, {"preference": { "name": "settings.language.preferred_languages_syncable", "value": "\"en-US,en\"" }}, {"preference": { "name": "settings.multi_profile_never_show_intro", "value": "true" }}, {"preference": { "name": "OobeMarketingOptInChoice", "value": "true" }}, {"preference": { "name": "crostini.terminal_settings", "value": "{\"/hterm/profile-ids\":[\"default\"],\"/nassh/profile-ids\":[\"62d6\",\"1821\"],\"/nassh/profiles/1821/argstr\":\"\",\"/nassh/profiles/1821/description\":\"[email protected]\",\"/nassh/profiles/1821/hostname\":\"example.com\",\"/nassh/profiles/1821/identity\":\"\",\"/nassh/profiles/1821/nassh-options\":\"--help\",\"/nassh/profiles/1821/port\":null,\"/nassh/profiles/1821/terminal-profile\":\"default\",\"/nassh/profiles/1821/terminalSSHDialogCommand\":\"[email protected]\",\"/nassh/profiles/1821/username\":\"admin\",\"/nassh/profiles/62d6/argstr\":\"\",\"/nassh/profiles/62d6/description\":\"[email protected]\",\"/nassh/profiles/62d6/hostname\":\"thetechrobo.ca\",\"/nassh/profiles/62d6/identity\":\"\",\"/nassh/profiles/62d6/nassh-options\":\"\",\"/nassh/profiles/62d6/port\":null,\"/nassh/profiles/62d6/terminal-profile\":\"default\",\"/nassh/profiles/62d6/terminalSSHDialogCommand\":\"[email protected]\",\"/nassh/profiles/62d6/username\":\"beluga\",\"/nassh/welcome/notes-version\":60,\"/nassh/welcome/show-count\":3}" }}, {"preference": { "name": "settings.language.preload_engines_syncable", "value": "\"xkb:us::eng\"" }} ],
The Crostini terminal settings should display as a separate artifact from the rest of the preferences.

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.