-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when executing a lot of SMB targets: IndexError: list index out of range #454
Comments
How many hosts you are talking about? Cause while I testing to banks, I didn't get error like this. |
Im doing scan to multiple Additionally if I scan the single host that provoked the exeception, the output is fine. EDIT: I noticed i did not specify domain |
If the txt file contains subnets, this could be the reason. I always find active hosts first and then start testing. I'm talking about thousands hosts btw. |
That make sense. I read the exception with attention and the issue shall be here, by retreiving non existent index [0] ❱ 423 │ │ │ host_id = self.db.get_hosts(self.host)[0].id Will have a look at this. |
So today I am trying several things:
I am not getting that exception now... Weird |
Working with subnets could lead to such situations. Subnet scanning is much larger than host scanning. I'm glad you didn't encounter it. However, the maitainers will of course do in-depth research when they are available. I will examine it too in detail when available. |
Can you give me your version info? |
The issue is that apparently the host that you are trying to log into does not exist in the database. Though this should not happen as it gets added in enum_host_info earlier. My best guess would be that you ran into a race condition with SQLite where you tried to read from the db before the host was added. Perhaps because SQLite was overwhelmed by all these connections? Btw if you want to retest the issue you have to clear the database (or remove the nxc/workspace folder entirely). Otherwise the host was added by your previous scan |
Though, concurrency issues in the database should have been fixed with #400 |
Thanks @NeffIsBack at first I had the impression it was indeed some issue with concurrency. I will clear the database and try to reproduce again. EDIT: 1 out of 5 runs i get the exception with the same exact command, after clearing and initiating the empty database.
Command: Im now trying to trigger the exception with |
Ok so triggered the exception with |
Took a look at the log but it is really hard to debug without being able to test it. The question would be why this host wasn't in the database in the first place. If you still have access you could:
|
Hello, I've had the same (maybe) issue recently running just running:
Unfortunately I know that it's not really enough info for helping and I don't have access to that target anymore..
|
Found the root cause for this yesterday. This is triggered by a logic flaw when running against hosts with anonymous auth (and we don't supply a user). Will push a fix the next days. EDIT: |
Describe the bug
The output contains a couple of exceptions and stacktraces but seem to work for some hosts.
To Reproduce
Steps to reproduce the behavior i.e.:
Command:
netexec smb lots-of-hosts-list.txt -u username -p password
Resulted in:
Expected behavior
No exceptions
Screenshots
NetExec info
The text was updated successfully, but these errors were encountered: