def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") == 4657,
            "\\REGISTRY\\MACHINE\\SYSTEM" in event.deep_get("ObjectName", default=""),
            "ControlSet" in event.deep_get("ObjectName", default=""),
            "\\Control\\Lsa" in event.deep_get("ObjectName", default=""),
            event.deep_get("ObjectValueName", default="")
            in ["LmCompatibilityLevel", "NtlmMinClientSec", "RestrictSendingNTLMTraffic"],
        ]
    ):
        return True
    return False
