| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| are How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 26 Sep 2015
 Posts: 3
 
 
 | 
			
				|  Posted: Sat Oct 10, 2015 10:35 pm    Post subject: [C++] How would I make a internal signature scan? |   |  
				| 
 |  
				| I'm trying to edit memory internally (C++), aka inject a .dll and scan for the signature, but I don't know where to actually start. Any tips, links, or code to help me out? Thanks, in advance. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| ulysse31 Master Cheater
 
 ![]() Reputation: 2 
 Joined: 19 Mar 2015
 Posts: 324
 Location: Paris
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| atom0s Moderator
 
  Reputation: 205 
 Joined: 25 Jan 2006
 Posts: 8587
 Location: 127.0.0.1
 
 | 
			
				|  Posted: Sun Oct 11, 2015 12:14 pm    Post subject: |   |  
				| 
 |  
				| The most common and used method is the old FindPattern from d0m1n1k and Patrick from GameDeception: 
  	  | Code: |  	  | /**
 * @brief Compares a pattern against a given memory pointer.
 *
 * @param lpDataPtr     The live data to compare with.
 * @param lpPattern     The pattern of bytes to compare with.
 * @param pszMask       The mask to compare against.
 *
 * @return True if pattern was found, false otherwise.
 */
 bool MaskCompare(const unsigned char* lpDataPtr, const unsigned char* lpPattern, const char* pszMask)
 {
 for (; *pszMask; ++pszMask, ++lpDataPtr, ++lpPattern)
 {
 if (*pszMask == 'x' && *lpDataPtr != *lpPattern)
 return false;
 }
 return (*pszMask) == NULL;
 }
 
 /**
 * @brief Locates a signature of bytes using the given mask within the given module.
 *
 * @param lpData        The data to scan for the pattern within.
 * @param size          The size of the data to scan within.
 * @param lpPattern     The pattern of bytes to compare with.
 * @param pszMask       The mask to compare against.
 *
 * @return Start address of where the pattern was found, NULL otherwise.
 */
 unsigned int FindPattern(const unsigned char* lpData, unsigned int size, const unsigned char* lpPattern, const char* pszMask)
 {
 for (size_t x = 0; x < size; x++)
 {
 if (MaskCompare(lpData + x, lpPattern, pszMask))
 return ((unsigned int)lpData + x);
 }
 return 0;
 }
 | 
 _________________
 
 - Retired. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| are How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 26 Sep 2015
 Posts: 3
 
 
 | 
			
				|  Posted: Mon Oct 12, 2015 8:00 am    Post subject: |   |  
				| 
 |  
				| How would I implement virtualquery into the FindPattern function? |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| atom0s Moderator
 
  Reputation: 205 
 Joined: 25 Jan 2006
 Posts: 8587
 Location: 127.0.0.1
 
 | 
			
				|  Posted: Mon Oct 12, 2015 12:20 pm    Post subject: |   |  
				| 
 |  
				| I've already given you one chunk of code, if you are unsure how to continue forward with it, then perhaps you should learn what you are doing. I'm not going to spoon feed you more then that. _________________
 
 - Retired. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| STN I post too much
 
  Reputation: 43 
 Joined: 09 Nov 2005
 Posts: 2676
 
 
 | 
			
				|  Posted: Mon Oct 12, 2015 1:13 pm    Post subject: |   |  
				| 
 |  
				|  	  | are wrote: |  	  | How would I implement virtualquery into the FindPattern function? | 
 
 Seriously ? You can't still do this after watching the video ?.
 
 If you're this lazy, just google for signature scanning tutorials or sigscan code c++ and you can probably find code you can leech without understand a word of it.
 
 I don't understand why are people so interested in taking shortcuts these days, i used to enjoy learning new things and learning c++ for the first time was kind of a high, now all the languages seems the same and the novelty isn't there nor the fun. Maybe thats just me and i am not even nerdy to begin with
 _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |