Lecture 14 Page 1 CS 236 Online Secure Programming CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.

Slides:



Advertisements
Similar presentations
Stack-Based Buffer Overflows Attacker – Can take over a system remotely across a network. local malicious users – To elevate their privileges and gain.
Advertisements

Lecture 2 Page 1 CS 236, Spring 2008 Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
1 Security and Software Engineering Steven M. Bellovin AT&T Labs – Research
Lecture 16 Page 1 CS 236 Online Cross-Site Scripting XSS Many sites allow users to upload information –Blogs, photo sharing, Facebook, etc. –Which gets.
CSC 386 – Computer Security Scott Heggen. Agenda Introduction to Software Security.
CMSC 414 Computer (and Network) Security Lecture 14 Jonathan Katz.
Lecture 16 Page 1 CS 236 Online SQL Injection Attacks Many web servers have backing databases –Much of their information stored in a database Web pages.
Buffer Overflows Lesson 14. Example of poor programming/errors Buffer Overflows result of poor programming practice use of functions such as gets and.
Lecture 15 Page 1 Advanced Network Security Perimeter Defense in Networks: Firewalls Configuration and Management Advanced Network Security Peter Reiher.
Lecture 16 Page 1 Advanced Network Security Perimeter Defense in Networks: Virtual Private Networks Advanced Network Security Peter Reiher August, 2014.
Lecture 13 Page 1 CS 236 Online Secure Programming CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
ColdFusion Security Michael Smith President TeraTech, Inc ColdFusion, Database & VB custom development
Lecture 13 Page 1 Advanced Network Security Authentication and Authorization in Local Networks Advanced Network Security Peter Reiher August, 2014.
Lecture 16 Page 1 CS 236 Online Secure Programming, Continued CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
CIS 450 – Network Security Chapter 14 – Specific Exploits for UNIX.
Linux Security. Authors:- Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel, of CodeSourcery LLC published by New Riders Publishing.
Lecture 19 Page 1 CS 236 Online Advanced Research Issues in Security: Web Security and Privacy CS 236 On-Line MS Program Networks and Systems Security.
Lecture 16 Page 1 CS 236 Online Web Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Lecture 13 Page 1 CS 236 Online Principles for Secure Software Following these doesn’t guarantee security But they touch on the most commonly seen security.
Lecture 19 Page 1 CS 236 Online Securing Your System CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Lecture 14 Page 1 CS 236 Online Variable Initialization Some languages let you declare variables without specifying their initial values And let you use.
Lecture 13 Page 1 CS 236 Online Major Problem Areas for Secure Programming Certain areas of programming have proven to be particularly prone to problems.
Lecture 14 Page 1 CS 136, Fall 2014 Secure Programming, Continued Computer Security Peter Reiher December 4, 2014.
Databases Kevin Wright Ben Bruckner Group 40. Outline Background Vulnerabilities Log File Cleaning This Lab.
Race conditions and synchronization issues Exploiting UNIX.
Lecture9 Page 1 CS 236 Online Operating System Security, Con’t CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Lecture 3 Page 1 CS 236 Online Security Mechanisms CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Lecture 15 Page 1 CS 236 Online Choosing Technologies Different technologies have different security properties –Operating systems –Languages –Object management.
Lecture 8 Page 1 CS 236, Spring 2008 Operating System Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
Lecture 10 Page 1 CS 111 Online Memory Management CS 111 On-Line MS Program Operating Systems Peter Reiher.
Lecture 12 Page 1 CS 136, Spring 2009 Network Security: Firewalls CS 136 Computer Security Peter Reiher May 12, 2009.
Lecture 9 Page 1 CS 136, Winter 2010 Operating System Security CS 136 Computer Security Peter Reiher February 2, 2010.
Lecture 14 Page 1 CS 136, Spring 2016 Secure Programming, Continued Computer Security Peter Reiher May 17, 2016.
Lecture 19 Page 1 CS 236 Online 6. Application Software Security Why it’s important: –Security flaws in applications are increasingly the attacker’s entry.
Lecture 17 Page 1 CS 136, Fall 2010 Secure Programming, Continued CS 136 Computer Security Peter Reiher November 30, 2010.
Outline Introduction Principles for secure software
Outline Introduction Principles for secure software
Outline Basic concepts in computer security
Manuel Brugnoli, Elisa Heymann UAB
Protecting Memory What is there to protect in memory?
Protecting Memory What is there to protect in memory?
Protecting Memory What is there to protect in memory?
Firewall Configuration and Administration
Secure Software and the Law
Outline What does the OS protect? Authentication for operating systems
Outline Introduction Principles for secure software
SQL Injection Attacks Many web servers have backing databases
Outline Introduction Characteristics of intrusion detection systems
Outline What does the OS protect? Authentication for operating systems
Announcement Project 2 Due Project 3 will be out this weekend.
Outline Introduction Principles for secure software
Outline Introduction Principles for secure software
Web Security Advanced Network Security Peter Reiher August, 2014
Web Security CS 136 Computer Security Peter Reiher March 11, 2010
CS5123 Software Validation and Quality Assurance
Outline Introduction Memory protection Buffer overflows
Outline Introduction Memory protection Buffer overflows
Crisis and Aftermath Morris worm.
Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Understanding and Preventing Buffer Overflow Attacks in Unix
Preventing Privilege Escalation
Lecture 34: Testing II April 24, 2017 Selenium testing script 7/7/2019
6. Application Software Security
Advanced Research Issues in Security: Web Security and Privacy CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Least-Privilege Isolation: The OKWS Web Server
Outline Introduction Memory protection Buffer overflows
Set-UID Privileged Programs
Choosing Technologies
Presentation transcript:

