diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53752db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +output diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..2655dab --- /dev/null +++ b/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# + +slidedecks=("c.1-cerebrate-internal") +mkdir output +export TEXINPUTS=::`pwd`/themes/ +echo ${TEXINPUTS} +for slide in ${slidedecks[@]}; do + cd ${slide} + pdflatex slide.tex + rm *.aux *.toc *.snm *.log *.out *.nav *.vrb + cp slide.pdf ../output/${slide}.pdf + rm slide.pdf + cd .. +done + + diff --git a/c.1-cerebrate-internal/content.tex b/c.1-cerebrate-internal/content.tex new file mode 100644 index 0000000..77188d2 --- /dev/null +++ b/c.1-cerebrate-internal/content.tex @@ -0,0 +1,105 @@ +% DO NOT COMPILE THIS FILE DIRECTLY! +% This is included by the other .tex files. + +\begin{frame}[t,plain] +\titlepage +\end{frame} + +\begin{frame} + \frametitle{Plan for this session} + \begin{itemize} + \item Quickly go over what is there in Cerebrate currently + \item Implementation details + \item The future + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Current scope} + \begin{itemize} + \item Basic UI and API systems (we'll talk about this later) + \item First iteration of ContactDB + \item Early version of the Trust Circles + \item Basic User management and ACL + \item Basic public lookup interface + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{ContactDB} + \begin{itemize} + \item Repository of organisations and individuals + \item Their relationships to one another (an individual can be affiliated with a set of organisations) + \item Encryption keys associated with either + \item Basic public lookup interface + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Trust Circles} + \begin{itemize} + \item Repository of sharing groups + \item Sharing groups have metadata about their purpose and a list of member organisations + \item Slightly simplified compared to MISP, this might change though + \item Cerebrate sharing groups are not editable by anyone besides the source (up for discussion) + \item They always have a primary owner + \end{itemize} +\end{frame} + + +\begin{frame} + \frametitle{User management} + \begin{itemize} + \item Users are tied to an individual - but not all individuals are users + \item Authentication happens via username+password or an API key + \item We can extend this in the future with other auth providers (for example LDAP) and optionally take this responsibility out of Cerebrate + \item Users are tied to roles that can be custom defined + \item Currently their affiliation to an organisation happens through the individual - though I will probably change this + \item Users can have a set of API keys with different expirations / use-cases (based on MISP discussions this week we will enhance this further) + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Public lookup interface} + \begin{itemize} + \item Still more of a proof of concept + \item The idea is that administrators can decide to open up a fully public interface for lookup services + \item Currently the Individual and Organisation registries are optional parts of this system + \item The plan is to be able to mark a list of orgs/individuals for the public lookups + \item Separate url routing makes additional allow/deny lists on the URL easy to implement + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Internals} + \begin{itemize} + \item Largest part of the work was transitioning MISP APIs to a more modern stack + \item UIs are generated by a diverse list of custom factories + \item Everything is parametrised and standardised internally + \item MISP's API libraries have been converted and modernised + \item Same with the ACL libraries + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Deployment} + \begin{itemize} + \item Installation instructions are already available on github + \item Very simple, low number of requirements + \item Should run on a potato + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Main Next steps} + \begin{itemize} + \item Many things to do within the existing scopes + \item Cerebrate to Cerebrate communication connections + \item Automatic exchange of information + \item Trust relationships + \item Integration layer to instruct local tools + \end{itemize} +\end{frame} + + + diff --git a/c.1-cerebrate-internal/logo.png b/c.1-cerebrate-internal/logo.png new file mode 100644 index 0000000..da2dc85 Binary files /dev/null and b/c.1-cerebrate-internal/logo.png differ diff --git a/c.1-cerebrate-internal/slide.tex b/c.1-cerebrate-internal/slide.tex new file mode 100644 index 0000000..2b9c38f --- /dev/null +++ b/c.1-cerebrate-internal/slide.tex @@ -0,0 +1,23 @@ +\documentclass{beamer} +\usetheme[numbering=progressbar]{focus} +\definecolor{main}{RGB}{83, 31, 117} +\definecolor{textcolor}{RGB}{0, 0, 0} +\definecolor{background}{RGB}{215, 212, 227} + +\usepackage[utf8]{inputenc} +\usepackage{tikz} +\usepackage{listings} +\usetikzlibrary{positioning} +\usetikzlibrary{shapes,arrows} + +\author{\small{\input{../includes/authors.txt}}} +\title{Cerebrate} +\subtitle{A quick intro into the current dev version of Cerebrate} +\institute{} +\titlegraphic{\includegraphics[scale=0.2]{logo.png}} +\date{\input{../includes/location.txt}} + +\begin{document} +\include{content} +\end{document} + diff --git a/includes/authors.txt b/includes/authors.txt new file mode 100644 index 0000000..65b891d --- /dev/null +++ b/includes/authors.txt @@ -0,0 +1 @@ +Andras Iklody diff --git a/includes/location.txt b/includes/location.txt new file mode 100644 index 0000000..9312da3 --- /dev/null +++ b/includes/location.txt @@ -0,0 +1 @@ +Internal diff --git a/logo.svg b/logo.svg new file mode 100644 index 0000000..0575825 --- /dev/null +++ b/logo.svg @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + CEREBRATE Project + + + + diff --git a/misp-training.pdf b/misp-training.pdf new file mode 100644 index 0000000..3117a2f Binary files /dev/null and b/misp-training.pdf differ diff --git a/themes/beamercolorthemefocus.sty b/themes/beamercolorthemefocus.sty new file mode 100644 index 0000000..f38a900 --- /dev/null +++ b/themes/beamercolorthemefocus.sty @@ -0,0 +1,77 @@ +% Copyright (C) 2018-2019 Pasquale Claudio Africa and the LaTeX community. +% A full list of contributors can be found at +% +% https://github.com/elauksap/focus-beamertheme +% +% 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}{83, 31, 117} +\definecolor{textcolor}{RGB}{0, 0, 0} +\definecolor{background}{RGB}{83, 31, 117} +%\definecolor{background}{RGB}{215, 212, 227} + + + +\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/themes/beamerfontthemefocus.sty b/themes/beamerfontthemefocus.sty new file mode 100644 index 0000000..50fb4c3 --- /dev/null +++ b/themes/beamerfontthemefocus.sty @@ -0,0 +1,50 @@ +% Copyright (C) 2018-2019 Pasquale Claudio Africa and the LaTeX community. +% A full list of contributors can be found at +% +% https://github.com/elauksap/focus-beamertheme +% +% 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=\Large, shape=\bfseries} +\setbeamerfont{subtitle}{size=\normalsize, 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}{size=\normalsize, 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/themes/beamerinnerthemefocus.sty b/themes/beamerinnerthemefocus.sty new file mode 100644 index 0000000..86fbc0d --- /dev/null +++ b/themes/beamerinnerthemefocus.sty @@ -0,0 +1,113 @@ +% Copyright (C) 2018-2019 Pasquale Claudio Africa and the LaTeX community. +% A full list of contributors can be found at +% +% https://github.com/elauksap/focus-beamertheme +% +% 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{-2.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 + }} + + \begin{minipage}[t]{\textwidth} + \usebeamerfont{author} + \insertauthor + \end{minipage} + + \vspace*{\baselineskip} + \begin{minipage}[t]{\textwidth} + \usebeamerfont{institute} + \insertinstitute + \end{minipage} + + \vspace*{\baselineskip} + \begin{minipage}[t]{\textwidth} + \usebeamerfont{date}{\insertdate} + \end{minipage} + + \vspace*{0pt plus 100fill} + + \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.5\baselineskip} + \begin{minipage}[b][0.45\paperheight]{\textwidth} + \usebeamerfont{sectiontitle} + \usebeamercolor[fg]{frametitle} + \let\hyperlink\@secondoftwo\insertsection + \end{minipage} + + \vspace*{0pt plus 100fill} +} + +\AtBeginSection[]{% + \begin{frame}[plain, noframenumbering]{} + \sectionpage + \end{frame}% +} + +\mode diff --git a/themes/beamerouterthemefocus.sty b/themes/beamerouterthemefocus.sty new file mode 100644 index 0000000..0fce7a8 --- /dev/null +++ b/themes/beamerouterthemefocus.sty @@ -0,0 +1,270 @@ +% Copyright (C) 2018-2019 Pasquale Claudio Africa and the LaTeX community. +% A full list of contributors can be found at +% +% https://github.com/elauksap/focus-beamertheme +% +% 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. +% Fix hyperref warning caused by \appendix +% (https://tex.stackexchange.com/questions/192686/hyperref-warning-caused-by-beamer-appendix). +\newcommand*{\bkmtranslateto}{\languagename} +\newcommand*{\bkmtranslate}[1]{% + \ifcsname tr@@@\bkmtranslateto @#1\endcsname + \csname tr@@@\bkmtranslateto @#1\endcsname + \else + #1% + \fi +} +\pdfstringdefDisableCommands{\let\translate\bkmtranslate} +\RequirePackage{bookmark} + +\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/themes/beamerthemefocus.sty b/themes/beamerthemefocus.sty new file mode 100644 index 0000000..6fa049a --- /dev/null +++ b/themes/beamerthemefocus.sty @@ -0,0 +1,62 @@ +% Copyright (C) 2018-2019 Pasquale Claudio Africa and the LaTeX community. +% A full list of contributors can be found at +% +% https://github.com/elauksap/focus-beamertheme +% +% 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}[2019/01/18 v2.3 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/training-support/build.sh b/training-support/build.sh new file mode 100755 index 0000000..2655dab --- /dev/null +++ b/training-support/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# + +slidedecks=("c.1-cerebrate-internal") +mkdir output +export TEXINPUTS=::`pwd`/themes/ +echo ${TEXINPUTS} +for slide in ${slidedecks[@]}; do + cd ${slide} + pdflatex slide.tex + rm *.aux *.toc *.snm *.log *.out *.nav *.vrb + cp slide.pdf ../output/${slide}.pdf + rm slide.pdf + cd .. +done + + diff --git a/training-support/build_temp.sh b/training-support/build_temp.sh new file mode 100755 index 0000000..52e7df5 --- /dev/null +++ b/training-support/build_temp.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# + +slidedecks=("20200623-NATO-MUG-update") +mkdir output +export TEXINPUTS=::`pwd`/themes/ +echo ${TEXINPUTS} +for slide in ${slidedecks[@]}; do + cd ${slide} + if test -f "slide_nl.tex"; then + pdflatex slide_nl.tex + pdflatex slide_nl.tex + fi + pdflatex slide.tex + pdflatex slide.tex + rm *.aux *.toc *.snm *.log *.out *.nav *.vrb + cp slide.pdf ../output/${slide}.pdf + rm slide.pdf + if test -f "slide_nl.tex"; then + cp slide_nl.pdf ../output/${slide}_nl.pdf + rm slide_nl.pdf + fi + cd .. +done + +echo "Generating ack page..." +cd complementary/ack +pdflatex ack.tex +rm *.aux *.log *.out +cp ack.pdf ../../output +rm ack.pdf +cd ../.. + +echo "Generating cheatsheet..." +cd training-support/compact-cheatsheet/ +pdflatex cheatsheet.tex +rm *.aux *.toc *.snm *.log *.out *.nav *.vrb +cp cheatsheet.pdf ../../output +rm cheatsheet.pdf +cd ../.. + +echo "Generating checklist..." +cd training-support/checklist +pdflatex usage.tex +rm *.aux *.toc *.snm *.log *.out *.nav *.vrb +cp usage.pdf ../../output +rm usage.pdf +cd ../.. + +echo "Generating handout..." +cd output +for pdf in ${slidedecks[@]}; do + listofpdf+="${pdf}.pdf " +done +echo ${listofpdf} + +pdfunite ${listofpdf} cheatsheet.pdf usage.pdf ack.pdf ../misp-training.pdf +cd .. + +exiftool -overwrite_original_in_place -Title="MISP Training and Slide Decks" -Author="CIRCL Computer Incident Response Center Luxembourg" -Subject="MISP Threat Intelligence Platform Training Materials" -Keywords="MISP Threat Intelligence CTI STIX information sharing yara sigma suricata snort bro openioc threat-actor TIP threat intelligence platform circl.lu training cybersecurity MISPProject" misp-training.pdf + +rm table.md + +echo "| Slides (PDF) | Source Code |">>table.md +echo "| ------------ | ----------- |">>table.md + +for t in ${slidedecks[@]}; do + echo "| [${t}](https://www.misp-project.org/misp-training/${t}.pdf) | [source](https://github.com/MISP/misp-training/tree/master/${t}) |" >>table.md +done + diff --git a/training-support/c.1-cerebrate-internal/content.tex b/training-support/c.1-cerebrate-internal/content.tex new file mode 100644 index 0000000..77188d2 --- /dev/null +++ b/training-support/c.1-cerebrate-internal/content.tex @@ -0,0 +1,105 @@ +% DO NOT COMPILE THIS FILE DIRECTLY! +% This is included by the other .tex files. + +\begin{frame}[t,plain] +\titlepage +\end{frame} + +\begin{frame} + \frametitle{Plan for this session} + \begin{itemize} + \item Quickly go over what is there in Cerebrate currently + \item Implementation details + \item The future + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Current scope} + \begin{itemize} + \item Basic UI and API systems (we'll talk about this later) + \item First iteration of ContactDB + \item Early version of the Trust Circles + \item Basic User management and ACL + \item Basic public lookup interface + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{ContactDB} + \begin{itemize} + \item Repository of organisations and individuals + \item Their relationships to one another (an individual can be affiliated with a set of organisations) + \item Encryption keys associated with either + \item Basic public lookup interface + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Trust Circles} + \begin{itemize} + \item Repository of sharing groups + \item Sharing groups have metadata about their purpose and a list of member organisations + \item Slightly simplified compared to MISP, this might change though + \item Cerebrate sharing groups are not editable by anyone besides the source (up for discussion) + \item They always have a primary owner + \end{itemize} +\end{frame} + + +\begin{frame} + \frametitle{User management} + \begin{itemize} + \item Users are tied to an individual - but not all individuals are users + \item Authentication happens via username+password or an API key + \item We can extend this in the future with other auth providers (for example LDAP) and optionally take this responsibility out of Cerebrate + \item Users are tied to roles that can be custom defined + \item Currently their affiliation to an organisation happens through the individual - though I will probably change this + \item Users can have a set of API keys with different expirations / use-cases (based on MISP discussions this week we will enhance this further) + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Public lookup interface} + \begin{itemize} + \item Still more of a proof of concept + \item The idea is that administrators can decide to open up a fully public interface for lookup services + \item Currently the Individual and Organisation registries are optional parts of this system + \item The plan is to be able to mark a list of orgs/individuals for the public lookups + \item Separate url routing makes additional allow/deny lists on the URL easy to implement + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Internals} + \begin{itemize} + \item Largest part of the work was transitioning MISP APIs to a more modern stack + \item UIs are generated by a diverse list of custom factories + \item Everything is parametrised and standardised internally + \item MISP's API libraries have been converted and modernised + \item Same with the ACL libraries + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Deployment} + \begin{itemize} + \item Installation instructions are already available on github + \item Very simple, low number of requirements + \item Should run on a potato + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Main Next steps} + \begin{itemize} + \item Many things to do within the existing scopes + \item Cerebrate to Cerebrate communication connections + \item Automatic exchange of information + \item Trust relationships + \item Integration layer to instruct local tools + \end{itemize} +\end{frame} + + + diff --git a/training-support/c.1-cerebrate-internal/logo.png b/training-support/c.1-cerebrate-internal/logo.png new file mode 100644 index 0000000..da2dc85 Binary files /dev/null and b/training-support/c.1-cerebrate-internal/logo.png differ diff --git a/training-support/c.1-cerebrate-internal/slide.tex b/training-support/c.1-cerebrate-internal/slide.tex new file mode 100644 index 0000000..2b9c38f --- /dev/null +++ b/training-support/c.1-cerebrate-internal/slide.tex @@ -0,0 +1,23 @@ +\documentclass{beamer} +\usetheme[numbering=progressbar]{focus} +\definecolor{main}{RGB}{83, 31, 117} +\definecolor{textcolor}{RGB}{0, 0, 0} +\definecolor{background}{RGB}{215, 212, 227} + +\usepackage[utf8]{inputenc} +\usepackage{tikz} +\usepackage{listings} +\usetikzlibrary{positioning} +\usetikzlibrary{shapes,arrows} + +\author{\small{\input{../includes/authors.txt}}} +\title{Cerebrate} +\subtitle{A quick intro into the current dev version of Cerebrate} +\institute{} +\titlegraphic{\includegraphics[scale=0.2]{logo.png}} +\date{\input{../includes/location.txt}} + +\begin{document} +\include{content} +\end{document} + diff --git a/training-support/checklist/usage.tex b/training-support/checklist/usage.tex new file mode 100644 index 0000000..f714b20 --- /dev/null +++ b/training-support/checklist/usage.tex @@ -0,0 +1,125 @@ +\documentclass[nofootinbib, a4paper]{revtex4} +%\documentclass{memoir} +\renewcommand{\familydefault}{\sfdefault} +\usepackage[x11names,svgnames,dvipsnames]{xcolor} +\usepackage{progressbar} +\usepackage{lastpage} +\usepackage{pageslts} +\usepackage{booktabs} +\usepackage{scalerel,amssymb} +\usepackage[perpage]{footmisc} +\usepackage[most]{tcolorbox} +\usepackage[unicode=true, + bookmarks=true,bookmarksnumbered=false,bookmarksopen=false, + breaklinks=false,pdfborder={0.1 0.1 0.1},backref=false,colorlinks=false,linktoc=all] + {hyperref} +\hypersetup{pdftitle={Status report 2017}, + pdfauthor={CIRCL}} +\renewcommand{\arraystretch}{1.2} +\makeatletter +%\renewcommand{\bf}{\textbf} +%\renewcommand{\it}{\textit} +\usepackage{fancyhdr} +\newcommand{\ourOrganizationName}{CIRCL - Computer Incident Response Center Luxembourg - TLP:GREEN} +\newcommand{\ourOrganizationNameTitle}{CIRCL - Computer Incident Response Center Luxembourg} +\newcommand{\ourAuthors}{Team CIRCL} +\newcommand{\ourOrganizationAddress}{(+352) 247 88444 - info@circl.lu – www.circl.lu} + +\begin{document} +\section*{List of features to explain: User (MISP trainer support)} +\begin{center} +\begin{tabular}{@{}lll@{}} +\hline +Check & Description&Length\\ +\hline + $\Box$ & {\bf Add events} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - via Standard UI & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Distribution levels and publication & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - Different type of timestamps & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + + $\Box$ & {\bf Add attributes} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - via Freetext & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - via Standard UI & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - via Template & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - via ReST API (including freetext API?) & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - via EventGraph & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf Object} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - add Object & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - add References & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - show via EventGraph & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - add additional elements via the EventGraph & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf *-lists} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - Warninglists: show warnings raised in steps above & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - Noticelists: show warnings when adding data & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - Import Regexp: avoid leaking private/personal data & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf Correlations} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - show correlations that were added & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - pivot to events via correlations & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - show correlations graph & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - feeds \& servers correlation & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf Tags and Galaxies} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - add Tag from Taxonomy & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - add GalaxyCluster & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - add ATT\&CK pattern & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - Creating and using Tag Collection & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf Sighting} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - via UI + custom via UI (new source or expiration sighting) & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - via API & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf Delegation} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf Proposal} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf Delete (including soft versus hard delete) } & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - Event blacklist when deleting & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf Extending event} (how and when to use it) & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf Extracting the data} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - download from & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - download from via modules & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - .json routing & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - mass export & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - RestSearch & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & {\bf Searching for data} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - Attribute search & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ + $\Box$ & - Event index filter search & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.1}\\ +\hline +\end{tabular} +\end{center} + +\newpage +\section*{List of features to explain: Administrator (MISP trainer support)} +\begin{center} +\begin{tabular}{@{}lll@{}} +\hline +Check & Description&Length\\ +\hline + $\Box$ & {\bf User} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - administration and contact via standard UI & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Roles & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & {\bf Organisations} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - local and remote & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - administration: Creation and merge & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Org admins and sync users & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & {\bf Sharing group} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - administration via standard UI & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & {\bf Templates} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - administration via standard UI & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Pulling and Updating & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & {\bf Jobs and Workers} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - administration via standard UI & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Scheduled Tasks and CRON jobs & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & {\bf Black listing} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Events & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Organisations & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & {\bf Searching} & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Dashboard & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Event index & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Attributes: values, [not] tag & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Event level: quickfilter, contextual, distribution & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - Event level: event graph & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + $\Box$ & - RestSearch & \progressbar[filledcolor=ForestGreen, emptycolor=white]{0.3}\\ + +\hline +\end{tabular} +\end{center} + +\end{document} + + diff --git a/training-support/compact-cheatsheet/cheatsheet.tex b/training-support/compact-cheatsheet/cheatsheet.tex new file mode 100644 index 0000000..c65ef6b --- /dev/null +++ b/training-support/compact-cheatsheet/cheatsheet.tex @@ -0,0 +1,124 @@ +\documentclass[10pt,landscape]{article} +\usepackage{multicol} +\usepackage{calc} +\usepackage{ifthen} +\usepackage[landscape]{geometry} +\usepackage[colorlinks = true, + linkcolor = blue, + urlcolor = blue, + citecolor = blue, + anchorcolor = blue]{hyperref} +\usepackage{graphicx} +\usepackage[T1]{fontenc} +\usepackage[bitstream-charter]{mathdesign} +% Based on the LaTeX cheatsheet + +% This sets page margins to .5 inch if using letter paper, and to 1cm +% if using A4 paper. (This probably isn't strictly necessary.) +% If using another size paper, use default 1cm margins. +\ifthenelse{\lengthtest { \paperwidth = 11in}} + { \geometry{top=.5in,left=.5in,right=.5in,bottom=.5in} } + {\ifthenelse{ \lengthtest{ \paperwidth = 297mm}} + {\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} } + {\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} } + } + +% Turn off header and footer +\pagestyle{empty} +% Redefine section commands to use less space +\makeatletter +\renewcommand{\section}{\@startsection{section}{1}{0mm}% + {-1ex plus -.5ex minus -.2ex}% + {0.5ex plus .2ex}%x + {\normalfont\large\bfseries}} +\renewcommand{\subsection}{\@startsection{subsection}{2}{0mm}% + {-1explus -.5ex minus -.2ex}% + {0.5ex plus .2ex}% + {\normalfont\normalsize\bfseries}} +\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0mm}% + {-1ex plus -.5ex minus -.2ex}% + {1ex plus .2ex}% + {\normalfont\small\bfseries}} +\makeatother + +% Define BibTeX command +\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em + T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} + +% Don't print section numbers +\setcounter{secnumdepth}{0} + + +\setlength{\parindent}{0pt} +\setlength{\parskip}{0pt plus 0.5ex} + + +\begin{document} + +\raggedright +\footnotesize +\begin{multicols}{3} + + +% multicol parameters +% These lengths are set only within the two main columns +%\setlength{\columnseprule}{0.25pt} +\setlength{\premulticols}{1pt} +\setlength{\postmulticols}{1pt} +\setlength{\multicolsep}{1pt} +\setlength{\columnsep}{2pt} + +\begin{center} + \includegraphics{misp.pdf}\\ + \Large{\textbf{MISP Training Cheat Sheet}} \\ +\end{center} + +\section{Virtual Machine (MISP Training VM)} + +The MISP Training VM is available at the following location : \url{https://www.circl.lu/misp-images/}.\\ +The VM can be imported into VirtualBox or VMWare as an appliance (OVA).\\ +{\it The MISP training VM includes multiple applications and packages which are configured by default without + production-ready secure settings. We strongly recommend to not use this VM for production and/or for storing sensitive information.}\\ +\section{Default URL and (username/password)} + + \begin{itemize} + \item MISP web interface - \url{http://127.0.0.1} (NAT: \url{http://127.0.0.1:8080}) ({\bf admin@admin.test/admin}) + \item MISP-modules - \url{http://127.0.0.1:6666} + \item MISP-dashboard - \url{http://127.0.0.1:8001} + \item Viper-web - http://127.0.0.1:8888 (admin/Password1234) + \item jupyter-notebook - http://127.0.0.1:8889 + \item system credentials via ssh/terminal - (misp/Password1234) + \end{itemize} + +\section{How to get the API key of my user?} + Go to the MISP web interface, and simply click your username in the right upper corner to see your user profile which includes your API key. +\section{How to reset a password in MISP?} +If you did any specific mistake while setting up your password at the first login. You can reset the password by logging in + on the system (via SSH or terminal) and typing the following command: +{\tt /var/www/MISP/app/Console/cake Password admin@admin.test YourTemporaryPasssword} +\section{How to reset the bruteforce login protection?} +While trying to log into MISP multiple times unsuccessfuly, the bruteforce protection might be triggered. You can reset the bruteforce + login protection's state by logging into the system (via SSH or terminal) and typing the following command: +{\tt /var/www/MISP/app/Console/cake Admin clearBruteforce} + \section{How to upgrade MISP to the latest version?} +Log in via SSH or terminal and type the following commands (your VM must have an Internet access): + \begin{enumerate} + \item {\tt cd /var/www/MISP} + \item {\tt git pull origin 2.4} + \item {\tt git submodule update ----init ----recursive} + \end{enumerate} + \section{Getting OSINT information into your MISP} + By default, a fresh installation of MISP is empty as we prefer to leave it up to the users to store, gather, and share the information they need. If you would like to populate your MISP with some real-life data, simply enable the CIRCL OSINT feed, which contains cybersecurity threat-related information. In order to enable the OSINT feed, go to $\rightarrow$ {\tt Sync Actions} then $\rightarrow$ {\tt List Feeds}. Then select the checkbox next to the first feed (called {\tt CIRCL OSINT Feed}) and click on top {\tt Enable Selected}. To fetch all events from the selected feed, scroll to the right side of the {\tt CIRCL OSINT Feed} row and simply click the icon depicting a downward pointing arrow in a circle. Once you go back to the Event Index, the events will start appearing gradually. + +\section{Training materials and documentation} + MISP training materials are available at the following location \url{https://www.circl.lu/services/misp-training-materials/} and are freely licensed under CC-BY-SA. + MISP book is available at the following location \url{https://www.circl.lu/doc/misp/}. + + +\rule{0.3\linewidth}{0.25pt} +\scriptsize + +Copyright \copyright\ 2018 MISP Project licensed under CC-BY-SA + +\end{multicols} +\end{document} diff --git a/training-support/compact-cheatsheet/misp.pdf b/training-support/compact-cheatsheet/misp.pdf new file mode 100644 index 0000000..f7a3f9d Binary files /dev/null and b/training-support/compact-cheatsheet/misp.pdf differ diff --git a/training-support/complementary/ack/ack.tex b/training-support/complementary/ack/ack.tex new file mode 100644 index 0000000..bedfd5a --- /dev/null +++ b/training-support/complementary/ack/ack.tex @@ -0,0 +1,39 @@ +\documentclass{article} +\usepackage[utf8]{inputenc} +\usepackage[pdftex, + pdfauthor={CIRCL - Computer Incident Response Center Luxembourg / MISP Project}, + pdftitle={MISP Training Slide Decks}, + pdfsubject={MISP Project training materials including slides decks}, + pdfkeywords={CTI Threat Intelligence Analyst Cyber Security}, + pdfproducer={}, + pdfcreator={pdflatex and tons of random silly scripts}]{hyperref} +\usepackage{graphicx} +\begin{document} + +\section*{MISP Training Slide Decks} + +MISP\footnote{\url{https://www.misp-project.org/}} is a threat intelligence platform for gathering, sharing, storing and correlating Indicators of Compromise of targeted attacks, threat intelligence, financial fraud information, vulnerability information or even counter-terrorism information. + +This document includes the slides which are the support materials\footnote{\url{https://github.com/MISP/misp-training}} used for MISP trainings. The content is dual-licensed under CC-BY-SA version 4 license or GNU Affero General Public License version 3 which allows you to freely use, remixes and share-alike the slides while still mentioning the contributors under the same conditions. + +\section*{Contributors} + +\begin{itemize} +\item Steve Clement \url{https://github.com/SteveClement} +\item Alexandre Dulaunoy \url{https://github.com/adulau} +\item Andras Iklody \url{https://github.com/iglocska} +\item Sami Mokaddem \url{https://github.com/mokaddem} +\item Sascha Rommelfangen \url{https://github.com/rommelfs} +\item Christian Studer \url{https://github.com/chrisr3d} +\item Raphaël Vinot \url{https://github.com/rafiot} +\item Gerard Wagener \url{https://github.com/haegardev} +\end{itemize} + +\section*{Acknowledgment} + +The MISP project is co-financed and resource supported by CIRCL Computer Incident Response Center Luxembourg\footnote{\url{https://www.circl.lu/}} and co-financed by a CEF (Connecting Europe Facility) funding under CEF-TC-2016-3 - Cyber Security as {\it Improving MISP as building blocks for next-generation information sharing}. + +\includegraphics[scale=0.2]{en_square_cef_logo.eps} + +\includegraphics[scale=0.3]{logo-circl.pdf} +\end{document} diff --git a/training-support/complementary/ack/en_square_cef_logo-eps-converted-to.pdf b/training-support/complementary/ack/en_square_cef_logo-eps-converted-to.pdf new file mode 100644 index 0000000..a0a2f25 Binary files /dev/null and b/training-support/complementary/ack/en_square_cef_logo-eps-converted-to.pdf differ diff --git a/training-support/complementary/ack/en_square_cef_logo.eps b/training-support/complementary/ack/en_square_cef_logo.eps new file mode 100644 index 0000000..7fa53d2 Binary files /dev/null and b/training-support/complementary/ack/en_square_cef_logo.eps differ diff --git a/training-support/complementary/ack/logo-circl.pdf b/training-support/complementary/ack/logo-circl.pdf new file mode 100644 index 0000000..62c9239 Binary files /dev/null and b/training-support/complementary/ack/logo-circl.pdf differ diff --git a/training-support/description/generic.md b/training-support/description/generic.md new file mode 100644 index 0000000..e100632 --- /dev/null +++ b/training-support/description/generic.md @@ -0,0 +1,45 @@ + +# Agenda + +## First day + +- 9:00-10:30 Introduction Cybersecurity Information Sharing - MISP Perspective +- 10:45-12:30 Usage and Features of the MISP software + +- 14:00-15:30 Common Integration of MISP within an Organisation - from MISP Setup and Seizing to Situational Awareness +- 15:45-17:00 MISP Administration and Starting your Information Sharing Community + + +## Second day + +- 9:00-10:30 Practical OSINT exercise - Best Practices in Threat Intelligence +- 10:45-12:30 Practical OSINT exercise - Gather, document, analyse and contextualise intelligence using MISP + +- 14:00-15:30 Building Information Sharing Communities +- 15:45-17:00 Building Information Sharing Communities + +## Third day + +- 9:00-10:30 Extending Data Models in MISP - from Taxonomies to Custom Objects +- 10:45-12:30 Turning data into actionable intelligence using APIs + +- 14:00-15:30 Integrating MISP with your tools and processes +- 15:45-17:00 Integrating MISP with your tools and processes + +# What will attendees learn? + +Participants will understand the overall process of threat intelligence in incident response, cyber security and other fields. They will be able to create their own intelligence and share it efficiently with other partners. They will be able to analyse specific requirements of information sharing communities and apply it to their day-to-day operational activities. Participants will be able to apply the information sharing concepts and improve their cyber security processes to gather more information and exercise it more efficiently. + +- MISP in practice +- encoding information from 3rd parties +- encoding information produced by other tools +- contextualising information +- collaborating with others and partners +- cross-correlating information and how to make use of the community +- producing actionable information +- integrating MISP with other tools via the APIs +- building modules to connect to internal and external services +- building valuable feeds +- using the various support tools coming from the misp-project as well as 3rd parties + + diff --git a/training-support/includes/authors.txt b/training-support/includes/authors.txt new file mode 100644 index 0000000..65b891d --- /dev/null +++ b/training-support/includes/authors.txt @@ -0,0 +1 @@ +Andras Iklody diff --git a/training-support/includes/location.txt b/training-support/includes/location.txt new file mode 100644 index 0000000..9312da3 --- /dev/null +++ b/training-support/includes/location.txt @@ -0,0 +1 @@ +Internal diff --git a/training-support/logo.svg b/training-support/logo.svg new file mode 100644 index 0000000..0575825 --- /dev/null +++ b/training-support/logo.svg @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + CEREBRATE Project + + + + diff --git a/training-support/misp-training.pdf b/training-support/misp-training.pdf new file mode 100644 index 0000000..3117a2f Binary files /dev/null and b/training-support/misp-training.pdf differ diff --git a/training-support/themes/beamercolorthemefocus.sty b/training-support/themes/beamercolorthemefocus.sty new file mode 100644 index 0000000..f38a900 --- /dev/null +++ b/training-support/themes/beamercolorthemefocus.sty @@ -0,0 +1,77 @@ +% Copyright (C) 2018-2019 Pasquale Claudio Africa and the LaTeX community. +% A full list of contributors can be found at +% +% https://github.com/elauksap/focus-beamertheme +% +% 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}{83, 31, 117} +\definecolor{textcolor}{RGB}{0, 0, 0} +\definecolor{background}{RGB}{83, 31, 117} +%\definecolor{background}{RGB}{215, 212, 227} + + + +\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/training-support/themes/beamerfontthemefocus.sty b/training-support/themes/beamerfontthemefocus.sty new file mode 100644 index 0000000..50fb4c3 --- /dev/null +++ b/training-support/themes/beamerfontthemefocus.sty @@ -0,0 +1,50 @@ +% Copyright (C) 2018-2019 Pasquale Claudio Africa and the LaTeX community. +% A full list of contributors can be found at +% +% https://github.com/elauksap/focus-beamertheme +% +% 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=\Large, shape=\bfseries} +\setbeamerfont{subtitle}{size=\normalsize, 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}{size=\normalsize, 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/training-support/themes/beamerinnerthemefocus.sty b/training-support/themes/beamerinnerthemefocus.sty new file mode 100644 index 0000000..86fbc0d --- /dev/null +++ b/training-support/themes/beamerinnerthemefocus.sty @@ -0,0 +1,113 @@ +% Copyright (C) 2018-2019 Pasquale Claudio Africa and the LaTeX community. +% A full list of contributors can be found at +% +% https://github.com/elauksap/focus-beamertheme +% +% 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{-2.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 + }} + + \begin{minipage}[t]{\textwidth} + \usebeamerfont{author} + \insertauthor + \end{minipage} + + \vspace*{\baselineskip} + \begin{minipage}[t]{\textwidth} + \usebeamerfont{institute} + \insertinstitute + \end{minipage} + + \vspace*{\baselineskip} + \begin{minipage}[t]{\textwidth} + \usebeamerfont{date}{\insertdate} + \end{minipage} + + \vspace*{0pt plus 100fill} + + \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.5\baselineskip} + \begin{minipage}[b][0.45\paperheight]{\textwidth} + \usebeamerfont{sectiontitle} + \usebeamercolor[fg]{frametitle} + \let\hyperlink\@secondoftwo\insertsection + \end{minipage} + + \vspace*{0pt plus 100fill} +} + +\AtBeginSection[]{% + \begin{frame}[plain, noframenumbering]{} + \sectionpage + \end{frame}% +} + +\mode diff --git a/training-support/themes/beamerouterthemefocus.sty b/training-support/themes/beamerouterthemefocus.sty new file mode 100644 index 0000000..0fce7a8 --- /dev/null +++ b/training-support/themes/beamerouterthemefocus.sty @@ -0,0 +1,270 @@ +% Copyright (C) 2018-2019 Pasquale Claudio Africa and the LaTeX community. +% A full list of contributors can be found at +% +% https://github.com/elauksap/focus-beamertheme +% +% 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. +% Fix hyperref warning caused by \appendix +% (https://tex.stackexchange.com/questions/192686/hyperref-warning-caused-by-beamer-appendix). +\newcommand*{\bkmtranslateto}{\languagename} +\newcommand*{\bkmtranslate}[1]{% + \ifcsname tr@@@\bkmtranslateto @#1\endcsname + \csname tr@@@\bkmtranslateto @#1\endcsname + \else + #1% + \fi +} +\pdfstringdefDisableCommands{\let\translate\bkmtranslate} +\RequirePackage{bookmark} + +\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/training-support/themes/beamerthemefocus.sty b/training-support/themes/beamerthemefocus.sty new file mode 100644 index 0000000..6fa049a --- /dev/null +++ b/training-support/themes/beamerthemefocus.sty @@ -0,0 +1,62 @@ +% Copyright (C) 2018-2019 Pasquale Claudio Africa and the LaTeX community. +% A full list of contributors can be found at +% +% https://github.com/elauksap/focus-beamertheme +% +% 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}[2019/01/18 v2.3 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