Actually you are right almost all this CSS stuff are either on the talk we gave at bluehat (that wasnt very famous), and we later published the ppt, or in some google group, or I dont remember haha.. I posted some of this stuff in my blog, and gareth on his, and thornmaker also... We'll probably do a whitepaper or something like that.. just after this crazy university/start-working/talk/ppt/talk/etc.. things finish happening.. Im presenting at blackhat next week and 2 weeks after that on xcon, and well.. after that I will finally have time (and a motivation to start writing about all this and other things I left unfinished last year).
I think that all xss filters are blocking just javascript :) and that's cool since in some time we will start seeing how CSS-based attacks start appearing.
The PoC that is not on google (urlbruteforce.php) is not on google because it was distributed on a .zip, that was made by gareth last year or something like that.. Sadly google doesn't index zip files (yet).
The linking multiple stylesheets together was about using @import rules that where conditioned to the result of another rule.. This is used on the first version of the attribute reader that can be found on p42.us/css
The idea is.. having a:
<style>
@import "/?fetch-first-rules";
</style>
and fetch-first-rules has:
condition1{
background:url(/?b=condition1);
}
condition2{
background:url(/?b=condition2);
}
condition3{
background:url(/?b=condition3);
}
and then
<style>
@import "/?fetch-new-rules";
</style>
the fetch-new-rules stylesheet depend on if either which of condition 1, 2 or 3 were triggered.
You can then expand this approach by importing other stylesheets inside each imported rule, each one of them conditioned to the result of previous rules.
So, the general idea is.. you have N imports
1.- the first import will return you a histogram of the chars (eg. '0'x2,'5'x1,'6'x7, etc..)
2.- the second import will try to match and count the ocurrences of pairs of chars (eg. 00 01 05 06 56 66 etc..)
3.- the third import will try to match and count the ocurrences of each possible matched pair (eg. 0056 0066 6600 6656 6665 5600 5666 etc)
4.- the forth import will try to match and count the ocurrences of each possible matched pair of pairs. (eg. 0056 6666)
5.- the fifth import will know that the value is either one of several possible values, so it will send a try for exact matches (eg. the only possible one is 0056666666).
It's important to consider that the amount of imports needed and comparisons depend on the algorithm, and the string.
So, to answer your question:
> Can you please try to see how much time it takes on 5 or 6 digit base 16 keyspace.
It depends on the string (the base is irrelevant either base 2 or base 64 its the same), it can be either one style sheet matching single ocurrences (like 012345 that is best case scenario) or in the worst case scenario.. for 6 chars, it could be 3 very big includes (its pretty easy actually) or several smaller includes. (so, you have either 3 big stylesheets or 5 small stylesheets).
When it gets complicated is when the base exceeds the length of the string (base 16 with 32 chars for example), since then the algorithm is more complex when matching single occurrences.
Check the PoC's algorithms and the PPT..
Greetings!!
--------------------------------
irc://irc.irchighway.net/#slackers --> sla.ckers.org IRC channel
[
sirdarckcat.blogspot.com] [
www.sirdarckcat.net] [
foro.elhacker.net] [
twitter.com]
Edited 9 time(s). Last edit at 07/22/2009 10:36AM by sirdarckcat.