Lecture 14 Page 1 CS 236 Online Secure Programming CS 236 On-Line MS Program Networks and Systems Security Peter Reiher

Lecture 14 Page 2 CS 236 Online Outline Introduction Principles for secure software Major problem areas

Lecture 14 Page 3 CS 236 Online Example Problem Areas Buffer overflows Error handling Access control issues Race conditions Use of randomness Proper use of cryptography Trust Input verification Variable synchronization Variable initialization

Lecture 14 Page 4 CS 236 Online Error Handling Error handling code often gives attackers great possibilities It’s rarely executed and often untested So it might have undetected errors Attackers often try to compromise systems by forcing errors

Lecture 14 Page 5 CS 236 Online A Typical Error Handling Problem Not cleaning everything up On error conditions, some variables don’t get reset If error not totally fatal, program continues with old values Could cause security mistakes –E.g., not releasing privileges when you should

Lecture 14 Page 6 CS 236 Online Some Examples Remote denial of service attack on Apache HTTP server due to bad error handling (2010) ntpd (Network Time Protocol Daemon) error handling flaw (2015) –Essentially allowing attacker to set target’s clock

Lecture 14 Page 7 CS 236 Online Checking Return Codes A generalization of error handling Always check return codes A security program manager for Microsoft said this is his biggest problem Very dangerous to bull ahead if it turns out your call didn’t work properly Example: Nagios XI didn’t check the return value of setuid() call, allowing privilege escalation

Lecture 14 Page 8 CS 236 Online Access Control Issues Programs usually run under their user’s identity with his privileges Some programs get expanded privileges –Setuid programs in Unix, e.g. Poor programming here can give too much access

Lecture 14 Page 9 CS 236 Online An Example Problem A program that runs setuid and allows a shell to be forked –Giving the caller a root environment in which to run arbitrary commands Buffer overflows in privileged programs usually give privileged access Privilege escalation – using program flaws to obtain greater access privileges you shouldn’t get

Lecture 14 Page 10 CS 236 Online A Real World Example Lenovo System Update Service Run by an unprivileged user to perform valid system updates Created a temporary admin account that had privileges to perform these updates Account name and password were predictable, allowing attacker to guess them And run as system administrator

Lecture 14 Page 11 CS 236 Online What To Do About This? Avoid running programs setuid –Or in other OSs’ high privilege modes If you must, don’t make them root-owned –Remember, least privilege Change back to the real caller as soon as you can –Limiting exposure Use virtualization to compartmentalize

Lecture 14 Page 12 CS 236 Online Virtualization Approaches Run stuff in a virtual machine –Only giving access to safe stuff Hard to specify what’s safe Hard to allow safe interactions between different VMs VM might not have perfect isolation