Giter Club home page Giter Club logo

ransomware-samba-ban's Introduction

Ransomware Samba Ban

This is bash script to detect ransomware activity and ban infected IP address to protect us from files encryption at samba server.

Requirements

For proper work, it is required:

Installation

There is also a sample smb.conf file for reference

  • Configure full accounting in samba adding the following entries to the [global] section
   # Anti-ransomware
   full_audit: failure = none
   full_audit: success = pwrite write rename
   full_audit: prefix = IP=%I|USER=%u|MACHINE=%m|VOLUME=%S
   full_audit: facility = local7
   full_audit: priority = NOTICE
  • Add the following entry to all shared folders
    # Option to enable audit for ransomware detection
    vfs objects = full_audit

How it works

Basically, what it does is enable full audit in Samba server and monitor the logs for known ransomware extensions and file names. When detect a ransomware activity, it ban infected IP address to protect us from files encryption at samba server.

ransomware-samba-ban's People

Contributors

quickreflex avatar

Stargazers

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

Watchers

 avatar  avatar

ransomware-samba-ban's Issues

Very Thanks

Thanks for this code.
I wanted to ask you, once the parameters have been entered in the smb.conf file, do I have to run only the shell? how often do I put it in the crontab?

Excluding problematic FSRM extension

Hi,

Thank you for taking the time to write such a useful piece of code.

I am having problem with one of the patterns in FSRM: oor..*
This matches way too often ('door', 'poor', etc), anywhere in the samba log.

What is the correct way to exclude it?

Handling FSRM failures

Great work!

Can you please include a check if the ransomware list successfully downloaded from FSRM and is not empty/error?

Regards

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.