Exetools

Exetools (https://forum.exetools.com/index.php)
-   Source Code (https://forum.exetools.com/forumdisplay.php?f=46)
-   -   【 Reproduction】VMProtect Leaked Source Code Full (https://forum.exetools.com/showthread.php?t=20778)

disauto 12-07-2023 17:14

【 Reproduction】VMProtect Leaked Source Code Full
 
h-t-t-ps://www.lanzoul.com/iyzIC1h3acxc

h-t-t-ps://pixeldrain.com/u/fKn1dZqK

ahmadmansoor 12-07-2023 18:06

1 Attachment(s)
Just in case the link is dead I upload it here.

blue_devil 12-07-2023 20:10

package includes missing intel.cc file!

WhoCares 12-07-2023 20:53

leak of the year?

blue_devil 12-07-2023 23:00

Quote:

Originally Posted by WhoCares (Post 129496)
leak of the year?

I think the shared zip archive is this repo:

Code:

https://github.com/jmpoep/vmprotect-3.5.1

Jupiter 12-07-2023 23:30

Git is missing files and folders
 
Quote:

Originally Posted by blue_devil (Post 129499)
I think the shared zip archive is this repo:

Code:

https://github.com/jmpoep/vmprotect-3.5.1

If you need original content, then download full archive and not from GitHub.

The person who uploaded the archive content to GitHub didn't check the `.gitignore' file, so the public git repo is missing some files from the original archive.

bolo2002 12-08-2023 00:05

Quote:

Originally Posted by blue_devil (Post 129495)
package includes missing intel.cc file!

core contain intel.cc not the right one?

FoxB 12-08-2023 02:14

Quote:

Originally Posted by bolo2002 (Post 129503)
core contain intel.cc not the right one?

included in git package, with 'processors.cc' and 'licensing_manager.cc', etc.

th3tuga 12-08-2023 06:36

Could anyone get this to compile?
Details from anyone who could get it to successfully compile?

It appears to be the source files from the VMP source code leak earlier in May this year with the missing processors.cc and others added in from other sources.
Can anyone confirm that this is the source for the actual VMP 3.5.1?

The dates of file have been changed to show year 1970 but check the html files in the "help" folder.
The copyright dates in the html files show that they are all actually from around 2015. No later.

blue_devil 12-08-2023 14:36

According to sh3dow's post, the very first leak already has some missing parts:

Quote:

intel.cc
arm.cc
arm.h
processors.cc
gcc-demangle.cc
gcc-demangle.h
msvc-demangle.cc
msvc-demangle.h
dprint.c
dprint.h
def.h
The latest leak/link contains some of those above:

Code:

| file            | Shared: 12/05/2023 | Shared: 07/12/2023 |
|------------------+--------------------+--------------------|
| intel.cc        | no                | yes                |
| arm.cc          | no                | no                |
| arm.h            | no                | no                |
| processors.cc    | no                | yes                |
| gcc-demangle.cc  | no                | no                |
| gcc-demangle.h  | no                | no                |
| msvc-demangle.cc | no                | no                |
| msvc-demangle.h  | no                | no                |
| dprint.c        | no                | no                |
| dprint.h        | no                | no                |
| def.h            | no                | no                |


FoxB 12-08-2023 14:51

Quote:

Originally Posted by th3tuga (Post 129507)
Could anyone get this to compile?
Details from anyone who could get it to successfully compile?
....

i maked next steps for GIT release:
redirected projects from vs2008 to vs2010, from v141_xp to v140_xp, dotnet from 4.8 to 4.7.2 ans start compile with the vs2015.

console,
Code:

...\vmprotect-3.5.1-master\bin\32\Ultimate>VMProtectCon.exe
VMProtect Ultimate v 1.0.0 (build 0) Copyright 2003-2021 VMProtect Software
Unregistered Version

Usage: VMProtectCon.exe File [Output File] [-pf Project File] [-sf Script File] [-lf Licensing parameters file] [-bd Build Date (yyyy-mm-dd)] [-wmatermark] [-we]

libs, dlls and utilities also is compiled.

swears on the runtime source Win32.cs
type designs
NtQueryInformationProcess(CurrentProcess, PROCESSINFOCLASS.ProcessDebugObjectHandle, out _, IntPtr.Size, out _)
but we can fix it =)

or when there is an announcement in the Win32.cs public
class IntelObfuscation : public IObject
{
public:
explicit IntelObfuscation();
void Compile(IntelFunction *func, size_t index);
...
}

and then in the body:
void IntelObfuscation::Compile(IntelFunction *func, size_t index, size_t end_index = -1, bool for_virtualization = false)
{
...
}


maybe for dotnet 4.8 is fine, but 4.7.2 give error for me.


for the GUI version you need QT headers and libs...

th3tuga 12-08-2023 14:53

@FoxB Can you post compilable code with fixes as zip? Fails completely with VS 2022.

kernel 12-08-2023 21:19

The QT 5.6 have to be installed the same way the author installed it or the GUI version will not compile.

nulli 12-08-2023 21:32

Anyone know if this is the same as listed here? https://breachforums.is/Thread-FREE-VMProtect-Source-Code-LEAK

sendersu 12-09-2023 02:41

same sources as previous leak, no any file changed
have compared today

TQN 12-09-2023 10:09

yes, I agree with @sendersu.
Only 1 source, only 2 more files: intel.cc and processors.cc

th3tuga 12-09-2023 11:48

Quote:

Originally Posted by sendersu (Post 129531)
same sources as previous leak, no any file changed
have compared today

Well, I had called out this release to be a fake 2 days ago.. :D

wx69wx2023 12-09-2023 12:05

The guide for vmp complie:

https://bbs.kanxue.com/thread-279803-1.htm

th3tuga 12-09-2023 12:34

Quote:

Originally Posted by wx69wx2023 (Post 129540)
The guide for vmp complie:

https://bbs.kanxue.com/thread-279803-1.htm

The point here is that the files in the release are the same ones from the May leak as confirmed by TQN and sendersu also.
The 2 missing files added are not the real ones. Code will compile though since the added files are from another very old leak of VMP.

The code for the virtualization is also highly incomplete.

kernel 12-09-2023 16:10

Quote:

Originally Posted by wx69wx2023 (Post 129540)
The guide for vmp complie:

https://bbs.kanxue.com/thread-279803-1.htm

Hi i got qt 5.6 but the problem is it won't compile under VS 2022 because vs 2022 tries to compile it with c++17 but qt 5.6 is c++14 max so had to compile it with higher version of qt that supports c++17.

kernel 12-10-2023 00:47

1 Attachment(s)
Here the Debug version compiled and registered for test:
vmp_dbg

The ultimate version is harder to compile. You have to compile the full qt5 in order to build it.

Stingered 12-10-2023 01:44

Quote:

Originally Posted by kernel (Post 129549)
Here the Debug version compiled and registered for test:
vmp_dbg

The ultimate version is harder to compile. You have to compile the full qt5 in order to build it.

Tested on a VM. All the MS VCRT DLLs are missing (obviously). After fixing that problem, I ran into another missing file called: VMprotectSDK64.dll

You make want to look at dependencies and re-up after those have been resolved. I will test once available.

kernel 12-10-2023 17:26

VMprotectSDK64.dll is in the archive. Maybe your av deleted it.
This is a custom hwid version of Vmprotect. All the vmprotected files are locked to a hwid. VMprotectSDK64.dll reads data from VMProtectLicense.ini and locks the files to the hwid from the ini file.
PS.

VMProtectLicense.ini is the license file just put it in the vmprotect.exe dir and it is licensed.

TQN 12-10-2023 18:44

Ultimate build with VS2022
 
2 Attachment(s)
I have mod sources and build with VS 2022, VC++ Toolset v143, .NET 8, Windows SDK v10.0.22621.0 (lastest Visual Studio 2022 v17.8.3)
1. Mod libffi source and project files, update with newest version 3.4.4
Take me a lot of times
2. mod bitmap_utils.cc, pe.h, pefile.cc, intel.cc, shellext: remove C+11, update to C++14, fix warning as errors, remove duplicates in pe.h and Windows Kits winnt.h
3. Update version of VMProtect.Netcore and VMProtect.Runtime
4. Remove all Testxxx projects
5. I hate Qt, so I remove GUI project.

Open vmprotect.sln with VS, select Ultimate, build solution.

Uploaded at Mediafire VMP.7z file is mod sourcse and binaries build in bin directory

h t t p s : / /www.mediafire.com/file/8qdjcf0xeqhbcvz/VMP.7z/file

Best regards,
HongThatCong (TQN)

ahmadmansoor 12-10-2023 22:36

@TQN
Thank you, I already attach it to ur Post, to keep a copy.

Stingered 12-10-2023 23:07

Quote:

Originally Posted by kernel (Post 129556)
VMprotectSDK64.dll is in the archive. Maybe your av deleted it.
This is a custom hwid version of Vmprotect. All the vmprotected files are locked to a hwid. VMprotectSDK64.dll reads data from VMProtectLicense.ini and locks the files to the hwid from the ini file.
PS.

VMProtectLicense.ini is the license file just put it in the vmprotect.exe dir and it is licensed.

Nope, but the .DLL was still part of the archive, and I don't have an AV in my VM. I was able to extract it from the original. However, still more debug dependencies (QT5cored.dll, which I will need to locate.

Also, are you saying you provided an .INI file or are you seeing that I need an .INI file to test this? Because there is no included .INI file.

"VMProtectLicense.ini is the license file just put it in the vmprotect.exe dir and it is licensed."

Pansemuckl 12-11-2023 01:43

1 Attachment(s)
Quote:

Originally Posted by Stingered (Post 129560)
Also, are you saying you provided an .INI file or are you seeing that I need an .INI file to test this? Because there is no included .INI file.

"VMProtectLicense.ini is the license file just put it in the vmprotect.exe dir and it is licensed."

Look inside ./core

The compiled GUI version does not work for me.

Stingered 12-11-2023 03:07

Quote:

Originally Posted by Pansemuckl (Post 129562)
Look inside ./core

The compiled GUI version does not work for me.

Can't look at attachments, but found it. Which GUI doesn't work for you, the retail (I have not tried to build this yet) or debug version provided? Two D/ls in the thread...

Pansemuckl 12-11-2023 05:30

Quote:

Originally Posted by Stingered (Post 129563)
Can't look at attachments, but found it. Which GUI doesn't work for you, the retail (I have not tried to build this yet) or debug version provided? Two D/ls in the thread...

Debug version provided, NOT the original (packed) one, posted here
https://forum.exetools.com/showpost.php?p=129549&postcount=21

Error message given:
https://picr.eu/images/2023/12/10/VHekF.png

Jaspreet Singh 12-11-2023 06:46

Quote:

Originally Posted by Pansemuckl (Post 129564)
Debug version provided, NOT the original (packed) one, posted here
https://forum.exetools.com/showpost.php?p=129549&postcount=21

Error message given:
https://picr.eu/images/2023/12/10/VHekF.png

Looks like a missing Qt or MSVCRT dependency. Use the other one from TQN.

Pansemuckl 12-11-2023 07:06

TQN? Could anyone provide a working source for VMPROTECT (compiling out of the box GUI)?

Jaspreet Singh 12-11-2023 07:31

Quote:

Originally Posted by Pansemuckl (Post 129568)
TQN? Could anyone provide a working source for VMPROTECT (compiling out of the box GUI)?

The source provided by TQN already compiles out of box. It has the modified files. You would need to install the Qt and dependencies ofc.

Stingered 12-12-2023 02:02

Quote:

Originally Posted by Pansemuckl (Post 129564)
Debug version provided, NOT the original (packed) one, posted here
https://forum.exetools.com/showpost.php?p=129549&postcount=21

Error message given:
https://picr.eu/images/2023/12/10/VHekF.png

I have the exact same error. My VM is Win7, so I wonder if it's an OS problem?

sendersu 12-12-2023 02:48

qwindows.dll present?

kernel 12-12-2023 05:09

Quote:

Originally Posted by Stingered (Post 129574)
I have the exact same error. My VM is Win7, so I wonder if it's an OS problem?

Just install VS 2022 and it will run. It is Debug version built with VS 2022.
A little test made with it. Just vmprotected notepad.exe - 68kb with only EP virtualized and the output file size is 5626kb. For compare the same output with 3.09 is 2222kb. With 3.4 is 5249kb. With 3.5.1 is 6828kb and with 3.6 is 6136kb.
So conclusion this are Vmprotect 3.5 sources most likely.

Jaspreet Singh 12-12-2023 07:26

Quote:

Originally Posted by Stingered (Post 129574)
I have the exact same error. My VM is Win7, so I wonder if it's an OS problem?

I've already answered this yesterday.
Adding more details, this debug version requires debug version of the MSVCRT.
Easiest way to do this is to run this on a machine with VS 2022 installed. Or you can install the debug version of the MSVCRT.
Both ways work.

Third way: If you googled it, it's coming as the first hit for me. :D

Fyyre 12-22-2023 03:08

Did someone say Citrix? You can hear VMP screaming from here.

0xc3 01-20-2024 16:53

I manually compiled one, and there is indeed a lot of content that needs to be configured

CodeCracker 10-20-2024 17:53

VMRotect 3.5.1 disable renaming
 
1 Attachment(s)
VMRotect 3.5.1 disable renaming:
\core\dotnetfile.cc
void NETArchitecture::RenameSymbols()
{
..
if (full_name == "System.Reflection.ObfuscateAssemblyAttribute") {
...

}

00B7C3D1 . 897F 04 MOV DWORD PTR DS:[EDI+0x4],EDI
00B7C3D4 . 893F MOV DWORD PTR DS:[EDI],EDI
00B7C3D6 . 897F 08 MOV DWORD PTR DS:[EDI+0x8],EDI
00B7C3D9 . C743 04 00000000 MOV DWORD PTR DS:[EBX+0x4],0x0
00B7C3E0 . 8B5D C4 MOV EBX,DWORD PTR SS:[EBP-0x3C]
00B7C3E3 . F703 00000400 TEST DWORD PTR DS:[EBX],0x40000
00B7C3E9 . 74 07 JE SHORT 00B7C3F2 ; VMProtec.00B7C3F2
00B7C3EB . 8BCE MOV ECX,ESI
00B7C3ED . E8 8EB70000 CALL 00B87B80 ; VMProtec.00B87B80
00B7C3F2 > FFB3 D8000000 PUSH DWORD PTR DS:[EBX+0xD8]
00B7C3F8 . 8B8E 94000000 MOV ECX,DWORD PTR DS:[ESI+0x94]



rename of symbols from assembly:
00BA7B80 $ 55 PUSH EBP
to be changed to ret to not rename
00B87B80 $ 55 PUSH EBP


for (i = 0; i < rename_token_list.size(); i++) {
RenameToken(rename_token_list[i]);
}
reference_list.UpdateNames();

void NETArchitecture::RenameToken(ILToken *token)
{
...
id |= 0xA0000000;
new_name = string_format("%.8X", id);

}


00D0A790 $ 55 PUSH EBP // RenameToken
Local calls from 00BAA600, 00BAF6BB, 00BCD754, 00BCDAC8, 00BDE233
The 00BAF6BB

00BAF1B4 . /74 5D JE SHORT 00BAF213 ; VMProtec.00BAF213

00BAF6AE . 85FF TEST EDI,EDI
00BAF6B0 . 74 19 JE SHORT 00BAF6CB ; to jump
00BAF6B2 > FF34B2 PUSH DWORD PTR DS:[EDX+ESI*4]
00BAF6B5 . 8B8D 4CFEFFFF MOV ECX,DWORD PTR SS:[EBP-0x1B4]
00BAF6BB . E8 D0B0FFFF CALL 00BAA790 ; VMProtec.00BAA790
00BAF6C0 . 8B95 38FEFFFF MOV EDX,DWORD PTR SS:[EBP-0x1C8]
00BAF6C6 . 46 INC ESI
00BAF6C7 . 3BF7 CMP ESI,EDI
00BAF6C9 .^ 72 E7 JB SHORT 00BAF6B2 ; VMProtec.00BAF6B2




if (!HWID.IsCorrect(value))
{
ShowMessage("This application cannot be executed on this computer.");
return false;
}






loader_string_list[FACE_UNREGISTERED_VERSION] = AddCommand(EncryptString(
#ifdef DEMO
true
#else
(ctx.options.flags & cpUnregisteredVersion)
#endif
? os::FromUTF8(VMProtectDecryptStringA("This application is protected with unregistered version of VMProtect.")).c_str() : os::unicode_string().c_str(), string_key));
VMProtectEnd();



#ifndef DEMO
if (VMProtectGetSerialNumberState() == SERIAL_STATE_SUCCESS) {
options.flags |= cpEncryptBytecode;
if ((options.flags & cpMemoryProtection) == 0)
options.flags |= cpLoaderCRC;
} else
options.flags |= cpUnregisteredVersion;
#endif

int VMP_API VMProtectGetSerialNumberState()
{
#ifdef WIN_DRIVER
return SERIAL_STATE_FLAG_INVALID;
#else
if (!g_serial_is_correct)
return SERIAL_STATE_FLAG_INVALID;
if (g_serial_is_blacklisted)
return SERIAL_STATE_FLAG_BLACKLISTED;

int res = 0;

char buf[256];
if (GetIniValue("TimeLimit", buf, sizeof(buf))) {
int running_time = atoi(buf);
if (running_time >= 0 && running_time <= 255) {
uint32_t dw = GetTickCount();
int d = (dw - g_time_of_start) / 1000 / 60; // minutes
if (running_time <= d)
res |= SERIAL_STATE_FLAG_RUNNING_TIME_OVER;
}
}

if (GetIniValue("ExpDate", buf, sizeof(buf))) {
int y, m, d;
if (sscanf_s(buf, "%04d%02d%02d", &y, &m, &d) == 3) {
uint32_t ini_date = (y << 16) + (static_cast<uint8_t>(m) << 8) + static_cast<uint8_t>(d);
uint32_t cur_date;
#ifdef VMP_GNU
time_t rawtime;
time(&rawtime);
struct tm local_tm;
tm *timeinfo = localtime_r(&rawtime, &local_tm);
cur_date = ((timeinfo->tm_year + 1900) << 16) + (static_cast<uint8_t>(timeinfo->tm_mon + 1) << 8) + static_cast<uint8_t>(timeinfo->tm_mday);
#else
SYSTEMTIME st;
GetLocalTime(&st);
cur_date = (st.wYear << 16) + (static_cast<uint8_t>(st.wMonth) << 8) + static_cast<uint8_t>(st.wDay);
#endif
if (cur_date > ini_date)
res |= SERIAL_STATE_FLAG_DATE_EXPIRED;
}
}

if (GetIniValue("MaxBuildDate", buf, sizeof(buf))) {
int y, m, d;
if (sscanf_s(buf, "%04d%02d%02d", &y, &m, &d) == 3) {
uint32_t ini_date = (y << 16) + (static_cast<uint8_t>(m) << 8) + static_cast<uint8_t>(d);
uint32_t cur_date;
#ifdef VMP_GNU
time_t rawtime;
time(&rawtime);
struct tm local_tm;
tm *timeinfo = localtime_r(&rawtime, &local_tm);
cur_date = ((timeinfo->tm_year + 1900) << 16) + (static_cast<uint8_t>(timeinfo->tm_mon + 1) << 8) + static_cast<uint8_t>(timeinfo->tm_mday);
#else
SYSTEMTIME st;
GetLocalTime(&st);
cur_date = (st.wYear << 16) + (static_cast<uint8_t>(st.wMonth) << 8) + static_cast<uint8_t>(st.wDay);
#endif
if (cur_date > ini_date)
res |= SERIAL_STATE_FLAG_MAX_BUILD_EXPIRED;
}
}

if (GetIniValue("KeyHWID", buf, sizeof(buf))) {
char buf2[256];
GetIniValue("MyHWID", buf2, sizeof(buf2));
if (strcmp(buf, buf2) != 0)
res |= SERIAL_STATE_FLAG_BAD_HWID;
}

return res;
#endif
}

0045A2B2 . F7D0 NOT EAX
0045A2B4 . 2385 C0FEFFFF AND EAX,DWORD PTR SS:[EBP-0x140]
0045A2BA . 8985 C0FEFFFF MOV DWORD PTR SS:[EBP-0x140],EAX
0045A2C0 . A9 00040000 TEST EAX,0x400
0045A2C5 . 75 0B JNZ SHORT 0045A2D2 ; VMProtec.0045A2D2
0045A2C7 . 25 FFFFFDFF AND EAX,0xFFFDFFFF
0045A2CC . 8985 C0FEFFFF MOV DWORD PTR SS:[EBP-0x140],EAX
0045A2D2 > FF15 08B26500 CALL DWORD PTR DS:[0x65B208] ; VMProt_1.VMProtectGetSerialNumberState
0045A2D8 . 85C0 TEST EAX,EAX
0045A2DA . 8B85 C0FEFFFF MOV EAX,DWORD PTR SS:[EBP-0x140]
0045A2E0 . 75 19 JNZ SHORT 0045A2FB ; VMProtec.0045A2FB

VMProt_1.VMProtectGetSerialNumberState
is from VMProtectSDK32.dll

I realize all you have to do is place VMProtectLicense.ini in same directory.

sendersu 10-20-2024 18:55

@CodeCracker
why do you need to patch smth on binary level if you have got full VMP sources?


All times are GMT +8. The time now is 16:43.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX