def rule(event):
    if all(
        [
            any(
                [
                    "[System.Net.WebRequest]::create"
                    in event.deep_get("ScriptBlockText", default=""),
                    "curl " in event.deep_get("ScriptBlockText", default=""),
                    "Invoke-RestMethod" in event.deep_get("ScriptBlockText", default=""),
                    "Invoke-WebRequest" in event.deep_get("ScriptBlockText", default=""),
                    " irm " in event.deep_get("ScriptBlockText", default=""),
                    "iwr " in event.deep_get("ScriptBlockText", default=""),
                    "Resume-BitsTransfer" in event.deep_get("ScriptBlockText", default=""),
                    "Start-BitsTransfer" in event.deep_get("ScriptBlockText", default=""),
                    "wget " in event.deep_get("ScriptBlockText", default=""),
                    "WinHttp.WinHttpRequest" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
            not event.deep_get("Path", default="").startswith(
                "C:\\Packages\\Plugins\\Microsoft.GuestConfiguration.ConfigurationforWindows\\"
            ),
        ]
    ):
        return True
    return False
