+
Skip to content

Stockholm is a Python-based tool designed to simulate the core functionalities of the WannaCry ransomware, specifically its file encryption mechanism. It operates on a selected directory, targeting and manipulating only files with extensions previously affected by the WannaCry attack.

Notifications You must be signed in to change notification settings

ftTower/Stockholm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Stockholm Ransomware Tool

"Ransomware attacks like WannaCry highlight the critical need for robust cybersecurity measures and regular data backups. They serve as a stark reminder of the vulnerabilities in our interconnected digital world."

header

Description

Stockholm is a Python-based ransomware simulation tool designed for educational and cybersecurity training purposes. It encrypts files within a specified directory and provides functionality to decrypt them using a generated or provided key. The tool includes options for silent operation, version display, and help documentation.

Features

WannaCry msg
  • File Encryption: Encrypts all files in the specified directory using the cryptography library.
  • File Decryption: Decrypts files using a provided decryption key.
  • Silent Mode: Suppresses output to the terminal for a quieter operation.
  • Help Menu: Displays usage instructions and available options.
  • Version Information: Displays the current version of the tool and system information.

Usage

Run the script with the following options:

Stockholm

Options

  • --help or --h: Display the help menu with usage instructions.
  • --version or --v: Show the current version of the tool and system information.
  • --r <key>: Reverse the encryption process using the provided decryption key.
  • --silent or --s: Suppress output to the terminal.

Example Commands

Tip: You can modify the target folder for encryption or decryption by changing the directory path in the script. In a real-world scenario, ransomware typically targets sensitive data or the user's home directory. Stockholm

  1. Encrypt Files:
    python3 stockholm.py

Stockholm

Stockholm

  1. Decrypt Files:
    python3 stockholm.py --reverse <decryption_key>

Stockholm

Note: The make reverse option is included for educational and security training purposes. It uses the filekey.key generated and stored during encryption. In a real ransomware attack, the decryption key would typically be deleted or withheld, making recovery without the key impossible.

Stockholm

  1. Display Help:

    python3 stockholm.py --help
  2. Show Version:

    python3 stockholm.py --version
  3. Silent Mode:

    python3 stockholm.py --silent

How It Works

  1. Encryption:

    • The tool generates a unique encryption key using the cryptography library.
    • All files in the specified directory (Folders_to_encrypt) are encrypted.
    • The encryption key is saved to a file named filekey.key.
  2. Decryption:

    • The tool uses the provided decryption key to decrypt the files.
    • If the key is invalid, an error is raised.
  3. File Crawling:

    • The tool recursively scans the specified directory to identify all files for encryption or decryption.
  4. Output:

    • The tool displays the progress of encryption or decryption unless silent mode is enabled.

Requirements

  • Python 3.x
  • Required Python libraries:
    • cryptography
    • art
    • scanf

Install the required libraries using pip:

About

Stockholm is a Python-based tool designed to simulate the core functionalities of the WannaCry ransomware, specifically its file encryption mechanism. It operates on a selected directory, targeting and manipulating only files with extensions previously affected by the WannaCry attack.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载