def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\wscript.exe"),
                    event.deep_get("Image", default="").endswith("\\cscript.exe"),
                ]
            ),
            any(
                [
                    ":\\Perflogs\\" in event.deep_get("TargetFilename", default=""),
                    ":\\ProgramData\\" in event.deep_get("TargetFilename", default=""),
                    ":\\Temp\\" in event.deep_get("TargetFilename", default=""),
                    ":\\Tmp\\" in event.deep_get("TargetFilename", default=""),
                    ":\\Users\\" in event.deep_get("TargetFilename", default=""),
                    ":\\Windows\\Temp\\" in event.deep_get("TargetFilename", default=""),
                    "\\AppData\\Local\\Temp" in event.deep_get("TargetFilename", default=""),
                    "\\AppData\\Roaming\\Temp" in event.deep_get("TargetFilename", default=""),
                    "\\Start Menu\\Programs\\Startup\\"
                    in event.deep_get("TargetFilename", default=""),
                    "\\Temporary Internet" in event.deep_get("TargetFilename", default=""),
                ]
            ),
            any(
                [
                    event.deep_get("TargetFilename", default="").endswith(".js"),
                    event.deep_get("TargetFilename", default="").endswith(".jse"),
                    event.deep_get("TargetFilename", default="").endswith(".vba"),
                    event.deep_get("TargetFilename", default="").endswith(".vbe"),
                    event.deep_get("TargetFilename", default="").endswith(".vbs"),
                    event.deep_get("TargetFilename", default="").endswith(".wsf"),
                    event.deep_get("TargetFilename", default="").endswith(".wsh"),
                ]
            ),
        ]
    ):
        return True
    return False
