dealing with attackers

32
Dealing With Attackers Keeping Attackers Out Fixing It When They Get In

Upload: justis

Post on 25-Feb-2016

32 views

Category:

Documents


0 download

DESCRIPTION

Keeping Attackers Out Fixing It When They Get In. Dealing With Attackers. Dr. Randy Appleton Northern Michigan University [email protected]. Dealing With Attackers. Denial of Service. Definition : Any attack that temporarily stops others from using the service. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Dealing With Attackers

Dealing With Attackers

Keeping Attackers OutFixing It When They Get In

Page 2: Dealing With Attackers

Dealing With Attackers

Dr. Randy AppletonNorthern Michigan University

[email protected]

Page 3: Dealing With Attackers

Denial of Service

• Definition: Any attack that temporarily stops others from using the service.

• Difficulty Rating: Not too hard; generally this can be done.

Page 4: Dealing With Attackers

Why?• You're mad at the owner of the service.• You're a competitor of the service.• You're testing your technical abilities.• You're a jerk.

Page 5: Dealing With Attackers

Destruction

• Definition: Any attack that destroys data.• Difficulty Rating: Easy for random target.

Difficult if you have a particular victim.

Page 6: Dealing With Attackers

Why?

• You want to make them forget about you.• To cause them significant pain.• You're testing your technical abilities.• You're a jerk.

Page 7: Dealing With Attackers

Embarrass

• Definition: Any attack that gives makes the other person look like an idiot. Generally this means you change his web site for him.

• Difficulty Rating: Highest.

Page 8: Dealing With Attackers

Why?• Political reasons (Chinese human rights)• Free someone from jail (New York Times)• You're testing your technical abilities.• You're a rude jerk

Page 9: Dealing With Attackers

Steal Information

• Definition: Any attack that gives you data.• Difficulty Rating: Doable if you don't have

a specific target. Very difficult if you have a particular victim you want to attack.

Page 10: Dealing With Attackers

Why?• You enjoy having a collection of credit card

numbers.• You want to snoop on your professors

personal life.• You're a nosy jerk.

Page 11: Dealing With Attackers

Who Are The Enemies

• Outsiders– Random Attackers from the Internet

• Insiders– Employees, Customers and People You Trust

• Smart People• Script Kiddies

Page 12: Dealing With Attackers

Script Kiddies • Script Kiddie: Script Kiddies are

inexperienced hackers, in that they do not have much technical expertise in the field of hacking. Many times they download software from the Internet which does the hacking automatically. (Wikipedia.org)

• Sometimes it’s a local user – Upgrading to root– Causing damage

• Sometimes it’s a remote user

Page 13: Dealing With Attackers

How to Be a Script Kiddie

• Find an exploit script – Go to the Redhat Errata page. – Look up every bug using yahoo, google, or

google groups. – Find a good-looking script.

• Run the script • Have Fun • Get caught • Go to Jail.

Page 14: Dealing With Attackers

Stopping Script Kiddies

• Read the RedHat Errata page • Install every security update mentioned • Sleep Happily • Go to step one

Page 15: Dealing With Attackers

Example Scripts

http://packetstorm.linuxsecurity.com/exploits100.html

Page 16: Dealing With Attackers

Example Script

• ping -I ';chmod o+w .' • Worked before modutils-2-3-19• Works because the kernel issues

/sbin/modprobe -s -k ; chmod o+w .

• Also … http://euclid.nmu.edu/~randy/Classes/CS426/Notes/sendmail-bug.html

Page 17: Dealing With Attackers

Net Attack #1

• Military Intelligence Asks When They Can Arrest My Fellow Prof

• We Panic!• We Find Lots!

– Some Log Entries– Some Modified Executables– One New Password Entries

Page 18: Dealing With Attackers

What Happened

• Students Went Wild! • We Talked To Attacker• Gave Everything to Military

– Military Knew Nothing• They Won’t Comment

Page 19: Dealing With Attackers

Did They Catch Him?

Page 20: Dealing With Attackers

Example #2• Apache Log Files Showed Attack

