Sometimes when we install browser extensions on Chrome or Firefox we see many warnings about different permissions that those extensions are using... I know I can monitor all the traffic that happens on my computer in different ways like:
iftop
that can monitor the traffic on my computer (on Linux)Wireshark
and also monitor the traffic happening on my computerNetwork
functionality when we open its Console
However, all these options are going to monitor the entire traffic of my computer or browser... I'd like to monitor the traffic of a browser extension to see if it's communicating with a server. But it gets very hard to distinguish if a particular traffic is coming from a web extension or not using the tools that I've mentioned... Is there any way of detecting just the traffic of the web extension that I've selected? My first guess would be something like a command that I can use on the browser console to monitor the extension... Is there such a thing?
I see a lot of trust issues when a browser extension asks for a lot of permissions. I think it'd be a lot easier to handle this if I could monitor specific web extensions traffic during the day and check if it's communicating with a server or not... Let's say there's a web extension asking the following permissions:
Access your data for all websites
Read and modify bookmarks
Get data from the clipboard
Input data to the clipboard
Access browsing history
Display notifications to you
Access recently closed tabs
Access browser tabs
Access browser activity during navigation
I may be wrong... But I don't see any major problems with an extension asking all these permissions if I'm completely sure that this extension is not communicating with any outside server on the web. So a way of monitoring the traffic of an individual extension would be very useful...
Google Chrome extensions use 2 types of files. One type works in the browser just like normal JavaScript. This files activity is logged the same way website activity is logged in your browser. Press F12 and you can track it. Then there are background files, which also get logged. Right click the extension in question then click manage extension and then click backgroundpage. This looks the same as if you are pressing F12 in your browser, but this one logs everything the extension does in the background. In your case just look in the network tab.
Another way to determine this is to download the source of an extension. The way I do this for Chrome is by installing chrome extension source viewer, now you can dig through the source code to see where certain calls get made.