ããEcshopæ¯ä¸å¥ç½ç»åå建ç«ç³»ç»ï¼ä¸»è¦æå¡äºæ³å¿«æ·æ建ååç³»ç»çç¨æ·ï¼è¯¥ç³»ç»æ¯ä¸ªäººå»ºç«ååç主æµè½¯ä»¶ã
ããå¨ç½ç»ä¸ï¼ä¸»è¦æ两ç§ç±»åçç½ç»è´ç©ï¼ä¸ç±»æ¯åæ·å®è¿æ ·çC2Cç«ç¹ï¼å¦ä¸ç±»æ¯ååè¶è¿æ ·çB2Cç«ç¹ãB2Cç«ç¹é¤äºåè¶ãå½å½ç大åç«ç¹å¤ï¼è¿æå¾å¤è§æ¨¡è¾å°çB2Cç«ç¹ï¼ç±äºè¿äºä¸å°åB2Cç«ç¹æ°ç®è¾å¤§ï¼å æ¤æ¯å¤©çæ交éä¹é常å¯è§ã
ããè¿äºçä¸å°åB2Cç«ç¹é常没æä¸ä¸ç建ç«å¢éï¼ç«ç¹é½æ¯ç«é¿éè¿ç°æçååç¨åºæ建起æ¥çï¼å
¶ä¸Ecshopç½ç»ååç³»ç»ç¨å¾æå¤ï¼å æ¤ä¸æ¦è¿å¥ç³»ç»åºç°å®å
¨é®é¢ï¼å°ä¼æ³¢åç½ç»ä¸ææéç¨è¿å¥ç³»ç»å»ºç«çB2Cç«ç¹ã
ããä½ä¸å¹¸çäºæ
è¿æ¯åçäºï¼Ecshopåºç°äºä¸¥éçå®å
¨æ¼æ´ï¼é»å®¢å¯ä»¥è¿ç¨ 该æ¼æ´å
¥ä¾µç«ç¹ï¼çªæ¹ååä»·æ ¼ï¼æ´ä»¤äººæ
忧çæ¯è¯¥æ¼æ´å¯ä»¥è¢«ç¨æ¥æ马ï¼ææ访é®ååçç¨æ·é½ä¼ä¸æ¯ï¼ä»ä»¬çåç§è´¦å·åå¯ç å¯è½è¢«çãæ¤å¤ï¼é»å®¢å¯ä»¥ä¿®æ¹ç«ç¹çæ¯ä»æ¥å£ï¼ç¨æ·è´ä¹°ååæ¶è´§æ¬¾ä¼ç´æ¥æå°é»å®¢çè´¦æ·ä¸ã
ããæ¬æ主è§ï¼Ecshopåå V2.5.0
ããé®é¢æå¨ï¼å«æSQLæ¼æ´
ãã主è¦å±å®³ï¼ç¨äºæ马ãå
¥ä¾µæå¡å¨ç
ããEcshopåå¨SQL注å
¥æ¼æ´
ããè¿ç¨ Ecshopæ¼æ´é¡»è¦ç¨å°SQL注å
¥ãç±äºç¨åºåçç忽ï¼æ²¡æ对User.phpæ件ä¸çSQLåéå®è¡è¿æ»¤ï¼ä»è导è´SQL注å
¥çåçãé»å®¢å¯ä»¥æé ç¹æ®ç代ç ï¼ç´æ¥è¯»ååæ¾å¨ç«ç¹æ°æ®åºä¸ç管çåè´¦å·åå¯ç ã
ããæ¼æ´çè¿ç¨ é常åºæ¬ï¼åªéå¨ç«ç¹å°ååè¾å
¥âuser.php?act=order_query&order_sn=' union select 1ï¼2ï¼3ï¼4ï¼5ï¼6ï¼concat(user_nameï¼0x7cï¼passwordï¼0x7cï¼email)ï¼8 from ecs_admin_user/*âè¿æ ·ä¸å¥ä»£ç å°±å¯ä»¥è¯»åºç«ç¹æ°æ®åºä¸ç管çåè´¦å·åå¯ç ã
ããæ马æµç¨æç§
ãã第ä¸æ¥ï¼å¯»æ¾å
¥ä¾µç®æ
ããå¨ç¾åº¦æè°·æä¸ä»¥âPowered by Ecshop v2.5.0â为å
³é®åå®è¡æç´¢(å¾1)ï¼å¯ä»¥æ¾å°å¾å¤ç¬¦åæ¡ä»¶çç«ç¹ï¼é便æéä¸ä¸ªç«ç¹ä½ä¸ºæµè¯ç®æ ãé¡»è¦çå¿çæ¯ï¼ç«ç¹è¶å°å®å
¨é²æ¤ä¹è¶å¼±ï¼æåçç¸æ¯è¾è¾é«ã
ãã第äºæ¥ï¼è·å¾ç®¡çåè´¦å·åå¯ç
ããæå¼æµè¯ç«ç¹ï¼å¨å
¶ç½ååè¾å
¥ï¼user.php?act=order_query&order_sn=' union select 1ï¼2ï¼3ï¼4ï¼5ï¼6ï¼concat(user_nameï¼0x7cï¼passwordï¼0x7cï¼email)ï¼8 from ecs_admin_user/*ã
ããä¾å¦è¯¥ç«ç¹ç½å为
http://www.***.com/ï¼åå®æ´çæ¼æ´è¿ç¨ å°å为ï¼
http://www.***.com/ user.php?act=order_query&order_sn=' union select 1ï¼2ï¼3ï¼4ï¼5ï¼6ï¼concat(user_nameï¼0x7cï¼passwordï¼0x7cï¼email)ï¼8 from ecs_admin_user/*ã
ããè¾å
¥å®æ¯åå车ï¼å¦æçå°ç±»ä¼¼å¾2ççé¢ï¼å说ææ¼æ´è¢«è¿ç¨ æåäºãå¨è¿åçä¿¡æ¯ä¸ï¼å¯ä»¥åè§å¾ä¸»è¦çå
容ï¼å
æ¬ç«ç¹ç®¡çåçè´¦å·ãå¯ç åE-mailå°åãä»å¾2å¯ä»¥æ¾å°ï¼ç®¡çåè´¦å·ä¸ºadminï¼å¯ç 为c93ccd78b2076528346216b3b2f701e6ãå¯ç æ¯ç»è¿MD5å å¯çï¼æ以çå°çæ¯ä¸ä¸²32ä½é¿çå符ï¼é¡»è¦å¯¹è¿ä¸²å符å®è¡ç ´è§£æè½çå°çå®çå¯ç ã
ãã第ä¸æ¥ï¼ç ´è§£MD5å¯ç
ããè½ç¶å¯ç ç»è¿MD5å å¯ï¼ä½æ¯éè¿ç ´è§£æ¯å¯ä»¥å¾å°å¯ç åæçãå°c93ccd78b2076528346216b3b2f701e6è¿æ®µMD5å¼å¤å¶ä¸æ¥ï¼æå¼MD5å¨çº¿ç ´è§£ç«ç¹
http://www.cmd5.com/ã
ããæè¿ä¸²MD5å¼å¤å¶å°ç«ç¹é¡µé¢æ£ä¸é´çææ¬æ¡ä¸ï¼ç¹å»âMD5å å¯æ解å¯âæé®ï¼å¯ç åæå°±è¢«ç ´è§£åºæ¥äºââadmin1234(å¾3)ãå½ç¶ï¼ç ´è§£MD5å¼é çæ¯è¿æ°ï¼å¦æ管çåå°å¯ç é
ç½®å¾å¾å¤æï¼ä¾å¦âæ°å+åæ¯+ç¹æ®ç¬¦å·âçç»åï¼é£ä¹å°±å¾é¾ç ´è§£åºå¯ç åæã
ããå¦æMD5å¨çº¿ç ´è§£ç«ç¹æ æ³ç ´è§£åºå¯ç åæï¼é£ä¹ä¹å¯ä»¥éç¨MD5æ´åç ´è§£è½¯ä»¶æ¥å®è¡ç ´è§£ï¼å½ç¶èè´¹çæ¶é´ä¼å¾é¿ï¼å¨è¿éå°±ä¸å¤ä½ä»ç»äºã
ãã第åæ¥ï¼ä¸ä¼ æ¨é©¬
ããæ¢ç¶ç®¡çåè´¦å·åå¯ç é½å·²æ¿å°æï¼æ¥ä¸æ¥æ们就å¯ä»¥ç»å½ç«ç¹çåå°äºãå¨ç«ç¹ç½ååè¾å
¥admin并å车ï¼å°ä¼åºç°ç«ç¹åå°ç»å½é¡µé¢ï¼è¾å
¥ç®¡çåè´¦å·adminãå¯ç admin1234å³å¯ç»å½ã
ããæ¥å°åå°ï¼æ们å¯ä»¥çå°Ecshopçç«ç¹åå°åè½æ¯é常å¤çï¼å½ç¶è¿ä¹ç»äºæ们ä¸ä¼ æ¨é©¬çæºä¼ãç¹å»âç³»ç»é
ç½® âä¸çâFlashææ¾å¨ç®¡çâé¾æ¥(å¾4)ãæå¼ååç¹å»âæ·»å èªå®ä¹âæé®ã
ãã
ããè¿æ¶æ们ä¼æ¥å°ä¸ä¸ªä¸ä¼ å¾çç页é¢ï¼å¨è¿éä¸ä»
ä»
å¯ä»¥ä¸ä¼ å¾çï¼è¿è½è½»è½»æ¾æ¾å°ä¸ä¼ æ¨é©¬!è¿éæ们éæ©ä¸æ¬¾åè½å¼ºå¤§çPHPæ¨é©¬ï¼ç¹å»âç¡®å®âæé®å³å¯å°æ¨é©¬ä¸ä¼ (å¾5)ã
ããä¸ä¼ æååï¼è¿å
¥âè½®æå¾çå°åâï¼å¨è¿éæ们å¯ä»¥çå°ä¸ä¼ çæ¨é©¬ççè·¯å¾(å¾6)ã
ããå°å°åå¤å¶å°æµè§å¨å°åæ ä¸å¹¶æå¼ï¼å¯ä»¥å¨éé¢ä»»ææµè§ãä¿®æ¹çè³å é¤ç«ç¹ä¸çæ件(å¾7)ï¼æåå°±æ¯å¨ç«ç¹é¦é¡µä¸æå
¥æ马代ç ï¼å½ç¨æ·æµè§ååé¦é¡µçæ¶åï¼å°±ä¼æ¿æ´»ç
æ¯ï¼ç
æ¯ä¼å·å·å°å
¥ä¾µç¨æ·ç计ç®æºã
ãã
ããé²å¤æ¹æ¡
ããè¦ä¿®è¡¥è¯¥æ¼æ´ï¼é¡»è¦å¯¹User.phpæ件ä¸çSQLåéå®è¡ä¸¥æ ¼çè¿æ»¤ï¼ä¸å
许æ¶æè°ç¨åéæ¥è¯¢æ°æ®åºãæ®é读è
å¨ä¸ç½æ¶ï¼æ好è¿ç¨è½æ¦æªç½é¡µæ¨é©¬çå®å
¨è¾
å©å·¥å
·ï¼é²æ¢ç½é¡µæ¨é©¬çéªæ°ã