vmp3 randomize or hide section names

Issues related to VMProtect
ddlmaster
Posts: 3
Joined: Mon Sep 17, 2018 6:18 pm

vmp3 randomize or hide section names

Postby ddlmaster » Mon Sep 17, 2018 6:21 pm

hi, ive tried a script i had for 2.x but doesnt work, i see in 3 its changed to lua but this doesn't work either;

function GetRandomSectionName()
local res = ""
for i = 1, 8 do
res = res .. string.char(32 + math.random(string.byte("z") - 32))
end
return res
end

function OnAfterSaveFile()
local file = vmprotect.core():outputFile()
for i = 1, file:segments():count() do
file:segments():item(i):setName(GetRandomSectionName())
end
end

whats the script to hide section names or randomize them (both examples would be good)

thanks

Admin
Site Admin
Posts: 1504
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: vmp3 randomize or hide section names

Postby Admin » Tue Sep 18, 2018 5:56 am

C:\Users\Public\Documents\VMProtect\Scripts\Random Section Names:

Code: Select all

function GetRandomSectionName()
   local res = ""
   for i = 1, 8 do
      res = res .. string.char(32 + math.random(string.byte("z") - 32))
   end
   return res
end

function OnAfterSaveFile()
   local file = vmprotect.core():outputArchitecture()
   for i = 1, file:segments():count() do
      segment = file:segments():item(i)
      name = GetRandomSectionName()
      print(string.format("Section \"%s\" is renamed to \"%s\"", segment:name(), name))
      segment:setName(name)
   end
end


What doesn't work?

ddlmaster
Posts: 3
Joined: Mon Sep 17, 2018 6:18 pm

Re: vmp3 randomize or hide section names

Postby ddlmaster » Tue Sep 18, 2018 7:27 pm

thankyou.

Mecanik
Posts: 2
Joined: Fri Sep 28, 2018 11:59 am

Re: vmp3 randomize or hide section names

Postby Mecanik » Fri Sep 28, 2018 12:35 pm

Interesting, and very useful. However I don't know how antivirus engines will handle this, as most of them scan section names as well, they might flag it false positive... :(