def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\netsh.exe"),
                    event.deep_get("OriginalFileName", default="") == "netsh.exe",
                ]
            ),
            any(
                [
                    all(
                        [
                            "firewall" in event.deep_get("CommandLine", default=""),
                            "add" in event.deep_get("CommandLine", default=""),
                            "allowedprogram" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            "advfirewall" in event.deep_get("CommandLine", default=""),
                            "firewall" in event.deep_get("CommandLine", default=""),
                            "add" in event.deep_get("CommandLine", default=""),
                            "rule" in event.deep_get("CommandLine", default=""),
                            "action=allow" in event.deep_get("CommandLine", default=""),
                            "program=" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            any(
                [
                    ":\\$Recycle.bin\\" in event.deep_get("CommandLine", default=""),
                    ":\\RECYCLER.BIN\\" in event.deep_get("CommandLine", default=""),
                    ":\\RECYCLERS.BIN\\" in event.deep_get("CommandLine", default=""),
                    ":\\SystemVolumeInformation\\" in event.deep_get("CommandLine", default=""),
                    ":\\Temp\\" in event.deep_get("CommandLine", default=""),
                    ":\\Users\\Default\\" in event.deep_get("CommandLine", default=""),
                    ":\\Users\\Desktop\\" in event.deep_get("CommandLine", default=""),
                    ":\\Users\\Public\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\addins\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\cursors\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\debug\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\drivers\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\fonts\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\help\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\system32\\tasks\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\Tasks\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\Temp\\" in event.deep_get("CommandLine", default=""),
                    "\\Downloads\\" in event.deep_get("CommandLine", default=""),
                    "\\Local Settings\\Temporary Internet Files\\"
                    in event.deep_get("CommandLine", default=""),
                    "\\Temporary Internet Files\\Content.Outlook\\"
                    in event.deep_get("CommandLine", default=""),
                    "%Public%\\" in event.deep_get("CommandLine", default=""),
                    "%TEMP%" in event.deep_get("CommandLine", default=""),
                    "%TMP%" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
