Bruteforcing HTTP Auth in Firefox with JavaScriptFriday, December 1. 2006Friday, December 1. 2006 Yesterday I blogged about a way to bypass HTTP Auth popus that used a "abuse the server" approach. Today I will show a way to bypass HTTP auth in Firefox and in some cases bruteforce HTTP auth in Firefox in some situations. The precondition for the bruteforce approach here is that the attacked server is either running PHP with expose_php=On or an application in a guessable location that contains pictures. (However combined with timing attacks and the number of requests sent depending if the password was correct or not it might be possible to do this without pictures)
<html> If you like you can combine this with your favourite HTML only timing attack that is now public and discussed for example here or take the whole thing a step further and use it for bruteforcing HTTP auth. All you need for this is to know that Firefox does agressive caching for favicons and the URL to a HTTP auth protected image. In case the server is running PHP with expose_php=On you can use the idea described here to use as attack image URL. The proof of concept code is here: <html> Please note that you can use any kind of URL that points to a HTTP auth protected image. You can obviously also use the expose_php GUIDs like ?=PHPE9568F35-D428-11d2-A769-00AA001ACF42. However you must ensure that both user:pass+URL combinations are the same because otherwise the caching will not kick in. Additionally you cannot simply reload the page, because then you will get the HTTP auth popup.
JavaScript Scanning and expose_php=OnFriday, December 1. 2006Friday, December 1. 2006 The good thing about images is that JavaScript can check if they are loaded and what size they are. With this ability it is trivial to detect if PHP is running on an URL if expose_php=On. Here is the little proof of concept: <html><head><title>Detect PHP Version by JavaScript</title>
Update-2: In one of the comments I was advised to simply use telnet and check the HTTP headers for the PHP version instead of JavaScript. The problem is that the poster misunderstood that all these JavaScript scanning tricks are things a malicious piece of JavaScript forces YOUR browser to do. This means YOUR browser executes the scan for PHP in your internal company network and sends information back to MY website. And after that I will know how YOUR internal company network is structured and if YOUR internal servers are running PHP or not. JavaScript/HTML Portscanning and HTTP AuthThursday, November 30. 2006Thursday, November 30. 2006 Several people were researching HTML portscanning during the last days. Basically this is nothing more than requesting stuff through the link tag, because it halts page rendering and checking how long it took. A typical timing attack that people nowadays even use to break RSA keys. The funny thing about this new JavaScript-less portscanning is however that they do not mention how they want to get an IP range to scan in. A person that disables JavaScript will most probably not have Java activated and without Java there is no public method to get the victim's local IP. Considering the HTML scanning speed it might take months to scan all possible private IP addresses. If you can scan a Class-C subnet in 2 minutes then you will need more than 91 days to scan only the private IP addresses in the 10.x.x.x subnet. Have fun with that... (and especially if the interesting sites are not reachable by IP but only by hostname. So you might find out that a server is up, but you still cannot attack it.)
And yes you can. The trick is to make the server reject the request before it tries to decode it or before it realises that the ressource is HTTP auth protected. The easiest way to do this, is requesting an url like http://192.168.1.1/%. The broken URL encoding will result in a HTTP 400 Bad Request error on many servers (tested against Apache, IIS and some home routers). The only culprit is Internet Explorer 7 which is unwilling to send such requests. (Similiar results were made with requests like http://192.168.1.1/%2e%2e ). However there are more tricks to make servers refuse requests that will work even in Internet Explorer. The simplest one is to request a very long URL. Something like http://192.168.1.1/AAA...LOTS_OF_AAAA..... (which even works against Google's homemade server). So far so good... Now you know how you can use simple HTML to not even scan, but also scan without triggering HTTP auth popus. To be continued... Trusted Zend ExtensionsThursday, November 30. 2006Thursday, November 30. 2006 Everyone that has used IonCube or Zend tools has most probably experienced the problem that both companies ship extensions that backdoor PHP in a way that only those extensions can be used that they consider trusted. On pages like this they claim this is another (optional) security feature. In reality it does not offer any additional security, because everyone who is able to install Zend Extensions on a server is also able to directly patch the untrusted code into the PHP installation.
Suhosin 0.9.15 comes with Transparent phpinfo() ProtectionTuesday, November 28. 2006Tuesday, November 28. 2006 During the last weeks several people blogged about open phpinfo() pages (here and here). They usually contain a lot of information about the server and therefore should not be open to the public and especially not to search engines like Google that will keep them for a long time in their archive.
Howto not treat bugreporters...Monday, November 27. 2006Monday, November 27. 2006 Today I stumbled by accident upon two wonderful examples how bugs should not get treated. One is from the Zend Framework and another one is from the PHP bug system. In both cases bugs are immediately blamed on Suhosin-Patch, although the patch is quite small and is used with lots of software without a single problem.
Zend Video Tips: Get and Post ArrayThursday, November 23. 2006Thursday, November 23. 2006 A link to a quite amusing (?) video was posted on IRC today that is one of Zend's german PHP teaching videos. You can find it here. It is supposed to teach PHP developers the usage of $_GET and $_POST.
Google Request ForgeriesThursday, November 23. 2006Thursday, November 23. 2006 Today I was reminded about a vulnerability I had totally forgotten about when I read the Securiteam blog posting about using Google to attack websites. The idea is to create a malicious website that contains links attacking web applications and submit this to the Google spider. When the Google spider crawls the page it will also follow the links and voila Google has attacked the website for you.
...&url=http://victim.com/xyz&...
Atleast this is still the behaviour while I am writing this blog entry... Noone knows how fast Google will react once this is public. While it was not public they didn't do anything about if for more than a year. CSRF protections are not doomed by XSSTuesday, November 21. 2006Tuesday, November 21. 2006 Today I was looking at rsnake's blog where he described how visiting two URLs in a row bypassed a CSRF protection implemented by last.fm. While it is funny that someone believes enforcing some kind of application flow control by URL checks can stop CSRF it was not what caught my attention.
Example: While this makes application design trickier it keeps XSS from remote controlling your browser. If you embedd a formular id into the domain you can even have XSS in one of your formulars and XSS can still not control the other forms.
Month of PHP bugsSaturday, November 11. 2006Saturday, November 11. 2006
During the last months there have been the Month of the Browser bugs and the Month of the Kernel bugs projects that tried to raise awareness for security vulnerabilities in browsers and kernels.
« previous page
(Page 5 of 10, totalling 92 entries)
» next page
|
Calendar
Categories Syndicate This Blog |
|||||||||||||||||||||||||||||||||||||||||||||||||


