Last active
November 27, 2020 11:44
-
-
Save kaganisildak/4ff8adcaba2521a28a7029d61c265d16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
def executer(args): | |
proc = subprocess.Popen(args,stdout=subprocess.PIPE) | |
return str(proc.communicate()[0]) | |
cert = executer(["powershell.exe", "-Command","Get-ChildItem","-Recurse","Cert:CurrentUser\My"]) | |
proc = executer(["powershell.exe","Get-Process"]) | |
dlls = executer(["listdlls.exe","srvpost.exe","/accepteula"]) | |
SUSDLLS = ("winanr.dll", "winsanr.dll") | |
if any(dll in dlls for dll in SUSDLLS): print("Any.Run Monitoring Agent Found") | |
if "Some Company" in cert or "srvpost" in proc: | |
print("ANY.RUN DETECTED") | |
else: | |
print("NOT ANY.RUN") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment