def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\attrib.exe"),
                    event.deep_get("OriginalFileName", default="") == "ATTRIB.EXE",
                ]
            ),
            " +s" in event.deep_get("CommandLine", default=""),
            any(
                [
                    " %" in event.deep_get("CommandLine", default=""),
                    "\\Users\\Public\\" in event.deep_get("CommandLine", default=""),
                    "\\AppData\\Local\\" in event.deep_get("CommandLine", default=""),
                    "\\ProgramData\\" in event.deep_get("CommandLine", default=""),
                    "\\Downloads\\" in event.deep_get("CommandLine", default=""),
                    "\\Windows\\Temp\\" in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    ".bat" in event.deep_get("CommandLine", default=""),
                    ".dll" in event.deep_get("CommandLine", default=""),
                    ".exe" in event.deep_get("CommandLine", default=""),
                    ".hta" in event.deep_get("CommandLine", default=""),
                    ".ps1" in event.deep_get("CommandLine", default=""),
                    ".vbe" in event.deep_get("CommandLine", default=""),
                    ".vbs" in event.deep_get("CommandLine", default=""),
                ]
            ),
            not all(
                [
                    "\\Windows\\TEMP\\" in event.deep_get("CommandLine", default=""),
                    ".exe" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
