def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("ParentImage", default="").endswith("\\wsusservice.exe"),
                    all(
                        [
                            event.deep_get("ParentImage", default="").endswith("\\w3wp.exe"),
                            "WsusPool" in event.deep_get("ParentCommandLine", default=""),
                        ]
                    ),
                ]
            ),
            any(
                [
                    event.deep_get("Image", default="").endswith("\\cmd.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell.exe"),
                    event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                    event.deep_get("Image", default="").endswith("\\powershell_ise.exe"),
                ]
            ),
        ]
    ):
        return True
    return False
