1 00:00:00,000 --> 00:00:03,700 Okay, everyone, and we'll just get started with the last session of the day. 2 00:00:03,700 --> 00:00:07,940 We've got another live tool demo, so hopefully everything will continue to work. 3 00:00:07,980 --> 00:00:11,080 It has so far at the moment, so we'll keep on going with this. 4 00:00:11,660 --> 00:00:18,220 So I'm probably going to pronounce his name wrong, but it is Upku, and if I've said that wrong, he's just going to smile politely and keep on going. 5 00:00:18,720 --> 00:00:24,160 The title of this is Generating Personalized Word Lists by Analyzing Targets' Tweets. 6 00:00:24,260 --> 00:00:28,200 Without further ado, I'm just going to pass over and get straight into things, and leave it to you. 7 00:00:28,200 --> 00:00:29,420 Thanks very much. 8 00:00:31,000 --> 00:00:32,120 Okay. 9 00:00:35,200 --> 00:00:39,280 So can anyone see my voice? 10 00:00:39,280 --> 00:00:41,440 Is it okay in the back side? 11 00:00:41,600 --> 00:00:42,440 Great. 12 00:00:43,300 --> 00:00:44,380 So hello, everyone. 13 00:00:44,380 --> 00:00:49,560 Welcome to my talk named Generating Personalized Word Lists by Analyzing Targets' Tweets. 14 00:00:50,400 --> 00:00:53,020 So let me introduce myself first. 15 00:00:53,020 --> 00:00:53,840 I'm Utku Sen. 16 00:00:53,840 --> 00:00:59,160 I'm usually doing researches and writing tools which are about offensive side of security. 17 00:00:59,260 --> 00:01:07,480 I'm currently working for Tier Security, and you can find my details on my website, and you can follow me on Twitter if you are interested in. 18 00:01:09,180 --> 00:01:14,100 So in this presentation, I will start by talking about password-guessing attacks. 19 00:01:14,100 --> 00:01:19,440 Then I will explain why reducing the word list size is crucial for password-guessing. 20 00:01:19,440 --> 00:01:24,860 After that, we will see how can we generate word lists based on targets' personal topics. 21 00:01:24,900 --> 00:01:29,180 Finally, I will demonstrate the Rodeo tool which does that job. 22 00:01:31,420 --> 00:01:37,260 Passwords are our main security mechanisms for the digital accounts since the beginning of the internet. 23 00:01:37,260 --> 00:01:42,460 Because of that, passwords are one of the main targets for the attackers. 24 00:01:42,580 --> 00:01:48,920 Of course, there are lots of different ways that attacker can get their target's password. 25 00:01:48,920 --> 00:01:57,100 For example, the attacker can prepare a phishing website to trick a target into entering their credentials to a rogue website. 26 00:01:57,120 --> 00:02:02,360 Or an attacker can conduct a password-guessing attack through brute forcing. 27 00:02:02,520 --> 00:02:06,800 Password-guessing attacks can be described in two main categories. 28 00:02:06,800 --> 00:02:09,420 They are online and offline attacks. 29 00:02:10,720 --> 00:02:17,280 Offline password-guessing attacks are usually conducted against captured hashes or encryption keys. 30 00:02:17,280 --> 00:02:24,080 For example, for hash-correcting, attacker calculates some password hash and compares with the target hash. 31 00:02:24,100 --> 00:02:30,000 There are two variables which affects the success of the, uh, other than the password complexity. 32 00:02:30,000 --> 00:02:36,540 They are hardware resources and the algorithm of the hashing, uh, type of the hashing algorithm. 33 00:02:36,600 --> 00:02:43,500 Uh, more hardware resources are providing a speed, therefore increases the chance of success. 34 00:02:43,800 --> 00:02:46,560 Uh, the other thing is the hashing algorithm. 35 00:02:46,560 --> 00:02:51,680 For example, cracking an MD5 hash will be faster than cracking a bcrypt one. 36 00:02:53,220 --> 00:03:06,520 Online password-guessing attack is where the attacker sends username password combination to a service like HTTP, SSH, et cetera, and tries to identify the correct combination by checking the response from the services. 37 00:03:06,520 --> 00:03:09,960 There are lots of different variables which affects the success. 38 00:03:10,000 --> 00:03:18,260 Uh, for example, our connection speed, server speeds, also website can block our IP address, lock target's account, et cetera. 39 00:03:18,280 --> 00:03:22,680 Online attack and hardware resources has no positive correlation. 40 00:03:22,680 --> 00:03:25,960 Therefore, it's much, much harder than the offline attacks. 41 00:03:30,320 --> 00:03:40,620 Also, most of the web applications have password complexity rules where user have to use at least one number, one upper letter, character, and special characters, et cetera. 42 00:03:40,620 --> 00:03:47,260 Therefore, reducing the brute force pool to an acceptable size is very important for the attackers. 43 00:03:47,420 --> 00:03:52,080 Instead of brute forcing all combinations, but we can make smart choices. 44 00:03:52,080 --> 00:03:54,980 For example, we can try the all common passwords. 45 00:03:55,020 --> 00:03:59,540 If it doesn't work, we can make some smarter combinations again. 46 00:04:00,280 --> 00:04:05,700 To reduce the combination pool, HashKit team created a technique called mask attack. 47 00:04:05,700 --> 00:04:10,160 The main idea is people are choosing their password with similar patterns. 48 00:04:10,160 --> 00:04:12,080 They are not pure gibberish data. 49 00:04:12,080 --> 00:04:17,360 Therefore, we can define a pattern which is called mask and do brute force with its boundaries. 50 00:04:17,680 --> 00:04:21,040 For example, let's say our password is Julia 1984. 51 00:04:21,880 --> 00:04:29,340 With the brute force approach, we need to brute force all nine characters with all our char sets. 52 00:04:29,340 --> 00:04:33,360 The formula is 9 over 62 which is a very, very big number. 53 00:04:33,580 --> 00:04:38,360 For the mask attack, since we defined the pattern, we don't need to brute force everything. 54 00:04:38,480 --> 00:04:44,120 There are 29 choices for the first character which can be only upper letter. 55 00:04:44,280 --> 00:04:49,240 The total amount of combinations are way smaller than the pure brute force technique. 56 00:04:49,240 --> 00:04:51,480 It's around 200 billion. 57 00:04:52,700 --> 00:04:55,840 But of course it's still too much for the online attacks. 58 00:04:55,840 --> 00:05:02,280 We usually can't send 200 billion requests to a web server and wait its response. 59 00:05:03,740 --> 00:05:10,240 Again, but of course, pure brute force and mask attacks are not the only way for password guessing. 60 00:05:10,280 --> 00:05:16,820 There is also science fiction based methods, method based on smart guessing. 61 00:05:16,820 --> 00:05:26,960 For example, on Sherlock's Haunt of Baskerville episode, Sherlock Holmes was checking the personal stuff of the target and we're guessing the correct password in one shot. 62 00:05:28,420 --> 00:05:31,000 So we have a third method now. 63 00:05:31,100 --> 00:05:38,940 It seems very unrealistic, but in theory it's possible to find Yulia 1984 password in less than three shots. 64 00:05:39,020 --> 00:05:42,800 We just need to have some Sherlock Holmes skills to do that. 65 00:05:44,020 --> 00:05:49,340 Let's assume that target is posted that tweet and we are Sherlock Holmes candidates. 66 00:05:49,560 --> 00:05:51,540 We can make following deductions. 67 00:05:51,540 --> 00:05:57,980 Target's daughter name is Yulia and target loves her so much since he or she tweets about her. 68 00:05:57,980 --> 00:06:03,000 And the target's favorite author is George Orwell, whose most popular book is 1984. 69 00:06:03,440 --> 00:06:07,260 So combine them together, the answer is Yulia 1984. 70 00:06:07,980 --> 00:06:09,760 Is this that simple? 71 00:06:09,980 --> 00:06:12,440 We will come back to this later. 72 00:06:13,960 --> 00:06:22,600 So according to some researches which are conducted by Carnegie Mellon University, most of people are choosing words from their hobbies, sports, movies, etc. 73 00:06:22,600 --> 00:06:24,040 for their passwords. 74 00:06:24,040 --> 00:06:31,660 Uh, this means that most of the user passwords are containing, uh, meaningful words and they are related with the password's owner. 75 00:06:31,660 --> 00:06:36,280 So in theory we can become a Sherlock Holmes on password cracking. 76 00:06:38,180 --> 00:06:43,520 Actually we can prove that people are mostly using meaningful words for their passwords. 77 00:06:43,680 --> 00:06:57,960 When we analyze leaked Myspace and HTML password slits and generate most used masks, we can see that almost 95% of passwords are formed by sequential alphabetic characters. 78 00:06:57,960 --> 00:07:01,540 So there is a high probability that these are meaningful words. 79 00:07:02,540 --> 00:07:07,600 Uh, let's try to prove that they are actually contains meaningful words. 80 00:07:07,600 --> 00:07:09,460 So what is a meaningful word? 81 00:07:09,520 --> 00:07:16,220 We can say that a letter sequence is a meaningful English word if it's listed in an English lexicon. 82 00:07:16,220 --> 00:07:24,020 For those who are not familiar with the NLP context, lexicon refers to the complete set of meaningful units in a language. 83 00:07:24,020 --> 00:07:27,400 Uh, we used wordnet lexicon for this job. 84 00:07:34,100 --> 00:07:44,780 Our analysis showed that almost 40% of those word lists are included in wordnet lexicon, hence they are meaningful English words. 85 00:07:44,820 --> 00:07:52,200 Now we need to apply post tagging which means part of speech tagging to these words to understand what kind of words they are. 86 00:07:52,580 --> 00:07:56,000 Uh, post tagging is a process to find a word's class. 87 00:07:56,000 --> 00:08:00,640 There are eight different part of speech classes in English language . 88 00:08:00,640 --> 00:08:03,500 Uh, we learned them in English lessons. 89 00:08:03,500 --> 00:08:07,640 For example, there are nouns like chair, uh, table , etc. 90 00:08:07,640 --> 00:08:10,740 And there are verbs like going, eating, etc. 91 00:08:10,860 --> 00:08:19,660 So we analyzed those words with the help of Python's NLTK library and the results showed that most of these words are singular noun. 92 00:08:21,000 --> 00:08:24,660 So let's recap what kind of facts that we have so far. 93 00:08:24,700 --> 00:08:37,880 First, our analysis showed that people are using meaningful words for their passwords and the second, uh, from the research conducted by various of universities, we know that passwords are mostly based on personal topics. 94 00:08:37,940 --> 00:08:42,380 So Sherlock Holmes' method is legit in theory. 95 00:08:43,640 --> 00:08:46,140 But can it be done in practice? 96 00:08:46,280 --> 00:08:50,180 But Sherlock Holmes did was analyzing personal topics of the targets. 97 00:08:50,180 --> 00:08:55,160 Then he combined them in his mind and came up with a candidate password. 98 00:08:55,360 --> 00:08:57,940 But how can we do it in real life? 99 00:08:58,200 --> 00:09:07,420 Uh, to achieve this, we need information about the targets and an algorithm which extracts good password candidates from that information. 100 00:09:09,420 --> 00:09:13,960 We need a data source about the targets just like Sherlock Holmes had. 101 00:09:14,080 --> 00:09:18,800 We need a source that we can find hobbies and other interest areas of the targets. 102 00:09:18,980 --> 00:09:21,560 Actually we all know that kind of source. 103 00:09:22,540 --> 00:09:24,160 Uh, it's Twitter of course. 104 00:09:24,260 --> 00:09:29,720 In Twitter people are tend to write posts about their hobbies and other interest areas. 105 00:09:29,780 --> 00:09:36,180 Since there's a character limitation for the tweets, uh, users write, need to write things more focused. 106 00:09:36,180 --> 00:09:38,860 And this makes things easier for us. 107 00:09:38,860 --> 00:09:41,740 We don't need to deal with large text. 108 00:09:41,920 --> 00:09:50,020 So let's use the Twitter as a data source and try to build our personalized wordless generation algorithm. 109 00:09:51,820 --> 00:09:56,880 First of all, we need to gather tweets from targets via Twitter's API. 110 00:09:57,220 --> 00:10:00,240 Then we need to get rid of unnecessary words. 111 00:10:00,840 --> 00:10:06,060 Uh, how do we know if a word is necessary or unnecessary for our job? 112 00:10:08,540 --> 00:10:15,120 Firstly, since we are trying to find personalized things, we can remove any stop words since everybody are using them. 113 00:10:15,120 --> 00:10:19,140 So we can remove things like I, my, she, et cetera. 114 00:10:19,360 --> 00:10:25,880 Secondly, as you recall, our research show that people are using mostly nouns for their passwords. 115 00:10:25,880 --> 00:10:27,960 So we can remove any words. 116 00:10:27,960 --> 00:10:32,360 For example, we can remove suggest word from the tweets. 117 00:10:33,720 --> 00:10:40,640 As you can remember from previous slides, leaked word lists were mostly formed by nouns. 118 00:10:40,640 --> 00:10:47,820 So we can again apply post tagging to the rest of the words and detect most used nouns and proper nouns. 119 00:10:47,900 --> 00:10:52,120 For this tweet, nouns are, um, outer and outer. 120 00:10:52,120 --> 00:10:55,640 Proper nouns are George Orwell and Yulia. 121 00:10:57,220 --> 00:11:01,640 Sometimes users are quite confused about combining two meaningful words for their passwords. 122 00:11:01,660 --> 00:11:06,500 But of course they are not usually two random words but they have a semantic similarity. 123 00:11:06,600 --> 00:11:09,540 So we also need to combine similar words. 124 00:11:09,540 --> 00:11:17,740 Uh, we used WordNet's pet similarity algorithm for detecting semantic similarity of the words which are extracted from the tweets. 125 00:11:18,020 --> 00:11:27,600 Pet similarity algorithm gives us a score between zero and one and we combine them together if the score is greater than zero point twelve. 126 00:11:27,700 --> 00:11:33,860 In the example shown in the slides, we will combine cat, dog and flamethrower with each other. 127 00:11:36,770 --> 00:11:43,590 Uh, researchers have also found that some of the most used semantic teams in passwords are locations and years. 128 00:11:43,710 --> 00:11:51,090 For this job, we will send extracted proper nouns to Wikipedia and parse related years and cities from them. 129 00:11:51,130 --> 00:11:58,730 In this example, we sent George Orwell to Wikipedia and it returns us words like London 1984 etc. 130 00:12:00,410 --> 00:12:04,090 So the last step is combining all of our data. 131 00:12:04,470 --> 00:12:13,830 From the example tweet, we got uh, George Orwell word, we sent it to Wikipedia and it returned us 1984 words. 132 00:12:13,890 --> 00:12:16,870 Beyond that, we also had Yulia as a proper noun. 133 00:12:17,150 --> 00:12:24,010 So when we combine all of our data, we will have the correct password, Yulia 1984 in somewhere. 134 00:12:24,370 --> 00:12:30,450 So instead of millions of combinations, we could crack this password uh, for twenty or less steps. 135 00:12:30,470 --> 00:12:32,770 Just like Sherlock Holmes did. 136 00:12:34,430 --> 00:12:39,810 So to automatize all these processes, I coded a tool named Rodeola. 137 00:12:40,150 --> 00:12:44,230 It is written in Python and mostly based on NLTK library. 138 00:12:44,430 --> 00:12:48,610 It follows the algorithm that I described in previous sections. 139 00:12:48,810 --> 00:13:01,490 With a given Twitter handle, it can automatically can compile a personalized word list with the elements such as most used nouns, proper nouns, paired words, uh, years and cities related to them. 140 00:13:01,790 --> 00:13:07,070 Currently it only supports English but I will finish the Turkish and German support soon. 141 00:13:08,610 --> 00:13:11,990 You can use Rodeola in three different modes. 142 00:13:11,990 --> 00:13:19,890 In the base mode, Rodeola takes a Twitter handle as an argument and generates a personalized word list without any fancy stuff. 143 00:13:19,890 --> 00:13:29,790 For example, when you give Elon Musk username, it generates passwords like Tesla, car, SpaceX, foreign company 2018, et cetera. 144 00:13:30,790 --> 00:13:37,170 In the regex mode, user can generate additional secret strings with the provided regex. 145 00:13:37,230 --> 00:13:42,170 These generated strings will be appended prefix or suffix to the words. 146 00:13:42,470 --> 00:13:48,790 For this mode, Rodeola takes a regex value as an argument, regex place defines the string placement. 147 00:13:49,530 --> 00:13:59,550 With the given regex value in the shown in the slide, it will generate passwords like Tesla root 01, Tesla root 02 and goes like this. 148 00:14:00,850 --> 00:14:07,550 In the mask mode, user can provide a hashcat style mask values for the word list generation. 149 00:14:07,890 --> 00:14:20,690 So in this example, uh, comment, we used a mask in which first character is upper letter, second is lower letter, third one is upper letter again and goes like this. 150 00:14:21,910 --> 00:14:28,590 If you don't have any Twitter API or you want to use another data source, you can bring your own data. 151 00:14:28,870 --> 00:14:31,770 Uh, Rodeola provides you two different options. 152 00:14:31,770 --> 00:14:38,330 In the first one, you can provide a text file to Rodeola which contains lots of harvested texts. 153 00:14:38,410 --> 00:14:49,010 In the second one, you can provide a URL list and Rodeola harvest text from these URLs automatically and builds the personalized word lists right away. 154 00:14:50,590 --> 00:14:55,710 Uh, you can download and try the tool from our GitHub page. 155 00:14:58,320 --> 00:15:00,720 Okay, so demo time. 156 00:15:00,920 --> 00:15:11,180 To make this demo, I will get a TV handle from a volunteer in the audience and we'll pass it to Rodeola and we will check its results together. 157 00:15:11,560 --> 00:15:17,240 So is there anyone who are actively using Twitter in English and willing to share username with me? 158 00:15:18,000 --> 00:15:18,900 Anyone? 159 00:15:20,400 --> 00:15:25,620 Or you can give some, you know, celebrity username, it's fine also. 160 00:15:28,360 --> 00:15:29,320 No one? 161 00:15:33,790 --> 00:15:35,190 Excuse me? 162 00:15:36,170 --> 00:15:38,050 Uh, no, sorry? 163 00:15:38,650 --> 00:15:41,190 I, you don't talk to me? 164 00:15:41,350 --> 00:15:42,970 You're talking with your friend, sorry. 165 00:15:42,970 --> 00:15:44,290 Okay, I'm sorry. 166 00:15:46,610 --> 00:15:50,610 Okay, so let's choose a random celebrity then. 167 00:15:58,820 --> 00:15:59,860 Okay. 168 00:16:05,240 --> 00:16:07,560 So last chance, anyone? 169 00:16:08,640 --> 00:16:09,680 Defcon? 170 00:16:09,700 --> 00:16:11,740 Yeah, let's try Defcon, okay. 171 00:16:14,940 --> 00:16:17,280 Uh, let's see what we will have. 172 00:16:17,840 --> 00:16:22,140 So now it's downloaded from the Defcon and it's trying to download Twitter account. 173 00:16:22,540 --> 00:16:29,240 Probably it will download like 2,500 tweets which is uh, Twitter's API limits. 174 00:16:30,280 --> 00:16:33,460 It will need to be done in 10 seconds. 175 00:16:33,520 --> 00:16:39,280 Uh, now probably Defcon's Twitter account has only 1,013 tweets. 176 00:16:39,280 --> 00:16:49,860 Now it's trying to detect most used nouns and proper nouns on the download tweets and also cleans data from the stop words and something like this. 177 00:16:50,000 --> 00:17:03,500 So most used nouns are obviously Defcon, Defcon 26, Defcon 27, new live batch, open share China, uh, et cetera, et cetera, village. 178 00:17:03,780 --> 00:17:12,440 And now it sends those extracted tweets to Wikipedia and will parse the related locations and years. 179 00:17:12,440 --> 00:17:19,880 But of course, uh, maybe Defcon Twitter handle is not a, you know, best candidate for this experiment. 180 00:17:20,280 --> 00:17:22,000 But you got the idea. 181 00:17:24,120 --> 00:17:28,480 Okay, let's check what kind of words that we have. 182 00:17:31,790 --> 00:17:38,230 Uh, we saw them and some years, some location. 183 00:17:40,130 --> 00:17:46,910 So you can use these words to brute force Defcon's Twitter account and let me know about the results. 184 00:17:50,090 --> 00:17:56,890 So some Chinese, these, some hotel names, again some, I guess, Chinese, these again. 185 00:17:58,070 --> 00:18:00,930 Uh, yeah, and Las Vegas of course. 186 00:18:01,270 --> 00:18:03,190 So you got the idea. 187 00:18:03,790 --> 00:18:05,890 Let's turn back to the slides again. 188 00:18:15,030 --> 00:18:29,050 So as a conclusion, since people tend to use words from their interest areas for their passwords and expose those interest areas on Twitter, it's possible for an attacker to create a word list by analyzing a target's tweets. 189 00:18:29,210 --> 00:18:37,570 Beyond Twitter, any actor that has much more data about the person will have an ability to create more accurate word lists. 190 00:18:37,630 --> 00:18:44,310 Therefore, users should avoid using words from the topics that are exposed in social media. 191 00:18:44,530 --> 00:18:49,870 It's better to use random passwords that are stored in a password manager software. 192 00:18:50,290 --> 00:18:54,170 So thank you everybody for listening to me. 193 00:19:00,300 --> 00:19:02,340 Any questions? 194 00:19:07,790 --> 00:19:08,810 Sorry? 195 00:19:10,570 --> 00:19:11,750 Address? 196 00:19:11,750 --> 00:19:12,670 Okay. 197 00:19:14,310 --> 00:19:22,210 Don't forget to send some stars and of course you can send forks, comments, issues. 198 00:19:27,370 --> 00:19:29,230 Alright, thanks everybody. 199 00:19:29,350 --> 00:19:31,030 Okay, thank you very much.