Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

д¸øÄÇЩASP.NET³ÌÐòÔ±£ºÍøÕ¾ÖеݲȫÎÊÌâ

ÔÚÍøÂç¾­³£¿´µ½ÍøÕ¾±»¹ÒÂí¡¢Ö÷Ò³±»Ð޸ĵÄÐÂÎÅ£¬ÆäʵÕâЩÎÊÌâ¿ÉÄÜÊǶ෽ÃæµÄ£¬·þÎñÆ÷£¬ÍøÕ¾³ÌÐòµÈµÈ¡£¡£¡£µ«ÊÇÏÖÔÚÒç³öÒѾ­±»ÈËÃÇÖØÊӺͷþÎñÆ÷µÄ²»¶ÏÍêÉÆ£¬·þÎñÆ÷ϵͳ©¶´Ò²²»ÊÇÄÇôÈÝÒ×·¢¾ò£¬µ±È»Ò²Òª±£Ö¤µÚÈý·½µÄÈí¼þ°²È«¡£
×öÏîÄ¿Ò²ÓÐÒ»¶Îʱ¼äÁË¡£ÔÚ³ÌÐòÖÐÒ²Óöµ½ºÜ¶à°²È«·½ÃæµÄÎÊÌâ¡£Ò²¸Ã×ܽáÒ»ÏÂÁË¡£Õâ¸öÏîÄ¿ÊÇÒ»¸öCMSϵͳ¡£ÏµÍ³ÊÇÓÃASP.NET×öµÄ¡£¿ª·¢µÄʱºò·¢ÏÖ΢Èí×öÁ˺ܶలȫ´ëÊ©£¬Ö»ÊÇÓÐЩÐÂÊÖ³ÌÐòÔ±²»ÖªµÀÔõô¿ªÆô¡£ÏÂÃæÎÒͨ¹ý¼¸¸ö·½Ãæ¼òµ¥½éÉÜ£º
£±£ºSQL ×¢Èë
£²£ºXSS
£³£ºCSRF
£´£ºÎļþÉÏ´«
£±£ºSQL ×¢Èë
ÒýÆðÔ­Òò£º
ÆäʵÏÖÔںܶàÍøÕ¾Öж¼´æÔÚÕâÖÖÎÊÌâ¡£¾ÍÊdzÌÐòÖÐÖ±½Ó½øÐÐSQLÓï¾äÆ´½Ó¡£¿ÉÄÜÓÐЩ¶ÁÕß²»Ì«Ã÷°×¡£ÏÂÃæͨ¹ýÒ»¸öµÇ¼ʱ¶ÔÓû§ÑéÖ¤À´ËµÃ÷£º
code:
     Ñé֤ʱµÄsqlÓï¾ä: select * from where user='"+txtUsername.Text+"' and pwd='"+txtPwd.Text+"'
ÕâÊÇÒ»¶Î´ÓÊý¾Ý¿âÖвéѯÓû§£¬¶ÔÓû§Ãû£¬ÃÜÂëÑéÖ¤¡£
¿´ÉÏÈ¥ºÃÏóûÓÐʲôÎÊÌ⣬µ«ÊÇʵ¼ÊÕâÀïÃædz²Ø×ÅÎÊÌ⣬Óû§Ãû£ºadmin ÃÜÂ룺 admin£¬
select * from where user='admin' and pwd='admin'
Èç¹ûÓû§ºÍÃÜÂëÕýÈ·¾Í¿ÉͨÑéÖ¤¡£Èç¹ûÎÒÓû§Ãû£ºasdf' or 1=1 -- ÃÜÂ룺ËæÒâÊäÈë.
ÎÒÃÇÔÙÀ´¿´Óï¾ä£º
select * from where user=‘asdf' or 1=1 -- and pwd=''
Ö´Ðк󿴵½Ê²Ã´£¿ÊDz»ÊÇËùÓмǼ£¬Èç¹û³ÌÐòÖ»ÊǼòµ¥ÅжϷµ»ØµÄÌõÊý£¬ÕâÖÖ·½·¨¾Í¿ÉÒÔͨÑéÖ¤¡£
Èç¹ûÖ´ÐÐÓï¾äÊÇSAÓû§£¬ÔÙͨ¹ýxp_cmdshellÌí¼Óϵͳ¹ÜÀíÔ±£¬ÄÇôÕâ¸ö·þÎñÆ÷¾Í±»ÄÃÏÂÁË¡£
½â¾ö·½·¨£º
£¨£±£©£ºÕâ¸öÎÊÌâÖ÷ÒªÊÇÓÉÓÚ´«ÈëÌØÊâ×Ö·ûÒýÆðµÄÎÒÃÇ¿ÉÒÔÔÚ¶ÔÊäÈëµÄÓû§ÃûÃÜÂë½øÈë¹ýÂËÌØÊâ×Ö·û´¦Àí¡£
£¨£²£©£ºÊ¹Óô洢¹ý³Ìͨ¹ý´«Èë²ÎÊýµÄ·½·¨¿É½â¾ö´ËÀàÎÊÌ⣨עÒ⣺ÔÚ´æ´¢¹ý³ÌÖв»¿ÉʹÓÃÆ´½ÓʵÏÖ£¬²»È»ºÍûÓô洢¹ýºÍÊÇÒ»ÑùµÄ£©¡£
£²£ºXSS£¨¿çÕ¾½Å±¾¹¥»÷£©
ÒýÆðÔ­Òò£º
Õâ¸öÒ²ÓÐʱ±»ÈËÃdzÆ×÷HTML×¢È룬ºÍsql×¢ÈëÔ­ÀíÏàËÆ£¬Ò²ÊÇûÓÐÌØÊâ×Ö·û½øÐд¦Àí¡£ÊÇÓû§¿ÉÒÔÌá½»HTML±êÇ©¶ÔÍøÕ¾½øÐÐÖØÐµĹ¹Ôì¡£ÆäʵÔÚĬÈϵÄÇé¿öÏÂÔÚasp.netÍøÒ³ÖÐÊÇ¿ªÆôvalidateRequestÊôÐԵģ¬ËùÓÐHTML±êÇ©ºó»á.NET¶¼»áÑéÖ¤£º
µ«ÕâÑùÖ±½Ó°ÑÒì³£Å׸øÓû§£¬¶àÉÙÓû§ÌåÑé¾Í²»ºÃ¡£
½â¾ö·½·¨£º
£¨£±£©£ºÍ¨¹ýÔÚ Page Ö¸Áî»ò ÅäÖýÚÖÐÉèÖà validateRequest=false ½ûÓÃÇëÇóÑéÖ¤£¬È»ºóÎÒÃǶÔÓû§Ìá½»µÄÊý¾Ý½øÐÐHtmlEncode,±àÂëºóµÄ¾Í²»»á³öÏÖÕâÖÖÎÊÌâÁË£¨ASP.NET ÖбàÂë·½·¨£ºServer.HtmlEncode(string)£©¡£
£¨£²£©£ºµ


