This is my big batch file that i made to get the hang of how batch worked.
It's quite big, and it requires the correct enviroment to be set up. So running this batch file on your own computer would require reverse engeneering wath it needs, so don't try it.
NOTE: this file is based on the idea that "C:\Program Files\CwindowsMD" is a hidden location that has hidden files, if "C:\Program Files\CwindowsMD" is know, the security is compromised
, also, this batch file is to be converted to an exe so it cannot be viewed.
NOTE2: i wrote this file as a test for my brother, the task was to crack the password without triggering the penalty. the solution is a bruteforce that closes the program when it is in the ":minus" section. because, at this point you know the pass was incorrect, the Number of tries has been decreased by 1, but it will not be written to temp.bat for 2 seconds. So closing the program at this point is the key to breaking the security.
I hope someone learns something from this
@echo off
title Polles hideout
set systempass=lightning REM this sets the default pass to lightning, this pass will be overwritten if "temp.bat" is called
set NoT=1 REM this sets the number of password tries to default 1, this will be overwritten if "temp.bat" is called
CALL "C:\Program Files\CwindowsMD\batch-bestanden\temp.bat" REM this will set the saved password and the amount of tries left (if not found, it will use the 2 above commands)
;;
;; Pogingen
;;
:try
cls
if %NoT% EQU 0 goto close REM if you are out of password atempts, you will face penalty
echo set NoT=%NoT% >> "C:\Program Files\CwindowsMD\batch-bestanden\temp.bat" REM will save the number of atempts, so one cannot keep trying by restarting the batch file (can be circumvented)
echo U have %NoT% try(s) left
set /p check= Enter the password:
if %systempass% EQU %check% goto correct
if %systempass% NEQ %check% goto minus
;;
;;minus
;;
:minus
cls
set /a NoT=%NoT% -1 REM decreases number of tries by 1
echo WRONG!! Try again in 2 seconds.
ping localhost -n 2 -w 1000 > nul REM waiting 2 seconds (this breaks the security)
goto try
;;
;; correct
;;
:correct
cls
echo Correct password!! REM password correct, continue to options
ping localhost -n 1 -w 1000 > nul
goto options
;;
;; KEUZE KIEZER1
;;
:options
cls
echo options: "hidden"/"latest"/"NoTset"/"changepass"/"winsatfun"/"game1"/"game2"
set /p options= What do you want to do now?
if %options% EQU hidden goto hidden REM will open "C:\Program Files\CwindowsMD\"
if %options% EQU latest goto latest REM will open latest version of this batch file (non converted version)
if %options% EQU NoTset goto NoTset REM Change the number of tries for the next attempt
if %options% EQU changepass goto changepass REM change the password
if %options% EQU winsatfun goto winsatfun REM have fun using windows visualisation (works on vista, don't know about others)
if %options% EQU game1 goto game1 REM run 1st batch game
if %options% EQU game2 goto game2 REM run 2nd batch game, these games are not mine, so i won't post them here
goto optionswrong
:optionswrong
cls
echo That is not an available option REM obvious, returns to the option-select menu
echo select another option in 2 seconds
ping localhost -n 2 -w 1000 > nul
goto options
;;
;;
;;
;;
;;
;;
;;
;; optie1 (verborgen map openen)
;;
:hidden
cls
cd C:\Program Files\
start CwindowsMD
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
;;
;;
;;
;;
;;
;;
;;
;;
;; optie2 (laatste versie van password)
;;
:latest
cls
cd C:\Program Files\CwindowsMD\batch-bestanden
notepad password.bat
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
;;
;;
;;
;;
;;
;;
;; optie3 (NoTset)
;;
:NoTset
cls
echo please set the number of trys for the next login attempt
set /p RNoT= number of trys:
echo set NoT=%RNoT% >> "C:\Program Files\CwindowsMD\batch-bestanden\temp.bat"
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
;;
;;
;;
;;
;;
;;
;; optie4 (changepass)
;;
:changepass
cls
echo please type in the old password
set /p Oldsystempass= Old password:
if %Oldsystempass% NEQ %systempass% goto wrongpass
cls
echo please set the new password
set /p Newsystempass= New password:
set /p Newsystempass2= Confirm new password:
if %Newsystempass% NEQ %Newsystempass2% goto wrongpass
echo set systempass=%Newsystempass% >> "C:\Program Files\CwindowsMD\batch-bestanden\temp.bat"
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
;;
:wrongpass
cls
echo The 2 passwords did not match
echo Please try again in 2 seconds
ping localhost -n 2 -w 1000 > nul
goto changepass
;;
;;
;;
;;
;;
;;
;;
;;
;;
;;
;; optie5 (Winsat)
;;
:winsatfun
cls
set numberobj=
set Cnumber=
set texshader=
set texshader2=
set alushader=
set alushader2=
set totaltex=
set totaltex2=
set texnumber=
set texperobject=
set texperobject2=
set texperobjectnumber=
set noalpha=
echo Try out your own winsat visualisations!
echo HAVE FUN
set /p numberobj= please enter the number of objects:
set /p Cnumber= please enter the fatness of an object (1-100):
set /p texshader= Do you want to use texshader? (yes/no):
set /p alushader= Do you want to use alushader? (yes/no):
set /p totaltex= Do you want to set the totaltexture? (yes/no):
if %totaltex% EQU yes set /p texnumber=Set the totaltexture(1-100):
set /p texperobject= Do you want to set the texture per object? (yes/no):
if %texperobject% EQU yes set /p texperobjectnumber=Set the texture per object(1-100):
set /p noalpha= Do you want to use "noalpha"? (yes/no)
;;
;;
if %texshader% EQU yes (set texshader2=-texshader)
if %alushader% EQU yes (set alushader2=-alushader)
if %totaltex% EQU yes (set totaltex2=-totaltex %texnumber%)
if %texperobject% EQU yes set texperobject2=-texpobj C(%texperobjectnumber%)
if %noalpha% EQU yes (set noalpha2=-noalpha)
winsat d3d -objs C(%Cnumber%) -totalobj %numberobj% %texshader2% %alushader2% %totaltex2% %texperobject2% %noalpha2%
echo.
echo.
echo press any button to restart winsatfun
pause > nul
goto winsatfun
;;
;;
;;
;;
;;
;;
;;
;;
;;
;; AFSLUITEN
;;
:close
cd C:\Program Files\CwindowsMD\vbs\
start pop-uppassword.vbs REM runs a vb-script that pops up multiple windows to distract hacker
cd C:\Program Files\CwindowsMD\batch-bestanden\shutdown\
start shutdown.bat REM runs a shutdown batch file
exit
;;
;;
;;
;;
:game1
cd C:\Program Files\CwindowsMD\batch-bestanden\extra\
start Tic-Tac-Toe.bat
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
;;
;;
;;
;;
:game2
cd C:\Program Files\CwindowsMD\batch-bestanden\extra\
start dark_kingdoms_v1_2_1.bat
echo DONE!
echo Press any key to return to "option select"
pause > nul
goto options
The winsat testing part of the batch file. Try it out, it's really cool (run as admin)
@echo off
:winsatfun
cls
set numberobj=
set Cnumber=
set texshader=
set texshader2=
set alushader=
set alushader2=
set totaltex=
set totaltex2=
set texnumber=
set texperobject=
set texperobject2=
set texperobjectnumber=
set noalpha=
echo Try out your own winsat visualisations!
echo HAVE FUN
set /p numberobj= please enter the number of objects:
set /p Cnumber= please enter the fatness of an object (1-100):
set /p texshader= Do you want to use texshader? (yes/no):
set /p alushader= Do you want to use alushader? (yes/no):
set /p totaltex= Do you want to set the totaltexture? (yes/no):
if %totaltex% EQU yes set /p texnumber=Set the totaltexture(1-100):
set /p texperobject= Do you want to set the texture per object? (yes/no):
if %texperobject% EQU yes set /p texperobjectnumber=Set the texture per object(1-100):
set /p noalpha= Do you want to use "noalpha"? (yes/no)
;;
;;
if %texshader% EQU yes (set texshader2=-texshader)
if %alushader% EQU yes (set alushader2=-alushader)
if %totaltex% EQU yes (set totaltex2=-totaltex %texnumber%)
if %texperobject% EQU yes set texperobject2=-texpobj C(%texperobjectnumber%)
if %noalpha% EQU yes (set noalpha2=-noalpha)
winsat d3d -objs C(%Cnumber%) -totalobj %numberobj% %texshader2% %alushader2% %totaltex2% %texperobject2% %noalpha2%
echo.
echo.
echo press any button to restart winsatfun
pause > nul
goto winsatfun