Error in host specification

Hello folks,

While creating a “Target” for scanning - I am using the subnet “10.102.0.0/24” but I keep getting an error stating that there is an error in host specification. This is the LAN we are using! Why is it not taking it? I noticed that when the third octet is anything but a zero, it works. Please help.

Thanks
SF

I was able to fix this. Using the last octet as any other number except single digit works. I used the target as “10.102.0.20/24” and it took the LAN

Had this same problem from Kali Linux. After upgrading Kali to 2019.1 we have problem with OpenVAS. Existing targets with a subnet definition (e.g. 10.0.0.0/24) is considered invalid. Creating new targets fails, both from CLI and through GSA webinterface.

Main problem is that existing targets are no longer valid. In GSA the number op IPs is -1 for these targets. OpenVAS itself wasn’t updated.

The problem depends on the position of ‘/’. If ‘/’ is the 12th or higher character there is no problem.
So:
10.0.1.1/24 – Fails
10.10.1.1/24 – Fails
10.10.10.1/24 – Fails
10.10.10.1/24 – Fails
10.10.10.10/24 – no problem. ‘/’ is 12th character
10.10.1.10/24 – Fails
10.10.1.100/24 – no problem
192.168.1.1-254 – no problem

I’ve found a workaround for old targets that have problems after the upgrade:

  • Generate a list of all IP-adressses in the subnet for example with ‘nmap -sL 10.1.1.0/24’
  • Stop openvas-manager
  • Open SQLite3 databse: sqlite3 /var/lib/openvas/mgr/tasks.db
  • Update table targets. E.g. update targets set hosts = ’ where name = ‘’
  • Start openvas-manager

See https://bugs.kali.org/view.php?id=5233

I can confirm this behaviour exists in a fresh and upgraded install of Kali and OpenVAS.

10.1.1.1/24 fails with 400 error.
10.1.1.10/24 works fine.

You could raise an issue to the development team here:

/**
 * @brief Default maximum number of hosts a target may specify.
 */
#define MANAGE_MAX_HOSTS 4095

/**
 * @brief Default maximum number of hosts a user host access may specify.
 */
#define MANAGE_USER_MAX_HOSTS 16777216

The flow of function [create_target]

                --------------------------------------------------
                |              create_target                     |
                |        (Error in host specification)           |
                --------------------------------------------------
                                     |
                                     |
                  ---------------------------------------------
                  | manage_count_hosts (clean, clean_exclude) |
                  ---------------------------------------------
                                     |
                                     |
                      ------------------------------------
                      | manage_count_hosts_max (         |
                      |    given_hosts,                  |
                      |    exclude_hosts,                |
                      |    manage_max_hosts ());         |
                      ------------------------------------
                                    |
                                    |
               ---------------------------------------------------------
               |                                                       |
               |                                                       |
-----------------------------------                           -----------------------
| manage_count_hosts_max (        |                           |  manage_max_hosts() |
|     const char *given_hosts,    |                           -----------------------
|     const char *exclude_hosts,  |                                   |
|    int max_hosts)               |                                   |
-----------------------------------                  ---------------------------------------------
     |                                               | max_hosts = MANAGE_MAX_HOSTS (val: 4096)  |
     |                                               ---------------------------------------------
------------------------------
| gvm_hosts_new_with_max (   |
|    given_hosts,            |
|    max_hosts)              |
------------------------------

Hi.
I find an Easy way to Solve that, you only have to put in the box of manual Target this

Example: 10.0.0.1-10.0.0.255
And it Will run Ok

2 Likes

NOK for me :
Example: 10.0.0.1-10.0.0.255 ===> IPs = 1

LAN will not be scan :frowning:

Hi, is there any further update on this? Just installed Kali 2020.1 and OpenVas, I have the same issue with 10.x.x.x/24 subnets.

And Kali still only ships an end of life version About the Greenbone Source Edition (GSE) category

2 Likes

Me, too.
I’m using openvas on Debian 10 and have same issue.

For Debian 10 the same posted previously applies as well:

1 Like