Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #1

Open
wants to merge 121 commits into
base: additional
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
fd0cfc9
pre-release-1
skaspi3 Dec 31, 2017
88425d8
panix-bug
skaspi3 Dec 31, 2017
3d88380
panic-bug-cmpleted
skaspi3 Dec 31, 2017
df62f52
panic-bug-cmpleted
skaspi3 Dec 31, 2017
11152ce
pre-release
skaspi3 Jan 1, 2018
bc19981
main-version
skaspi3 Jan 2, 2018
24243b6
release-bug-fix
skaspi3 Jan 2, 2018
e8b6b28
release-bug-fix
skaspi3 Jan 2, 2018
02b0a88
release-bug-fix
skaspi3 Jan 2, 2018
9c120db
release-bug-fix
skaspi3 Jan 2, 2018
16a4d44
release-bug-fix
skaspi3 Jan 2, 2018
df24ae6
main-version-sub
skaspi3 Jan 2, 2018
0e9121b
release-bug-fix
skaspi3 Jan 2, 2018
db60e06
main-version-sub
skaspi3 Jan 2, 2018
abf98e3
first-version
skaspi3 Jan 2, 2018
de513dd
first-version
skaspi3 Jan 2, 2018
5b3fceb
first-version
skaspi3 Jan 2, 2018
3fe91f3
first-version
skaspi3 Jan 2, 2018
0c38045
first-try
skaspi3 Jan 3, 2018
45894aa
first-try
skaspi3 Jan 3, 2018
9eefeea
final
skaspi3 Jan 3, 2018
b7cb0e5
final
skaspi3 Jan 3, 2018
7d7251d
INT_SIG-added+comments
skaspi3 Jan 3, 2018
4bd6c33
INT_SIG-added+comments
skaspi3 Jan 3, 2018
cc15713
INT_SIG-added+clean-up
skaspi3 Jan 3, 2018
1bde777
INT_SIG-added+clean-up
skaspi3 Jan 3, 2018
90d09fe
clean-up-try
skaspi3 Jan 3, 2018
22743d0
clean-up
skaspi3 Jan 3, 2018
0f3c550
ON_EXIT-bug-fix
skaspi3 Jan 3, 2018
d81f072
first-try
skaspi3 Jan 3, 2018
43d69c7
first-try-rev
skaspi3 Jan 3, 2018
afda9cb
first-try-rev
skaspi3 Jan 3, 2018
fff7212
crawler.py&generator.py
skaspi3 Jan 3, 2018
ea11149
additional-signals
skaspi3 Jan 3, 2018
6a55eca
additional-signals
skaspi3 Jan 3, 2018
40e5390
additional-signals
skaspi3 Jan 3, 2018
d7d76cf
panic.exe-->panic.py
skaspi3 Jan 3, 2018
53825aa
panic.exe-->panic.py
skaspi3 Jan 3, 2018
60397a2
panic.exe-->panic.py
skaspi3 Jan 3, 2018
d8b34bd
panic.exe-->panic.py
skaspi3 Jan 4, 2018
45d975b
panic.exe-->panic.py
skaspi3 Jan 4, 2018
50f9c9d
misc. comments
skaspi3 Jan 4, 2018
4f5e770
major watch fix
skaspi3 Jan 4, 2018
7dad570
major watch fix
skaspi3 Jan 4, 2018
63db324
files distributing fix
skaspi3 Jan 4, 2018
445f44e
files distributing fix
skaspi3 Jan 4, 2018
114c379
files distributing fix
skaspi3 Jan 4, 2018
05ee52b
honeypot files fixed
skaspi3 Jan 4, 2018
9a0a937
honeypot files fixed
skaspi3 Jan 4, 2018
4c5e512
honeypot files fixed
skaspi3 Jan 4, 2018
a92474b
panic redundancy
skaspi3 Jan 4, 2018
206c701
panic.py rid of + smaller honeypots
skaspi3 Jan 4, 2018
818d658
misc. comments
skaspi3 Jan 4, 2018
94e739c
script.py->auditor.py
skaspi3 Jan 4, 2018
7e58a37
generator simplification
skaspi3 Jan 5, 2018
7ce19cc
signals fix
skaspi3 Jan 5, 2018
12447b4
first version
skaspi3 Jan 5, 2018
2f4c588
final generator
skaspi3 Jan 5, 2018
f0a58d8
final cleaner+distributor
skaspi3 Jan 5, 2018
b86b1d7
final cleaner+distributor
skaspi3 Jan 5, 2018
a84e96f
final-fix
skaspi3 Jan 5, 2018
390005c
1
skaspi3 Jan 6, 2018
025fed5
burst deletion signal fix
skaspi3 Jan 6, 2018
af981e0
distribution bug fix
skaspi3 Jan 6, 2018
738c6bc
misc fixes
skaspi3 Jan 6, 2018
5341339
misc fixes
skaspi3 Jan 6, 2018
90ab7f9
misc fixes
skaspi3 Jan 6, 2018
9b62236
misc fixes
skaspi3 Jan 6, 2018
d5db1ce
misc fixes
skaspi3 Jan 6, 2018
7c4ee8d
misc fixes
skaspi3 Jan 8, 2018
c9ef593
generator optimization
skaspi3 Jan 8, 2018
0265b1f
major generator fix
skaspi3 Jan 8, 2018
3de9859
major generator fix
skaspi3 Jan 8, 2018
96eb24f
final crawler
skaspi3 Jan 11, 2018
ee02d21
final crawler
skaspi3 Jan 11, 2018
e4a3cde
final crawler
skaspi3 Jan 11, 2018
5395b47
final crawler
skaspi3 Jan 11, 2018
af8eb73
timer addition
skaspi3 Jan 11, 2018
8aa103d
timer addition
skaspi3 Jan 12, 2018
3fbb446
timer addition
skaspi3 Jan 13, 2018
7c2254d
timer addition
skaspi3 Jan 13, 2018
51f9f0a
timer addition
skaspi3 Jan 13, 2018
ff1d2d0
timer addition
skaspi3 Jan 13, 2018
c055e1b
timer addition
skaspi3 Jan 13, 2018
5736261
timer addition
skaspi3 Jan 13, 2018
d509f01
timer addition
skaspi3 Jan 13, 2018
2e73ce3
timer addition
skaspi3 Jan 13, 2018
6e038da
server clean
skaspi3 Jan 15, 2018
9b02583
server paralleled
skaspi3 Jan 15, 2018
a8219da
server paralleled
skaspi3 Jan 15, 2018
56e566b
server bulk inbounds fixed
skaspi3 Jan 15, 2018
e7c9e26
server bulk folders creation
skaspi3 Jan 15, 2018
7d4916d
server bulk folders creation
skaspi3 Jan 15, 2018
ddd0f5f
server release
skaspi3 Jan 15, 2018
75389d9
server release
skaspi3 Jan 15, 2018
03aed7a
server release
skaspi3 Jan 15, 2018
9abb307
server release misc. clean
skaspi3 Jan 15, 2018
91b9d30
server release misc. clean
skaspi3 Jan 15, 2018
6af9030
server release misc. clean
skaspi3 Jan 15, 2018
9513b6d
server release misc. fix
skaspi3 Jan 15, 2018
2487e90
server release misc. fix
skaspi3 Jan 15, 2018
a97154d
launcher added
skaspi3 Jan 16, 2018
4e43627
server pre-release
skaspi3 Jan 16, 2018
8a95a02
server pre-release misc bug
skaspi3 Jan 16, 2018
1c080ae
zip with password handle
skaspi3 Jan 17, 2018
a172585
zip with password handle
skaspi3 Jan 17, 2018
125f139
misc. server fix
skaspi3 Jan 18, 2018
1914974
misc. crawler fix
skaspi3 Jan 18, 2018
de0e816
misc. crawler fix
skaspi3 Jan 18, 2018
8813c4d
misc. crawler fix
skaspi3 Jan 18, 2018
0c79b01
pre release
skaspi3 Jan 18, 2018
4e86e9d
pre release
skaspi3 Jan 20, 2018
90f087d
Create README.md
skaspi Jan 20, 2018
88daf03
final fixes
skaspi3 Jan 21, 2018
0d41413
Merge remote-tracking branch 'origin/master'
skaspi3 Jan 21, 2018
db15149
README update
skaspi3 Jan 21, 2018
bec7e3d
README update
skaspi3 Jan 21, 2018
0a1d499
README update
skaspi3 Jan 21, 2018
5357143
README update
skaspi3 Jan 21, 2018
035a18d
README update
skaspi3 Jan 27, 2018
a31681d
README update
skaspi3 Jan 27, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build/*
dist/*
*.spec
__pycache__/*
.idea/*
9 changes: 9 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Ransomware Detection - academic project under Microsoft supervision.

Click the following link to read the presentation poster(English):

https://1drv.ms/b/s!AsE6M50PUjDOab7ZXizffp3OF1o

And more thorough explanation from here(Hebrew):

https://1drv.ms/b/s!AsE6M50PUjDObI8gcj_WoGWmBOk
58 changes: 58 additions & 0 deletions auditor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 26 15:09:10 2017

@authors Rafael,Dmitriy
Ransomware Detection Project
Technion, Haifa, Israel

Auxiliary script for monitoring the honeypot files.
Ransomware Attack will be detected if at least one of these files is modified.
"""

import os
import re
import sys


def panic():
"""
Ransomware was detected --> send HTTP POST to C&C + kill VM instance
"""
if os.path.exists("communicate.txt"):
return
else:
file = open("communicate.txt", "w")
file.write("0")
file.close()
file = open("data.txt", "r")
temp = file.read()
file.close()
names = temp.split(",")
print("the %s is infected by %s "%(names[0],names[1]))


def main():
flag = 0
filename = os.path.basename(sys.argv[1])

try:
file = open("names.txt", "r")
text = file.read()
file.close()
result = re.findall("\\b" + filename + "\\b", text)

if result.__len__() != 0:
flag = 1

except IOError:
pass

if flag == 1:
print("Detected honeypot modification : {0} ".format(sys.argv[1]))
panic()


if __name__ == '__main__':
main()
30 changes: 0 additions & 30 deletions catastrophe.py

This file was deleted.

51 changes: 51 additions & 0 deletions cleaner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 04 18:52:16 2017

@authors Rafael,Dmitriy
Ransomware Detection Project
Technion, Haifa, Israel

Script for cleaning the paths from honeypot files
"""

import os


def clean_dir(directory, names):
"""
Remove honeypot files from given directory
"""

for dirName, dirlist, fileList in os.walk(directory):
for fname in fileList:
if fname in names:
os.remove(directory + fname)


def main():
"""
Collecting the paths and sending them for "clean-up"
"""
paths = [os.environ['USERPROFILE'] + "\\Documents\\",
os.environ['USERPROFILE'] + "\\Desktop\\"]

f = open('names.txt', 'r')
names = f.read().splitlines()
f.close()

for path in paths:
clean_dir(path, names)

os.remove(os.getcwd() + "\\names.txt")

try:
os.remove(os.getcwd() + "\\communicate.txt")
os.remove(os.getcwd() + "\\data.txt")
except FileNotFoundError:
pass


if __name__ == '__main__':
main()
16 changes: 16 additions & 0 deletions client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import json
import socket

HOST = 'localhost'
PORT = 8080
links = ['https://download.sysinternals.com/files/ClockRes.zip', " ",
'https://download.sysinternals.com/files/AutoLogon.zip']

out = json.dumps(links)
sent = out.encode('ASCII')

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
s.sendall(sent)
data = s.recv(1024)
print('Received', repr(data))
44 changes: 44 additions & 0 deletions crawler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 2 12:13:16 2018

@authors Rafael,Dmitriy
Ransomware Detection Project
Technion, Haifa, Israel

Auxiliary script for crawling through honeypot files and
saving their names.
"""

import os


def crawl(directory):
"""
Record the names of files that exist in current dir
"""
names = []
extensions = [".jpg", ".mp3", ".txt", ".xlsx", ".mp4"]

for dirName, dirlist, fileList in os.walk(directory):
for fname in fileList:
filename, file_extension = os.path.splitext(fname)
if file_extension in extensions:
names.append(filename + file_extension)

file = open("names.txt", "a+")
for name in names:
file.write(name + "\n")
file.close()


def main():
crawl(os.environ['USERPROFILE'] + "\\Desktop\\honey\\")
crawl(os.environ['USERPROFILE'] + "\\Pictures\\")
crawl(os.environ['USERPROFILE'] + "\\Music\\")
crawl(os.environ['USERPROFILE'] + "\\Videos\\")


if __name__ == '__main__':
main()
84 changes: 84 additions & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
I wish I found some better sounds no ones ever heard,
I wish I had a better voice that sang some better words,
I wish I found some chords in an order that is new,
I wish I didn't have to rhyme every time I sang,

I was told when I get older all my fears would shrink,
But now Im insecure and I care what people think.
My names Blurryface and I care what you think

Wish we could turn back time, to the good ol days,
When our momma sang us to sleep but now were stressed out.

Sometimes a certain smell will take me back to when I was young,
How come Im never able to identify where its coming from,
Id make a candle out of it if I ever found it,
Try to sell it, never sell out of it, Id probably only sell one,

Itd be to my brother, cause we have the same nose,
Same clothes homegrown a stones throw from a creek we used to roam,
But it would remind us of when nothing really mattered,
Out of student loans and treehouse homes we all would take the latter.

My names Blurryface and I care what you think

Wish we could turn back time, to the good old days,
When our momma sang us to sleep but now were stressed out.

We used to play pretend, give each other different names,
We would build a rocket ship and then wed fly it far away,
Used to dream of outer space but now they are laughing at our face,
Saying, wake up, you need to make money."

Wish we could turn back time, to the good ol days,
When our momma sang us to sleep but now were stressed out.

So close no matter how far
Couldn't be much more from the heart
Forever trusting who we are
And nothing else matters

Never opened myself this way
Life is ours, we live it our way
All these words I don't just say
And nothing else matters

Trust I seek and I find in you
Every day for us something new
Open mind for a different view
And nothing else matters

Never cared for what they do
Never cared for what they know
But I know

So close no matter how far
Couldn't be much more from the heart
Forever trusting who we are
And nothing else matters

Never cared for what they do
Never cared for what they know
But I know

I never opened myself this way
Life is ours, we live it our way
All these words I don't just say
And nothing else matters

Trust I seek and I find in you
Every day for us something new
Open mind for a different view
And nothing else matters

Never cared for what they say
Never cared for games they play
Never cared for what they do
Never cared for what they know
And I know

So close no matter how far
Couldn't be much more from the heart
Forever trusting who we are
No nothing else matters

Loading