% CVSId: $Id: adulau.tex,v 1.1 2003/02/07 17:51:53 adulau Exp adulau $
%
%
%     Copyright (c)  2001,2002,2003  Alexandre Dulaunoy <adulau@foo.be>
%     Permission is granted to copy, distribute and/or modify this document
%     under the terms of the GNU Free Documentation License, Version 1.2
%     or any later version published by the Free Software Foundation;
%     with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
%     A copy of the license is included in the section entitled "GNU
%     Free Documentation License".
\documentclass[%
pdf,
%nocolorBG,
colorBG,
slideColor,
%slideBW,
%draft,
frames
%azure
%contemporain
%nuancegris
%troispoints
%lignesbleues
%darkblue
%alienglow
%autumn
]{prosper}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage{pslatex}
\usepackage[french,english]{babel}
%\usepackage{listings}

\begin{document}
\title{Security in Software Engineering}
\subtitle{Web Services \\ {\em Part 11 : Good practices for Secure Software.}}
\author{Alexandre Dulaunoy}
\email{adulau@foo.be}
\maketitle

\begin{slide}{Agenda}
\begin{itemize}
\item A little story, 
\item Buffer Overflows,
\item Race Conditions,
\item Security in Operations, 
\item Conclusion.
\end{itemize}
\end{slide}

\begin{slide}{Buffer Overflows}
\begin{itemize}
\item Process/Programs create sections in memory (heap, stack),
\item A buffer is various "continuous" chunks of memory,
\item What happens if the continuous chunks is overwritten ?,
\begin {itemize}
\item Programs can act act in strange ways,
\item Programs can fail completely,
\item Programs can proceed without any noticeable difference
\end {itemize}
\item The little story of the 5th Dec (brk() syscall exploit in Linux kernel).
\end{itemize}
\end{slide}

\begin{slide}{brk() syscall exploit in Linux Kernel}
\begin{itemize}
\item The kernel organizes a process's memory in a specific structure,
\item The kernel is also a program that "controls" all the programs on the system,
\item brk() is used to extend heap memory when requested,
\item Specific design on IA-32 systems (the kernel is mapped after the 0xc0000000),
\item This exploit is working locally (not remotely) but ...,
\end{itemize}
\end{slide}

\begin{slide}{Buffer Overflows - how to avoid ?}
\begin{itemize}
\item Make defensive programming,
\item Avoid a lot of default call (like gets() for libc, system.* in java...),
\item Use source-code scanning tools whenever possible,
\item Compile with stackguard-like system,
\item Use on the running system a protection against buffer overflow,
\item Don't rely on one system protection.
\end{itemize}
\end{slide}

\begin{slide}{Race Conditions}
\begin{itemize}
\item The example of the meeting,
\item RC occurs when an assumption needs to hold true for a period of time but actually may not,
\item Race condition has a window of vulnerability,
\item On computer systems, the window of vulnerability is often quite small,
\item File-based race conditions are the most important,
\item More related to multi-users systems (like Unix), 
\end{itemize}
\end{slide}

\begin{slide}{Race Conditions : example}
\begin{itemize}
\item class Counter example (via java.servlet) (the "synchronized(obj)" solution),
\item race condition in passwd (Solaris example),
\item Payment system and race conditions (ATM system example),
\item Asynchronous message delivery and race conditions (another payment system example),
\item and the issue of the 5th Dec...
\end{itemize}
\end{slide}

\begin{slide}{Race Conditions - how to avoid ?}
\begin{itemize}
\item Difficult to find and debug,
\item Apply rules of concurrency problem,
\item Limit usage of multithreaded/multiprocess (only when required),
\item Think about each microseconds between each operations,
\item Be atomic...
\end{itemize}
\end{slide}

\begin{slide}{Operations to maintain security}
\begin{itemize}
\item Security is everybody's problem but no one cares,
\item Network environment
\begin {itemize}
\item Monitor,
\item Only essential net services,
\item Separate management network from production,
\item Multiple layers of security,
\item Log network events (and monitor...),
\end {itemize}
\end{itemize}
\end{slide}

\begin{slide}{Deploy application with security in mind}
\begin{itemize}
\item Secure the Operating System (don't trust the environment),
\item Third-party code should be fully audited,
\item Ensure daily operations practices,
\item Be ready for worst case situation,
\item and don't forget the issue of the 5th Dec...
\end{itemize}
\end{slide}

\begin{slide}{Q\&R}
\begin{itemize}
\item adulau@foo.be
\item http://www.foo.be/cours/securite-webservices/
\item 3B12 DCC2 82FA 2931 2F5B  709A 09E2 CD49 44E6 CBCD
\end{itemize}
\end{slide}

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t%%% End: 
