Add slides.

pull/9/head
Raphaël Vinot 2016-03-07 16:39:22 +01:00
parent 51615f8887
commit aa679e4381
9 changed files with 564 additions and 0 deletions

9
.gitignore vendored
View File

@ -56,3 +56,12 @@ docs/_build/
# PyBuilder
target/
# Latex
*.aux
*.log
*.nav
*.out
*.snm
*.toc
*.vrb

View File

@ -0,0 +1,30 @@
% Copyright 2007 by Marco Barisione
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
\mode<presentation>
%\definecolor{chameleongreen1}{RGB}{129,138,143} %grey CIRCL
\definecolor{chameleongreen1}{RGB}{213,43,30}
\definecolor{chameleongreen2}{RGB}{213,43,30} %red CIRCL
\definecolor{chameleongreen3}{RGB}{30,30,30} %black CIRCL
\definecolor{chameleongreen4}{RGB}{129,138,143}
\setbeamercolor*{palette primary}{fg=white,bg=chameleongreen2}
\setbeamercolor*{palette secondary}{fg=white,bg=chameleongreen3}
\setbeamercolor*{palette tertiary}{fg=white,bg=chameleongreen4}
\setbeamercolor*{palette quaternary}{fg=white,bg=chameleongreen1}
\setbeamercolor*{titlelike}{bg=chameleongreen3}
\setbeamercolor*{frametitle}{bg=black,fg=black}
\setbeamercolor*{part title}{bg=black,fg=black}
\setbeamercolor*{item}{fg=chameleongreen3}
\setbeamercolor*{separation line}{}
\setbeamercolor*{fine separation line}{}
\mode
<all>

View File

