SecBrowser: A Security-hardened, Non-anonymous Browser - DEPRECATED

These three prefs are all that is needed.

user_pref("network.proxy.socks_remote_dns", false);
user_pref("extensions.torlauncher.start_tor", false);
user_pref("network.proxy.type", 0);

The only issue is system-tor is running in the background. Well maybe not an issue but some (most?) users would expect Tor to be completely disabled. This should be mentioned in the documentation

1 Like

Awesome!

If we use tb-updater, system Tor (debian tor package) should not be installed by either tb-updater (tor is not a dependency) nor any of our instructions. I don’t understand the issue yet.

System Tor not being required can be documented for sure.

Should have clarified was referring to wiki instructions. Looks like i had previously installed Tor (debian) for something else. So not related to this topic. My bad.

1 Like

For some reason the user.prefs I was intending to use in the tb-updater file no longer stay persistent. Its possible this has to do with the update to Tor Browser 8.0.6?

  • The newly configured VMs with TB 8.0.6 do not toggle the about:config prefs to reflect the user.pref file.

    about:config

    network.proxy.socks_remote_dns true
    network.proxy.type 1

  • All the VM configured which originaly used TB 8.0.5 and then were updated to 8.0.6 still work.

    about:config

    network.proxy.socks_remote_dns false
    network.proxy.type 0

I check the new TB release, changelog etc. and nothing jumped out at me that would would do this. I’ll keep going on this. There has to be a reason why these no longer work. Or find a different way.

1 Like

If it’s just about network settings we could have /usr/bin/torbrowser conditionally when some clearnet config settings is set configure environment variable TOR_TRANSPROXY=1.

(Similar to Tor Browser Advanced Topics)

To manually test:

TOR_TRANSPROXY=1 torbrowser
1 Like

Was not able to fully disable Tor Button extension in user.js so TOR_TRANSPROXY=1 torbrowser is necessary for networking.

Only way i found to fully disable TorButton:

  • Disabled the extension manually in about:addons. OR
  • rm ~/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/profile.default/extensions/torbutton@torproject.org.xpi OR
  • chmod -r ~/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/profile.default/extensions/torbutton@torproject.org.xpi

Went through every about:config setting with no luck then tried manually copying over the default firefox prefs.js folder to user.js. This still had no effect in getting the password manger to function. It looks as though there might be an sqlite file missing from the TB profile that is needed for encrypting password storage. (among other things)

1 Like

What about setting extensions.torbutton.use_nontor_proxy to true?

1 Like

In otherwords, those prefs don’t stay persistent across VM reboots unless TorButton extension is manually disabled in about:addons or the torbutton.xpi file is altered. My initial success was likely due to an over site.

The current wiki instructions don’t account for a VM reboot. Working on that now.

2 Likes

Tor Browser without Tor: Difference between revisions - Whonix

Click Connect, then wait while the connection to Tor is completed. When Tor has successfully connected, Tor Browser will open and the steps to disable Tor outlined below can be completed…

Having to connect to Tor first to then disable it, that’s a bit weird. That’s why I hope to script/automate the process as much as possible. Ideally it’s just a very few bash commands for settings and utilizing tb-updater.

The only other way would be to add the user.js configs first just to keep from having to start TB. Unfortuanlty the previous steps fail 100% of the time after VM reboot with “proxy server is refusing connections”

1 Like

What do you thing about step 4. Tor Browser “Something Went Wrong” about:tor with red background? The Tor Browser without Tor with normal browser settings patch lands on normal about:tor background. I can add a pref so it lands on the about:tor red background. Might be a good idea so user don’t have to browser to https://check.torproject.org/ to see if configuration worked.

1 Like

