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

mssql scripts and domain credentials problem #1554

Open
cldrn opened this Issue Apr 14, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@cldrn
Copy link
Member

cldrn commented Apr 14, 2019

As reported by Robin Wood on the mailing list:

nmap -p 1433 --script ms-sql-config  -oA xxx -empty --script-args
mssql.username=qqq,mssql.password=xxx,mssql.domain=abc -d abc

NSE: Starting ms-sql-config against abc (1.2.3.2:1433).
NSE: [ms-sql-config 1.2.3.2:1433] brandedVersion: 2005, #lookup: 5
NSE: [ms-sql-config 1.2.3.2:1433] brandedVersion: nil, #lookup: 0
NSE: [ms-sql-config 1.2.3.2:1433] LM Password: 593837254b5534534052
NSE: ms-sql-config against xxxl (1.2.3.2:1433) threw an error!
/usr/bin/../share/nmap/nselib/smbauth.lua:442: bad argument #4 to
'encrypt' (string expected, got table)
stack traceback:
       [C]: in function 'openssl.encrypt'
       /usr/bin/../share/nmap/nselib/smbauth.lua:442: in function
'smbauth.lm_create_response'
       /usr/bin/../share/nmap/nselib/smbauth.lua:693: in function
'smbauth.get_password_response'
       /usr/bin/../share/nmap/nselib/mssql.lua:3164: in field 'NtlmResponse'
       /usr/bin/../share/nmap/nselib/mssql.lua:1947: in method 'ToString'
       /usr/bin/../share/nmap/nselib/mssql.lua:2747: in function
</usr/bin/../share/nmap/nselib/mssql.lua:2699>
       (...tail calls...)
       /usr/bin/../share/nmap/scripts/ms-sql-config.nse:112: in
upvalue 'process_instance'
       /usr/bin/../share/nmap/scripts/ms-sql-config.nse:149: in
function </usr/bin/../share/nmap/scripts/ms-sql-config.nse:141>
       (...tail calls...)

/root/tools/git/nmap/nselib/smbauth.lua:439: bad argument #4 to 'encrypt' (string expected, got table)
stack traceback:
        [C]: in function 'openssl.encrypt'
        /root/tools/git/nmap/nselib/smbauth.lua:439: in function 'smbauth.lm_create_response'
        /root/tools/git/nmap/nselib/smbauth.lua:690: in function 'smbauth.get_password_response'
        /root/tools/git/nmap/nselib/mssql.lua:3138: in field 'NtlmResponse'
        /root/tools/git/nmap/nselib/mssql.lua:1921: in method 'ToString'
        /root/tools/git/nmap/nselib/mssql.lua:2721: in function </root/tools/git/nmap/nselib/mssql.lua:2673>
        (...tail calls...)
        /root/tools/git/nmap/scripts/ms-sql-config.nse:112: in upvalue 'process_instance'
        /root/tools/git/nmap/scripts/ms-sql-config.nse:149: in function </root/tools/git/nmap/scripts/ms-sql-config.nse:141>
        (...tail calls...)

@cldrn cldrn added bug NSE labels Apr 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.