Click here to Skip to main content
6,291,722 members and growing! (12,780 online)
Email Password   helpLost your password?
General Reading » Hardware & System » Registry     Intermediate

Hide String value from Regedit by Hooking the RegEnumValueW API

By H. Joseph

This Article shows how to hide a string value from Regedit
VC6, VC7WinXP, Dev
Posted:5 Dec 2001
Views:70,468
Bookmarked:13 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
14 votes for this article.
Popularity: 2.55 Rating: 2.22 out of 5
1 vote, 33.3%
1

2

3

4
2 votes, 66.7%
5

Introduction

This Article Explains how to hide a registry string from regedit by hooking the RegEnumValueW API, In this article there is a Function that hooks APIs called HookAPICalls. I am not the author of that function - I got it from some website whose name I forget. Thanks to the author of that function. The function that replaces the RegEnumValueW is given below .

LONG MyRegEnumValue(HKEY hKey,           
                    DWORD dwIndex,       
                    LPWSTR lpValueName,  
                    LPDWORD lpcValueName,
                    LPDWORD lpReserved,  
                    LPDWORD lpType,      
                    LPBYTE lpData,       
                    LPDWORD lpcbData)
{
   LONG ret;

   RegEnumValueWtype oldfn=(RegEnumValueWtype)RegDLL_Hooks.Functions [0].OrigFn;

   char ss[10];
   ret=oldfn(hKey,dwIndex,lpValueName,lpcValueName,lpReserved,lpType,lpData,lpcbData);
   WideCharToMultiByte(CP_ACP, 0,lpValueName,
                            -1,
                            ss,
                            10,
                            NULL, NULL);
   if (strstr(ss,"hirosh")!=NULL)
      return 1;
   else
      return ret;
}

This function simply checks the string "hirosh" from the lpValueName and if found it will return a 1. That means the the function has not completed successfully, so regedit will not display any string that contains the word "hirosh". 

API hooking is a powerful tool. To use this we can also hide files, processed from OS. However, I don't know which APIs must be hooked to achieve this. If anybody knows this please help me. 

I check this program on Windows XP. regedit is OK but when I take msconfig it displays an error. I don't know what is the problem so if anybody knows this please help me. I am not experienced in API hooking so I am just experiment with this.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

H. Joseph


Member

Location: United States United States

Other popular Hardware & System articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 20 of 20 (Total in Forum: 20) (Refresh)FirstPrevNext
GeneralI need help please Pinmemberrabih_saleh3:47 24 Apr '07  
Generalihelp Pinmembercgf993:06 27 Mar '06  
GeneralRe: ihelp Pinmembercgf993:14 27 Mar '06  
GeneralWindows 2003 Platform Pinmembertocsjung0:08 14 Jul '05  
Generalcalling callbacks PinmemberK-ballo16:57 22 Aug '04  
Generalhow to add new functions to be hooked PinsussAnonymous13:51 28 Apr '04  
GeneralI have a question. Pinmembertocsjung19:05 22 Dec '03  
GeneralRe: I have a question. Pinmembercgf993:09 27 Mar '06  
GeneralOnly with dll Pinmemberxxcyberguruxx8:20 1 Oct '03  
GeneralRe: Only with dll PinmemberDr. Fred7:45 10 Nov '03  
GeneralFreeing this dll PinmemberRohit Divas0:53 23 Sep '03  
GeneralSolution to the msconfig problem PinmemberTim Kosse10:30 8 Dec '01  
GeneralRe: Solution to the msconfig problem Pinmemberhirosh5:25 9 Dec '01  
GeneralRe: Solution to the msconfig problem Pinmemberhirosh16:04 24 Dec '01  
GeneralRe: Solution to the msconfig problem PinsussAnonymous0:03 29 May '03  
GeneralRe: Security issue Pinmemberbla22:07 10 Dec '01  
GeneralRe: Security issue PinmemberTim Kosse22:26 10 Dec '01  
GeneralRe: Security issue Pinmemberbla22:27 11 Dec '01  
GeneralRe: Security issue Pinmemberyyt_hac4:50 24 Dec '01  
GeneralRe: Security issue Pinmemberhir15:58 24 Dec '01  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 5 Dec 2001
Editor: Chris Maunder
Copyright 2001 by H. Joseph
Everything else Copyright © CodeProject, 1999-2009
Web09 | Advertise on the Code Project