23 Haziran 2012 Cumartesi

LinkedIn vs. password cracking

To contact us Click HERE
I'm running through the LinkedIn password hashes right now, so I thought I'd do a live blog of the steps I'm doing. As I do each step, I'll update this blog live. When you reach the end, chances are good I'll be updating it again in a few hours.


Contents

The file is simply a list of the raw hashes, containing no username or other account information. We can assume that the original hacker has that information, but since it's of little use to cracking, we don't have it ourselves.

The following shows the contents of the file my simply dumping the contents on the command-line "more combo_not.txt".




One issue becomes apparent: about half the file has had the first 5 characters zeroed out. This is discussed at ycombinator. Atom has released a version of his Hashcat password cracker to deal with this. John-the-Ripper apparently also has published a patch for this.


In the meanwhile, I'm going to split the file into two. To do this, I type "grep -v ^000000 combo_not.txt > linked.hashes". I'm running Windows, but I do this command in a Linux VM on the same machine. Unix command-line programs like "grep" are too darn useful.


Look carefully at brief few lines shown above. The file is oddly sorted, with the first few bytes random, followed by a rough sort order of the remaining bytes. This is an artifact from something, either in the manner the hacker originally got the file, or in some tool he's been using to crack the file.Internally, tools will often sort these things in order to make multi-hash lookups faster.


Dictionary Crack

The first thing hackers try is the "dictionary crack". Brute-force password cracking takes time, but quickly looking up passwords in a dictionary is very fast.

The most common dictionary to use is the "RockYou" dictionary. This was from a massive dump from a few years ago from a popular gaming site. Unlike LinkedIn, RockYou stored their passwords in the clear. Thus, it serves as a useful mega-dictionary to crack passwords with.



This took only a few seconds to run. Notice that it wasn't very successful, finding only 93 passwords. But we expected that. According to the discussion on YCombinator, the hacker had already run a dictionary crack, and marked those passwords with leading zeros.

So let's try the other file containing the corrupted hashes using the updated Hashcat feature on the other file, containing all the zeroed-out hashes. This is shown below:


As you can see, this straight dictionary lookup results in 688-thousand passwords being cracked, or about one fifth of all the zeroed hashes.

The reason for such a small hit rate is that the original hacker probably tried dictionary words plus mutations. So, I'm going to try that next. Instead of using mutations with the entire RockYou dictionary, I'm going to use smaller dictionaries, like the one that comes with Cain+Able, John the Ripper, common Facebook names, and English words. I'm going to use the "best64.rules" of common mutations that comes with Hashcat, though they are coming up with a better best64 list of mutations, I don't have that list handy at the moment to use.


[OOPS. I made a mistake and chose the wrong attack method, using "permutations" instead of "straight". This would run much faster if I turned this off. However, since it's already been running for a while, I'll just let it finish the job, and see if anything interesting comes out of it.]

Dictionary cracks are fine, but brute-force cracks are also useful. There is a limit to how fast you can do brute-force.

To brute force, I'm switching to "oclHashcat+" instead of normal "hashcat". This uses OpenCL acceleration on the GPU, and runs about 10 times faster, but it's more limited on the complexity of the mutation rules. For simple brute-force, it's very nice.

Let's start with 5 character passwords containing the full gamut of Upper/lower case, digits, and symbols/punctuation.


As you can see from the "Recovered:" line, it found zero passwords. Thus, this means that the original hacker already did this brute-force. That's reasonable, it only takes 16 seconds to run this.

Now let's try to brute-force 6 character passwords and see what results we get.



