Remotely collect linux live forensics artifacts.
Ansible Playbook that uses OSquery to collect linux live forensics artifacts from a remote machine.
- Single File per machine - zipped TXT/CSV/JSON output
- Complete Execution Logs
- Listing of all results returned from a sample machine
To be able to see this in action
- Clone this repository
git clone https://github.com/anelshaer/Remote-Linux-Triage-Collection-using-OSquery.git
cd dev/
- [Install Docker] (https://docs.docker.com/get-docker/)
- Build Docker images for IR/Control node, 2 target machines.
sudo docker build -t ansible-control -f Dockerfile.ansible .
sudo docker build -t ansible-osquery-c7 -f Dockerfile.centos .
sudo docker build -t ansible-osquery-u1604 -f Dockerfile.ubuntu .
- Run docker-compose
docker-compose up --abort-on-container-exit
- Find the collection artifacts located under a new directory named
playbooks/triage_results
- Ansible - should be installed on the IR machine
- OSquery - One condition is required
- OSquery Package installed on the remote machines.
- OSqueri exists locally on the IR machine.
- Pushed to the remote during the execution.
- Cleaned from the remote after the execution
-
Clone the repository
-
Change Directory to
playbooks
-
The current
Inventory/hosts
meant to be used with the demo environment, add/change hosts as needed. -
OSqueryi has to be located at
files/bin/osqueryi
-
Run the playbook you may use one of these commands depending on the needed output format:
'Run Remote Collection with TXT output'
ansible-playbook -i Inventory/hosts remote_linux_triage_collection.yaml
echo 'Run Remote Collection with JSON output'
ansible-playbook -i Inventory/hosts -kK remote_linux_triage_collection.yaml --extra-vars '{"json_logs": true}'
echo 'Run Remote Collection with CSV output'
ansible-playbook -i Inventory/hosts -kK remote_linux_triage_collection.yaml --extra-vars '{"csv_logs": true}'
Note: you may need to use these options
- ask for connection password
-k, --ask-pass
- ask for privilege escalation password
-K, --ask-become-pass
- See below Example
ansible-playbook -i Inventory/hosts -kK remote_linux_triage_collection.yaml
- Find the collection artifacts located under a new directory named
playbooks/triage_results
Please file an issue on GitHub or contact me directly.
- 0.1
- Initial Release
This project is licensed under the MIT License - see the LICENSE.md file for details