Experience
Projects
My Stack
Case studies
Contact me
Open my CV

·6 min read

My browser's import feature looked exactly like an info-stealer

A browser that imports your saved logins from Chrome has to do three things: open another browser's Login Data file, read its SQLite tables, and call CryptUnprotectData to decrypt what it finds. A credential stealer does the same three things. In Sep 2026, in the first days of Light Browser, I decided that the honest feature and the malicious behavior were indistinguishable to a scanner, and I stopped pretending that a good intention would show up in the binary.

Project
Light Browser
Date
Sep 2026
Stack
C++, Win32, CMake, Inno Setup
Commit
a42ec4c

What broke

Light Browser can import bookmarks, history and saved logins from Chrome, Edge, Brave, Opera, Vivaldi and Firefox. The import code lived inside the main executable, next to the window code and the WebView2 wiring.

The binary was also unsigned. There was no Authenticode certificate behind it, so Windows and antivirus products had no publisher to trust and no reputation to lean on. An unsigned new executable with code that opens Login Data and calls CryptUnprotectData is, to a heuristic model, a small and well-formed info-stealer.

I want to be careful about what I can prove. The repository does not hold an antivirus report, and the commit does not quote one. What I can show is my own conclusion, written in the commit message of a42ec4c (Sep 9): the code "was the main antivirus false-positive trigger". It is a judgment I made from how these detections work, recorded at the time, not a measured detection rate. The README repeats the reasoning: antivirus ML models flag an unsigned binary that opens Login Data and calls CryptUnprotectData as an info-stealer.

The failure mode matters even without a lab result. If the browser itself is flagged, the user does not see "import feature flagged". They see their new browser deleted or blocked, with a scary name in the warning.

What the code showed

The import code and the browser were one binary, so there was no way to keep the risky part out of the scan of the safe part. The dependency was visible in the CMake file. The shared library that the browser linked, lbcore, listed src/browserimport.cpp among its sources and linked SQLite, bcrypt and crypt32:

cmake
add_library(lbcore STATIC
  src/adblock.cpp
  src/services.cpp
  src/crypto.cpp
  src/browserimport.cpp
  ...
target_link_libraries(lbcore PUBLIC sqlite3 bcrypt crypt32 winhttp)

Every time I built the browser, the profile-reading code and its decrypt call were linked into it. The only question a scanner asks is whether those strings and imports are in the file. They were.

The fix

a42ec4c split the feature in two. A new static library, lbimportlib, holds browserimport.cpp and the crypto code. A new executable, lbimport, is built from src/importhelper.cpp on top of it. The browser no longer compiles any of that: lbcore swapped browserimport.cpp for src/importclient.cpp and dropped SQLite from its link line. The CMake comment records the intent:

cmake
# Browser-import code (reads other browsers' profiles: SQLite + DPAPI). Lives in the
# separate lbimport.exe helper, NOT in the browser binary, so antivirus heuristics
# that key on "reads Login Data + CryptUnprotectData" don't fire on LightBrowser.exe.

The browser now talks to the helper instead. On the first click of "Detect browsers", it downloads lbimport.exe for the running version from GitHub Releases, falling back to latest, checks it against its .sha256 sidecar, stores it under Profile\tools\, and then speaks to it over stdin and stdout pipes. A copy placed next to LightBrowser.exe is used instead, for portable and development builds. The release workflow builds both targets, signs both if a certificate is present, and publishes lbimport.exe and its checksum as separate assets.

  1. 01

    Click Detect browsers

    the browser asks for the helper

  2. 02

    Download lbimport.exe

    matching version from GitHub Releases

  3. 03

    Verify SHA-256

    checked against the .sha256 sidecar

  4. 04

    Store in Profile tools

    reused on later imports

  5. 05

    Talk over pipes

    stdin and stdout, no profile code in the browser

Figure 1. How an import now reaches another browser's profile without that code living in the browser.

The size change is in the same commit, because the build output was tracked in that repository at the time:

LightBrowser.exe before

0bytes

LightBrowser.exe after

0bytes

lbimport.exe

0bytes
Figure 2. The tracked main build shrank by about a megabyte once the import code left it. The helper is a separate download.

The helper is larger than what the browser lost, which is expected: it carries SQLite and the decrypt code in its own standalone binary. The point was never to shrink the total. It was to make sure the file most people run does not contain the part that looks wrong.

The other half of the trust problem is the installer. About two hours earlier, 971dd01 (Sep 8, 2026, 23:26) made the installer per-user: PrivilegesRequired=lowest, with the override allowed only from the command line. An install that needs no administrator rights does not trigger the red UAC "unknown publisher" prompt, on a fresh install or on an auto-update. /ALLUSERS still installs machine-wide for people who want that. The same commit filled in the publisher name and URLs in the installer metadata so the setup program identifies itself.

I did not remove every warning, and the README says so. SmartScreen's blue "Windows protected your PC" screen can still appear on the first run of a freshly downloaded setup, because the binaries are not Authenticode-signed. Per-user install removed the UAC prompt. It did not create a reputation.

What I would do differently

I would have designed the split before writing the feature. Moving code out of a binary after it exists took a new library, a new target, a client, a download-and-verify step, a pipe protocol and release workflow changes. Had I begun with "anything that reads other programs' secrets lives in its own process", most of that would have been the first design instead of the second.

I would also have measured. I do not have before and after detection results to show, and I cannot say how many engines flagged which build. The right way to check is to scan both builds and keep the reports. I recorded my reasoning in the commit and the README, and I want a reader to know that this is reasoning, not a lab result.

One more caveat: I added an optional VirusTotal upload to the release workflow in 1600e5b, and removed it in 9590c80 in the same night. The commit says only "drop VirusTotal step", so I will not guess at the reason here.

Where this fits

Import is one feature of Light Browser, a small C++ browser on the system web engine, and trust turned out to be as hard as rendering. The memory, filter and update stories sit in the full Light Browser case study.

The full project story covers the blocker, the memory manager and the release pipeline around this change.

Read the full case study

#cpp#windows#security#antivirus#installer

Keep reading

Have a project in mind?