def rule(event):
    if all(
        [
            any(
                [
                    "/EXEFilename" in event.deep_get("CommandLine", default=""),
                    "/CommandLine" in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    any(
                        [
                            " /RunAs 8 " in event.deep_get("CommandLine", default=""),
                            " /RunAs 4 " in event.deep_get("CommandLine", default=""),
                            " /RunAs 10 " in event.deep_get("CommandLine", default=""),
                            " /RunAs 11 " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    any(
                        [
                            event.deep_get("CommandLine", default="").endswith("/RunAs 8"),
                            event.deep_get("CommandLine", default="").endswith("/RunAs 4"),
                            event.deep_get("CommandLine", default="").endswith("/RunAs 10"),
                            event.deep_get("CommandLine", default="").endswith("/RunAs 11"),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
