La forte injection anti-SQL, collectée il y a longtemps, très bien, sinon elle ne sera pas envoyée à tout le monde, hein!
Code de programme
<%
'Système anti-injection
Dim BQs, Berrc, Biii, Burl
bqs = request.servervariables (query_string)
Si request.servervariables (https) = off alors burl = http: // else burl = https: // fin si
Burl = Burl & request.servervariables (server_name)
Si request.servervariables (server_port) <> 80 alors burl = burl &: & request.servervariables (server_port) fini si
Burl = Burl & request.servervariables (URL)
Si request.QueryString <> the burl = burl &?
'Burl = request.servervariables (URL)
Dim Bnothis (61)
Bnothis (0) = utilisateur net
bnothis (1) = @ a
bnothis (2) = / ajouter
bnothis (3) = exec% 20master.dbo.xp_cmdshell
Bnothis (4) = Administrateurs de groupes locaux nets
Bnothis (5) = SELECT
Bnothis (6) = compte
Bnothis (7) = ASC
bnothis (8) = char
bnothis (9) = mid
bnothis (10) = cscript.exe
bnothis (11) = déclarer
bnothis (12) = insérer
bnothis (13) = supprimer
Bnothis (14) = Drop
bnothis (15) = tronqué
bnothis (16) = wscript.shell
bnothis (17) =% 20
bnothis (18) =
Bnothis (19) = script
Bnothis (20) = System32
bnothis (21) = cmdshell
bnothis (22) = sysadmin
bnothis (23) = serveradmin
bnothis (24) = setupadmin
Bnothis (25) = SecurityAdmin
bnothis (26) = diskadmin
bnothis (27) = bulkadmin
bnothis (28) = exec maître.dbo.sp_addlogin
bnothis (29) = exec maître.dbo.sp_password
bnothis (30) = exec maître.dbo.sp_addsrvrolemember
bnothis (31) = créer
bnothis (32) = exec xp_reg
bnothis (33) = sauvegarde
Bnothis (34) = Administration du groupe local net
Bnothis (35) = ASC
bnothis (36) = + dir +
Bnothis (37) = table de dépôt
bnothis (38) = exec maître.Doard
bnothis (39) = maître.Doard
bnothis (40) = maître.dbo.xp_regwrite
Bnothis (41) = Master.dbo.Sysdatabases
bnothis (42) = déclarer
bnothis (43) = exec sp_oacreate
bnothis (44) = exec sp_oamethod
bnothis (45) = xp_
bnothis (46) = sp_
bnothis (47) =% 2b
bnothis (48) =% 5c
bnothis (49) = @
bnothis (50) = sp_oamethod
bnothis (51) = sp_oasetproperty
bnothis (52) = sp_oastop
bnothis (53) = xp_regaddmulistring
bnothis (54) = xp_regdeletekey
bnothis (55) = xp_regdeleTevalue
bnothis (56) = xp_regenumvalues
bnothis (57) = xp_regread
bnothis (58) = xp_regremovemultic
bnothis (59) = xp_regwrite
bnothis (60) = insérer dans
Bnothis (61) =.
Berrc = false
pour biii = 0 à ubound (bnothis)
Si instlin (bqs, bnothis (biii)) <> 0 ou instr (Burl, bnothis (biii)) <> 0 alors
Berrc = true
terminer si
suivant
Si berrc alors
Valeur faible
VALIDENTRY = VRAI
Si ce n'est pas le fait d'être imprégné (session (connexion)) alors valeur = false
Si VALIDENTRY alors
Const Forming = 8
Const Create = true
DIM FSO
Ts
Dim myfilename
'Dim strlog
Dim Strtime, Strip, Strwords, Struse, Strport
MyFileName = Server.Mappath (/ Visited_Forum.txt)
Set fso = server.createObject (scripting.filesystemObject_100502)
SET TS = FSO.OPENEXTFILE (MYFILENAME, FORSPENSING, CREATE)
Strip = request.servervariables (reote_addr) &
Si Strip = alors
Strip = request.servervariables (http_x_forwardded_for) & pour) &
terminer si
Strport = request.servervariables (Remote_port)
strwords = request.servervariables (query_string)
strtime = maintenant ()
StrUser = request.servervariables (http_user_agent)
«Écrivez les informations actuelles pour journaliser le fichier texte.
Détails des attaquants de T.Writeline:
Adresse IP d'attaquant T.Writeline: & Strip
Port d'attaquant T.Writeline: & Strport
T.Writeline Client Machine Related Environment: & Strusers
T.WriteLine Time Attack Time: & Strongime
Page d'attaque T.Writeline: & Burl
Énoncé d'attaque T.Writeline: & Strongs
T.Writeline ----------------------------------------------- -------------------------------------------------- -------------------------------------
Ts.writeline
'Créez une session varialbe à vérifier la prochaine fois pour la valeur
Session (connexion) = Oui
Définir TS = rien
Définir FSO = rien
Terminer si
Response.Write <Script Language = JavaScript> alert ('invite système ↓ / n / n Veuillez ne pas entrer des caractères illégaux [& bqs &] pour essayer! / N / n votre ip [& strip &: & strport &] sera Interdire! / N / N Si vous avez des questions, veuillez contacter l'administrateur QQ: xxxxxx ');
Réponse.
terminer si
%>