As you can see, whereas 5 characters got us nothing (they'd already been cracked), brute-forcing 6 characters go us 32,163 passwords.Below, I dump the output file showing some of these:



Note that you see "patterns" here that are purely an artifact generated by the password cracking program. The last letter is always 'a'. As we scroll down in the file, this progresses to 'b', then 'c', and so on. That's as you expect from a 'brute-force' cracker, which tries each letter in turn. But weirdly, the second letter is also 'a'. That's probably related to how password attempts are distributed among the GPU cores. A graphics processor has 2000 slow processors rather than a few fast processors, each one cracking a different set of passwords at a time.

What we see here is that a lot of these short passwords are still based on dictionary words with minor mutations, like "Ram0na". That means for longer passwords for which we cannot brute-force, we can maybe tweak the mutation rules more to do a better job.

Is 6 characters long for a password? From the RockYou file, that was the most common length of password, accounting for roughly 25% of all passwords.



Or, we can graph this by looking at that length or shorter:



The thing that most people don't understand about passwords is that brute-force is an exponential problem. The amount of time it takes quickly grows out of all reasonableness. I've created a graph of this below:


People have the misconception that massive increases in performance lead to massive differences in password cracking, but it doesn't really. Moving from my desktop processor to a GPU that's 20 times faster  only slightly increases the length of password I'm able to brute-force. Even going to a 1000 instance Amazon EC2 cluster with super-computer performance doesn't dramatically increase password lengths that I'm able to crack.

Although, that difference happens to be in the "sweet spot" of password lengths, so maybe it can make a difference.


As you can see at this point, my cracking processes are running in the background, so I'm busy playing with Excel instead to produce these graphs. My main CPU is still churning away doing a mutated-dictionary attack on the "zeroed.hashes", and my GPU is busy with a 7-letter brute-force fo the "linked.hashes".


I started a job with the "best64.rules" from oclHashcat, using not just RockYou, but a few other wellknown dictionaries. This is what the command-line looks like at startup:

It spams the screen for a bit, but here's what it ends up at:


As you can see, in 12 seconds, it found 31k hashes, out of a list that had already been purged of all easily crackable passwords

Running the same "best64.rules" over the "zeroed.hashes" list using the "-m150" version of Hashcat leads to the following result:


This recovered about 40% of the zeroed passwords, or 1.4 million out of the 3.7 million. That's to be expected, as these are passwords that the hacker already found, so should be easily found by us.

---
I just saw this Tweet go buy about the original forum post:


Here is a screen shot of that link. You can't see it at the tiny resolution I've shrunk this to, but you can click on it to expand and read it. What you see here is how the "password cracking underground' works. When hackers break in, they distribute the password lists to other people, who each works on the file trying to use their own methods to crack passwords that others may not have found. This usually means custom dictionaries, as well as custom mutation rules applied to those dictionaries. The InsidePro forums are full of this stuff. They have removed this post, because of course, of the press involved, but there are plenty of other posts like this from smaller password dumps.



----
Oh, crap, I just found out that I'm using my older Radeon HD 6970 instead of the newer Radeon HD 7970. That's a big difference. Actually, it's good that way. I'll just stick the new card in another machine, and let it run around the clock without having to disturb my main machine.

-----

An explanation of HashCat's modes.

First, you need to decide on "hashcat" vs. "oclHashcat-plus" vs "oclHashcat-lite". The first uses the CPU and has the most features. The last uses the GPU and has the best speed, but the fewest features, and can only crack one password at a time. The one in the middle, "oclHashcat-plus", has a good set of features and GPU speed, so it's the one I use the most. You also have a choice of 4 programs to choose from, either the Linux or Windows version, at either 64 or 32 bits.

The command-line parameters for "oclHashcat-plus" are:
--hash-type 100
There are a lot of hashing algorithms. Currently, 27 different algorithms are supported. The number 100 represents "SHA1", the algorithm used for LinkedIn.
--attack mode 3
There are many attack modes. The most common are the "mutated dictionary attack" (1) and the "brute force" attack (3).
--custom-charset1 ?l?u?s?d
You have to configure your charset. You can configure different charsets for different letters, such as using upper-case only for the first letter, and a symbol-digit for the last letter. The symbol ?l means lower-case, the symbol ?u means upper-case, ?s means symbol/punctuation, and ?d means numeric digit. Using the "full" charset of all letters (upper/lower), digits, and symbols is 96 characters.
--outfile combo_not.out
This tells the program where to save the passwords it finds
--outfile-format 2
I like to just save the passwords alone, which is format number 2.
combo_not.txt
After all the options, the next expected input is the file containing the hashes.
?1?1?1?1?1?1
Lastly, it expects the "mask" of patterns to try. To try for a 6 character password, use the mask "?1?1?1?1?1?1". The number '1' refers to "charset1" from above.
Thus, to brute-force six-character passwords, you can run the following:

oclHashcat-plus64.exe --hash-type 100 --attack-mode 3 --custom-charset1 ?l?u?s?d --outfile combo_not.out --outfile-format 2 combo_not.txt ?1?1?1?1?1?1?1

---
I've been trying to debug something with oclHashcat. It appears that while the Radeon 7970 is 30% faster at cracking a single password (2-billion hashes/second) than the Radeon 6970 (1.3-billion hashes/second), it's slower at multi-hash when given the entire LinkedIn file, doing only 200-million/sec vs 400-million/sec. This seems wrong, because the newer card is has a much better memory subsystem than the previous card, and in other tests I've done, has been much faster at multi-password cracking.
--
Use --remove. Oh, I found the source of the problem: I was using original file on the faster processor, which is twice as large as the one cut down removed the "zeroed" hashes. Memory lookups on GPUs are slower with the larger amount of memory. Thus, shrinking the file makes a big difference in speed. I wonder if splitting the file into small chunks that fit better within the GPU cache might work better.

In the meanwhile, though, simply removing from the source file all the passwords found so far (about 2 million of them) seems to improve the speed by quite a lot



--
Hashcat has updated their tools to support the zeroed-out hashes (to ignore the first few bytes when matching SHA1 hashes). Info is here:

Status

I left a bunch of stuff running over night, and have about 50% of all the passwords cracked. To summarize what I did:

First, I did a dictionary crack of some very large dictionaries. This took seconds, and got a large number of passwords. I'll rerun the numbers later, but it's like a third of all the passwords.

Second, I did a brute-force up to 6 characters. It appears LinkedIn has a minimum length of 6, so you won't find shorter passwords. This took 18 minutes. Going to 7 characters will take 3 days to complete, so I'm letting that run on a separate machine while I do shorter jobs on the main machine.

Third, I did "mutated dictionary" attacks. I used several basic dictionaries, such as the RockYou list, as well as the dictionaries that come with such tools as Cain+Able, John-the-Ripper (JtR), and a list of Facebook names. I ran through all the mutations in the "rules" directory that comes with Hashcat. This found quite a few new passwords not found by the other techniques.

Fourth, I'm doing what Hashcast calls a "hybrid" attack that combines a dictionary either prefixed or followed by a brute-force. For example, right now, I'm runnign a job that does all the words in the RockYou dictionary followed by six lower-case/digits/numbers.

The first jobs took little time, so I rapidly updated this blog post as I did every little thing. Since then, updates have been coming slower as the two computers spend more time crunching numbers.

Thunderbolt cables are bidirectional

To contact us Click HERE
The Intel/Apple "Thunderbolt" technology is sexy has heck. It's not the 10gbps speed (being only slightly faster than USB3 5-gbps), but the fact that it exports raw PCIe signals.

But it's a bit flaky. I just bought an Apple 27 inch "Thunderbolt" display to go with the new MacBook Air I just ordered online. Apparently, like many other people, I'm getting an intermittent failure with the screen frequently going black.

Tech-support was pretty clueless, with me explaining to them how to diagnose the problem, such as going to the "System Report" to see what the Thunderbolt controller thinks is attached.

Even worse, they didn't suggest the solution I came up with. Instead of using the built-in "input" cable in the display, I grabbed a normal Thunderbolt cable and connected to the "output" of the display (the output is for daisy chaining to a second monitor, or for hooking up other Thunderbolt devices like RAID arrays).

Had this been a normal display, or normal USB, then connecting to the output would not work. The electrical signals wouldn't work, and the connectors wouldn't match. But this is Thunderbolt, and this sort of thing actually works just fine. There's really no excuse for such interfaces not to be bidirectional.

The standard script when calling about a Thunderbolt display problem should be "Do you have a second cable? Can you connect it to the output port and see what happens?". It's the cable that is the most frequent cause of Thunderbolt problems, you'd think they'd have this worked out by now.

Even after a full year, tech support and the Apple "geniuses" are still pretty clueless about the technology. Two "geniuses" confirmed that the display would work even with non-Thunderbolt DisplayPort connections, which turns out to be false.

When I return it tomorrow, I'm still undecided what I'm going to do. Do I replace with another Thunderbolt display that's likely to have other flaky problems? Or do I just get the non-Thunderbolt display, which costs the same, but works over normal DisplayPort instead? I'm a sucker for sexy, new, but unstable tech, so I'm probably just going to replace it with a monitor that works.




I resisted my techno-lust and ended up getting the non-Thunderbolt display in exchange (they cost the same). It came down to the fact that I couldn't think of a single good reason to have the Thunderbolt display, but good reason to have the plain DisplayPort version: it works with older computers. I'm typing this on the new monitor with my older Core2 pre-Thunderbolt MacBook Air, and the monitor also works with my Radeon HD 7970 password cracking box. While I'm using this monitor almost exclusively to dock the new MacBook Air arriving Monday, such backwards compatibility is important.

I mentioned to the "Geniuses" how I got the Thunderbolt display to work, using a separate cable to connected to the "output" port. They were all surprised at this. Seems like this is something that Apple should train people on, as it would help diagnose a lot of problems.




Norton v Olson: A review of a review

To contact us Click HERE
I like Quinn Norton's (@QuinnNorton) book review of Parmy Olson's (@Parmy) "We are anonymous", so I thought I'd write of a review of that review.

First off, Quinn's post should be treated with a bit of skepticism. I think Parmy's book is better than how Quinn describes it. They are competing journalists covering the same subject, so would naturally disagree on the best approach. Also, I think Quinn herself is not objective enough on the subject of Anonymous.

But Quinn's review is otherwise pretty good, with some keen insights.

What makes the post interesting is how it reveals the truth about how journalists approach a topic. It's like a personal diary or internal monologue of a journalist that was never supposed to be published.

...which in turn produces insight into Anonymous. What has been written about Anonymous has been the result of a process -- a pretty messed up process manipulated by hackers. By understanding how Anonymous screws with media you can get to the truth behind media accounts of Anonymous. Olson's book is full of useful facts, but this review of the book may be more useful for "understanding".

For example, consider Quinn's description "It’s impossible [for journalists] to not be part of the thing [Anonymous], when the thing uses the media to talk to itself". This is one of many quotes in Quinn's post that you should stop and think about. I think sometimes her prose gets a bit flowery, but at the same time, these things are essential points.

It's also a useful insight into other reporting, such as the way John Markoff reported on hackers like Kevin Mitnick during the 1990s. Markoff let the hackers manipulate him into producing an exaggerated bombastic story, making both Markoff and his subject famous. It also led to Mitnick's self-destruction: after trying his best to convince Markoff he was the world's most dangerous hacker, Mitnick then was pursued and prosecuted by the FBI who believed it to be true.

So as a meta-piece of hacker journalism, I think Quinn's post is worth reading.


As for the subject of the review, Parmy Olson's book, I'm only a third of the way through it. I agree with Quinn's description that it focuses too much on LulzSec, but at the same time, it does have a lot of coverage of Anonymous. It's not how I would describe things, but I wouldn't say it's "wrong", either. What matters is that it's full of facts. Sure, these fact are for the general public and not necessarily as detailed/technical as I would want, but they do answer a lot of questions I've had about how Anonymous and LulzSec actually accomplished their antics. As I expected, their hacks were always lame (they aren't great hackers), but it's still interesting knowing how things happened. Whether or not you like how Parmy approached the subject, it's the most "canonical" listing of the facts surrounding LulzSec/Anonymous that you can find.


Falsehoods programmers believe about networks

To contact us Click HERE
Inspired by falsehoods programmers believe about time and usernames, I thought I'd start collecting falsehoods programmers have about networks.
  1. Data on the network cannot be altered.
  2. Encrypted data on the network cannot be altered.
  3. Data cannot be accidentally corrupted, because TCP has checksums and Ethernet has CRCs
  4. If it's inside my perimeter firewall, that means I have total control over it (@armorguy)
  5. If it doesn't return an error, then send() sent all the data that was asked of it.
  6. Packets arrive in the order in which they were sent.
  7. Segment boundaries on a TCP stream are meaningful to the application.
  8. Segment boundaries on a TCP stream are not meaningful to the application.
  9. If you can't ping the target, then it doesn't exist. (@jjarmoc)
  10. If you can ping the target, then it does exist.
  11. TCP RSTs come from end-nodes.
  12. Bytes must be "swapped" from the network byte-order to the host CPU byte-order.
  13. It's an internal web app -- outsiders won't be able to discover where it is (@biosshadow)
  14. The DHCP address will be the same after a reboot (@shewfig)
  15. The DHCP address will remain the same until the next reboot.
  16. Well, it'll last a long time between changes
  17. Packets/PDUs go up or down the network stack, never sideways. (@maradydd)
  18. The IPv4 header is 20 bytes long starting with 0x45 (options are so rare we don't have to worry about them) (@shewfig)
  19. The DHCP server and local router are the same (@schrotthaufen)
What's fun is that you can see these errors happen by monitoring packets, I started this list for programmers, but we inevitably drifted outside programmers to network administrators. It's hard to draw the line, because some misconceptions are shared by both.
  1. There is no IPv6 on my network (@shewfig)
  2. NAT automatically blocks all inbound attacks (@shewfig)
  3. We know all the devices attached to our network at any given time (@armorguy)
  4. VLANs are just as good as physical segmentation. (@jjarmoc)
  5. Ok, VLANs aren't as good, but they are good enough for now.
  6. We have good WIPS/monitors, so we don't have rogue access-points anywhere. (@armorguy)
  7. No need to add it to the DNS; I'll remember it. (@shewfig)

Microsoft Surface: because the iPad is an existential threat

To contact us Click HERE

The term "existential threat" refers to things that threaten your existence. For the last 30 years, nothing has threatened Microsoft's hegomony over the desktop. The Internet didn't. Thin clients didn't. Java didn't. Linux desktops continue to be horrid. The Apple desktop is good enough, but only in the high-margin niche.

But a better Windows than Windows was never going to be a threat. That's not how technology works. Once you dominate a market, nobody is going to rise up and challenge you. Instead, the only threat is that your market becomes obsolete.

That is the subtext behind Bill Gates' infamous "Internet Tidal Wave" letter of 1995, recognizing that the Internet was going to destroy Microsoft, unless the company could completely turn around their business. They did, which is why Microsoft has survived for or the last 17 years. Their stock price was around $4 a share when Gates wrote that letter, and is around $30 today. It's also the subtext behind Microsoft's own existence, as the personal computer destroy all prior computer companies that built "mainframes" (even IBM's stockprice went negative at one point, being worth less than its assets).

Buy Microsoft's stock has continued to be at $30 for the last decade. While they succesfully capitalized on early Internet growth (mostly by tricking corporations to use ActiveX), they have failed in later Internet growth. Today's Internet is very differetn than the Internet of 5 years ago, which is different than the Internet of 10 years ago, which is different than the Internet of 15 years ago.

Today's, there's no good reason for the "desktop" computer. Fewer and fewer people are installing new Windows applications. The market has moved to the web (where thankfully, ActiveX is quickly disappearing), to mobile devices, to social networks.

That's why Microsoft is moving boldly to counter the threat to their business. The next version of Windows is designed primarily to be a pad operating-system with the "Metro" interface using touch, with the traditional "Desktop" interface as an option for old geezers who still want to use a mouse and a keyboard. That's not to say the keyboard/mouse aren't necessary, but that that they will be an adjunct to the primary touch interface, and not the primary interface themselves.

Microsoft needs a "Metro" tablet as part of this, but they are stuck. The high-end is dominated by Apple, who builds a luxury product by obsessive conrol over the hardware. The low-end market is dominated by Android, which Google gives away for free. There is no place in the middle for Microsoft to charge for an operating system. Hence, their bold move to deliver a product that competes with Apple on the innovation and quality of the hardware.

Many are praising/criticizing Microsoft, predicting that they will fail/succeed. I find that an uninteresting debate. Instead, what I find interesting is that the iPad/BYOD/cloud is an existential threat, and discussing the few options open to Microsoft, before it goes the way of Nokia and Blackberry.

21 Haziran 2012 Perşembe

TrialWorks v. 9.38b has been posted to the website.

To contact us Click HERE
We've posted the changes and files pertaining to 9.38b. It has a few adjustments form our original 9.38 release but anyone who has 9.38 should consider getting this quick upgrade. For most it will not include a database upgrade; prior version customers have to do the whole thing.

Our upgrade schedule will be limited over the Thanksgiving Holiday, so new requests scheduled through our Online Account Manager will be for next week. Keep in mind that if you are running 9.37 or higher you can automatically log into the account manager from TrialWorks's Help Menu.Visit our website at www.trialworks.com

TrialWorks version 9.4a Released!

To contact us Click HERE
Last week we posted version 9.4 followed shortly by version 9.4a. Most of the changes will be under the 9.4 heading, so you can use the following link to get the details: http://www.trialworks.com/UpgradeCenter/Customer/check.cfm?version=9.4 . This release included several fixes, an array of suggestions, and a few new features. Our upgrade calendar has been very busy this week but we still have room for upgrades. Version 9.5 is due out to be released shortly - read about that in my next blog.
-karl j.