I am in desperate need of some help.
I am working on a project where I am running OpenVAS ( I know I know ) on a Raspberry Pi 3+ remotely.
Because of the hardware limitations I am unable to let the Task be created with default options. I need to reduce max checks to 5 and max hosts to 3. However when I run the following xml using the 'omp -u user -w password -X ’
<preference><name>Maximum concurrently executed NVTs per host</name><scanner_name>max_checks</scanner_name><value>5</value></preference>
<preference><name>Maximum concurrently scanned hosts</name><scanner_name>max_hosts</scanner_name><value>3</value></preference>
<preference><name>Network Source Interface</name><scanner_name>source_iface</scanner_name><value></value></preference>
It does not like the preferences. I exported a Task XML from when I used GSA Web App to create a task as my basis.
Is this even possible? If I build GVM 11 from source for Raspbian Buster will this offer better CLI tools to allow me make task preferences like this possible?
I appreciate your help and your patience. Thanks in advance.
April 24, 2020, 7:47am
with gvm10 I was using the function
preferences set to in your case
Maybe this helps you.
Yes, that is a huge help. I am going through the nightmare of compiling GVM 11 for Raspberry PI and it seems to be an impossible task.
Is it possible to run GVM-Tools (if I can compile it) with OpenVAS 9.0 on Raspbian Buster? Going to research now.
Well it appears that GVM-tools doesn’t exist for raspberry pi and I am not able to compile it.
April 29, 2020, 5:56am
gvm-tools is written in Python therefore nothing needs to be compiled. I guess you are mixing it up with gvm-libs.
And yes gvm-tools is compatible with GVM/OpenVAS 9.
YES! You are right. I was mixing it up. I am a silly goose. OK. Well pip didn’t work on raspian Buster. I am sure I can easily place in /opt/ manually or some such. Thank you.
OK. I got it to install on Raspbian Buster with PIP3. This is a good start to trying to set scanner task preferences as shown above… Looking at the docs now (any advice is welcome).
The next step after testing will be to get this deployed to devices in closed environments. My thinking is push out the gvm-tools git folder and use pip at each point to install locally.
I really appreciate the help here. Thanks!
Remove field name from preference.
sudo docker exec -t -u gvm openvas /usr/local/bin/gvm-cli --gmp-username yourusername --gmp-password yourpassword tls --xml "<create_task><name>Scan Suspect Host2</name><target id=\"905da526-9c2d-469d-8368-32e71af075a5\"/><config id=\"ccb449d9-ced7-4ea0-b879-c00574a6c14e\"/><scanner id=\"89df727c-0ec7-44b6-94dd-15a492d5bc2f\"/><preferences><preference><scanner_name>max_hosts</scanner_name><value>10</value></preference><preference><scanner_name>max_checks</scanner_name><value>1</value></preference></preferences></create_task>"
This is the solution for Docker, but it can also be applied to the native installation of gvm-cli.