Researcher: JavaScript Attacks Get Slicker
April 19, 2007An Arbor Networks researcher at CanSecWest details JavaScript exploits' increasingly sophisticated means of attack and what tools to use to fight them.
Malicious JavaScript is getting smarter. It's now able to fingerprint victims' Web browsers, vulnerable components and accessible CLSIDs, and deliver custom-tailored exploits, according to Dr. Jose Nazario, senior security engineer for Arbor Networks.
Nazario was referring to NeoSploit, a new malware tool he's seen in the wild that carries at least seven distinct exploits to infect a PC with, from which it can choose based on what that PC's weak points are.
"We're seeing a lot of this in the past several months, a lot of malicious JavaScript - at - large," he said. "People are getting more defensive and offensive with JavaScript."
Nazario was speaking at his session on reverse-engineering JavaScript malware on April 18 here at the CanSecWest security show. What he meant by saying that attackers are using JavaScript more defensively is that researchers are increasingly finding exploit code that's using more sophisticated means to obfuscate itself so that security systems won't pick up on exploits.
Malicious JavaScript delivers browser exploits by, for example, using adodb.Stream() or setSlice() objects, often dropping ActiveX/VBScript content in order to download malware onto a system. Obfuscated JavaScript in its simplest form uses opaque code to thwart static code review and thereby hide its author's methods and intents. The obfuscation can range from simple ASCII chr() or ord() techniques to Base64 encoding or use of a tool such as iWebTool HTML Encrypt to hide HTML or to string splits or joins to build an AJAX object.
On the simple end, for example, a string split would render a word like this:
Daxhi="A"+pplica"+"tion";
Vvu=".";
This resulting malicious code, of which the above is a small portion, would be easily detected by a human, but, as Nazario pointed out, it presents an effective stumbling block for automated detection.
Attackers also use double obfuscation, Nazario said. On top of simple joins or splits or single encoding, they use double encoding, often with a custom decoder. While several people like to use the browser to decode such exploits, Nazario said it's a bad idea, as the technique is too slow to get full information from a browser under zero-day conditions.
A better idea, he said, is to divorce the JavaScript engine from the browser with a tool such as NJS - an independent implementation of the JavaScript language developed by Netscape and standardized by the ECMA, and designed to be re-entrant, extensible, fast and programmable. Other decoding tools include SpiderMonkey, a JavaScript-C engine from the Mozilla Foundation, and Rhino, an open-source implementation of JavaScript written entirely in Java.
As Nazario described it, reverse-engineering double-decode malware essentially entails cleaning up the HTML and decoding on the command line. This results in code that still requires decoding, so the process is to repeat until the code is no longer encoded.
However, "Life isn't always this easy," Nazario said. "There are lots of defensive JavaScript - code samples - coming around that kill all sorts of inspection routines."
For example, because NJS doesn't know about "arguments," attackers have used "arguments.callee" to make their code tamper-proof. Callee is a property of arguments as a local variable available within all function objects that allows anonymous functions to refer to themselves. That's necessary for writing recursive strings, which, when executed, cause an endless loop and throw a monkey wrench into reverse engineering.
Enter SpiderMonkey, Nazario said. Because SpiderMonkey will choke on certain functions such as alert() or print(), it's impervious to attackers' use of those functions to mess with decoding efforts. Once it chokes, a researcher doing reverse engineering can use another language, such as Python.
In short, as attackers increasingly use JavaScript as a delivery vehicle for malware, Nazario suggested, one of the first steps in defense should be to learn JavaScript and to learn how to love it - not a hard task, given that it's a relatively easy language, he said.
On the up side, attackers using JavaScript are currently limited by the fact that the language has to be decoded to be used by a browser. Also, the tools attackers are using to obfuscate their code and its intent are primitive. But, given that you need a human to analyze the code, those primitive tools are still effective, Nazario said.
At any rate, JavaScript malware is just taking its baby steps. "They'll continue to push the envelope," Nazario said - in other words, we can likely look forward to seeing Malware 2.0 rise to meet the much-ballyhooed Web 2.0.
Copyright 2007 by Ziff Davis Media, Distributed by United Press International
-
3Qs: An Apple for the teacher - and student
Jan 31, 2012 |
1 / 5 (1) |
0
-
Google Dart debut sparks chatter of JavaScript coup
Oct 12, 2011 |
4.3 / 5 (3) |
0
-
IBM donating cooperative web technology that enables life changing healthcare solutions
Oct 04, 2011 |
5 / 5 (1) |
1
-
With new Windows 8, Microsoft will show whether it can go mobile
Sep 13, 2011 |
not rated yet |
0
-
Firefox looks to use HTML5 to run PDFs in the web browser
Jun 17, 2011 |
5 / 5 (5) |
5
-
Engineers build first sub-10-nm carbon nanotube transistor
Feb 01, 2012 |
4.9 / 5 (31) |
30
-
Something old, something new: Evolution and the structural divergence of duplicate genes
Jan 31, 2012 |
4.6 / 5 (7) |
1
-
The hidden nanoworld of ice crystals: Revealing the dynamic behavior of quasi-liquid layers
Jan 30, 2012 |
5 / 5 (3) |
1
-
Stock market network reveals investor clustering
Jan 27, 2012 |
3.9 / 5 (23) |
8
-
Of microchemistry and molecules: Electronic microfluidic device synthesizes biocompatible probes
Jan 26, 2012 |
5 / 5 (1) |
0
-
Calling function with no input argument
4 hours ago
-
Force free body diagram problem on gym equipment
5 hours ago
-
Empirical data regarding shower heads and water
13 hours ago
-
feed hold button on CNC lathe
Feb 09, 2012
-
RFAC in Fortran
Feb 09, 2012
-
dynamics 2/32
Feb 08, 2012
- More from Physics Forums - General Engineering
More news stories
Expat French get Internet vote for first time
French citizens will for the first time this year be able to vote in a parliamentary election over the Internet, an experiment that could be extended to other elections if successful.
1 hour ago |
not rated yet |
0
"Twisted Metal" gamers get shot at real gunplay
Fans of "Twisted Metal" will get to welcome a long-awaited sequel of the car-battle videogame with a real-world bang by blasting an ice cream truck to bits with a machine gun.
56 minutes ago |
not rated yet |
0
New error-correcting codes guarantee the fastest possible rate of data transmission
Error-correcting codes are one of the triumphs of the digital age. Theyre a way of encoding information so that it can be transmitted across a communication channel such as an optical fiber o ...
Technology / Computer Sciences
7 hours ago |
5 / 5 (3) |
4
|
Small modular reactor design could be a 'SUPERSTAR'
(PhysOrg.com) -- Though most of today's nuclear reactors are cooled by water, we've long known that there are alternatives; in fact, the world's first nuclear-powered electricity in 1951 came from a reactor ...
Technology / Energy & Green Tech
6 hours ago |
4.2 / 5 (10) |
14
|
Advanced power-grid model finds low-cost, low-carbon future in West
(PhysOrg.com) -- The least expensive way for the Western U.S. to reduce greenhouse gas emissions enough to help prevent the worst consequences of global warming is to replace coal with renewable and other ...
Technology / Energy & Green Tech
6 hours ago |
5 / 5 (2) |
6
|
Putting the squeeze on planets outside our solar system
(PhysOrg.com) -- Using high-powered lasers, scientists at Lawrence Livermore National Laboratory and collaborators discovered that molten magnesium silicate undergoes a phase change in the liquid state, abruptly ...
Employers feel no love for unscrupulous practice of 'service sweethearting'
A new study led by two Florida State University marketing professors finds that some frontline service employees who are rewarded for hikes in customer loyalty and satisfaction also may engage in "service ...
Human cognitive performance suffers following natural disasters, researchers find
Not surprisingly, victims of a natural disaster can experience stress and anxiety, but a new study indicates that it might also cause them to make more errors - some serious - in their daily lives. In their upcoming Human Fa ...
The power of estrogen -- male snakes attract other males
A new study has shown that boosting the estrogen levels of male garter snakes causes them to secrete the same pheromones that females use to attract suitors, and turned the males into just about the sexiest ...
Curry spice component may help slow prostate tumor growth
Curcumin, an active component of the Indian curry spice turmeric, may help slow down tumor growth in castration-resistant prostate cancer patients on androgen deprivation therapy (ADT), a study from researchers ...
Fool's gold may prove an unlikely alternative to overexploited catalytic materials
Catalytic materials, which lower the energy barriers for chemical reactions, are used in everything from the commercial production of chemicals to catalytic converters in car engines. However, with current catalytic materials ...