

Automatically detecting Ransomware infections for free
source link: https://virtuallysober.com/2020/06/25/automatically-detecting-ransomware-infections-for-free/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Automatically detecting Ransomware infections for free

What if I told you there is a completely free way to automatically detect any ransomware infection in your environment, for free, and it takes 5 minutes to configure?
BS? Trying to sell me something? Neither! It’s true, using a simple word document and PowerShell I’ll give you a free script that cannot miss a ransomware infection.
If you’d like to hit the ground running, then start by downloading it from here:
Instructions:
- Unzip the file, edit the .ps1 script
- Complete steps 1-6 in the section “# Configure the variables below”
- Copy the supplied word doc (the honeypot) into the $HoneypotDir and $HoneypotWitnessDir, feel free to use your own just ensure to use the same file in both locations for comparison
- Map the share specified for $HoneypotDir to every client/server in your environment
- Train your users to not edit the word document in the share
- You now have near instant ransomware detection!
So how does it work? Simple! All ransomware shares 1 commonality and that is that it must alter your files, typically common file formats, to then demand a ransom.
To detect the infection we create a honeypot file, a perfectly vulnerable word document that anyone can edit on a share/map network drive, then use a PowerShell script on a schedule to verify it hasn’t been changed and send an email alert when it has.
Ransomware detection used to be quite simple in that you could easily see an infection as it changed the file extension and attributes. But newer in-memory variants like Thanos can now encrypt the data without changing either! Tricky for some paid products, but not for this script because it performs 2 different tests to detect the infection.
The first test is a Test-Path to verify the file exists in the honeypot directory. File renamed, file extension changed? This immediately detects the malicious activity and sends you an email alert.
If the filename/extension hasn’t been changed then the second test runs. This uses a combination of Get-Content and Compare-Object to do a byte for byte comparison of a gold image of the word doc and your honeypot. If your word doc has been infected it now cannot miss, because you have to change the data within the word doc to encrypt it! Upon detecting any change it will also send an email alert.
If you’ve come this far then scroll back up, get downloading and implement it in your environment today. If you found this useful all I ask in return is a follow on twitter using the signature below! Happy scripting,
Like this:
Recommend
-
30
Kaspersky Lab said today that it detected computers infected with DarkPulsar, a malware implant that has been allegedly develope...
-
38
One way to reduce the number of Coronavirus infections is to detect as early as possible infected people, so they can be quarantined earlier. In the ~5 days...
-
7
Infection Alert Early Infection Alert on an Apple Watch based on resting heart rate elevation. Executive Summary Early detection is crucial in stopping the spread of infection. We should use all...
-
4
Jul 27, 2020 Automatically Detecting Text Encodings in C++ Consider the lowly text file. This text...
-
5
Transmission of SARS-COV-2 Infections in Households — Tennessee and Wisconsin, April–September 2020Summary What is already known about this topic? Transmission of SARS-CoV-2 occurs within...
-
14
Amazon closes New Jersey warehouse after Covid-19 infectionsKey PointsPeter Endig | AFP | Getty ImagesAmazon has closed a warehouse in New Jersey until Dec. 26 after...
-
8
Protection — Antibodies and SARS-CoV-2 infections: The more the better Oxford University Hospital tracked infections in 12,500 of its healthcare workers.
-
14
Artificial Intelligence AI Can Detect Coronavirus Infections Far Faster Than Humans...
-
8
News » News & Analysis » A NATIONAL EMERGENCY: NSW tightens Sydney lockdowns as daily Covid infection...
-
6
Detecting API abuse automatically using sequence analysis 03/15/2023
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK