Git Product home page Git Product logo

web_ids's People

Contributors

geo-bert avatar matthiastxt avatar mhatzl avatar nfejzic avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

manuelsperl

web_ids's Issues

Alternative to Environment Variables

I was wondering, maybe it would be easier to use Flags Package instead of Environment Variables for debugging, testing and maybe even future features?

I would try to implement this, as it would allow us to provide redis channel name through flag for example. Thoughts?

Rename Overview.md to README.md

In my opinion we should rename web_ids/doc/Overview.md to web_ids/doc/README.md. This would lead to it auto showing when viewing the doc subfolder in github.

Add UIDs for signatures

Unique IDs should be added to signatures for easier referencing.
To prevent collisions, the ID must only be unique inside one file. Internally, web_ids adds the filename to the ID, so every signature can be uniquely identified.

See pull request #6 on why this feature might be useful

Adapt reading of signature files for new syntax

New syntax was decided in issue #2

In short, new syntax of signature files:

ipSignature is an array of ips.
requestSignature can have any of the following keys: method, status, uri. and body. At least one of those keys must be provided, but others are optional and get treated as AND conditions.

Implementation idea:
two functions to match a request.

  1. match against array of ipSignature
  2. match against array of requestSignature, checking if a key is present and trying to match request against it

Signature file and web_ids interplay

Currently, there are several keys per signature type, which is nice, if we want to have several values, a request must match before being considered malicious.
But how should we use those keys inside web_ids?

Additionally: Should we add a key to specify, if something that matches is malicious, warning, ok, ... ?

web_ids crashes on invalid regex

web_ids crashes, if an invalid regex was provided in a signature file.

fix:
web_ids shall not crash and the invalid regex string shall be logged

Matching problem in checkRequest()

Typo when checking the uri signature.

hasMatch must be initially set to true, since matches are combined over AND
request method not combined per AND

Adapt signature files to syntax described in issue #2

idea behind see end of issue #2

in short:

ipSignature is an array of ips.
requestSignature can have any of the following keys: method, status, uri. and body. At least one of those keys must be provided, but others are optional and get treated as AND conditions.

A possible signature file would then look like:

{
"ipSignature" : [ "^10\.0\.0\.10$", "^192\.168\.0\.255$" ],

"requestSignature" : [
{
"uri" : ".*\.php"
} ,
{
"method" : "GET",
"body" : ".+"
},
{
"status" : "[45]\d\d"
}
]
}

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.