33
"Cheap Security Audits with Linux LiveCDs" Presented by Beth Lynn Eicher [email protected] For Notacon.Org 4/9/2006 Released under Creative Commons Attribution-NonCommercial-ShareAlike 2.5

Cheap Security Audits with Linux LiveCDs

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Cheap Security Audits with Linux LiveCDs

"Cheap Security Audits withLinux LiveCDs"

Presented by Beth Lynn [email protected]

For Notacon.Org4/9/2006

Released under Creative CommonsAttribution-NonCommercial-ShareAlike 2.5

Page 2: Cheap Security Audits with Linux LiveCDs

écouter moi si'l vous plait!

Page 3: Cheap Security Audits with Linux LiveCDs

You might be a systemadministrator if…

• Your friends andimmediate family call youwhen their computercrashes

• You are the sole IT personin your organization

• Your boss asks you to fixcomputers on a consistentbasis

Page 4: Cheap Security Audits with Linux LiveCDs

What do we mean by “cheap”

• Not going to cost youany $

• Maybe not the bestway to do this,monitoring systemsare better (snort andtripwire)

• It’s not going to costyou very much time.

Page 5: Cheap Security Audits with Linux LiveCDs

What exactly do we mean by“audit”

• To observe the currentconditions anddocument

• We are not attemptingto crack - or to test thestrength by trying tointrude

• Auditing is not to beconfused withmonitoring

Page 6: Cheap Security Audits with Linux LiveCDs

Recommended Linux Live CDs

• Knoppix 4.0.2 and 3.7• Knoppix-STD 0.1• BackTrack formerly known as WHAX

formerly known as Whoppix• Auditor by remote-exploit.org• System Rescue CD 0.2.18http://sysresccd.org

Page 7: Cheap Security Audits with Linux LiveCDs

Other CDs

• Burn chkrootkit and rkhunterCheck for rootkits and trojans

• Other OS installation media• BartPE for Windows usershttp://www.nu2.nu/pebuilder/

Page 8: Cheap Security Audits with Linux LiveCDs

Users will not ask for a securityaudit

• If it’s not broke, why fix it?• What could possibly go wrong?• Why are you invading my privacy?• Don’t you trust us?

Page 9: Cheap Security Audits with Linux LiveCDs

Management is not likely to askfor a security audit either,

however …

• You may need to do so to comply to legal,customer, or partner standards

• A security incident may get management to payattention

• Check occasionally for IT policy compliancy• Protect a specific mission-critical resource• Vulnerability+exposure=liability

Page 10: Cheap Security Audits with Linux LiveCDs

You need to initiate this process

Get away from your keyboard and initiate a project!

Page 11: Cheap Security Audits with Linux LiveCDs

You must get managementapproval first

Now is not the time totake Grace MurrayHopper’s advice…

"It is much easier to apologize than to ask permission."

Page 12: Cheap Security Audits with Linux LiveCDs

Why?• Proceeding without permission could be illegal.

Sorry wardrivers- you can’t audit first and sell later! PA Title 18, Chapter 76: Computer Offenses

• You could accidentally create a denial of serviceas you are auditing

• If an attack, accident, or disaster coincidentallyoccurs, you do not want to be blamed.

• Unless you already have a published policy thatsecurity audits will be done unannounced, youare invading your user’s privacy

• You should strive to the System Administrators’Code of Ethicshttp://www.lopsa.org/files/sysadmin-ethics.pdf

Page 13: Cheap Security Audits with Linux LiveCDs

How?

Document the entire scope and get management tosign-off

What systems will be auditedWhat tools you will useWhen you are doing this If you find something, are you allowed to further

investigate?How the users have been informed

Page 14: Cheap Security Audits with Linux LiveCDs

Scenario #1

You have been recently hired bya small company to be the sole

IT person.

Nothing has been documentedso no one knows what each

computer does.

Page 15: Cheap Security Audits with Linux LiveCDs

The risks

• No one admits to knowing the admin/rootpasswords

• There are several neglected systems thatcould already be exploited

• In the meantime, the users are typing theirpasswords on these neglected systems

Page 16: Cheap Security Audits with Linux LiveCDs

How to do the audit

• Boot the most recent Knoppix off of the CD1. Use ethereal to capture packets for a few days, observe

behavior, and document the key players of yournetwork

2. Use nmap to document open ports3. Use Nessus to check for vulnerabilities

• You should look for– Identify the ip address of each system on your network– What services are running– Remote logins… who are these people?

Page 17: Cheap Security Audits with Linux LiveCDs

Ethereal

Page 18: Cheap Security Audits with Linux LiveCDs

Nmap

Page 19: Cheap Security Audits with Linux LiveCDs

Nessus

Page 20: Cheap Security Audits with Linux LiveCDs

One quick fix

• Change all the root passwords on theLinux/Unix systems by booting intosingle user mode

• chntpw on Knoppix-STD can help youchange Windows passwords

Page 21: Cheap Security Audits with Linux LiveCDs

After observing you’ll …

• Make a graphical map of each node in yournetwork

• May decide to retire some machines• Replace vs wipe/reinstall• Discover that the receptionist’s desktop is

also the file server and the boss’s niece issharing mp3’s to the entire interweb

Page 22: Cheap Security Audits with Linux LiveCDs

Scenario #2

You notice an usually large amountsof bandwidth usage coming from anip address that belongs to a Linux

desktop.

Page 23: Cheap Security Audits with Linux LiveCDs

The risks

• Someone could have stolen the ip addressand your bandwidth

• The user could be abusing resources bydownloading or sharing software or mediafiles which may be pirated

• The system may have been cracked and thecracker and his friends may be stealing yourbandwidth

Page 24: Cheap Security Audits with Linux LiveCDs

How to do the audit

• Boot Knoppix on another system and runethereal to log the traffic.

• Make a note of the mac address that is usingthe ip address in question

• If you can safely remotely login, then use ps,lsof, and top to see what’s going on. Alsoverify the mac address with ifconfig

• Run chkrootkit and rkhunter

Page 25: Cheap Security Audits with Linux LiveCDs

Scenario #3

Your employer recently implementeda policy of stronger passwords andyou have been asked to check for

compliance.

Page 26: Cheap Security Audits with Linux LiveCDs

The risks

Weak passwords can lead to internal andexternal cracking.

Page 27: Cheap Security Audits with Linux LiveCDs

How to do the audit

Knoppix-STD has password crackers

• John the Ripper for Linux/Unix/etc/shadow files

• Pwl9x for Windows password files

Page 28: Cheap Security Audits with Linux LiveCDs

Scenario 4

You need to evaluate the data contents of anunknown hard drive before disposal.

Page 29: Cheap Security Audits with Linux LiveCDs

The risks

Possible sensitive data could be lost or fallinto the wrong hands

• Personal• Intellectual property

Page 30: Cheap Security Audits with Linux LiveCDs

System Rescue CD to the rescue

• Mount the file systems and take a look• Read support for ext3/2, reiser, reiser4, xfs,

fat16/32, NTFS, HFS• Make an image of the disk with PartImage• Use “wipe” to securely remove the files from the

disk.

Page 31: Cheap Security Audits with Linux LiveCDs

Sorry, that’s all folks

Page 32: Cheap Security Audits with Linux LiveCDs

Special Thanks to…

• My husband, William August Eicher JR

• Western PA Linux User Group

• USENIX and The League of Professional of SystemAdministrators (LOPSA)

• Carnegie Mellon University, School of ComputerScience

• Ohio LinuxFest

Page 33: Cheap Security Audits with Linux LiveCDs

Applause please for Notacon 3