¾È±Ô °øºÎ¹æ

security > fliedownload hacking ÆÄÀÏ´Ù¿î·Îµå ÇØÅ·

µî·ÏÀÏ : 2017-06-30 15:14 Á¶È¸¼ö : 53,160

´ÙÀ½Àº ÆĶó¹ÌÅÍ·Î ÀûÀýÄ¡ ¾ÊÀº °ªÀ» ³Ñ°ÜÁÖ´Â ¿¹¸¦ ¾Ë¾Æº¼ °ÍÀ̸ç, ÆÄÀÏ ¾÷·Îµå, ´Ù¿î·Îµå Ãë¾àÁ¡¿¡ ´ëÇØ °øºÎÇØ º¸°Ú½À´Ï´Ù ^^ µ¿ÀûÀ¸·Î ¾î¶² ƯÁ¤ ÆÄÀÏÀ» ¿­¾î ±× ÆÄÀÏ ³»¿ëÀ» À¥¿¡¼­ º¸¿©ÁÖ´Â ASP°¡ ÀÖ´Ù°í Çսô٠´ë·®ÀÇ htmlÀ̳ª txt ÆÄÀϵéÀ» Àоî À¥¿¡¼­ º¸¿©ÁÖ´Â ·ÎÁ÷µéÀÌ ¸¹Áö¿ä
(Àúµµ ¸¹ÀÌ ½è½À´Ï´Ù -_-;)

µ¿ÀûÀ¸·Î ±× ÆÄÀÏ¿¡ ´ëÇÑ Á¤º¸¸¦ ÆĶó¹ÌÅÍ·Î Àоî¿Â´Ù¸é ¾î¶»°Ô µÉ±î¿ä?
Response.ContentType = "application/unknown"

VFilePath = Request("FilePath")
FilePath = Server.MapPath(VFilePath)

set fso=Server.CreateObject("SiteGalaxyUpload.filesystemobject")
set file= fso.OpenBinaryFile(FilePath,1,false)
Response.BinaryWrite file.readall

Set fso = nothing
Response.End
´ÙÀ½°ú °°Àº ¿äûÀ» º¸³½´Ù¸é.. http://localhost/file.asp?FilePath=/default.asp



Ãæ°ÝÀûÀÌ°Ô ¼­¹ö¿¡ ÀÖ´Â default.asp ÆÄÀÏÀÇ ¼Ò½º ³»¿ëÀÌ ¸ðµÎ ´Ù¿îµÇ´Â°É È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
¾ðÁ¨°¡ ÇØÅ·ÀڷḦ ã¾Æº¸´øÁß ¾î´À °³¹ßÀÚºÐÀÌ ½á ³õÀº ±ÛÀ» ÀÐÀºÀû ÀÖ½À´Ï´Ù.
¾Æ¹«¸® ÁÁÀº ¹æÈ­º®ÀÌ ÀÖ´õ¶óµµ, °³¹ß¿¡ ÃÖÀϼ±¿¡ ÀÖ´Â °³¹ßÀÚ°¡ ´ëÃæ ´ëÃæ °³¹ßÇÑ´Ù¸é, ±× À¥½ÎÀÌÆ®´Â ¾ÈÀüÇÏÁö ¸øÇÏ´Ù.
±×·¯¹Ç·Î, ÇØÅ·¿¡ ´ëÇÑ ¸ðµç Ã¥ÀÓÀº °³¹ßÀÚ¿¡°Ô ÀÖ´Ù.....
±×¸®°í, ÀÌ·±±Ûµµ Àû¾ú½À´Ï´Ù....
ÀڱⰡ ¾Æ´Â ¾î´ÀºÐÀº ¹æÈ­º®°°Àº ±âÁ¸ Àåºñ¸¦ ¾²Áö ¾Ê°íµµ À¥ÇØÅ·À» °ÅÀÇ ¿Ïº®ÇÏ°Ô ¸·À» ¼ö ÀÖ°Ô ¼Ò½ºÀÛ¾÷À» ÇÏ°í, ¶Ç °ÅÀÇ 100%·Î À¥ ÇØÅ·À» ¸·°í ÀÖ´Ù....
ÀÌ·± ±ÛÀ» Àаí Âü Ãæ°ÝÀÌ¿´½À´Ï´Ù.
³ªµµ °³¹ß±â°£Àº ¿À·¡µÆÁö¸¸, ÇØÅ·¿¡ ´ëÇØ ±í°Ô »ý°¢ÇÏÁö ¾Ê°í, ½Ã°£¿¡ ÂÑ°Ü ´ëÃæ ´ëÃæ ÄÚµùÀ» Ç߰ŵç¿ä..
À§ÀÇ ÆÄÀÏ´Ù¿î·Îµå ¼Ò½º´Â ¾î¶²½ÄÀ¸·Î ¸·¾Æ¾ß ÇÒ±î¿ä...???
¾Æ·¡¿Í °°Àº ¼Ò½º¸¦ Ãß°¡½ÃÄÑ, ÇØÅ·¿¡ ´ëºñÇØ¾ß ÇÒ°Í ÀÔ´Ï´Ù.
Response.ContentType = "application/unknown"

