Home > ASP, HACKING E SICUREZZA > Blacklist in ASP

Blacklist in ASP

Le blacklist ! Tutti noi sappiamo ( più o meno; forse meno che più ) cosa sono, le temiamo, ma non abbiamo mai pensato che un giorno ci potrebbe finire il nostro sito.

Con questo metodo riuscirete a rendere sicuro il vostro sito ASP.

Passo1: dichiarate un vettore contenente l’elenco delle parole da eliminare.

dim BlackList(32)

BlackList = Array(”/*”, “*/”, “@@”, _
“declare”, “delete”, “drop”, “exec”,_
“execute”, “fetch”, “insert”, “kill”, “open”,_
“select”, “sys”, “sysobjects”, “syscolumns”,_
“table”, “update”, “script”, “xp_”, “555044415445″,_
“757064617465″, “736372697074″, “534352495054″,_
“65786563″, “45584543″, “696E73657274″, “494E53455254″,_
“64656C657465″, “44454C455445″, “varchar”)

Passo 2: a questo punto in ogni pagina controllate eventuali request in questo modo:

if (request.QueryString <> “”)then
ferma = false
for i = 0 to ubound(BlackList)
if instr(1,Ucase(request.QueryString),Ucase(BlackList(i))) <> 0 then
response.end
end if
next
end if
if (request.form <> “”)then
ferma = false
for i = 0 to ubound(BlackList)
if instr(1,Ucase(request.form),Ucase(BlackList(i))) <> 0 then
response.end
end if
next
end if

Il gioco è fatto!!!!

Articoli correlati

web2sp ASP, HACKING E SICUREZZA

  1. Nessun commento ancora...
  1. 12 febbraio 2009 a 14:49 | #1
  2. 12 febbraio 2009 a 14:50 | #2
  3. 24 aprile 2009 a 10:59 | #3