• strauss.udel.edu - - [19/Mar/2000:21:58:21 -0500] "POST /cgi-bin/test-cgi HTTP/1.0" 404 210 "-" "-" strauss.udel.edu - - [21/Mar/2000:00:41:58 -0500] "POST /cgi-bin/sh HTTP/1.0" 404 204 "-" "-" strauss.udel.edu - - [21/Mar/2000:01:26:13 -0500] "GET /cgi-bin/query?x=%3C%21%2D%2D%23%65%78%65%63%20%63%6D%64%3D%22%2F%75%73%72%2F%62%69%6E%2F%69%64%22%2D%2D%3E HTTP/1.0" 404 207 "-" "-" strauss.udel.edu - - [21/Mar/2000:02:41:56 -0500] "GET /%3C%21%2D%2D%23%65%78%65%63%20%63%6D%64%3D%22%2F%75%73%72%2F%62%69%6E%2F%69%64%22%2D%2D%3E/index.html HTTP/1.0" 404 241 "-" "-"

Page 21: Dealing With Attackers

What Happened

• What We Knew– Which Computer– What Time/Date– Which Attacks

• What We Did– Tell University of Delaware– Didn’t Follow Up

Page 22: Dealing With Attackers

Net Attack #3

• Our Web Page Changed“This Side Owned By Idiots”

• Log Files Showed Nothing!– Yes, we looked.– Yes, we looked A LOT.

• Solutions?

Page 23: Dealing With Attackers

What Happened

• We Reinstalled Everything.– The Whole OS– All the User Accounts

• And That’s No Fun

• Destroyed a Week of My Life• Annoyed Users• Cost Me Some Reputation• We Got to Upgrade

Page 24: Dealing With Attackers

The LetterTo whom it may concern,

I send you this e-mail because "whois 198.110.193.129" reports that the IP address belongs to Northern Michigan University.

One of the IP addresses in your authority domain has attempted to gainaccess to our server. Times are in PST. Please take appropriate

action.Excerpt from log file follows.

Kind regards,

Remco DoumaCygno Solutions

Page 25: Dealing With Attackers

The Log Filesecure:Mar 30 05:38:10 merlin sshd[24281]: Illegal user jordan from::ffff:198.110.193.129secure:Mar 30 05:38:10 merlin sshd[24283]: Illegal user michael from::ffff:198.110.193.129secure:Mar 30 05:38:11 merlin sshd[24279]: Failed password for illegaluser jordan from ::ffff:198.110.193.129 port 3251 ssh2secure:Mar 30 05:38:11 merlin sshd[24285]: Illegal user michael from::ffff:198.110.193.129secure:Mar 30 05:38:12 merlin sshd[24281]: Failed password for illegaluser jordan from ::ffff:198.110.193.129 port 3267 ssh2secure:Mar 30 05:38:12 merlin sshd[24283]: Failed password for illegaluser michael from ::ffff:198.110.193.129 port 3270 ssh2secure:Mar 30 05:38:13 merlin sshd[24287]: Illegal user michael from::ffff:198.110.193.129secure:Mar 30 05:38:13 merlin sshd[24289]: Illegal user nicole from::ffff:198.110.193.129

Page 26: Dealing With Attackers

We Attack *Someone*

• Remco Douma notices log entries…• Looks up attacking IP number• Mails us the log files and a polite note• Didn’t tell us IP of target machine.• We verify which machine

– IP and MAC match• Student guilty .. Or victim

Page 27: Dealing With Attackers

Internal Attacker #1

• Employee is angry with an e-company• He sets up a ping-flood• Northern’s net is slow for a whole

weekend• They net-people find our IP #, call lawyers• More lawyers• Solutions?

Page 28: Dealing With Attackers

Internal Attacker #2

• Student Angry with spammer.• He spams them through our server.• Our net guys notice a huge increase

Summary

Page 29: Dealing With Attackers

Internal Attacker #3

• Student is admin for Physics– They only have some technical clues.

• Student about to be fired• Student changes one char in /etc/passwd

uucp:x:10:14:uucp:/var/spool/uucp:uucp:x:0:14:uucp:/var/spool/uucp:

Solutions

Page 30: Dealing With Attackers

Internal Attack #4

• Inspection shows multiple simultaneous logins.

• Inspections shows students sell dial-up access.

• Solution?

Page 31: Dealing With Attackers

Working With Police

• Police not stupid– Typically have someone with a clue– A police clue, not a geek clue.

• Focuses on specific damages.– Monetary damages best.– There is an actionable lower limit.– Police *care* about moral crimes.

Page 32: Dealing With Attackers

Conclusions

• Don’t Panic– It doesn’t help

• When In Doubt, Reinstall– It’s the best idea– You get a free upgrade

• Police can help– But not much

• Lawyers Don’t Sue– At least in my experience