def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("OriginalFileName", default="") == "Cmd.Exe",
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                ]
            ),
            any(
                [
                    event.deep_get("CommandLine", default="").startswith("cmd "),
                    event.deep_get("CommandLine", default="").startswith("cmd.exe"),
                    event.deep_get("CommandLine", default="").startswith(
                        "c:\\windows\\system32\\cmd.exe"
                    ),
                ]
            ),
            any(
                [
                    "psinject" in event.deep_get("CommandLine", default=""),
                    "spawnas" in event.deep_get("CommandLine", default=""),
                    "make_token" in event.deep_get("CommandLine", default=""),
                    "remote-exec" in event.deep_get("CommandLine", default=""),
                    "rev2self" in event.deep_get("CommandLine", default=""),
                    "dcsync" in event.deep_get("CommandLine", default=""),
                    "logonpasswords" in event.deep_get("CommandLine", default=""),
                    "execute-assembly" in event.deep_get("CommandLine", default=""),
                    "getsystem" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
