What's up? Good afternoon. Thank you for skipping your lunch coming here. So yeah, buying time, what is your data worth? This is an approach to distributed password brute forcing along with some statistical analysis and an approach to giving a real dollar value to your password based on brute force attacking done in a cloud on the internet environment and the cost that is involved in that. So, all right. Who am I? I'm a member of Chaos Theory and a proud DC404 member. This is our fourth out of seven talks here at DEF CON this year, so we're going to go ahead and assume that we've taken over the con. And we're the largest local DEF CON community group here. At this point, maybe the only. You know, with DC404, just for a few minutes in case anybody's heard of it. I worked on Anonymous and SAM I.O. And if anybody is into the depths of the internet, I was also one of the primary contributors to Group Hug. So, what is this? Distributed password cracking. It's a scalable password cracking solution that will go across multiple machines and at the same time, on each machine, it's a multi-threaded solution. So, instead of the majority of the password cracking tools that exist now, utilizing a single password cracking tool, it's a multi-threaded solution. core in a system with dual and quad core systems becoming more prevalent, this will actually utilize 100% of the processing power in the box, which gives an order of magnitude in and of itself in password cracking. Yeah, there we go. All right. Sounds loud enough up here. In addition to that, it comes with its own level of pretty great level of flexibility along with some simplicity. It really can take as an input just about anything you want to feed to it. Some existing inputs that are going to come with the tool as it's released, obviously you can send it brute force string, brute force attacks, and then a start and a stop string and an alphabet to run through. It can run through a word list, a rainbow table or hash table. It can also spit out its own output. In addition to providing an answer, it can provide a rainbow table as output, do some pre-computing as well. It's a visual aid for how it works. Basically, when you feed it the input, you're going to feed it a brute force attack, a dictionary hat, rainbow table, and it's going to take that as a single large key space or crypt space and break it into smaller chunks. Those smaller chunks will get sent out across. Different servers and then each server will take that chunk of its own, break itself into smaller chunks, and send those out to the individual threads on the system. Then the thread will take the chunk and actually process each individual word at a time and then spit back and ask for another chunk. That will all roll back up, so if a server finishes its chunk and there's more available, it will come out, request a second chunk, and just process through the whole thing by splitting it up into smaller pieces instead of trying to attack it just one word at a time. Again, just a quick review on the technology, just in case people aren't extremely familiar with password cracking. You've got your different algorithms, your MD5, which is the FreeBSD and the more common Unix-based password hashing, NTLM on the Windows side of the fence, SHA, which is what WPA2 uses or the CALPADDY2 uses. Those of course will come with their own different speeds that they can run at. In addition, you can do a lot of other things. You can feed it, of course, a brute force dictionary rainbow tables, which is exactly what your rainbow tables look like right here. Also one of the things that you run into when you're trying to brute force or crack a password are the different tools or utilities that people put in place to make it more difficult. SALT being the one that's most applicable for this tool, largely designed to prevent you from being able to do a rainbow table or hash-based attack, which is again one of the reasons why this tool helps reinvigorate that. When a rainbow table isn't a solution because of SALT, like on an MD5 password, you're left with having to try each password again and you're left back to that problem of time. If this tool were to be used, which it could in an approach similar to the Hydro tool so that you could do a remote attack on an actual service, again you've got a prevention mechanism there of limited number of retries. and also the actual availability of the system to handle X number of connections per second. Distributed computing, the approach here, particularly for password cracking, is considered embarrassingly parallel because it's extremely easy to, at least in theory, divide the attack up into smaller chunks like I described in the last slide and send it out across all the servers. Distributed.net did this forever ago. Their approach was largely aimed at cryptography itself, not password cracking, which is really a whole other ball of wax because one of the issues you run into there is the key space is so large, so much larger than a password, the numbers are quite, it takes quite a bit longer. This may help, but it still takes years, as distributed.net has shown, to actually effectively attack a cryptography-based hash. Such as public-private key or anything like that. Other tools that are similar to this, Dijon is John in the distributed format. It's not as easy to use as this, but it's one approach. John, through its ability to add functions to it, someone has written a parallel function that you can use to make it at least run parallel on the same machine and maybe, through some creativity, get it to run across separate machines. Access data has a command. It's a commercial product called DNA that appears to be very similar to this approach, but it's not GPL'd. You know what? If I don't put it there, there we go. So, what is it? There's two pieces to this tool, and the first piece is actually written in C, obviously for speed reasons, and that is the multi-threaded side of it for breaking it down on one system across all the cores. It was designed to be as simple as possible, so it takes a single function to crack a single password and then return a single true-false result or optionally fill a buffer that was passed to it with the resulting hash in the instance in which you're actually producing hashes and not cracking a password. So, I don't know if anyone's tried to poke around in John's source code where you can actually add new password hashing methodologies or anything else, but it's far simpler than anything else I was able to find in the sense that it doesn't have a library or list of 12 different functions with different states to apply to actually crack the password. You write one simple function to do one password, and it does the rest, and we'll send it across all the servers and everything else for you. Additionally, it's an asynchronous, interruptible process. So, you start the attack, it returns immediately, and you feed it a callback function, so it will return when it's done. You still get your status, but you can turn around, do everything, do other things. You can, at your own will, report on the status of the attack as it's going on an individual level, and obviously that was pretty important to be able to get it to run across multiple servers and then send the data back. So, that's another nice benefit of this particular C library. And then, again, it's very easy to take the output of using the C framework and turn it into the Python distributed attack module. So, really... Really, what's inside, basically what's inside this lib attack tarball is an entire environment for you to build easily a single, multi-threaded attack, like command line program. It comes with all of the lib tool and make and configure setup inside of it. You just drop your code in, run a configure, make, make install, and you're done. And then, with just a little bit of glue, it actually will turn around and turn into the next step of the attack for making a distribution. So, that's pretty much what we did. Breaking down into the detail on lib attack thread, there's the primary structure, which is the attack... It's a C structure, which is called attack ST. This is the attack structure that you build when you launch your attack. You're primarily filling it with your reader and your writer, which are the file structures that you use to send, okay, what's my list of words, what's my list of hashes, and then if you're actually going to want to write this back out, where am I writing it to? What's the file I'm going to write the output to? All of this... Even the writing out of hashes can still be easily distributed across all the different servers, and you set it to null if you don't want to write out, or if you wanted to write out, you just pass it a file structure. Both the file in and file out file structures are the same structure type, which is on the next slide. Next, the other important thing that you'll need to feed this, a fair amount of it, everything from S under is essentially private or internal data used by the attack itself. Nothing you need to fill, but in addition to filling in file in and file out, you'll give it the actual function that it's using to cracking, the one that takes one word and returns the result, and then the number of threads you want it to run on, and your callback function. Nice. All right, I'm moving on, we'll just burn. This is the file structure that you'll prepare, that you'll send to it. There are initialization... There are initialization... There are initialization... There are initialization... There are initialization functions inside. Thank you for making me talk louder, since that's exactly what this is designed for. There are initialization functions assigned inside the library that come with the different reader and writer modules that you can plug in. This was designed somewhat similar to the GTKC object-oriented approach, where you've got a couple of pieces of data, and then you've got a series of methods that are referenced inside the actual file structure itself. You'll pass it the path of the file. For instance, if you're opening a file, you can also pass it... When you're building your own reader or writer, you can pass it a pointer to your own data to use. For instance, on a file reader, you can pass it the file pointer itself. On a brute force attack, you use the pointer to store the start and end string, things like that. Then there's four functions that the lib attack thread will call on any particular reader or writer. It'll open it, it'll ask for the next block, which on a reader would be the next block, of words to read, and on a writer, that's going to be the next block to write data out to. That'll get essentially like a write buffer that'll get flushed out to the file. Free is called every time a block is completed, so you have to manage your own memory inside of the file structures. If you allocate a block, you're responsible for deallocating it when you're done, and the free function will be called for every block to assist you in that. When the attack's done, it closes the read, the file structure. That's essentially the entire attack structure. You've got your attack ST and your two different files, your read in and your read out. Once you've built your structure, there's three different methods you use to manage the attack. One to start it, one to stop it, and one to check it. Since it's asynchronous, once you've started it, whether it's through a signal interrupt, or your own decision, you can stop the attack at any time. It clears out any unprocessed words, and will stop the attack after finishing any blocks that are currently going on. Generally it'll stop it just about immediately. In a few hundred milliseconds, the attack will shut down. Checking will just return the current status of the attack, the number of records that it's tried so far, and the total number of records. This function is obviously only going to return the attack running on the current system. Or in the current environment. On a distributed attack, this is something that has to be aggregated, and is what's handled by Medusa. Here's a complete attack function, after all of that. The entire function's quite a bit simpler, again, than other approaches. It's passed a word, the size of the word. If it's going to need to write out, it's passed the buffer. The buffer for writing out to, and the size of that buffer. You set up the void data. The data pointer is your own pointer that you have access to, if you need to use. This is generally where you're going to store the hash that you're trying to find the answer for. For example, with CalPadi, it stores all the different fields of data that are extracted out of the packet dump. With an MD5 hash cracking attempt, it's got two values. It's going to store the salt. It's going to store the data. It's going to store the hash in the actual crypt text. Load that up out of the data pointer, pass it over to a function to actually produce the resulting hash, and then compare your results. There's three different return values that this function can return. Either it's an invalid word that can't be checked, it found the answer, or it didn't find the answer. Again, simplicity was the goal here, to try to build something that could easily take on additional brute forcing password cracking attempts. This is actually the building of a hashing function. Instead of the first one that was actually trying to crack a password, this is a function that is going to produce a hash file. In this particular hash function I chose, in part because it's so simple, this one is actually just copying the input word into the output buffer. It's not actually producing any type of hash. To produce a hash, the only extra line that you would add ... The two that I had for produce, producing hashes, didn't quite fit well on the screen. The additional line, you actually produce the hash and write it back out. Where this particular function is used is actually taking a list of words and turning it into a lib attack thread dictionary. The only difference here that you can see is that the word's the same, but what it does is it null pads it to a fixed size. The dictionary that lib attack thread prefers to use is a fixed size set of words. The reason that was critical is when you're doing a hash, you want to make sure that you're doing a distributed attack and you're passing the same dictionary out to hundreds of different computers, it's very likely that you will take, out of one dictionary, have multiple clients use different pieces of it. By making the dictionary words fixed length, it's very easy to give out chunks of that dictionary to different clients. Basically a rainbow table would look the same. The majority of the rainbow tables I looked at, I've seen so far, have all been fixed widths on each chunk of each hash that it's using. This is basically the same thing except instead of it being a hash, it's just a word that needs to be checked. You can see here that building a function that produces rainbow tables is also very simple. You just take in the word, produce the result, send it back to the output buffer. Lib attack thread takes care of the responsibility of taking each individual hash, aggregating it together into a larger buffer, and then sending that back to another thread that actually writes all the data out into the resulting file for you. Now we've got an attack function. It needs to be rolled up into the actual library that you can use to send out to a distributed attack. This is an example of a library function that can be used for exactly that purpose. The initialization of the library is a two-step process. First, you initialize your readers and your writers. Your files. All structures that actually will be bringing in the words or writing the words back out. And then you initialize the actual attack, passing it those readers and writers, passing it your function that you're using, the number of threads, and all the other details. The check, stop, and attack don't need to be customized or modified for each and every attack. You just basically need to initialize your attack, and then the rest of the library works as is. As you can see here, it's just as important to make an initialization function, you also need to make something to clean your mess up when you're done. There's really two functions in your library for every different type of attack that you want to build. Because it comes with automake, autoconfigure, and libtool pre-setup in this environment, adding a new attack to the environment and making it so that you can do all the fancy configure, make, make, install is pretty simple. It's basically three lines. You need to specify the name of the library. You need to specify the name of the library. You need to specify the source files that you're using for the library, and if there's any additional libraries you need to link in, then you specify those, but that's all there is to it. Most of the mess here is also taken care of in producing an attack library. Here's an example of actually running the attack inside of, say, a command line executable. Once you've got your initialization methods put together, you're going to have a lot of data structure. You've got your resulting C library that you're going to load into your program. You basically initialize your data structure. Here's an example of a cow-patty data initialization. You can see that there's several different variables that are required to compare the hash against what was pulled off the wire. You'll fill up your cow-patty data structure with what you want to attack. You'll fill up your dictionary attack structure with a dictionary file. The actual index is actually a little bit more difficult to use. actual function that's going to be used to run the attack word by word and then the number of threads and the callback when it's done. Then you start the attack, and it's going to return immediately, and the attack again is going to run on a separate thread. Now you're free to do whatever you want. In this particular instance, I'm just looping, waiting for the attack to finish every five seconds and spitting out the current number of records that have been processed. This current approach is fairly similar to what CalPadi currently does, the main difference being that instead of spitting out each thousandth word and the time involved, every five seconds just spits out how many words has been computed. One of the side effects to running a multi-threaded attack is in some examples where they'll show you the last password that was tried, it's fairly difficult to determine what the last password that was attacked was as a part of output back to the user because it's running three, four, five, however many threads you've got going at once, different simultaneous attacks. Instead, useful output is the number of passwords tried per second and the total percentage of the key space that's been exhausted, things like that. When you're done, you run the destroy function, and the callback will get called for you. Even if you stop the attack prematurely, the callback will still get called, so you can get your output and any errors that came out of the attack. There we go. It's very easy to stop. Signal handling can often be frustrating, but it's frustrating when dealing with just about anything that you have to write and see. Here's a very simple example of one function call to actually stop your attack. Storing the attack structure globally inside of the executable and then just calling stop attack on it is all you need to do. You can put this on all of your signal handles, and at any point in time the attack will stop, the binary will close up, and everything cleans itself up nicely. Then again, just like building the library was fairly simplistic, making it so that you can utilize the existing framework for building the actual executable is just as simple. Again, you really only need three lines. The name of the output executable file, a list of all of your source files that are needed to compile it, and a list of any special libraries that need to be linked into the executable. All the libraries that are required by the attack function itself, Pthread, are linked to the executable. The ones that are required for the threading or anything else for the attack function will actually already be linked in to the library, so you really only need to specify anything additional. For instance, with CALPADDY, it needs access to the PCAP so that it can pull apart the data capture and get the variables out of it. That's really the only thing you have to link in in this particular case. Just a quick recap. Again, you're going to build an attack structure that's primarily filled with where you want to read your word or hash list from and where you want to output your data if you're going to do a rainbow or hash table. You need to also specify the function that's going to be used individually for attacking each word and then the number of threads and then a callback function inside of that. Initialization and destruction methods inside of your library are the two things that you have to define there, but altogether you're looking at writing three things. You've got two functions, all of which should be easily less than 100 lines apiece, and you've got a multi-threaded distributed command line attack beast. Next step, now one machine's nice. Taking CALPADDY as an example from 90 or 100 passwords per second to three, four, or 800 passwords per second, or in one particular instance, I was able to get it to run at almost 1,900 passwords per second on one system. You can see that it's nice, but you're still limited to one box, and you're still limited most likely to a box that you have. The next step is running that out across as many machines as you can rent, buy, steal, store, or infect. That is where Medusa comes into play. Medusa is a web-based framework that will load up an attack library module and then send it out across multiple clients that have linked into it. It's written in Python, which is where the name Medusa comes from. It operates on a client-server protocol. You've got one server that distributes the attack out to as many clients as you link up to it. It's one level deep, it's not multiple levels, and it doesn't do P2P, but it's still very effective. With this type of approach, it reflects the type of control that you're probably going to want in the sense that you're going to want to make sure that the systems that are linked into you are systems that you trust. If it's not a system that you trust and it's cracking passwords, it could be returning bad data. It will automatically load up the attack modules. Basically what you do is you drop the library module into a directory and it searches in that directory and pulls everything into it. It loads those up. It drops it into a web interface for you to fill in all of your initialization data, and then runs the attack for you. There's a little bit of glue that has to be stuck in between the C library and the Python module that actually gets loaded up. It has to get a little bit of glue that gets Basically, what you're doing here is you're telling the web framework what it is that it's being fed. At the very top of the file, you specify the name of the data structure that is holding your hash data, the name of the Python module, and then the description that gets put on the web page of what exactly this is doing. Underneath that, you then define those arguments that are being sent to the attack to be processed. In this particular instance, this is an MD5 crack and this is the initialization argument. It needs a salt and it needs the actual crypt text. One of the things that is convenient about this wrapper is that it will actually allow you to reorganize those arguments into something that is more convenient for the web framework and for user input. In this particular instance, both the salt and the crypt are being passed to one argument type. The argument type is called MD5 password. Inside of Medusa's framework is another directory full of Python scripts that are also loaded up that you can add to that list different argument types, string, integer, hex. This is a custom one that I put in for FreeBSD's MD5 crack. Basically what it does is it produces to the user web input of, give me the entire hash, dollar sign one, dollar sign, salt, dollar sign, and then the actual crypt text. It takes the salt and the crypt text out. It turns the crypt text from its current text representation into a binary representation, and then it feeds those two pieces back to the actual library. To do that, you need to have a binary representation. Instead of producing two inputs to the user to have to do the work themselves, it can actually wrap that up. Another example of this type of convenience, you can have 20 or 40 or 60 individual hash files that you want to aggregate together into a single conglomerated hash table. You can have those 20 files. The file in archetype that's already in Medusa will see those 20 files and read the description out of it and produce to the user one option on the dropdown to pick from. It will then take that 20 files, divide it by the number of clients that are attached to it, and when it actually spits out the attack, it will break each file into as many pieces as it needs to and send out each piece of each different file to each client and manage the attack for you. Doing all of that in Python means that not only is it easier to add new argument types because Python's a lot easier to write in and much more flexible, but it also means that the interface between Python and C is much more simplistic. This argument type here, the md5 password argument type here, can also be referenced like a function. You can actually pass arguments to it. Those arguments automatically get shoved into the init function on the Python class, the argument type class. So, if you wanted to have greater flexibility, one example that I just took up here was using the Python class, which is essentially the project that requires I don't think I have in the slides here, but with your file and an argument type, you can pass it a type, hash, dict, or whatever you want. When it looks at all the different hashes that are inside of this attack server, it'll group it by type and it'll only show if you say file in hash, then it'll only show you the hash or rainbow table files in the system. If you pass it dict, then it'll only show you the dictionary files inside of the system. There's lots of ways in which you can customize the argument types to, again, present a valuable user interface on the web attack side and, at the same time, not have to deal with writing too much C code for processing this, since you can all handle it in Python instead. Here's the actual wrapper code. Now you've defined your arguments. Basically, all you have to do, this function's goal here is to take the arguments from Python and feed them into C. There's four functions. There's four pieces of that. The first, you just define, whether it's an integer, string, whatever it is, the different arguments that you're expecting to get from Python. The second chunk is where you call the py parse tuple. It will actually get the attack arguments and shove them into your C variables. The third step is an optional one. When you're dealing with binary data that is not a null, not a C string that's null padded, then Python will also pass you the size of the string. You're going to want to check that against what you're expecting. For instance, with CalPatty, the nonce and the EA pull frame variables very likely will have zero byte data inside of it, so you can't just receive it as a string and check the length of it. You've got to get the actual size of the data that's being passed back from Python, and check and make sure it's the right size that you're expecting. If you're just dealing with simple strings and integers, you can actually just get it actually skip that part, or if you just don't feel like actually checking your data, you can skip it anyways. Then the last piece is where you just call your initialization function. Again, you don't need to deal with calling the start and the stop and the checks or anything else. You're just getting the data initialized so that the attack can run. Once it's initialized, Medusa will take over the rest for you. Again with the argument types, I think I really skipped ahead and covered a bit of this already, but again, whatever you pass inside of the argument type will get fed into the C, and it can take arguments that will pass to the class, and in this lies a class. Here is an example. Here you see file in dict. This is exactly what I was talking about earlier. The file in argument type can take an option of what type of files to show to the user. In this particular case, this is only going to show dictionary files that it wants to crack and not show hash files. Medusa was built using Aaron Swartz' WebPY framework. The biggest reason why I chose WebPY was so that you can run it however you want. If you just run the actual Python framework, run the controller file, it will spit up its own web server and chunk right along. If I remember correctly, it uses the CherryPy web server, Python-based web server, so you don't have to actually do anything to get it to run simply. Subtitles by the Amara.org community It's not going to be SSL-encrypted, and you're going to have other limitations to using that approach, but that's the simple approach. It's also a full WSGI framework-compliant application because of WebPY. You can drop this into Apache, drop it into LightHTTPD, drop it into basically any web server that supports fastCGI, and take advantage of the SSL. If you were to roll it into Apache, you can SSL-encrypt the actual traffic. You can take advantage of the fact that it's going to be a far more robust framework or service to run in. It gives you that flexibility to run it however you want or wherever you want. You can run it inside of an existing website. You can embed it inside of an existing website with an htaccess file as long as it had support for fastCGI and a pendant under the end of something in an existing site and hiding it somewhere as well. Right. Yes, exactly. Someone else's website. All right. Let's see. Let's see. Let's see. Let's see. Let's see. Let's see. Let's see. Let's see. Let's see. Let's see. It's moving right along. It's time for the live demo. Fraught. Fraught with parallel. Here we go. Here is Medusa running in an environment with 40 different clients attached to it. Typically, Medusa will output the URLs of the different clients attached to it so that you can see what you're working with. In this particular case for the demo, I'm actually hiding the URLs. The whole framework is stateless-based. The entire distribution of the attack is stateless. Every single request between the clients and the servers or between you and the server is done with basic HTTP authentication and absolutely no session or state inside of it. Again, simplicity was a goal of this design as well. It uses XMLRPC to communicate between the clients and the servers. Let's go straight to doing an attack. Let's go straight to doing an attack. Here I've loaded up CalPATI and FreeBSD MD5 modules that can either do a brute-force attack on CalPATI, a dictionary attack on CalPATI, a rainbow table. It can actually produce rainbow tables. Each client will write its own rainbow table file out to its own self. In that particular instance, if you're not going to use a shared file system or back back it up to any of those cloud data storage systems that are available, then you're going to have to deal with bringing those hash files back, but the goal and intent here is to use a shared file system to store the actual data on. I'm not going to name any even though I'm tempted to. If you pop in here, this is to do cow patty. I'm just actually going to fill it in with some data that was pre-extracted. For this particular demo, I did not have time in Python to write, let's say, for instance, something that can process a packet capture dump like cow patty could. It certainly could, but instead of doing that, I'm just simply asking for the output that comes from processing the dump off of the wire. Included with the updated cow patty release is a... It's a small C program where you just feed it the dump. It spits out these variables exactly as they need to be retyped. Also, it would be terribly difficult to write a Python module that would be dropped into Medusa where you would upload the actual dump from your packet capture, and then it will break that into the values and send it out. One of the other advantages to this being a web-based system that's running on the cloud is you don't have to have any of this hardware with you. You can use your cell phone when you walk in somewhere and grab a FreeBSD MD5 hash off of a system. If you were to do the whole dropping of USB sticks attack and hope that someone picked it up and put it into their machine, when it reads the hashes off of their Windows computer, it could upload it automatically to an existing Medusa server and start an attack for you immediately. The whole thing is done on the Internet, so you don't need any more hardware than a basic web browser like a cell phone. You don't need any more hardware than a basic web browser to actually start up an attack. This particular one will... I've only got one dictionary file here, and it's a 40 million word dictionary file, just a little bit more, and it's going to get split across 40 clients. Now, the attack's running. Each block has its own status of how much of it's been processed out of the block that's been split up against. Now again, this is one file. This is one... dictionary file that was split into smaller chunks and passed out to each server. Each server has gotten a roughly one million word chunk of that dictionary file that it's responsible for processing. One of the things that you'll notice is that the attack speed, or records per second here, is accelerating. It started off pretty low and it's getting faster. There's two things to be aware of here. The first thing is that the time that's being measured for the attack started right before the attack actually got sent out to each client and is being measured as the clients send their results back in. For the purposes of this demo, I accelerated things to be between one and five seconds on the reporting back. In a normal attack, that's going to be a lot of traffic. If you've got 10, 100, or a million different bots or cloud computers running together, you're not going to want to have each one of them shoot back the status every few seconds. It works well for a demo. But in reality, it's going to be a lot of time that you're going to want to set and then wait for the answer to come back for you. One of the other things that I've noticed, and I'm assuming so far that this is a side effect of the particular computers I'm using for this attack, but when the attack starts up, when it pegs the CPU at 100%, it seems to be allocating the resources on the fly. When it first starts, for the first couple of seconds, it'll use one or two cores out of the eight core systems. And then after about five or ten minutes, it's eventually consuming 100% of all the cores. But for some reason, there is a delay there before it actually ramps up. At any rate, you can see it's already running at over 10,000 keys per second. If you run Cowpatty on your local laptop, you're likely to get about 90 keys a second. This is several orders of magnitude higher. And this is currently running on, it's actually 20 different cloud servers linked together. And basically, the cost to me to run all of these is $16 an hour. So for $16 an hour, you can go over 100 times faster than you could on your local laptop when trying to crack Cowpatty in particular. Just looking at the output here, again, each block has its own status as it's being processed, and then each client is listed underneath it with its... All right, let's stop the refresh. With whether or not it's still actively processing blocks being utilized for this attack. The client, once a client links up to a server, the client essentially only produces status output of what it's currently doing. You cannot start an attack from a client or manage a client at all from the web interface. You can only manage things from the server. Let's see. So, and again, it continues to ramp up over time. This will eventually scale up to about 1,800 keys per server, which across 40 servers would be about 80,000 keys a second, once it fully ramps up, if I'm doing my math in my head right. So again, for about $16 an hour, you can do 80,000 keys a second. Ten minutes. All right. So, I did that. I did that. I did that. I did that. I did that. I did that. I can't even see it. There is a reset button here at the very bottom of the screen that's not showing up to stop an attack and restart another one. The hash-based attack on cowpatty accelerates this so much faster to the point where a 40 million hash is run in less than a second on the 40 linked servers together. A brute force attack of MD5 password runs at about 33,000 keys per server. While this is fun, since I'm running out of time, I'm actually going to stop the demo short and get back here. Where this became very useful, besides trying to get other people's passwords, was actually taking the output of how fast you can run an attack on a rented cloud server and take that versus what it costs you to rent that server and use that to come up with a dollar value for passwords. Here, for instance, are your cracks per dollar for five different hash types. The last two actually were estimated. I was not able to get an attack module put together for them, so instead I compared the speed of John on password MD5 to the speed of John on those two different types and extrapolated the results here. Again, for a dollar, you can get about 8 million cowpatty cracks with a dictionary, 2.8 billion if you're going to use a rainbow table. 149,000 MD5 attacks, 237 billion on NT-LandMan. If people didn't somehow already believe that that LandMan was dead, I've got some numbers here that'll show you that for about a couple hundred bucks you can get any NT-LandMan password. And then with OpenBSD Blowfish, it still reigns supreme on the password hashing coming in just about, just a little bit faster than WPA, which is pretty impressive. It's pretty slow. Go ahead and give me the money, I'll get that for you later. Here's that extrapolated to different passwords based on the characters you're going to use inside of your password. If you're only going to use lower alphanumeric characters in cowpatty and you've got a seven character password, you can get your password for a couple hundred bucks. It doesn't even cost a dollar to get it if it's NT-LandMan. And if you go all the way to a mixed alphanumeric and all special characters, NT-LandMan is still 273 bucks and you can run through the entire key space. On cowpatty, you're in the millions already in terms of dollars to break that type of password. If you look at eight character passwords, I went ahead and at this point dropped the extrapolation data because the numbers that I'm multiplying were so high that I'm just assuming they were going to be wrong at this point because it was estimated from the beginning. But just working with the three things here, you can see that an eight character password, as you would assume, really kind of steps the bar up a bit. But if you're using a hash table on cowpatty, you're still at about $2 million for an eight character password. And with an MD5 password, you're at $40 million. So just as a potential conclusion that you could draw from here, if this was a home network, it looks like an eight character password if you were to attack the entire key space would keep you pretty safe. But if this was, let's say, a WPA network that Google decided for whatever stupid reason to store all their sensitive data on, an eight character password isn't going to do it. It's not secure enough. Now a ten character password and all of a sudden the numbers are quite different. You're in the billions, trillions on cowpatty, billions if you're using a rainbow table, and pretty large billions on a FreeBSD dictionary. So ten character password, if you really just want to be stupid and brute force the whole thing, you're getting into fairly safe territory here. But that's assuming that brute forcing is the only way to go. What about a dictionary attack? Now, the key space is massive, but here's an example of using dictionary words and assuming that each dictionary word that you use is actually run sort of like through John's, I forget the extension, but the ability to actually take one word and, well, let's reverse it, let's spot some characters, let's put some prefixes and suffix. So this assumes that you've got 10 million words and you do 2,000 translations per word. What is the value of that type of approach? An example of how this can be useful is companies looking to keep their passwords secure. It's not uncommon for them to run a password through a dictionary and look for something common, but here's an example of the size of the dictionary you ought to be using to consider that to be a safe password. A 10 million word dictionary with 2,000 translations, so you're really looking at a 20 billion different passwords that are being translated. So that's still a couple of thousand dollars in CalPadi. It's really not a whole lot. If you use a hash, it's seven bucks. This could be any length of password. It could be any length as long as it fits within, you know, you're only going to try 10 million different words or combinations of words. And then it's also fairly inadequate on the MD5 password hash. Even if you extrapolate that to 10 trillion words, still with 2,000 different combinations per word, you're talking about 10 billion words. That's not a lot of money. You're talking with CalPadi, without rainbow tables, it looks pretty good. But with rainbow tables on a large-scale corporate or enterprise network, that's really not a whole lot of money. And with the FreeBSD, you're talking $133 million. That's a fair chunk of change, but again, if this is the Unix system account to Google's financial data or something else critical that a password is protecting, it very well could be insufficient still. And that is a massively large difference. So, again, it's not a whole lot of money. You're talking about a large dictionary. So while brute forcing isn't very effective, walking that line between having a password that you can remember that you're completely sure isn't somehow even accidentally based on extrapolation of a large dictionary file, which you're talking, I mean, even all the words in the human language is going to be under a million, I would assume. Even if it was 100 million, you're still talking about several combinations of each word and then still run through multiple permutations. It's pretty likely, with a file of that size, that it's going to be less than a million. But you could get most passwords, and you're still talking about a pretty reasonable amount of money to spend, depending upon what you're trying to get to. Right. Right. This is a worst-case scenario, and that's the whole point here, is to take what password are you currently using. Are you really confident that if I had a 10 billion password dictionary that I was trying several combinations of each word on, I wouldn't come up with the password you chose? Whether it was 12 characters, 24 characters, if it's still based on something mnemonic, it's very likely that it would be found in a dictionary of that size. That's still a reasonable amount of money to be spending, depending upon the data you're trying to get at. Again, where's the impact? The impact comes from the fact that you're not actually buying these servers. Whether you're renting it illegally off of a botnet from a black hat standpoint, you're doing it legitimately off of cloud computing services, or you're, for whatever reason, using off time on your existing enterprise network with a large number of machines. There are several different ways in which you can utilize this to not only test your own passwords and come up with the dollar value strength of your passwords that you can compare against the data that you're trying to protect, but this is something that can, and perhaps even already is in use on botnets already. The amount of traffic, particularly if you're not wanting to watch the actual keys per second, can be almost zero. You really just need one packet to start it, and one packet per client per second. That's a lot of data, and it's a lot of work, and it's a lot of response to end it. That's it. With a million, you're talking a million clients, you're talking a million and one packets, perhaps, spread out over the lifetime of the attack. It's something that could be very easily hidden inside of botnet traffic as is with spam and other data. Also, everything's getting faster. One particular cloud computing option just doubled, well, actually two and a half times increased their processing power for the same amount of money between the beginning of this year and today. Even if you're going to just assume Moore's Law, then these dollar values cut in half every two years, but the current rate of cloud computing, I assume because it still is new and the actual cost isn't quite clearly known yet, it's still changing. These numbers are going to continually decrease every day, and the passwords will become cheaper and cheaper and cheaper to break. Again, a recap, that password strength is a good way to measure the safety of your data. The strength of your password should correlate to the value of the data you're trying to protect. With this method, you can now apply a dollar value to the strength of your password, and then you can correlate that to whether or not you're sufficiently securing the data that you're trying to secure. In most cases, I would argue at this point that you're not being very effective because most passwords that won't fall into a potential dictionary-style attack of this scale are probably too hard to remember. Now, you've got the post-it note problem. You wrote it down somewhere, or you wrote it down in a system that's protected with another easier password. Either way, ultimately, you're stuck with most likely a mnemonic password system, which ultimately can be found from a dictionary. Rainbow tables make it even easier. I'm done. Just 30 seconds on what next. There's a lot more that can be done with this tool, including, for instance, that dictionary approach of splitting, trying 2,000 different or more combinations per word. All of these things can be easily added to the Python side of the framework instead of the C, and make it very easy to distribute it out across the attack. Q&A is across the hall. Okay. That's it. Thanks, guys.