Giter VIP home page Giter VIP logo

ansible-loki's Introduction

No Maintenance Intended

DEPRECATED/LOOKING FOR MAINTAINERS -> to be archived soon

Actions Status - Master Actions Status - Devel

Appveyor - Master Appveyor - Devel

Loki ansible role

A simple ansible role to execute loki, a Simple IOC and Incident Response Scanner.

Requirements & Dependencies

Ansible

It was tested on the following versions: 1.9 to 2.11

Operating systems

Tested Ubuntu 18.04, 20.04 and Centos 7 and 8.

Example Playbook

Just include this role in your list. For example

- host: myhost
  roles:
    - juju4.loki

you probably want to review variables

Variables

prefix: "{{ ansible_fqdn }}"
dst_mount: "/tmp/cases"
dst_path: "{{ dst_mount }}/{{ prefix }}-incidentreport"

## do we want to install new packages? might be required if building kernel module for example
## allow ansible to download stuff which does not exist, eventually build it?
## more impacting the evidence but sometimes have no choice...
do_download: true
do_build: true
do_install: true

bin_path: "/tmp/ir-bin"

loki_scan_path: "/"

bin_path_win: "c:\\temp\\ir-bin"
dst_path_win: "c:\\temp"
#loki_scan_path_win: "c:\\"
loki_scan_path_win: "c:\\windows"

loki: true
#loki_args: "--dontwait --intense --onlyrelevant --noindicator"
loki_args: "--dontwait --intense --noindicator"
  • bin_path: can be a network path or removable media. If local and download/build/install is enabled, the role will add everything necessary. Of course, from a forensic perspective, better if everything is setup either before locally (but can be altered) or a network read-only share
  • dst_path: where to store the output. again, came be local or remote.

Continuous integration

Work in progress!!!

you can test this role with test kitchen. In the role folder, run (Not working)

$ gem install winrm-fs
$ kitchen verify

(manual working)

$ kitchen create ansible-ubuntu-1404
$ kitchen create windows-windows-2012r2
?$ cp .kitchen/kitchen-vagrant/kitchen-ansible_repo-tomcat-centos-70/.vagrant/machines/default/virtualbox/private_key spec/tomcat_private_key.pem
?$ cp .kitchen/kitchen-vagrant/kitchen-loki-ansible-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key spec/

$ kitchen login ansible-ubuntu-1404
    $ sudo apt-get -y install krb5-config python-pip
    $ sudo pip install xmltodict
    $ sudo pip install "pywinrm>=0.1.1"
## manually configure windows host for ansible (ConfigureRemotingForAnsible.ps1) as packer is still not doing it.
## BUG/FIXME! VMs cant reach other be it by ping (firewall opened) or winrm
$ kitchen converge ansible-ubuntu-1404
$ kitchen verify ansible-ubuntu-1404

or

$ pip install molecule docker
$ molecule test
$ MOLECULE_DISTRO=ubuntu:20.04 molecule test --destroy=never

Known bugs

Troubleshooting & Known issues

  • time depending on box, Loki can take a while. Role enforce 1h limit (valid only on unix), just in case.

License

BSD 2-clause

ansible-loki's People

Contributors

juju4 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

g5paul

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.