GithubHelp home page GithubHelp logo

idiom / punbup Goto Github PK

View Code? Open in Web Editor NEW

This project forked from herrcore/punbup

1.0 1.0 1.0 158 KB

Python unbup script for McAfee .bup files (with some additional fun features). This script is fully implemented in python it's not just another wrapper around 7zip!

License: Other

Python 100.00%

punbup's Introduction

Python unbup script for McAfee .bup files - with some additional fun features. Simple usage will extract all files from a .bup to a directory with the same name as the bup file.

What makes this script unique is that it is fully implemented in python it's not just another wrapper around 7zip! This means that you are free to run this with any non-python dependencies. Download, install the dependencies from your favourite python package manager and get un-bupping!

Dependencies

Before you can use the script you will need to install the OleFileIO_PL. You can use a package manager such as easy_install or you can just download and install the library directly from the project site.

Quick Start

  • Extract all files from 7dea15dd393591.bup to folder 7dea15dd393591/
./punbup.py 7dea15dd393591.bup

* Extract all files from 7dea15dd393591.bup to folder 7dea15dd393591/ and rename files to their original names (their file names as noted when they were quarantined). ``` ./punbup.py -o 7dea15dd393591.bup ```
* Print the contents of the Details file to stdout. Don't extract any files (disk won't be written to). ``` ./punbup.py -d 7dea15dd393591.bup ```

##Usage

usage: punbup.py [-h] [-d] [-o] infile

This script can be used to extract quarantined files from a McAfee .bup file.
If run with no additional options the script will extract all files from the
.bup and place them in a folder with the same name as the supplied .bup file.

positional arguments:
  infile          The file that you wish to un-bup.

optional arguments:
  -h, --help      show this help message and exit
  -d, --details   Only print the contents of the Details file. Don't extract
                  any files.
  -o, --original  Rename all quarantine files to their original names as noted
                  in the Details file. Some assumptions have been made for
                  this to feature to work. Use at your own risk.
  -c {md5,sha1,sha256}, --hash {md5,sha1,sha256}
                  Calculates the hash for all of the files in the bup.

##Features ###Fully Implemented In addition to extracting files from a .bup file the script has the option to rename the files to their original name (instead of File_0, File_1, etc).

The script also provides an option to just print the Details file and not extract any files. This allows an analyst to quickly investigate a bup file without having to extract anything to disk (very helpful in some environments).

The script should be fully platform independent. It has been tested and confirmed on some versions of Linux, Windows, OSX.

###Future If you take a look at the script you will see that there is a Details file parser that can be used to extract the .bup Details file into a dictionary. This dictionary is used to implement some features in the script but it has real potential to be extended. Stay tuned!

##History Just to set the record straight .bup files have nothing to do with the "7-zip" file format (LZMA). It is a mystery why there are tons of "unbup" scripts that all just wrap 7zip. The .bup file is actually a Compound File Binary File Format file. There is no need to bring 7zip into the picture, CFB/OLE files are well understood and can be parsed by the OleFileIO_PL library. So, hopefully, after many years of 7zip dependency pain we finally have a dependency-less unbup script.

##Support For questions, suggestions, collaborations, or if you just want to complain you can hit me up on twitter @herrcore.

punbup's People

Contributors

didierstevens avatar herrcore avatar idiom avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

didierstevens

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.