๐ซHow Malware Author Terminate Antivirus Process during runtime ?
How Malware Author Terminate Antivirus Process during runtime ?
Explanation
Import Libraries:
psutil
for process management.time
for adding delays.
Define
terminate_process_by_name
Function:Iterates over all running processes and checks if the process name matches
ekrn.exe
.Terminates the process if a match is found.
Handles exceptions if the process no longer exists or access is denied.
Returns
True
if the process was found and terminated; otherwise,False
.
Main Block:
Sets the process name to
ekrn.exe
.Continuously checks for the process every 10 seconds.
Prints status messages indicating whether the process was found and terminated.
Loop and Delay:
The
while True
loop ensures the script keeps running and checking for the process.time.sleep(10)
introduces a delay of 10 seconds between checks to avoid excessive CPU usage.
Last updated