Skip to content

[BUG] ... resume-xxxxxx.cfg file is empty with large scans #6169

@ik8sqi

Description

@ik8sqi

Is there an existing issue for this?

  • I have searched the existing issues.

Current Behavior

When I run a large scan for a long time (currently 500 hosts for the past 70 hours), hitting CTRL+C to save the interim scan does not work. The .cfg file that gets created only contains an empty "resumeFrom". I've tried interrupting the scan sooner in the previous days, but the .cfg is always the same with an empty resumeFrom.

I tested interrupting with CTRL+C when scanning a single host and in that case the .cfg file does contain the progress listed under the resumeFrom.

The computer is a Kali Parallels vm running on a MacOS intel MacMini:

pentester@kali:~$ hostnamectl
Virtualization: parallels
Operating System: Kali GNU/Linux Rolling
Kernel: Linux 6.10.11-amd64
Architecture: x86-64
Firmware Version: 20.2.2 (55879)
Firmware Date: Sat 2025-02-22

This is the nuclei command line (running with sudo) that I use:
sudo nuclei -list Domains-2.txt -dut -no-mhe --stats -stats-interval 60 -dashboard -uc -headless -H "User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" -H "Referer: 127.0.0.1" -H "X-Forwarded-For: 127.0.0.1" -scan-strategy host-spray -c 5 -rate-limit 10

The log output will show the results of what is logged when doing the CTRL+C. I also show the "cat" of the .cfg file that is created, and a list of all my previous attempts to do interrupt - all the .cfg files created are 21 bytes in size, all with an empty resumeFrom.

Expected Behavior

The resume-nnnn.cfg file should contain the progress of the scan so it can be resumed.

Steps To Reproduce

Run nuclei with a target list of 500 hostnames:
sudo nuclei -list Domains-2.txt -dut -no-mhe --stats -stats-interval 60 -dashboard -uc -headless -scan-strategy host-spray -c 5 -rate-limit 10

Hit CTRL+C after several hours (12/24). The resume-nnnn.cfg file will contain an empty "resumeFrom".

Relevant log output

pentester@kali:/media/psf/BugBounty$ sudo nuclei -list Domains-2.txt -dut -no-mhe --stats -stats-interval 60 -dashboard -uc -headless -H "User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" -H "Referer: 127.0.0.1" -H "X-Forwarded-For: 127.0.0.1" -scan-strategy host-spray -c 5 -rate-limit 10
[sudo] password for pentester: 

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.4.2

                projectdiscovery.io

[INF] Running uncover queries from template against: publicwww,censys,zoomeye,github,shodan,fofa,google,hunter
[ERR] Could not get targets using google engine from uncover: [uncover:RUNTIME] agents [google] requires keys but no keys were found
[WRN] Skipping 196 unsigned template[s]
[INF] Current nuclei version: v3.4.2 (latest)
[INF] Current nuclei-templates version: v10.1.6 (latest)
[INF] To view results on cloud dashboard, visit https://cloud.projectdiscovery.io/scans upon scan completion.
[INF] New templates added in latest release: 78
[INF] Templates loaded for current scan: 7672
[INF] Executing 7672 signed templates from projectdiscovery/nuclei-templates
[INF] Targets loaded for current scan: 500
[INF] Running httpx on input host
[INF] Found 408 URL from httpx
[INF] Templates clustered: 1565 (Reduced 731500 Requests)
[0:26:41] | Templates: 7672 | Hosts: 500 | RPS: 0 | Matched: 0 | Errors: 156 | Requests: 183/7293500 (0%)
................................
................................
[70:23:00] | Templates: 7672 | Hosts: 500 | RPS: 9 | Matched: 2287 | Errors: 953552 | Requests: 2420376/7293500 (33%)
^C[INF] CTRL+C pressed: Exiting
[INF] Attempting graceful shutdown...
[INF] Uploading scan results to cloud...
[INF] 2287 Scan results uploaded to cloud, you can view scan results at https://cloud.projectdiscovery.io/scans/xxxxxxxxxxxxxxx?team_id=none
[70:23:05] | Templates: 7672 | Hosts: 500 | RPS: 9 | Matched: 2287 | Errors: 953574 | Requests: 2420432/7293500 (33%)
[INF] Creating resume file: /root/.cache/nuclei/resume-cvsbtam1qve944ikun0g.cfg

pentester@kali:/media/psf/BugBounty$ sudo cat /root/.cache/nuclei/resume-cvsbtam1qve944ikun0g.cfg
[sudo] password for pentester: 
{
        "resumeFrom": {}
}

pentester@kali:/media/psf/BugBounty$ sudo ls -l /root/.cache/nuclei/
total 20
-rw------- 1 root root 21 Apr  9 09:30 resume-cvr23t61qveer5dp8clg.cfg
-rw------- 1 root root 21 Apr  9 09:30 resume-cvr247e1qveeof4hg000.cfg
-rw------- 1 root root 21 Apr 10 16:51 resume-cvrspl61qved8auqhui0.cfg
-rw------- 1 root root 21 Apr 11 09:00 resume-cvs3fhm1qvedep8dmq50.cfg
-rw------- 1 root root 21 Apr 14 12:10 resume-cvsbtam1qve944ikun0g.cfg

Environment

- OS: Kali GNU/Linux Rolling
- Nuclei: 3.4.2
- Go: did not use go to install

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions