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 sig for adding a windows firewall exception #134

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
26 changes: 26 additions & 0 deletions modules/signatures/modifies_windows_firewall.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from lib.cuckoo.common.abstracts import Signature

class ModifiesWindowsFirewall(Signature):
name = "modifies_windows_firewall"
description = "Attempts to create a Windows firewall exception"
severity = 3
categories = ["network"]
authors = ["Kevin Ross"]
minimum = "1.2"
evented = True

def __init__(self, *args, **kwargs):
Signature.__init__(self, *args, **kwargs)

filter_apinames = set(["CreateProcessInternalW","ShellExecuteExW"])

def on_call(self, call, process):
if call["api"] == "CreateProcessInternalW":
cmdline = self.get_argument(call, "CommandLine").lower()
if "netsh.exe" in cmdline and "firewall" in cmdline and "action=allow" in cmdline:
return True
elif call["api"] == "ShellExecuteExW":
filepath = self.get_argument(call, "FilePath").lower()
params = self.get_argument(call, "Parameters").lower()
if "netsh.exe" in filepath and "firewall" in params and "action=allow" in params:
return True