Saturday, August 5, 2017

[Release] PolyLoader 3.0


What is PolyLoader?
PolyLoader is a program that opens hack files, randomizes the source code and compiles it.
This process results in an application that is very hard to detect for VAC because the signature changes everytime.


Changelog


3.4.3 
---
Added HTML Developer messages.
Added C# temporary tasks for Hack Files.
Added metadata tag task-type (cs and cs-file)
Added metadata tag task
Added CSPluginManager and Plugin for Hack files.
Added new icon.
Added Windows Installer (.msi)
You can also only launch PolyLoader as admin now.
Changed PolyEngine into 3 parts.
Changed the Registry subkey location. (Now in CurrentUser/Software/PolyLoader)
Changed the way the randomized directory works.
Fixed Manual Install stage.

3.0.2
---
Added the following PolyEngine tags (See Developer guide for usage):
[rand_val optional_type /]
[func_decl function_name /] 
[arg_tuple function_name /]
[arg_tuple_put function_name /]
[arg_tuple_use function_name /]
[arg_tuple_rand function_name optional_type_specification /]
[arg_tuple_if function_name type]
[/arg_tuple_if]
Fixed bug with swap_blocks tag. 

3.0.1
---
Added "Manul Install" window for manually specifying a VC compiler.
Added [junk_function ? ? /] PolyEngine macro. (This took me all day :s)
Removed Visual Studio 2013 from the install manager. (It doesn't work)
Fixed a bug that forced you to restart PolyLoader everytime you wanted to recompile.


3.0
---
Revamped UI
Added better parsing, and completely new framework.
Added some more PolyEngine Macros.
Added automatic installation for Visual Studio 2013/2015 redistributable.
Added new string obfusaction system, the strings stay readable when editing the code now, very useful for debugging.
Added new hack file layout. (View updated developer guide if you're interested in doing it the right way!)
Copying errors from the "Copy Error" button now actually works.

2.3
---
Added more safety checks to minimize crashing, most exceptions are now handled and will pop up with a error.

2.1
---
Added drag and drop functionality (drag hackfile to PolyLoader.exe)
Better error reporting, it will now scan for the correct version of VS2013, the windows SDK and the ERROR: Cannot determine ....

2.0
---
Better junk code generation
Complete syntax change for hack files
String encryption
New UI
Better performance
Automatic detection of the compiler path


For users

1. Download the PolyLoader
2. Install
3. Use

Errors:
"Compilation failed!":
Press the "Show console" checkbox and post the data of the console that opens within [code] tags.

Access denied:
Run as admin.

How to use VMProtect/Enigma etc...:
First you have to generate an exe using the loader for instance "PolyHack_RT.exe".
Now you can protect "PolyHack_RT.exe".


For developers
Everyone can create a hack that supports the PolyLoader platform.

A hack file is just a simple zip with the following files:
-metadata*
-C++ header or source files.

What files do PolyLoader 3.* recognize as Source files?
Any file with the extension of ".cpp", ".c", or ".cc" are recognized as source files.

What files do PolyLoader 3.* recognize as Header files?
Any file with the extension of ".hpp", ".h", or ".inl" are recognized as source files.

So how do I make a hack file?
Step 1, modify your source code.
The PolyLoader uses a few tags to understand your file:

[swap_lines][/swap_lines] - Swap the lines between the 2 tags, useful for randomizing a structure.
Code:
struct Entity {
    [swap_lines]
    DWORD dwBase;
    int id;
    int hp;
    int team;
    int weapon_id;
    int weapon_ammo;
    [/swap_lines]
};
[junk_enable /] - Enables auto junk code addition, the PolyLoader will add junk code after every ;
You can give it 1 or 2 parameters
[junk_enable 5 /] - Will add 5 lines of junk code after every ;
[junk_enable 5 10 /] - Will add 5 to 10 lines of junk code after every;
[junk_disable /] - Disables auto junk code addition.
[junk_enable_declares /] - The auto junk code generator will now only make declares (useful for in header files).
[junk_function 5 /] - Will add 5 randomized functions
[junk_function 5 10 /] - Will add 5 to 10 randomized functions.

[add_junk /] - Adds a block of junk code at this position, it does NOT take junk_enable_declares into account.

[swap_blocks][/swap_blocks] - Works like swap_lines but instead it swaps blocks of code.
[block][/block] - Define a block
Code:
[swap_blocks]
[block]
if (x == 5) {
    std::cout << "x == 5\n";
}
[/block]
[block]
if (y == 7) {
    std::cout << "y == 7\n";
}
[/block]
[/swap_blocks]
[enc_string_enable /] - Scrambles all strings, when you are using this make sure you have Decrypt.h included (the loader will generate a randomized Decrypt.h file).
[enc_string_disable /] - Disables the auto string scrambler.
[enc_string_push /] - Pushes the current state to a stack, this is the recommended way to use enc_string_enable and enc_string_disable.
[enc_string_pop /] - Pops from the stack, then setting the current enc_string state to whatever was on the stack.

Example:
Code:
// at this point enc_string is disabled.
[enc_string_enable /]
// now it is enabled.

// however, if you didn't know if enc_string is currently enabled, or disabled, you might ruin the encryption for the rest of the file if, for example, you assume it is enabled.
// therefor the push/pop mechanic has been added, it is the encouraged way of using enc_string.
[enc_string_push /] // the state of enc_string [enabled] is pushed onto the stack.
[enc_string_disable /] // Now for this region encryption will be enabled.
// do shit
[enc_string_pop /] // Now we reset it back to it's original state, in this case enabled.
[rand_val /] - Generates a random value of any PolyEngine type.
[rand_val type /] - Generates a random value of type type.
[func_decl function_name /] - Declares a PolyEngine function, this must be done to use arg_* tags! (See usage later)
[arg_tuple function_name /] - Generates a tuple of arguments, this is to be used in the declaration of a function only.
[arg_tuple_put function_name /] - Generates a set of arguments to be inserted for when you call a func_decl'd function.

The following are only to be used within a function that has been declared using [func_decl]:
[arg_tuple_use function_name /] - Generates random code using the arguments from the tuple_set.
[arg_tuple_if function_name type] - A parse-time if statement, use this to determine wether a desired type exists in the generated arg_tuple.
[/arg_tuple_if] - End the current arg_tuple if statement.
[arg_tuple_rand function_name type /] - Selects a random argument from the argument tuple in desired function. Only picked if the argument's type is type. See Types section for available types.
[arg_tuple_rand function_name /] - Equivalent to [arg_tuple_rand function_name Any /].

Types
There are 4 main data-types that PolyEngine uses, they can be seen as the following:
PolyEngine Macro Name <-> C++ Representation
Code:
Int <-> int
Char <-> char
String <-> std::string
Any <-> Any of the above.
Simple example using all the features above.
Code:
#include <iostream>
#include <string>
#include <Windows.h>

struct Entity
{
 [swap_lines]
 DWORD dwBase;
 int id;
 int hp;
 int team;
 int weapon_id;
 int weapon_ammo;
 [/swap_lines]
};


[enc_string_enable /]
[junk_enable 5 10 /]
void [func_decl function /]( int a, int b, [arg_tuple function /] )
{
 std::cout << "a : " << a << " b : " << b << std::endl;
 [arg_tuple_if function String]
  std::cout << "random string: " << [arg_tuple_rand function Any /] << std::endl;
 [/arg_tuple_if]

 [arg_tuple_use function /]

 // add_junk
 [add_junk /]

 // Swapping blocks
 auto x = [rand_val Int /];
 auto y = [rand_val Int /];
 [swap_blocks]
 [block]
 if ( x == 5 )
 {
  std::cout << "x == 5\n";
 }
 [/block]
 [block]
 if ( y == 7 )
 {
  std::cout << "y == 7\n";
 }
 [/block]
 [/swap_blocks]
}

void main( )
{
 function( 10, 15, [arg_tuple_put function /] );
 std::cin.get( );
}

[junk_function 1 /]
A possible outcome, would be the following:
http://pastebin.com/EVwUzfVC

metadata*
Here's an example of the new 'metadata' parser, which is the new encouraged way to define your command parameters, input, and output filenames:
Code:
// The PolyLoader version
version: 3.0
// The message displayed in File information, write a short description.
message: Hello MPGH!\nThis is just a test.
// The command line arguments given to vcvars32.bat, they can be the same as before except it is encouraged to skip the /Od flag (Debug).
command: /EHsc /MT *.cpp kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /link /FORCE:MULTIPLE /OUT:hack.exe
// set input as the specified /OUT flag
input: hack.exe
// Set output to what you want your distributed executabl as.
output: MPGH Test.exe

// Now you can also set HTML messages, like so:
// make sure html parsing is enabled
html: true
message: <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://use.fontawesome.com/f4250ed340.js"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Raleway:200"> <link rel="stylesheet" href="http://i.yemiez.com/assets/css/gallery.css"> </head> <body> <button class="g-btn rest" poly-onclick="http://mpgh.net/"> <i class="fa fa-external-link"></i> Release thread </button> <br>Or if the above button doesn't work, <a href="http://www.mpgh.net/">press here</a> </body> </html>
// Note that links only work inside of an <a> tag or using the "poly-onclick" attribute. 

// Files should now also be excluded using the exclude command.
exclude: file1.cpp
exclude: file1.h
// This does not exclude the file from compilation, only randomization.

// It is also encouraged to enter the date you released your file in, for simplicity there are 3 variables for it.
release-year: 2017
release-month: 01
release-day: 21

// set tasks
// This set the current 'TaskTypeState' to inlined C# code.
task-type: cs 

Planned developer features:
  • Push/Pop for all other PolyLoader macros.
  • Safer parsing.


Download Click Disini





























Related Posts

0 comments:

Post a Comment