GithubHelp home page GithubHelp logo

ransomware-testing's Introduction

Ransomware-testing

简述

一个勒索程序模拟脚本,客户端生成随机key,为了防止被中间流量监控设备捕获key,使用非对称加密算法将key加密,同时根据cpu等信息生成唯一的一串字符hash标识,并将加密的key和唯一标识发送至服务端,服务端解密Key后将其存入数据库。

脚本不具备提权和自动传播等操作,仅做加解密测试,要加密尽可能多的文件请用管理员权限运行client

服务端

server.py为服务端脚本,运行前请修改34行的数据库连接信息

运行后会检查是否有相应的数据库及表,没有则自动创建。

随后生成随机公私钥密钥对,并开启一个http服务来下发公钥,默认监听5000端口

服务端收到发送过来的id和Key后,使用rsa私钥解密key,并将其存入数据库中。

Snipaste_2023-10-27_11-11-34

Snipaste_2023-10-26_16-40-02

客户端

client.py为客户端脚本,运行前修改166和167行的服务端地址,运行脚本有点麻烦,可以打包成exe格式。

安装相应库 pip install -r requirements.txt

运行后会向服务端请求rsa公钥

随后生成128位的随机aes秘钥,并使用rsa公钥加密aes秘钥

根据cpu等信息生成一段唯一的ID

将加密的key和唯一ID发送至服务端。

随后遍历文件,将相关后缀的文件进行逐一加密(如ppt、docx等)

效果

Snipaste_2023-10-30_14-01-56

被加密的文件后缀全为love,在桌面生成勒索信息.txt文档 Snipaste_2023-10-30_14-04-41

Snipaste_2023-10-30_14-05-58

Snipaste_2023-10-30_14-05-07

解密

decrypt为解密脚本,后面跟上秘钥即可 Snipaste_2023-10-31_11-48-42

ransomware-testing's People

Contributors

laohuan12138 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.