GithubHelp home page GithubHelp logo

datatransferxx / bam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nsacyber/bam

0.0 0.0 0.0 167 KB

The Binary Analysis Metadata tool gathers information about Windows binaries to aid in their analysis. #nsacyber

License: Other

Python 89.88% C 5.24% PowerShell 3.96% Batchfile 0.92%

bam's Introduction

BAM - Binary Analysis Metadata

"You just throw it in and BAM! It works!"

The Binary Analysis Metadata (BAM!) tool collects and analyzes Windows updates, binaries, and symbols.

Design

Goal

Develop a tool that can scan Windows updates, store information about those updates, obtain symbols for binary files, and analyze said information

Requirements

  • Must have the least amount of dependencies (portability)
  • Must be able to run anywhere where python 3.7+ is installed
  • Must be efficient (threads over process and/or I/O or memory bound)
  • Must be compatible to new python versions
  • Backed by SQLite for quick lookup of patches and symbols
  • Microsoft's symsrv.dll and symsrv.yes MUST be placed in \Windows\System32\ by an administrator due to symchk.exe's functionality
  • Must enable the "Enable Win32 long paths" group policy under "Administrative Templates\System\FileSystem" beginning with Windows 10 1607 (Anniversary Update)
  • Must add location of Microsoft Debugging tools to PATH environment variable

Runtime Requirements

Microsoft's Symbol Connection and Download EULA

symchk.exe will prompt the user to accept an Microsoft EULA when a symbol is going to be download from Microsoft's server. The symsrv.yes file (i.e., the YES file) is part of the Windows SDK installation in \Debugger<arch>\ and is used to silently accept the Microsoft EULA to download the symbols from their servers. You can remove this file to individually accept/denied the EULA.

Group Policy

Enable the Enable Win32 long paths policy under Administrative Templates > System > FileSystem. Due to the nature of how Windows updates are structured and named, they are given very long names when decompressed. BAM! will not run unless this group policy is enabled. Additionally, to avoid other long name errors during extraction and until the issue is resolved in the program, extract update contents to a single character named directory.

Hardware

  • 32GB of RAM
  • 10TB of disk space for extracted contents and downloaded symbols
  • 5TB of disk space for WSUS to download updates only (i.e., not OS/feature/service pack upgrades)
  • 10 virtual processors

Dependencies

Usage

Display help

py.exe main.py

Create or use current DB, extract files at path to updates, download symbols from Microsoft's symbol server (initially or continuous use) and store them at path to where syms are to be stored:

py.exe main.py -x -p "path to updates" -pd "path to extract files to" -sp "path to where syms are to be stored"

Note: The script will always attempt to re-download symbols for PE files previously not downloaded.

Create or use current DB, extract files and download symbols from a specific symbol server (initially or continuous use):

py.exe main.py -x -p "path to updates" -pd "path to extract files to" -ss "symstore location" -sp "path to where syms are to be stored"

Note: The script will always attempt to re-download symbols for PE files previously not downloaded.

Create or use current DB, extract files and verify symbols using local symstore (initially or continuous use):

py.exe main.py -x -p "path to updates* -pd "path to extract files to" -sl -ss "directory path to symstore location or symbol location" -sp "path to where syms are to be stored"

Create or update current DB (requires update file, extracted files, downloaded symbols):

py.exe main.py -c -p "path to updates" -pd "path to extract files too" -sl -ss "directory path to symstore location or symbol location" -sp "path to where syms are to be stored"

bam's People

Contributors

iadgovadmin avatar iadgovuser1 avatar iadgovuser35 avatar iadgovuser8 avatar

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.