def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("\\services.exe"),
            any(
                [
                    all(
                        [
                            "/c" in event.deep_get("CommandLine", default=""),
                            "echo" in event.deep_get("CommandLine", default=""),
                            "\\pipe\\" in event.deep_get("CommandLine", default=""),
                            any(
                                [
                                    "cmd" in event.deep_get("CommandLine", default=""),
                                    "%COMSPEC%" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            "rundll32" in event.deep_get("CommandLine", default=""),
                            ".dll,a" in event.deep_get("CommandLine", default=""),
                            "/p:" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            not "MpCmdRun" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
