All Projects → nextcloud → suspicious_login

nextcloud / suspicious_login

Licence: AGPL-3.0 License
Detect and warn about suspicious IPs logging into Nextcloud

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to suspicious login

picosnitch
Monitor network traffic per executable using BPF
Stars: ✭ 422 (+837.78%)
Mutual labels:  intrusion-detection
wazuh-ansible
Wazuh - Ansible playbook
Stars: ✭ 166 (+268.89%)
Mutual labels:  intrusion-detection
kdd99-scikit
Solutions to kdd99 dataset with Decision tree and Neural network by scikit-learn
Stars: ✭ 50 (+11.11%)
Mutual labels:  intrusion-detection
NetLearner
Deep Learning Tool for Off-line Network Intrusion Detection System
Stars: ✭ 24 (-46.67%)
Mutual labels:  intrusion-detection
wazuh-packages
Wazuh - Tools for packages creation
Stars: ✭ 54 (+20%)
Mutual labels:  intrusion-detection
UNSW NB15
Feature coded UNSW_NB15 intrusion detection data.
Stars: ✭ 50 (+11.11%)
Mutual labels:  intrusion-detection
Intrusion Detection
Whenever founds internet connectivity confirms is it you, if not log you off and send you image of intruder.
Stars: ✭ 24 (-46.67%)
Mutual labels:  intrusion-detection
NIDS-Intrusion-Detection
Simple Implementation of Network Intrusion Detection System. KddCup'99 Data set is used for this project. kdd_cup_10_percent is used for training test. correct set is used for test. PCA is used for dimension reduction. SVM and KNN supervised algorithms are the classification algorithms of project. Accuracy : %83.5 For SVM , %80 For KNN
Stars: ✭ 45 (+0%)
Mutual labels:  intrusion-detection
DeepLearning-IDS
Network Intrusion Detection System using Deep Learning Techniques
Stars: ✭ 76 (+68.89%)
Mutual labels:  intrusion-detection
TheBriarPatch
An extremely crude, lightweight Web Frontend for Suricata/Bro to be used with BriarIDS
Stars: ✭ 21 (-53.33%)
Mutual labels:  intrusion-detection
ocr
Nextcloud OCR (optical character recoginition) processing for images with tesseract-js
Stars: ✭ 98 (+117.78%)
Mutual labels:  nextcloud-app
BURN
[WIP] Anti-Forensics ToolKit to clear post-intrusion sensible logfiles 🔥 (For Research Only)
Stars: ✭ 13 (-71.11%)
Mutual labels:  intrusion-detection
nextcloud twofactor webauthn
WebAuthn Two-Factor Provider for Nextcloud
Stars: ✭ 34 (-24.44%)
Mutual labels:  nextcloud-app
ldapcontacts
View other LDAP users as contacts in Nextcloud and see the personal data they shared
Stars: ✭ 18 (-60%)
Mutual labels:  nextcloud-app
wazuh-puppet
Wazuh - Puppet module
Stars: ✭ 25 (-44.44%)
Mutual labels:  intrusion-detection
fever
fast, extensible, versatile event router for Suricata's EVE-JSON format
Stars: ✭ 47 (+4.44%)
Mutual labels:  intrusion-detection
ldap write support
👥🖎 create, edit and delete LDAP users and groups from Nextcloud
Stars: ✭ 15 (-66.67%)
Mutual labels:  nextcloud-app
vagrant-ids
An Ubuntu 16.04 build containing Suricata, PulledPork, Bro, and Splunk
Stars: ✭ 21 (-53.33%)
Mutual labels:  intrusion-detection
MStream
Anomaly Detection on Time-Evolving Streams in Real-time. Detecting intrusions (DoS and DDoS attacks), frauds, fake rating anomalies.
Stars: ✭ 68 (+51.11%)
Mutual labels:  intrusion-detection
apporder
Nextcloud app to enable sorting inside the app menu
Stars: ✭ 30 (-33.33%)
Mutual labels:  nextcloud-app

🔮 Nextcloud Suspicious Login Detection

Detect and warn about suspicious IPs logging into Nextcloud

Downloads Build Status Dependabot Status

The app is still under development, so it’s time for you to get involved! 👩‍💻

How it works

Data collection

Once this app is enabled, it will automatically start tracking (IP, uid) tuples from successful logins on the instance and feed them into the login_address table. This insert operation is executed for the majority of requests (client authenticate on almost all requests) and therefore has to be fast. In a background job, these rows will be transformed into an aggregated format that is suitable for the training of the neural net. The (IP, uid) tuple becomes (IP, uid, first_seen, last_seen, seen) so that we know which (IP, uid) tuple has been seen first and last. The aggregated data is a compressed format of the raw data. The original data gets deleted and thus the database does not need much space for the collected login data.

Neural net

When enough data is collected – which by default is 60 days (!) – a first training run can be started.

The app registers a background job that invokes the training once a day. As long as there isn't sufficient data, no trained model is generated.

Manual training

The training can also be invoked via the OCC command line tool:

php -f occ suspiciouslogin:train

This command uses several sensible default that should work for instances of any size. The --stats flag is useful to see the measured performance of the trained model after the training finishes. The duration of the training run depends on the size of the input training set, but is usually between two to 15 minutes.

The full list of parameters, their description and default values can be seen with

php -f occ suspiciouslogin:train --help

Hyper parameter optimization (optional)

To find the best possible parameters for the training it's possible to start a hyper parameter optimization run via the CLI:

php -f occ suspiciouslogin:optimize

This command uses the heuristic simulated annealing algorithm to find optimal parameter sets in the multidimensional parameter space. By default this will do 100 steps consisting of five training runs per step, hence this command might take a few days to execute on large instances. On smaller ones it will also take a few hours.

Login classification

As soon as the first model is trained, the app will start classifying (IP, uid) tuples on login. In contrast to the data collection it won't consider requests authenticated via an app password as suspicious. Should it detect a password login where the (IP, uid) is classified as suspicious by the trained model, it will add an entry to the suspicious_login table, including the timestamp, request id and URL.

Development setup

  1. Clone the app into the apps folder of your Nextcloud: git clone https://github.com/nextcloud/suspicious_login.git
  2. 💻 Run npm i or krankerl up to install the dependencies
  3. 🏗 To build the Javascript whenever you make changes, run npm run dev
  4. Enable the app through the app management of your Nextcloud or run krankerl enable
  5. 👍 Partytime! Help fix some issues and review pull requests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].