wi1dcard / fingerproxy

Fingerproxy is an HTTPS reverse proxy. It creates JA3, JA4, Akamai HTTP2 fingerprints, and forwards to backend via HTTP request headers.
Apache License 2.0
54 stars 9 forks source link

E2E tests of Chrome, Firefox, Safari, etc. #10

Open wi1dcard opened 2 months ago

wi1dcard commented 2 months ago

Notes

hellodword commented 2 months ago

Agree, and I've been trying to do similar thing these days, and that's why I'm learning to use fingerproxy🤣

Here is some information I collected: https://github.com/hellodword/tls-fingerprinting/blob/master/README.md#browsers

hellodword commented 2 months ago

A PoC (without CDP/webdriver intentionally) here: https://github.com/hellodword/tls-fingerprinting/actions/runs/8802552943

Or using https://github.com/browser-actions

But I prefer using https://github.com/dockur/windows and https://github.com/sickcodes/Docker-OSX , because I want to make sure it'll be working on any Linux machine, not only the github actions.

wi1dcard commented 2 months ago

Wow, that's amazing!! Actually, I did some research of common fingerprints too. But only runs on GitHub Actions, and collected just a few programming languages + HTTP client libraries. Here is the code: https://github.com/wi1dcard/fingerprint-db, and an example result: https://github.com/wi1dcard/fingerprint-db/actions/runs/7986638066

I didn't write any doc or usage for that project, it is really just a simple PoC 😂 debugging GH actions was actually way more complicated than I thought. If you are interested in it, we can build something together.

hellodword commented 2 months ago

Yeah I noticed that, you're on the service-side, I'm on the client-side.

I mean I prefer finding the most popular fingerprints and create libraries for mimicry purposes:

build something together

But the most popular fingerprints are useful for both, so yes I believe we can find a way to work together.

debugging GH actions was actually way more complicated than I thought

Agree, especially the non-Linux platforms (which are the most popular), so I prefer the Windows/OSX/Android in container way, actually I'm learning about it:

image

wi1dcard commented 2 months ago

I mean I prefer finding the most popular fingerprints and create libraries for mimicry purposes

Hahaha, you know what, I collected these fingerprints for mitigating bot abuse of free query APIs which are made for our web frontend. That's the initial propose of creating fingerproxy 😂 However, it's okay to use it from the other side, I don't mind that at all.

especially the non-Linux platforms (which are the most popular)

Yeah, it might take some time to make all these cross-platform tests work. I'm familiar with macOS and Linux but not Windows.

hellodword commented 2 months ago

Finally got it working 🤔 https://github.com/hellodword/tls-fingerprinting/actions/runs/8813015747

I'm familiar with macOS

I think you can do some research with https://github.com/sickcodes/Docker-OSX

hellodword commented 2 months ago

The firefox/chrome on win10/win11 are both done, via https://github.com/dockur/windows

https://github.com/hellodword/tls-fingerprinting/tree/assets

I'll try to find a way to install and run specific version of edge in the next

hellodword commented 2 months ago

Edge done, a little bit dirty but working https://github.com/hellodword/tls-fingerprinting/actions/runs/8845912592

wi1dcard commented 2 months ago

Edge done, a little bit dirty but working https://github.com/hellodword/tls-fingerprinting/actions/runs/8845912592

Yeah actually I took a look of the code today, it is quite complex 😂 using windows in docker + github action is really a challenge. Awesome work!

hellodword commented 2 months ago

it is quite complex

Sorry for being a mess at prototype stage, I did some refactoring and documenting, and clarified the components:

https://github.com/hellodword/anti-fingerprinting/blob/master/README.md

using windows in docker + github action is really a challenge

Indeed, but much better than the windows-latest actions runner. And the dockur/windows provides a full-featured and real windows, not windows server or nanoserver, I think it's important for fingerprinting.

hellodword commented 1 month ago

I noticed the ja3 and ja4 are not stable with real-world browsers:

The way I'm using fingerproxy: https://github.com/hellodword/anti-fingerprinting/blob/b215d086d5e5ccd2cc9526b3684ef0dd44155f6d/cmd/collector/main.go#L177-L224

And you can find the results' diffs here: https://github.com/hellodword/anti-fingerprinting/commits/assets/

For example, this is the same version of Edge on windows 10: https://github.com/hellodword/anti-fingerprinting/commit/90507a565004b48ee70ce1ea90c786b1796c59b7

I heard that chromium brings a mechanism called TLS extension permutation, it it the reason?

Any idea?

wi1dcard commented 1 month ago

Yes I think it is the reason. However I only know that will affect JA3, not JA4. I'm not sure.