down_path = "/up_file"

VFilePath = down_path & Request("FilePath")

if instr(VfilePath,"../")>0 then
	Response.write "À߸øµÈ Á¢±ÙÀÔ´Ï´Ù."
	Response.end
end if

FilePath = Server.MapPath(VFilePath)

set fso=Server.CreateObject("SiteGalaxyUpload.filesystemobject")
set file= fso.OpenBinaryFile(FilePath,1,false)
Response.BinaryWrite file.readall

Set fso = nothing
Response.End
¸ÕÀú down_path = "/up_file" ºÎºÐÀº ´Ù¿î·ÎµåÇÒ ±âº»ÀûÀÎ Æú´õ¸í ÀÔ´Ï´Ù.
º¸Åë ´Ù¿î·ÎµåÇÒ ÆÄÀÏÀº ƯÁ¤ÇÑ Æú´õ ¹ØÀ¸·Î ¾÷·Îµå°¡ µË´Ï´Ù.
¿©±â¿¡¼­´Â up_file Æú´õ¿¡ ¸ðµÎ ¿Ã·ÁÁ® Àֱ⠶§¹®¿¡ ÀÌ Æú´õ ¹Ø¿¡ ÀÖ´Â ÆÄÀϸ¸À» ´Ù¿î·Îµå ÇÏ°Ô ¾ÈÀüÀåÄ¡¸¦ ³Ö¾ú½À´Ï´Ù.

http://localhost/file.asp?FilePath=/default.asp À§¿Í °°ÀÌ °æ·Î¸¦ /default.asp À» ´Ù¿î¹ÞÀ¸·Á°í ÇÒ¶§, ÇÁ·Î±×·¥¿¡¼­´Â ÀÚµ¿À¸·Î /up_file/default.asp ÆÄÀÏÀ» ãÀ»·Á°í ÇÒ°Í ÀÔ´Ï´Ù.
±×·³, ÆÄÀÏÀÌ Á¸ÀçÇÏÁö ¾Ê±â ¶§¹®¿¡ ¿¡·¯¸¦ ¹ß»ýÇÏ°Ô µÉ°ÍÀÔ´Ï´Ù.
±×·¯³ª, ÀÌ ºÎºÐ¸¸ Ãß°¡ÇÑ´Ù¸é ¶Ç ´Ù¸¥ ±¸¸ÛÀÌ »ý±é´Ï´Ù.
¿¹¸¦ µé¾î http://localhost/file.asp?FilePath=/../default.asp ÀÌ·±½ÄÀ¸·Î FilePath °ªÀ» ´øÁö¸é ¾î¶»°Ô µÉ±î?
¸ðµÎµé ¾Ë´Ù½ÃÇÇ, ../ ¸í·ÉÀº »óÀ§Æú´õ·Î À̵¿Ç϶ó´Â ¸í·ÉÀÌ µË´Ï´Ù.
±×·³, /up_file/../default.asp °æ·Î°¡ µÇ¾î¼­ ¸¶Âù°¡Áö·Î ·çÆ®¿¡ ÀÖ´Â default.asp ÆÄÀÏÀ» ´Ù¿î·Îµå ÇÒ ¼ö ÀÖ½À´Ï´Ù.

../ ¹®ÀÚ°¡ µé¾î ¿ÔÀ»¶§, ³Ñ¾îº» ÆÄÀϹ®ÀÚ¿­À» ÇÊÅ͸µ ÇÏ°Ô µË´Ï´Ù. ¾Æ¹«ÂÉ·Ï ÇØÅ·¿¡ ´ëºñ¸¦ Àß ÇϽñ⠹ٶø´Ï´Ù.
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.