@ -0,0 +1,182 @@
% Copyright 2007 by Marco Barisione
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
\mode<presentation>
% Use alternative title page style.
\DeclareOptionBeamer{alternativetitlepage}[true]{\def\beamer@fancy@alternativetitlepage{#1}}
% Logo to use in the alternative title page.
\def\beamer@fancy@titlepagelogo{}
\DeclareOptionBeamer{titlepagelogo}{\def\beamer@fancy@titlepagelogo{#1}}
% Bullet shape.
\DeclareOptionBeamer{bullet}{\def\beamer@fancy@bullet{#1}}
\ExecuteOptionsBeamer{alternativetitlepage=false,bullet=square}
\ProcessOptionsBeamer
% Colors.
\setbeamercolor*{lineup}{parent=palette primary}
\setbeamercolor*{linemid}{parent=palette secondary}
\setbeamercolor*{linebottom}{parent=palette tertiary}
\setbeamercolor*{title page header}{parent=palette quaternary}
% Lengths.
\newlength{\beamer@fancy@lineup}
\setlength{\beamer@fancy@lineup}{.025\paperheight}
\newlength{\beamer@fancy@linemid}
\setlength{\beamer@fancy@linemid}{.015\paperheight}
\newlength{\beamer@fancy@linebottom}
\setlength{\beamer@fancy@linebottom}{.01\paperheight}
% Margins.
\newlength{\beamer@fancy@normalmargin}
\setlength{\beamer@fancy@normalmargin}{.06\paperwidth}
\setbeamersize{text margin left=\beamer@fancy@normalmargin}
\setbeamersize{text margin right=\beamer@fancy@normalmargin}
\setlength\leftmargini{.6\beamer@fancy@normalmargin}
\setlength\leftmarginii{.6\beamer@fancy@normalmargin}
\setlength\leftmarginiii{.6\beamer@fancy@normalmargin}
% Normal title page.
\defbeamertemplate*{title page normal}{fancy theme}[1][]
{
\vbox{}
\vfill
\begin{centering}
\begin{beamercolorbox}[wd=\paperwidth,sep=8pt,center,#1]{title page header}
\usebeamerfont{title}\inserttitle\par%
\ifx\insertsubtitle\@empty%
\else%
\vskip0.25em%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
\fi%
\end{beamercolorbox}%
\vskip1em\par
\begin{beamercolorbox}[sep=8pt,center,#1]{author}
\usebeamerfont{author}\insertauthor
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center,#1]{institute}
\usebeamerfont{institute}\insertinstitute
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center,#1]{date}
\usebeamerfont{date}\insertdate
\end{beamercolorbox}\vskip0.5em
{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
\end{centering}
\vfill
}
% Alternative title page, you should use this in a frame with the [plain]
% option.
\defbeamertemplate*{title page alternative}{fancy theme}[1][]
{
{\parskip0pt\offinterlineskip%
\hbox{\hskip-\Gm@lmargin\hbox{\vbox{%
\@tempdima=\textwidth\textwidth=\paperwidth\hsize=\textwidth\def\\{,}\vbox{}\vskip-1.5ex%
% Title.
\begin{beamercolorbox}[wd=\paperwidth,ht=.4\paperheight,center,#1]{title page header}
\usebeamerfont{title}\inserttitle\par%
\ifx\insertsubtitle\@empty%
\else%
\vskip0.25em%
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
\fi%
\vspace{.125\paperheight}%
\end{beamercolorbox}%
\vbox{}\vskip-\beamer@fancy@lineup%
\vbox{}\vskip-\beamer@fancy@linemid%
% First line.
\hbox{%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@fancy@lineup,dp=0pt]{}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@fancy@lineup,dp=0pt]{lineup}%
\end{beamercolorbox}%
}%
\vbox{}\vskip0ex%
% Second line.
\hbox{%
\begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@fancy@linemid,dp=0pt]{}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@fancy@linemid,dp=0pt]{linemid}%
\end{beamercolorbox}%
}%
% Third line.
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=\beamer@fancy@linebottom,dp=0pt]{}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=\beamer@fancy@linebottom,dp=0pt]{linebottom}%
\end{beamercolorbox}%
}%
\vskip0pt%
}}%
\hskip-\Gm@rmargin%
}}\hfil%
%
\begin{columns}
\ifx\beamer@fancy@titlepagelogo\@empty%
\column{\textwidth}
\else
\column{.5\textwidth}
% Logo.
\begin{centering}
\vbox{}\vfill
\includegraphics[height=.2\paperheight]{\beamer@fancy@titlepagelogo}
\vfill
\end{centering}
\column{.5\textwidth}
\fi
% Authors, institute and date
\vskip1em\par
\begin{beamercolorbox}[sep=8pt,center,#1]{author}
\usebeamerfont{author}\insertauthor
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center,#1]{institute}
\usebeamerfont{institute}\insertinstitute
\end{beamercolorbox}
\begin{beamercolorbox}[sep=8pt,center,#1]{date}
\usebeamerfont{date}\insertdate
\end{beamercolorbox}\vskip0.5em
{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
\end{columns}
}
\defbeamertemplate*{title page}{fancy}[1][]
{
\def\beamer@fancy@truetext{true}%
\ifx\beamer@fancy@alternativetitlepage\beamer@fancy@truetext%
\usebeamertemplate{title page alternative}%
\else%
\usebeamertemplate{title page normal}%
\fi%
}
% Items.
\defbeamertemplate{itemize item}{squarealt}%
{\tiny\raise.5ex\hbox{\donotcoloroutermaths$\blacksquare$}}
\defbeamertemplate{itemize subitem}{squarealt}%
{\tiny\raise.4ex\hbox{\donotcoloroutermaths$\square$}}
\defbeamertemplate{itemize subsubitem}{squarealt}%
{\tiny\raise.3ex\hbox{\donotcoloroutermaths$\blacksquare$}}
\defbeamertemplate{itemize item}{circlealt}%
{\small\raise.2ex\hbox{\donotcoloroutermaths$\bullet$}}
\defbeamertemplate{itemize subitem}{circlealt}%
{\small\raise.1ex\hbox{\donotcoloroutermaths$\circ$}}
\defbeamertemplate{itemize subsubitem}{circlealt}%
{\scriptsize\raise.1ex\hbox{\donotcoloroutermaths$\bullet$}}
\def\circletext{circle}
\ifx\beamer@fancy@bullet\circletext
\setbeamertemplate{items}[circlealt]
\else
\setbeamertemplate{items}[squarealt]
\fi
\mode<all>

View File

@ -0,0 +1,166 @@
% Copyright 2007 by Marco Barisione
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
\mode<presentation>
% String used between the current page and the total page count.
\def\beamer@decolines@pageofpages{/}
\DeclareOptionBeamer{pageofpages}{\def\beamer@decolines@pageofpages{#1}}
% Show a line below the frame title.
\DeclareOptionBeamer{titleline}[true]{\def\beamer@decolines@titleline{#1}}
% Image used for the watermark.
\def\beamer@decolines@watermarkorig{}
\DeclareOptionBeamer{watermark}{\def\beamer@decolines@watermarkorig{#1}}
% Height of the watermark.
\def\beamer@decolines@watermarkheight{100px}
\DeclareOptionBeamer{watermarkheight}{\def\beamer@decolines@watermarkheight{#1}}
% The original image height is watermarkheightmult * watermarkheight.
\def\beamer@decolines@watermarkheightmult{1}
\DeclareOptionBeamer{watermarkheightmult}{\def\beamer@decolines@watermarkheightmult{#1}}
\ExecuteOptionsBeamer{titleline=false}
\ProcessOptionsBeamer
% Enable/disable the watermark.
\def\watermarkon{%
\def\beamer@decolines@watermark{\beamer@decolines@watermarkorig}%
}
\def\watermarkoff{\def\beamer@decolines@watermark{}}
% Initially enable the watermark.
\watermarkon
% Colors.
\setbeamercolor*{lineup}{parent=palette primary}
\setbeamercolor*{linemid}{parent=palette secondary}
\setbeamercolor*{linebottom}{parent=palette tertiary}
\setbeamercolor*{page header}{parent=titlelike}
% Lengths
\newlength{\headerheight}
\setlength{\headerheight}{.045\paperheight}
\newlength{\beamer@decolines@lineup}
\setlength{\beamer@decolines@lineup}{.025\paperheight}
\newlength{\beamer@decolines@linemid}
\setlength{\beamer@decolines@linemid}{.015\paperheight}
\newlength{\beamer@decolines@linebottom}
\setlength{\beamer@decolines@linebottom}{.01\paperheight}
% The height of the watermark part below the 3 bottom lines.
\newlength{\beamer@decolines@watermarkheightbottom}
\addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@lineup}
\addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@linemid}
\addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@linebottom}
% The height of the watermark part over the 3 bottom lines before shrinking.
\newlength{\beamer@decolines@watermarkheightupperorig}
\setlength{\beamer@decolines@watermarkheightupperorig}{\beamer@decolines@watermarkheight}
\addtolength{\beamer@decolines@watermarkheightupperorig}{-\beamer@decolines@watermarkheightbottom}
\multiply\beamer@decolines@watermarkheightupperorig by \beamer@decolines@watermarkheightmult
% Footer.
\defbeamertemplate*{footline}{decolines theme}
{
\leavevmode%
% Page number.
\hbox{%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=0ex,dp=0ex,center]{}%
\usebeamerfont{palette primary}\insertframenumber{} \beamer@decolines@pageofpages{} \inserttotalframenumber%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.8\paperwidth,ht=0ex,dp=0ex]{}%
\end{beamercolorbox}%
} %
% First line.
\hbox{%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{lineup}%
\end{beamercolorbox}%
} %
% Second line.
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=\beamer@decolines@linemid,dp=0pt]{linemid}%
\end{beamercolorbox}%
} %
% Third line.
\hbox{%
\begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{linebottom}%
\end{beamercolorbox}%
}%
% This seems to fix some alignment problems with the watermark. It has to be
% always applied if you do not want to see the footer moving up and down when
% moving from a page with watermark to a page without or vice versa.
\vskip-.5px%
% Watermark.
\if\beamer@decolines@watermark\@empty\else%
\vskip-\beamer@decolines@watermarkheightbottom%
\llap{\includegraphics[height=\beamer@decolines@watermarkheightbottom,clip=true,%
trim=0pt 0pt 0pt \beamer@decolines@watermarkheightupperorig]{\beamer@decolines@watermark}\hskip-\paperwidth}%
\fi%
}
\defbeamertemplate*{headline}{decolines theme}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=\headerheight,dp=0pt]{page header}%
\end{beamercolorbox}%
} %
\vskip0pt%
}
\defbeamertemplate*{frametitle}{decolines theme}[1][left]
{
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\vbox{}\vskip-.5\beamer@leftmargin%
\begin{beamercolorbox}[sep=\beamer@leftmargin,#1,wd=\the\@tempdima]{}
\usebeamerfont{frametitle}\usebeamercolor[bg]{framesubtitle}%
\vbox{}\vskip0ex%
\if@tempswa\else\csname beamer@fte#1\endcsname\fi%
\strut\insertframetitle\strut\par%
{%
\ifx\insertframesubtitle\@empty%
\else%
{\usebeamerfont{framesubtitle}\usebeamercolor[bg]{framesubtitle}\insertframesubtitle\strut\par}%
\fi
}%
\vskip-1ex%
\if@tempswa\else\vskip-\beamer@leftmargin\fi
\end{beamercolorbox}%
\def\beamer@decolines@truetext{true}%
\ifx\beamer@decolines@titleline\beamer@decolines@truetext%
\vskip-.5\beamer@leftmargin%
\begin{beamercolorbox}[wd=\textwidth,ht=.1ex,dp=0ex]{linemid}%
\end{beamercolorbox}%
\fi
}
% Frame title continuations, default
\defbeamertemplate*{frametitle continuation}{decolines theme}{(\insertcontinuationcount)}
\defbeamertemplate*{sidebar right}{decolines theme}
{
\vskip.1\beamer@leftmargin%
\llap{\insertlogo\hskip.5\beamer@leftmargin}%
\vfill%
\if\beamer@decolines@watermark\@empty\else%
\llap{\includegraphics[height=\beamer@decolines@watermarkheight]{\beamer@decolines@watermark}}%
\vskip-\beamer@decolines@watermarkheightbottom%
\fi
}
\mode
<all>

View File

@ -0,0 +1,28 @@
% Copyright 2007 by Marco Barisione
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
\mode<presentation>
\DeclareOptionBeamer{alternativetitlepage}[true]{\PassOptionsToPackage{alternativetitlepage=#1}{beamerinnerthemefancy}}
\DeclareOptionBeamer{titlepagelogo}{\PassOptionsToPackage{titlepagelogo=#1}{beamerinnerthemefancy}}
\DeclareOptionBeamer{bullet}{\PassOptionsToPackage{bullet=#1}{beamerinnerthemefancy}}
\DeclareOptionBeamer{pageofpages}{\PassOptionsToPackage{pageofpages=#1}{beamerouterthemedecolines}}
\DeclareOptionBeamer{titleline}[true]{\PassOptionsToPackage{titleline=#1}{beamerouterthemedecolines}}
\DeclareOptionBeamer{watermark}{\PassOptionsToPackage{watermark=#1}{beamerouterthemedecolines}}
\DeclareOptionBeamer{watermarkheight}{\PassOptionsToPackage{watermarkheight=#1}{beamerouterthemedecolines}}
\DeclareOptionBeamer{watermarkheightmult}{\PassOptionsToPackage{watermarkheightmult=#1}{beamerouterthemedecolines}}
\ProcessOptionsBeamer
\useinnertheme{fancy}
\useoutertheme{decolines}
\usecolortheme{chameleon}
\setbeamertemplate{navigation symbols}{}
\mode
<all>

Binary file not shown.

View File

@ -0,0 +1,24 @@
\documentclass[14pt]{beamer}
\usetheme[pageofpages=of,% String used between the current page and the
% total page count.
bullet=circle,% Use circles instead of squares for bullets.
titleline=true,% Show a line below the frame title.
alternativetitlepage=true,% Use the fancy title page.
titlepagelogo=logo-circl.pdf,% Logo for the first page.
% watermark=watermark-polito,% Watermark used in every page.
% watermarkheight=100px,% Height of the watermark.
% watermarkheightmult=4,% The watermark image is 4 times bigger
% than watermarkheight.
]{Torino}
\usepackage[utf8]{inputenc}
\author{\emph{TLP:WHITE}}
\title{PyCIRCLean: a versatile Python framework to check and/or sanitize files}
\institute{info@circl.lu}
\date{\today}
\begin{document}
\include{content}
\end{document}

125
slides/CIRCLean/content.tex Normal file
View File

@ -0,0 +1,125 @@
% DO NOT COMPILE THIS FILE DIRECTLY!
% This is included by the other .tex files.
\begin{frame}[t,plain]
\titlepage
\end{frame}
\begin{frame}[fragile]{Overview}
\begin{itemize}
\item Aims to be used in dedicated security applications to sanitize documents from hostile to trusted environments.
\item Generic way to handle large colections of files
\item Generate audit logs
\item Comes with many helpers
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Implementation}
\begin{itemize}
\item Copies files from a directory (source) to an other one (destination)
\item Computes hashes (sha1) of all the files in the source
\item Creates a directory tree on the destination directory
\item Gets the mime type of each file
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Existing modules}
\begin{itemize}
\item bin/filecheck.py: Search for active content in the source documents
\item bin/generic.py: Converts documents if possible
\item bin/specific.py: Only copy a specific extension if the mimetype matches
\item bin/pier9.py: Only copy specific extensions (3D softwares)
\end{itemize}
\end{frame}
\begin{frame}[fragile]{File Check}
\begin{itemize}
\item Discard known extensions with active content
\item Verifies if the extension corresponds to the mimetype (polyglot files)
\item Force extension on suposedly text files
\item Discards windows executables
\item Discard Office (Libreoffice and Windows Office) document with active content
\item Discard PDFs with active content
\item Unpack archives and process content
\item Extract metadata from images
\end{itemize}
\end{frame}
\begin{frame}[fragile]{File Check}
\begin{itemize}
\item Plus
\begin{itemize}
\item (almost) Pure python
\item Reliable
\item Fast
\end{itemize}
\item Minus
\begin{itemize}
\item Does not block a 0 day in a non-active content
\item Medium level of false positive (non-malicious active content)
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Generic}
\begin{itemize}
\item Verifies if the extension corresponds to the mimetype (polyglot files)
\item Converts to PDF and then to HTML all documents supported by libreoffice
\item Converts to HTML all PDF files
\item Discards windows executables
\item Unpack archives and process content
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Generic}
\begin{itemize}
\item Plus
\begin{itemize}
\item Very hard to have anything malicious in the output of the converted documents
\end{itemize}
\item Minus
\begin{itemize}
\item Slow
\item Opens the documents to convert (may run malicious code)
\item Many external dependencies
\item Unreliable: fails on 20\% of the documents
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Specific and Pier9}
\begin{itemize}
\item Dedicated to a very specific use
\item Whitelist on extension and/or MimeType
\item Plus
\begin{itemize}
\item Pure python
\item Very fast
\item Most secure
\end{itemize}
\item Minus
\begin{itemize}
\item Only works in a specific case
\item Many false positive
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Implement your own module - FileBase}
\begin{itemize}
\item The default conctructors gets the mime type of the file and initialize the log of the file
\item Surcharge the constructor accordingly to your needs
\item Has helpers to get and set information on the file being processed
\item Can force the extension of the file when copied
\item All thoses functions have to be used in order to handle the files accordingly to your requirements
\end{itemize}
\end{frame}
\begin{frame}[fragile]{Implement your own module - KittenGroomerBase}
\begin{itemize}
\item The default constructor cleans the destination directory, starts the general logging and logs the content of the source directory
\item Has helpers to handle safely the file management
\item Writes the logs files
\end{itemize}
\end{frame}

Binary file not shown.