intrigueio / intrigue-core

Discover Your Attack Surface!
https://core.intrigue.io
Other
1.35k stars 262 forks source link

Networkservice confirm openport #434

Closed shpendk closed 2 years ago

shpendk commented 2 years ago

This PR checks and confirms the port is open before creating a NetworkService entity. It does so in two places:

  1. in lib/tasks/helpers/services.rb (function "_create_network_service_entity")
  2. in enrich/network_service.rb

The reason to do it in enrich is to catch cases where the _create_network_service_entity helper is not being used. I set a hidden field in the entity so that we don't check the port twice. Its a bit ugly but should do the trick