Code Monkey home page Code Monkey logo

malwarehouse's Introduction

Malwarehouse is a warehouse for your malware. Malwarehouse is a useful command line utility for storing, tagging, storing, and searching for malware. This is intended to help analyst manage their workflow by conducting basic triage and making it easy to look up past samples.

Requirements

  • Python 2.7

Libraries

Authors

Setup - Databases

For initial DB setup, run python setup_db.py Using sqlalchecmy, Malwarehouse can now support a wider variety of database engines.

  • You simply need to create the database and a user account with sufficient read/write privileges.
  • Once created, setup the database section of the malwarehouse.cfg file accordingly.
    • EXAMPLE: postgresql://USER:PASSWORD@SERVER/DB

For more information, refer to http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html#database-urls

Usage

malware_manager.py [-h] [-r [RECENT]] [-s SOURCE] [-t TAGS] [-n NOTES]
                       [-f FIND] [-l LOAD] [-d DELETE]

-h 	displays help
-r 	search db for most recent n samples [default=5]
-f	search db for a sample either by md5 or sha256
-l 	load a new sample to the db for analysis
-s      add source text of the sample to the report
-n	add additional text notes to the report

Plugins

Malwarehouse now allows you to seamlessly integrate your own plugins to automagically run during analysis. For now, please see the virus total plugin for reference.

License

See LICENSE for more information

Thanks

  • Jonathan Hencinski
  • Chris St.Myers
  • @Xen0ph0n

malwarehouse's People

Contributors

sroberts avatar warebot 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

malwarehouse's Issues

Found a bug when non existant file is submitted

Hey scott, I'm throwing VT/Exiftool/Yara & SSdeep into this guy and gonna try to make search cover all of that stuff...probably not going to be useful to anyone but me in the end, but I found the following with the base .py when I tired to submit a non existent file it would puke because it was trying to call parser which didn't exist yet.

So I changed it to exit this way instead of try to call parser.. seems to work.

except IOError as e:
    print "You specified an invalid malware target path."
    exit(0)
    return False

Look at integrating Zynamics VXClass features

One of the biggest insprerations as I started working on Malwarehouse was Zynamics VxClass. I never got a chance to use it, but the possibility of doing this sort of triage malware analysis, the boiler plate stuff that takes up the first few chapters of every good malware analysis book(such as Practical Malware Analysis & the Malware Analysts Cookbook).

There were a ton of great features in VxClass that don't seem to be met in a unified tool since Google took VxClass off the market (with no hope of bringing it back). Integrating some of these features could be a boon, and intersects with some of @technoskald's work on Konig

References:

Implement SQLite

Basic schema:

# Setup Database
__tablename__ = malwarehouse_index

meta_id = Column(Integer, primary_key=True)
meta_datetime = Column(String)

basic_filename = Column(String)
basic_size = Column(Integer)

mimetype = Column(String)
tags = Column(String)

hash_md5 = Column(String)
hash_sha256 = Column(String)
hash_ssdeep = Column(String)

user_source = Column(String)
user_notes = Column(String)

A good ideal longterm for supporting larger datasets, but it's a lot to bite off now with all the other restructuring.

Searching names

Howdy

Great work on this by the way. It's very useful.

It may just be me and my weird samples, but I've had to modify the search function a little. What I do is convert the string given in the argument to lower case so that not matter what it should be found.

The Gist of the code is here if you want to take a look https://gist.github.com/3871159

Let me know what you think

./matt

Look into "magic" library issues on other Unixes

Trying out latest malwarehouse.py on a couple of systems. It appears
that the magic library used in malwarehouse is different than that of
other systems I have. The version on my FreeBSD and OS X don't
implement the magic.Magic class. OpenBSD does.

I notice MHL ran up against this in pescanner.py too. This is how he
handled it there:

-----

def get_filetype(data):
"""There are two versions of python-magic floating around, and
annoyingly, the interface
changed between versions, so we try one method and if it fails,
then we try the other.
NOTE: you may need to alter the magic_file for your system to
point to the magic file."""
if sys.modules.has_key('magic'):
try:
ms = magic.open(magic.MAGIC_NONE)
ms.load()
return ms.buffer(data)
except:
try:
return magic.from_buffer(data)
except magic.MagicException:
magic_custom =
magic.Magic(magic_file='C:\windows\system32\magic')
return magic_custom.from_buffer(data)
return ''

-----

Dependencies : poster is needed

Hi,

Apparently poster is needed but not listed in the requirements :

~/Perso/malwares/malwarehouse(branch:master*) » python2 malware_manager.py -h                       
/home/me/Perso/malwares/malwarehouse/extensions/plugins
Traceback (most recent call last):
  File "malware_manager.py", line 14, in <module>
    import extensions.plugins
  File "/home/me/Perso/malwares/malwarehouse/extensions/plugins/__init__.py", line 18, in <module>
    __load_modules('.')
  File "/home/me/Perso/malwares/malwarehouse/extensions/plugins/__init__.py", line 15, in __load_modules
    exec('from ' + m + ' import *')
  File "<string>", line 1, in <module>
  File "/home/me/Perso/malwares/malwarehouse/extensions/plugins/virus_total.py", line 3, in <module>
    from poster.encode import multipart_encode
ImportError: No module named poster.encode

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.