def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\NSudo.exe"),
                            event.deep_get("Image", default="").endswith("\\NSudoLC.exe"),
                            event.deep_get("Image", default="").endswith("\\NSudoLG.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in ["NSudo.exe", "NSudoLC.exe", "NSudoLG.exe"],
                ]
            ),
            any(
                [
                    "-U:S " in event.deep_get("CommandLine", default=""),
                    "-U:T " in event.deep_get("CommandLine", default=""),
                    "-U:E " in event.deep_get("CommandLine", default=""),
                    "-P:E " in event.deep_get("CommandLine", default=""),
                    "-M:S " in event.deep_get("CommandLine", default=""),
                    "-M:H " in event.deep_get("CommandLine", default=""),
                    "-U=S " in event.deep_get("CommandLine", default=""),
                    "-U=T " in event.deep_get("CommandLine", default=""),
                    "-U=E " in event.deep_get("CommandLine", default=""),
                    "-P=E " in event.deep_get("CommandLine", default=""),
                    "-M=S " in event.deep_get("CommandLine", default=""),
                    "-M=H " in event.deep_get("CommandLine", default=""),
                    "-ShowWindowMode:Hide" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
