Skip to content

attributes from browser (common and rare) provided by js scripts for browser fingerprinting or any another purpose

License

Notifications You must be signed in to change notification settings

GrigoryKrasnochub/js_browser_fingerprint_attributes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js_browser_fingerprint_attributes

Hi-hi! There is implementation of some algorithms for obtaining information from a browser about a computer, network and browser itself.

This scripts were written for dreamhack 3 competition in about 24 hours, so this lost some of code best practice. (check my demhack3 project)

Available attributes:

  • Base browser attributes: CPU threads, renderer, browser vendor, and much more (provided by fingerprintjs)
  • Desktop app (external protocol flooding vulnerability)
  • Browser extensions (browser plugin) detector
  • Open ports
  • Private mode (Incognito mode detection)
  • Browser itself (Chrome, FireFox, Opera, etc.)

Usage:

Every lib has this own func with promise, so if you need something specific, just call it

getFPJSLibDataPromise(); // Fingerprintjs data
let detectApp = newDetectApp();
detectApp.getUserApps(); // Desktop app detector
getExtensions(); // Browser extensions (browser plugin)
getOpenPorts(); // Open ports
isPrivateMode(); // Private mode

getMetrics(); // And if you want them all

consolePrintGetMetrics();
consolePrintJSONGetMetrics();

About attributes:

Below some information about the source of idea/code/both, that I used and adapted for my purpose, and some attributes description:

fingerprintjs

I just use fingerprintjs lib, for obtain base browser attributes. It's work, it's fine. It provides a lot of attributes, unfortunately some of them works only in some browsers, chrome for example.

Desktop app detector (external protocol flooding vulnerability)

Idea and idea live demo and idea live demo source code.

So the main idea found the application from defined pull. As you know browser could suggest to you open app, if it is installed on your device. For this purpose special links (deep links), like "skype://", are used. And from js we could know, when this "suggest window" open. Easy!

So, this realization just a kind of copy-paste from TypeScript realization of live demo, I adopt it for js and delete some React bindings... And it works.

Browser extensions (browser pluggin) detector

Simple and powerfull)

All that you need to know, you could do js fetch for extensions pages of this are public.

My realization use defined pull of extensions id's and public pages (you should parse it from store) to detect if it is installed in browser.

Chrome browser url for fetch is: chrome-extension://EXTENSION_ID/EXTENSION_STATIC_FILE

How to get necessary data for browser extension detection

  1. Parse it from store page
  2. Load .crx archive with extension (I used crxextractor)
  3. Open archive and find manifest.json (it's not zip, so use the special arhivator), looking for static files in "web_accessible_resources"

Ports detector

The idea is simple, try to get something from closed port and from open port, fetching info from open port is little bit slower. But it's only idea) It not work with chrome and windows (But works with linux and firefox)

Concept and code I just added promises for integration in my main function

Private mode (Incognito) detector

So I just google it and found several realization, this don't work with < Chrome 92, but works with others.

Almost full realization I found here

If you are interested in story of incognito mode detection, you could read this article. This article is not about how to do it now, but it's interesting.

Browser detector

It's just from StackOwerflow thread), and it not works for actual chrome.

Check it with index.html

You could check how it works with your PC with index.html

image_2021-09-28_21-40-45

About

attributes from browser (common and rare) provided by js scripts for browser fingerprinting or any another purpose

Topics

Resources

License

Stars

Watchers

Forks