Secure Coding Weasel nomad mobile research centre.

Slides:



Advertisements
Similar presentations
Operating System Security
Advertisements

Network Security Attack Analysis. cs490ns - cotter2 Outline Types of Attacks Vulnerabilities Exploited Network Attack Phases Attack Detection Tools.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
Abhinn Kothari, 2009CS10172 Parth Jaiswal 2009CS10205 Group: 3 Supervisor : Huzur Saran.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
1 Building with Assurance CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute May 10, 2004.
Software and Software Vulnerabilities. Synopsis Array overflows Stack overflows String problems Pointer clobbering. Dynamic memory management Integer.
Security Engineering II. Problem Sources 1.Requirements definitions, omissions, and mistakes 2.System design flaws 3.Hardware implementation flaws, such.
Flawfinder N ă stase George-Daniel MSI2. About Written in python Relatively fast(examined approx. 17milion lines of code in about 6.5minutes) Extremely.
Assessing the Threat How much money is lost due to cyber crimes? –Estimates range from $100 million to $100s billions –Why the discrepancy? Companies don’t.
1 Security and Software Engineering Steven M. Bellovin AT&T Labs – Research
Efficient Instruction Set Randomization Using Software Dynamic Translation Michael Crane Wei Hu.
Designing Security In Web Applications Andrew Tomkowiak 10/8/2013 UW-Platteville Software Engineering Department
Web Application Vulnerabilities Checklist. EC-Council Parameter Checklist  URL request  URL encoding  Query string  Header  Cookie  Form field 
OWASP Mobile Top 10 Why They Matter and What We Can Do
CS252: Systems Programming Ninghui Li Final Exam Review.
Secure Software Development Mini Zeng University of Alabama in Huntsville 1.
Copyright © 2002 ProsoftTraining. All rights reserved. Operating System Security.
An anti-hacking guide.  Hackers are kindred of expert programmers who believe in freedom and spirit of mutual help. They are not malicious. They may.
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
A Security Review Process for Existing Software Applications
Chapter 6 Buffer Overflow. Buffer Overflow occurs when the program overwrites data outside the bounds of allocated memory It was one of the first exploited.
Computer Security and Penetration Testing
CGI Security COEN 351. CGI Security Security holes are exploited by user input. We need to check user input against Buffer overflows etc. that cause a.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
OWASP Top Ten #1 Unvalidated Input. Agenda What is the OWASP Top 10? Where can I find it? What is Unvalidated Input? What environments are effected? How.
1 Vulnerability Assessment of Grid Software James A. Kupsch Computer Sciences Department University of Wisconsin Condor Week 2007 May 2, 2007.
COMPUTER SECURITY MIDTERM REVIEW CS161 University of California BerkeleyApril 4, 2012.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
CIS 450 – Network Security Chapter 14 – Specific Exploits for UNIX.
Copyright © cs-tutorial.com. Overview Introduction Architecture Implementation Evaluation.
Middleware Vulnerabilities Damian Tamayo Kansas State University MSE 2 nd Semester.
Linux Security. Authors:- Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel, of CodeSourcery LLC published by New Riders Publishing.
14.1/21 Part 5: protection and security Protection mechanisms control access to a system by limiting the types of file access permitted to users. In addition,
Buffer Overflow Group 7Group 8 Nathaniel CrowellDerek Edwards Punna ChalasaniAxel Abellard Steven Studniarz.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
Chapter 1 The Software Security Problem. Goals of this course Become aware of common pitfalls. Static Analysis and tools.
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.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
MOPS: an Infrastructure for Examining Security Properties of Software Authors Hao Chen and David Wagner Appears in ACM Conference on Computer and Communications.
VM: Chapter 7 Buffer Overflows. csci5233 computer security & integrity (VM: Ch. 7) 2 Outline Impact of buffer overflows What is a buffer overflow? Types.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
PREPARED BY: MS. ANGELA R.ICO & MS. AILEEN E. QUITNO (MSE-COE) COURSE TITLE: OPERATING SYSTEM PROF. GISELA MAY A. ALBANO PREPARED BY: MS. ANGELA R.ICO.
1 Design Principles CS461 / ECE422 Spring Overview Simplicity  Less to go wrong  Fewer possible inconsistencies  Easy to understand Restriction.
Chapter 29: Program Security Dr. Wayne Summers Department of Computer Science Columbus State University
Software Security Q: What does it mean to say that a program is secure? A: There is a sufficient amount of trust that the program maintains _____________,
Lecture 14 Page 1 CS 236 Online Secure Programming CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Packet Sniffing Hans Kokx
Developing a Secure Internet Service SE Linux in Production Russell Coker Linux Consultant.
SE-1021 Software Engineering II
CHAPTER 4 Methodology.
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
K. K. Mookhey Network Intelligence India Pvt. Ltd.
Udaya Shyama Pallathadka Ganapathi Bhat CSCE 548 Student Presentation
Secure Programming Dr. X
Theodore Lawson CSCE548 Student Presentation, Topic #2
A Security Review Process for Existing Software Applications
CompSci 725 Presentation by Siu Cho Jun, William.
Secure Software Development: Theory and Practice
Announcement Project 2 Due Project 3 will be out this weekend.
Operating System Security
Chapter 29: Program Security
Understanding and Preventing Buffer Overflow Attacks in Unix
Preventing Privilege Escalation
Presentation transcript:

Secure Coding Weasel nomad mobile research centre

Introduction

Vulnerabilities Overview Types of Vulnerabilities –General –Language Specific Best Practices –General –Language Specific Tools Conclusion Q & A Links Outline

Vulnerabilities

Types of Vulnerabilities Buffer Attacks –Buffer Overflow –Buffer Parsing Format String Attacks –%s in logging/debugging routines Race Conditions –World writeable temp files –Server/Client MITM Authentication Attacks Authorization Attacks –Holes in Authorization Mechanism –Too Much Trust of User Input Cryptography Attacks –Weak Algorithms –Poor Implementation

Best Practices

Best Practices - General Protect User Input –Restrict Input (and Output) to Acceptable Characters –Restrict and Flush the Buffer Properly Use Well-Tested Code –Especially for Parsing Code Reviews –By !You –Prioritize and Schedule Policies and Guidelines –Comprehensive Guidelines w/ Sign-off –Enforce the Policy Set PATH Environment Variable

Best Practices – General (cont.) Set Permissions to Minimal Required (Least Privilege Principle) Don’t Use Copy Functions that Do Not Check the Buffer Length Don’t Offload Security to the Client Centralize I/O Check Functions Validate/Be Aware Environment Variables (i.e. an altered IFS to change command line switches, or multiple entries for the same var) Robust Error Handling(Fail Safe)

Best Practices - C Use Protected Sting Functions –strncpy() > strcpy() –strncat() > strcat() –snprintf() > sprintf() –fgets() > gets() Use exec() instead of system() –$buffer = “/bin/ls; /bin/cp /etc/shadow ~/shadow” –system($buffer); # /bin/ls # /bin/cp /etc/shadow ~/shadow –exec($buffer); # /bin/passwd

Best Practices – Web Strip/Deny Unwanted User Input –Meta Characters –Value Assignments Check Buffer Length Upon Input/Output/Copy Parse with Well-Known Libraries –i.e. CGI.pm for Perl Don’t Store Access Information in Accessible Sources –You never know when MOD_PHP is going to dump your source

Tools Credit to John Marchesini

Tools – Black Box Testing –Passive Monitoring Wired Sniffing – Ethereal, tcpdump, Sniffer Pro (Ettercap for switched) Wireless Sniffing – Kismet, Airsnort, etc IDS/IPS (very limited use) –Active Attacks Local Attacks – QA Applications, Macro Tools Remote Attacks – Netcat, telnet

Tools – Component Testing – Library and API Calls, Persistant State strace, ltrace (*nix) Sysinternals.com (several Windows Tools) System Tools – top, ps, etc… –Runtime Injection BEAST –Reverse Engineering Disassemblers/Debuggers –SoftICE, DataRescue’s IDA Pro, OllyDbg

Tools – Source Code Review RATS, Flawfinder, ITS4, Klocwork (Static) CodeAssure Suite(both Static and Binary) NOTE: As with many security tools, or tools in general, these tools provide output for analysis, they do not replace a skilled reviewer.

Conclusion

Q & A

Links Secure Programming for Linux and UNIX HOWTO – Creating Secure Software Secure UNIX Programming FAQ NCSA Secure Programming Guidelines How to Write Secure Code SECPROG INFOCUS – Secure Coding – David Wong

Links - Tools SPIKE BEAST ltrace Ethereal Netcat IDA Pro Flawfinder

Links – Tools (Cont.) ITS4 Kismet Klocwork OllyDbg Ettercap RATS SoftICE