From 5b7b0860976594093c9143c5b4e84ccfe7079312 Mon Sep 17 00:00:00 2001 From: Jean-Louis Huynen Date: Tue, 26 Mar 2019 15:50:43 +0100 Subject: [PATCH] wip - 29/03 workshop --- .../2-passive-ssl/beamercolorthemefocus.sty | 71 +++++ .../2-passive-ssl/beamerfontthemefocus.sty | 47 ++++ .../2-passive-ssl/beamerinnerthemefocus.sty | 117 ++++++++ .../2-passive-ssl/beamerouterthemefocus.sty | 255 ++++++++++++++++++ .../2-passive-ssl/beamerthemefocus.sty | 60 +++++ docs/workshop/2-passive-ssl/d4-client.tex | 3 + docs/workshop/2-passive-ssl/d4-logo.pdf | Bin 0 -> 5152 bytes docs/workshop/2-passive-ssl/d4-passivessl.tex | 158 +++++++++++ docs/workshop/2-passive-ssl/d4-tlsf.tex | 3 + docs/workshop/2-passive-ssl/metaheader.json | 5 + docs/workshop/2-passive-ssl/pipe.tex | 3 + 11 files changed, 722 insertions(+) create mode 100644 docs/workshop/2-passive-ssl/beamercolorthemefocus.sty create mode 100644 docs/workshop/2-passive-ssl/beamerfontthemefocus.sty create mode 100644 docs/workshop/2-passive-ssl/beamerinnerthemefocus.sty create mode 100644 docs/workshop/2-passive-ssl/beamerouterthemefocus.sty create mode 100644 docs/workshop/2-passive-ssl/beamerthemefocus.sty create mode 100644 docs/workshop/2-passive-ssl/d4-client.tex create mode 100644 docs/workshop/2-passive-ssl/d4-logo.pdf create mode 100644 docs/workshop/2-passive-ssl/d4-passivessl.tex create mode 100644 docs/workshop/2-passive-ssl/d4-tlsf.tex create mode 100644 docs/workshop/2-passive-ssl/metaheader.json create mode 100644 docs/workshop/2-passive-ssl/pipe.tex diff --git a/docs/workshop/2-passive-ssl/beamercolorthemefocus.sty b/docs/workshop/2-passive-ssl/beamercolorthemefocus.sty new file mode 100644 index 0000000..3f533df --- /dev/null +++ b/docs/workshop/2-passive-ssl/beamercolorthemefocus.sty @@ -0,0 +1,71 @@ +% Copyright (C) 2018 Pasquale Claudio Africa. +% 2018 Sebastian Friedl. +% +% This file is part of beamerthemefocus. +% +% beamerthemefocus is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% beamerthemefocus is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with beamerthemefocus. If not, see . + +\mode + + +% DEFINE COLORS. --------------------------------------------------------------- +\definecolor{main}{RGB}{64, 64, 64} +\definecolor{background}{RGB}{239, 239, 239} + +\definecolor{alert}{RGB}{180, 0, 0} +\definecolor{example}{RGB}{0, 110, 0} + + +% SET COLORS. ------------------------------------------------------------------ +\setbeamercolor{normal text}{fg=textcolor, bg=background} +\setbeamercolor{alerted text}{fg=alert} +\setbeamercolor{example text}{fg=example} + +\setbeamercolor{titlelike}{fg=background, bg=main} +\setbeamercolor{frametitle}{parent={titlelike}} + +\setbeamercolor{footline}{fg=background, bg=main} + +\setbeamercolor{block title}{bg=main!80!background, fg=background} +\setbeamercolor{block body}{bg=main!10!background, fg=main} + +\setbeamercolor{block title alerted}{bg=alert, fg=background} +\setbeamercolor{block body alerted}{bg=alert!10!background, fg=main} + +\setbeamercolor{block title example}{bg=example, fg=background} +\setbeamercolor{block body example}{bg=example!10!background, fg=main} + +\setbeamercolor{itemize item}{fg=main} +\setbeamercolor{itemize subitem}{fg=main} + +\setbeamercolor{enumerate item}{fg=main!70!black} +\setbeamercolor{enumerate subitem}{fg=main!70!black} + +\setbeamercolor{description item}{fg=main!70!black} +\setbeamercolor{description subitem}{fg=main!70!black} + +\setbeamercolor{caption name}{fg=textcolor} + +\setbeamercolor{section in toc}{fg=textcolor} +\setbeamercolor{subsection in toc}{fg=textcolor} +\setbeamercolor{section number projected}{bg=textcolor} +\setbeamercolor{subsection number projected}{bg=textcolor} + +\setbeamercolor{bibliography item}{fg=main} +\setbeamercolor{bibliography entry author}{fg=main!70!black} +\setbeamercolor{bibliography entry title}{fg=main} +\setbeamercolor{bibliography entry location}{fg=main} +\setbeamercolor{bibliography entry note}{fg=main} + +\mode diff --git a/docs/workshop/2-passive-ssl/beamerfontthemefocus.sty b/docs/workshop/2-passive-ssl/beamerfontthemefocus.sty new file mode 100644 index 0000000..f324876 --- /dev/null +++ b/docs/workshop/2-passive-ssl/beamerfontthemefocus.sty @@ -0,0 +1,47 @@ +% Copyright (C) 2018 Pasquale Claudio Africa. +% 2018 Sebastian Friedl. +% +% This file is part of beamerthemefocus. +% +% beamerthemefocus is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% beamerthemefocus is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with beamerthemefocus. If not, see . + +\mode + + +% SET FONTS. ------------------------------------------------------------------- +\setbeamerfont{title}{size=\huge, shape=\bfseries} +\setbeamerfont{subtitle}{size=\Large, parent=structure} +\setbeamerfont{author}{size=\scriptsize} + +\setbeamerfont{institute}{size=\normalsize} +\setbeamerfont{date}{size=\scriptsize} + +\setbeamerfont{sectiontitle}{size=\huge, series=\scshape\bfseries} +\setbeamerfont{frametitle}{size=\Large, shape=\scshape} + +\setbeamerfont{footline}{size=\scriptsize} + +\setbeamerfont{focusframe}{size=\huge, shape=\scshape} + +\setbeamerfont{description item}{shape=\bfseries} + +\setbeamerfont{caption name}{shape=\bfseries} + +\setbeamerfont{bibliography item}{size=\small, shape=\scshape} +\setbeamerfont{bibliography entry author}{size=\small, shape=\scshape} +\setbeamerfont{bibliography entry title}{size=\small, series=\scshape\bfseries} +\setbeamerfont{bibliography entry location}{size=\small, shape=\scshape\normalfont} +\setbeamerfont{bibliography entry note}{size=\small, shape=\scshape\normalfont} + +\mode diff --git a/docs/workshop/2-passive-ssl/beamerinnerthemefocus.sty b/docs/workshop/2-passive-ssl/beamerinnerthemefocus.sty new file mode 100644 index 0000000..bccfa7a --- /dev/null +++ b/docs/workshop/2-passive-ssl/beamerinnerthemefocus.sty @@ -0,0 +1,117 @@ +% Copyright (C) 2018 Pasquale Claudio Africa. +% 2018 Sebastian Friedl. +% +% This file is part of beamerthemefocus. +% +% beamerthemefocus is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% beamerthemefocus is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with beamerthemefocus. If not, see . + +\mode + +\RequirePackage{tikz} + + +% CUSTOMIZE STRUCTURE ELEMENTS. ------------------------------------------------ +\setbeamertemplate{blocks}[default] + +\setbeamertemplate{section in toc}[square] +\setbeamertemplate{subsection in toc}[square] + +\setbeamertemplate{itemize items}[square] +\setbeamertemplate{itemize subitem}[triangle] + + +% STRUCTURE FRAME TEMPLATE DEFINITIONS. ---------------------------------------- +% Title page. +\defbeamertemplate*{title page}{focus}{% + {\usebeamercolor{frametitle}\colorlet{focus@@temp}{bg}% + \begin{tikzpicture}[overlay, remember picture] + \fill[color=focus@@temp] (current page.north west) rectangle ([shift = {(0, -0.45\paperheight)}] current page.north east); + \end{tikzpicture}} + + \vspace{-1.65\baselineskip} + \begin{minipage}[b][0.35\paperheight]{\textwidth} + \vspace{\baselineskip} + \usebeamerfont{title} + \usebeamercolor[fg]{frametitle} + \inserttitle + \end{minipage} + + \begin{minipage}[t][0.1\paperheight]{\textwidth} + \usebeamerfont{subtitle} + \usebeamercolor[fg]{frametitle} + \insertsubtitle + \end{minipage} + + % Set the title graphic in a zero-height box, so that + % the position of other elements is not affected. + {\vfuzz=9999pt\vbox to 0pt { + \raggedleft + \inserttitlegraphic + }} + + + \vspace*{\baselineskip} + \begin{minipage}[t]{\textwidth} + \usebeamerfont{institute} + \insertinstitute + \end{minipage} + + \vspace*{\baselineskip} + \begin{minipage}[t]{\textwidth} + \usebeamerfont{date}{\insertdate} + \end{minipage} + + + \vspace*{\baselineskip} + \vspace*{\baselineskip} + \vspace*{\baselineskip} + \vspace*{\baselineskip} + \begin{minipage}[t]{\textwidth} + \usebeamerfont{author} + \insertauthor + \end{minipage} + + + \vspace*{5\baselineskip} + + \addtocounter{framenumber}{-1} +} + +% Section page. +\defbeamertemplate*{section page}{focus}{% + {% + \usebeamercolor{frametitle}\colorlet{focus@@temp}{bg}% + \begin{tikzpicture}[overlay, remember picture] + \fill[color=focus@@temp] (current page.north west) rectangle ([shift = {(0, -0.45\paperheight)}] current page.north east); + \end{tikzpicture}% + } + + \vspace{-2\baselineskip} + \begin{minipage}[b][0.45\paperheight]{\textwidth} + \usebeamerfont{sectiontitle} + \usebeamercolor[fg]{frametitle} + \let\hyperlink\@secondoftwo\insertsection + \end{minipage} + + \begin{minipage}[t][0.55\paperheight]{\textwidth} + \end{minipage} +} + +\AtBeginSection{% + \begin{frame}[plain, noframenumbering]{} + \sectionpage + \end{frame}% +} + +\mode diff --git a/docs/workshop/2-passive-ssl/beamerouterthemefocus.sty b/docs/workshop/2-passive-ssl/beamerouterthemefocus.sty new file mode 100644 index 0000000..3f05f33 --- /dev/null +++ b/docs/workshop/2-passive-ssl/beamerouterthemefocus.sty @@ -0,0 +1,255 @@ +% Copyright (C) 2018 Pasquale Claudio Africa. +% 2018 Sebastian Friedl. +% +% This file is part of beamerthemefocus. +% +% beamerthemefocus is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% beamerthemefocus is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with beamerthemefocus. If not, see . + +\mode + +\RequirePackage{appendixnumberbeamer}% Don't number appendix frames. +\RequirePackage{etoolbox}% \BeforeBeginEnvironment +\RequirePackage{tikz} + + +% FRAMETITLE TEMPLATES. -------------------------------------------------------- +\defbeamertemplate*{frametitle}{focus}{% + % If not title page. + \ifnum\value{framenumber}>0% + \vspace{-1pt}% + \begin{beamercolorbox}[wd=\paperwidth,leftskip=0.55cm,rightskip=0.55cm,sep=0.2cm]{frametitle}% + \strut\insertframetitle\strut% + \end{beamercolorbox}% + \fi% +} + +% Plain header. +\defbeamertemplate{frametitle}{plain}{% + % If not title page. + \ifnum\value{framenumber}>0% + \vspace{-1pt}% + \begin{beamercolorbox}[wd=\paperwidth,leftskip=0.55cm,rightskip=0.55cm,sep=0.2cm,ignorebg]{frametitle}% + \strut% + \end{beamercolorbox}% + \fi% +} + + +% FOOTLINE TEMPLATES. ---------------------------------------------------------- +% Lenghts for the progress bar footline. +\newlength{\focus@pbar@height}% Progress bar height. +\newlength{\focus@pbar@leftoffset} +\newlength{\focus@pbar@rightoffset} + +\defbeamertemplate*{footline}{progressbar}{% + % If not appendix. + \ifnum\mainend<0% From package appendixnumberbeamer. + % + \settowidth{\focus@pbar@leftoffset}{1}% + \addtolength{\focus@pbar@leftoffset}{1.5em}% + % + \settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}% + \addtolength{\focus@pbar@rightoffset}{1.5em}% + % + % If not title page. + \ifnum\c@framenumber>0% + \ifnum\c@framenumber<\inserttotalframenumber% + \begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex]\usebeamerfont{footline} + \pgfmathsetmacro{\focus@pbar@progress}% + {(\paperwidth-\focus@pbar@leftoffset-\focus@pbar@rightoffset)*(\insertframenumber/\inserttotalframenumber)} + + \clip (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height); + \fill[footline.bg] (0,0) rectangle ++(\the\focus@pbar@leftoffset,\the\focus@pbar@height); + + \fill[footline.bg] (\the\focus@pbar@leftoffset,0) rectangle ++(\focus@pbar@progress pt,\the\focus@pbar@height) + ++(0,{-0.5*\the\focus@pbar@height}) node[anchor=east, text=footline.fg] {\strut\insertframenumber}; + + \fill[footline.bg] (\paperwidth,0) rectangle ++(-\the\focus@pbar@rightoffset,\the\focus@pbar@height) + ++(0,{-0.5*\the\focus@pbar@height}) node[anchor=west, text=footline.fg] {\strut\inserttotalframenumber}; + \end{tikzpicture}% + \else% + \begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex] + \clip (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height); + \fill[footline.bg] (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height); + + \node[anchor=east, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\insertframenumber}; + \node[footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut/}; + \node[anchor=west, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\inserttotalframenumber}; + \end{tikzpicture}% + \fi% + \fi% + \fi% +} + +% Full bar footline. +\defbeamertemplate{footline}{fullbar}{% + % If not appendix. + \ifnum\mainend<0% From package appendixnumberbeamer. + % + \settowidth{\focus@pbar@leftoffset}{1}% + \addtolength{\focus@pbar@leftoffset}{1.5em}% + % + \settowidth{\focus@pbar@rightoffset}{\inserttotalframenumber}% + \addtolength{\focus@pbar@rightoffset}{1.5em}% + % + % If not title page. + \ifnum\c@framenumber>0% + \begin{tikzpicture}[inner xsep=0.5em, inner ysep=0.5ex] + \clip (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height); + \fill[footline.bg] (0,0) rectangle ++(\paperwidth,\the\focus@pbar@height); + + \node[anchor=east, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\insertframenumber}; + \node[footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut/}; + \node[anchor=west, footline.fg] at ({\paperwidth-\the\focus@pbar@rightoffset},{0.5*\focus@pbar@height}) {\strut\inserttotalframenumber}; + \end{tikzpicture}% + \fi% + \fi% +} + +% Empty footline. +\defbeamertemplate{footline}{none}{} + +\DeclareOptionBeamer{numbering}{\def\beamer@focus@numbering{#1}} +\ExecuteOptionsBeamer{numbering=progressbar} +\ProcessOptionsBeamer + +\def\beamer@focus@numberingprogressbar{progressbar} +\def\beamer@focus@numberingfullbar{fullbar} +\def\beamer@focus@numberingnone{none} + + +% BACKGROUND CANVAS TEMPLATES. ------------------------------------------------- +\defbeamertemplate*{background canvas}{focus}{% + \begin{tikzpicture} + \clip (0,0) rectangle ++(\paperwidth,\paperheight); + \fill[normal text.bg] (0,0) rectangle ++(\paperwidth,\paperheight); + \end{tikzpicture}% +} + +\defbeamertemplate{background canvas}{focusplain}{% + \begin{tikzpicture} + \clip (0,0) rectangle ++(\paperwidth,\paperheight); + \fill[normal text.bg] (0,0) rectangle ++(\paperwidth,\paperheight); + \end{tikzpicture}% +} + +\defbeamertemplate{background canvas}{focusframe}{% + \begin{tikzpicture} + \clip (0,0) rectangle ++(\paperwidth,\paperheight); + \fill[frametitle.bg] (0,0) rectangle ++(\paperwidth,\paperheight); + \end{tikzpicture}% +} + + +% HOOKS FOR CREATING FRAMES. --------------------------------------------------- +\BeforeBeginEnvironment{frame}{% + \setbeamertemplate{background canvas}[focus]% + \setbeamertemplate{frametitle}[focus]% + % + % Reset footline height and determine it for the current slide. + \setlength{\focus@pbar@height}{0cm}% + \focus@calculatefootheight% + % + % If not appendix. + \ifnum\mainend<0 % From package appendixnumberbeamer. + \settoheight{\focus@pbar@height}{\usebeamerfont{footline}1234567890/}% + \addtolength{\focus@pbar@height}{6pt}% + % + \ifx\beamer@focus@numbering\beamer@focus@numberingprogressbar% + \setbeamertemplate{footline}[progressbar]% + \else% + \ifx\beamer@focus@numbering\beamer@focus@numberingfullbar% + \setbeamertemplate{footline}[fullbar]% + \fi% + \fi% + % + \focus@calculatefootheight% + \fi% +} + +% Enable noframenumbering option. +\define@key{beamerframe}{noframenumbering}[true]{% + \setbeamertemplate{footline}[none]% + \setlength{\focus@pbar@height}{0cm}% + \focus@calculatefootheight% + % + \addtocounter{framenumber}{-1}% +} + + +% Enable plain option. +\define@key{beamerframe}{plain}[true]{% + \setbeamertemplate{background canvas}[focusplain]% + \setbeamertemplate{frametitle}[plain]% + % + \setbeamertemplate{footline}[none]% +} + + +% Full vertical centering +% (from https://tex.stackexchange.com/questions/247826/beamer-full-vertical-centering). +\define@key{beamerframe}{c}[true]{% + \beamer@frametopskip=0pt plus 1fill\relax% + \beamer@framebottomskip=0pt plus 1fill\relax% + \beamer@frametopskipautobreak=0pt plus 0.4\paperheight\relax% + \beamer@framebottomskipautobreak=0pt plus 0.6\paperheight\relax% + \def\beamer@initfirstlineunskip{}% +} + + +% Enable focus option. +\providebool{focus@standout} +\define@key{beamerframe}{focus}[true]{% + \booltrue{focus@standout}% + \begingroup% + \setkeys{beamerframe}{noframenumbering}% + \setbeamertemplate{background canvas}[focusframe]% + \setbeamertemplate{frametitle}[plain]% + % + \setkeys{beamerframe}{c}% + \centering% + \usebeamerfont{focusframe}% + \usebeamercolor[fg]{frametitle}% +} + +\apptocmd{\beamer@reseteecodes} +{% + \ifbool{focus@standout}% + {% + \endgroup% + \boolfalse{focus@standout}% + }{}% +}{}{} + + +% Recalculate the footline's size and refresh other parameters. +% Partially copied from the definition of \beamer@calculateheadfoot. +\def\focus@calculatefootheight{% + \footheight=\focus@pbar@height% + \advance\footheight by 4pt% + \sidebarheight=\paperheight% + \advance\sidebarheight by-\headheight% + \advance\sidebarheight by\headdp% + \advance\sidebarheight by-\footheight% + \advance\sidebarheight by 4pt% + \footskip=\footheight% + \textheight=\paperheight% + \advance\textheight by-\footheight% + \advance\textheight by-\headheight% + \@colht\textheight% + \@colroom\textheight% + \vsize\textheight% +} + +\mode diff --git a/docs/workshop/2-passive-ssl/beamerthemefocus.sty b/docs/workshop/2-passive-ssl/beamerthemefocus.sty new file mode 100644 index 0000000..f37394d --- /dev/null +++ b/docs/workshop/2-passive-ssl/beamerthemefocus.sty @@ -0,0 +1,60 @@ +% Copyright (C) 2018 Pasquale Claudio Africa. +% 2018 Sebastian Friedl. +% +% This file is part of beamerthemefocus. +% +% beamerthemefocus is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% beamerthemefocus is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with beamerthemefocus. If not, see . + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{beamerthemefocus}[2018/08/09 v2.2 Focus Beamer theme] + +\mode + + +% THEME OPTIONS. --------------------------------------------------------------- +\DeclareOptionBeamer{numbering}{% + \PassOptionsToPackage{numbering=#1}{beamerouterthemefocus} +} + +\newif\if@focus@loadfirafonts +\@focus@loadfirafontstrue + +\DeclareOptionBeamer{nofirafonts}{\@focus@loadfirafontsfalse} +\ProcessOptionsBeamer + + +% LOAD EXTERNAL PACKAGES. ------------------------------------------------------ +\if@focus@loadfirafonts + \RequirePackage[T1]{fontenc} + + \PassOptionsToPackage{type1}{FiraSans} + \PassOptionsToPackage{type1}{FiraMono} + + \RequirePackage{FiraSans} + \RequirePackage{FiraMono} +\fi + +\usecolortheme{focus} +\usefonttheme{focus} +\useinnertheme{focus} +\useoutertheme{focus} + +\setbeamertemplate{navigation symbols}{} + + +% SET MARGINS. ----------------------------------------------------------------- +\setbeamersize{text margin left=0.75cm, text margin right=0.75cm} +\setlength{\leftmargini}{0.75cm} + +\mode diff --git a/docs/workshop/2-passive-ssl/d4-client.tex b/docs/workshop/2-passive-ssl/d4-client.tex new file mode 100644 index 0000000..0f9f146 --- /dev/null +++ b/docs/workshop/2-passive-ssl/d4-client.tex @@ -0,0 +1,3 @@ +\begin{lstlisting} +tcpdump -n -s0 -w - | ./d4 -c ./conf | socat - OPENSSL-CONNECT:$D4-SERVER-IP-ADDRESS:$PORT,verify=1 +\end{lstlisting} diff --git a/docs/workshop/2-passive-ssl/d4-logo.pdf b/docs/workshop/2-passive-ssl/d4-logo.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f6cfdbf0053ee7e42735fa11991d661839c2ae06 GIT binary patch literal 5152 zcmbVQ2{@Er+aIk=LbMU}2wAes%Ge@H!r0eBHO64F46}uhU0IS)_AN>&$`&D|R7NUW zN+_~qkFxwNd7p>$*4y`8-+O(}nd_Ok?{n^RpL5^moZoMbn6cIo8Kf*0E>=2LumHyZ z2!LXL8m^)O$l*!uPIPAg3#v@v0077xA-mE^RPfuCKqqODh!h7B{LmpdjZP&I+~8iR zZdVNoQ?Z<(vlE40SI4r2Jx6_Ax4FI(?h>*OJhDB+XXExCHC`9dcjmHr(e(y`3v+Yt zTEt2_xCUL8Y?%PoUw&$DlB0amhs$8?rhswBrf5_q#e`I%;Is1k5x;~+& zn)8IswWk7e|9tE3(tF}tSlwF9ew)(U?IfPv)pds7PL7tZl!1GZkw&BuvCE%?bb`Ka zRuJGS@AA`{e74nv|9D2+U`oL$^aI-uxvYUsQf2r4?b2e>35=Mc7q7=G8=TR^JLQHQ z5%*l}GRwE*AH5nXGu}sPI=eZM}8+=Ybm*Bo!qdBf8c2`?}zCUR^z1$ zYKQ8L?n&J;eG`#V|N0-T zzuhtn78H|S;B$xMcDcy0C-X{UN#7lg8_K>TtaTes^9;nw-;j6YZN3>4t!q*lmY$Q^ z@uE*YW{^*76C0il))2-{yevCR8bTg?)nv=PalfgXx`#xYcG3kC{&3&YiG%BlA}&}U zw|SFD74u5Iqw$POJ3gKmo#P(Tcz9cs&wm};3D3Lr%XV5}!c$Wmx^)ue*=P0+b&jXY zmI~BYKiSD=D!PLSH=7XQriQX?mEcJ8Zr%vYV>6B}QO`h*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? cw@~6&mJ*Flpwd^Oi&4PI!^On3jgG+o1>qSyoB#j- literal 0 HcmV?d00001 diff --git a/docs/workshop/2-passive-ssl/d4-passivessl.tex b/docs/workshop/2-passive-ssl/d4-passivessl.tex new file mode 100644 index 0000000..9e16c22 --- /dev/null +++ b/docs/workshop/2-passive-ssl/d4-passivessl.tex @@ -0,0 +1,158 @@ +% Full instructions available at: +% https://github.com/elauksap/focus-beamertheme + +\documentclass{beamer} +\usetheme[numbering=progressbar]{focus} +\usepackage{tikz} +\usetikzlibrary{positioning} +\usetikzlibrary{shapes,arrows} +\usepackage{transparent} +\usepackage{fancyvrb} +\usepackage{listings} +\definecolor{main}{RGB}{47, 161, 219} +%\definecolor{textcolor}{RGB}{128, 128, 128} +\definecolor{background}{RGB}{240, 247, 255} +\definecolor{textcolor}{RGB}{85, 87, 83} +\title{D4 Project} +\subtitle{Revamping Passive SSL with D4} +\author{Jean-Louis Huynen} +\titlegraphic{\includegraphics[width=140pt]{d4-logo.pdf}} +\institute{Team CIRCL \\ \url{https://www.d4-project.org/}} +\date{20190329} + \lstset{% + language=bash, + backgroundcolor=\color{gray!25}, + basicstyle=\ttfamily, + breaklines=true, + columns=fullflexible + } +\begin{document} + +\begin{frame} + \maketitle +\end{frame} + +\begin{frame} + \frametitle{A passive SSL fingerprinter} + CSIRT's rationale for collecting TLS handshakes: + \begin{itemize} + \item Pivot on additional data points + \item Find owners of IP addresses + \item Detect usage of CIDR blocks + \item Detect vulnerable systems + \item Detect compromised services + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Objectives} + + History of links between: + \begin{itemize} + \item x509 certificates (And therefore their fields) + \item Ports + \item IP address + \item Client (ja3) + \item Server (ja3s) + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Problem statement} + \begin{itemize} + \item CIRCL already offers a similar service based on SSLDump + \item SSLDump needs some love - maintaining it is hard + \item Alternatives do not span the entire TLS Handshake (Salesforce's ja3) + \item TCP reassembly is not an easy problem to solve (Cloudfare uses tshark) + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{sensor-d4-tls-fingerprinting} + Main features: + \begin{itemize} + \item Take over SSLDump's duty + \item written in Golang + \item uses Go packet for tcp reassembly and spans whole handshake + \item ja3, ja3s, certificates, ip src / dst, port src / dst, TLSH + \end{itemize} + Current caveats: + \begin{itemize} + \item Support for TLS 1.3 pending + \item Reassembly requires RAM + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{sensor-d4-tls-fingerprinting} + \begin{columns} + \begin{column}{0.5\textwidth} + \begin{center} + \includegraphics[scale=0.2]{../../informal-preso/0-intro-banana/monitor.png} + \end{center} + \end{column} + \begin{column}{0.5\textwidth} + \begin{center} + \includegraphics[scale=0.2]{../../informal-preso/0-intro-banana/orangepi.png} + \end{center} + \end{column} + \end{columns} + \hspace{20pt} + \begin{itemize} + \item 1 desktop monitored during 15 days + \item 3327 TLS sessions fingerprinted + \item 600 unique certificates collected + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{sensor-d4-tls-fingerprinting - collectoin} + + \input{d4-tlsf.tex} + + +\begin{tabular}{l|l} +Options & Explanations\\ +\hline + -r & read pcap file\\ + -i & read from the interface \\ + -w & dump certificates to folder\\ + -j & write TLS session JSON descriptions to folder\\ + -mbcp & max buffered pages per connection (16) \\ + -mbpt & max total buffered pages (1024) \\ + -d & debug \\ + -v & verbose +\end{tabular} + +\vspace{.8cm} +Available on the D4 project's github page\footnote{\url{github.com/D4-project/sensor-d4-tls-fingerprinting}}. +Depends on libpcap. + +\end{frame} + + +\begin{frame} + \frametitle{sensor-d4-tls-fingerprinting - d4 client} + \input{pipe.tex} + \vspace{.8cm} + D4 server requires a meta-header in order to accept this data: + \input{metaheader.json} +\end{frame} + +\begin{frame} + \frametitle{sensor-d4-tls-fingerprinting - d4 worker} + \input{worker.tex} +\end{frame} + + +\begin{frame} +\frametitle{Get in touch if you want to join the project, host a sensor or contribute} +\begin{itemize} +\item Collaboration can include research partnership, sharing of collected streams or improving the software. +\item Contact: info@circl.lu +\item \url{https://github.com/D4-Project} - \url{https://twitter.com/d4_project} +\end{itemize} +\end{frame} + + +\end{document} diff --git a/docs/workshop/2-passive-ssl/d4-tlsf.tex b/docs/workshop/2-passive-ssl/d4-tlsf.tex new file mode 100644 index 0000000..9a399fb --- /dev/null +++ b/docs/workshop/2-passive-ssl/d4-tlsf.tex @@ -0,0 +1,3 @@ +\begin{lstlisting} +./d4-tlsf-amd64 -r|-i [-w -j -d -mbpc -mbpt -v] +\end{lstlisting} diff --git a/docs/workshop/2-passive-ssl/metaheader.json b/docs/workshop/2-passive-ssl/metaheader.json new file mode 100644 index 0000000..5b88cbc --- /dev/null +++ b/docs/workshop/2-passive-ssl/metaheader.json @@ -0,0 +1,5 @@ +\begin{lstlisting} +{ + "type": "ja3-jl" +} +\end{lstlisting} diff --git a/docs/workshop/2-passive-ssl/pipe.tex b/docs/workshop/2-passive-ssl/pipe.tex new file mode 100644 index 0000000..8b28217 --- /dev/null +++ b/docs/workshop/2-passive-ssl/pipe.tex @@ -0,0 +1,3 @@ +\begin{lstlisting} +./d4-tlsf-amd64 ... | ./d4-amd64 -c conf.folder +\end{lstlisting} \ No newline at end of file