##Installation##
Precompiled application packages are available for Linux and OS X. Download one of the current application packages below:
Next, download the latest drones python package here.
Running lair from the application package above is self-explanatory. To start Lair and all the required services:
./start.sh <ip>
To stop Lair:
./stop.sh
##Drones## Lair takes a different approach to uploading, parsing, and ingestion of automated tool output (xml). We push this work off onto client side scripts called drones. These drones connect directly to the database. To use them all you have to do is export an environment variable "MONGO_URL". This variable is probably going to be the same you used for installation
export MONGO_URL='mongodb://username:password@ip:27017/lair?ssl=true'
With the environment variable set you will need a project id to import data. You can grab this from the upper right corner of the lair dashboard next to the project name. You can now run any drones.
drone-nmap <pid> /path/to/nmap.xml
You can install the drones to PATH with pip
pip install lairdrone-<version>.tar.gz
##Contributing##
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
##Setting up a development environment (OSX)##
- Install mongodb 2.6.0 or later preferably with ssl support (
brew install mongodb --with-openssl
) - If using SSL then perform the following to setup certs:
openssl req –new –x509 –days 365 –nodes –out mongodb-cert.crt –key out mongodb-cert.key
cat mongodb-cert.crt mongodb-cert.key > mongodb.pem
- Start Mongo with SSL support via mongod.conf or command line (
mongod —sslMode requireSSL —sslPEMKeyFile mongodb.pem
)
- Add a Lair database user:
mongo lair --ssl
db.createUser({user: "lair", "pwd": "yourpassword", roles:["readWrite"]});
- Confirm user authentication:
db.auth("lair", "yourpassword");
- Set the appropriate Lair environment variable...
- With SSL:
export MONGO_URL=mongodb://lair:yourpassword@localhost:27017/lair?ssl=true
- No SSL:
export MONGO_URL=mongodb://lair:password@localhost:27017/lair
- Download and install node.js
- Install Meteor:
curl https://install.meteor.com | /bin/sh
- Install Meteorite package manager:
sudo npm install -g meteorite
- Fork the Lair project on GitHub and clone the repo locally
- Install dependencies:
cd /path/to/lair/app && mrt
(you can kill the mrt process after dependencies are downloaded) - Start Lair:
cd /path/to/lair/app && meteor
- Browse to http://localhost:3000
- Code your changes and submit pull requests!
There are occasional issues and confilicts with Meteor and the Fibers module. If you run into a situation where you cannot start Meteor due to Fibers conflicts, refer to the following for potential fixes:
##Contact## If you need assistance with installation, usage, or are interested in contributing, please contact Dan Kottmann at any of the below.
Dan Kottmann