(based on https://github.com/Whonix/anon-ws-disable-stacked-tor/blob/master/usr/lib/anon-ws-disable-stacked-tor/torbrowser.sh)

To experiment with:

TOR_SKIP_CONTROLPORTTEST=1 TOR_SKIP_LAUNCH=1 TOR_TRANSPROXY=1 ./start-tor-browser.desktop

Or without launching into background (Tor Browser startup script has non-standard behavior of launching to background by default).

TOR_SKIP_CONTROLPORTTEST=1 TOR_SKIP_LAUNCH=1 TOR_TRANSPROXY=1 ./start-tor-browser.desktop --debug

We could also use GitHub - Kicksecure/tb-starter: Tor Browser Starter. Open Link Confirmation; Qubes integration; Command line --new-tab, --new-window; start menu entry; This package is produced independently of, and carries no guarantee from, The Tor Project.

TOR_SKIP_CONTROLPORTTEST=1 TOR_SKIP_LAUNCH=1 TOR_TRANSPROXY=1 torbrowser

…but a weird since called torbrowser.

Bad usability experience. Goals:

  • normal user experience as much as possible like for one would expect for a security enhanced browser
  • different colors would be desirable
  • window not being called “Tor Browser” would be desirable
  • proper attribution of Tor Browser

Aka “rebrand” but might be too hard without recompilation and recompilation seems too much work.

Meanwhile I am OK with the red about:tor startup message. This might be the as good as we can get this.

This is already the default with your settings file above plus my startup command from the beginning of this post.

I am working on automating this in tb-starter and tb-updater. Meaning: full tb-updater / tb-starter support for Debian machines.

(Yes, including Debian Qubes TemplateVM support, i.e. up to date versions of Tor Browsers in newly created AppVMs inherited from updated TemplateVMs. Looks easy to implement.)

Initial implementation done.

Firefox question: Can we have multiple “user.js” files? In other words, is there a way we can drop our config snippet in some .d style drop-in folder?

I am asking because the following code is non-ideal in case users use their own user.js. In these cases users would have to manually add our clearnet normalization settings.

No updated packages yet. Please manually get from git meanwhile.

To test either user torbrowser --clearnet (probably tedious) or create a file /etc/torbrowser.d/50_user.conf containing:

tb_clearnet=true

Using settings file has the advantage that we can start “Tor” Browser from the start menu.

tb-updater / tb-starter can soon be installed in Debian (including Qubes Debian) using Whonix ™ Packages for Debian Hosts and Whonix ™ Host Enhancements.

1 Like
  • How to make Tor Browser remember passwords. First, disable private browsing mode (see above). Next: Preferences -> click the "Security" tab on the left-hand side -> check "Remember login for sites" . The browser may need to be restarted for the changes to take effect.

Doesn’t work for me. Could you try please?

I thought if one of the above variables worked they would all function in the same way. I was using:

1. nano ~/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/Tor Browser/Data/Browser/profile.default/

2. cd ~/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/

3, TOR_TRANSPROXY=1 ./start-tor-browser

So my mistake

1 Like

I can find out.

Ok no problem

Haven’t found a way yet. Firefox has a file called logons.json which is created when users add the first site login info. This does not get created in TB. I believe this is due to a sqlite file that does not exist in TB. There may also be additional about:config setting that need to be changed as well.

There’s no point in keeping the existing wiki instruction while searching for an answer. (not likely to be solved easily) I’ll remove them.

Done

https://whonix.org/w/index.php?title=Tor_Browser_without_Tor&oldid=41178&diff=cur

1 Like

created /etc/torbrowser.d/50_user.conf

added

tb_clearnet-=true

 /usr/bin/torbrowser --clearnet
+ set -e
+ main_function --clearnet
+ source_config --clearnet
+ shopt -s nullglob
+ local i
+ for i in /etc/open_link_confirm.d/*.conf /rw/config/open_link_confirm.d/*.conf
+ bash -n /etc/open_link_confirm.d/31_default.conf
+ source /etc/open_link_confirm.d/31_default.conf
++ link_confirmation_for_links=1
++ link_confirmation_for_files=1
+ preparation --clearnet
+ export OPEN_LINK_CONFIRMATION=true
+ OPEN_LINK_CONFIRMATION=true
+ '[' 1 = 0 ']'
+ input_object_original=--clearnet
+ trim=128
+ input_object_string_length=10
+ input_object_trimmed=--clearnet
++ /usr/lib/msgcollector/striphtml --clearnet
+ input_object_stripped_and_trimmed=--clearnet
+ '[' 10 -gt 128 ']'
+ '[' -f --clearnet ']'
+ is_file=0
+ type=link
+ command -v qubesdb-read
+ qubes_detected=true
++ qubesdb-read /type
+ qubes_type=StandaloneVM
+ '[' -f /var/run/qubes/this-is-templatevm ']'
+ '[' -f /usr/share/anon-gw-base-files/gateway ']'
+ workstation --clearnet
+ '[' 0 = 1 ']'
+ '[' -n '' ']'
+ open_in_tool_bin=x-www-browser
+ '[' -n '' ']'
+++ command -v x-www-browser
++ readlink -f /usr/bin/x-www-browser
+ open_in_tool_bin_name_readlink=/usr/bin/torbrowser
+ '[' -n '' ']'
+ open_in_tool_bin_name='x-www-browser (/usr/bin/torbrowser)'
+ '[' 'x-www-browser (/usr/bin/torbrowser)' = 'x-www-browser (/usr/bin/torbrowser)' ']'
+ open_in_tool_bin_name='Tor Browser'
+ '[' '!' -n '' ']'
+ '[' -n 'Tor Browser' ']'
+ '[' /usr/bin/torbrowser = /usr/lib/open_link_confirmation ']'
+ '[' --clearnet = '' ']'
+ '[' --clearnet = ' ' ']'
+ title='Confirm Open'
+ msg='<p>The following <b>link</b> will be opened in <u>Tor Browser</u>.</p>
<p>Be careful if <u>Tor Browser</u> is already running as your activities might get linked.</p>
<p><code><blockquote>--clearnet</blockquote></code></p>'
+ question='Continue?'
+ button=yesno
+ return 0
+ final --clearnet
+ local ask_for_confirmation=1
+ '[' 0 = 1 ']'
+ '[' 1 = 0 ']'
+ local ask_for_confirmation=1
+ '[' StandaloneVM = DispVM ']'
+ '[' 1 = 1 ']'
+ local answer
+ answer=0
++ /usr/lib/msgcollector/generic_gui_message warning 'Confirm Open' '<p>The following <b>link</b> will be opened in <u>Tor Browser</u>.</p>
<p>Be careful if <u>Tor Browser</u> is already running as your activities might get linked.</p>
<p><code><blockquote>--clearnet</blockquote></code></p>' 'Continue?' yesno
+ answer=16384
+ '[' '!' 16384 = 16384 ']'
+ command -v x-www-browser
+ local open_in_tool_exit_code
+ open_in_tool_exit_code=0
+ DE=generic
+ x-www-browser --clearnet

Success!
1 Like

Either config or --clearnet. Both is ok too but unnecessary.


bash -x /usr/bin/torbrowser --clearnet

This is the new code to be executed.

+ tb_clearnet --clearnet
+ test -f /home/user/.tb/tor-browser/clearnet-marker
+ '[' '!' true = true ']'
+ '[' '!' true = true ']'
+ diff /usr/share/tb-updater/tb_without_tor_settings.js /home/user/.tb/tor-browser/Browser/TorBrowser/Data/Browser/profile.default/user.js
+ test -f /home/user/.tb/tor-browser/Browser/TorBrowser/Data/Browser/profile.default/user.js
+ true 'some version exists'
+ test -f clearnet-marker
+ TOR_SKIP_CONTROLPORTTEST=1
+ TOR_SKIP_LAUNCH=1
+ TOR_TRANSPROXY=1
+ export TOR_SKIP_CONTROLPORTTEST TOR_SKIP_LAUNCH TOR_TRANSPROXY

Did you use the latest version from tb-starter/usr/bin/torbrowser at master · Kicksecure/tb-starter · GitHub?


That is actually the output of open-link-confirmation which runs with xtrace by default. We’ll need the output of bash -x /usr/bin/torbrowser --clearnet to see what tb-starter is doing.


Could you please use tb-updater, ~/.tb/tor-browser and ~/.tb/tor-browser/start-tor-browser.desktop for experiments?


TODO

  • How to use Tor Browser without Tor in Whonix.

Wondering what is meant with that. Perhaps even I wrote that.

Does it mean, "use torbrowser --clearnet in Whonix-Workstation so Tor Browser if you want to use Tor Browser for user -> Tor -> tunnel-link -> destination? That should work.

But then I am wondering if --clearnet is the best name for this new feature. In Debian --clearnet makes sense. In Whonix, not so much. Should I rename that command line option? Any naming suggestion? Or just add an additional --alias that does the same?

Each individual of them changes code paths inside tor-launcher add-on or torbutton add-on. It’s not like one of them automatically activates the other ones.