Owlyshield is an open-source AI-driven behaviour based antiransomware engine written in Rust.

Overview

Owlyshield

Owlyshield Discord Email (mailto:[email protected])

We at SitinCloud strongly believe that cybersecurity products should always be open-source:

  1. Critical decisions about your company cybersecurity strategy cannot be based only on marketing propaganda
  2. Interface the software with third-party tools, or even customize it, should be easy, or at least possible
  3. Check the software does not add a new vulnerability to your organisation is critical. This cannot be done with closed sources products whose vulnerabilities are only known from attackers (see our blog for a real life example involving fortinet)

Owlyshield is an open-source AI-driven behaviour based antivirus engine written in Rust. As of now, the model was specifically trained to detect and kill ransomwares but we think this technology can be used in a more general way to detect other malwares categories.

Why still another product against ransomwares ?

Cybersecurity is a game where attacking players have a significant advantage over their victims:

  • Sophisticated weaponry is available for free or at very little cost
  • Crypto-currencies have made collecting ransom and laundering it easy and risk-free
  • SMEs and even mid-caps use a plethora of third-party softwares over which they have no knowledge or control

What we see everyday:

  • Critical sofwares, used daily to manage company core activities like ERPs, full of security holes waiting to be exploited, and editors shirking their resposabilities ("we have no bounty program, hide it behind a VPN")
  • Critical state organisations and large corporations be victims of unsubtle attacks (for example, Sopra-Steria and three public hospitals were severy hit by the Ryuk Ransomware in France this year)
  • IT services relying entirely on closed proprietary security products they don't know anything about ("We lost our data with a ransomware last year. But now we bought XYZ and feel protected"). This is not a sound defense strategy

Community vs commercial versions

Both versions share the same source code. The commercial version adds the following features:

  • Driver signing of the minifilter, allowing it to be intalled without having to start Windows in test-signing mode
  • A webapp gathering all incidents data to help IT staff to understand the scope of the attack within the company networks and act accordingly (or classify it as a false positive)
  • Interfaces with your log management tools (we even provide an API)
  • Scheduled tasks to auto-update the whole application

How it works - Overview

Processes creation defines a family tree where nodes have a unique parent. All processes are children of the Windows System process (pid = 4). This allows us to define subfamilies identified by a group id (which obviously has nothing to do with the Linux one):

Processes family tree

Owlyshield collects and analyse meta-data on inputs and outputs (I/O) using a RNN to monitor and kill suspect processes.

Components

As of now, this model has been trained exclusively on ransomwares (our training exemples set cardinality exceeds 110,000 ransomwares).

Components

Owlyshield consists of the following components:

  • Runtime components:
    • Owlyshield Predict - the prediction unit (user space) collects data from the minifilter to make prediction about running processes. This is a Windows service that depends on the minifilter
    • Installer - to make the installation easier (creation of the two predict and minifilter services and their registry keys)
    • RustWinToast - a basic exe to toast notifications
  • Driver components:
    • Owlyshield Minifilter - the driver (user space), intercepts i/o operations and processes creations that will be used by Owlyshield Predict. The minifilter is also responsible for killing suspect processes families
  • Deep Learning:
    • Keras script used to train the model and create the tflite file used by Owlyshield Predict

We plan to make the following components available to the community in the next future:

  • The malwares to cybersecurity researchers through a new online platform we are working on, including the 100,000 ransomwares we used to train our model

Build Instructions

Prerequisites

You need to install first:

  1. Rust from rust-lang.org (pay attention to take the Visual Studio ABI version if you get it from choco)
  2. VS Studio 2017/2019 with C++ tools (some dependencies like winlog need link.exe)
  3. Windows Driver Kit (WDK)
  4. (Optional) InnoSetup, used to build the installer

Owlyshield Predict

To build the service, run cargo build --release --features service
To build it as a console app (for debug purposes), run cargo build

Make sure to manually copy moonlitefire-tflite/lib/tensorflow_lite_c.dll in target/debug and target/release, near to your generated .exe file.

