xmllinuxdebianopenvas

How to call OpenVAS Manager service directly?


I have installed the whole OpenVAS architecture on a Debian 8 machine. I can access the OpenVAS Manager service through Greenbone Security Assistant and through the OpenVAS CLI command line, but what I need is to query the service directly by using XML, because I need to practice and to study OMP protocol itself. I know that service is running on my machine on port 9390 but when I try to call it, it never responds. What can I do? I have tried to issue to it simple queries that do not need authentication, as this: <get_version/> Or even I have tried to authenticate to it with the corresponding XML code. I have tried to call it by the Google Chrome Poster extension, by the curl command on Linux terminal, and even by a C program which uses sockets. All my attempts have failed and service never responds, although I know that it is running well, because through Greenbone Security Assistant I can play with it.

The OMP documentation could be useful: http://www.greenbone.net/technology/omp.html But what I need is an easy way to issue XML commands to the service and get responses, and a basis to be able to develop some hello world kind program using C language for example, which issues a simple call to OMP and renders the response.


Solution

  • The OpenVAS Manager doesn't expose an REST Web Service. Instead it has an service running on port 9390 like you say that accepts secure connections and xml requests not http requests, that's why the methods you tested didn't work. You have to connect to it using SSL sockets and send the xml requests in the format present here. An easy way to test the protocol would be to use OpenSSL s_client you if have it installed.

    Example:

    openssl s_client -connect <HOST>:<PORT>
    

    This will open an SSL connection to the OpenVAS Manager and then you can write xml requests like <get_version/> and get responses like you were using telnet or netcat.