Code Monkey home page Code Monkey logo

anomaly-detection-and-monitoring's Introduction

Anomaly detection and monitoring Appveyor

This program uses client-server model.

  • Client collects data (traffic data, logon/logoff time) and sends it to server.
  • Server (has GUI) receives data and calculates score, which describes user behaviour anomaly. Anomaly score is between 0 and 100. Also server can obtain keyboard log and screenshots from clients.

Getting started

Prerequisites

  • Windows 7/8/10
  • Winpcap driver

Usage

server.exe port path
  • port - TCP port, used by clients to connect
  • path - path, used to receive data
client.exe ip dest_port local_port path
  • ip - server's ip
  • dest_port - server's port
  • local_port - TCP port, used to send data
  • path - default path to collect data

โ— For correct score measuring it's needed to collect data at least for 7 days of normal user behaviour.

Program structure

  • Client
    • Sniffer module
    • Keylogger module
    • Screenshot module
  • Server
    • Score calculation module

See architecture diagram

Sniffer

Collects parameters of traffic going through user's PC:

  • Size of incoming traffic
  • Number of unique incoming IP-addresses
  • Size of outgoing traffic
  • Number of unique outgoing IP-addresses

Keylogger

This module uses filter function, which gets keypresses. This function connects to WH_KEYBOARD_LL hook by using WinAPI function SetWindowsHookEx.

All keypresses are saved in fullData.log. This file contains path to process and data:

C:\ProgramFiles (x86)\Google\Chrome\Application\chrome.exe 18:12:06 22.07.2018
Hello, world! 

Screenshot

Filter function connects to WH_MOUSE_LL hook. All screenshots can be saved by:

  • Timer timeout (seconds)
  • Mouse clicks (right/left/middle mouse buttons)
  • Mouse wheel

Score

This module gets traffic data, login and logoff time and total session time as input and outputs anomaly score and contributions.

Parameters:

  • N - number of observations of normal user behaviour
  • d0 - distance of the 50% score
  • k - steepness of the curve, which used to calculate score
  • weights - vector used to correct score
  • one-sided deviations - used to calculate only positive or negative deviations
  • contribution - result of algorithm, contribution rate of each feature

See full flowchart of score measuring and anomaly detection algorithm .docx [RU]

Server's GUI

Server GUI

Built With

  • Eigen31
  • Libtins2
  • Winpcap3
  • WinAPI
  • GDIPlus

License

This project is licensed under the MIT License - see the LICENSE.md file for details

anomaly-detection-and-monitoring's People

Contributors

djgorillaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

frankfanslc

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.