yogeshojha / rengine

reNgine is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface. reNgine makes it easy for penetration testers to gather reconnaissance with minimal configuration and with the help of reNgine's correlation, it just makes recon effortless.
https://yogeshojha.github.io/rengine/
GNU General Public License v3.0
7.45k stars 1.13k forks source link

Port scanning failed - version 1.3.3 #674

Closed MikJagger closed 1 year ago

MikJagger commented 2 years ago

Issue Summary

After a in-place upgrade from 1.2.0 to 1.3.0 with steps as documented below all new scan fail on the 'Port scanning' module with below error:

Port Scanning: Failed Error: [Errno 2] No such file or directory: '/usr/src/scan_results/[TARGETURL]_898817779187/ports.json'

After the failed module the scan continues on the next module (OSINT) and eventually finishes the overall task with and failed status.

I did not do a new deployment yet for testing purposes but wanted to report the potential bug based on the in-place upgrade scenario up front.

Technical details

Deployment is based on a Ubuntu 20.04 VPS (Azure IaaS) Rengine version in-place upgrade from 1.2.0 to 1.3.0 Upgrade method used https://rengine.wiki/update/ see detailed update instructions

github-actions[bot] commented 2 years ago

👋 Hi @MikJagger, Issues is only for reporting a bug/feature request. Please read documentation before raising an issue https://rengine.wiki For very limited support, questions, and discussions, please join reNgine Discord channel: https://discord.gg/azv6fzhNCE Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.

EasyNV commented 2 years ago

Hi, I also stumble upon the same issue.

My problem is because I set the use_naabu_config to true. It will add -config flag when running naabu, but it looks like naabu currently will automatically look for configuration file at $HOME/.config/naabu/config.yaml.

https://github.com/yogeshojha/rengine/blob/758debc4e79b5dc3f1ee29fcabcacb8e15656a94/web/reNgine/tasks.py#L1051-L1052

You can fix this by setting the use_naabu_config to false on your Scan Engine configuration.

Ref: https://github.com/projectdiscovery/naabu#configuration-file

MikJagger commented 2 years ago

(in-place) update from 1.3.0 to 1.3.1 solved the issue.

MikJagger commented 1 year ago

Today I stumbled on the same issue when performing a new clean install on below setup. Reopened the ticket. Solution as suggested by EasyNV is not applicable for a (default) install (no custom engine configs).

Issue Summary

Port Scanning: Failed Error: [Errno 2] No such file or directory: '/usr/src/scan_results/[TARGETURL]_898817779187/ports.json'

After the failed module the scan continues on the next module (OSINT) and eventually finishes the overall task with and failed status.

Technical details: Deployment is based on a Ubuntu 22.04.1 LTS (VPS (Azure IaaS) Rengine version 1.2.0 to 1.3.3 First scan after default installs failed with error.

ad0nis commented 1 year ago

Can confirm that this is an issue. I just completely reset old install, updated, re-built, setup a new target and reproduced this issue immediately.

EasyNV commented 1 year ago

Hi, sorry just see notification on this issue thread.

You need to use a custom scan engine configuration in order for the fix to work as the default one always set the options for use_naabu_config to true.

If we use the default one the celery worker will run the naabu command / port scanning feature with -config flag that will make the execution failed (exit code 2).

$ naabu -config $HOME/.config/naabu/config.yaml
flag provided but not defined: -config
$ echo $?
2
mazapepsi commented 1 year ago

is there any fix for this, i am on version 1.3.4 and issue persists. Tried both use_naabu_config to true and false. Infact i dont' even wan't to use naabu. I am trying to use smap in rengine. So i added uses_tool: [smap] under port_scan section. But this naabu error is messing it up. Can i do it some otherway

x0d3 commented 1 year ago

rather its true or false its not working rengine-v: 1.3.6

haimtoledano commented 1 year ago

same here rengine-v: 1.3.6