def rule(event):
    if all(
        [
            any(
                [
                    "\\nslookup.exe" in event.deep_get("Image", default=""),
                    event.deep_get("OriginalFileName", default="") == "\\nslookup.exe",
                ]
            ),
            any(
                [
                    event.deep_get("ParentImage", default="").endswith("\\powershell.exe"),
                    event.deep_get("ParentImage", default="").endswith("\\pwsh.exe"),
                ]
            ),
            any(
                [
                    " -q=txt " in event.deep_get("CommandLine", default=""),
                    " -querytype=txt " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
