Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in a few windows utility sigs #428

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 55 additions & 3 deletions modules/signatures/windows/windows_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
"vssadmin",
"wevtutil",
"whois",
"winrm",
"winrs",
"xcacls",
]

Expand Down Expand Up @@ -203,8 +205,8 @@ class AddsUser(Signature):

def on_complete(self):
for cmdline in self.get_command_lines():
if cmdline.lower().startswith("net") and "user /add" in cmdline.lower():
self.mark_ioc("cmdline", cmdline)
if cmdline.lower().startswith("net") and "user /add" in cmdline.lower():
self.mark_ioc("cmdline", cmdline)

return self.has_marks()

Expand All @@ -218,7 +220,57 @@ class AddsUserAdmin(Signature):

def on_complete(self):
for cmdline in self.get_command_lines():
if cmdline.lower().startswith("net") and "localgroup administrators" in cmdline.lower():
if cmdline.lower().startswith("net") and "localgroup administrators" in cmdline.lower():
self.mark_ioc("cmdline", cmdline)

return self.has_marks()

class ScriptNoLogo(Signature):
name = "script_nologo"
description = "Wscript or Cscript was executed with the nologo option"
severity = 2
categories = ["commands", "stealth"]
authors = ["Kevin"]
minimum = "2.0"

def on_complete(self):
for cmdline in self.get_command_lines():
if ("wscript" in cmdline.lower() or "cscript" in cmdline.lower()) and "nologo" in cmdline.lower():
self.mark_ioc("cmdline", cmdline)

return self.has_marks()

class LateralMovementCommands(Signature):
name = "lateral_movement_commands"
description = "Executed a Windows remote command which may be used for lateral movement"
severity = 3
categories = ["commands"]
authors = ["Kevin"]
minimum = "2.0"

lateral_utilities = [
"psexec",
"winrm",
"winrs",
]

def on_complete(self):
for cmdline in self.get_command_lines():
# Check for commands which are used solely for remote management
for utility in lateral_utilities:
if utility in cmdline.lower():
self.mark_ioc("cmdline", cmdline)

# Remote WMI command execution
if "wmic" in cmdline.lower() and "/node:" in cmdline.lower():
self.mark_ioc("cmdline", cmdline)

# Remote AT
if "at \\\\" in cmdline.lower() or "at.exe \\\\" in cmdline.lower()):
self.mark_ioc("cmdline", cmdline)

# Remote Service Interaction
if "sc \\\\" in cmdline.lower() or "sc.exe \\\\" in cmdline.lower()):
self.mark_ioc("cmdline", cmdline)

return self.has_marks()