Code Monkey home page Code Monkey logo

little-rat's Introduction

little-rat

๐Ÿ€ Small chrome extension to monitor (and optionally block) other extensions' network calls

Get Little Rat for Chrome

Chrome Web Store (Lite version)

The published extension lacks the ability to track the number of requests and notify you, but you can still use it for blocking requests. The reason is that the extension uses the declarativeNetRequest.onRuleMatchedDebug API which is not available for publishing in the Chrome Web Store. Get it here

Screenshot for Chrome Store

Manual Installation (Full Version)

  • Download the ZIP of this repo.
  • Unzip
  • Go to chromium/chrome Extensions.
  • Click to check Developer mode.
  • Click Load unpacked extension....
  • In the file selector dialog:
    • Select the directory little-rat-main which was created above.
    • Click Open.

Screenshots

Screenshot2 for Manual

Open-Source Libraries <3

Author

https://twitter.com/dnak0v

little-rat's People

Contributors

busybox11 avatar dnakov avatar gregsadetsky avatar wdwind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

little-rat's Issues

Feature request: Whitelist blacklist options

Hey
Just posting my twitter comment here

Works great for me- easy to use. Could we add option to whitelist certain sites to help bring the "red number counter" down. Also wonder if we can add blacklist of malicious sites - the counter could be red for these, and amber for unknown? Green for whitelist?...Blocking?

I see that you've discussed blocking on another issue which sounds complex

But atleast a colour indicator for known bad sites would be a step towards that

Like I've mentioned here I don't think UBO blocks extension traffic so we are vulnerable to it

Feature request: Dark Mode

The current white background is not easy on the eyes. Especially when you open the extension dashboard in a new tab, rather than use the popup window. So i think a dark mode toggle would be very useful.

Feature Requests: Block extensions by default and mitigation in case the Little Rat extension crashes

Hi Daniel,

Excellent extension.

When I test out new extensions, I generally block them first with Little Rat to be on the safe side and inspect what the network traffic looks like over time. It would be ideal if your extension blocked all extensions by default, or had an advanced option to "block all newly installed extensions".

Also, sometimes Edge tells me that an extension crashed, and this has also happened to the Little Rat extension. Does this mean the network traffic is being allowed for that brief time of your extension crashing? If so, it would be good to have some mitigations in place to safeguard against that. I'm not certain about how the extension APIs etc. all intersect, but perhaps your extension could push the filters to a host file or even generate manual uBlock Origin rules based on the extensions which are installed.

[full version] Toolbar icon gets count badge even when notifications are muted

I noticed that the toolbar icon had a badge with a count of 1, but these are the only extensions with counts against them in the panel:

image

They all have notifications muted โ€” all the other extensions have a count of 0 since I last hit Reset.

I'm not sure which of these is happening:

  • Something with notifications enabled is making a connection that gets shown in the badge counter and not in the individual extension's counter.
  • Something with notifications disabled is incrementing the badge counter anyway in some circumstances.

The number in the counter is not equal to the numbers against any of the extensions, so it only seems to be happening occasionally.

Feature request: Implement extension network request blocking

Overview:
The extension currently reports on network requests made by other installed extensions, similar to ObjectiveSee's LuLu firewall for macOS. This feature request is to add blocking capabilities like LuLu, allowing users to prevent specific extensions from sending data without approval.
Requirements:

  • Allow users to toggle on/off a "Block extension requests" mode
  • Provide interfaces for selecting extensions to block, like LuLu's allowlisting
  • When enabled, block network requests initiated by blocked extensions
  • Provide visible alerts when a blocked request is attempted
  • Integrate reporting to log all blocked requests
    Benefits:
  • Increased user control over extension network access
  • Ability to restrict suspicious/malicious extensions like LuLu
  • Improved privacy by limiting unapproved communications
  • Provides firewall-like security for browser extensions
    Risks/Considerations:
  • Could break functionality of extensions needing network access
  • Need to validate blocking avoids bypasses
  • Large volume of blocked requests could impact browser performance
  • UI for selecting blocked extensions should be simple and clear
  • May receive support requests if needed extension is blocked

A way to get and block requests of other extensions in firefox

TLDR: use browser.proxy.onRequest.

MDN doc about the firefox's proxy API, it's quite different from chromium's chrome.proxy.

use browser.proxy.onRequest.addListener(listener, {urls:['<all_urls>']}) to get requestDetail.
usually, the requestDetail.documentUrl of extension request is in format like: moz-extension://${internalUUID}/path
listener returns an invalid proxy to block request ๐Ÿคฃ

internalUUID is unique for each extension, but it's different from the extension id returned by browser.management.getAll(), and I can't find a way to get it in extension.
one way to get internalUUID is, open this page about:debugging#/runtime/this-firefox, run some snippet in devtool:

const idPairArr=[];
for(let card of document.querySelectorAll('.card')){
  const fields = card.querySelectorAll('dd.fieldpair__description');
  if(fields.length>=2){
    idPairArr.push({
      extensionId:fields[0].innerText,
      internalUUID:fields[1].innerText
    })
  }
}
console.log(idPairArr);

related issues: #8, #14

Make sure variables are initialized when service worker restarts before onRuleMatchedDebug listener code is executed.

Here's an example:

let initializer;
let initialized = false;

chrome.declarativeNetRequest.onRuleMatchedDebug.addListener(async (e) => {

if (!initialized) { await initializer; }
// ...

});

(async function initialize() {

let gLocal = chrome.storage.local.get('muted', ({ muted: m }) => {
	muted = m || {};
});
let gManagement = chrome.management.getAll((extInfo) => {
	for(let { name, id, icons } of extInfo) {
		extensions[id] = { name, id, icon: icons?.[0]?.url, numRequests: 0, reqUrls: {}};
	}
});

let i = async () => {
	await gLocal;
	await gManagement;
	initialized = true;
}
initializer = i();

})();

Feature Request: more functions as an extension manager

little rat reminds me of an old extension called Extensions Manager (aka Switcher)
it's list view has lots functions as open options, delete extension, open chromestore page
unfortunately this extension was removed by chrome
I'm thinking maybe little-rat can bring back that cool, neat, functional interface back?
after all all these fuctions are somewhat connected to the core function of little rat
here's what it looked like:
image
thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.