GithubHelp home page GithubHelp logo

idaholab / cape2stix Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 11.51 MB

This software allows for the conversion, extraction, and transformation of malware behavior data from "Malware Configuration And Payload Extraction" (CAPEv2) sandbox reports, to Structured Threat Information eXpression (STIX). This allows for further analysis to be performed, sharing of threat data, and transit to a graph database.

License: BSD 3-Clause "New" or "Revised" License

Dockerfile 0.20% Shell 2.35% Python 60.56% PowerShell 0.05% Jupyter Notebook 36.42% Makefile 0.18% Batchfile 0.23%

cape2stix's People

Contributors

cutsma avatar inl-labtrack avatar mcutshaw avatar wrbrant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mingxuan6577

cape2stix's Issues

Evaluate grouping malware by connected files

  • Evaluate approaches for clustering or otherwise grouping malware based on a subset of files that it modified, reads, or deletes. Also think of this from the perspective of grouping files that occur in the same runs. The goal is to be able to identity similar malware, which similarity will likely derive from file type, interpreter used, or file access patterns.

Install issues:

  WARNING: The script pkginfo is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script dulwich is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script doesitcache is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script virtualenv is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script keyring is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pyproject-build is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script jsonschema is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script poetry is installed in '/home/jack/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed attrs-23.1.0 build-0.10.0 cachecontrol-0.12.14 cleo-2.0.1 crashtest-0.4.1 distlib-0.3.7 dulwich-0.21.5 filelock-3.12.2 html5lib-1.1 importlib-metadata-6.8.0 installer-0.7.0 jaraco.classes-3.3.0 jsonschema-4.19.0 jsonschema-specifications-2023.7.1 keyring-23.13.1 lockfile-0.12.2 msgpack-1.0.5 packaging-23.1 pkginfo-1.9.6 platformdirs-3.10.0 poetry-1.5.1 poetry-core-1.6.1 poetry-plugin-export-1.4.0 pyproject-hooks-1.0.0 rapidfuzz-2.15.1 referencing-0.30.2 requests-toolbelt-1.0.0 rpds-py-0.9.2 shellingham-1.5.0.post1 tomli-2.0.1 tomlkit-0.12.1 trove-classifiers-2023.8.7 virtualenv-20.24.3 webencodings-0.5.1
usermod: group 'qemu' does not exist
"./packer_templates": stat ./packer_templates: no such file or directory
Please reboot after this

Something with file hashes

  • Summary - Answering this question would tell us if this binary is considered ransomware.
  • Query -
  • Picture of Graph -
  • Picture of Table -

Might need to remove this as it's nothing more difficult than a single query match, but file hashes are a common observable that is used in threat intelligence. I do not believe there is a way to compare file hashes for similarity within Neo4J. In fact I believe similarity comparison for file hashes they would have to be of a certain type (not MD5). @RCooley might be able to give insight.Summary - Answering this question would tell us if this binary is considered ransomware.

  Query -

    
  Picture of Graph -

    
  Picture of Table -

Might need to remove this as it's nothing more difficult than a single query match, but file hashes are a common observable that is used in threat intelligence. I do not believe there is a way to compare file hashes for similarity within Neo4J. In fact I believe similarity comparison for file hashes they would have to be of a certain type (not MD5). @Rcooley might be able to give insight.

Cape2STIX Updates

[ ] - Files dropped by malware should be in a different category than reads/writes/deletes.
[ ] - System calls aren't terribly important. We would want to encapsulate them inside a dictionary. However, if we get dictionaries that are megs big, we wouldn't want them

INETSIM extra protocols

  • Add HTTPS
  • Add SSH
  • Add FTP
  • Add Telnet
  • Add SMB/SAMBA
  • Add fake socket (nc, socat) for ports 20000/TCP and 502/TCP

catch invalid cape reports

ERROR:root:'target'
Traceback (most recent call last):
cape2stix/cape2stix/scripts/convert.py", line 188, in convert
if self.content["target"]["category"] == "file": # NOTE: i don't have enough reports to test if this will ever not be true;this is for safety -wb

KeyError: 'target'                                                                                                      
CRITICAL:root:File failed to convert: 

Registry Autostart

MATCH (m:malware) -[n]-> (r:windows-registry-key WHERE r.key =~ '.CurrentVersion\\Run\\.' OR r.key =~ '.CurrentVersion\\RunOnce\\.') RETURN m,r

add logging for converted files

  • when converting in convert.py, failed conversions need the file path logged.
  • catch and log failures with [target][category]
  • catch and log attack pattern/extension fails

Test/Fix Win7

  • Executed Commands
    • Win 10
    • Win 7
  • Word/Excel Macros
    • Win 10
    • Win 7
  • Process Capture
    • Win 7

Finalize documentation

Add the following

  • Information about obtaining the base qcow files
  • How to export json reports
  • Fix Neo4j documentation - a lot is missing

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.