News for hackers. Stuff that matters.
Re:Stripe CTF Writeup by tvdw on Thursday August 30, 2012 @07:32AM (#4454040)
Yes it was. But you could optimize the brute forcing so much that you needed only ~2400 calls to the API to crack a 12 digit password.
Re:Stripe CTF Writeup by rdrey on Thursday August 30, 2012 @08:21AM (#4454199)
Could you explain how to get the request count so low, please? I fired off 1 request per possible chunk => 4000+
Re:Stripe CTF Writeup by alttag on Thursday August 30, 2012 @08:42AM (#4454292)
From the code it was clear the password was 12 numeric digits.

Chunks of the password (of equal size, see the code) were stored in multiple chunk servers. From crashing the program or reading the code, it could be determined there were four chunk servers, so each hosted three characters of the password.

Using a port-counting vulnerability (sending multiple identical requests, and rejecting guesses where the difference in response port #s was too low: 2 for first chunk, 3 for second chunk, etc.) it was possible to brute force each chunk server in sequence.

Thus, the problem space was 4*10^3 rather than 10^12.

Re:Stripe CTF Writeup by tvdw on Thursday August 30, 2012 @08:48AM (#4454312)
https://gist.github.com/38c0430b5084f8442858

You only need 1 call per possible number for each chunk, yes. But since the numbers are random between 0 to 999, that averages to 500 requests per chunk. Additionally, you don't have to do any kind of port checking for the last chunk, so that saves on any overhead you might have for the port checks. Based on this I'd say there's (3x 500 requests + 20% overhead) + 500 requests for the final block. That's 2300 requests on average.

Re:Stripe CTF Writeup by aidos on Thursday August 30, 2012 @08:30AM (#4454244)
I thought you needed 2 per possible chunk? One for the base port and another to get the port difference? Though maybe that's where I was going wrong...?
Re:Stripe CTF Writeup by tvdw on Thursday August 30, 2012 @08:49AM (#4454323)
You don't have to get the base port on each try, you can just re-use the previous result. I achieved this by simply storing them on the global scope and only keeping the "last" and "before last" port numbers.

https://gist.github.com/38c0430b5084f8442858 for my entire implementation.

Re:Stripe CTF Writeup by aidos on Thursday August 30, 2012 @08:58AM (#4454368)
Ah, of course - I did read through your code (obviously not carefully enough). How do you get down to 2400 requests though?

Edit: saw the answers above - it's 2400 average case, not worst case.

Re:Stripe CTF Writeup by jcromartie on Thursday August 30, 2012 @09:48AM (#4454589)
It's not really brute force, but an educated analysis of the results coming back. I think my script was pretty elegant.