Adding the website resource and finding #271
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is the first of multiple PRs
With this new resource and finding, it is possible to represent websites in the database.
When a
PortServiceFinding
with aserviceName
ofhttp
orhttps
is emitted by a job, the jobs manager recognises that this is a website and emits aWebsiteFinding
for every combination of a host's linked domains.It is done this way because a port scan does not have the domain information with it, and anyway, any domain that resolves to a host could have a different website for the same port through the concept of virtual hosts.
A website is the combination of a domain (can be empty), a host, a port and a path (defaults to
/
). The reason behind the path is that several websites could be routed by a proxy, resulting in a different website at a different path.This PR does not include any interface, but it will eventually get its own view. Cleanup is also lacking a little bit.