• Stars
    star
    214
  • Rank 184,678 (Top 4 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pythonic ransomware proof of concept.

Cypher

Cypher is a proof of concept ransomware which implements the PyCrypto module and uses gmail(Currently) as a simple command and control server. It is a work in progress as of yet and i will be releasing updates periodically depending on a couple of factors

Operation

Cypher operates by generating a unique client ID for each box that has been infected. The client ID and encryption key will be sent via email to a gmail adress by leveraging python's SMTP lib. The new version of Cypher will give the operator the choice to pick between gmail and the C&C infrastructure that comes with the finished project, namely a web application to generate and store key pairs together with client IDs. If the operator chooses to employ the Cypher web app the ransomware will contact via HTTP by leveraging the Mechanize lib.

After Cypher has enumerated the files we wish to encrypt the multiprocessing and PyCrypto libs are employed to do the actual encrypting. I opted to use the multiprocessing lib to speed up the encryption process.

Finally Cypher will write out a README note and the client ID which would have to be relayed to the operator in order to retrieve the proper decrypting binary and key respectively.

Update

I have added some logic to have the ransomware log in to the web app with the Mechanize lib. As of yet functionality to retrieve a key from the web app and to post the client ID have not been implemented. SMTP is still available and in the near future optional depending on the preference of the operator.

I am setting up a web application as an alternative C&C mechanism, in keeping with the Python theme of this project i am employing the Django framework for the web app. Commits will be pushed to the repo in due time.

The latest version of the encryption module adds bootlocker functionality by attempting to overwrite the MBR with a custom bootloader. Shoutout to NO-OP for his contribution in this regard. I've added the source code together with boot.bin for illustrative purposes.

To do

  • Extensive and multi-platform testing.

  • Write decrypting module.

  • Functionality to restore MBR

  • Designing and developing a more secure C&C mechanism.

    • Possibly HTTP in favor of SMTP and;
    • Web App to dynamically provide encryption keys in favor of local generation

Want to contribute?

I'd be more than willing to collaborate on this and if you wish to contribute feel free to open an issue or a pull request and we may discuss the details and/or ideas we could work on and you might want to suggest.

alt tag

Note

Development of C&C web application has been postponed for the time being. If you want to get creative i would recommend this fork or this original web application written in PHP with Laravel by my friend Filtration. It is compatible with Cypher with a little tinkering.

Furthermore, someone seems to have uploaded the stub for the main Cypher file to Virus Total. You can check it out by clicking here. For testing purposes i'd be interested to see detection rates for the Windows variant once it's encoded with someting like peCloakCapstone or PeCloak. That is of course after the main Python file has been compiled to exe with Py2Exe or Pyinstaller.

Also, if you have any pull requests to submit please feel free to do so. Open Source collaboration on this Ransomware remains to be of import to me.

Thanks.

More Repositories

1

AutoSploit

Automated Mass Exploiter
Python
4,996
star
2

RootHelper

A Bash script that downloads and unzips scripts that will aid with privilege escalation on a Linux system.
Shell
479
star
3

DorkNet

Selenium powered Python script to automate searching for vulnerable web apps.
Python
337
star
4

IntRec-Pack

Intelligence and Reconnaissance Package/Bundle installer.
Shell
229
star
5

PyCat

Python network tool, similar to Netcat with custom features.
Python
190
star
6

MIDA-Multitool

Bash script purposed for system enumeration, vulnerability identification and privilege escalation.
Shell
159
star
7

NetSet

Operational Security utility and automator.
Shell
129
star
8

Mimir

OSINT Threat Intel Interface - CLI for HoneyDB
Python
111
star
9

WinKernel-Resources

A list of excellent resources for anyone to deepen their understanding with regards to Windows Kernel Exploitation and general low level security.
C++
107
star
10

Archivist

A ctypes powered python keylogger.
Python
102
star
11

AmpliSpy

Check local or remote list of DNS servers for suitability in DNS Amplification DoS.
Python
46
star
12

Shogun

Shodan.io Command Line Interface
Python
44
star
13

SysEnum

Simple Bash script to retrieve basic system information.
Shell
30
star
14

QuickScan

Port scanning and domain utility.
Python
29
star
15

SBD

Static Binary Deployer. Download and deploy *Nix utilities on a compromised system.
Shell
28
star
16

PyParser-CVE

Multi source CVE/exploit parser.
Python
27
star
17

MaliciousDLLGen

Malicious DLL Generator in Py3
C
26
star
18

Shellshocker

A Bash script to test a list of URLs for the shellshock vulnerability.
Shell
25
star
19

Shellware

Persistent bind shell via pythonic shellcode execution, and registry tampering.
Python
22
star
20

MS-PS-Installer

Automated PowerShell installer for *Nix with multi Distro support.
Shell
18
star
21

WinBins-Plus

Repo to store Windows PE's and Utilities for easy access.
Assembly
16
star
22

GistList

Repo to host a comprehensive list of all my Public Gists with a short description for each item and a link to the Gist pages in question..
14
star
23

l0ck3r

Automated encryption utilities and installation
Shell
12
star
24

HTTP-Server

Basic HTTP Server with a feature to invoke a shell in the dir the files are being served from.
Python
11
star
25

Ransom

first commit
CSS
10
star
26

vBulBot

A vBulletin bot in python.
Python
8
star
27

VM-Nexus

Multi-platform installer and wrapper for QEMU.
Python
8
star
28

ChromaScope

Pseudo library for python, provides custom colored text formatting in a convenient way.
Python
6
star
29

FormEnum

Simple script to enumerate forms with mechanize lib.
Python
4
star
30

KernMan

Bash script to help with kernel management.
Shell
4
star
31

QuickEnc

OpenSSL Based Quick Crypt
Shell
1
star