WEB BROWSER ATTACKS WEB BROWSER ATTACKS Introduction
Total Page:16
File Type:pdf, Size:1020Kb
WEB BROWSER ATTACKS WEB BROWSER ATTACKS Introduction ................................................................................................................................................. 4 What is Web Browser? ................................................................................................................................ 4 Mozilla Firefox ......................................................................................................................................... 5 Google Chrome ........................................................................................................................................ 6 Apple Safari .............................................................................................................................................. 7 Enumerating Web Browsers ........................................................................................................................ 7 Using HTTP Headers ................................................................................................................................. 8 Using DOM Properties ........................................................................................................................... 11 What is HTTP/2? ........................................................................................................................................ 12 Is this actually good? .............................................................................................................................. 12 What is an Http Cookie? ............................................................................................................................ 14 Why are Cookies of Interest? ..................................................................................................................... 14 What is a Cookie jar? ............................................................................................................................. 14 Cookie Structure .................................................................................................................................... 15 What are Cookie Attributes? ................................................................................................................. 16 Cookie Secure Attribute ......................................................................................................................... 16 Cookie Domain/Path Attribute .............................................................................................................. 16 Cookie Expires Attribute ........................................................................................................................ 16 Cookie HTTPOnly Attribute .................................................................................................................... 17 Bypassing Path Attribute Restrictions ........................................................................................................ 17 Cookie Jar OVerflow ................................................................................................................................... 17 Tracking Cookies ........................................................................................................................................ 22 Session-Hijacking Attacks ........................................................................................................................... 23 Firesheep ............................................................................................................................................... 23 Bypassing HTTPS ........................................................................................................................................ 24 Downgrade HTTPS to HTTP using Ettercap filters ...................................................................................... 24 What is Ettercap? ................................................................................................................................... 24 What is MITM? ...................................................................................................................................... 24 Ettercap Filters? ..................................................................................................................................... 25 How to hack Certificates ........................................................................................................................ 26 Fake Certificates .................................................................................................................................... 26 Vulnerabilities in SSL/TLS Layer ............................................................................................................. 27 Attack on browser using Metasploit .......................................................................................................... 28 Exploit with Metasploit .......................................................................................................................... 28 Metasploit Browser Autopwn ................................................................................................................ 33 Metasploit IE-10 exploit ......................................................................................................................... 35 Reference ................................................................................................................................................... 38 WEB BROWSER ATTACKS Page 3 of 38 Introduction Through this mini course, you will learn: • What a browser is • Different types of browsers • How to enumerate web browsers using the HTTP header • Using DOM properties, working on http cookies • Why a cookiejar is required in a browser • Cookie structure and its attributes • Downgrade https to http • How hacker hack using fake certificates and by leVeraging SSL/TLS Vulnerability • How you can exploit browser-based vulnerability using Metasploit. What is Web Browser? A web browser, commonly referred to as a browser, is a software application for retrieving and information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier/Locator (URI/URL) and may be a web page, image, Video or other piece of content. Hyperlinks presented in resources enable users to naVigate their browsers easily to related resources. Although browsers are primarily intended to use the World Wide Web, they can also be used to access information proVided by web serVers in private networks or files in file systems. In other words, the browser is a power full tool through which you can access internet. The major web browsers are Mozilla Firefox, Internet Explorer, Google Chrome, Opera, and Safari WEB BROWSER ATTACKS Page 4 of 38 Mozilla Firefox Mozilla Firefox, known simply as Firefox, is a free and open-source web browser deVeloped for Windows, OS X, and Linux, with a mobile Version for Android, by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. Firefox uses the Gecko layout engine to render web pages, which implements current and anticipated web standards. FIGURE 1: MOZILLA FIREFOX WEB BROWSER ATTACKS Page 5 of 38 Google Chrome Google Chrome is a freeware web browser deVeloped by Google. It used the WebKit layout engine until version 27 and, with the exception of its iOS releases, from version 28 and beyond uses the WebKit fork Blink. It was first released as a beta version for Microsoft Windows on September 2, 2008, and as a stable public release on December 11, 2008. FIGURE 2: GOOGLE CHROME BROWSER WEB BROWSER ATTACKS Page 6 of 38 Apple Safari Safari is a web browser developed by Apple Inc. included with the OS X and iOS operating systems. First released as a public beta on January 7, 2003, on the company's OS X operating system, it became Apple's default browser beginning with Mac OS X V10.3 "Panther". The natiVe browser of iOS is also called Safari, but has a different graphical user interface (GUI) and uses a different WebKit version and application programming interface (API) FIGURE 3: APPLE SAFARI Browsers are always prime targets for hackers. Some browser Vendors haVe already introduced a Bug Bounty Program, which says, “if you are a security researcher or white hat hacker and you think you haVe found any security Vulnerability report it to us and get some cash rewards and add your name in Security Hall of Fame”. This makes browsers an even more interesting target for hackers. As many of the users are managing their bank account online, doing online shopping, and paying though a credit card, or debit card, browser security is mandatory to preVent users from online fraud or hacking. In the next section, we will haVe a look at how to launch attacks directly against the web browser, how to fingerprint browsers, attack sessions and cookies, HTTPS attacks, and many other techniques. Enumerating Web Browsers Before exploiting any target, it’s good to explore its version and other information as much as you can. The browser fingerprint is information collected about a remote computing deVice for the purpose of identification of version. Fingerprinting identifies the platform and Version of a browser and identifies a specific browser such as Mozilla, Internet Explorer, Opera, and Safari etc. Now, we haVe understood how browser fingerprinting is important howeVer, question arises how to do that. Well, let’s haVe