@Tom point taken on board (see the new post title :))... I got a lot of hypothesis about the xxxxxx part but no real solution just yet.. i hope to restore the title to 2.0 though

Apologies for all the people that thought chunck 2 was already being "discovered" if discoverable, my mistake not being enough clear. Still working on it though! :) So, stay tuned!!

Orignal article

Here we go again...
I have been playing, at this point, for a while with Facebook's security as you can see here and here. Not too seriously though, also because, as who knows me well knows, that I am far away to be a security expert. I tend to observe though, and do a bunch of questions to myself . Sometimes I am able to find an answer as in the case of this post.
I have tried to go further. Can anyone guess the email address in order to pretend to be the real account holder? The answer surprisely is YES!!! :-S
As long you have any kind of access to the wall though (this happens either if you are friends of the account holder or the account holder has the wall public). Here how to reckon it :

All you need is:

• know how to convert a number from base 10 to base 36 (if you don't know how use this)
• the profile_id of the account holder (available on the URL of the account holder facebook page)
• story_id and story_type (again easily accessible from the URL on the wall)
• the current date (yes you undestood well the current day :D, e.g. today 27/02/2010)
That all you need!! Now follow this steps:

let try to do a reverse engineer approach. This is our final goal:

c+2xxxxxx000000afwdwo0m00003c6efyz2000000afwdwo

N.B. note the 6 "avoid spam" xxxxx :D

Any way lets split the email address as follow:
1. c+2
2. xxxxxx
3. 000000afwdwo
4. 0m
5. 00003c6efyz2
6. 000000afwdwo
7. 000000000000
8. 1eu
9. 1i
So here the magic reckon trick:

• chunck 3 and chunck 6 come directly from my profile_id: (631367016) base10 = afwdwo base36 (adding 000000 6 zeros to arrive to 11 digits)
• chunck 4 comes from story_type : story_type= 22 base10= 0m base36
• chunck 5 is the story_id (again in base 36): 261600937166 in base 10= 3c6efyz2 in base36 (adding 0000 4 zeros to arrive to 12 digits)
• chunk 8 is a counter incrementing every day (still in base 36):
• e.g. Jan 20 (day of the post on the wall)==> 1830 base 10 = 1eu

• Jan 21 will be iev etc
• chunck 1,9,10 are always the same
• chunk 7 will be the topic for my next post but for this purpose consider as a constant as above (always 000000000000, is 12 digits it is any hint ? :D)
And chunk 2? Well I leave to you the fun to find out :D

Well that's it. I hope I you find this interesting and I leave you with a question :

Is base 36 enough cryptic :D? And is Facebook using this great alghoritm anywhere else?

Cheers and stay tuned

TomW said…
Without the xxxxxx part, this analysis fails to provide any exploit and would not work. The use of base-36 encoding in generating this email address is not a security feature, it's just a compression feature.
TomW said…
This comment has been removed by the author.
Antonio Sanso said…
Hi Tom, I get your point and it is fair enough. But what about if I say to you the xxxxxx is also not so random?
TomW said…
Then that would be a vulnerability, but that's like saying you can crack a system as long as you knew the password. Are you saying that for any email address, you can accurately generate those 6 characters? I don't see any signs in this post that that is possible, and the rest of the analysis, while interesting, doesn't impact the security of the feature without those 6 characters.
Antonio Sanso said…
@Tom point taken on board (see the new post title :))... I got a lot of hypothesis about the xxxxxx part but no real solution just yet.. i hope to restore the title to 2.0 though

### Slack SAML authentication bypass

tl;dr  I found a severe issue in the Slack's SAML implementation that allowed me to bypass the authentication. This has now been solved by Slack.
Introduction IMHO the rule #1 of any bug hunter (note I do not consider myself one of them since I do this really sporadically) is to have a good RSS feed list.  In the course of the last years I built a pretty decent one and I try to follow other security experts trying to "steal" some useful tricks. There are many experts in different fields of the security panorama and too many to quote them here (maybe another post). But one of the leading expert (that I follow) on SAML is by far Ioannis Kakavas. Indeed he was able in the last years to find serious vulnerability in the SAML implementation of Microsoft and Github. Usually I am more an "OAuth guy" but since both, SAML and OAuth, are nothing else that grandchildren of Kerberos learning SAML has been in my todo list for long time. The Github incident gave me the final…

### Bug bounty left over (and rant) Part III (Google and Twitter)

tl;dr in this blog post I am going to talk about some bug bounty left over with a little rant.

Here you can find bug bounty left over part I and II
Here you can find bug bounty rant part I and II
Introduction In one of my previous post I was saying that:

"The rule #1 of any bug hunter... is to have a good RSS feed list."
Well well well allow me in this post to state rule #2 (IMHO)

"The rule #2 of any bug hunter is to DO NOT be to fussy with 'food' specifically with left over"

aka even if the most experience bug hunter was there (and it definitely was my case here, given the fact we are talking about no one less than filedescriptor) do not assume that all the vulnerabilities have been found! So if you want some examples here we go.
Part I - GoogleI have the privilege to receive from time to time Google Vulnerability Research Grant. One of the last I received had many target options to choose from, but one in particular caught my attention, namely Google Issue T…

### How to try to predict the output of Micali-Schnorr Generator (MS-DRBG) knowing the factorization

The article was modified since its publication. Last update was 09/10/2017

See  also Part II and Part III of this series

tl;dr in this post we are going to describe how to try predict the output of Micali-Schnorr Generator (MS-DRBG)  knowing the factorization of the n value. If this sounds like, "why the hell should I care?", you might want to give a look at this great post from Matthew Green about the backdoor in Dual_EC_DRBG. But In a nutshell, quoting Matthew Green : Dual_EC_DRBG is not the only asymmetric random number generator in the ANSI and ISO standards (see at the bottom).   it’s not obvious from the public literature how one would attack the generator even if one knew the factorization of the n values above. What I am NOT claiming in this post though is that there is a backdoor in one of this standard.

Introduction
The first time I heard about this problem is about couple of weeks ago via this Matthew's tweet: As a curiosity, the NSA didn’t just standardize Dua…