Initial Firefox secure vault

This commit is contained in:
Jan
2026-06-25 15:37:48 +02:00
commit 391d541dc1
5 changed files with 1286 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
.firefox-session-vault/
.agents/
*.lnk
*.exe
*.pdb
*.user
*.log
*.tmp
*.zip
+19
View File
@@ -0,0 +1,19 @@
$ErrorActionPreference = "Stop"
$baseDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$candidates = @(
"$env:WINDIR\Microsoft.NET\Framework64\v4.0.30319\csc.exe",
"$env:WINDIR\Microsoft.NET\Framework\v4.0.30319\csc.exe"
)
$compiler = $candidates | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
if (-not $compiler) {
throw "C# compiler csc.exe wurde nicht gefunden."
}
& $compiler /nologo /target:winexe /out:(Join-Path $baseDir "FirefoxLauncher.exe") (Join-Path $baseDir "FirefoxLauncher.cs")
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File (Join-Path $baseDir "FirefoxSessionVault.ps1") -Mode Shortcut
+30
View File
@@ -0,0 +1,30 @@
using System;
using System.Diagnostics;
using System.IO;
internal static class FirefoxLauncher
{
private static int Main()
{
string baseDir = AppDomain.CurrentDomain.BaseDirectory;
string scriptPath = Path.Combine(baseDir, "FirefoxSessionVault.ps1");
if (!File.Exists(scriptPath))
{
return 2;
}
var startInfo = new ProcessStartInfo
{
FileName = "powershell.exe",
Arguments = "-NoProfile -Sta -ExecutionPolicy Bypass -WindowStyle Hidden -File \"" + scriptPath + "\" -Mode Toggle",
WorkingDirectory = baseDir,
UseShellExecute = false,
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden
};
Process.Start(startInfo);
return 0;
}
}
File diff suppressed because it is too large Load Diff
+56
View File
@@ -0,0 +1,56 @@
# Firefox Secure
Windows helper for protecting a Firefox session with a PIN.
It stores Firefox session data outside the active profile while locked, then restores it after the correct PIN is entered. Pressing `Esc` in the PIN dialog opens a neutral Firefox profile instead.
## Build
Run:
```powershell
.\Build.ps1
```
This compiles `FirefoxLauncher.exe` as a windowless launcher and recreates `Firefox.lnk` with the normal Firefox icon.
## Use
1. Run `Firefox.lnk`.
2. On first setup, choose a PIN.
3. Use `Firefox.lnk` instead of the normal Firefox shortcut.
Behavior:
- If Firefox is locked, a small dark PIN dialog is shown.
- Correct PIN restores the protected session and opens your real Firefox profile.
- `Esc` opens a separate neutral Firefox profile.
- Wrong PIN keeps the protected profile locked.
- If your real Firefox profile is open and you close it with `X`, a background watcher locks the session afterwards.
## Important Firefox Setting
Disable this Firefox setting:
`Clear cookies and site data every time you close Firefox`
If Firefox deletes website data on exit, this tool can only protect what is still present after Firefox closes.
## What Is Protected
The vault protects:
- Firefox cookies
- `webappsstore.sqlite`
- selected website storage under `storage\default\https...`
- session restore files
New locks store encrypted `.ffsv` files in `.firefox-session-vault\vault`.
## Security Notes
This is a practical privacy lock for a shared Windows session, not enterprise-grade isolation.
It does not protect against someone who can modify this folder, kill processes, inspect the same Windows account deeply, or use admin rights. Separate Windows accounts are still the real security boundary.
Do not commit `.firefox-session-vault`; it contains local encrypted session data.