Protect your files against unauthorized changes [ C++ Source ]
This work perfect in combination with Pinkof Antihack (or any other free). With this dll you can protect some important files (item.bmd, player.bmd, your dlls, etc) against unauthorized changes.
Use CheckCRC.exe to generate CRC32 of file.
Ex. protect for 1.04d
Code:
//CheckSum Filesconst char* PlayerF = "Data/Player/player.bmd";
const char* ItemF_eng = "Data/Local/Eng/item_eng.bmd";
const char* ItemF_por = "Data/Local/Por/item_por.bmd";
const char* ItemF_spa = "Data/Local/Spn/item_spn.bmd";
//const char* TextF = "Data/Local/Text.bmd";
//Checksum Code
unsigned long PlayerFCRC = 0x7D56FCEB;
unsigned long ItemFCRC_eng = 0xF9485939;
unsigned long ItemFCRC_por = 0xF9485939;
unsigned long ItemFCRC_spa = 0xF9485939;
//unsigned long TextFCRC = 0x370F4288;
void checkCrc32()
{
CCRC32 MyCRC32;
MyCRC32.Initialize();
unsigned long ulCRCP = MyCRC32.FileCRC(PlayerF);
unsigned long ulCRC_eng = MyCRC32.FileCRC(ItemF_eng);
unsigned long ulCRC_por = MyCRC32.FileCRC(ItemF_por);
unsigned long ulCRC_spa = MyCRC32.FileCRC(ItemF_spa);
if(ulCRCP != PlayerFCRC)
{
MessageBoxA(0, "Player file modified!", "Error", MB_OK | MB_ICONSTOP);
ExitProcess(1);
}
if(ulCRC_eng != ItemFCRC_eng)
{
MessageBoxA(0, "Item file modified!", "Error", MB_OK | MB_ICONSTOP);
ExitProcess(1);
}
if(ulCRC_por != ItemFCRC_por)
{
MessageBoxA(0, "Item file modified!", "Error", MB_OK | MB_ICONSTOP);
ExitProcess(1);
}
if(ulCRC_spa != ItemFCRC_spa)
{
MessageBoxA(0, "Item file modified!", "Error", MB_OK | MB_ICONSTOP);
ExitProcess(1);
}
}
Download:
Source: crc32u - Download - 4shared
Application to generate CRC32: CheckCRC - Download - 4shared
Re: Protect your files against unauthorized changes [ C++ Source ]
For older versions:
Code:
//CheckSum Filesconst char* PlayerF = "Data/Player/player.bmd";
const char* ItemF_eng = "Data/Local/item.bmd";
//const char* TextF = "Data/Local/Text.bmd";
If you would like you can change the prefix to other doesnt matter
Re: Protect your files against unauthorized changes [ C++ Source ]
emm, this code works for 97++?(Text.bmd Example):
Code:
#include "StdAfx.h"
#include "Crc32.h"
//CheckSum Files
const char* TextF = "Data/Local/Text.bmd";
//Checksum Code
unsigned long TextFCRC = 0x370F4288;
void checkCrc32()
{
CCRC32 MyCRC32;
MyCRC32.Initialize();
unsigned long ulCRC_Text = MyCRC32.FileCRC(TextF);
if(ulCRC_Text != TextFCRC)
{
MessageBoxA(0, "Text file modified!", "Error", MB_OK | MB_ICONSTOP);
ExitProcess(1);
}
}
}
Re: Protect your files against unauthorized changes [ C++ Source ]
This can be bypassed in 5 seconds.
Re: Protect your files against unauthorized changes [ C++ Source ]
can you make a tut how to use this?
i am newbies
Re: Protect your files against unauthorized changes [ C++ Source ]
Quote:
Originally Posted by
UnCleanOne
can you make a tut how to use this?
i am newbies
here is what you need in few steps:
1. VS2010
2. OllyDbg
3. launch CheckCRC.exe and find CRC32 of Data/Player/player.bmd file;
4. open project and put your value (replace 7D56FCEB with your value)
Quote:
unsigned long PlayerFCRC = 0x7D56FCEB;
4. repeat step 3 and 4 for all your protected files
5. build crc32.dll
6. hook crc32.dll in your main
7. COMPRESS crc32.dll, so smart guy like DeathArmy can not modify your protected value (see in pictures how can be modified using olly)
8. embed all your dlls with main using Enigma Virtual Box (same reason like 7)
here it is 2 pictures with what happens if you do not compress your crc32.dll:
http://i297.photobucket.com/albums/m...im/th_crc1.jpg
http://i297.photobucket.com/albums/m...im/th_crc2.jpg
that is all...
Re: Protect your files against unauthorized changes [ C++ Source ]
Re: Protect your files against unauthorized changes [ C++ Source ]
It is not hard to get the same crc after editing a file. Instead, use secure hash algorithms like sha256.
If you want to read more:
Cyclic redundancy check - Wikipedia, the free encyclopedia
1 Attachment(s)
Re: Protect your files against unauthorized changes [ C++ Source ]
Quote:
Originally Posted by
spezi
oo, let me see if u can do that:
here is my item_spn.bmd:Attachment 109542
which have crc32: FAEA638A
please, make Kris damage 200 and send me back with original crc...
Re: Protect your files against unauthorized changes [ C++ Source ]
I see, you are resistant to learn new things and not open-minded to constructive criticism. You obviously didn't read the link i posted. I just wanted to help you to improve.
Re: Protect your files against unauthorized changes [ C++ Source ]
Quote:
Originally Posted by
spezi
I see, you are resistant to learn new things and not open-minded to constructive criticism. You obviously didn't read the link i posted. I just wanted to help you to improve.
you are pathetic... there is not about me is about you and your skills... you prove nothing...
Re: Protect your files against unauthorized changes [ C++ Source ]
I don't have to prove my skills. I posted you already the proof that CRC is insecure for your purpose.
Quote:
Secondly, the linear properties of CRC codes even allow an attacker to modify a message in such a way as to leave the check value unchanged,[4][5]
Even if I can't prove (I'm not familiar with editting bmd files, so I can't show you my skills), don't you think there are more clever guys than me?
Re: Protect your files against unauthorized changes [ C++ Source ]
Quote:
Originally Posted by
spezi
I don't have to prove my skills. I posted you already the proof that CRC is insecure for your purpose.
Even if I can't prove (I'm not familiar with editting bmd files, so I can't show you my skills), don't you think there are more clever guys than me?
i understand, then I give you more options, I hope there are no problems:
Files+ Sha Information:
choose one of the following 4 files in the next link:
MyFiles
Now, choose one of the following 4 files:
PNG File: Change Text `PNG` to `JPG`
Exe File: Change www.google.com to `mywebsite.com`
JPG File: Change the first Letter To `@` (Open with notepad,etc)
DLL File: Change `This program cannot be run in DOS mode`
To: `This Program Never run in DOS Mode`
Re: Protect your files against unauthorized changes [ C++ Source ]
Quote:
Originally Posted by
aecrimch
here is what you need in few steps:
1. VS2010
2. OllyDbg
3. launch CheckCRC.exe and find CRC32 of Data/Player/player.bmd file;
4. open project and put your value (replace 7D56FCEB with your value)
4. repeat step 3 and 4 for all your protected files
5. build crc32.dll
6. hook crc32.dll in your main
7. COMPRESS crc32.dll, so smart guy like DeathArmy can not modify your protected value (see in pictures how can be modified using olly)
8. embed all your dlls with main using Enigma Virtual Box (same reason like 7)
here it is 2 pictures with what happens if you do not compress your crc32.dll:
http://i297.photobucket.com/albums/m...im/th_crc1.jpg
http://i297.photobucket.com/albums/m...im/th_crc2.jpg
that is all...
very good explanation, also one idea for using hide .dll files is to include them inside the main.exe and pack the file
Re: Protect your files against unauthorized changes [ C++ Source ]
Quote:
Originally Posted by
diablo71
very good explanation, also one idea for using hide .dll files is to include them inside the main.exe and pack the file
unfortunately CRC32 is simple and very easy to circumvent...
at least serves as protective anti noobs