def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") in [141, 142],
            any(
                [
                    "\\Windows\\SystemRestore\\SR" in event.deep_get("TaskName", default=""),
                    "\\Windows\\Windows Defender\\" in event.deep_get("TaskName", default=""),
                    "\\Windows\\BitLocker" in event.deep_get("TaskName", default=""),
                    "\\Windows\\WindowsBackup\\" in event.deep_get("TaskName", default=""),
                    "\\Windows\\WindowsUpdate\\" in event.deep_get("TaskName", default=""),
                    "\\Windows\\UpdateOrchestrator\\" in event.deep_get("TaskName", default=""),
                    "\\Windows\\ExploitGuard" in event.deep_get("TaskName", default=""),
                ]
            ),
            not any(
                [
                    "AUTHORI" in event.deep_get("UserName", default=""),
                    "AUTORI" in event.deep_get("UserName", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
