-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
After a port scan, ports are identified with unknown
It comes from the whatportis command and is also related with #984
Whatportis rely on the IANA database and this is the root cause of this problem.
If download failed, whatportis is useless and no port are recognized
And there's no way to update the IANA DB from GUI, only a docker-compose restart celery
triggers the script update and maybe it download the db or maybe not, it depends on the IANA server.
Then you'll have to launch a port scan again to correctly displayed ports
But, and there is a but, while scan is finished, ports are correctly recognized, but duplicated, for ex. You will have 80/http
and 80/unknown
Collateral damage for this is that when you do another port scan on the same target and same port is found (eg. 80), now reNgine task will fail with the MultipleObjectsReturned error
There are several solutions for this problem :
- Integrate whatportis and the IANA database directly into the docker
- Whatportis seems to be old, maybe an other project could fit
- Rely on nmap to identify port
The quickest solution is the first one, and the better is the third one, as nmap is more effective in service port recognition.
To enable nmap we need some additional work, as nmap recognize the service by querying it, the same port could have more than one label. So we need to rework this part in the db, the logic...
@yogeshojha @AnonymousWP
Your advice ?
Expected Behavior
Port should be identified
Steps To Reproduce
- Check in the make logs at celery container start that IANA db download failed
- Connect to reNgine and launch a port scan
Environment
- reNgine: 2.0.2
- OS: Ubuntu 22.04.3
- Python: 3.10
- Docker Engine:
- Docker Compose:
- Browser: FF 120
Anything else?
No response