def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("OriginalFileName", default="") == "Cmd.Exe",
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                ]
            ),
            ">" in event.deep_get("CommandLine", default=""),
            not any(
                [
                    "C:\\Program Files (x86)\\Internet Download Manager\\IDMMsgHost.exe"
                    in event.deep_get("CommandLine", default=""),
                    "chrome-extension://" in event.deep_get("CommandLine", default=""),
                    "\\.\\pipe\\chrome.nativeMessaging"
                    in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
