def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\reg.exe"),
                            event.deep_get("Image", default="").endswith("\\powershell.exe"),
                            event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in ["reg.exe", "powershell.exe", "pwsh.dll"],
                ]
            ),
            "ControlSet" in event.deep_get("CommandLine", default=""),
            "\\Control\\Lsa" in event.deep_get("CommandLine", default=""),
            any(
                [
                    "Set-ItemProperty" in event.deep_get("CommandLine", default=""),
                    "New-ItemProperty" in event.deep_get("CommandLine", default=""),
                    " add " in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    "IsPplAutoEnabled" in event.deep_get("CommandLine", default=""),
                    "RunAsPPL" in event.deep_get("CommandLine", default=""),
                    "RunAsPPLBoot" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
