def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith(":\\Windows\\System32\\query.exe"),
            any(
                [
                    "session >" in event.deep_get("CommandLine", default=""),
                    "process >" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
