Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use host from the original hosts list when boreas is enabled #725

Merged
merged 1 commit into from
May 4, 2021

Conversation

jjnicola
Copy link
Member

@jjnicola jjnicola commented May 3, 2021

Depends on greenbone/gvm-libs#490

What:
Use host from the original hosts list when boreas is enabled

Why:
When boreas is enabled, a new host element is created with only the IP address,
while the hostname was lost during the alive detection.

How:
Find a host which has an alias, which resolves to an IP. The ip reverse-lookup to another hostname/vhost. eg www.google.com
it resolves to 142.250.184.196, and the IP reverse-lookup to fra24s11-in-f4.1e100.net

Then start a scan against it

start_scan scan_id="829097a9-85d5-4bb8-bac0-e64c362b2836">
  <targets>
    <target>
      <hosts>www.google.com</hosts>
      <exclude_hosts/>
      <finished_hosts/>
      <ports>22</ports>
      </credentials>
    </target>
  </targets>
  <scanner_params>
    <test_alive_hosts_only>1</test_alive_hosts_only>
    <expand_vhosts>1</expand_vhosts>
  </scanner_params>
  <vt_selection>
    <vt_single id="1.3.6.1.4.1.25623.1.0.90022"/>
  </vt_selection>
</start_scan>

without the patch you see:

sd   main:MESSAGE:2021-05-03 14h05.27 utc:25679: Vulnerability scan 829097a9-85d5-4bb8-bac0-e64c362b2836 started for host: 172.217.22.196 (Vhosts: 172.217.22.196, muc11s01-in-f4.1e100.net)

with the patch you see, and the original hostname (the one in the target) is used as vhosts as well:

sd   main:MESSAGE:2021-05-03 14h10.58 utc:25911: Vulnerability scan 829097a9-85d5-4bb8-bac0-e64c362b2836 started for host: 172.217.22.196 (Vhosts: 172.217.22.196, muc11s01-in-f4.1e100.net, www.google.com)

Checklist:

When boreas is enabled, a new host element is created with only the IP address,
while the hostname was lost during the alive detection.
@jjnicola jjnicola requested a review from a team as a code owner May 3, 2021 14:12
@ArnoStiefvater ArnoStiefvater merged commit efcf726 into greenbone:openvas-21.04 May 4, 2021
jjnicola added a commit that referenced this pull request May 4, 2021
Use host from the orignal hosts list when boreas is enabled (backport #725)
jjnicola added a commit that referenced this pull request May 4, 2021
Use host from the orignal hosts list when boreas is enabled (backport #725)
@cfi-gb cfi-gb changed the title Use host from the orignal hosts list when boreas is enabled Use host from the original hosts list when boreas is enabled May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants