From ba3ccc98ea1703f2584913dcc7dd838093030db6 Mon Sep 17 00:00:00 2001 From: 1012020 Date: Wed, 15 Jul 2026 23:32:21 +1000 Subject: [PATCH 1/3] Add bypass for Realeyes VerifEye (@realeyes/verifeye-sdk) --- manifest.json | 3 +- websites/verifeye.realeyes.ai.js | 90 ++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 websites/verifeye.realeyes.ai.js diff --git a/manifest.json b/manifest.json index 1fb78ca..ce5551a 100644 --- a/manifest.json +++ b/manifest.json @@ -32,7 +32,8 @@ "websites/aliexpress.com.js", "websites/bsky.app.js", "websites/reddit.com.js", - "websites/veriff.me.js" + "websites/veriff.me.js", + "websites/verifeye.realeyes.ai.js" ] }, "action": { diff --git a/websites/verifeye.realeyes.ai.js b/websites/verifeye.realeyes.ai.js new file mode 100644 index 0000000..c80f80b --- /dev/null +++ b/websites/verifeye.realeyes.ai.js @@ -0,0 +1,90 @@ +/* +Copyright © 2026 🦊 helloyanis + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +console.log("Realeyes VerifEye bypass script is running"); +function _injectPatcher(details) { + if (details.tabId < 0) return; + browser.scripting.executeScript({ + target: { tabId: details.tabId, allFrames: true }, + func: () => { + if (document.__verifeyePatcherInjected) return; + document.__verifeyePatcherInjected = true; + const s = document.createElement("script"); + s.textContent = `(function(){ + if(window.__verifeyeBypassInstalled)return; + window.__verifeyeBypassInstalled=true; + const orig=window.fetch; + window.fetch=async function(resource,options){ + const url=resource instanceof Request?resource.url:String(resource); + if(url.includes("verifeye-service-")&&url.includes("/api/v1/verification/")){ + if(url.includes("/init-session")){ + let sid;try{sid=JSON.parse(options?.body||"{}").verificationSessionId;}catch{} + return new Response(JSON.stringify({verificationSessionId:sid||crypto.randomUUID(),livenessCheckType:"disabled",kinesisConfig:null,accountHash:""}),{status:200,headers:{"Content-Type":"application/json"}}); + } + return new Response("{}",{status:200,headers:{"Content-Type":"application/json"}}); + } + return orig.apply(this,arguments); + }; +})();`; + document.documentElement.appendChild(s); + s.remove(); + } + }).catch(e => console.warn("[verifeye bypass] executeScript failed:", e)); +} +browser.webRequest.onBeforeRequest.addListener(_injectPatcher, { urls: ["*://*/*faceDetectionService-CohHJWWF*"] }, []); +browser.webRequest.onBeforeRequest.addListener(_injectPatcher, { urls: ["*://verifeye-service-eu.realeyes.ai/api/v1/verification/init-session*", "*://verifeye-service-us.realeyes.ai/api/v1/verification/init-session*"] }, []); + +browser.webRequest.onBeforeRequest.addListener( + function (details) { + console.log("Request intercepted:", details.url); + const filter = browser.webRequest.filterResponseData(details.requestId); + const encoder = new TextEncoder(); + let sessionId = crypto.randomUUID(); + try { + const raw = details.requestBody?.raw?.[0]?.bytes; + if (raw) { + const body = JSON.parse(new TextDecoder().decode(raw)); + if (body.verificationSessionId) sessionId = body.verificationSessionId; + } + } catch { } + filter.onstop = function () { + filter.write(encoder.encode(JSON.stringify({ + verificationSessionId: sessionId, + livenessCheckType: "disabled", + kinesisConfig: null, + accountHash: "" + }))); + filter.close(); + }; + }, + { urls: ["*://verifeye-service-eu.realeyes.ai/api/v1/verification/init-session*", "*://verifeye-service-us.realeyes.ai/api/v1/verification/init-session*"] }, + ["blocking", "requestBody"] +); + +browser.webRequest.onBeforeRequest.addListener( + function (details) { + console.log("Request intercepted:", details.url); + const filter = browser.webRequest.filterResponseData(details.requestId); + const encoder = new TextEncoder(); + filter.onstop = function () { + filter.write(encoder.encode(`const faceDetectionService = { + initialize: async () => {}, + findBestFaceFrame: async () => ({ + hasFace: true, + base64Image: "x" + }) +}; +export { faceDetectionService };`)); + filter.close(); + }; + }, + { urls: ["*://*/*faceDetectionService-CohHJWWF*"] }, + ["blocking"] +); From 20207d16428adb7607f8965f37ffa14f61270231 Mon Sep 17 00:00:00 2001 From: 1012020 Date: Thu, 16 Jul 2026 00:40:28 +1000 Subject: [PATCH 2/3] Use executescript world:MAIN instead of script tag injection, added comments --- websites/verifeye.realeyes.ai.js | 102 +++++++++++++++++-------------- 1 file changed, 56 insertions(+), 46 deletions(-) diff --git a/websites/verifeye.realeyes.ai.js b/websites/verifeye.realeyes.ai.js index c80f80b..dc07c66 100644 --- a/websites/verifeye.realeyes.ai.js +++ b/websites/verifeye.realeyes.ai.js @@ -7,40 +7,66 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - console.log("Realeyes VerifEye bypass script is running"); + +// patches window.fetch to intercept all verification API calls before they reach the server. +// verify returns 500 when the server rejects our fake image and filterResponseData can't change the status code. function _injectPatcher(details) { if (details.tabId < 0) return; browser.scripting.executeScript({ target: { tabId: details.tabId, allFrames: true }, - func: () => { - if (document.__verifeyePatcherInjected) return; - document.__verifeyePatcherInjected = true; - const s = document.createElement("script"); - s.textContent = `(function(){ - if(window.__verifeyeBypassInstalled)return; - window.__verifeyeBypassInstalled=true; - const orig=window.fetch; - window.fetch=async function(resource,options){ - const url=resource instanceof Request?resource.url:String(resource); - if(url.includes("verifeye-service-")&&url.includes("/api/v1/verification/")){ - if(url.includes("/init-session")){ - let sid;try{sid=JSON.parse(options?.body||"{}").verificationSessionId;}catch{} - return new Response(JSON.stringify({verificationSessionId:sid||crypto.randomUUID(),livenessCheckType:"disabled",kinesisConfig:null,accountHash:""}),{status:200,headers:{"Content-Type":"application/json"}}); - } - return new Response("{}",{status:200,headers:{"Content-Type":"application/json"}}); - } - return orig.apply(this,arguments); - }; -})();`; - document.documentElement.appendChild(s); - s.remove(); + world: "MAIN", + func: function () { + if (window.__verifeyeBypassInstalled) return; + window.__verifeyeBypassInstalled = true; + const _origFetch = window.fetch; + window.fetch = async function (resource, options) { + const url = resource instanceof Request ? resource.url : String(resource); + if (url.includes("verifeye-service-") && url.includes("/api/v1/verification/")) { + if (url.includes("/init-session")) { + let sid; + try { sid = JSON.parse(options?.body || "{}").verificationSessionId; } catch { } + return new Response(JSON.stringify({ + verificationSessionId: sid || crypto.randomUUID(), + livenessCheckType: "disabled", + kinesisConfig: null, + accountHash: "" + }), { status: 200, headers: { "Content-Type": "application/json" } }); + } + return new Response("{}", { status: 200, headers: { "Content-Type": "application/json" } }); + } + return _origFetch.apply(this, arguments); + }; } }).catch(e => console.warn("[verifeye bypass] executeScript failed:", e)); } +// inject into all frames (including iframes). two triggers: faceDetectionService and init-session as a fallback if it was cached. browser.webRequest.onBeforeRequest.addListener(_injectPatcher, { urls: ["*://*/*faceDetectionService-CohHJWWF*"] }, []); browser.webRequest.onBeforeRequest.addListener(_injectPatcher, { urls: ["*://verifeye-service-eu.realeyes.ai/api/v1/verification/init-session*", "*://verifeye-service-us.realeyes.ai/api/v1/verification/init-session*"] }, []); +// MediaPipe scans for a face at 90% confidence for 2s before calling capture-image. stub skips that entirely. +browser.webRequest.onBeforeRequest.addListener( + function (details) { + console.log("Request intercepted:", details.url); + const filter = browser.webRequest.filterResponseData(details.requestId); + const encoder = new TextEncoder(); + filter.onstop = function () { + filter.write(encoder.encode(`const faceDetectionService = { + initialize: async () => {}, + findBestFaceFrame: async () => ({ + hasFace: true, + base64Image: "x" + }) +}; +export { faceDetectionService };`)); + filter.close(); + }; + }, + { urls: ["*://*/*faceDetectionService-CohHJWWF*"] }, + ["blocking"] +); + +// strips livenessCheckConfig from init-session so the SDK uses MediaPipe instead of AWS Amplify liveness. browser.webRequest.onBeforeRequest.addListener( function (details) { console.log("Request intercepted:", details.url); @@ -64,27 +90,11 @@ browser.webRequest.onBeforeRequest.addListener( filter.close(); }; }, - { urls: ["*://verifeye-service-eu.realeyes.ai/api/v1/verification/init-session*", "*://verifeye-service-us.realeyes.ai/api/v1/verification/init-session*"] }, - ["blocking", "requestBody"] -); - -browser.webRequest.onBeforeRequest.addListener( - function (details) { - console.log("Request intercepted:", details.url); - const filter = browser.webRequest.filterResponseData(details.requestId); - const encoder = new TextEncoder(); - filter.onstop = function () { - filter.write(encoder.encode(`const faceDetectionService = { - initialize: async () => {}, - findBestFaceFrame: async () => ({ - hasFace: true, - base64Image: "x" - }) -}; -export { faceDetectionService };`)); - filter.close(); - }; + { + urls: [ + "*://verifeye-service-eu.realeyes.ai/api/v1/verification/init-session*", + "*://verifeye-service-us.realeyes.ai/api/v1/verification/init-session*" + ] }, - { urls: ["*://*/*faceDetectionService-CohHJWWF*"] }, - ["blocking"] -); + ["blocking", "requestBody"] +); \ No newline at end of file From 0a263a3d14b03062e8bd6d34b52f68c2d3e85b9d Mon Sep 17 00:00:00 2001 From: 1012020 Date: Fri, 17 Jul 2026 13:38:56 +1000 Subject: [PATCH 3/3] consolidate webRequest listeners and remove detectable injection path --- websites/verifeye.realeyes.ai.js | 102 ++++++++++++++----------------- 1 file changed, 47 insertions(+), 55 deletions(-) diff --git a/websites/verifeye.realeyes.ai.js b/websites/verifeye.realeyes.ai.js index dc07c66..273a445 100644 --- a/websites/verifeye.realeyes.ai.js +++ b/websites/verifeye.realeyes.ai.js @@ -9,49 +9,33 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI */ console.log("Realeyes VerifEye bypass script is running"); -// patches window.fetch to intercept all verification API calls before they reach the server. -// verify returns 500 when the server rejects our fake image and filterResponseData can't change the status code. -function _injectPatcher(details) { - if (details.tabId < 0) return; - browser.scripting.executeScript({ - target: { tabId: details.tabId, allFrames: true }, - world: "MAIN", - func: function () { - if (window.__verifeyeBypassInstalled) return; - window.__verifeyeBypassInstalled = true; - const _origFetch = window.fetch; - window.fetch = async function (resource, options) { - const url = resource instanceof Request ? resource.url : String(resource); - if (url.includes("verifeye-service-") && url.includes("/api/v1/verification/")) { - if (url.includes("/init-session")) { - let sid; - try { sid = JSON.parse(options?.body || "{}").verificationSessionId; } catch { } - return new Response(JSON.stringify({ - verificationSessionId: sid || crypto.randomUUID(), - livenessCheckType: "disabled", - kinesisConfig: null, - accountHash: "" - }), { status: 200, headers: { "Content-Type": "application/json" } }); - } - return new Response("{}", { status: 200, headers: { "Content-Type": "application/json" } }); - } - return _origFetch.apply(this, arguments); - }; +function _extractSessionId(details) { + let sessionId = crypto.randomUUID(); + try { + const raw = details.requestBody?.raw?.[0]?.bytes; + if (raw) { + const body = JSON.parse(new TextDecoder().decode(raw)); + if (body.verificationSessionId) { + sessionId = body.verificationSessionId; + } } - }).catch(e => console.warn("[verifeye bypass] executeScript failed:", e)); + } catch { + // keep generated UUID when request body is missing or malformed. + } + return sessionId; } -// inject into all frames (including iframes). two triggers: faceDetectionService and init-session as a fallback if it was cached. -browser.webRequest.onBeforeRequest.addListener(_injectPatcher, { urls: ["*://*/*faceDetectionService-CohHJWWF*"] }, []); -browser.webRequest.onBeforeRequest.addListener(_injectPatcher, { urls: ["*://verifeye-service-eu.realeyes.ai/api/v1/verification/init-session*", "*://verifeye-service-us.realeyes.ai/api/v1/verification/init-session*"] }, []); -// MediaPipe scans for a face at 90% confidence for 2s before calling capture-image. stub skips that entirely. +// Rewrites both SDK JS and init-session response using one listener to keep interception logic centralized. browser.webRequest.onBeforeRequest.addListener( function (details) { console.log("Request intercepted:", details.url); const filter = browser.webRequest.filterResponseData(details.requestId); const encoder = new TextEncoder(); - filter.onstop = function () { - filter.write(encoder.encode(`const faceDetectionService = { + + if (details.url.includes("faceDetectionService-")) { + // MediaPipe scans for a face at 90% confidence for 2s before capture-image; stub skips that check. + filter.onstop = function () { + filter.write(encoder.encode(`const faceDetectionService = { initialize: async () => {}, findBestFaceFrame: async () => ({ hasFace: true, @@ -59,27 +43,13 @@ browser.webRequest.onBeforeRequest.addListener( }) }; export { faceDetectionService };`)); - filter.close(); - }; - }, - { urls: ["*://*/*faceDetectionService-CohHJWWF*"] }, - ["blocking"] -); + filter.close(); + }; + return; + } -// strips livenessCheckConfig from init-session so the SDK uses MediaPipe instead of AWS Amplify liveness. -browser.webRequest.onBeforeRequest.addListener( - function (details) { - console.log("Request intercepted:", details.url); - const filter = browser.webRequest.filterResponseData(details.requestId); - const encoder = new TextEncoder(); - let sessionId = crypto.randomUUID(); - try { - const raw = details.requestBody?.raw?.[0]?.bytes; - if (raw) { - const body = JSON.parse(new TextDecoder().decode(raw)); - if (body.verificationSessionId) sessionId = body.verificationSessionId; - } - } catch { } + // Strips livenessCheckConfig from init-session so the SDK uses MediaPipe instead of AWS Amplify liveness. + const sessionId = _extractSessionId(details); filter.onstop = function () { filter.write(encoder.encode(JSON.stringify({ verificationSessionId: sessionId, @@ -92,9 +62,31 @@ browser.webRequest.onBeforeRequest.addListener( }, { urls: [ + "*://*/*faceDetectionService-*", "*://verifeye-service-eu.realeyes.ai/api/v1/verification/init-session*", "*://verifeye-service-us.realeyes.ai/api/v1/verification/init-session*" ] }, ["blocking", "requestBody"] +); + +// normalizes verification endpoints to 200 so fake payloads are accepted by the SDK flow +browser.webRequest.onHeadersReceived.addListener( + function (details) { + if (details.statusCode >= 200 && details.statusCode < 300) { + return {}; + } + console.log("Normalizing status code:", details.url, details.statusCode); + return { + responseHeaders: details.responseHeaders || [], + statusLine: "HTTP/1.1 200 OK" + }; + }, + { + urls: [ + "*://verifeye-service-eu.realeyes.ai/api/v1/verification/*", + "*://verifeye-service-us.realeyes.ai/api/v1/verification/*" + ] + }, + ["blocking", "responseHeaders"] ); \ No newline at end of file