RustWinToast

To build it, run cargo build --release

Owlyshield Minifilter

  1. Open OwlyshieldMinifilter/OwlyshieldMinifilter.sln in VS
  2. Make sure the configuration manager is set to x64
  3. Build the solution. This builds the driver

Please note the minifilter functional scope may not be changed often and that the released .sys file may let you skip this step.

Installer

  1. Open owlyshield-ransom-community.iss in InnoSetup
  2. Compile the installer. This builds owlyshield-ransom-community.exe (or run it from InnoSetup).

Important:

  • The Owlyshield Predict executable is retrieved from /target/release
  • The rust_win_toast executable is retrieved from /target/release
  • The Owlyshield Minifiter sys, cat and inf files are retrieved from /x64/Debug/FsFilter because the release build needs a signing certificate, which is not always easy to set up

Librairies used

Rust crates used as dependencies by Owlyshield Predict:

  • windows
  • wchar
  • widestring
  • sysinfo
  • registry
  • strum
  • strum_macros
  • byteorder
  • chrono
  • num
  • num-derive
  • num-traits
  • serde_json
  • serde
  • log
  • winlog
  • windows-service
  • winrt-notification
  • moonfire-tflite (we had to make some changes in it)

Community

  • Join to Discord Discord

Authors

  • Damien LESCOS
  • Allande OYHENART
  • Pierre ROGER

Copyright

The minifilter and Gid idea are heavily based on https://github.com/RafWu/RansomWatch by @RafWu, under the MIT licence.

License

Licensed under EUPL v1.2. See LICENCE.txt.

