Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding

    Loading CShell.dll and editing memory without injection

    I just had a very good idea, which I will not release here due to copying issues.

    I just needed to clarify one thing.

    Is it possible to use this code
    Code:
    GetModuleHandleA("CShell.dll")
    to edit the memory, just like the hacks do, BUT not with injecting a dll, from a separate process, a standalone .exe file.

    Thanks in advance.

  2. #2
    Brimir's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    357
    Reputation
    21
    Thanks
    281
    Thanks @~FALLEN~ for helping me
    Thanks @Shakai for helping me

    Other nice ppl:
    @258456
    @giniyat101

    My usefull posts:
    Byte scanner
    How to make a logger
    Hook example
    How to make a memhack base
    How to use classes with memhacking
    Addie finder

  3. #3
    giniyat101's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Not telling.
    Posts
    1,935
    Reputation
    130
    Thanks
    1,380
    My Mood
    Dead
    Good luck with that


     



    [img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]

  4. #4
    Brimir's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    357
    Reputation
    21
    Thanks
    281
    A dll is mutch beather
    Thanks @~FALLEN~ for helping me
    Thanks @Shakai for helping me

    Other nice ppl:
    @258456
    @giniyat101

    My usefull posts:
    Byte scanner
    How to make a logger
    Hook example
    How to make a memhack base
    How to use classes with memhacking
    Addie finder

  5. #5
    giniyat101's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Not telling.
    Posts
    1,935
    Reputation
    130
    Thanks
    1,380
    My Mood
    Dead
    Quote Originally Posted by Brimir View Post
    A dll is mutch beather
    yes ofc it is easier
    and just noticed
    @_corn_
    you cant use GetModuleHandle
    you have to use EnumProcessModules


     



    [img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]

  6. #6
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding
    Quote Originally Posted by giniyat101 View Post
    yes ofc it is easier
    and just noticed
    @_corn_
    you cant use GetModuleHandle
    you have to use EnumProcessModules
    would i use EnumProcessModules("CShell.dll") ?

    ---------- Post added at 06:39 AM ---------- Previous post was at 06:33 AM ----------

    I have researched GetModuleHandle, and it says that the module must have been loaded by the calling process, so it is not possible with GetModuleHandle. Can someone give me a piece of code that would get the handle to CShell.dll, from a separate process?

  7. #7
    Brimir's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    357
    Reputation
    21
    Thanks
    281
    I think you also need WriteProcessMemory.

    But how do you want to do this? We can give you 100s of function that you can use to get information or editing memmory xD
    Thanks @~FALLEN~ for helping me
    Thanks @Shakai for helping me

    Other nice ppl:
    @258456
    @giniyat101

    My usefull posts:
    Byte scanner
    How to make a logger
    Hook example
    How to make a memhack base
    How to use classes with memhacking
    Addie finder

  8. #8
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding
    ok lets explain.

    i want to do the same as a hack, so basically, get the handle for CShell, add on the addresss and addy, and write to that memory, just like in a hack dll. except from a separate exe file.

    also, what the hell is a wstring and what is it for?

  9. #9
    Fly3r's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Not telling.
    Posts
    720
    Reputation
    18
    Thanks
    265
    My Mood
    Paranoid
    Maybe i got it right..
    What you want to do is .. make an .exe that will handle Cshell so that you use the pointers / offsets to add the features you want like in a hack?
    Not sure if im correct
    Joined MPGH: 07/08/09


    i used to tell arrow to the knee jokes then i died due to blood loss from takeing tomany arrows to the knee at once
    A network problem caused by you? What did you do? Trip over the cable?




  10. #10
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    arrow in the knee
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  11. #11
    giniyat101's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Not telling.
    Posts
    1,935
    Reputation
    130
    Thanks
    1,380
    My Mood
    Dead
    Quote Originally Posted by _corn_ View Post
    would i use EnumProcessModules("CShell.dll") ?

    ---------- Post added at 06:39 AM ---------- Previous post was at 06:33 AM ----------

    I have researched GetModuleHandle, and it says that the module must have been loaded by the calling process, so it is not possible with GetModuleHandle. Can someone give me a piece of code that would get the handle to CShell.dll, from a separate process?
    sorry for not explaining before...

    here:
    Code:
    DWORD Crossfire = NULL;
    DWORD dwPID[100] = {NULL};
    DWORD CShell = NULL;
    HMODULE hModule[100] = {NULL};
    DWORD cbNeeded = NULL;
    char FileName[100] = {NULL};
    
    //lets find the crossfire.exe pid first
    //we will loop untill we can find it
    do
    {
    	//i will use EnumProcesses to retrive all opened processes pids
    	EnumProcesses(dwPID, 100, &cbNeeded);
    
    	//now lets check which one is Crossfire.exe
    	for (int i=0; i<100; i++)
    	{
    		//Open the process
    		HANDLE hProc = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, dwPID[i]);
    
    		//Get the executable name
    		GetProcessImageFileNameA(hProc, FileName, 100);
    
    		//no need for the handle now :P
    		ProcessClose(hProc);
    
    		//lets check the name we just got
    		if (!(stricmp(FileName, "crossfire.exe")))
    		{
    			//we got the pid
    			Crossfire = dwPID[i]
    		}
    	}
    
    	//just to lower the lag
    	Sleep(100);
    } while (Crossfire == NULL);
    
    //lets open the process again
    //this time i will use PROCESS_ALL_ACCESS access right because you are going to edit memory later ; )
    HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, Crossfire);
    
    //now lets find the CShell handle
    //again i will loop until i have this handle
    do
    {
    	//i will use EnumOricessModules to retrive all modules in the process
    	EnumProcessModules(hProc, hModule, 100, &cbNeeded);
    
    	//now lets check which one is CShell.dll
    	for (int i=0; i<100; i++)
    	{
    		//Get the module name
    		GetModuleBaseNameA(hProc, hModule[i], FileName, 100);
    
    		//lets check the name we just got
    		if (!(stricmp(FileName, "CShell.dll")))
    		{
    			//we got the handle
    			CShell = (DWORD)hModule[i];
    		}
    	}
    
    	//just to lower the lag
    	Sleep(100);
    } while (CShell == NULL);
    
    //you have just got the handle
    //you still want to use this method?
    //i hope you dont.. it seems very hard.. even for me..
    hope you like it

    ~EDIT~
    you can alse use the method you suggested (Finding window handle, finding process id)
    Last edited by giniyat101; 12-20-2011 at 12:33 AM.


     



    [img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]

  12. The Following User Says Thank You to giniyat101 For This Useful Post:

    _corn_ (12-21-2011)

  13. #12
    Code[VB]'s Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    CODER
    Posts
    608
    Reputation
    11
    Thanks
    702
    My Mood
    Bitchy
    Quote Originally Posted by giniyat101 View Post
    sorry for not explaining before...

    here:
    Code:
    DWORD Crossfire = NULL;
    DWORD dwPID[100] = {NULL};
    DWORD CShell = NULL;
    HMODULE hModule[100] = {NULL};
    DWORD cbNeeded = NULL;
    char FileName[100] = {NULL};
    
    //lets find the crossfire.exe pid first
    //we will loop untill we can find it
    do
    {
    	//i will use EnumProcesses to retrive all opened processes pids
    	EnumProcesses(dwPID, 100, &cbNeeded);
    
    	//now lets check which one is Crossfire.exe
    	for (int i=0; i<100; i++)
    	{
    		//Open the process
    		HANDLE hProc = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, dwPID[i]);
    
    		//Get the executable name
    		GetProcessImageFileNameA(hProc, FileName, 100);
    
    		//no need for the handle now :P
    		ProcessClose(hProc);
    
    		//lets check the name we just got
    		if (!(stricmp(FileName, "crossfire.exe")))
    		{
    			//we got the pid
    			Crossfire = dwPID[i]
    		}
    	}
    
    	//just to lower the lag
    	Sleep(100);
    } while (Crossfire == NULL);
    
    //lets open the process again
    //this time i will use PROCESS_ALL_ACCESS access right because you are going to edit memory later ; )
    HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, Crossfire);
    
    //now lets find the CShell handle
    //again i will loop until i have this handle
    do
    {
    	//i will use EnumOricessModules to retrive all modules in the process
    	EnumProcessModules(hProc, hModule, 100, &cbNeeded);
    
    	//now lets check which one is CShell.dll
    	for (int i=0; i<100; i++)
    	{
    		//Get the module name
    		GetModuleBaseNameA(hProc, hModule[i], FileName, 100);
    
    		//lets check the name we just got
    		if (!(stricmp(FileName, "CShell.dll")))
    		{
    			//we got the handle
    			CShell = (DWORD)hModule[i];
    		}
    	}
    
    	//just to lower the lag
    	Sleep(100);
    } while (CShell == NULL);
    
    //you have just got the handle
    //you still want to use this method?
    //i hope you dont.. it seems very hard.. even for me..
    hope you like it

    ~EDIT~
    you can alse use the method you suggested (Finding window handle, finding process id)
    nice but easy ... with vb you can make the same and can still use resice window with gdi methods

  14. #13
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding
    Quote Originally Posted by giniyat101 View Post
    sorry for not explaining before...

    here:
    Code:
    DWORD Crossfire = NULL;
    DWORD dwPID[100] = {NULL};
    DWORD CShell = NULL;
    HMODULE hModule[100] = {NULL};
    DWORD cbNeeded = NULL;
    char FileName[100] = {NULL};
    
    //lets find the crossfire.exe pid first
    //we will loop untill we can find it
    do
    {
        //i will use EnumProcesses to retrive all opened processes pids
        EnumProcesses(dwPID, 100, &cbNeeded);
    
        //now lets check which one is Crossfire.exe
        for (int i=0; i<100; i++)
        {
            //Open the process
            HANDLE hProc = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, dwPID[i]);
    
            //Get the executable name
            GetProcessImageFileNameA(hProc, FileName, 100);
    
            //no need for the handle now :P
            ProcessClose(hProc);
    
            //lets check the name we just got
            if (!(stricmp(FileName, "crossfire.exe")))
            {
                //we got the pid
                Crossfire = dwPID[i]
            }
        }
    
        //just to lower the lag
        Sleep(100);
    } while (Crossfire == NULL);
    
    //lets open the process again
    //this time i will use PROCESS_ALL_ACCESS access right because you are going to edit memory later ; )
    HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, Crossfire);
    
    //now lets find the CShell handle
    //again i will loop until i have this handle
    do
    {
        //i will use EnumOricessModules to retrive all modules in the process
        EnumProcessModules(hProc, hModule, 100, &cbNeeded);
    
        //now lets check which one is CShell.dll
        for (int i=0; i<100; i++)
        {
            //Get the module name
            GetModuleBaseNameA(hProc, hModule[i], FileName, 100);
    
            //lets check the name we just got
            if (!(stricmp(FileName, "CShell.dll")))
            {
                //we got the handle
                CShell = (DWORD)hModule[i];
            }
        }
    
        //just to lower the lag
        Sleep(100);
    } while (CShell == NULL);
    
    //you have just got the handle
    //you still want to use this method?
    //i hope you dont.. it seems very hard.. even for me..
    hope you like it

    ~EDIT~
    you can alse use the method you suggested (Finding window handle, finding process id)
    Thanks.

    ---------- Post added at 09:14 AM ---------- Previous post was at 09:13 AM ----------

    Quote Originally Posted by Fly3r View Post
    Maybe i got it right..
    What you want to do is .. make an .exe that will handle Cshell so that you use the pointers / offsets to add the features you want like in a hack?
    Not sure if im correct
    yes thats right

    ---------- Post added at 09:19 AM ---------- Previous post was at 09:14 AM ----------

    thanks everyone.

    just to clarify, is an address the thing you add to CShell, and offset the thing you add in the loop ( usually 4)?? and does addy = address?

    @giniyat101 what do i include for GetProcessImageFileNameA ?
    Last edited by _corn_; 12-21-2011 at 01:40 PM.

  15. #14
    giniyat101's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Not telling.
    Posts
    1,935
    Reputation
    130
    Thanks
    1,380
    My Mood
    Dead
    @_corn_
    #include <psapi.h>

    sorry for forgetting


     



    [img]https://i43.photobucke*****m/albums/e367/DeteSting/Steam-update.gif[/img]

  16. #15
    _corn_'s Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    0x0C482BF2
    Posts
    673
    Reputation
    13
    Thanks
    294
    My Mood
    Brooding
    Quote Originally Posted by giniyat101 View Post
    @_corn_
    #include <psapi.h>

    sorry for forgetting
    lol tried that but it says

    GetProcessImageFileNameA was not declared in this scope.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Tutorial] How to unpack CShell.dll and find addies
    By al3xman in forum CrossFire Tutorials
    Replies: 35
    Last Post: 07-26-2012, 07:21 AM
  2. [Tutorial] Unpack CShell.DLL and finding Addyes
    By SteamAss in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 20
    Last Post: 05-25-2011, 12:57 PM
  3. Dumped EHSvc.dll and CShell.dll 19/5 2010
    By Mr.Magicman in forum Combat Arms EU Hack Coding/Source Code
    Replies: 5
    Last Post: 03-10-2011, 01:55 PM
  4. Meh problem loading Cshell.dll
    By why06 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 9
    Last Post: 04-06-2010, 01:21 AM
  5. lol how do you use engine.rar and cshell.dll
    By czudej in forum Combat Arms Hacks & Cheats
    Replies: 6
    Last Post: 01-17-2009, 06:18 PM