Nmap Development mailing list archives

Re: [NSE] Microsoft SQL Server (MSSQL) library and scripts


From: David Fifield <david () bamsoftware com>
Date: Thu, 1 Apr 2010 14:14:22 -0600

On Thu, Apr 01, 2010 at 08:49:57PM +0200, Patrik Karlsson wrote:

On 1 apr 2010, at 20.20, David Fifield wrote:

I set the password of sa to empty and created an nmap database to test
with. This is what I'm seeing now. All scripts produce output except for
mssql-xp-cmdshell (which hits an error) and mssql-linked-servers,
probably because I would have to do something to set up linked servers.

I've fixed the error for mssql-xp-cmdshell it should work now.

Okay, it no longer gives me an error, but with --packet-trace I can see
that the server is sending

SQL Server blocked access to procedure 'sys.xp_cmdshell' of component
'xp_cmdshell' because this component is turned off as part of the
security configuration for this server. A system administrator can
enable the use of 'xp_cmdshell' by using sp_configure. For more
information about enabling 'xp_cmdshell', see "Surface Area
Configuration" in SQL Server Books Online.

I'm sure it work if it's enabled. The script should say something in
verbose mode if it can't run the command for this reason.

If you want to test the linked servers script there's more info on how
to create a db link over here:
http://msdn.microsoft.com/en-us/library/aa259589%28v=SQL.80%29.aspx

I ran

sp_addlinkedserver 'MAC-MINI';

to link the server to itself, and now I get

| mssql-linked-servers:
|   srvname     srvproduct      providername
|   =======     ==========      ============
|_  MAC-MINI    SQL Server      SQLOLEDB

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: