Hacking Intranet Websites from the Outside "JavaScript malware just got a lot more dangerous"
Jeremiah Grossman, Founder and CTO of WhiteHat Security, Inc.
T.C. Niedzialkowski, Sr. Security Engineer, WhiteHat Security, Inc.
Booksigning: Hacker’s Challenge 3 with Jeremiah Grossman and Himanshu Dwivedi at 12:30 on Thursday, August 3 at the BreakPoint Books booth.
Imagine you’re visiting a popular website and invisible JavaScript exploit code steals your cookies, captures your keystrokes, and monitors every web page that you visit. Then, without your knowledge or consent, your web browser is silently hijacked to transfer out bank funds, hack other websites, or post derogatory comments in a public forum. No traces, no tracks, no warning sirens. In 2005’s "Phishing with Superbait" presentation we demonstrated that all these things were in fact possible using nothing more than some clever JavaScript. And as bad as things are already, further web application security research is revealing that outsiders can also use these hijacked browsers to exploit intranet websites.
Most of us assume while surfing the Web that we are protected by firewalls and isolated through private NAT'ed IP addresses. We assume the soft security of intranet websites and that the Web-based interfaces of routers, firewalls, printers, IP phones, payroll systems, etc. even if left unpatched, remain safe inside the protected zone. We believe nothing is capable of directly connecting in from the outside world. Right? Well, not quite.
Web browsers can be completely controlled by any web page, enabling them to become launching points to attack internal network resources. The web browser of every user on an enterprise network becomes a stepping stone for intruders. Now, imagine visiting a web page that contains JavaScript malware that automatically reconfigures your company’s routers or firewalls, from the inside, opening the internal network up to the whole world. Even worse, common Cross-Site Scripting vulnerabilities make it possible for these attacks to be launched from just about any website we visit and especially those we trust. The age of web application security malware has begun and it’s critical that understand what it is and how to defend against it.
During this presentation we'll demonstrate a wide variety of cutting-edge web application security attack techniques and describe bestpractices for securing websites and users against these threats.
You’ll see:
* Port scanning and attacking intranet devices using JavaScript
* Blind web server fingerprinting using unique URLs
* Discovery NAT'ed IP addresses with Java Applets
* Stealing web browser history with Cascading Style Sheets
* Best-practice defense measures for securing websites
* Essential habits for safe web surfing
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Hacking Intranet Websites from the Outside
1. Hacking Intranet Websites from the Outside Black Hat (USA) - Las Vegas 08.03.2006 "JavaScript malware just got a lot more dangerous" Jeremiah Grossman (Founder and CTO) T.C. Niedzialkowski (Sr. Security Engineer)
2.
3.
4.
5.
6. Intranet users have access To access intranet websites, control a user (or the browser) which is on the inside.
7. Hacking the Intranet special thanks to: Robert “RSnake” Hansen http://ha.ckers.org / JavaScript Malware Gets behind the firewall to attack the intranet. operating system and browser independent
8.
9. Contracting JavaScript Malware 1. website owner embedded JavaScript malware. 2. web page defaced with embedded JavaScript malware. 3. JavaScript Malware injected into into a public area of a website. (persistent XSS) 4. clicked on a specially-crafted link causing the website to echo JavaScript Malware. (non-persistent XSS)
10. Stealing Browser History JavaScript can make links and has access to CSS APIs See the difference?
12. NAT'ed IP Address If we can get the internal subnet great, if not, we can still guess for port scanning... IP Address Java Applet This applet demonstrates that any server you visit can find out your real IP address if you enable Java, even if you're behind a firewall or use a proxy. Lars Kindermann http://reglos.de/myaddress/ Send internal IP address where JavaScript can access it <APPLET CODE="MyAddress.class"> <PARAM NAME="URL" VALUE="demo.html?IP="> </APPLET>
13. JavaScript Port Scanning <SCRIPT SRC=” http://192.168.1 .100/”></SCRIPT> If a web server is listening on 192.168.1.100, HTML will be returned causing the JS interpreter to error. CAPTURE THE ERROR! We can send HTTP requests to anywhere, but we can ' t access the response (same-origin policy). So how do we know if a connection is made?
14.
15. Apache Web Server /icons/apache_pb.gif HP Printer /hp/device/hp_invent_logo.gif PHP Imae Easter eggs /?=PHPE9568F36-D428-11d2-A769-00AA001ACF42 Blind URL Fingerprinting There is a web server listening, but can ' t see the response, what is it? Cycle through unique URL’s using Image DOM objects <img src=” http://192.168.1 .100/unique_image_url” onerror=”fingerprint()” /> If the onerror event does NOT execute, then it ' s the associated platform. Use OnError! Many web platforms have URL’s to images that are unique. Technically, CSS and JavaScript pages can be used for fingerprinting as well.
16.
17. DSL Wireless/Router Hacking Login, if not already authenticated http://admin:password@192.168.1.1/ Factory defaults are handy!
18. Change the password /password.cgi?sysOldPasswd=password&sysNewPasswd=newpass&sysConfirmPasswd=newpass&cfAlert_Apply=Apply POST to GET
20. Network Printer Hacking /hp/device/set_config_deviceInfo.html?DeviceDescription=0WNED!&AssetNumber=&CompanyName=&ContactPerson=&Apply=Apply POST to GET
21. Network Printer Hacking Auto-Fire Printer Test Pages /hp/device/info_specialPages.html?Demo=Print POST to GET
22.
23. Anybody can be a victim on any website Trusted websites are hosting malware. Cross-Site Scripting (XSS) and Cross-Site Request Forgery vulnerabilities amplify the problem.
24.
25. Exploited on popular websites Exploitation Leads to website defacement, session hi-jacking, user impersonation, worms, phishing scams, browser trojans, and more...
30. Two Factor Authentication Corporate Web Surfing Filters Security Sockets Layer (SSL) Stay away from questionable websites Not going to work Patching and anti-virus Useful for other threats, but not against JavaScript malware.