snooz Posted January 12, 2008 Posted January 12, 2008 (edited) Normal process usually entails hex editing sfc_os.dll. I am testing SP3 RC1 and I could not find anyone who had hacked it yet. Searching the net I found a guy who figured out a way to make XP think it was in safe mode thus SFC/WMP is disabled. The cool thing about this hack is no matter what previous or future version you are running WFP can be disabled in the same manner. Using the hex editor method the values constantly change. He also found out a way to enable the security tab when your machine is not a member of a domain.FYI just in case:rshx32.dll = Security tabsfc_os.dll = WFPCredit goes to Neowinian on neowin.net forums for the solution:Here's how to make the Windows XP file system think it's in safe mode. This will disable Windows File Protection, and also add the Security tab when you right-click on a file in Explorer and select Properties.Step 0: XP ships with a simple hex editor called DEBUG.EXE that is required for this procedure. If you deleted it, put it back in the windows\system32 directory -- you can remove it afterwards if you wish.Step 1: Click Start>Run, type in SERVICES.MSC and press the <enter> key. Find the entry labeled Cryptographic Services and double-click it. Change the startup type to Disabled and click Apply, then click the Stop button, and then click OK. (Note: if you already had Cryptographic Services disabled, omit this step as well as step 8.)Step 2: Open a CMD.EXE Command Prompt window and type the following commands:cd \windows\system32ren rshx32.dll rshx32.oldren sfc_os.dll sfc_os.oldYou will probably receive warning messages from Windows File Protection after each REN command. Make sure to select the options to ignore the warning and allow the files to be renamed.Step 3: Type the following commands:cd \del rshx32.dll /sdel sfc_os.dll /scd \windows\system32copy rshx32.old rshx32.dllcopy sfc_os.old sfc_os.dllIMPORTANT!!! You MUST rename the files in Step 2 before you can copy them in Step 3, or this procedure will not work!Step 4: Type the following command:DEBUG rshx32.dllYou'll now have a minus-sign as a prompt. Type the following command:S 100 8000 74 00 5C 00 4FDEBUG will return a line of the form:0ADE:0AC0The four-character letter-number combination after the colon is what you must enter in the command below. Now type the following three commands:E 0AC0 74 00 00 00 4F (use the value returned to you above and not 0AC0!!!)WQStep 5: Type the following command:DEBUG sfc_os.dllYou'll now have a minus-sign as a prompt. Type the following command:S 100 8000 74 00 5C 00 4FDEBUG will return a line of the form:0ADE:0AC0The four-character letter-number combination after the colon is what you must enter in the command below. Now type the following three commands:E 0AC0 74 00 00 00 4F (use the value returned to you above and not 0AC0!!!)WQStep 6: Type the following commands:copy rshx32.dll dllcachecopy sfc_os.dll dllcacheStep 7: Close the Command Prompt window, open Regedit, and go to the following key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBootCreate a new DWORD value called OptionValue and give it a value of 1. Close Regedit.Step 8: Run the SERVICES.MSC program, select Cryptographic Services, change the startup type to Manual, and click Apply. Do not start the service! (Note: omit this step if Cryptographic Services was disabled before you began this procedure.)Step 9: Reboot your system.That's it! You will now have the security tab at all times, and Windows File Protection will be disabled. If you would like to remove the tab and re-enable Windows File Protection, use Regedit to change OptionValue to 0, and then reboot your system. The method used to patch RSHX32.DLL and SFC_OS.DLL should work on any version of the file, including future versions issued in upcoming service packs or hotfixes.Please note that if you apply these patches, they will take precedence over safe mode. This means that you must first set OptionValue to 1 in the registry before you boot into safe mode in order to see the security tab and to have Windows File Protection disabled. Edited January 12, 2008 by snooz
kickarse Posted January 12, 2008 Posted January 12, 2008 (edited) Nice guide... just curious on if WFPSwitch still works? I haven't needed to use it because of my Nlited cd's and I'm not getting the error post sp3.WFPswitch.exe Edited January 12, 2008 by kickarse
jdoe Posted January 13, 2008 Posted January 13, 2008 For those who were using my patched SFC_OS.DLL (WFP disabled permanently without dealing with the registry) just post the latest SFC_OS.DLL from SP3 and I'll patch it.I'm curious to see how Microsoft did try to avoid us from disabling it this time
GrofLuigi Posted January 13, 2008 Posted January 13, 2008 This is the Internet's word of mouth... a very dangerous thing. Here is the original (?) article about getting the Security tab appear in XP home. Notice it suggests naming it OptionValuf to differ from the original.Rshx32.dll is patched... but what about the others? Are you ready to patch your whole OS? Not to mention that I still fail to comprehend how this dll relates to SFC... But maybe that's just me. Or THAT is the method that the author has discovered. But I wouldn't risk to patch it on a live system (while I don't have that problem with sfc_os.dll).I haven't tried this tweak and don't recommend it to anyone. All I know is, last time I created an OptionValue in the registry (I like to tinker with Regmon a lot, and I saw many applications were trying to read it) I lost my soundcard and other drivers. I believe this is the value that gets set when you choose which flavor of Safe Mode you want - with networking, etc... And by the way, many drivers don't start in safe mode.So... do you really want to be constantly in safe mode?GL
GrofLuigi Posted January 13, 2008 Posted January 13, 2008 To back up my claims, here's a list of files in system32 folder that query the OptionValue entry:advapi32.dllcredui.dllcscdll.dlldhcpmon.dllfilemgmt.dllkernel32.dlllocalsec.dlllsasrv.dllmsgina.dllmsv1_0.dllnetcfgx.dllnetid.dllntdll.dllntkrnlpa.exentoskrnl.exentshrui.dllpautoenr.dllrshx32.dllsamsrv.dllservices.exesfc_os.dllsmlogcfg.dllsmss.exesyssetup.dllwinlogon.exeFound through searching unicode strings. There may be others, this is a heavily nLited system.It seems this is an (undocumented by Microsoft?) way of determining if we're in safe mode or not.GL
mhc Posted January 14, 2008 Posted January 14, 2008 (edited) Since I was the "Neowinian" who originally posted the above patches, I'm wondering why the OP didn't put a link to my post (don't care about credit per se, but this seems like "ripping").Anyway, to GrofLuigi...note that this patch moves "OptionValue" in the two DLLs toHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBootfromHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\Optionand effectively gives the user control over operation of the Security tab and WFP. By setting OptionValue to 1, you see the Security tab and WFP is disabled. By setting it to 0, WFP is enabled and the Security tab disappears. The possible downside is that the patched OptionValue now takes precedence over Safe Mode for these two functions -- which for my purposes is no downside whatsoever, but it might be a problem for others. I also documented this possible downside in the patch posted above.All other DLLs will respect the OptionValue that XP puts inHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\Optionwhen it loads in Safe Mode. Edited January 14, 2008 by mhc
snooz Posted January 14, 2008 Author Posted January 14, 2008 Since I was the "Neowinian" who originally posted the above patches, I'm wondering why the OP didn't put a link to my post (don't care about credit per se, but this seems like "ripping").Some boards don't like linking to other sites. I mentioned your name and the board that is not "ripping". Shows a lot about you since I praised your work and gave you credit.
mhc Posted January 14, 2008 Posted January 14, 2008 Please read your post again...my name was never mentioned, and that, combined with the lack of a link, was why I reacted as I did. So for the record, here is the link to my post on Neowin which was "quoted" above.http://www.neowin.net/forum/index.php?showtopic=600928
gosh Posted January 14, 2008 Posted January 14, 2008 This has been documented by Microsoft. I've known about this since xp came out but saw no need to do this. Fooling the operating system to think it's in safe mode could cause unforseen problems that i would rather avoid. This is the poor man's hex editing-gosh
mhc Posted January 15, 2008 Posted January 15, 2008 (edited) Wow. Where do I begin. Oh yeah, I know. Have you ever looked at the hex code in RSHX32.DLL or SFC_OS.DLL? I have, and what I did above is a FAR better way to hack these programs than, for example, finding the mysterious "-63" check in SFC_OS.DLL. Are you aware that SFC_OS.DLL does a simple check for safe mode just like it does a simple check for -63? And that RSHX32.DLL checks for safe mode for the sole reason to determine whether to display the Security tab in XP Home? And that for these reasons, the above patches affect no other operation in XP?Geez, these patches aren't like eliminating core XP components that can break the most popular programs sold in the marketplace...it's just altering simple checks in two DLLs!I would be reacting differently if you actually TRIED the hacks and found problems with them. Right now you're shooting from the hip with statements that IMO have no basis in reality.Oh, FWIW, what I did above is hex editing. And what you call hex editing is also fooling the operating system as much as what I did above. The difference is that the above way is a better solution, period, than attempting to hack actual code since it is version-independent. And since the registry value set by NTOSKRNL.EXE to signify safe mode is checked by so many DLLs when they are loaded, that value will not change at this point in XP, so hacking that location in SFC-OS.DLL and RSHX32.DLL will remain valid for the remainder of XP's life. Edited January 15, 2008 by mhc
Fyyre Posted January 18, 2008 Posted January 18, 2008 sfc_os.dll: Change the xor eax,eax inc eax to nop nop nop at offset EC95, EC96, EC97:33C041 to 909090
jdoe Posted January 21, 2008 Posted January 21, 2008 (edited) sfc_os.dll: Change the xor eax,eax inc eax to nop nop nop at offset EC95, EC96, EC97:33C041 to 909090Fyyre,I don't know where you got that but it's not good."xor eax, eax" and "inc eax" should be 33C040 not 33C041And at offset EC95 there is no "xor eax, eax" but "xor ecx, ecx" which is 33C9-----------------------To permanently disable Windows File Protection - Windows XP Pro SP3 (5.1.2600.3264)Without using the registry.At offset EC84, replace 83F89D7508 by 3BC0EB3290cmp eax, FFFFFF9Djne 76C6F891bycmp eax, eaxjmp 76C6F8BA sfc_os.zip Edited January 21, 2008 by jdoe
Fyyre Posted January 21, 2008 Posted January 21, 2008 >I don't know where you got that but it's not good.Hi,I have version 3244. Since there is no such cmp eax, 0xFFFFF9D in its sfc_os.dll - that explains a lot =oI'm using the wu registry patch from connect.microsoft.com, you? (in regards to SP build number...)
jdoe Posted January 21, 2008 Posted January 21, 2008 I have version 3244. Since there is no such cmp eax, 0xFFFFF9D in its sfc_os.dll - that explains a lot =oI thought it was for SP3 RC1 but anyway, there is a typo mistake somewhere
snooz Posted January 27, 2008 Author Posted January 27, 2008 (edited) Please read your post again...my name was never mentioned, and that, combined with the lack of a link, was why I reacted as I did. So for the record, here is the link to my post on Neowin which was "quoted" above.http://www.neowin.net/forum/index.php?showtopic=600928WrongCredit goes to Neowinian on neowin.net forums for the solution:What I find ironic is you are taking credit for the solution when as someone else pointed out that Microsoft released it. Your accusing me of not giving credit when you are the one guilty of it.I appreciate the solution none the less. Edited January 27, 2008 by snooz
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now