def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") == 4768,
            event.deep_get("TargetUserName", default="").endswith("$"),
            event.deep_get("CertThumbprint", default="") != "",
            not any(
                [
                    event.deep_get("IpAddress", default="") == "::1",
                    event.deep_get("CertThumbprint", default="") == "",
                ]
            ),
        ]
    ):
        return True
    return False
