def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\gpscript.exe"),
                    event.deep_get("OriginalFileName", default="") == "GPSCRIPT.EXE",
                ]
            ),
            any(
                [
                    " /logon" in event.deep_get("CommandLine", default=""),
                    " /startup" in event.deep_get("CommandLine", default=""),
                ]
            ),
            not event.deep_get("ParentCommandLine", default="")
            == "C:\\windows\\system32\\svchost.exe -k netsvcs -p -s gpsvc",
        ]
    ):
        return True
    return False
