def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") == 16,
            event.deep_get("Provider_Name", default="") == "Microsoft-Windows-Kernel-General",
            any(
                [
                    "\\Temp\\SAM" in event.deep_get("HiveName", default=""),
                    "\\Temp\\SECURITY" in event.deep_get("HiveName", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
