Programming implementation of shared software dual Verification

Source: Internet
Author: User

Text/SuperVirus
The content for the first contribution tends to be shared with the software. After the contribution, I read the article again. I feel that all of the content I 've described is theoretical, in addition, some usage methods have been used by the author of shared software for a long time in hacking attacks. Therefore, after thinking, I decided to introduce in detail the implementation of shared software and discuss some brute-force cracking methods in the future. The road is a step-by-step process. It takes a bite to eat, and it is too urgent. It is not only difficult for first-time friends to quickly get started and share software cracking, but also makes people feel like they are playing a guerrilla warfare-A journal account. However, we all know that the online articles about shelling and shared cracking are full of the world. Therefore, based on the selection of novel materials, this article adds some personal opinions and code, to help you get started with the system.
 
Prelude
In the preparation of shared software, I think the most important two are: the time of use and the number of times limit. Shared Software must have these two restrictions. Remember that at the beginning of the development of encryption and decryption in China, shell software can achieve this restriction, so the Absolute Radiation coverage of these two restrictions is, let's first implement C ++ programming.
As for the restrictions, the implementation of this article is mainly to take the registry and pseudo system files for a combination of authentication at the same time, I personally feel that the anti-cracking effect is good.
 
Operation Process
We use the use record data that has been written into the registry and pseudo system files for verification. In terms of defense against cracking, 80% of new users can basically block it. In terms of the registry key value, you can use a GUID (globally unique identifier, which can be obtained by the CoCreateGuid function during programming) type string or a number of bootvids. dll and other pseudo-system file names similar to the system file; there is also a consideration for the immediate modification of the system time after the use limit is reached, compare the current system time with the data previously stored in the registry in programming. If the value is greater than the value, it is saved to the Registry. If the value is smaller than the value, it indicates that the time has been modified by the user, the operation is denied (the premise is that some ANTI registry or file monitoring tools are not described here ).
 
Code Implementation
We first define the restriction type of the software. The variable declaration is as follows, and then design the class member variables and function implementation functions.
 
# Define Run_number 1 // Number of running times
# Define Run_time 2 // Run Time
 
1) class function Initialization
SoftwareShow: SoftwareShow (
Const char * Cracker, // name of the entry in the Registry
Const char * SuperVirus, // key name and pseudo system file name in the Registry
UNIT nSome, // constant that uses the time and number of times
UNIT nCeackerType // type)
 
2) Compile the internal code of the class function
 
// Obtain the system file directory and assign it to c_systemfolder
UNIT nRuncount;
GetSystemDirectory (c_System, MAX_PATH );
Strcpy (c_systemfolder, c_System );
If (
C_systemfolder [strlen (c_systemfolder)-1]! = '\')
Strcat (c_systemfolder ,'\');
// Generate the registration file name in the system directory, and confuse users with DLL extensions
Strcat (c_systemfolder, SuperVirus );
Strcat (c_systemfolder, ". dll ");

3) use record information to save
This code mainly implements Random Processing of the use record information.
 
BOOL SoftwareShow: Obfuscate (UINT number, char * str)
{Char tmpstr [128];
// Obtain a benchmark time
Srand (unsigned int) time (NULL ));
UINT base1, base2, base3;
Base1 = rand ();
Base2 = rand ();
Base3 = abs (base1-base2 );
Sprintf (tmpstr, "% d. % d. % d", base1, number + base3, base2 );
Strcpy (str, tmpstr );
Return FALSE ;}
 
Pass the preceding string to the STR parameter to create the sub-key.
 
RegSetValueEx (crackerhkey, "windll", 0, REG_SZ, (byte *) str, size );
 
4) Creation of key values and pseudo system files
This is also set to solve the decryption difficulty. The information is stored in multiple registries, and bootvid. dll, similar to the system file name, is created to record the usage information for the purpose of dual verification and hiding. The implementation code is as follows.
 
Char * SomeKey = new char [strlen (Cracker) + strlen (SuperVirus) + 300];
Strcpy (SomeKey, "CLSID \");
Strcat (SomeKey, Cracker );
Strcat (SomeKey ,"\");
Strcat (SomeKey, SuperVirus );
HKEY nkey;
DWORD dwDisposition;
LONG ret = RegCreatKeyEx (HKEY_CLASSES_ROOT,
SomeKey, 0, ", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, & hkey, & dwDisposition );
Crackerhkey = hkey;
Delete Subkey;

5) continue to create pseudo system files
 
Char buff [32];
Buff [31] = 0;
FILE * cracking = fopen (c_systemfolder, "w ");
Fprintf (cracking, buff );
Fclose (cracking );
 
6) read and display the usage record information
Let's take a moment to know that it is actually the reverse process of the Code in the previous step, and read the last running information from the Registry for judgment.
 
Char data [128];
DWORD size = sizeof data;
LONG ret = RegQueryValueEx (Crackerhkey, "windll", 0, NULL, (BYTE *) data, & size );
If (
Ret = ERROR_SUCCESS)
{
DeObfuscate (data, nCount); // restores the information function of Random Processing.
Return False;
}

7) Reuse programming implementation
Open Visual C ++, follow the default options, click MFC AppWizand to create a single document Project: SoftwareShow, and add reusable class header files to the project. Open SostShow. cpp and add the following code to the header of the BOOL SoftwareShowAPP: InitInstance () function library:
 
CString str = _ T ("");
SostwareShow show ("SoftwareShower", "show1", 30, Run_number );
If (show. IsHaveshow ())
{
Str = _ T ("This software has expired. Send the ticket to me quickly, haha !");
: MessageBox (NULL, str, "expired", MB_ICONERROR | MB_ OK );
 
As for the window display, you can modify it at will. Here is just a specific implementation process.
 
 
Summary
At this point, even if this article is over, there is no novelty in technology, but I personally think it is still possible to implement the method. Of course, this is just a reference, it would be fun for everyone to use a cracking tool in the future. Although this article provides a method to implement the dual authentication of the Registry and files, if you know more about the hidden methods on the system, you can also add them to further strengthen the software cracking cycle. But here I have to mention the premise. For the popular dynamic tracking software, we 'd better do some Anti-Debugger code protection before using the technology in this article.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.