BTA: open-source Active Directory security audit framework
BTA – Active Directory security audit framework
BTA is an open-source Active Directory security audit framework. Its goal is to help auditors harvest the information they need to answer such questions as:
- Who has rights over a given object (computer, user account, etc.)?
- Who can read a given mailbox?
- Which are the accounts with domain admin rights?
- Who has extended rights (userForceChangePassword, SendAs, etc.)?
- What are the changes done on an AD between two points in time?
The framework is made of
- an importer able to translate a ntds.dit file, containing all the AD data, into a database
- tools to query the database
- AD miner framework
- AD diff utility
- small utilities (list of databases, etc.)
The comprehensive set of attributes are imported and can be querried including all schema extensions (Exchange, Sharepoint, etc.).
Each question can be crystallized by an AD expert as a miner so that it can be used during all audits without doing the hard work again.
Installing BTA
Quick install
Dependencies:
- mongodb (apt-get install mongodb-server)
- python headers (apt-get install python-dev)
- libesedb 2012 alpha version [1]
- https://bitbucket.org/iwseclabs/bta/downloads/libesedb-alpha-20120102.tar.gz SHA-1 2aba34b1c9703a28b8913019044efa3ff53428fb
- Build it. Install it or have LD_LIBRARY_PATH point to it when using btaimport
Installation:
- pip install bta
From sources
Dependencies:
- mongodb (apt-get install mongodb-server python-pymongo)
- libesedb 2012 alpha version [1]
- https://bitbucket.org/iwseclabs/bta/downloads/libesedb-alpha-20120102.tar.gz SHA-1 2aba34b1c9703a28b8913019044efa3ff53428fb
- Build it. Install it or have LD_LIBRARY_PATH point to it when using btaimport
- openpyxl (>= 2.0.2)
Installation:
- python setup.py install
Active Directory Security Analysis
Goal:
- Clean an AD or an AD forest, looking for
- bad practices
- forgotten entries
- backdoors
- recompromissions
- BTA is an operationnal tool, ought to be
- deterministic, reliable
- running a well-established procedure
Protocol
Audit steps:
- Extract the ntds.dit file
- Import the ntds.dit file in a database
- Look for control points in the database