[00:00.000 --> 00:03.700] Okay, everyone, and we'll just get started with the last session of the day. [00:03.700 --> 00:07.940] We've got another live tool demo, so hopefully everything will continue to work. [00:07.980 --> 00:11.080] It has so far at the moment, so we'll keep on going with this. [00:11.660 --> 00:15.120] So I'm probably going to pronounce his name wrong, but it is Upku, [00:15.120 --> 00:18.220] and if I've said that wrong, he's just going to smile politely and keep on going. [00:18.720 --> 00:24.160] The title of this is Generating Personalized Word Lists by Analyzing Targets' Tweets. [00:24.260 --> 00:27.320] Without further ado, I'm just going to pass over and get straight into things, [00:27.320 --> 00:29.420] and leave it to you. Thanks very much. [00:31.000 --> 00:42.440] Okay. So can anyone see my voice? Is it okay in the back side? Great. [00:43.300 --> 00:47.720] So hello, everyone. Welcome to my talk named Generating Personalized Word Lists by [00:47.720 --> 00:54.800] Analyzing Targets' Tweets. So let me introduce myself first. I'm Utku Sen. I'm usually doing [00:54.800 --> 01:00.000] researches and writing tools which are about offensive side of security. I'm currently [01:00.000 --> 01:05.620] working for Tier Security, and you can find my details on my website, and you can follow me on [01:05.620 --> 01:12.380] Twitter if you are interested in. So in this presentation, I will start by talking about [01:12.380 --> 01:18.040] password-guessing attacks. Then I will explain why reducing the word list size is crucial for [01:18.040 --> 01:23.560] password-guessing. After that, we will see how can we generate word lists based on targets' [01:23.560 --> 01:29.180] personal topics. Finally, I will demonstrate the Rodeo tool which does that job. [01:31.420 --> 01:36.380] Passwords are our main security mechanisms for the digital accounts since the beginning of the [01:36.380 --> 01:43.080] internet. Because of that, passwords are one of the main targets for the attackers. Of course, [01:43.080 --> 01:49.520] there are lots of different ways that attacker can get their target's password. For example, [01:49.520 --> 01:55.360] the attacker can prepare a phishing website to trick a target into entering their credentials [01:55.360 --> 02:01.200] to a rogue website. Or an attacker can conduct a password-guessing attack through brute [02:01.200 --> 02:07.580] forcing. Password-guessing attacks can be described in two main categories. They are online [02:07.580 --> 02:15.280] and offline attacks. Offline password-guessing attacks are usually conducted against captured [02:15.280 --> 02:20.580] hashes or encryption keys. For example, for hash-correcting, attacker calculates some [02:20.580 --> 02:26.300] password hash and compares with the target hash. There are two variables which affects the [02:26.300 --> 02:32.280] success of the, uh, other than the password complexity. They are hardware resources and the [02:32.280 --> 02:38.480] algorithm of the hashing, uh, type of the hashing algorithm. Uh, more hardware resources are [02:38.480 --> 02:45.340] providing a speed, therefore increases the chance of success. Uh, the other thing is the [02:45.340 --> 02:50.820] hashing algorithm. For example, cracking an MD5 hash will be faster than cracking a [02:50.820 --> 02:58.700] bcrypt one. Online password-guessing attack is where the attacker sends username password [02:58.700 --> 03:04.660] combination to a service like HTTP, SSH, et cetera, and tries to identify the correct [03:04.660 --> 03:07.880] combination by checking the response from the services. There are lots of different variables [03:07.880 --> 03:14.360] which affects the success. Uh, for example, our connection speed, server speeds, also website [03:14.360 --> 03:20.140] can block our IP address, lock target's account, et cetera. Online attack and hardware [03:20.140 --> 03:24.960] resources has no positive correlation. Therefore, it's much, much harder than the offline [03:24.960 --> 03:35.220] attacks. Also, most of the web applications have password complexity rules where user have to [03:35.220 --> 03:40.620] use at least one number, one upper letter, character, and special characters, et cetera. [03:40.620 --> 03:46.340] Therefore, reducing the brute force pool to an acceptable size is very important for the [03:46.340 --> 03:52.080] attackers. Instead of brute forcing all combinations, but we can make smart choices. [03:52.080 --> 03:57.120] For example, we can try the all common passwords. If it doesn't work, we can make some [03:57.120 --> 04:04.120] smarter combinations again. To reduce the combination pool, HashKit team created a [04:04.120 --> 04:08.960] technique called mask attack. The main idea is people are choosing their password with [04:08.960 --> 04:13.860] similar patterns. They are not pure gibberish data. Therefore, we can define a pattern which [04:13.860 --> 04:18.840] is called mask and do brute force with its boundaries. For example, let's say our [04:18.840 --> 04:25.660] password is Julia 1984. With the brute force approach, we need to brute force all nine [04:25.660 --> 04:32.460] characters with all our char sets. The formula is 9 over 62 which is a very, very big [04:32.460 --> 04:37.440] number. For the mask attack, since we defined the pattern, we don't need to brute force [04:37.440 --> 04:44.480] everything. There are 29 choices for the first character which can be only upper letter. The [04:44.480 --> 04:49.460] total amount of combinations are way smaller than the pure brute force technique. It's [04:49.460 --> 04:56.780] around 200 billion. But of course it's still too much for the online attacks. We usually can't [04:56.780 --> 05:06.120] send 200 billion requests to a web server and wait its response. Again, but of course, pure [05:06.120 --> 05:10.860] brute force and mask attacks are not the only way for password guessing. There is also [05:10.860 --> 05:18.460] science fiction based methods, method based on smart guessing. For example, on Sherlock's [05:18.460 --> 05:23.220] Haunt of Baskerville episode, Sherlock Holmes was checking the personal stuff of the [05:23.220 --> 05:30.100] target and we're guessing the correct password in one shot. So we have a third method [05:30.100 --> 05:37.300] now. It seems very unrealistic, but in theory it's possible to find Yulia 1984 password in [05:37.300 --> 05:44.980] less than three shots. We just need to have some Sherlock Holmes skills to do that. Let's assume [05:44.980 --> 05:50.120] that target is posted that tweet and we are Sherlock Holmes candidates. We can make [05:50.120 --> 05:56.420] following deductions. Target's daughter name is Yulia and target loves her so much since he or [05:56.420 --> 06:01.340] she tweets about her. And the target's favorite author is George Orwell, whose most popular [06:01.340 --> 06:10.700] book is 1984. So combine them together, the answer is Yulia 1984. Is this that simple? We will [06:10.700 --> 06:17.360] come back to this later. So according to some researches which are conducted by Carnegie [06:17.360 --> 06:22.080] Mellon University, most of people are choosing words from their hobbies, sports, movies, [06:22.080 --> 06:27.920] etc. for their passwords. Uh, this means that most of the user passwords are containing, uh, [06:27.920 --> 06:34.100] meaningful words and they are related with the password's owner. So in theory we can become a [06:34.100 --> 06:41.660] Sherlock Holmes on password cracking. Actually we can prove that people are mostly using [06:41.660 --> 06:47.120] meaningful words for their passwords. When we analyze leaked Myspace and HTML password [06:47.120 --> 06:55.500] slits and generate most used masks, we can see that almost 95% of passwords are formed by [06:55.500 --> 07:00.440] sequential alphabetic characters. So there is a high probability that these are meaningful [07:00.440 --> 07:08.380] words. Uh, let's try to prove that they are actually contains meaningful words. So what is a [07:08.380 --> 07:14.160] meaningful word? We can say that a letter sequence is a meaningful English word if it's listed [07:14.160 --> 07:20.600] in an English lexicon. For those who are not familiar with the NLP context, lexicon refers to [07:20.600 --> 07:26.440] the complete set of meaningful units in a language. Uh, we used wordnet lexicon for this [07:26.440 --> 07:41.760] job. Our analysis showed that almost 40% of those word lists are included in wordnet lexicon, [07:41.760 --> 07:47.740] hence they are meaningful English words. Now we need to apply post tagging which means part of [07:47.740 --> 07:54.200] speech tagging to these words to understand what kind of words they are. Uh, post tagging is a [07:54.200 --> 08:00.080] process to find a word's class. There are eight different part of speech classes in English [08:00.080 --> 08:06.980] language. Uh, we learned them in English lessons. For example, there are nouns like chair, uh, [08:06.980 --> 08:13.280] table, etc. And there are verbs like going, eating, etc. So we analyzed those words with the [08:13.280 --> 08:18.780] help of Python's NLTK library and the results showed that most of these words are singular [08:18.780 --> 08:26.720] noun. So let's recap what kind of facts that we have so far. First, our analysis showed that [08:26.720 --> 08:31.820] people are using meaningful words for their passwords and the second, uh, from the research [08:31.820 --> 08:36.920] conducted by various of universities, we know that passwords are mostly based on personal [08:36.920 --> 08:46.480] topics. So Sherlock Holmes' method is legit in theory. But can it be done in practice? But [08:46.480 --> 08:52.100] Sherlock Holmes did was analyzing personal topics of the targets. Then he combined them in his [08:52.100 --> 08:59.220] mind and came up with a candidate password. But how can we do it in real life? Uh, to achieve [08:59.220 --> 09:04.840] this, we need information about the targets and an algorithm which extracts good password [09:04.840 --> 09:12.940] candidates from that information. We need a data source about the targets just like Sherlock [09:12.940 --> 09:17.880] Holmes had. We need a source that we can find hobbies and other interest areas of the [09:17.880 --> 09:25.240] targets. Actually we all know that kind of source. Uh, it's Twitter of course. In Twitter people [09:25.240 --> 09:30.840] are tend to write posts about their hobbies and other interest areas. Since there's a character [09:30.840 --> 09:37.200] limitation for the tweets, uh, users write, need to write things more focused. And this makes [09:37.200 --> 09:44.660] things easier for us. We don't need to deal with large text. So let's use the Twitter as a data [09:44.660 --> 09:53.440] source and try to build our personalized wordless generation algorithm. First of all, we need to [09:53.440 --> 10:00.240] gather tweets from targets via Twitter's API. Then we need to get rid of unnecessary words. [10:00.840 --> 10:10.080] Uh, how do we know if a word is necessary or unnecessary for our job? Firstly, since we are trying [10:10.080 --> 10:15.560] to find personalized things, we can remove any stop words since everybody are using them. So we [10:15.560 --> 10:23.060] can remove things like I, my, she, et cetera. Secondly, as you recall, our research show that [10:23.060 --> 10:28.900] people are using mostly nouns for their passwords. So we can remove any words. For example, we [10:28.900 --> 10:37.420] can remove suggest word from the tweets. As you can remember from previous slides, leaked [10:37.420 --> 10:43.920] word lists were mostly formed by nouns. So we can again apply post tagging to the rest of the [10:43.920 --> 10:51.220] words and detect most used nouns and proper nouns. For this tweet, nouns are, um, outer and [10:51.220 --> 10:58.880] outer. Proper nouns are George Orwell and Yulia. Sometimes users are quite confused about [10:58.900 --> 11:03.420] combining two meaningful words for their passwords. But of course they are not usually two [11:03.420 --> 11:09.900] random words but they have a semantic similarity. So we also need to combine similar words. Uh, [11:09.900 --> 11:15.580] we used WordNet's pet similarity algorithm for detecting semantic similarity of the words which [11:15.580 --> 11:21.740] are extracted from the tweets. Pet similarity algorithm gives us a score between zero and one [11:21.740 --> 11:28.540] and we combine them together if the score is greater than zero point twelve. In the example [11:28.540 --> 11:37.030] shown in the slides, we will combine cat, dog and flamethrower with each other. Uh, [11:37.030 --> 11:41.670] researchers have also found that some of the most used semantic teams in passwords are [11:41.670 --> 11:48.050] locations and years. For this job, we will send extracted proper nouns to Wikipedia and parse [11:48.050 --> 11:54.570] related years and cities from them. In this example, we sent George Orwell to Wikipedia and [11:54.570 --> 12:04.950] it returns us words like London 1984 etc. So the last step is combining all of our data. From the [12:04.950 --> 12:12.650] example tweet, we got uh, George Orwell word, we sent it to Wikipedia and it returned us 1984 [12:12.650 --> 12:19.910] words. Beyond that, we also had Yulia as a proper noun. So when we combine all of our data, we [12:19.910 --> 12:25.610] will have the correct password, Yulia 1984 in somewhere. So instead of millions of [12:25.610 --> 12:31.690] combinations, we could crack this password uh, for twenty or less steps. Just like Sherlock [12:31.690 --> 12:41.090] Holmes did. So to automatize all these processes, I coded a tool named Rodeola. It is written in [12:41.090 --> 12:47.590] Python and mostly based on NLTK library. It follows the algorithm that I described in previous [12:47.590 --> 12:53.750] sections. With a given Twitter handle, it can automatically can compile a personalized word [12:53.750 --> 12:59.650] list with the elements such as most used nouns, proper nouns, paired words, uh, years and [12:59.650 --> 13:05.330] cities related to them. Currently it only supports English but I will finish the Turkish and [13:05.330 --> 13:13.410] German support soon. You can use Rodeola in three different modes. In the base mode, Rodeola [13:13.410 --> 13:18.530] takes a Twitter handle as an argument and generates a personalized word list without any [13:18.530 --> 13:24.110] fancy stuff. For example, when you give Elon Musk username, it generates passwords like [13:24.110 --> 13:33.390] Tesla, car, SpaceX, foreign company 2018, et cetera. In the regex mode, user can generate [13:33.390 --> 13:38.930] additional secret strings with the provided regex. These generated strings will be [13:38.930 --> 13:45.130] appended prefix or suffix to the words. For this mode, Rodeola takes a regex value as an [13:45.130 --> 13:52.090] argument, regex place defines the string placement. With the given regex value in the [13:52.090 --> 13:58.390] shown in the slide, it will generate passwords like Tesla root 01, Tesla root 02 and goes [13:58.390 --> 14:06.530] like this. In the mask mode, user can provide a hashcat style mask values for the word list [14:06.530 --> 14:14.910] generation. So in this example, uh, comment, we used a mask in which first character is [14:14.910 --> 14:22.470] upper letter, second is lower letter, third one is upper letter again and goes like this. If [14:22.470 --> 14:27.670] you don't have any Twitter API or you want to use another data source, you can bring your own [14:27.670 --> 14:34.190] data. Uh, Rodeola provides you two different options. In the first one, you can provide a [14:34.190 --> 14:40.030] text file to Rodeola which contains lots of harvested texts. In the second one, you can [14:40.030 --> 14:46.210] provide a URL list and Rodeola harvest text from these URLs automatically and builds the [14:46.210 --> 14:54.530] personalized word lists right away. Uh, you can download and try the tool from our GitHub [14:54.530 --> 15:05.800] page. Okay, so demo time. To make this demo, I will get a TV handle from a volunteer in the [15:05.800 --> 15:12.600] audience and we'll pass it to Rodeola and we will check its results together. So is there anyone [15:12.600 --> 15:21.160] who are actively using Twitter in English and willing to share username with me? Anyone? Or you [15:21.160 --> 15:38.050] can give some, you know, celebrity username, it's fine also. No one? Excuse me? Uh, no, sorry? [15:38.650 --> 15:48.010] I, you don't talk to me? You're talking with your friend, sorry. Okay, I'm sorry. Okay, so let's [15:48.010 --> 16:11.140] choose a random celebrity then. Okay. So last chance, anyone? Defcon? Yeah, let's try Defcon, [16:11.140 --> 16:20.480] okay. Uh, let's see what we will have. So now it's downloaded from the Defcon and it's [16:20.500 --> 16:26.680] trying to download Twitter account. Probably it will download like 2,500 tweets which is [16:26.680 --> 16:35.320] uh, Twitter's API limits. It will need to be done in 10 seconds. Uh, now probably Defcon's [16:35.320 --> 16:42.820] Twitter account has only 1,013 tweets. Now it's trying to detect most used nouns and proper [16:42.820 --> 16:48.840] nouns on the download tweets and also cleans data from the stop words and something like [16:48.840 --> 16:58.340] this. So most used nouns are obviously Defcon, Defcon 26, Defcon 27, new live batch, open [16:58.340 --> 17:07.420] share China, uh, et cetera, et cetera, village. And now it sends those extracted tweets to [17:07.420 --> 17:14.880] Wikipedia and will parse the related locations and years. But of course, uh, maybe Defcon [17:14.880 --> 17:22.000] Twitter handle is not a, you know, best candidate for this experiment. But you got the idea. [17:24.120 --> 17:36.370] Okay, let's check what kind of words that we have. Uh, we saw them and some years, some [17:37.030 --> 17:45.390] location. So you can use these words to brute force Defcon's Twitter account and let me [17:45.390 --> 17:55.450] know about the results. So some Chinese, these, some hotel names, again some, I guess, [17:55.450 --> 18:04.550] Chinese, these again. Uh, yeah, and Las Vegas of course. So you got the idea. Let's turn [18:04.550 --> 18:18.950] back to the slides again. So as a conclusion, since people tend to use words from their [18:18.950 --> 18:24.590] interest areas for their passwords and expose those interest areas on Twitter, it's possible [18:24.590 --> 18:30.670] for an attacker to create a word list by analyzing a target's tweets. Beyond Twitter, any [18:30.670 --> 18:36.290] actor that has much more data about the person will have an ability to create more accurate [18:36.290 --> 18:42.990] word lists. Therefore, users should avoid using words from the topics that are exposed in [18:42.990 --> 18:48.690] social media. It's better to use random passwords that are stored in a password manager [18:48.690 --> 19:12.670] software. So thank you everybody for listening to me. Any questions? Sorry? Address? Okay. [19:14.310 --> 19:28.090] Don't forget to send some stars and of course you can send forks, comments, issues. Alright, [19:28.090 --> 19:29.230] thanks everybody. [19:29.350 --> 19:31.030] Okay, thank you very much.