Re: passing a domain to mssql scripts
Robin Wood <[email protected]> Thu, 7 Feb 2019 15:33:11 +0000
| Newsgroups | gmane.comp.security.nmap.devel |
|---|---|
| Message-ID | <CALmccy4cj8NN_6iwtAPaZ8p01oVB2Q5cUJ_MDhXsWWgaAzHMbA@mail.gmail.com> |
Finally managed to get back onto the client's box and re-ran the scan, the
bug is still there in the version I built from GitHub 5 minutes ago.
```
/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...)
```
On Mon, 4 Feb 2019 at 22:44, Robin Wood <[email protected]> wrote:
> Unfortunately probably not, the client test ended last week but I'll ask,
> they may let me back on the network to check it.
>
> On Mon, 4 Feb 2019, 19:26 Paulino Calderon, <[email protected]>
> wrote:
>
>> Hey,
>>
>> Those are the correct arguments and this looks like a bug. I checked the
>> error line and it seems you are not using the latest version. Can you
>> reproduce this with the latest version?
>>
>> If the error still happens, can you share the output using -d2?
>>
>> Thanks.
>>
>> Paulino Calderon Pale || @calderpwn on Twitter ||
>> http://www.calderonpale.com
>>
>>
>>
>> > On Jan 31, 2019, at 18:33, Robin Wood <[email protected]> wrote:
>> >
>> > Hi
>> > How do I pass domain creds to an mssql script? I tried
>> > mssql.domain=xxx but that gave an error about openssl.encrypt:
>> >
>> > 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...)
>> >
>> > Robin
>> > _______________________________________________
>> > Sent through the dev mailing list
>> > https://nmap.org/mailman/listinfo/dev
>> > Archived at http://seclists.org/nmap-dev/
>>
>>
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/