Ïà¹ØÎĵµ£º

ÈçºÎʵÏÖAsp.Net¿Ø¼þµÄË«»÷ʼþ

 Asp.net¿Ø¼þ£¨°üÀ¨Web·þÎñÆ÷¿Ø¼þºÍHtml·þÎñÆ÷¿Ø¼þ£©¶¼Ã»ÓÐË«»÷ʼþ£¬ÄÇô¸ÃÈçºÎ½«Ë«»÷ʼþ¸¶¸øAsp.Net¿Ø¼þÄØ£¿ÎÒÃÇÒÔLable¿Ø¼þΪÀý¡£
      
        Ò»¡¢Ê×ÏȼÓÈë¿Ø¼þ£¬IDΪLable1£¬È»ºó¼ÓÈëÒ»¸öButton¿Ø¼þ£¬IDΪButton1£¬´úÂëÈçÏÂ
 
& ......

[ASP.NET]ºǫ́ö¾Ù¿Õ¼ä

ÔÚºǫ́ÓÃC#ö¾Ù¿Ø¼þ²»ÏñjavascriptÄÇô¼òµ¥£¬HasControlsÖ»ÄÜ×¥µ½Ö±Êôϼ¶µÄ¿Ø¼þ£¬Èç¹ûÓжà¸ödiv£¬tableǶÌ×£¬¾ÍÒªµÝ¹éÁË
 public static void CloseAllContent(System.Web.UI.Control page,bool bOpen)
    {
        int nPageControls = page.Controls.Count ......

ASP.NET FCKeditor Îı¾±à¼­Æ÷µÄʹÓÃ

ASP.NET FCKeditor Îı¾±à¼­Æ÷µÄʹÓà ¡¾×ª¡¿
ÏÂÔصØÖ·£ºhttp://www.fckeditor.net/download

FCKeditorʹÓÃ
Ò»¡¢ÅäÖÃ
1¡¢ÔÚwww.fckeditor.net
µã»÷Download£¬ÏÂÔØFCKEditor_2.5.1.zipºÍFCKEditor.Net(ASP.NET
Control to easily integrate FCKEditor on .Net Web pages.)
2¡¢Ð½¨Ò»ÏîÄ¿£¬±ÈÈç½ÐFCK¡£½âѹFCKEd ......

ASP.NETÖÐExcel²Ù×÷ÀàC#°æ

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.Office.Inter ......

asp.net ת»»ÈËÃñ±Ò´óС½ð¶î


using System;
using System.Collections.Generic;
using System.Text;
namespace Common
{
/// <summary>
/// ת»»ÈËÃñ±Ò´óС½ð¶î¡£
/// </summary>
public class Rmb
{
/// <summary>
/// ת»»ÈËÃñ±Ò´óС½ð¶î
/// </summary>
/// <param name="num">½ð¶î</ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