def rule(event):
    if any(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\crackmapexec.exe"),
                    " -M pe_inject " in event.deep_get("CommandLine", default=""),
                    all(
                        [
                            " --local-auth" in event.deep_get("CommandLine", default=""),
                            " -u " in event.deep_get("CommandLine", default=""),
                            " -x " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            " --local-auth" in event.deep_get("CommandLine", default=""),
                            " -u " in event.deep_get("CommandLine", default=""),
                            " -p " in event.deep_get("CommandLine", default=""),
                            " -H 'NTHASH'" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            " mssql " in event.deep_get("CommandLine", default=""),
                            " -u " in event.deep_get("CommandLine", default=""),
                            " -p " in event.deep_get("CommandLine", default=""),
                            " -M " in event.deep_get("CommandLine", default=""),
                            " -d " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            " smb " in event.deep_get("CommandLine", default=""),
                            " -u " in event.deep_get("CommandLine", default=""),
                            " -H " in event.deep_get("CommandLine", default=""),
                            " -M " in event.deep_get("CommandLine", default=""),
                            " -o " in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            " smb " in event.deep_get("CommandLine", default=""),
                            " -u " in event.deep_get("CommandLine", default=""),
                            " -p " in event.deep_get("CommandLine", default=""),
                            " --local-auth" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            all(
                [
                    " --local-auth" in event.deep_get("CommandLine", default=""),
                    " -u " in event.deep_get("CommandLine", default=""),
                    " -p " in event.deep_get("CommandLine", default=""),
                    " 10." in event.deep_get("CommandLine", default=""),
                    " 192.168." in event.deep_get("CommandLine", default=""),
                    "/24 " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
