Hide some of the payload menu entries
We can stop any file from being listed as a payload in E2B by using a .txt file and the iftitle test feature. For instance, we can test for the environment variable 'SECRET' and if it does not exist then the menu entry will not be shown...
\_ISO\WNDOWS\WIN10\Win1032.txt
iftitle [if exist SECRET] Windows 10 English International (32-bit)\n My Secret ISO
We can set the SECRET variable using a hotkey + password.
In the example below, if you type CTRL+F9 (in any menu) then a blank screen will appear with a password prompt.
You can then type the password EASY (in capital letters), and the hidden menu items will then magically appear in the E2B menus!
To make them disappear again, type CTRL+F9 again and press ENTER instead of entering the correct password. Or you could define a CTRL+F10 key to hide them all again more quickly (see below). Another alternative is to reload the Main menu again from the Main menu by pressing F8.
In addition, you could also set the Hidden and System Attributes to hide the files from Windows users.
Here is how to set this up...
1. Add this single line to your \_ISO\MyE2B.cfg file (if you don't have one already then start the MyE2B.cfg text file with !BAT as the first line). Change the password EASY (shown in red below) to whatever password you want to use...
()/%grub%/hotkey [Ctrl+F9] "clear && echo -e \nSecret Menu\n===========\n\n && set SECRET= && password EASY && set SECRET=1 ;; configfile (md)0x3000+0xA0" > nul
e.g. #2
\_ISO\MAINMENU\WinToGo10.imgPTN
\_ISO\MAINMENU\WinToGo10.txt - containing...
\_ISO\MAINMENU\WinToGo1064.VHD
\_ISO\MAINMENU\WinToGo1064.txt - containing...
Alternative hotkey prompts for MyE2B.cfg
###()/%grub%/hotkey [Ctrl+F9] "clear && echo -e \nSecret Menu\n===========\n\n && set SECRET= && password EASY && set SECRET=1 ;; configfile (md)0x3000+0xA0" > nul
# Clear menu only - user just sees wallpaper and cursor
###()/%grub%/hotkey [Ctrl+F9] "call Fn.70 3 ;; clear ;; set SECRET= && password EASY > nul && set SECRET=1 ;; configfile (md)0x3000+0xA0" > nul
# Clear menu with wallpaper and prompt user for password
###()/%grub%/hotkey [Ctrl+F9] "call Fn.70 3 ;; clear && set SECRET= && password EASY && set SECRET=1 ;; configfile (md)0x3000+0xA0" > nul
###()/%grub%/hotkey [Ctrl+F9] "call Fn.70 3 ;; clear && echo -e \nPasswort\n\n && set SECRET= && password EASY > nul && set SECRET=1 ;; configfile (md)0x3000+0xA0" > nul
# Clear menu and prompt user for password, change background if successful to GreatLakes.bmp
###()/%grub%/hotkey [Ctrl+F9] "call Fn.70 3 ;; clear && set SECRET= && password EASY && set SECRET=1 && splashimage /_ISO/GreatLakes.bmp ;; configfile (md)0x3000+0xA0" > nul
.txt file for 64-bit files
Hide file enumeration
You can prevent the user from seeing the payload file names as they are enumerated/listed, by setting the redir variable - see here for details.