SQL×¢Èë¹¥»÷µÄÔÀí¼°Æä·À·¶´ëÊ©
ת£ºhttp://blog.csdn.net/flyfranker/archive/2009/01/08/3733764.aspx
ASP±à³ÌÃż÷ºÜµÍ£¬ÐÂÊÖºÜÈÝÒ×ÉÏ·¡£ÔÚÒ»¶Î²»³¤µÄʱ¼äÀÐÂÊÖÍùÍù¾ÍÒѾÄܹ»±à³ö¿´À´±È½ÏÍêÃÀµÄ¶¯Ì¬ÍøÕ¾£¬ÔÚ¹¦ÄÜÉÏ£¬ÀÏÊÖÄÜ×öµ½µÄ£¬ÐÂÊÖÒ²Äܹ»×öµ½¡£ÄÇôÐÂÊÖÓëÀÏÊÖ¾ÍûÇø±ðÁËÂð£¿ÕâÀïÃæÇø±ð¿É¾Í´óÁË£¬Ö»²»¹ýÍâÐÐÈ˺ÜÄÑÒ»Ñ۾Ϳ´³öÀ´°ÕÁË¡£ÔÚ½çÃæµÄÓѺÃÐÔ¡¢ÔËÐÐÐÔÄÜÒÔ¼°ÍøÕ¾µÄ°²È«ÐÔ·½ÃæÊÇÐÂÊÖÓëÀÏÊÖÖ®¼äÇø±ðµÄÈý¸ö¼¯Öе㡣¶øÔÚ°²È«ÐÔ·½Ã棬ÐÂÊÖ×îÈÝÒ׺öÂÔµÄÎÊÌâ¾ÍÊÇSQL×¢È멶´µÄÎÊÌâ¡£ÓÃNBSI 2.0¶ÔÍøÉϵÄһЩASPÍøÕ¾ÉÔ¼ÓɨÃ裬¾ÍÄÜ·¢ÏÖÐí¶àASPÍøÕ¾´æÔÚSQL×¢È멶´£¬½ÌÓýÍøÀï¸ßУÄÚ²¿»ú¹¹µÄһЩÍøÕ¾ÕâÖÖ©¶´¾Í¸üÆÕ±éÁË£¬¿ÉÄÜÕâÊÇÒòΪÕâЩÍøÕ¾´ó¶¼ÊÇһЩѧÉú×öµÄÔµ¹Ê°É£¬ËäÈ»¸ö¸ö¶¼ºÜ´ÏÃ÷£¬¿ÉÊDZϾ¹Ã»ÓоÑ飬¶øÇÒ´¦ÓÚѧϰÖУ¬ÄÑÃ⩶´¶à¶àÁË¡£±¾ÎÄÖ÷Òª½²½²SQL×¢ÈëµÄ·À·¶´ëÊ©£¬¶øÒªÃ÷°×ÕâЩ·À·¶´ëÊ©µÄÓô¦£¬ÐëÏÈÏêϸ½²½âÀûÓÃSQL×¢È멶´ÈëÇֵĹý³Ì¡£ÐÂÊÖÃÇ¿´Ã÷°×À²¡£
¡¡¡¡Ï൱´óÒ»²¿·Ö³ÌÐòÔ±ÔÚ±àд´úÂëµÄʱºò£¬Ã»ÓжÔÓû§ÊäÈëÊý¾ÝµÄºÏ·¨ÐÔ½øÐÐÅжϣ¬Ê¹Ó¦ÓóÌÐò´æÔÚ°²È«Òþ»¼¡£ÈçÕâÊÇÒ»¸öÕý³£µÄÍøÖ·http://localhost/lawjia/show.asp?ID=444£¬½«Õâ¸öÍøÖ·Ìá½»µ½·þÎñÆ÷ºó£¬·þÎñÆ÷½«½øÐÐÀàËÆSelect * from ±íÃû where ×Ö¶Î="&IDµÄ²éѯ(ID¼´¿Í»§¶ËÌá½»µÄ²ÎÊý£¬±¾ÀýÊǼ´444)£¬ÔÙ½«²éѯ½á¹û·µ»Ø¸ø¿Í»§¶Ë£¬Èç¹ûÕâÀï¿Í»§¶Ë¹ÊÒâÌá½»Õâôһ¸öÍøÖ·£º
¡¡¡¡http://localhost/lawjia/show.asp?ID=444 and user>0£¬Õâʱ£¬·þÎñÆ÷ÔËÐÐSelect * from ±íÃû where ×Ö¶Î=444 and user>0ÕâÑùµÄ²éѯ£¬µ±È»£¬Õâ¸öÓï¾äÊÇÔËÐв»ÏÂÈ¥µÄ£¬¿Ï¶¨³ö´í£¬´íÎóÐÅÏ¢ÈçÏ£º
¡¡¡¡·´íÎóÀàÐÍ£º
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC SQL Server Driver][SQL Server]½« nvarchar Öµ 'sonybb' ת»»ÎªÊý¾ÝÀàÐÍΪ int µÄÁÐʱ·¢ÉúÓï·¨´íÎó¡£
/lawjia/show.asp, µÚ 47 ÐÐ
¡¡¡¡µ«ÊDZðÓÐÓÃÐĵÄÈË´ÓÕâ¸ö³ö´íÐÅÏ¢ÖУ¬¿ÉÒÔ»ñµÃÒÔÏÂÐÅÏ¢£º¸ÃվʹÓÃMS£ßSQLÊý¾Ý¿â£¬ÓÃODBCÁ¬½Ó£¬Á¬½ÓÕʺÅÃûΪ£ºsonybb¡£ËùνSQL×¢È루SQL Injection£©£¬¾ÍÊÇÀûÓóÌÐòÔ±¶ÔÓû§ÊäÈëÊý¾ÝµÄºÏ·¨ÐÔ¼ì²â²»ÑÏ»ò²»¼ì²âµÄÌص㣬¹ÊÒâ´Ó¿Í»§¶ËÌá½»ÌØÊâµÄ´úÂ룬´Ó¶øÊÕ¼¯³ÌÐò¼°·þÎñÆ÷µÄÐÅÏ¢£¬´Ó¶ø»ñÈ¡ÏëµÃµ½µÄ×ÊÁÏ¡£Í¨³£±ðÓÐÓÃÐÄÕßµÄÄ¿±êÊÇ»ñÈ¡ÍøÕ¾¹ÜÀíÔ±µÄÕʺźÍÃÜÂë¡£±ÈÈ統ij¸öÈËÖªµÀÍøÕ¾¹ÜÀíÔ±ÕʺŴæÔÚ±íloginÖУ¬¹ÜÀíÔ±ÕʺÅÃûΪadmin£¬ËûÏëÖªµÀ¹ÜÀíÔ±ÃÜÂ룬ÕâÀïËû´Ó¿Í»§¶Ë½Ó×ÅÌá½»ÕâÑùÒ»¸öÍøÖ
Ïà¹ØÎĵµ£º
×ö¸ö¾ØÕó£¬Æäʵ¾ÍÊǸö¶þάÊý×飬¹Ø¼üÊÇÒª´ÓÊý¾Ý¿âÀïµ÷ЩÊý¾Ý£¬sqlÓï¾ä²»ÊìÁ·£¬¾Í±ßѧ±ßÓã¬Í¬²½µØ¼ÇЩ±Ê¼Ç£¬·½±ã²éÔÄ
¹ØÓÚdistinctºÍorder by ·¢Á˸öÌû×Ó£¨µÚÒ»´ÎŶ£©
Ê×Ìû£º
ÓõÄÊÇoracleµÄÊý¾Ý¿â
Ä¿µÄÊÇÏëÑ¡³öΨһµÄuserid£¨ÔÓÐÖظ´Öµ£©,²¢ÇÒ°´ÕÕfileposÅÅÐò£¨ÔfileposÊÇ1£¬2£¬3.¡£¡£²»Öظ´µÄÐòºÅ£©
......
×°ÁËSQL2000ºó°²×°SQL2005,ËäȻʹÓñðÃû¼ÓÒÔÇø±ðÁË£¬µ«·¢ÏÖ2005ÖÐûÓпɹ©·ÃÎʵÄÀàËÆÆóÒµ¹ÜÀíÆ÷£¬Ò»Ê±³å¶¯£¬Ð¶ÁË2000£¬ÍêÕû°²×°ÁË2005£¬·¢ÏÖ»¹ÊÇûÓÐÆóÒµ¹ÜÀíÆ÷£¬ËÑË÷¹ýºó²Å·¢ÏÖÐèÒª°²×°SQLServer2005_SSMSEE.msi£¨¼´SQLServerManagerStudioExpressEdition£©£¬ËüÌṩÁËÀàËÆÆóÒµ¹ÜÀíÆ÷µÄͼÐλ¯²Ù×÷½çÃæ¡£
×°ºÃºó£¬SQL ......
ÏàÐÅ´ó¼Ò¶¼ÔÚµ±ÐÄÊý¾Ý¿âµÄ¶ªÊ§£¬ÕâÒ²ÊÇÿ¸ö¿ª·¢ÕßÍ·Í´µÄÒ»¼þʼþ£¬ÒòΪÕýÔÚÔËÐеķþÎñÆ÷¼°Êý¾Ý¿âÒ²ÔÚÕą̂·þÎñÆ÷ÉÏ¡£Èç¹û·þÎñÆ÷±ÀÀ££¬ÄÇôËùÓеÄÊý¾Ý
¶¼²»´æÔÚÁË£¬¾ÍËãÊÇÄãÔÚÄãµÄ»ú×ÓÉÏ×öÁ˱¸·Ý£¬ÄÇÒ²ÊÇûÓÐÓõģ¬ÎªÊ²Ã´»áÕâÑù˵Ö÷ÒªÊÇÒòΪ±¾»úÊÇÏò»¥ÁªÍø¹«¿ªµÄ£¬ËùÒÔ³öʹʵĸÅÂʾͱȽϸߡ£×îÖÕÎÒÃÇ¿ÉÒÔÀû
ÓþÖÓò ......
ÈÕÖ¾´«ËÍÊÇSQL SERVER2000ÆóÒµ°æ½øÐÐË«»úÈȱ¸µÄÒ»¸öÖ÷Òª½â¾ö·½°¸£¬ÆäÔÀí±È½Ï¼òµ¥£¬ÊµÏÖÒ²±È½Ï·½±ã£¬Ö»ÊÇÓÉÓÚºÍWindowsÖ®¼ä´í×Û¸´ÔӵĹØϵ£¬µ¼ÖÂÉèÖÃÆðÀ´Óв»ÉÙÀ§ÄÑ£¬³öÏÖÎÊÌâÒ²²»ÈÝÒ×Õï¶Ï¡£
1.ʵÏÖ¸ÅÊö
*Ë«»úÈȱ¸Õë¶ÔµÄÊǾßÌåµÄij¸öÊý¾Ý¿â¶ø²»ÊÇÕû¸ö·þÎñÆ÷
Ë«» ......
General Overview
FeatureSQL Server 2008 (RC0)MySQL 5.1/6PostgreSQL 8.3/PostGIS 1.3/1.4
OS
Windows XP, Windows Vista, Windows 2003, Windows 2008
Windows XP, Windows Vista, (haven't tested on 2008), Linux, Unix, Mac
Windows 2000+ (including Vista and 2003, haven't tested on 2008), Linux, Unix, Ma ......