Lurker News
Hi HN

I needed a way to monitor network calls made by chrome extensions so I made a small extension.
You can install it by dropping the zip or crx into the extensions page. It'll be on the chrome store whenever/if it gets through the review.
Hopefully it's useful to others.
https://github.com/dnakov/little-rat
https://twitter.com/dnak0v

Comments (101) 23 threads

altairprime5 replies#
I wish this was a feature of Firefox (or Chrome, as if Google would ever), rather than a third-party extension, so that it had enough adoption to compel other browsers to care too. I'd like very much to authorize certain extensions to only make GET requests to specific static URLs without any ability to vary the headers, so that they can get data updates without there being any risk of leaking data. And for others, they don't need network access at all to do their job locally in my browser instance. But that would be circumventable (since anything that can modify page source can add data transmission), so I imagine they aren't doing it because of that. Too bad — better to try than just give up and cede it to a Chrome extension.
hsbauauvhabzb1 reply#
A get request can leak data via the request path or querystring parameters, if that was restricted you could setup communication which time or frequency imply activity with a morse code like protocol (and with enough requests, easily transfer megabytes of data).
altairprime1 reply#
You can just do whatever the modern equivalent of document.trackingPixel.src = 'leak all your data here in a single request', since extensions can modify content blocking. Firefox should ask for, accept, and audit a statement of whether your extension needs to make dynamic network calls or not, and why it needs to do so. Yes, you could lie — but then you'd get caught lying, in violation of, kicked off the store, etc. Today, you can just add tracking, and no one can take any useful action as a result.
hsbauauvhabzb1 reply#
100% agree. I think extensions are an odd place to start, but this is the exact reason I avoid browser extensions unless I’ve explicitly audited them (and still don’t like they auto update without permission).

Continue this thread — 1 reply

tim19941 reply#
IIRC extensions cannot access any URL that hasn't been specified in the manifests permission section. I think Firefox shows those URLs in the permission prompt. Those URLs can contain wildcards though and I even think there is a special value for all URLs but only few extensions should require that permission.
altairprime#
For extensions that modify page data, is that prompt still shown? My understanding was that once you have the 'modify page data' permission, you're no longer required to present URLs in the permission prompt at all — but I'd be thrilled to be wrong, if that's changed!
Pxtl#
I'd say any extension that's making an http request that isn't just repeating URLs that are already in the page should show a toast notification with the request body prettified into legibility.

A well made extension will only pop up an occasional toast. One that needs the server to work will show the toast when the user expects it to be talking to the server. One sending keypresses or other suspicious data will be really obvious.

Groxx#
For observing it at least, you can - you need to open a debugger for the browser rather than for the current page.

The process is roughly the same as inspecting the UI, you basically enable remote debugging and then launch the Browser Toolbox: https://superuser.com/questions/1608096/how-to-inspect-firef...
(this is also a great way to figure out what you need to do for a user-chrome CSS file, e.g. if you want to change how tabs appear beyond just theming. though using a user-chrome CSS file is unfortunately a minor pain in the ass.)
I had to switch it to "multi-process mode" to get network requests from extensions to show up, but that broadly makes sense.
e.g. here's ublock pulling a random block list that I clicked on to test: https://i.imgur.com/wBYbBM2.png
and here's Firefox itself updating the safe-browsing list in the background: https://i.imgur.com/JYxWwjW.png

londons_explore#
I think browser makers don't offer this because any protection put in place would be easy to work around.

For example, even if the extension itself can't make requests, there are plenty of ways to 'trick' a webpage into making a request on your behalf when you have permissions to modify the Dom of the web page.

p1mrx1 reply#
Given that this extension is not very easy to install, I suggest adding a screenshot showing some actual captured network events. The current screenshot hides the most interesting feature.
jimmychoozyx#
Open google chrome > click options (3 dots) in upper right corner > Extensions > Manage Extensions > Click to toggle Developer Mode in upper right corner > upper left corner button "Load Packged" > Load the directory of the un-zipped .zip file

Next, back in the normal browser-- Click the puzzle piece icon where your extensions icons are to the right side of the URL address bar. Click the little thumbtack next to Little Rat extension. Now it's installed and shows in the list of extension icons

Groxx#
Neat. I'm surprised this is possible tbh.

Not being familiar with exactly what data these APIs (or similar?) provide: could extensions' abilities to access other extensions' requests imply any security concerns for e.g. password manager extensions? Or auth-token-using extensions?

emmanueloga_1 reply#
Nice! Feels like something that should be a chrome:// URL.
UberFly1 reply#
That was my first thought. Why isn't this native to Chromium seeing that extensions are such a security/privacy risk.
benrapscallion1 reply#
Because Chrome is made by a company whose primary source of revenue is the sale of its users’ data. Cui bono. Or, “It is difficult to get a man to understand something, when his salary depends on his not understanding it.”
midoridensha#
Sure, but someone could fork Chromium and add it in.

Load more comments