Comments
  • crash during the day with non understable reason (for me)

    crash during the day with non understable reason (for me)

    Nom de l’application défaillante owlyshield_ransom.exe, version : 0.0.0.0, horodatage : 0x631a4db3 Nom du module défaillant : ntdll.dll, version : 10.0.19041.1806, horodatage : 0x1000a5b9 Code d’exception : 0xc0000005 Décalage d’erreur : 0x0000000000016544 ID du processus défaillant : 0x2fa4 Heure de début de l’application défaillante : 0x01d8c450f40708f7 Chemin d’accès de l’application défaillante : C:\Program Files\Owlyshield Ransom Community\Owlyshield Service\owlyshield_ransom.exe Chemin d’accès du module défaillant: C:\WINDOWS\SYSTEM32\ntdll.dll ID de rapport : 3a5438a0-a55b-42a5-9883-f6598211da92 Nom complet du package défaillant : ID de l’application relative au package défaillant :

    Détecteur d'erreurs , type 0 Nom d’événement : APPCRASH Réponse : Non disponible ID de CAB : 0

    Signature du problème : P1 : owlyshield_ransom.exe P2 : 0.0.0.0 P3 : 631a4db3 P4 : ntdll.dll P5 : 10.0.19041.1806 P6 : 1000a5b9 P7 : c0000005 P8 : 0000000000016544 P9 : P10 :

    opened by pierreroger6466 6
  • `try_kill` does not terminate the given PID

    `try_kill` does not terminate the given PID

    I am trying to port the minifilter and driver_com to my own personal project minifilter-rs with updated windows-rs/windows_sys. I am able to register rust program to the minifilter but am unable to kill the process with the given PID.

    The error I receive is 0xC0000066 aka 0xC0000066 0x00000527 NT_STATUS_NO_SUCH_GROUP “The specified group does not exist.”

    Is this supposed to happen?

    opened by sn99 4
  • Can not start service

    Can not start service

    Hello,

    I have installed the project however whenever I start the owlyshield_ransom.exe I am getting the following error.

    Error: Winapi(Os { code: 1063, kind: Uncategorized, message: "The service process could not connect to the service controller." })

    The driver has been installed successfully, but the OwlyShield Service is not running and I am getting error when I try to start: error 1068 the dependency service or group failed to start.

    opened by alicimertcan 4
  • fix - removed flooding DbgPrints

    fix - removed flooding DbgPrints

    Hello,

    I was testing the project with VirtualKD (https://sysprogs.com/legacy/virtualkd/) and VirtualKD does not process those messages asynchronously, so my VM freezes easily.

    opened by alicimertcan 3
  • Error message in Windows 11 event viewer

    Error message in Windows 11 event viewer

    Le certificat reçu du serveur distant est arrivé à expiration ou n’est pas encore valide. Échec de la demande de connexion TLS. Les données associées contiennent le certificat de serveur. le processus client SSPI est owlyshield_ransom (PID : 6212).

    opened by pierreroger6466 1
  • Heavy processor usage

    Heavy processor usage

    I have noticed a frequent high level processor usage (up to 20%) associated with up to 200 Mb memory usage. Then both measures decrease to 3% and less than 40 Mb and the phenomenon resumes.

    Performance 
    opened by pierreroger6466 1
  • Build /fd error

    Build /fd error

    I am new to VS and windows and receive the following error when building filter:

    Severity Code Description Project File Line Suppression State Error No file digest algorithm specified. Please specify the digest algorithm with the /fd flag. Using /fd SHA256 is recommended and more secure than SHA1. Calling signtool with /fd sha1 is equivalent to the previous behavior. In order to select the hash algorithm used in the signing certificate's signature, use the /fd certHash option.

    opened by sn99 1
  • upgrade slc-paths

    upgrade slc-paths

    I tried to find some simple clustering in Rust but did not want to write my own.

    Changes include:

    • Adding benchmarks
    • Improving tests
    • Some code refactoring and improvements
    • Grammar/Spelling fixes
    • General performance bumps
    • Upgrade edition

    I am using a forked version of kodama instead of original for a little more gains.

    Changes in kodama made over the original crate:

    • Update Rust edition from 2018 to 2021
    • Merge ag/updates branch into master
    • Heavier use of #[inline]
    • Use codegen = 1, lto = true and opt-level = 3 in cargo.toml for release version
    • Use panic = abort (plays nicely with inlining and making more code fit in instructions cache)
    • A few other small changes

    The test_eclipse_file test was failing even prior to the changes I made. I hopefully corrected the tests in the way they were intended.

    opened by sn99 0
  • Crash when detecting false positive

    Crash when detecting false positive

    Each time a positive is detected on my laptop the console version displays this weird message: panicked at 'called Result::unwrap() on an Err value: SendError { .. }', src\worker.rs:295:60 panicked at 'Cannot send iomsg', src\main.rs:303:29

    After that the console version has to be started again.

    bug 
    opened by pierreroger6466 0
  • Feature/spanish translation

    Feature/spanish translation

    Traduction of readme file to spanish, it would be great to expand the acronyms first in the main readme in order to translate properly eg. MSSP, IRPs, RNN etc..

    opened by lijemutu 0
  • reformat and refactor

    reformat and refactor

    No change to logic, the changes include:

    • Removing .idea files from git as they are IDE specific to jetbrains
    • Removing Cargo.lock as best practice
    • Running cargo fmt
    • Making a .clang-format for formatting C/C++ files closest to Rust
      • You can use clang-format or select it from bottom toolbar in any jetbrains product
    opened by sn99 0
Releases(v1.0.1)
Owner
SitinCloud
SitinCloud
open source training courses about distributed database and distributed systemes

Welcome to learn Talent Plan Courses! Talent Plan is an open source training program initiated by PingCAP. It aims to create or combine some open sour

PingCAP 8.3k Dec 30, 2022
Databend aimed to be an open source elastic and reliable serverless data warehouse,

An elastic and reliable Serverless Data Warehouse, offers Blazing Fast Query and combines Elasticity, Simplicity, Low cost of the Cloud, built to make the Data Cloud easy

Datafuse Labs 5k Jan 3, 2023
LIMITS is yet another fully open source, interoperable, decentralised real-time communication protocol!

LIMITS: Limit-IM does not have ITS LIMITS We are undergoing a major refactoring and technology stack adjustment to better accommodate clustered deploy

Limit LAB 14 Feb 4, 2023
X-Engine: A SQL Engine built from scratch in Rust.

XNGIN (pronounced "X Engine") This is a personal project to build a SQL engine from scratch. The project name is inspired by Nginx, which is a very po

Jiang Zhe 111 Dec 15, 2022
ForestDB - A Fast Key-Value Storage Engine Based on Hierarchical B+-Tree Trie

ForestDB is a key-value storage engine developed by Couchbase Caching and Storage Team, and its main index structure is built from Hierarchic

null 1.2k Dec 26, 2022
A fast, searchable, knowledge engine using various machine learning models to aggregate based on importance, association and relevance

NewsAggregator We live in an era where both the demand and quantity of information are enormous. However, the way we store and access that information

EngineersBox 5 Aug 19, 2022
ReadySet is a lightweight SQL caching engine written in Rust that helps developers enhance the performance and scalability of existing applications.

ReadySet is a SQL caching engine designed to help developers enhance the performance and scalability of their existing database-backed applications. W

ReadySet 1.7k Jan 8, 2023
Open Zignatures Database

The openZign project Zignatures and other binary identification database. For fun and to aid reverse-engineering tasks. Collected from various datasou

Cyrill Leutwiler 3 Sep 19, 2021
Open Data Access Layer that connect the whole world together

OpenDAL Open Data Access Layer that connect the whole world together. Status OpenDAL is in alpha stage and has been early adopted by databend. Welcome

Datafuse Labs 302 Jan 4, 2023
XLite - query Excel (.xlsx, .xls) and Open Document spreadsheets (.ods) as SQLite virtual tables

XLite - query Excel (.xlsx, .xls) and Open Document spreadsheets (.ods) as SQLite virtual tables XLite is a SQLite extension written in Rust. The main

Sergey Khabibullin 1.1k Dec 28, 2022
Command-line tool to make Rust source code entities from Postgres tables.

pg2rs Command-line tool to make Rust source code entities from Postgres tables. Generates: enums structs which can be then used like mod structs; use

Stanislav 10 May 20, 2022
SQL/JSON path engine in Rust.

sql-json-path SQL/JSON Path implementation in Rust. ?? Under development ?? Features Compatible with SQL/JSON Path standard and PostgreSQL implementat

RisingWave Labs 3 Nov 22, 2023
Rust client for Timeplus Proton, a fast and lightweight streaming SQL engine

Rust Client for Timeplus Proton Rust client for Timeplus Proton. Proton is a streaming SQL engine, a fast and lightweight alternative to Apache Flink,

Timeplus 4 Feb 27, 2024
Immutable Ordered Key-Value Database Engine

PumpkinDB Build status (Linux) Build status (Windows) Project status Usable, between alpha and beta Production-readiness Depends on your risk toleranc

null 1.3k Jan 2, 2023
A Toy Query Engine & SQL interface

Naive Query Engine (Toy for Learning) ?? This is a Query Engine which support SQL interface. And it is only a Toy for learn query engine only. You can

谭巍 45 Dec 21, 2022
Bind the Prisma ORM query engine to any programming language you like ❤️

Prisma Query Engine C API Bind the Prisma ORM query engine to any programming language you like ❤️ Features Rust bindings for the C API Static link li

Prisma ORM for community 10 Dec 15, 2022
Bind the Prisma ORM query engine to any programming language you like ❤️

Prisma Query Engine C API Bind the Prisma ORM query engine to any programming language you like ❤️ Features Rust bindings for the C API Static link li

Odroe 6 Sep 9, 2022
A high-performance storage engine for modern hardware and platforms.

PhotonDB A high-performance storage engine for modern hardware and platforms. PhotonDB is designed from scratch to leverage the power of modern multi-

PhotonDB 466 Jun 22, 2023
Asyncronous Rust Mysql driver based on Tokio.

mysql-async Tokio based asynchronous MySql client library for rust programming language. Installation Library hosted on crates.io. [dependencies] mysq

Anatoly I 292 Dec 30, 2022