Giter Site home page Giter Site logo

mozdef_lib's Introduction

mozdef_lib

Python lib for MozDef clients.

Install

As a python module

Manually: .. code:

make install

As a rpm/deb package .. code:

make rpm
make deb
rpm -i <package.rpm>
dpkg -i <package.deb>

From the code/integrate in my code

Add to your project with:

git submodule add https://github.com/gdestuynder/mozdef_lib mozdef
git commit -a

Python dependencies

  • requests_futures for python2 (optional but highly recommended, else messages are synchronous)
  • pytz

Usage

Note

If you can, it is recommended to fill-in details={}, category='' and severity='' even thus those are optional.

MozDef message structure

These are also the 'internal attributes' which you can modify.

{
    "category": "authentication",
        "details": {
            "uid": 0,
            "username": "kang"
        },
        "hostname": "blah.private.scl3.mozilla.com",
        "processid": 14619,
        "processname": "./mozdef.py",
        "severity": "CRITICAL",
        "summary": "new test msg",
        "tags": [
            "bro",
        "auth"
            ],
        "timestamp": "2014-03-18T23:20:31.013344+00:00"
}

Certificate handling

During testing with self-signed certificates, it may be useful to disable certificate checking while connecting to MozDef. It may also just be that you have a custom CA file that you want to point to.

That's how you do all this:

msg.verify_certificate = False # not recommended, security issue.
msg.verify_certificate = True # uses default certs from /etc/ssl/certs
msg.verify_certificate = '/etc/path/to/custom/cert'

Note

Disabling certificate checking introduce a security issue and is generally not recommended, specially for production.

mozdef_lib's People

Contributors

gdestuynder avatar

Watchers

James Cloos avatar Anthony VEREZ 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.