Skip to content

bypass.py (win defender bypass)

LopeKinz edited this page Jul 6, 2023 · 1 revision

Sure! Here's the documentation for the bypass.py file:

bypass.py

This is a Python script used for bypassing certain security measures in Windows Defender. It provides functionality to disable various security settings and execute PowerShell commands. The script also includes a class beat_defender with methods to run PowerShell commands and initialize the script.

Usage

To use the bypass.py script, follow these steps:

  1. Import the sys library:
import sys
  1. Import the bypass function from bypass.py:
from bypass import bypass
  1. Call the bypass function:
bypass()

Functions

bypass()

This function checks if the script is running in a virtual environment and exits if it is. It then initializes an instance of the beat_defender class and calls its run() method.

Class

beat_defender

This class provides methods to run PowerShell commands and initialize the script.

run(self)

This method executes PowerShell commands using the subprocess.run function. The commands to be executed are passed as arguments to the subprocess.run function.

init(self)

This method initializes the beat_defender instance. It defines an inner function is_admin() that checks if the script is running with administrator privileges. The result is stored in the is_admin attribute of the instance.

exploit(self)

This method executes a series of PowerShell commands to disable various security settings in Windows Defender. If the beat_defender instance is truthy (non-empty), the commands are executed using the run() method. Otherwise, the script is re-run with administrator rights using ctypes.windll.shell32.ShellExecuteW.

Note: Please exercise caution when using this script, as it modifies security settings and executes PowerShell commands that can have unintended consequences. Make sure you understand the implications before using it.

Clone this wiki locally