def rule(event):
    if any(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\KrbRelay.exe"),
                    event.deep_get("OriginalFileName", default="") == "KrbRelay.exe",
                ]
            ),
            all(
                [
                    " -spn " in event.deep_get("CommandLine", default=""),
                    " -clsid " in event.deep_get("CommandLine", default=""),
                    " -rbcd " in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    "shadowcred" in event.deep_get("CommandLine", default=""),
                    "clsid" in event.deep_get("CommandLine", default=""),
                    "spn" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    "spn " in event.deep_get("CommandLine", default=""),
                    "session " in event.deep_get("CommandLine", default=""),
                    "clsid " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
