Open fabianhjr opened 2 years ago
@fabianhjr Thanks for the report.
For example, the server on 10.x.1.1 is active. Perform vuls discover in two ranges: 10.x.0.0/21 (10.x.0.0 - 10.x.7.255) and 10.x.1.0/24 (10.x.1.0 - 10.x.1.255). The 10.x.1.1 server is in both ranges and should be detected in both ranges, but in your environment it was only detected at 10.x.1.0/24. The problem you are experiencing in your environment is this situation?
Does this always reproduce in your environment?
The problem you are experiencing in your environment is this situation?
Yes, vuls discovered servers with 10.x.1.0/24 but not with 10.x.0.0/21
There are no servers on 10.x.0.0/24 and the first one is on 10.x.1.0/24; I am unfamiliar with the codebase to be sure if some laziness code would stop discovery upon an empty /24.
Was able to reproduce again today:
./vuls discover 10.x.0.0/21 1.2m Mon 10 Oct 2022 08:44:37 PM CDT
[Oct 10 20:44:40] INFO [localhost] vuls-v0.20.5-build-20221004_192434_eb87d5d
[Oct 10 20:46:20] ERROR [localhost] Active hosts not found in 10.x.0.0/21
vs
./vuls discover 10.x.1.0/24 30.2s Mon 10 Oct 2022 08:44:11 PM CDT
[Oct 10 20:44:45] INFO [localhost] vuls-v0.20.5-build-20221004_192434_eb87d5d
# Create config.toml using below and then ./vuls -config=/path/to/config.toml
[...] // Configs / IPs redacted
What did you do? (required. The issue will be closed when not provided.)
Want to auto-discover (generate a lot of configs) regarding servers on
10.x.1._
,10.x.2._
,10.x.3._
, ... (10.x.1.0/24
,10.x.2.0/24
, ...) so attempted10.x.0.0/21
which should cover10.x.0.1
-10.x.7.254
(enough for my use case)However:
Does result in servers being discovered and should have been part of the auto-discovery for the bigger network/smaller mask.
What did you expect to happen?
Autodiscovery of a subset of a net being part of autodiscovery of a bigger net
What happened instead?
Please re-run the command using
-debug
and provide the output below.Steps to reproduce the behaviour:
Attempt a partial CIDR such as /21 on a 10.0.0.0/8 local network
Go version (
go version
): go version go1.18.6 linux/amd64Go environment (
go env
):commit eb87d5d4e11593271f552c785cd63d67956c5c2f (HEAD -> master, tag: v0.20.5, origin/master, origin/HEAD)
N/A
vuls discover