home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 42,478 of 42,547   
   Marion to All   
   Re: Tutorial: Build a one-click Windows    
   18 Sep 25 11:53:55   
   
   XPost: alt.comp.os.windows-10, alt.comp.os.windows-11   
   From: marionf@fact.com   
      
   This is optional, for privacy since Psiphon phones home upon invocation,   
   where below is a dummybrowser.bat file which captures rogue URI calls.   
      
   This other piece of the evolving puzzle which was solved within days of   
   installing Psiphon, which is that when executed, it phones home to a server.   
      
   Worse, see sig, it adds a LOT of fingerprinting data to that call home!   
      
   Not only does it phone home to a web server, but it provides that web   
   server with a ton of fingerprinting information you'd rather not give it.   
      
   It's hard coded into Psiphon, but you can intercept it so it never makes it   
   onto the Internet, where there are many ways to intercept rogue URIs.   
      
   I chose to change the default browser but there are many other ways.   
   Note that you "can" set up a default browser to a batch file (*.bat)   
   but I didn't know that at the time I set it up as it's not one   
   of the options by default, so I converted the batch to an executable.   
      
   At first I tried the native Windows bat-to-exe converter wizard   
    C:\Windows\System32\IExpress.exe   
   But after a few attempts, I switched to the Bat_To_Exe_Converter.   
       
    Name: Bat_To_Exe_Converter_x64.exe   
    Size: 2106368 bytes (2057 KiB)   
    SHA256: 1399EDE8F024E70025E55321D25BEAB7104A32E79512B11B4FFC779C82542CC6   
      
   Here's how I set dummybrowser.bat -> exe to the default web browser.   
      
   1. Write the dummybrowser.bat file (included below for completeness).   
      
   2. Convert the dummybrowser.bat batch file to an EXE:   
      a. Open the Bat_To_Exe_Converter_x64.exe freeware converter   
      b. File > Open > C:\data\sys\batch\dummybrowser.bat   
      c. Set options:   
          Exe-Format: 32-bit   
          Interface: Console (Visible)   
          Leave other fields blank   
      d. Click Convert   
      e. Save as: C:\data\sys\batch\dummybrowser.exe   
      
   3. Create a Windows registry entry for your dummy browser:   
      a. Open an elevated command prompt (Win+R > cmd {ctrl+shift+enter})   
      b. Run the following command to add the registry key:   
         reg add "HKLM\SOFTWARE\Classes\DummyBrowserHTML\shell\open\command" /ve   
   /d "\"C:\\data\\sys\\batch\\dummybrowser.exe\" \"%1\"" /f   
      
   4. Set your dummybrowser executable as the default Windows browser:   
      a. Open Windows Settings (Win+I)   
      b. Go to Apps > Default apps   
      c. Scroll to "Web browser"   
      d. Click the current browser icon   
      e. Choose "Dummy Browser" from the list   
      
   5. Verify interception:   
      a. Run: C:\data\sys\batch\dummybrowser.exe "https://example.com"   
      b, Check log file: type C:\data\sys\log\dummybrowser.log   
      c. Confirm entries are logged   
      
   NOTES:   
   A. dummybrowser.exe will now intercept all system-level browser calls   
   B. It's useful for logging or blocking rogue outbound traffic   
   C. I used gVim but you may need to change the path to NotePad++   
      
   Here's the dummybrowser.bat code (which can be greatly improved).   
     @echo off   
     REM C:\data\sys\batch\dummybrowser.bat 20250819   
     REM This is rev 2.0   
     REM All calls to the default web browser are intercepted & logged   
     REM C:\data\sys\batch\dummybrowser.bat 20250916 revision 1.8   
     REM C:\data\sys\batch\dummybrowser.bat 20250916 revision 1.9   
     REM Removed gVim launch so the log is now read only when displayed   
     REM C:\data\sys\batch\dummybrowser.bat 20250916 revision 2.0   
     REM Restored gVim launch in read-only mode to view log w/o locking   
     :: Batch to be converted to an exe to be easily set as the default browser   
     :: Start clean by deleting any existing log files.   
     ::  del C:\data\sys\log\dummybrowser.log   
     :: Open admin prompt (Win+R > cmd {ctrl+shft+enter} & kill leftovers   
     ::  taskkill /IM dummybrowser.exe /F   
     :: Start GitHub Bat_To_Exe_Converter_x64.exe   
     ::     
     :: File > Open > C:\data\sys\batch\dummybrowser.bat   
     ::  Options: Exe-Format: 32-bit | Console (Visible)   
     ::  Leave all other fields blank/unchecked   
     ::  Click Convert   
     ::  Save as: C:\data\sys\batch\dummybrowser.exe   
     :: To test, run in a command prompt:   
     ::  C:\data\sys\batch\dummybrowser.exe test123   
     ::  [Tue 09/16/2025 16:55:50.72] Attempted launch: (fingerprint)   
     ::  C:\data\sys\batch\dummybrowser.exe  test123   
     ::  C:\data\sys\batch\dummybrowser.exe "https://abc.com/?a=1&b=2"   
     :: Verify both entries in: C:\data\sys\log\dummybrowser.log   
     ::  type C:\data\sys\log\dummybrowser.log   
     :: Confirm registry entry for default browser options exists.   
     :: [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DummyBrowserHTML\shell\open\command]   
     :: @="\"C:\\data\\sys\\batch\\dummybrowser.exe\" \"%1\""   
     :: Check that dummybrowser is set as the default browser   
     :: Win+I > Apps > Default apps > Web browser > Choose Dummy Browser   
      
     set LOGFILE=C:\data\sys\log\dummybrowser.log   
      
     REM Append new entry   
     echo [%date% %time%] Attempted launch: %* >> %LOGFILE%   
      
     REM Open log in gVim read-only and exit immediately   
     start "" "C:\app\editor\txt\vim\gvim.exe" -R "%LOGFILE%"   
      
     exit /b   
      
   Note that this dummy browser, while useful with for Psiphon, is not required.   
   --   
   This is an actual capture from my dummy browser log file.   
   [Wed 09/17/2025  9:26:06.04] Attempted launch: C:\data\sys\batch   
   dummybrowser.exe  "https://ipfounder.net/?sponsor_id=1CD935B4F29   
   12DA&sponsor=psiphon&client_region=US&client_asn=32829&client_pl   
   tform=windows&secret=   
   580XghQJ18zK2gpxV7cfR3wTEUydcHK8KCEryhkes6QJtmRDF1xnPQqvydpwxzUv   
   tqnvT5yqLFnfXEnUgie7m9kiW8P4QRZpir3j7eFeLKC5DhM7EloZTFNu3DD8XKux   
   MBY6mcdUC7jqhVy17xynvEMaZ2bkfdgQHCrgsRKej3r7uc1HTGg2PL4y2rYLxzkn   
   Qc4K&psireason=connect&psicash=   
   eyJtZXRhZGF0YSI6eyJjbGllbnRfcmVnaW9uIjoiVVMiLCJjbGllbnRfdmVyc2lv   
   iI6IjE4NiIsInByb3BhZ2F0aW9uX2NoYW5uZWxfaWQiOiI5MkFBQ0M1QkFCRTA5N   
   RDIiwic3BvbnNvcl9pZCI6IjFDRDkzNUI0RjI5NDEyREEiLCJ1c2VyX2FnZW50Ij   
   iUHNpcGhvbi1Qc23DYXNoLVdpbmRvd3MiLCJ4IjoxfSwidGltZXN0YW1wIjo   
   iMjAyNS0wOS0xN1QxNToyNjowNS42NDBaIiwidG9rZW5zIjpidWxsLCJ2IjoxfD"   
   [Wed 09/17/2025 10:24:25.23] Attempted launch: C:\data\sys\batch   
   dummybrowser.exe  "https://ipfounder.net/?sponsor_id=1CD935B4F29   
   12DA&sponsor=psiphon&client_region=US&client_asn=32829&client_pl   
   tform=windows&secret=   
   580XghQJ18zK2gpxV7cfR3wTEUydcHK8KCEryhkes6QJtmRDF1xnPQqvydpwxzUv   
   tqnvT5yqLFnfXEnUgie7m9kiW8P4QRZpir3j7eFeLKC5DhM7EloZTFNu3DD8XKux   
   MBY6mcdUC7jqhVy17xynvEMaZ2bkfdgQHCrgsRKej3r7uc1HTGg2PL4y2rYLxzkn   
   Qc4K&psireason=connect&psicash=   
   eyJtZXRhZGF0YSI6eyJjbGllbnRfcmVnaW9uIjoiVVMiLCJjbGllbnRfdmVyc2lv   
   iI6IjE4NiIsInByb3BhZ2F0aW9uX2NoYW5uZWxfaWQiOiI5MkFBQ0M1QkFCRTA5N   
   RDIiwic3BvbnNvcl9pZCI6IjFDRDkzNUI0RjI5NDEyREEiLCJ1c2VyX2FnZW50Ij   
   iUHNpcGhvbi1Qc23DYXNoLVdpbmRvd3MiLCJ4IjoxfSwidGltZXN0YW1wIjo   
   iMjAyNS0wOS0xN1QxNjoyNDoyNS4xMjJaIiwidG9rZW5zIjpidWxsLCJ2IjoxfD"   
      
   [continued in next message]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca