Hi,
I find a solution, I use the parameter DeleteCommand.
I include the line in the Sandboxie.ini.
DeleteCommand =c:\security.bat "%SANDBOX%"
And in the bat file I writed:
Code: Select all
:: Save Login/Password
move "%1\user\current\AppData\Roaming\Mozilla\Firefox\Profiles\ekarny6u.default\key.db" "%TEMP%\key.db"
move "%1\user\current\AppData\Roaming\Mozilla\Firefox\Profiles\ekarny6u.default\logins.json" "%TEMP%\logins.json"
:: Remove the Sandboxe
RMDIR /s /q "%1"
:: Restore Login/Password
md "%1\user\current\AppData\Roaming\Mozilla\Firefox\Profiles\ekarny6u.default\"
move "%TEMP%\key.db" "%1\user\current\AppData\Roaming\Mozilla\Firefox\Profiles\ekarny6u.default\key.db"
move "%TEMP%\logins.json" "%1\user\current\AppData\Roaming\Mozilla\Firefox\Profiles\ekarny6u.default\logins.json"
Now I can empty the real key.db and logins.json of Firefox.
The only good file will be in the sandboxe with a access very secure.
So if a virus attack my computer:
- In the sandboxe, he is block by the closepath
- And outside the sandboxe, the file is empty.
So it’s impossible a program get my passwords.
We can make this with a lot of programs. For example, the password of Filezilla available in the sitemanager, very easy to hack. Or Chrome.
We can secure it with the same method.
Note: If you have an ideo to improve my script, or a feedback