Page 1 of 1

vmp3 randomize or hide section names

Posted: Mon Sep 17, 2018 6:21 pm
by ddlmaster
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

Re: vmp3 randomize or hide section names

Posted: Tue Sep 18, 2018 5:56 am
by Admin
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?

Re: vmp3 randomize or hide section names

Posted: Tue Sep 18, 2018 7:27 pm
by ddlmaster
thankyou.

Re: vmp3 randomize or hide section names

Posted: Fri Sep 28, 2018 12:35 pm
by Mecanik
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... :(