def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\net.exe"),
                            event.deep_get("Image", default="").endswith("\\net1.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="") in ["net.exe", "net1.exe"],
                ]
            ),
            any(
                [
                    all(
                        [
                            any(
                                [
                                    " group " in event.deep_get("CommandLine", default=""),
                                    " localgroup " in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            any(
                                [
                                    "domain admins" in event.deep_get("CommandLine", default=""),
                                    " administrator" in event.deep_get("CommandLine", default=""),
                                    " administrateur" in event.deep_get("CommandLine", default=""),
                                    "enterprise admins"
                                    in event.deep_get("CommandLine", default=""),
                                    "Exchange Trusted Subsystem"
                                    in event.deep_get("CommandLine", default=""),
                                    "Remote Desktop Users"
                                    in event.deep_get("CommandLine", default=""),
                                    "Utilisateurs du Bureau à distance"
                                    in event.deep_get("CommandLine", default=""),
                                    "Usuarios de escritorio remoto"
                                    in event.deep_get("CommandLine", default=""),
                                    " /do" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            not " /add" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            " accounts " in event.deep_get("CommandLine", default=""),
                            " /do" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
