Skip to content
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

Invalid database credential ID #478

Open
Unreachabl opened this issue Oct 31, 2024 · 4 comments
Open

Invalid database credential ID #478

Unreachabl opened this issue Oct 31, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Unreachabl
Copy link

Describe the bug
When logging in using the database id, sometimes the error "ERROR Invalid database credential ID 1! connection.py:351" despite the fact that authentication is successful on other hosts under the same id

To Reproduce
Steps to reproduce the behavior i.e.:
Command: netexec smb hosts -id 1
screen1

NetExec info

@NeffIsBack NeffIsBack added the bug Something isn't working label Oct 31, 2024
@NeffIsBack
Copy link
Contributor

That is weird, any hints to why that could be? How did you populate the "credentials 1"? Login or some kind of dump?

Can't reproduce the error on my side:
image

@Unreachabl
Copy link
Author

Unreachabl commented Oct 31, 2024

The id number is 1 was added to the database when I entered the username and password correctly and verified them at a my hosts (using the -u and -p flags).
These errors started appearing after updating the system using apt-get dist-upgrade and nxc version 1.3.0.
After the update, I install the ncx version (1.2.0), which worked, but send errors

Exception error when calling proto_flow() for the target object 192.168.20.14: connection.py:168
((((sqlite3.Interface error) invalid parameter or other incorrect API usage
[SQL: SELECT hosts.id , hosts.ip, hosts.hostname, hosts.domain, hosts.os,
hosts.as , hosts.dc, hosts.smbv1, hosts.signing, hosts.spooler, hosts.zerologin,
hosts.petit potam
FROM hosts
WHERE hosts.ip =?]
[parameters: ('192.168.20.14',)]

Now, after displaying the invalid database credentials error, nxc also starts going through the credentials of their database in the list.

If you log in to each host separately, there is no error. Only when working with multiple hosts at the same time.

Linux kali 6.11.2-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.11.2-1kali1 (2024-10-15) x86_64 GNU/Linux

@NeffIsBack
Copy link
Contributor

NeffIsBack commented Oct 31, 2024

Could you provide a debug file log? My guess would be there is an error with the hosts being added to the database.

EDIT: You can get the debug output with --debug

@Unreachabl
Copy link
Author

debug.log

I also attach this log file to the topic #479, since both errors are reflected in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants