Hi everyone,

I am currently working with OpenVAS Scanner 5.1.1 with openvas-libraries
9.0.1 on CentOS Linux 7.3 and I found a strange behaviour.

If you interrupt (SIGKILL) an OTP communication while openvas-scanner is
running a scan you add a database to the redis-server which is not cleaned.

First in the /etc/redis.conf file, I asked for 16 databases as a maximum.
Once I interrupted (SIGKILL) a scan 15 times, the scanner is stucked and
will not run any further scan...
If you try to restart openvas-scanner service it will never resume and
hang for a long time and time out.

I used the temporary solution which is flushing the redis-cli databases
with flushall command and restart the scanner to retrieve the NVTs.

I think this is not a problem as long as you don't SIGKILL the program
but I've seen a few people who did not understand why they had to
reinstall everything to get OpenVAS working so this might be helpful for
them.
I am not sure but I think I faced the same symptoms as on this topic:
https://lists.wald.intevation.org/pipermail/openvas-discuss/2017-June/011222.html

Otherwise, Here are the steps to check if you have databases which are
not used :
$ redis-cli -s <path_to_redis_socket>
> INFO keyspace

I was thinking it could be useful to wipe the databases unused at the
start of a scan. But it seems these databases are used as well to carry
on a scan...

Sincerely,

Yohan

PS: See below the difference of commands send to redis between openvassd
in a working state and the one used when Redis reached the maximum
number of databases.

-------------------------------------

redis monitoring report:

**** Working Openvas instructions sent to redis:

SELECT 1
"KEYS" "oid:*:name"
for oidNumber in Db_Of_Oid:
    "SMEMBERS" "oid:1.3.6.1.4.1.25623.1.0.72170:name"
"HSETNX" "OpenVAS.__GlobalDBIndex" "1" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "2" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "3" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "4" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "5" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "6" "1"
"SELECT" "6"
"PING"
"FLUSHDB"
"SELECT" "0"
"HDEL" "OpenVAS.__GlobalDBIndex" "6"
"KEYS" "name:*:oid"
for plugin_path in ???:
    "SMEMBERS" "name:2015/gb_fedora_2015_9048_nss-softokn_fc22.nasl:oid"
for oidNumber in Db_Of_Oid:
    "SRANDMEMBER" "oid:1.3.6.1.4.1.25623.1.0.64068:category"
... other instructions


**** Bugged Openvas instruction sent to redis:

SELECT 1
"KEYS" "oid:*:name"
for oidNumber in Db_Of_Oid:
    "SMEMBERS" "oid:1.3.6.1.4.1.25623.1.0.72170:name"
"HSETNX" "OpenVAS.__GlobalDBIndex" "1" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "2" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "3" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "4" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "5" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "6" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "7" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "8" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "9" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "10" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "11" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "12" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "13" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "14" "1"
"HSETNX" "OpenVAS.__GlobalDBIndex" "15" "1"
... repeat HSETNX infinitely


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss

Reply via email to