def rule(event):
    if all(
        [
            any(
                [
                    all(
                        [
                            event.deep_get("EventID", default="") == 4624,
                            event.deep_get("SubjectUserSid", default="") == "S-1-0-0",
                            event.deep_get("LogonType", default="") == 3,
                            event.deep_get("LogonProcessName", default="") == "NtLmSsp",
                            event.deep_get("KeyLength", default="") == 0,
                        ]
                    ),
                    all(
                        [
                            event.deep_get("EventID", default="") == 4624,
                            event.deep_get("LogonType", default="") == 9,
                            event.deep_get("LogonProcessName", default="") == "seclogo",
                        ]
                    ),
                ]
            ),
            not event.deep_get("TargetUserName", default="") == "ANONYMOUS LOGON",
        ]
    ):
        return True
    return False
