26
Special Anatomy of an Attack Or Layered Security Failure

Special Anatomy of an Attack Or Layered Security Failure

Embed Size (px)

Citation preview

Page 1: Special Anatomy of an Attack Or Layered Security Failure

Special

Anatomy of an Attack

Or

Layered Security Failure

Page 2: Special Anatomy of an Attack Or Layered Security Failure

Some Background

• In case you missed the news in the in 2011– Anonymous, an decentralized online

community acting anonymously in a coordinated manner

– Orchestrated Operation Payback, Operation Avenge Assange, and many others

Page 3: Special Anatomy of an Attack Or Layered Security Failure

Background

• Wikileaks support by creating Distributed Denial of Service attack:– Amazon, – PayPal, – MasterCard, – Visa – and the Swiss bank PostFinance

Page 4: Special Anatomy of an Attack Or Layered Security Failure

HBGary Federal

• Security firm had been researching the group Anonymous

• Thought they had identified many of the responsible people in Anonymous

• On Feb 5-6, 2011, CEO of HBGary Federal, Aaron Barr announces they have this info, but would not hand over to police.

• Goal: to reveal findings at a conference

Page 5: Special Anatomy of an Attack Or Layered Security Failure

Timeline of Activity

• Aaron Barr had his work written about in Financial Times on Feb 4.

• Strange network traffic was pounding HBGary Federal

• Was finishing presentation slides and since the story was in print, confronted who Barr believed to be “CommanderX” on Facebook. Without using an alias.

Page 6: Special Anatomy of an Attack Or Layered Security Failure

Motives For Confronting

• Mitigate the current attack on his company

• Try to portray himself as equal to Anonymous– Not at all wise to do to a group like

Anonymous

Page 7: Special Anatomy of an Attack Or Layered Security Failure

Anonymous Reaction

• Predictable: – Attack. – Expose as much as possible

• When Barr went into an IRC to try to continue “reasoning” attacks escalated.

Page 8: Special Anatomy of an Attack Or Layered Security Failure

Damage

• Web site defaced.

• Some 68,000 emails were stolen from HBGary Federal and posted to BitTorrent.

• Compromised Barr’s Twitter account

• Deleted over 1TB of backups

• Claimed to remote wipe Barr’s iPad

Page 9: Special Anatomy of an Attack Or Layered Security Failure

Attack avenues

• SQL Vulnerability on website– Used a 3rd party custom CMS (content

management system)– CMS had multiple vulnerabilities

• Social engineering to gather key data

• Reused passwords!!!!

Page 10: Special Anatomy of an Attack Or Layered Security Failure

CMS issues

• Using a 3rd party, custom CMS, you don’t get other users reviewing the code, like open source would have.

• Contained a SQL-injection vulnerability– Detectable by scanning software.

Page 11: Special Anatomy of an Attack Or Layered Security Failure

URL Used

http://www.hbgaryfederal.com/pages.php?pageNav=2&page=27

• The values of either 2 or 27 were not handled by the CMS correctly

• Allowed retrieval of data from the database• Specifically: the user database from the

CMS in order to glean userid/passwords

Page 12: Special Anatomy of an Attack Or Layered Security Failure

User Database

• Contained hashed passwords– Unsalted MD5– Susceptible to Rainbow table attacks -

provided they are not long, complex passwords

• They were not

• 2 passwords with high access were weak: 6 lower case chars and 2 numbers

Page 13: Special Anatomy of an Attack Or Layered Security Failure

Compound the Problem

• These two passwords were re-used all over.– Email– Twitter– LinkdIn– SSH accounts on a Linux Support system

Page 14: Special Anatomy of an Attack Or Layered Security Failure

One SSH Password

• Unfortunately, (for the attacker) the SSH account/password did not have elevated privileges on the Linux support system they found.

• However, it had an privilege escalation vulnerability that should have been patched months previously

• Full access now was available to Anonymous – and they purged data!

Page 15: Special Anatomy of an Attack Or Layered Security Failure

Barr’s Account/Password

• Even more valuable– Company used Google Apps/GMail– Barr’s account on Google was also the

Administrator for the entire Google Apps/GMail.

– Including resetting passwords on other Gmail accounts.

Page 16: Special Anatomy of an Attack Or Layered Security Failure

Reset Password

• Access to Greg Hoglund’s mail (HBGary employee and operator of rootkit.com site for analyzing rootkits).

• Found the root password to rootkit.com– Unfortunately, you have use a non-root

account to SSH, which they didn’t have• (direct ssh to root is prohibited on most Linux

systems now)

Page 17: Special Anatomy of an Attack Or Layered Security Failure

Social Engineering

• Emailed a security person pretending to be Greg to allow firewall access and reset a password to gain access.

• Tricked the security person into giving the local account name with a new password.

• Access now theirs to rootkit.com• http://arstechnica.com/tech-policy/news/2011/02/anonymous-

speaks-the-inside-story-of-the-hbgary-hack.ars/3

Page 18: Special Anatomy of an Attack Or Layered Security Failure

Next Steps

• Logged in as local account on rootkit.com

• Switched to root

• Copied the user database, password hashes, email accounts of all registered users of rootkit.com

• Defaced the web site.

Page 19: Special Anatomy of an Attack Or Layered Security Failure

Rootkit.com Hashes

• Unsalted MD5 hashes, once again.

• One rainbow table search later, more accounts to use.

• No information available as to whether any of this data has been used…or exposed

Page 20: Special Anatomy of an Attack Or Layered Security Failure

In Summary

• Vulnerable CMS/SQL injection– Didn’t follow security best practices for

security review of CMS software.– Didn’t scan the software for

vulnerabilities before going to production

• Use of open source would have been better, but not guaranteed.

• Picking a reputable/proven firm: best

Page 21: Special Anatomy of an Attack Or Layered Security Failure

Passwords

• Complexity lacking. – Need to use strong passphrases

• Reuse– Need to use DIFFERENT passphrases

for different accounts

• Servers allow basic password authentication– Use of private key for SSH

Page 22: Special Anatomy of an Attack Or Layered Security Failure

Systems Not Patched

• Even if it is a local account privilege elevation: PATCH!

• As a security firm, this is just inexcusable.

Page 23: Special Anatomy of an Attack Or Layered Security Failure

Social Engineering

• Yes, someone is asking to reset password via email. It happens. The security person should have had some checks to do:– Verify. Call him back on his established

phone number– If that’s not available, have the person prove

identity other ways– Not done. Simply accepted the email as the

verification

Page 24: Special Anatomy of an Attack Or Layered Security Failure

Social Engineering (cont.)

– Use of Personal Certificates on email– Send back only encrypted mail

• Would have forced attacker to try and find the certificate

– Many other ideas exist here…

Page 25: Special Anatomy of an Attack Or Layered Security Failure

Security Experts

• Didn’t follow basic security best practices.

Page 26: Special Anatomy of an Attack Or Layered Security Failure

References

• http://arstechnica.com/tech-policy/news/2011/02/anonymous-speaks-the-inside-story-of-the-hbgary-hack.ars

• http://en.wikipedia.org/wiki/Greg_Hoglund

• And various other links off of these main pages