start	end	text
0	4640	Okay, if everyone's ready, we'll get started with the next talk. The next talk is for Martin
4640	9040	and it is from email address to phone number. I've introduced a lot of talkers so far over
9040	13400	the past two days, and each time I get given a wonderful little bio that I then basically
13400	17780	get given one line. For Martin, I got given a whole paragraph. And I'm not going to read
17780	22280	the whole paragraph, I will read the final line of the paragraph. And it says, outside
22280	27960	of the office, Martin enjoys research, bug bounties, gin and tonics, and scuba diving.
27960	31380	On that night, I'm going to hand over for his presentation. Gin and tonic, gin and tonic
31380	37600	for the win. All right. Thanks for coming to this talk. It's going to be audience related
37600	43640	and basically what we are trying to see is new ways for you to go from an email address that
43640	50040	you may have of your target, how maybe you could get the victim's phone number. So my name
50040	56640	is Martin Vigo, no introductions needed. I do now red teaming from Galicia Spain. That's
56640	62280	important that I mention that. And the gin and tonic thing was already said. So since the
62280	66820	talk is about going from an email address to a phone number, I kind of wanted to put these
66820	73840	slides up. And this is my view of it, so kind of like a spectrum of how I feel in terms of
73840	80380	privacy when some of my PII leaks. My email address is something that I hand out, so I'm
80380	85540	not concerned. Obviously my social security number will be the worst thing for me. And I
85540	89800	kind of like put the phone number in between, right? The phone number, I give it to a lot of
89800	93700	people, even to people that I don't know, that I just met. But it's not something that I'm
93700	100240	comfortable making public online or anything like that. And I will assume that many of you
100240	106240	kind of relate to this. This is from a privacy standpoint, but from security it's also
106240	111460	important, right? What's the difference between your email leaking, your email address and
111460	115700	your phone number? We saw that in terms of privacy, that's important. But in terms of
115700	120700	security, if an attacker has your email address, right, what can they do? And you know,
120700	127140	like they can spam you or try to phish you so that you click on a link or anything like
127140	133140	that. They could potentially target actually people you know by spoofing the email address,
133140	137960	right? So pretending to be you, so that they get to click on something. And probably the
137960	143060	worst part would be going to sites like have I been pounded or any of those sites that give you
143060	149020	like, oh this person, you know, their data leaked on LinkedIn in 2012 and then you can go
149020	153900	somewhere to get actually those credentials in the deep web or whatever. If the phone
153900	158020	number leaks, in terms of security, we have kind of the same thing, right? People can spam
158020	163200	you, it's actually more annoying because it's more invasive to receive a phone call. There
163200	168160	could be also phishing, someone pretending to be someone else, and spoofing as well, right?
168160	172900	It's online, you can find services even free that you can spoof a caller ID and pretend
172900	177020	being someone else, again, maybe targeting someone you know. And then we get into the more
177020	182300	interesting stuff. You may or may not be related with HLR registers, but that's basically a
182300	187540	global database, that's kind of how the phone system works, just very simplified, but you are
187540	191020	able to query some information about the phone number and that can include if the phone
191020	195660	number is roaming or not. Someone may know if you are in a different country and maybe
195660	201880	target your house, for example, and this is usually free or very, very cheap, for ten cents,
201880	206940	Twilio, you go to slash lookup, and you can do that just with a phone number. And then,
206940	211480	like, for example, I gave last year a talk on voicemail hacking, so what you need is the
211480	215520	phone number, right? And the impact is very, very big because they could compromise all
215520	223160	your accounts. We have things like fake cell towers, SS7 attacks, SIM swapping is big, we
223160	228280	hear over and over again about people getting their Bitcoin wallets drained because someone
228280	232740	did a SIM swapping attack, again, for that you need the phone number. So there is a big
232740	237520	difference between leaking your email and leaking your telephone number in terms of
237520	243200	security. But for who would that be useful, right? For whom would it be useful to know a
243200	247600	technique in which you can go from an email address to a phone number. On the good
247600	252180	spectrum, again, we have private investigators that may be working a case, going after
252180	256740	someone that is malicious and they want to find more information, think about it, a phone
256740	261040	number gives you, for example, location data, right? There was an excellent talk a couple
261040	266540	hours ago from Joseph Cox, kind of talking about that. Most professionals, probably like
266540	270200	many of you guys, this is important, but also for red teamers, imagine that you actually
270200	276680	get credentials from someone, right? That you are trying to target and they have 2FA. So
276680	280340	now if you have a way from that email address to get the phone number, that would be
280340	284220	really useful because you can try to phish the people or do some more advanced attacks.
284220	288580	But unfortunately, we also have the bad side. If there is ways that someone from an
288580	292960	email address can get your phone number, that could be useful for stalkers or for people
292960	298280	trying to dox you, right? Or even for spammers. We probably got calls from a recording
298280	303780	talking in Chinese, talking about some taxes, it's very popular in the U.S. Okay, so
303780	309360	what are the classic methodologies that we know to get from an email address to a phone
309360	313140	number? Like you can do Google dorks, maybe someone has in a forum posted their phone
313140	318520	number and their username is actually the email. Public records, you can go to court and
318520	322900	stuff like that, it's more advanced stuff. Classic, people search engines, you go to
322900	327040	Spokeo, two people find there, put an email address, you are likely to get a phone
327040	331900	number. Social engineering, you know, you can target someone, data leaks, yada yada yada.
332420	338380	So the purpose of this talk is just to add new tricks to your back of tricks. And there
338380	342560	are new OSINT tools that you can use for your investigations. I hope all of you are on
342560	348500	the good side of the spectrum. So, I talked about before the voice, the voicemail hacking,
348500	352820	right? So I did two talks, I did that one and another one related to SMS and stuff like
352820	359020	that. So I spent many, many hours resetting passwords last year during my investigations.
359240	362240	So I started to notice a pattern, right? Because I was resetting passwords in many
362240	366600	accounts. And the case was that when you reset a password, right, you can get a text
366600	371140	and it will tell you, I'm going to send you an SMS to blah blah blah. So it's basically
371140	376680	PII masking. The problem is, which is what I realized, is that not everyone is masking
376680	382040	the same thing. There is a lack of standardization in the way we do PII masking.
382040	387420	eBay was actually the worst that I could see. It's showing to anyone that has your email
387420	391840	address and initiates the password reset with that, the first three digits of your area
391840	395500	code, this is for American numbers, and the last two. PayPal is the first one and the
395500	400600	last four. LastPass is the last four. Yahoo is the first one, the last two. And the most
400600	407360	common thing I've seen is the last two. I want to stress again the lack of standardization
407360	414220	in PII. This is both cases PayPal. PayPal, if I go to reset your password with just the
414220	418920	email, that's all I know, I will get five digits. If I have your password and I get
418920	425540	challenged with 2FA, I only get three. So the same service thinks that it needs to mask
425540	430260	more information from someone that has also your password than from someone that has only
430260	435540	your email. This is obviously different developers working on it, that's my guess, but this again
435540	442080	is the proof that we have no standardization. So the power comes from the combination. I
442080	447300	can perfectly go around to the top websites and start to reset your password just with
447300	456060	your email. Who has eBay and PayPal? You guys don't want to admit it, right? Okay, so a
456060	461520	bunch of liars, I like it. So who has eBay and LastPass? Alright, thank you, he's my
461520	467760	friend actually. Yahoo and LastPass, right? I'm pretty sure many of you at least can think
467760	472740	of someone close to them that may have at least eBay and PayPal, which I will claim is like
472740	478580	the most common services. With that, with those two services, I have 7 out of your 10
478580	486500	digits. 7 out of your 10 digits. Alright, so when I got here, you know, I was thinking
486500	491740	like, okay, I have 1,000 numbers left. 1,000 numbers that are possible for you, right?
492060	496340	From 10 billion is quite significant. But, you know, I thought it was cool, it was nice,
496340	501100	but I didn't know how to go forward. And I appreciate a coworker, like I showed him this
501100	506460	and he told me, oh, you're actually missing the exchange. And I'm from Spain, so I'm not
506460	511160	very familiar with American numbers, right? And then I said, oh, okay, so the exchange
511160	516700	is those three numbers I knew about the area code, right? So that threw me into a rabbit
516700	521100	hole that was fascinating and I learned so much from the telephone system and that's
521100	525940	what we are going to talk about now. So, the thing is, now we are focusing not on how many
525940	534580	numbers we don't know, but which ones we don't know. And that's the exchange. Enter the...
537870	543170	That's good, that's what we are going to get at. Exactly, there are actually more. Good
543170	549310	point. And we are going to get into that. Exactly. And actually, 211, 311, we're going
549310	554830	to get into that. So, enter the North American Numbering Plan Administration. So this is
554830	560590	actually an organization that is mostly in charge of assigning phone numbers, right? That's
560590	567170	what they are taking care of. And they have a website with public available information
567770	572190	with basically, apart from many other very interesting things, which is what allowed
572190	578150	me to learn all these things, it has the list of area codes and its assigned exchanges.
578150	584570	That means that not all area codes have all the exchanges, right? For example, as the
584570	592670	gentleman said, the first 200 numbers are not assigned to the area code. So we get there,
592670	597110	for example, 800 numbers only possible from the 1,000 that we had because we were missing
597110	603330	three digits. Take Tacoma. Tacoma 253 area code, I was looking for one that was very
603330	612770	significant, only has 458 exchanges. So we just went down from 1,000 numbers to 558 possible
613090	621010	just with your email address and with publicly available information. So, 458 numbers is
621010	626350	very good. I will even claim that you can, with some automation, maybe using Twilio APIs,
626350	631510	do phone calls and try to figure out actually which one it is, but I wanted to go deeper
631510	637310	the rabbit hole. I learned a lot and find ways to actually reduce that list even more
637310	642310	because that's ultimately what we are trying to do. Enter the National Pooling Administration.
642310	650390	I also had no idea about this. So, hear me out. The way it works is, area codes and exchanges
650780	658530	are assigned historically to a location and specifically to a carrier, right? So, take 415200
659240	666410	is for AT&T. 415201, I mean the numbers that start by those digits, is for Verizon, right? And
666410	674510	the 415200 and 401 is exchanged for Sausalito. So, Sausalito has only 7,000 people living
674510	681250	there. Residents. So, if you think about it, we have 4 or 5 major carriers. We are assigning
681250	690310	50,000 possible numbers to an area that only has 7,000 residents, right? Because 401200, 401201
690310	696130	for the different carriers, those are blocks of 10,000 digits. It's the last four digits. So,
696130	701230	it's a huge waste of phone numbers. So, I learned that the FCC came out with a document and
701230	707490	suggested that the first digit of the subscriber number will represent the block. So, instead
707490	714990	of assigning blocks of 10,000 digits, we will be assigned blocks of 1,000 digits. So, now it will
714990	725610	be 4152000 for AT&T, 4152001 for Verizon. So, we are assigning blocks of 1,000 numbers so we
725610	732650	don't waste that many. Again, the website has publicly available information, a database, in
732650	739230	which you can go check if an area called Proceed Exchange is a pooled area called an exchange,
739230	745790	which is kind of the lingo, and if so, what are the blocks that are actually assigned today? So,
745790	751070	there are blocks that are not, so you can discard all those blocks of 1,000 numbers because, as
751070	757230	we can see in this slide, this is from the nationalpooling.com, if you look at the bottom,
757230	763570	which is zoomed in, we see that the 415272, which is an area code for Sausalito, the only
763570	768430	possible number could be the next one, it would be the 9, because it's the only block that is
768430	774550	assigned to that area code in exchange. We can already discard all the others. This is great.
774550	781750	This is publicly available information. So, take now, someone from Tacoma, right, with an
781850	788350	e-mail and a Paypal account. So, I got from eBay the area code, 253. I got from Paypal the
788350	795350	subscriber number, which is 9123. Now, from Nampa, the website, I get that there are only
796830	803810	458 exchange numbers for the 253 area code. And from the pooling administration, I get that the
803810	813090	block number 9 is only on a 444 exchange number. So I discarded even 13 exchange numbers that
813090	822710	don't have the 9 block available. Awesome. So, we got from 10 million numbers to 444 by using
822710	828430	an e-mail address and publicly available information. This is cool, again, but I wanted to
828430	833210	find a way in which I could go to actually, this is the number of the person. This is what I
833210	838690	have. Without having to make any phone calls for free and that it only requires me the e-mail
838690	845430	address. So, I went over what I did, you know, I went back to the drawing board and I thought
845430	850090	about, okay, the way I'm doing it is I'm taking the e-mail, initiating password research, and
850090	854610	I'm getting digits from the phone number. Are there services that I can go reset a password
854610	860850	with a phone number and get letters back from an e-mail? Yes, there is. So, and that is
860850	866110	exactly what we are doing. Amazon shows you when you go reset with a phone number, the
866110	871430	first letter and the last letter of the username plus the entire domain. Twitter, but the
871430	879670	best thing is that the stars that you see that are masking those letters match the number of
879670	884510	characters that were masked. So, it's giving me also the length of the username. Twitter
884510	890390	shows you the first two and the first letter of the domain. And there are many more. So, this
890390	895750	is exactly what we are doing. We have a list of 445 possible numbers that we reduce with an
895850	903170	e-mail address. All we've got to do now is go and, with that list, iterate over it and start to
903170	909450	reset passwords, look at the masked e-mail correlated to the one that we have originally, and
909450	913730	we will find the phone number. So, the attack vector looks like this. First you go harvest with
913730	917710	an e-mail address, different digits on different websites. Then you use publicly available
917710	923430	information and your knowledge of the phone number implant system. And then with the list
923430	929230	that you hopefully reduced quite significantly, you use those other services to initiate
929230	933590	password research with the list of phone numbers and correlate the masked characters that
933590	939450	you get back from the e-mail. Automation. So, this is where the thing, right? I just told you
939450	945670	no one is going to do that manually, right? So, I created a Python script that is your new
945670	953130	OSINT tool to go do this. And it basically automates the entire process. So, it will go to
953130	959490	those top websites and with an e-mail address it will scrape those digits. Then it will allow
959490	965170	you to generate, by providing a mask, say we found that it's 415, we're missing the next three
965170	969190	and we have the subscriber number, you just put that there, it will go fetch the information,
969190	973010	it will use all the intelligence that I just told you and give you a list back of the
973010	977870	possible phone numbers. And then it will also allow you to go again back to those services,
977870	983390	reset the password with those e-mail lists and think about it. You cannot be blocked because
983390	988610	we are only trying to reset a password once per phone number, right? It's not that we are
988610	992090	hammering a brute force and then they are going to lock the account. So, actually it
992090	997710	supports proxies to bypass captures and things of that nature, right? And it's publicly
997710	1007010	available now in the my github repo. Let's look at a demo. Alright, so um, eh, we're going
1007010	1011730	to do a victim USA at martinvigo.com, it's a phone number from the US, right? I hope you
1011730	1016410	can see it, that's why I was saying sit close. So we're going to use the scrape option and
1016410	1020830	all we're going to provide is an e-mail address. And in this case for the demo, again this is
1020830	1026270	so you guys also contribute to the tool, it's just going to go to eBay and LastPass because
1026270	1031010	one gives me the first three and the other gives me the last four. And the way it works is it
1031010	1035350	kind of writes a report for you with everything that it could find about it, right? Not just
1035350	1039150	the digits, sometimes I can tell for example from LastPass if the phone number is from a
1039150	1044350	different country because in the UI of LastPass it adds the plus if it's not a non US
1044350	1049730	number. So we just learned 415 are the first three, 8816 are the last four from eBay and
1049730	1054270	LastPass. Next option I'm going to use with the tool is generate. And I'm going to give it a
1054270	1061650	mask, right? With the option M and substitute the digits that I don't know with simple X. And
1061650	1066750	so we will use that to go and try to reduce the list. Right now we will have 1000 possible
1066750	1071530	numbers, just as I explained before, it's going and downloading and it gives you a list that
1071530	1076330	you obviously can put in a file as well of possible phone numbers. Okay, we just reduced it
1076330	1082550	now to 800. For demo purposes, it's only going to try to go over 10 so I'm going to pretend
1082550	1086630	that I'm actually only missing one character so it's just faster, right? But we could
1086630	1091850	perfectly do this because we have the proxy support and all that stuff. So I'm going to use
1091850	1097510	now the brute force option and it's going to use, I think in this case, Amazon to initiate
1097510	1102190	the password reset on those possible phone numbers that we have left. So I give it the
1102190	1106430	email because I need to give it so it can correlate it, right? I give it the mask with the
1106430	1110510	digits that I'm missing, again in this case I'm pretending just that I'm missing, I need to
1110510	1116230	find out over just 10 possible phone numbers so that X is just there. And I'm going to
1116230	1120910	just make it verbose so that we can also see the accounts that don't exist. So now it's
1120910	1125350	going to Amazon, it's going over the 10 possible phone numbers, resetting the password and
1125350	1130850	boom. It found that there was an email associated to the phone number that started with
1131010	1135670	a V, that the username ended with an M, that the length matched, that it was martinvego.com
1135670	1138530	and it's obviously possibly the phone number.
1143270	1148130	So, we're not done yet, we're not done yet, we're not done yet. And what about other
1148130	1152870	countries? It gets even worse, it gets even worse. This is where it gets a little nuts. So
1152870	1158390	remember eBay and LastPass, so we are masking PII, right? We are masking phone numbers.
1159090	1165050	The U.S. is a very big country and it has digits, phone numbers that are 10 digits long.
1165050	1168890	But then I thought, in Spain they are 9 digits long. You know what, there are countries
1168890	1172610	that are only 7 digits long. Is there anyone, I know you're not going to admit it, but is
1172610	1178850	there anyone here from Estonia, San Salvador, Iceland, Finland? Alright. Because the next
1178850	1183910	question was, do you have an eBay and LastPass account? Because if that's the case, your
1183910	1189890	phone number is public. Because it's 7 digits long, those phone numbers. I go to eBay, I
1189890	1193690	get the first three. I go to LastPass, I get the last four. I don't need to brute force
1193690	1201470	anything. So we are pretty good in the U.S. with 10 digits. This is a list of the countries
1201470	1207270	by phone number length. So there are many more. Think, if they are 8 digits long, you
1207270	1213810	only have 100 possible phone numbers, right? And so on. So it gets really, really bad,
1213810	1217730	because now it's not only that we don't have a lack of standardization in the PII
1217730	1222650	masking of phone numbers, but we also do not adjust it based on how long the phone
1222650	1229090	number is. So, what I wrote the tool is kind of like a POC, right? I need support, I need
1229090	1233570	the community to add support for other websites, right? So, but the true power is really
1233570	1239310	going and obtaining the public available information about the phone numbering plan
1239310	1243070	of the country. So, I'm still working on this, but this is really what is going to be
1243070	1247790	interesting for the OSINT professionals. I'm scraping all the information, I'm adding
1247790	1252130	it to a database so that you can have advanced filters. So for example, say you have
1252130	1256970	additional intel. I know, I have all these digits, but I know that this phone number, the
1256970	1261790	victim had it for the last two years, at least, and it's AT&T. So it's going to allow you to
1261790	1266390	do that, because this website, it gives me not only to which exchange the area code
1266390	1271230	belongs, but what is the carrier, when it was assigned, there is a lot of intel there. So I
1271230	1276310	want to provide advanced filtering so that you can do that. Multicountry support. I
1276310	1279890	started to learn from other phone numbering systems, so that's going to be added as
1279890	1285170	well. Detailed info. Again, now you get block assignments, the dates, what is the OCN,
1285170	1290890	what is the carrier that owns it. It's very interesting, because I found exchanges that are
1290890	1295470	specifically for satellites and things like that, at least from the carriers that I saw that
1295470	1300030	I was assigned. So this is very interesting, because you can find stuff for, you know,
1300030	1304790	additional research. And then historical records. They keep updating this stuff, so I'm
1304790	1309650	taking care of that, so that we can go back in time and see phone numbers, how it was in
1309650	1314870	the past, and use that again to further filter. So recommendations, very quick, for online
1314870	1319790	services, my suggestion is, I was thinking how to fix that, just allow customizable labels,
1319790	1325970	right? Instead of showing in the UI, I'm going to send a text to blah blah blah, 89, what you
1325970	1332990	can do is just let it say my work number, or you know, my personal number, just a label, and
1332990	1337470	so the user has the choice to actually put the digits that he wants, or something else,
1337470	1341810	right? And for you, never provide your real phone number, many services just ask for it
1341810	1345410	during the registration process, but they don't really need it, they just want to correlate
1345410	1350490	you around the net, just to give you better ads, or you know, more accurate, not better.
1350730	1357070	Usually require, yeah, use VoIP numbers, or dedicated numbers, for 2FA, for all those
1357070	1360910	things, when it's mandatory, but don't use your real number, a VoIP number, you know, you
1360910	1365110	get rid of location tracking, for example, which is an issue, so always VoIP, and ideally
1365110	1370230	even dedicated for that. And you can also further do, and use email aliases for accounts,
1370230	1375470	there is no reason why you have to be in Uber, with your personal email, and in LastPass, and
1375470	1380130	here and there, with just by using email aliases, you know, when there is password dumps
1380130	1385310	and stuff like that, these automated attacks, I have one minute left, that's what they
1385310	1388690	will do, they will go scrape in different services and try your passwords that they
1388690	1392270	can clear text, if you have different email aliases, then you will find responsible
1392270	1398190	disclosure, ebay, now it's only showing one, and the last two is not perfect, but at
1398190	1402050	least it's better, Paypal, for whatever reason they decided this is working as
1402050	1407850	designed, yahoo is still assessing, and um, and uh, the risks and mitigations, and
1407850	1412650	LastPass acted immediately, and it's only showing the last two now, I like to end the
1412650	1416610	talk without too long reading, that says attackers can use your email address to obtain
1416610	1420550	phone number digits from online services due to a lack of standardization in PII
1420550	1424430	masking, combined with publicly available information and an understanding of the
1424430	1428510	country's phone numbering plan, it is possible to recover the entire phone number.
1428510	1450480	Thank you very much. And I, and I take any questions you may have, happily. Yep? I will
1450480	1456880	probably change the phone number, yah, yes, yah because you are gonna get spam and stuff
1456880	1461760	like that, so just use dedicated numbers. What I do, I use VoIP services, I don't even use
1461760	1466980	the number of my SIM card, I only use VoIP, so if that leaks, somehow I don't even know
1466980	1470360	my phone number, if that leaks, you know, I just get another SIM card, I just need it
1470360	1481780	for the data. No location tracking. Any other questions? Alright, so stay tuned for, for
1481780	1485000	narrator, it's gonna take me a couple of weeks, I think there is a question back there,
1485000	1488280	alright, hi. Thank you.
