prosoft Posted August 26, 2009 Report Posted August 26, 2009 You must find a batch command to disable in windows xp sp2 the DEP (Data Execution Prevention) service.The command must be executed from Start>Run>cmd or from a batch file (.bat) like other command (eg: netsh firewall show config, netstat ..) Quote
prosoft Posted August 28, 2009 Author Report Posted August 28, 2009 (edited) Must say that we have a possible winner nosph3rat...please demonstrate that you can do this from a batch file (.bat) without any keyboard pressing, with a normal execution of batch, and you will be graduate for this. Edited August 28, 2009 by prosoft Quote
cmiN Posted August 29, 2009 Report Posted August 29, 2009 The script have two options:E - Enable Data Execution PreventionD - Disable Data Execution PreventionAnd the Batch http://pastebin.com/f42125692@echo off:: 29.08.2009 <> 29.08.2009 | cmiN:: Challenge [Batch] Bcc DEP [prosoft] @ rstcenter.com:maincd %systemroot%cd ..echo E - Enable Data Execution Preventionecho D - Disable Data Execution Preventionset /p answer=if "%answer%"=="E" ( set status=noexecute goto replace )if "%answer%"=="D" ( set status=execute goto replace)echo Invalid option!pause >nulexit:replacetype nul>boot.tmpfor /f "tokens=1,2* delims==" %%a in (boot.ini) do ( if "%%b"=="" ( echo %%a>>boot.tmp ) else ( for /f "tokens=1,2 delims=/" %%x in ("%%b") do ( if "%%y"=="noexecute" ( if "%%c"=="" ( echo %%a=%%x/%status%>>boot.tmp ) else ( echo %%a=%%x/%status%=%%c>>boot.tmp ) ) else ( if "%%y"=="execute" ( if "%%c"=="" ( echo %%a=%%x/%status%>>boot.tmp ) else ( echo %%a=%%x/%status%=%%c>>boot.tmp ) ) else ( if "%%c"=="" ( echo %%a=%%b>>boot.tmp ) else ( echo %%a=%%b=%%c>>boot.tmp ) ) ) ) ))attrib -s -h -r boot.inidel boot.ini /f /qren boot.tmp boot.iniattrib +r +h +s boot.iniecho Ready.pause >nulexitIf you want to do this without pressing a key delete from lines [10:23].But I can't believe it's so easy in Python:import osos.chdir(os.getenv("systemroot")[:3])os.system("attrib -s -h -r boot.ini")with open("boot.ini", "r") as f: x = f.read().replace("noexecute", "execute") open("boot.ini", "w").write(x)os.system("attrib +r +h +s boot.ini") Quote
prosoft Posted August 29, 2009 Author Report Posted August 29, 2009 The batch script doesn't work on W2K,XP-SP2, please attach the .bat file that you have run'it Quote
cmiN Posted August 30, 2009 Report Posted August 30, 2009 Put the code in a .bat text file and 100% will work from any path, I have xp sp3 and I don't think to be a major difference. I've tested manually! Quote