def rule(event):
    if all(
        [
            "\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-21-"
            in event.deep_get("TargetObject", default=""),
            "\\ProfileImagePath" in event.deep_get("TargetObject", default=""),
            any(
                [
                    "ANONYMOUS" in event.deep_get("Details", default=""),
                    "_DomainUser_" in event.deep_get("Details", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
