The most simple code that will run ?

Posts 1–15 of 28 · Page 1 of 2
The most simple code that will run ?
Hi, i'm pretty new at hacking, i learnt how to make injectors, now i'm trying to make my own hack...
So i need a sort explanation what a hack need to run ?
I will try to make it in C#, its my problem, dont post "It wont work, blah, blah, blah...."

So if someone can make the most simple code that will run (no functions, no key-checking, no messagebox, no pointers, no addys, nothing else), the only requiements that if i inject it, it will run, without any Xtrap error...

Maybe a simple MessageBox.Show()

And:
-Dont post: "It wont work, balh, balh, blah"
-Dont post: "Nobody will help you" cuz not everyone so asshole like you...

Why i need ?
Because i dont know wich methods will be called from the DLL files, or how will they run...


Also, if you will start QQing "Leech, or anything idiot"
I know, how to Pointer-Write, or how modify the game's memory, if my process has started... But i have to know, how they start...
Thanks for help...
well is hard to make it in C# u can make Hack's on C++ i am sure some one will help ya out
Quote Originally Posted by nageeb200 View Post
well is hard to make it in C# u can make Hack's on C++ i am sure some one will help ya out
You can show the code in C#, c++, VB, or any program lang...
I have brain.exe and enought english knowledge to figure out, whats is what in the other prog. lang...
Look I am not gonna give the whole source code
First YOu Have to Write It In C++ (the easiest way )
include the header files
Write You Hack THread
Try To Catch The CShell.dll ( i am using GetModuleHandle("CShell.dll") )
Get The Pointers
Write Your Hack Memory (I Mean By This The Features)
{like if(weaponmgr)
{
for(int i >= 0 ; i++)
and so on
Then Put This
UINT WIAPI Blablabla
{
here call your thread
}

Then Finally Put The DLL Main

GL
Quote Originally Posted by sobasoba13 View Post
Look I am not gonna give the whole source code
First YOu Have to Write It In C++ (the easiest way )
include the header files
Write You Hack THread
Try To Catch The CShell.dll ( i am using GetModuleHandle("CShell.dll") )
Get The Pointers
Write Your Hack Memory (I Mean By This The Features)
{like if(weaponmgr)
{
for(int i >= 0 ; i++)
and so on
Then Put This
UINT WIAPI Blablabla
{
here call your thread
}

Then Finally Put The DLL Main

GL
so
1; I catch the ModuleHandle of CSHELL.DLL -- its ok..
2; Pointers, and internal memory editing is -- its ok too...

But, i'm using C#

-------------------------------------------------------------------------------------
So the things i still on cloud:

Code:
if (pWeaponMgr)
it means, if its not null ? In C# we cant use if (intType)

I converted to C# (if i know good the data types)
Code:
uint  Blablabla()
{
here call your thread
}
Call my Thread, you mean With the assembly
Code:
_asm { CALL THREAD }
wich is
Code:
Assembly.Load(" CALL THREAD ");
in C# if i know good...

or a very simple
Code:
Thread();
I Call the Thread wich is doing the hacking things?
like
Code:
HackThread()
{
   while(true)
   {
         hacking, Hacking, Hacking, Blah, blah, blah
   }
}
DllMain is a thing wich is dont exist in C#, so i have to invent some sort of a trick, maybe with a special injector...

Anyway thanks so much for your help...

As you see, i'm not a leecher / Copy-paster... Just a newbie :|

------------------------------------------------------------------------------------------------
C++ undetected base

#include < Windows.h >
#include < Process.h >

#define WeaponMgr 0xCB9984
#define NoReload 0xC38

void Memory ()
{
while ( 1 )
{
if(GetModuleHandleA("CShell.dll") && GetModuleHandleA("ClientFx.fxd"))
{
DWORD dw_CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD dw_WeaponMgr = *(DWORD*)(dw_CShell + WeaponMgr);
if(dw_WeaponMgr)
{
for (int i = 0; i < 746; i++)
{
DWORD rWeapon = *(DWORD*)(dw_WeaponMgr + 4*i);
{
if(rWeapon)
{
for (int y = 0; y < 9; y++)
{
*(float*)(rWeapon + NoReload) = 0;
}
}
}
}
}
UINT WINAPI Call(LPVOID)
{
_asm CALL Memory;
}

BOOL WINAPI DllMain ( HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved )
{
if (dwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hDll);
_beginthreadex(NULL, NULL, Call, NULL, NULL, NULL);
}
return TRUE;
}
Quote Originally Posted by ramo View Post
C++ undetected base

#include < Windows.h >
#include < Process.h >

#define WeaponMgr 0xCB9984
#define NoReload 0xC38

void Memory ()
{
while ( 1 )
{
if(GetModuleHandleA("CShell.dll") && GetModuleHandleA("ClientFx.fxd"))
{
DWORD dw_CShell = (DWORD)GetModuleHandleA("CShell.dll");
DWORD dw_WeaponMgr = *(DWORD*)(dw_CShell + WeaponMgr);
if(dw_WeaponMgr)
{
for (int i = 0; i < 746; i++)
{
DWORD rWeapon = *(DWORD*)(dw_WeaponMgr + 4*i);
{
if(rWeapon)
{
for (int y = 0; y < 9; y++)
{
*(float*)(rWeapon + NoReload) = 0;
}
}
}
}
}
UINT WINAPI Call(LPVOID)
{
_asm CALL Memory;
}

BOOL WINAPI DllMain ( HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved )
{
if (dwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hDll);
_beginthreadex(NULL, NULL, Call, NULL, NULL, NULL);
}
return TRUE;
}

It's going to give xtrap I THink
Quote Originally Posted by sobasoba13 View Post
It's going to give xtrap I THink
I think, if i convert to C# it will have very different working method, we'll see
@ramo

Thanks so much, but could be better in PM to prevent unwanted leeching...


---------- Post added 12-25-2012 at 12:01 AM ---------- Previous post was 12-24-2012 at 11:48 PM ----------

@sobasoba13

Some Question for the converting
What data type is "WINAPI"
I see it is a permission marker
in C# there are:
Code:
public - Accessible from everywhere

Example:
ClassName LoL = new ClassName()
LoL.PublicMethod();

static - The owner class isnt need to be declared to use...

Example:
ClassName.StaticMethod();

Static and public can be combined...

private - the opposite of public, the method only accessible from the owner class...
Can you tell me wich is the WINAPI ?


Wich data type is "LPVOID" its a void pointer ?

Also there is "HINSTANCE" i completely dont have idea what is this :/

I'm also completed the conversion, just need som information...
Thanks for help...
---------------------------------------------- Edit ------------------------------------------
So, if i did everything fine, here is the memory code, converted into C#
Code:
#region Pointer-ek
        public IntPtr WeaponMgr = (IntPtr)0xCB9984;
        #endregion

        #region Offset-ek
        public IntPtr NoReload =  (IntPtr)0xC38;
        #endregion

        void Memory ()
        {
            while ( true )
                {
                    if( GetModuleHandleA("CShell.dll") != null && GetModuleHandleA("ClientFx.fxd") != null )
                    {
                        IntPtr dw_CShell = (IntPtr)GetModuleHandleA("CShell.dll");
                        IntPtr dw_WeaponMgr = *(IntPtr*)(IntPtr.Add(dw_CShell, (int)WeaponMgr));
                        if(dw_WeaponMgr != null)
                        {
                            for (int i = 0; i < 746; i++)
                            {
                                IntPtr rWeapon = *(IntPtr*)(dw_WeaponMgr + 4 * i);
                                {
                                    if(rWeapon != null)
                                    {
                                        for (int y = 0; y < 9; y++)
                                        {
                                            *(float*)(IntPtr.Add(rWeapon, (int)NoReload)) = 0;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
        }
Like you said, I'm not quite sure whether .dlls coded in C# are even close to .dlls coded in C++ - you could just use an application to change the memory then

Quote Originally Posted by rabir007 View Post
Also there is "HINSTANCE" i completely dont have idea what is this :/
http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Quote Originally Posted by Biesi View Post
Like you said, I'm not quite sure whether .dlls coded in C# are even close to .dlls coded in C++ - you could just use an application to change the memory then


Windows Data Types (Windows)
Thanks, i found, its the IntPtr in C#
Someone told me C# hacks are possible, but if i remember good, i need a special injector wich start th needed routine in the target process...
DllMain isn't exist in C#
Quote Originally Posted by rabir007 View Post
DllMain isn't exist in C#
Why would you create a .dll, create a normal executable
Quote Originally Posted by Biesi View Post


Why would you create a .dll, create a normal executable
WriteProcessMemory / ReadProcessMemory isnt detected by Xtrap ?
Quote Originally Posted by rabir007 View Post


WriteProcessMemory / ReadProcessMemory isnt detected by Xtrap ?
I think it is
Quote Originally Posted by Biesi View Post


I think it is
Then how i would edit the memory with an external program ?
Posts 1–15 of 28 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us