inital commit

This commit is contained in:
2026-06-22 23:32:38 +02:00
commit 27bb4a99b6
32 changed files with 2131 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
**/build/*
+19
View File
@@ -0,0 +1,19 @@
.PHONY: watch build clean stop view ls quickstart
FILE=src/main.tex
build:
sudo docker compose run --rm latex latexmk -pdf -interaction=nonstopmode -output-directory=build $(FILE)
watch:
sudo docker compose run --rm latex latexmk -pvc -pdf -interaction=nonstopmode -output-directory=build $(FILE) > /dev/null 2>&1 &
view:
xdg-open build/main.pdf > /dev/null 2>&1 &
ls:
sudo docker compose ls
stop:
sudo docker compose down --remove-orphans --volumes
quickstart: watch view
clean:
rm -rf build/*
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
services:
latex:
image: texlive/texlive
volumes:
- .:/workspace
working_dir: /workspace
+46
View File
@@ -0,0 +1,46 @@
\chapter{Keylogger}
\label{chap:keylogger}
\vspace{-4.0em}
\begin{flushright}
{\small\itshape Von David Heunisch}
\end{flushright}
\section{What is a Keylogger}
A keylogger records every keystroke entered on a keyboard, capturing passwords, credit card numbers, and private messages. It operates invisibly by functioning as a man-in-the-middle (MitM) device positioned between the keyboard and computer.
\section{Attack Scenario}
An attacker gains brief physical access to a device and installs the keylogger in the keyboard chain. After several days of silently recording keystrokes, the attacker retrieves the device and extracts the captured data for analysis. This approach requires no software installation and leaves minimal evidence.
\section{Implementation}
We used the \textbf{Adafruit RP2040 Feather} with USB host functionality. The device:
\begin{itemize}
\item Intercepts USB HID keyboard signals
\item Logs all keystrokes to internal flash memory
\item Forwards signals unchanged to the host computer
\end{itemize}
% Add a picture here :D
\subsection{Setup}
The setup involves flashing firmware via Arduino IDE onto the RP2040, configuring some parameters. See the technical documentation for detailed setup and configuration instructions.
\subsection{Data Storage}
Keystroke data is stored in a textfile via LittleFS. Data extraction is performed via a Serial Bus command.
%\section{Defense}
%\begin{itemize}
% \item Inspect keyboard cables for suspicious devices
% \item Use wireless keyboards with encryption
% \item Implement physical security controls
%\end{itemize}
\section{Recommended Resources}
For further reading and implementation details, see:
\begin{itemize}
\item \url{https://magnuskue.github.io/usb-attacks-book/overview.html} --- Setup guide
\item \url{https://git.magnusku.de/David_Heunisch/Keylogger} --- Source code
\end{itemize}
+198
View File
@@ -0,0 +1,198 @@
\documentclass[a4paper,11pt,twoside]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{array}
\usepackage{setspace}
\usepackage{geometry}
\usepackage[automark]{scrlayer-scrpage}
% Seitenränder
\geometry{
left=2.5cm,
right=2.5cm,
top=0.0cm,
bottom=2.0cm
}
% Zeilenabstand
\onehalfspacing
% Hyperref Konfiguration
\hypersetup{
colorlinks=true,
linkcolor=black,
filecolor=black,
urlcolor=blue,
citecolor=blue,
pdftitle={Offensive Sicherheit Hardware-basierte Angriffsvektoren},
pdfauthor={David Schwarzkopf, Magnus Küderli, David Heunisch}
}
% KOMA-Script Seitenstil
\clearpairofpagestyles
\ihead{\headmark}
\ohead{\pagemark}
\ifoot{}
\ofoot{}
\pagestyle{scrheadings}
% Chapter mark formatting
\renewcommand*{\chaptermarkformat}{\chapappifchapterprefix{\ }\thechapter\autodot\enskip}
\begin{document}
% Titelblatt
\begin{titlepage}
\centering
\vspace*{2cm}
{\Huge\bfseries Offensive Sicherheit\par}
\vspace{0.5cm}
{\Large\bfseries Hardware-basierte Angriffsvektoren\par}
\vspace{1.5cm}
{\large Wissenschaftliche Projektarbeit\par}
\vspace{2cm}
\begin{tabular}{@{}l@{\hspace{2cm}}l@{}}
\textbf{Autoren:}
& David Heunisch \\
& David Schwarzkopf \\
& Magnus Küderli \\
\end{tabular}
\vspace{1cm}
\begin{tabular}{@{}l@{\hspace{2cm}}l@{}}
\textbf{Fachbereich:} & Offensive Sicherheit \\
\textbf{Datum:} & SoSe 2026 \\
\end{tabular}
\vfill
{\large\itshape Stuttgart, Baden-Württemberg\par}
\vspace{2cm}
\end{titlepage}
% Vorwort
\chapter*{Vorwort}
\addcontentsline{toc}{chapter}{Vorwort}
\markboth{Vorwort}{Vorwort}
Diese Projektarbeit untersucht hardware-basierte Angriffsvektoren im Kontext vom Modul \textit{Offensive Security}.
Wir analysieren drei komplementäre Szenarien, die auf USB-basierter Keyboard-Emulation aufbauen und unterschiedliche
Sicherheitsaspekte beleuchten: Keylogging, Script-Ausführung und Persistenzmechanismen.
\vspace{0.5cm}
\textbf{Hinweis:} Alle beschriebenen Techniken werden ausschließlich zu Bildungszwecken und im Rahmen
ethisch vertretbarer Sicherheitsforschung analysiert.
\vspace{1cm}
\begin{flushright}
David Schwarzkopf, Magnus Küderli, David Heunisch\\
Stuttgart, Mai 2026
\end{flushright}
% Kapitel 1
\chapter{Grundlagen}
\label{chap:grundlagen}
\section{USB-Keyboard-Emulation}
\section{RP2040-Mikrocontroller}
\section{Sicherheitsrelevante Aspekte}
% Kapitel 2
\chapter{Keylogger}
\label{chap:keylogger}
\begin{flushright}
\textit{Von David Heunisch}
\end{flushright}
\section{Ziel des Teilprojektes}
Der Keylogger stellt den ersten Angriffsvektor dar und fokussiert auf die Erfassung von Tastatureingaben.
\section{Anforderungen}
\section{Architektur}
\section{Implementierung}
\subsection{Hardware-Konfiguration}
\subsection{Software-Architektur}
\section{Test und Evaluation}
\section{Sicherheits- und Ethik-Aspekte}
\section{Fazit}
% Kapitel 3
\chapter{C2 Server}
\label{chap:keyboard_emulation}
\chaptermark{}
\begin{flushright}
\textit{Von David Schwarzkopf}
\end{flushright}
\section{Einordnung}
\section{Konzept}
\section{Implementierung}
\subsection{Script-Design}
\subsection{Timing und Verzögerungen}
\subsection{Fehlerbehandlung}
\section{Test und Ergebnisse}
\section{Fazit}
% Kapitel 4
\chapter{Storage Emulation}
\label{chap:persistenz}
\chaptermark{Persistenzmechanismen und C2-Server}
\begin{flushright}
\textit{Von Magnus Küderli}
\end{flushright}
\section{Einordnung}
\section{Konzept}
\section{Implementierung}
\subsection{C2-Architektur}
\subsection{Kommunikationsprotokoll}
\subsection{Verschlüsselung}
\section{Test und Ergebnisse}
\section{Fazit}
% Fazit
\chapter{Fazit}
\label{chap:fazit}
\section{Zusammenfassung der Ergebnisse}
\section{Beitrag zur Sicherheitsforschung}
\section{Empfehlungen für Gegenmaßnahmen}
\section{Ausblick auf zukünftige Arbeiten}
% Anhang
\appendix
% \chapter{Code-Auszüge}
% \label{app:code}
% \chapter{Schaltpläne und Hardware}
% \label{app:hardware}
% \chapter{Literaturverzeichnis}
% \label{app:literatur}
\begin{thebibliography}{9}
\bibitem{rp2040} Raspberry Pi Foundation, ``RP2040 Datasheet'', 2021.
\bibitem{usb_hid} USB Implementers Forum, ``USB HID Usage Tables'', 2004.
\bibitem{offsec} Various Authors, ``Offensive Security Methodologies'', 2024.
\end{thebibliography}
\end{document}
+32
View File
@@ -0,0 +1,32 @@
% ============================================================
% Vorwort
% ============================================================
\chapter*{Vorwort}
\addcontentsline{toc}{chapter}{Vorwort}
\markboth{Vorwort}{Vorwort}
Diese Projektarbeit untersucht hardware-basierte Angriffsvektoren im Kontext vom Modul \textit{Offensive Security}.
Wir analysieren drei komplementäre Szenarien, die auf USB-basierter Keyboard-Emulation aufbauen und unterschiedliche
Sicherheitsaspekte beleuchten: Keylogging, Script-Ausführung und Persistenzmechanismen.
\vspace{0.5cm}
\textbf{Hinweis:} Alle beschriebenen Techniken werden ausschließlich zu Bildungszwecken und im Rahmen
ethisch vertretbarer Sicherheitsforschung analysiert.
\vspace{1cm}
\begin{flushright}
David Schwarzkopf, Magnus Küderli, David Heunisch\\
Esslingen am Neckar, Mai 2026
\end{flushright}
% ============================================================
% Grundlagen
% ============================================================
\chapter{Grundlagen}
\label{chap:basics}
\section{Some Section}
+212
View File
@@ -0,0 +1,212 @@
\documentclass[a4paper,11pt,twoside]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{booktabs}
\usepackage{array}
\usepackage{setspace}
\usepackage{geometry}
\usepackage[automark]{scrlayer-scrpage}
% Seitenränder
\geometry{
left=2.5cm,
right=2.5cm,
top=0.0cm,
bottom=2.0cm
}
% Zeilenabstand
\onehalfspacing
% Hyperref Konfiguration
\hypersetup{
colorlinks=true,
linkcolor=black,
filecolor=black,
urlcolor=blue,
citecolor=blue,
pdftitle={Offensive Sicherheit Hardware-basierte Angriffsvektoren},
pdfauthor={David Schwarzkopf, Magnus Küderli, David Heunisch}
}
% KOMA-Script Seitenstil
\clearpairofpagestyles
\ihead{\headmark}
\ohead{\pagemark}
\ifoot{}
\ofoot{}
\pagestyle{scrheadings}
% Chapter mark formatting
\renewcommand*{\chaptermarkformat}{\chapappifchapterprefix{\ }\thechapter\autodot\enskip}
\begin{document}
% ============================================================
% Mainpage
% ============================================================
\begin{titlepage}
\vspace*{1cm}
\begin{flushright}
\includegraphics[width=5cm]{assets/HE_Logo_4c.pdf}
\end{flushright}
\vspace*{2cm}
\begin{center}
{\Huge\bfseries Offensive Sicherheit\par}
\vspace{0.5cm}
{\Large\bfseries USB-basierte Angriffsvektoren\par}
\vspace{2cm}
{\large Wissenschaftliche Projektarbeit\par}
\vspace{2.5cm}
\begin{tabular}{ll}
\textbf{Autoren:} & David Heunisch \\
& David Schwarzkopf \\
& Magnus Küderli \\
\end{tabular}
\vspace{1.5cm}
\begin{tabular}{ll}
\textbf{Modul:} & Offensive Sicherheit \\
\textbf{Betreuer:} & Jonas Primbs \\
\textbf{Datum:} & SoSe 2026 \\
\end{tabular}
\vfill
{\large\itshape Esslingen am Neckar, Baden-Württemberg\par}
\end{center}
\vspace{1cm}
\end{titlepage}
% ============================================================
% Vorwort
% ============================================================
\chapter*{Vorwort}
\addcontentsline{toc}{chapter}{Vorwort}
\markboth{Vorwort}{Vorwort}
Diese Projektarbeit entstand im Rahmen des Moduls \textit{Offensive Security} und behandelt hardware-basierte Angriffsvektoren über USB-Geräte.
\vspace{0.5cm}
Im Mittelpunkt stehen drei Teilprojekte: ein C2-Szenario auf Basis eines Rubber-Ducky, die Emulation von USB-Geräten mit P4wnP1 sowie ein hardwarebasierter Keylogger. \\ Ziel der Arbeit ist es, diese Angriffsvektoren konkret zu implementieren und ihre sicherheitstechnische Relevanz anhand praktischer Beispiele aufzuzeigen
\vspace{0.5cm}
Dieses Handout behandelt dabei ausschließlich den theoretischen Teil. Die ausführliche technische Implementierung und Anweisungen zum Replizieren der Projekte sind in unserer Dokumentation zu finden unter \href{https://magnuskue.github.io/usb-attacks-book}{https://magnuskue.github.io/usb-attacks-book}.
\vspace{0.5cm}
\textbf{Hinweis:} Alle beschriebenen Methoden dienen ausschließlich zu Lehr- und Demonstrationszwecken im Rahmen einer kontrollierten Umgebung.
\vspace{1cm}
\begin{flushright}
David Schwarzkopf, Magnus Küderli, David Heunisch\\
Esslingen am Neckar, Mai 2026
\end{flushright}
% ============================================================
% Chapters
% ============================================================
\include{src/projects/rubber-ducky}
\include{src/projects/storage-emulation}
\include{src/projects/keylogger}
% ============================================================
% Fazit
% ============================================================
\chapter{Fazit}
\label{chap:fazit}
USB-Angriffe sind besonders tückisch, weil sie das blinde Vertrauen von Betriebssystemen gegenüber angeschlossener Hardware ausnutzen und Mitarbeiter durch soziale Manipulation unbewusst zum "`Opfer"' werden. Umso wichtiger ist der Einsatz gezielter technischer und organisatorischer Gegenmaßnahmen.
\section{Gegenmaßnahmen - auswahl}
\begin{itemize}
\item \textbf{USB-Sperrung: } USB-Ports werden per Gruppenrichtlinie, BIOS oder Device-Whitelisting deaktiviert bzw. eingeschränkt. Das verhindert sowohl HID-Angriffe (P4wnP1) als auch den Keylogger und den initialen C2-Infektionsvektor.
\item \textbf{Mitarbeiterschulung: } Sensibilisierung für das blinde Vertrauen in USB-Geräte. Ein als harmloser Stick getarntes Gerät kann gleichzeitig Tastatur, Speicher und Netzwerkadapter emulieren.
\item \textbf{Egress-Filtering: } Ausgehende Verbindungen zu unbekannten Servern werden durch eine Firewall blockiert und verhindern so die C2-Kommunikation von Sliver-Implanten.
\item \textbf{EDR-Software (Endpoint Detection \& Response): } Erkennt verdächtiges Prozessverhalten wie automatisch startende Binaries oder unbekannte Netzwerkverbindungen und unterbricht diese.
\item \textbf{Physische Sicherheit: } Kurzzeitiger physischer Zugang reicht für Keylogger- und HID-Angriffe aus kontrollierter Gerätezugang und Sichtschutz sind daher essenziell.
\end{itemize}
\section{Dokumentation und Quellcode}
Dokumentation, Implementierungsdetails und Quellcode finden Sie unter:
\begin{itemize}
\item[\textendash] \textbf{Projektdokumentation und Installationsguides} \\
\url{https://magnuskue.github.io/usb-attacks-book}
\item[\textendash] Quellcode für RP2040-basierten Keylogger \\
\url{https://git.magnusku.de/David_Heunisch/Keylogger}
\item[\textendash] Quellcode für RP2040-basierten Rubber-Ducky \\
\url{https://git.magnusku.de/Magnus/rubber-ducky}
\item[\textendash] Quellcode für P4wnP1 demo: "`Pokèmon Autoplay"' \\
\url{https://git.magnusku.de/Magnus/p4wnp1_gb_autoplay}
\end{itemize}
% ============================================================
% Anhang
% ============================================================
\appendix
% \chapter{Code-Auszüge}
% \label{app:code}
% \chapter{Schaltpläne und Hardware}
% \label{app:hardware}
% \chapter{Literaturverzeichnis}
% \label{app:literatur}
%~\cite{keylogger_adafruit_feather_overview}
\begin{thebibliography}{9}
\bibitem{keylogger_adafruit_feather_overview}
Adafruit, ``Adafruit Feather RP2040 with USB Type A Host - Overview,'' 2023. \\
\url{https://learn.adafruit.com/adafruit-feather-rp2040-with-usb-type-a-host/overview}
\bibitem{keylogger_adafruit_hid_remapper}
Adafruit, ``Adafruit TinyUSB Arduino - HID Remapper Example, last commit 2025. \\
\url{https://github.com/adafruit/Adafruit_TinyUSB_Arduino/blob/master/examples/DualRole/HID/hid_remapper/hid_remapper.ino}
\bibitem{keylogger_adafruit_case}
Adafruit, ``Case for Feather RP2040 USB Host - CAD Files,'' 2024. \\
\url{https://learn.adafruit.com/case-for-feather-rp2040-usb-host/cad-files}
\bibitem{Sliver_Repo}
Sliver Repository, last commit 2026. \\
\url{https://github.com/BishopFox/sliver}
\bibitem{P4wnP1_aloa}
P4wnP1 A.L.O.A. by MaMe82, github, last commit 2023 \\
\url{https://github.com/RoganDawes/P4wnP1_aloa}
\end{thebibliography}
\end{document}
+28
View File
@@ -0,0 +1,28 @@
\chapter{Keylogger}
\label{chap:keylogger}
\vspace{-4.0em}
\begin{flushright}
{\small\itshape Von David Heunisch}
\end{flushright}
Die Sicherheit von Benutzerdaten ist ein kritisches Anliegen in der IT. Eine häufig unterschätzte Bedrohung stellt dabei der Keylogger dar, ein Werkzeug zur Erfassung von Tastatureingaben.
\section{Einführung Keylogger}
Ein Keylogger erfasst jeden auf einer Tastatur eingegebenen Tastendruck und zeichnet Passwörter, Kreditkartennummern und private Nachrichten auf. Er funktioniert unsichtbar, indem er als Man-in-the-Middle (MitM)-Gerät zwischen der Tastatur und dem Computer positioniert ist.
\section{Angriffszenario}
Ein Angreifer verschafft sich kurzzeitig physischen Zugang zu einem Gerät und installiert den Keylogger in der Tastaturleitung. Nach mehreren Tagen stiller Aufzeichnung von Tastenanschlägen ruft der Angreifer das Gerät ab und extrahiert die erfassten Daten zur Analyse. Dieser Ansatz erfordert keine Softwareinstallation und hinterlässt minimale Spuren. Besonders in öffentlich zugänglichen Umgebungen oder an gemeinsam genutzten Arbeitsplätzen stellt dieses Szenario ein erhebliches Risiko dar, da physische Manipulationen oft unbemerkt bleiben.
\section{Implementierung}
Verwendet wurde der \textbf{Adafruit RP2040 Feather} mit USB-Host-Funktionalität~\cite{keylogger_adafruit_feather_overview}. Das Gerät erfüllt folgende Funktionen:
\begin{itemize}
\item Es fängt alle HID-Tastaturssignale ab.
\item Alle Tastenanschläge werden im internen Flash-Speicher protokolliert.
\item Die Signale werden unverändert an den Host-Computer weitergeleitet.
\item Das System arbeitet vollständig transparent und verursacht keine erkennbaren Verzögerungen oder Unterbrechungen.
\end{itemize}
% Add a picture here :D
\subsection{Einrichtung}
Die Einrichtung beinhaltet das Flashen der Firmware über die Arduino IDE auf den RP2040 und das Konfigurieren einiger Parameter. Siehe die technische Dokumentation für detaillierte Einrichtungs- und Konfigurationsanweisungen. Zusätzlich müssen die USB-Host-Funktionalitäten korrekt initialisiert werden, damit die Kommunikation zwischen Tastatur und Zielsystem zuverlässig funktioniert.
\subsection{Datenspeicherung}
Tastenanschlag-Daten werden via LittleFS in eine Textdatei gespeichert. Die Datenextraktion erfolgt über das Auslesen des Serial-Buses per Skript. Die gespeicherten Daten können anschließend analysiert und nach sensiblen Informationen durchsucht werden, wobei insbesondere häufig verwendete Eingabemuster oder wiederkehrende Zeichenfolgen von Interesse sind.
+24
View File
@@ -0,0 +1,24 @@
\chapter{Rubber-Ducky \& Command and Control (C2)}
\label{chap:c2_handout}
\vspace{-1.0em}
\begin{flushright}
{\small\itshape Von David Schwarzkopf}
\end{flushright}
Dieses Kapitel behandelt den Rubber-Ducky als initialen Angriffsvektor sowie die anschließende Fernsteuerung des kompromittierten Systems über das C2-Framework Sliver.
\section{Einführung}
\subsection{Rubber-Ducky}
Ein Rubber-Ducky ist ein USB-Gerät, das sich gegenüber dem Betriebssystem als normale Tastatur ausgibt und automatisch vordefinierte Tastensequenzen ausführt -- für das Betriebssystem ist es nicht von einer echten Tastatur zu unterscheiden, weshalb keine zusätzlichen Treiber oder Benutzerinteraktion nötig sind.
\subsection{Command and Control (C2)}
Ein C2-Framework dient dazu, die Kontrolle über ein angegriffenes System aus der Ferne zu behalten. Wir verwenden \textbf{Sliver}~\cite{Sliver_Repo} -- ein quelloffenes Framework mit verschlüsselter Kommunikation über mTLS, HTTP(S) und DNS, das mehreren Operatoren gleichzeitig die Verwaltung verbundener Implantate ermöglicht.
\section{Praktisches Angriffsszenario}
\begin{enumerate}
\item \textbf{Infektion via HID-Injection:} Der Rubber-Ducky gibt sich als legitime USB-Tastatur aus und tippt automatisierte Befehle ein, um das Sliver-Implantat von unserer C2-Domain herunterzuladen und persistent zu installieren.
\item \textbf{Verbindung zu C2-Server:} Das Implantat startet unsichtbar im Hintergrund und baut über HTTPS eine verschlüsselte Verbindung zum \textit{Sliver-C2-Server} auf. Ab diesem Moment wird es automatisch bei jedem Systemstart mitgeladen.
\item \textbf{Interaktive Kontrolle:} Der Operator sieht die aktive Verbindung in der Sliver-Konsole und kann den infizierten Rechner anschließend aus der Ferne steuern und Daten abfragen.
\end{enumerate}
\section{Infrastruktur}
\begin{enumerate}
\item \textbf{Server:} Hier wird die zentrale Sliver-Software installiert und gestartet. Der Server läuft im Hintergrund, wartet auf eingehende Verbindungen und steuert die gesamte Logik.
\item \textbf{Client (Laptop):} Der Operator verbindet sich mit dem Steuerungs-Client auf seinem Laptop mit dem Server und gibt von hier die Befehle ein.
\item \textbf{Opfer-System:} Das erzeugte Implantat verbindet sich nach Ausführung zum Server zurück und trägt sich in den Autostart ein, sodass die C2-Verbindung nach jedem Neustart automatisch wiederhergestellt wird.
\end{enumerate}
@@ -0,0 +1,32 @@
\chapter{MSC und HID mit P4wnP1 a.l.o.a }
\label{chap:storage}
\vspace{-4.0em}
\begin{flushright}
{\small\itshape Von Magnus Küderli}
\end{flushright}
Dieses Kapitel behandelt, wie ein Raspberry Pi (Single-Board-Computer) gleichzeitig als Tastatur und Speichermedium auftreten kann und welche Angriffsvektoren sich daraus ergeben.
\section{Einführung P4wnP1 a.l.o.a}
P4wnP1 a.l.o.a~\cite{P4wnP1_aloa} ("`A Little Offensive Appliance"') ist eine modifizierte Version von Kali Linux für den Raspberry Pi Zero W der ersten Generation. Es verwandelt die Hardware in eine Penetration-Testing-Toolbox für Netzwerk, Bluetooth und USB. Letzteres machen wir uns für dieses Projekt zunutze.
\section{USB Protokoll}
Im Linux \textbf{USB Gadget Mode} verhält sich der Raspberry Pi als USB-Gerät und nicht als Host. Über das Linux \textit{USB Gadget Framework} werden USB-Funktionen definiert:
\begin{itemize}
\item \textbf{Human Interface Device (HID)} $\rightarrow$ Für Tastatur, Maus, Controller etc.
\item \textbf{Mass Storage Class (MSC)} $\rightarrow$ Für Speichermedien
\end{itemize}
Diese werden dem Betriebssystem über sogenannte \textit{USB-Deskriptoren} bereitgestellt. \\[4px]
Diese Funktionen werden über sogenannte \textit{USB Interfaces} adressiert. Der Host bindet anhand der Deskriptoren jedes Interface an den passenden Treiber.
\section{HID und Storage Emulation}
So kann ein einzelnes USB Gerät gleichzeitig mehrere Funktionen bereitstellen ("`\textbf{Composite Device}"'). Beispielsweise kann der P4wnP1 gleichzeitig Tastatur, Maus, Speichermedium und Ethernet Anschluss emulieren. \\[4px]
Das ermöglicht erweiterte Angriffsvektoren:
\begin{itemize}
\item \textbf{Bessere Tarnung} $\rightarrow$ Wenn ein als USB-Stick getarntes RubberDucky-Gerät wie erwartet als Massenspeicher funktioniert, erregt es weniger Verdacht. Außerdem können interessant aussehende Dateien präsentiert werden, welche vom Angriff ablenken.
\item \textbf{Interner Zugriff auf Dateien} $\rightarrow$ HID-Angriffe können auf vom USB-Gerät bereitgestellte Dateien zugreifen (z.\,B. Binärdateien oder Skripte zur schnellen Ausführung). Dies funktioniert auch offline und geht schneller als Eintippen oder Herunterladen.
\end{itemize}
\section{Demo: Pok\'emon Autoplay}
Das Demo-Projekt zeigt, wie ein P4wnP1 auf dem Zielsystem automatisiert einen GameBoy Emulator mit Spiel aus seinem Massenspeicher lädt, startet und steuert. Technische Details sind in der Projektdokumentation zu finden.
+13
View File
@@ -0,0 +1,13 @@
.PHONY: all
all:
@mkdir -p build
$(MAKE) -C ./Handout/
$(MAKE) -C ./Slides/
@cp ./Handout/build/main.pdf build/handout.pdf
@cp ./Slides/build/main.pdf build/slides.pdf
clean:
@rm ./Handout/build -r
@rm ./Slides/build -r
@rm ./build -r
+19
View File
@@ -0,0 +1,19 @@
.PHONY: watch build clean stop view ls quickstart
FILE=src/main.tex
build:
sudo docker compose run --rm latex latexmk -pdf -interaction=nonstopmode -output-directory=build $(FILE)
watch:
sudo docker compose run --rm latex latexmk -pvc -pdf -interaction=nonstopmode -output-directory=build $(FILE) > /dev/null 2>&1 &
view:
xdg-open build/main.pdf > /dev/null 2>&1 &
ls:
sudo docker compose ls
stop:
sudo docker compose down --remove-orphans --volumes
quickstart: watch view
clean:
rm -rf build/*
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

+6
View File
@@ -0,0 +1,6 @@
services:
latex:
image: texlive/texlive
volumes:
- .:/workspace
working_dir: /workspace
+595
View File
@@ -0,0 +1,595 @@
\documentclass[9pt]{beamer}
% aspectratio=169 ???
\usepackage[sfdefault]{roboto}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{src/styles/fluxmacros}
\usefolder{src/styles}
\usetheme[style=asphalt]{flux}
\usepackage{booktabs}
\usepackage{colortbl}
\usepackage{ragged2e}
\usepackage{fontawesome5}
\providecommand{\faShieldAlt}{\faShield*}
\providecommand{\faNetworkWired}{\faProjectDiagram}
\title{USB-basierte Angriffsvektoren}
\subtitle{Offensive Sicherheit · SoSe 2026}
\author{David Schwarzkopf \and Magnus Küderli \and David Heunisch}
\institute{Hochschule Esslingen}
\date{\today}
\titlegraphic{assets/HE_Logo_4c.pdf}
\begin{document}
% TITLE
\titlepage
\begin{frame}{Vorwort}{}
{\Huge\textbf{Die drei Projekte:}}
\begin{columns}[T, onlytextwidth]
\column{0.31\textwidth}
\begin{block}{\textbf{1.} RubberDucky \& C2}
\begin{itemize}
\item Tastatur Emulator
\item Eigenkreation
\end{itemize}
\vspace{3px}
\end{block}
\column{0.31\textwidth}
\begin{block}{\textbf{2.} P4wnP1 a.l.o.a\vspace{1.8px}}
\begin{itemize}
\item Professionelles Tool
\item erweiterter Angriff
\end{itemize}
\vspace{3px}
\end{block}
\column{0.31\textwidth}
\begin{block}{\textbf{3.} Hardware-Keylogger}
\begin{itemize}
\item Tastatureingaben aufzeichnen und abrufen
\end{itemize}
\vspace{0px}
\end{block}
\end{columns}
\vspace{20pt}
\pause
{\Huge\textbf{Struktur:}}
\begin{columns}[T, onlytextwidth]
\column{0.31\textwidth}
\begin{exampleblock}{\faLayerGroup\ \ Folien}
\begin{itemize}
\item Theoretische Übersicht und live Demonstrationen
\end{itemize}
\vspace{2px}
\end{exampleblock}
\column{0.31\textwidth}
\begin{exampleblock}{\faFile\ \ Handout}
\begin{itemize}
\item Kompakte Theorie-Zusammenfassung
\end{itemize}
\vspace{9px}
\end{exampleblock}
\column{0.31\textwidth}
\begin{exampleblock}{\faBook\ \ Dokumentation}
\begin{itemize}
\item Technische Beschreibung und Impl.-Details
\end{itemize}
\end{exampleblock}
\end{columns}
\end{frame}
\begin{frame}{Gliederung}{}
\tableofcontents
\end{frame}
% ════════════════════════════════════════════════════════
\section{RubberDucky \& Command and Control (C2)}
\subsection{Einführung}
% ════════════════════════════════════════════════════════
\begin{frame}[plain]
\vfill
\centering
{\color{primary}\fontsize{40}{40}\bfseries\selectfont 01}\\[0.4cm]
{\Large\bfseries RubberDucky \& Command and Control}\\[0.3cm]
{\color{gray}\small Von David Schwarzkopf}
\vfill
\end{frame}
% ════════════════════════════════════════════════════════
% SECTION 1: RubberDucky & C2
% Logischer Aufbau:
% 1. Cover
% 2. Was ist ein RubberDucky? (Konzept + Hardware)
% 3. Was ist Sliver C2? (Konzept + Infrastruktur)
% 4. Wie hängt alles zusammen? (TikZ Diagramm)
% 5. Angriffsszenario (Schritte)
% 6. Sliver Befehle (Cheat-Sheet)
% ════════════════════════════════════════════════════════
% ── 2. RubberDucky: Konzept + Hardware ─────────────────
\begin{frame}{RubberDucky}{Konzept \& Hardware}
\begin{columns}[T, onlytextwidth]
\column{0.48\textwidth}
\begin{block}{\faUsb\ \ RubberDucky}
\begin{itemize}
\item Tarnt sich als USB-Tastatur
\item Emuliert Tastertur Eingaben
\item Kein zusätzlicher Treiber nötig
\item Für das OS nicht erkennbar
\end{itemize}
\vspace{0.2cm}
\end{block}
\vspace{-0.3cm}
\begin{block}{\faMicrochip\ \ Waveshare RP2040-One}
\begin{itemize}
\item RP2040 Mikrocontroller
\item USB-Stick Form-Faktor
\item CircuitPython Firmware
\vspace{0.4cm}
\end{itemize}
\end{block}
\column{0.48\textwidth}
\begin{block}{\faCamera\ \ Waveshare RP2040-One}
\begin{center}
\vspace{0.3cm}
\includegraphics[width=0.9\textwidth]{assets/rp2040_one.png}
\vspace{0.3cm}
\end{center}
\end{block}
\end{columns}
\end{frame}
\begin{frame}{C2 Server}{Konzept \& Infrastruktur}
\begin{columns}[T, onlytextwidth]
\column{0.48\textwidth}
\begin{block}{\faServer\ \ Was ist C2 Server (Sliver)?}
\begin{itemize}
\item Quelloffenes C2-Framework
\item Verschlüsselt: mTLS, HTTP(S), DNS
\item Multi-User fähig
\item Fernsteuerung von Implantaten
\end{itemize}
\end{block}
\vspace{-0.4cm}
\begin{block}{\faDocker\ \ Server-Setup (Docker)}
\begin{itemize}
\item Ubuntu 22.04 Container
\item Port 31337 (mTLS)
\item Traefik Reverse Proxy
\item Persistente Daten via Volume
\end{itemize}
\end{block}
\column{0.48\textwidth}
\begin{block}{\faTerminal\ \ Sliver Konsole}
\begin{center}
\vspace{0.3cm}
\includegraphics[width=0.9\textwidth, height=7cm, keepaspectratio]{assets/sliver_console.png}
\vspace{1.0cm}
\end{center}
\end{block}
\end{columns}
\end{frame}
%% ── 4. Infrastruktur-Diagramm ───────────────────────────
\subsection{Angriffsszenario}
\begin{frame}{RubberDucky \& C2}{Angriffsszenario / Infrastruktur-Übersicht}
\begin{exampleblock}{\faBolt\ \ Ablauf}
\begin{enumerate}
\item USB einstecken \quad
\item Implantat wird heruntergeladen\quad
\item Ferngesteuert via Verbindung durch Implantat\quad
\end{enumerate}
\end{exampleblock}
\pause
\vspace{0.2cm}
\centering
\begin{tikzpicture}[
box/.style={rectangle, rounded corners=4pt, minimum width=2.6cm,
minimum height=1.0cm, align=center, font=\small\bfseries},
arrow/.style={->, thick, color=primary, >=stealth}
]
\node[box, fill=primary, text=white] (ducky) at (0,0) {\faUsb\\[3pt] RubberDucky};
\node[box, fill=primary, text=white] (opfer) at (5,0) {\faSkull\\[3pt] Opfer-PC};
\node[box, fill=secondary, text=white] (server) at (5,-2.5) {\faServer\\[3pt] C2-Server};
\node[box, fill=secondary, text=white] (operator) at (0,-2.5) {\faLaptop\\[3pt] Operator};
\draw[arrow] (ducky) -- node[above, font=\tiny, text=black] {HID-Injection} (opfer);
\draw[arrow] (opfer) to[bend left=20] node[right, font=\tiny, text=black] {Ergebnisse} (server);
\draw[arrow] (server) to[bend left=20] node[left, font=\tiny, text=black] {Befehle} (opfer);
\draw[arrow] (operator) -- node[below, font=\tiny, text=black] {Befehle} (server);
\end{tikzpicture}
\end{frame}
\begin{frame}{Demo}{}
\centering
\href{https://youtu.be/lm1ksa7DBWQ}{\fontsize{60}{72}\selectfont \faYoutube\ \ DEMO }
\end{frame}
% ════════════════════════════════════════════════════════
\section{P4wnP1 a.l.o.a}
\subsection{Einführung}
% ════════════════════════════════════════════════════════
\begin{frame}[plain]
\vfill
\centering
{\color{primary}\fontsize{40}{40}\bfseries\selectfont 02}\\[0.4cm]
{\Large\bfseries MSC und HID mit P4wnP1 a.l.o.a}\\[0.3cm]
{\color{gray}\small Von Magnus Küderli}
\vfill
\end{frame}
\begin{frame}{P4wnP1 a.l.o.a}{Einführung}
\begin{columns}[T, onlytextwidth]
\column{0.48\textwidth}
\begin{block}{\faLinux\ \ P4wnP1 a.l.o.a}
\textbf{Übersicht:}
\begin{itemize}
\item FOSS projekt von MaMe82
\item Nicht mehr aktiv maintained!
\item Modifiziertes Kali Linux für RPi Zero W
\item Penetration-Testing-Toolbox
\end{itemize}
\vspace{8px}
\textbf{Ein paar Features:}
\begin{itemize}
\item USB, Ethernet, WiFi und Bluetooth Schnittstellen für Kali
\item HID injection und Mass Storage emulation
\item Web UI und CLI zur Steuerung
\end{itemize}
\end{block}
\column{0.48\textwidth}
\begin{block}{\faRaspberryPi\ \ Beispielbild}
\vspace{14 px}
\begin{figure}
\centering
\includegraphics[width=0.9\linewidth]{assets/pi_usb.png}
\label{fig:placeholder}
\end{figure}
\vspace{14 px}
\centering
{\LARGE\textbf{"`Kali Linux on a Stick"'}}
\vspace{8 px}
\end{block}
\end{columns}
\end{frame}
\begin{frame}{P4wnP1 a.l.o.a}{USB Protokoll basics}
\begin{columns}[T, onlytextwidth]
\column{0.48\textwidth}
\begin{tikzpicture}[
box/.style={
rectangle,
rounded corners=4pt,
minimum width=3.0cm,
minimum height=1.0cm,
align=center,
font=\small\bfseries
},
arrow/.style={->, thick, color=primary},
]
% Nodes
\node[box, fill=primary, text=white] (host) at (0,4)
{\faDesktop\\[3pt] HOST};
\node[box, fill=secondary, text=white] (usb) at (0,2)
{\faUsb\\[3pt] USB-Gerät};
\node[box, fill=secondary, text=white] (hid) at (-2,0)
{Interface 0\\HID};
\node[box, fill=secondary, text=white] (msc) at (2,0)
{Interface 1\\MSC};
\node[box, fill=primary, text=white] (hiddrv) at (-2,-2)
{\faCog\ \ HID-Treiber};
\node[box, fill=primary, text=white] (mscdrv) at (2,-2)
{\faCog\ \ MSC-Treiber};
% Arrows
\draw[arrow] (host) to[bend left=15]
node[midway, auto, font=\tiny] {Enumeration} (usb);
\draw[arrow] (usb) to[bend left=15]
node[midway, xshift=-35pt, auto, swap, font=\tiny] {Deskriptoren}
node[right, xshift=-2pt, auto, swap, font=\tiny] {EP0} (host);
\draw[arrow] (usb) -- node[left,font=\tiny,text=black]
{I/F 0} (hid);
\draw[arrow] (usb) -- node[right,font=\tiny,text=black]
{I/F 1} (msc);
\draw[arrow, <->] (hiddrv) -- node[left,font=\tiny,text=black]
{I/F0 EPn IN/OUT} (hid);
\draw[arrow, <->] (mscdrv) -- node[right,font=\tiny,text=black]
{I/F1 EPn IN/OUT} (msc);
% Caption
\node[font=\tiny, color=gray] at (0,-3.2)
{USB Composite Device mit HID- und MSC-Interface};
\end{tikzpicture}
\pause
\column{0.48\textwidth}
\begin{block}{\faTag\ \ \textbf{Deskriptoren}}
\begin{enumerate}
\item Device: \textit{VID, PID, Dev. class(/0x00), ...}
\item Configuration: \textit{I/Fs mit Endpoints}
\end{enumerate}
\end{block}
\pause
\hspace*{1.8cm}
\begin{minipage}{0.66\linewidth}
\begin{block}{\faCube\ \ \textbf{Klassen}}
\begin{itemize}
\item \textbf{HID} $\rightarrow$ Human interface dev.
\item \textbf{MSC} $\rightarrow$ Mass Storage class
\end{itemize}
\end{block}
\end{minipage}
\pause
\hspace*{1.8cm}
\begin{minipage}{0.66\linewidth}
\begin{block}{\faCube\ \ \textbf{Composite Device}}
\begin{itemize}
\item Device klasse auf 0x00 \\$\rightarrow$ klasse per I/F def.
\item Host verbindet I/Fs mit jeweiligen Treibern
\end{itemize}
\end{block}
\end{minipage}
\end{columns}
\end{frame}
\begin{frame}{P4wnP1 a.l.o.a}{Angriffsvektoren}
\begin{block}{\faBolt\ \ \textbf{MSC} als Erweiterung einer \textbf{HID}-Attacke }
\begin{itemize}
\item \textbf{Ablenkung} $\rightarrow$ präsentiert harmlose, interessante Dateien
\item \textbf{Offline} $\rightarrow$ Payload muss nicht heruntergeladen werden
\item \textbf{Schnell} $\rightarrow$ direkter Zugriff auf Dateien/Skripts aus dem Gerät
\item \textbf{Payload} $\rightarrow$ Binärdateien sind einfach mitlieferbar
\end{itemize}
\end{block}
\end{frame}
\subsection{Demo}
\begin{frame}{P4wnP1 a.l.o.a}{Demo Projekt}
\begin{exampleblock}{\faGamepad\ \ Was gleich passiert}
\begin{itemize}
\item P4wnP1 lädt GameBoy-Emulator und ROM vom eigenen Massenspeicher
\item Startet Emulator automatisch via HID auf dem Zielsystem
\item Steuert das Spiel mittels einprogrammierter Tastenfolge vollautomatisch
\end{itemize}
\end{exampleblock}
\vspace{0.3cm}
\pause
\begin{block}{\faInfoCircle\ \ Ziel der Demo}
\begin{itemize}
\item Die Fähigkeiten eines Composite-Device (HID + MSC) zeigen
\end{itemize}
\end{block}
\end{frame}
\begin{frame}{Demo}{}
\centering
\href{https://www.youtube.com/watch?v=b_qk4emnQCQ}{\fontsize{60}{72}\selectfont \faYoutube\ \ DEMO }
\end{frame}
% ════════════════════════════════════════════════════════
\section{Hardware-Keylogger}
\subsection{Einführung}
% ════════════════════════════════════════════════════════
\begin{frame}[plain]
\vfill
\centering
{\color{primary}\fontsize{40}{40}\bfseries\selectfont 03}\\[0.4cm]
{\Large\bfseries Hardware-Keylogger}\\[0.3cm]
{\color{gray}\small Von David Heunisch}
\vfill
\end{frame}
\begin{frame}{Hardware-Keylogger}{Einführung}
\begin{block}{\faKeyboard\ \ Der Keylogger}
\begin{itemize}
\item MitM zwischen Tastatur und PC
\item Schneidet Tastenanschläge mit
\item "`Unsichtbar"' für das Betriebssystem
\end{itemize}
\end{block}
\end{frame}
\begin{frame}{Hardware-Keylogger}{Angriffsvektor}
\begin{exampleblock}{\faBolt\ \ Angriffsszenario}
\begin{itemize}
\item Kurzer physischer Zugang reicht.
\item Gerät wird inline zwischen Tastatur und Zielsystem gesteckt.
\item Tastenanschläge werden unbemerkt aufgezeichnet.
\item Keine Softwareinstallation auf dem Zielsystem nötig.
\item Wenige sichtbare Spuren, besonders bei unauffälligem Gehäuse.
\end{itemize}
\end{exampleblock}
\pause
\vspace{1.0cm}
\centering
\resizebox{0.95\textwidth}{!}{%
\begin{tikzpicture}[
box/.style={rectangle, rounded corners=4pt, minimum width=3.0cm,
minimum height=1.0cm, align=center, font=\small\bfseries},
arrow/.style={->, thick, color=primary}
]
\node[box, fill=primary, text=white] (keyboard) at (0,0) {\faKeyboard\\[3pt] Keyboard};
\node[box, fill=secondary, text=white] (keylogger) at (6,0) {\faEye\\[3pt] Keylogger};
\node[box, fill=primary, text=white] (device) at (12,0) {\faDesktop\\[3pt] Device};
\draw[arrow] (keyboard) -- node[above, font=\footnotesize, text=black]
{Keystroke} (keylogger);
\draw[arrow] (keylogger) -- node[above, font=\footnotesize, text=black]
{Forward Input} (device);
\end{tikzpicture}%
}
\end{frame}
\subsection{Implementierung}
\begin{frame}{Hardware-Keylogger}{Implementierung}
\begin{columns}[T, onlytextwidth]
\column{0.48\textwidth}
\begin{block}{\faMicrochip\ \ Hardware}
\begin{itemize}
\item Adafruit RP2040 Feather mit USB-Host
\item USB-Host-Funktionalität für Tastaturen
\item Fängt HID-Signale ab
\item Leitet sie unverändert weiter
\end{itemize}
\vspace{2.78cm}
\end{block}
\column{0.48\textwidth}
\begin{block}{\faRaspberryPi\ \ Beispielbild}
\begin{figure}
\centering
\includegraphics[width=0.9\linewidth]{assets/feather-rp2040-mikrocontroller-und-usb-a-host-board-adafruit-5723.png}
\end{figure}
\end{block}
\end{columns}
\end{frame}
\begin{frame}{Hardware-Keylogger}{Speicherung}
\begin{columns}[T, onlytextwidth]
\column{0.48\textwidth}
\begin{block}{\faDatabase\ \ Speicherung und Analyse}
\begin{itemize}
\item Speicherung im internen Flash (LittleFS)
\item Extraktion per Python-Script
\item Analyse der gewonnenen Daten
\end{itemize}
\vspace{1.85cm}
\end{block}
\column{0.48\textwidth}
\begin{block}{\faTerminal\ \ Auslesesoftware}
\begin{figure}
\centering
\includegraphics[width=0.9\linewidth]{assets/blink_reader.png}
\end{figure}
\end{block}
\end{columns}
\end{frame}
\begin{frame}{Demo}{}
\centering
\href{https://www.youtube.com/watch?v=cg_6QUZIbRU}{\fontsize{60}{72}\selectfont \faYoutube\ \ DEMO }
\end{frame}
% ════════════════════════════════════════════════════════
\section{Gegenmaßnahmen \& Fazit}
\subsection{Gegenmaßnahmen}
% ════════════════════════════════════════════════════════
\begin{frame}[plain]
\vfill
\centering
{\color{primary}\fontsize{40}{40}\bfseries\selectfont 04}\\[0.4cm]
{\Large\bfseries Gegenmaßnahmen \& Fazit}\\[0.3cm]
{\color{gray}\small Alle}
\vfill
\end{frame}
\begin{frame}{Gegenmaßnahmen}{}
\begin{columns}[T, onlytextwidth]
\column{0.48\textwidth}
\begin{block}{\faBan\ \ USB-Sperrung}
\begin{itemize}
\item Gruppenrichtlinie / BIOS
\item Device-Whitelisting
\end{itemize}
\end{block}
\vspace{0.2cm}
\begin{block}{\faShield*\ \ EDR-Software}
\begin{itemize}
\item Erkennt verdächtige Prozesse
\item Blockiert unbekannte Binaries
\end{itemize}
\end{block}
\column{0.48\textwidth}
\begin{block}{\faProjectDiagram\ \ Egress-Filtering}
\begin{itemize}
\item Firewall blockt C2-Kommunikation
\item Unbekannte Server gesperrt
\end{itemize}
\end{block}
\vspace{0.2cm}
\begin{block}{\faLock\ \ Physische Sicherheit}
\begin{itemize}
\item Kontrollierter Gerätezugang
\item Mitarbeiterschulung
\end{itemize}
\end{block}
\end{columns}
\end{frame}
\subsection{Fazit}
\begin{frame}{Fazit}{}
\begin{block}{\faChevronRight\ \ Kernaussagen}
\begin{itemize}
\item Einfache Hardware — großer Schaden
\item HID + MSC + C2 kombiniert besonders mächtig
\item Prävention braucht technische \textbf{und} organisatorische Maßnahmen
\end{itemize}
\end{block}
\vspace{0.3cm}
\begin{exampleblock}{\faLink\ \ Dokumentation}
\centering\textbf{https://magnuskue.github.io/usb-attacks-book}
\end{exampleblock}
\end{frame}
\end{document}
+108
View File
@@ -0,0 +1,108 @@
% Copyright (c) 2018 by P. Vanberg
% https://github.com/pvanberg/flux-beamer
%
% This program 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.
%
% This program 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 can find the GNU General Public License at <http://www.gnu.org/licenses/>.
\mode<presentation>
\usepackage{xcolor}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Color palette
\definecolor{background}{HTML}{fafafa}
\definecolor{Gray}{HTML}{858b8f}
\definecolor{text}{HTML}{4F5D66}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Main color
\DeclareOptionBeamer{style}{\def\beamer@mytheme@style{#1}}
\ExecuteOptionsBeamer{style=asphalt} %default
\ProcessOptionsBeamer
\def\beamer@mytheme@stylegreen{green}%
\def\beamer@mytheme@styleblue{blue}%
\def\beamer@mytheme@stylered{red}%
\def\beamer@mytheme@stylegray{gray}%
\ifx\beamer@mytheme@style\beamer@mytheme@stylegreen%
% Green
\definecolor{primaryLight}{HTML}{77933c}
\definecolor{primary}{HTML}{4f622a}
\definecolor{secondary}{HTML}{884F4D}
\definecolor{tertiary}{HTML}{2B3234}
\else\ifx\beamer@mytheme@style\beamer@mytheme@stylered%
% Red
\definecolor{primaryLight}{HTML}{C0392B}
\definecolor{primary}{HTML}{96281B}
\definecolor{secondary}{HTML}{347986}
\definecolor{tertiary}{HTML}{56423e}
\else\ifx\beamer@mytheme@style\beamer@mytheme@styleblue%
% Blue
\definecolor{primaryLight}{HTML}{3a99d9}
\definecolor{primary}{HTML}{2e81b7}
\definecolor{secondary}{HTML}{2e81b7}
\definecolor{tertiary}{HTML}{e76d55}
\else\ifx\beamer@mytheme@style\beamer@mytheme@stylegray%
% Gray
\definecolor{primaryLight}{HTML}{616161}
\definecolor{primary}{HTML}{424242}
\definecolor{secondary}{HTML}{518071}
\definecolor{tertiary}{HTML}{8b7687}
\else%
% Asphalt by default
\definecolor{primaryLight}{HTML}{34495e}
\definecolor{primary}{HTML}{2d3e50}
\definecolor{secondary}{HTML}{d15306}
\definecolor{tertiary}{HTML}{35837b}
\fi\fi\fi%
\fi%
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Colors
\setbeamercolor*{background canvas}{bg=background}
\setbeamercolor*{footer}{fg=Gray!50}
\setbeamercolor*{footer text}{fg=Gray}
\setbeamercolor*{header title}{fg=primaryLight!20}
\setbeamercolor*{header primary}{fg=white,bg=primaryLight}
\setbeamercolor*{header secondary}{fg=white,bg=primary}
\setbeamercolor*{secondary}{fg=secondary!10,bg=secondary}
\setbeamercolor*{example text}{fg=tertiary}
\setbeamercolor*{normal text}{fg=text}
\setbeamercolor*{alerted text}{fg=secondary}
\setbeamercolor*{itemize item}{fg=primary}
\setbeamercolor*{itemize subitem}{fg=primary}
\setbeamercolor*{itemize subsubitem}{fg=primary}
\setbeamercolor*{enumerate item}{fg=primary}
\setbeamercolor*{enumerate subitem}{fg=primary}
\setbeamercolor*{enumerate subsubitem}{fg=primary}
\setbeamercolor*{description item}{fg=primary}
\setbeamercolor*{caption name}{fg=primary}
% Default block
\setbeamercolor{block title}{bg=primaryLight, fg=background}%
\setbeamercolor{block body}{bg=normal text.bg!90!fg}%
\setbeamercolor{block title alerted}{bg=secondary!80, fg=background}%
\setbeamercolor{block body alerted}{bg=normal text.bg!90!fg}%
\setbeamercolor{block title example}{bg=example text.fg!80, fg=background}%
\setbeamercolor{block body example}{bg=normal text.bg!90!fg}%
% Bibliography
\setbeamercolor*{bibliography entry author}{fg=primary}
\setbeamercolor*{bibliography entry title}{fg=text}
\setbeamercolor*{bibliography entry location}{fg=text}
\setbeamercolor*{bibliography entry note}{fg=text}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\mode<all>
+43
View File
@@ -0,0 +1,43 @@
% Copyright (c) 2018 by P. Vanberg
% https://github.com/pvanberg/flux-beamer
%
% This program 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.
%
% This program 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 can find the GNU General Public License at <http://www.gnu.org/licenses/>.
\mode<presentation>
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Fonts
\setbeamerfont*{projected text}{size=\normalsize}
\setbeamerfont*{header title}{size=\Large,series=\bfseries}
\setbeamerfont*{header subtitle}{size=\normalsize}
\setbeamerfont*{toc title}{size=\normalsize,series=\bfseries}
\setbeamerfont*{toc subtitle}{size=\small}
\setbeamerfont*{title}{size=\Huge,series=\bfseries}
\setbeamerfont*{subtitle}{size=\Large,series=\bfseries}
\setbeamerfont*{author}{size=\large,series=\normalfont}
\setbeamerfont*{institute}{size=\large,series=\normalfont}
\setbeamerfont*{date}{size=\scriptsize,series=\itshape}
\setbeamerfont*{footnote}{size=\fontsize{6}{6}}
\setbeamerfont*{bibliography entry author}{size=\normalsize,series=\normalfont}
\setbeamerfont*{bibliography entry title}{size=\normalsize,series=\bfseries}
\setbeamerfont*{bibliography entry location}{size=\small,series=\normalfont}
\setbeamerfont*{bibliography entry note}{size=\small,series=\normalfont}
\setbeamerfont*{block title}{size=\normalsize}
\setbeamerfont*{block body}{size=\small}
\setbeamerfont*{block title example}{size=\normalsize}
\setbeamerfont*{block body example}{size=\small}
\setbeamerfont*{block title alerted}{size=\normalsize}
\setbeamerfont*{block body alerted}{size=\small}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\mode<all>
+183
View File
@@ -0,0 +1,183 @@
% Copyright (c) 2018 by P. Vanberg
% https://github.com/pvanberg/flux-beamer
%
% This program 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.
%
% This program 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 can find the GNU General Public License at <http://www.gnu.org/licenses/>.
\mode<presentation>
\usepackage{tikz}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Table of Content
\tikzset{section number/.style={
circle,
fill=secondary,
minimum size=0.4em,
text=secondary!10,
inner sep=1.5pt,
},
section/.style={
draw=none,
rectangle,
minimum height=1em,
minimum width=0.8\textwidth,
text width=0.8\textwidth,
text=primaryLight,
align=left
},
subsection number/.style={
circle,
fill=Gray!50,
inner sep=0pt,
minimum size=0.15cm,
},
subsection/.style={
draw=none,
rectangle,
minimum height=1em,
minimum width=0.8\textwidth,
text width=0.8\textwidth,
text=text!80,
align=left
}
}
\setbeamertemplate{section in toc}{
\hspace*{0.4cm}\tikz[baseline=-0.5ex]\node[section number]{\textbf{\small\inserttocsectionnumber}};
\ \tikz[baseline=-0.5ex]\node[section]{\usebeamerfont*{toc title} \inserttocsection};\\[-0.3cm]
\hspace*{1.13cm}{\usebeamercolor*[fg]{footer} \rule{0.6\paperwidth}{0.2pt}\\\nointerlineskip}
}
\setbeamertemplate{subsection in toc}{
\hspace*{0.53cm}\tikz[baseline=-0.5ex]\node[subsection number]{};
\hspace*{0.5cm} \tikz[baseline=-0.5ex]\node[subsection]{\usebeamerfont*{toc subtitle}\inserttocsubsection};\\[-0.2cm]
}
\setbeamertemplate{section in toc shaded}{
\hspace*{0.4cm}\tikz[baseline=-0.5ex]\node[section number, fill=Gray!40, text=background]{\usebeamerfont*{toc subtitle}\textbf{\inserttocsectionnumber}};
\ \tikz[baseline=-0.5ex]\node[section, text=primaryLight!20]{\usebeamerfont*{toc title} \inserttocsection};\\[-0.3cm]
\hspace*{1.3cm}{\usebeamercolor*[fg]{footer} \rule{0.6\paperwidth}{0.2pt}\\\nointerlineskip}
}
\setbeamertemplate{subsection in toc shaded}{
\hspace*{0.55cm}\tikz[baseline=-0.5ex]\node[subsection number,fill=Gray!20]{};
\hspace*{0.5cm} \tikz[baseline=-0.5ex]\node[subsection, text=Gray!20]{};\\[-0.2cm]
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Itemize
\setbeamertemplate{itemize item}{$\bullet$}
\setbeamertemplate{itemize subitem}{$\bullet$}
\setbeamertemplate{itemize subsubitem}{$\bullet$}
\setlength{\parskip}{0.5em}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Example
\renewenvironment{example}[1]{
\textcolor{tertiary}{#1}
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Blocks
\def\beamer@blockstylenative{native}%
\def\beamer@blockstylenobackground{nobackground}%
\def\beamer@blockstylemetropolis{metropolis}%
\newcommand{\setblockstyle}[1]{
\def\beamer@blockstyle{#1}
\ifx\beamer@blockstyle\beamer@blockstylenobackground%
\setbeamercolor{block title}{fg= primaryLight,bg=background}%
\setbeamercolor{block body}{bg=background}%
\setbeamercolor{block title alerted}{fg=secondary,bg=background}%
\setbeamercolor{block body alerted}{bg=background}%
\setbeamercolor{block title example}{fg=tertiary,bg=background}%
\setbeamercolor{block body example}{bg=background}%
\else\ifx\beamer@blockstyle\beamer@blockstylemetropolis%
\setbeamercolor{block title}{use=normal text,fg=primaryLight,bg=normal text.bg!80!fg}
\setbeamercolor{block body}{use={block title, normal text},bg=block title.bg!50!normal text.bg}
\setbeamercolor{block title alerted}{fg=secondary,bg=normal text.bg!80!fg}
\setbeamercolor{block body alerted}{use={block title, normal text},bg=block title.bg!50!normal text.bg}
\setbeamercolor{block title example}{fg=tertiary,bg=normal text.bg!80!fg}
\setbeamercolor{block body example}{use={block title, normal text},bg=block title.bg!50!normal text.bg}
\else%
\setbeamercolor{block title}{bg=primaryLight, fg=background}%
\setbeamercolor{block body}{bg=normal text.bg!90!fg}%
\setbeamercolor{block title alerted}{bg=secondary!80, fg=background}%
\setbeamercolor{block body alerted}{bg=normal text.bg!90!fg}%
\setbeamercolor{block title example}{bg=tertiary!80, fg=background}%
\setbeamercolor{block body example}{bg=normal text.bg!90!fg}%
\fi
\fi%
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Remove font dependency of blocks
\setbeamertemplate{block begin}
{
\par\vskip\medskipamount%
\begin{beamercolorbox}[colsep*=2mm]{block title}
\usebeamerfont*{block title}\insertblocktitle%
\end{beamercolorbox}%
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title}
{}
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[colsep*=2mm,vmode]{block body}%
\ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\setbeamertemplate{block example begin}
{
\par\vskip\medskipamount%
\begin{beamercolorbox}[colsep*=2mm]{block title example}
\usebeamerfont*{block title example}\insertblocktitle%
\end{beamercolorbox}%
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title example}
{}
{\ifbeamercolorempty[bg]{block body example}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body example}%
\begin{beamercolorbox}[colsep*=2mm,vmode]{block body example}%
\ifbeamercolorempty[bg]{block body example}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\setbeamertemplate{block alerted begin}
{
\par\vskip\medskipamount%
\begin{beamercolorbox}[colsep*=2mm]{block title alerted}
\usebeamerfont*{block title alerted}\insertblocktitle%
\end{beamercolorbox}%
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title alerted}
{}
{\ifbeamercolorempty[bg]{block body alerted}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body alerted}%
\begin{beamercolorbox}[colsep*=2mm,vmode]{block body alerted}%
\ifbeamercolorempty[bg]{block body alerted}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Bibliography
\setbeamertemplate{bibliography item}{
\usebeamercolor[bg]{secondary}\insertbiblabel
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\mode<all>
+152
View File
@@ -0,0 +1,152 @@
% Copyright (c) 2018 by P. Vanberg
% https://github.com/pvanberg/flux-beamer
%
% This program 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.
%
% This program 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 can find the GNU General Public License at <http://www.gnu.org/licenses/>.
\mode<presentation>
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Disclaimer: the "%" symbols inside hbox are all very important here.
% The \hbox enviroment will insert spaces whenever there's whitespace
% Adding a % at the END of each line ensures that any hard returns aren't
% interpreted as white space. This allows the color boxes to be flush against
% one another. If a faint white line appears one could probably do something like
% hspace{-1px} and add an additional pixel-or-two wide beamercolorbox.
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Header
\setbeamertemplate{frametitle}
{
\nointerlineskip
\begin{beamercolorbox}[wd=\paperwidth,leftskip=0.2cm,ht=0.6cm,dp=0.25cm]{header primary}%
\usebeamerfont{header title}\insertframetitle \
{\usebeamercolor*[fg]{header title}\usebeamerfont{header subtitle}\insertframesubtitle}
\hfill
\begin{beamercolorbox}[wd=0.2\paperwidth,ht=0.6cm,dp=0.25cm, left]{header title}%
\includegraphics[width=0.25\paperwidth, height=0.55cm, keepaspectratio]{\inserttitlegraphic}%
\vspace{-0.1cm}
\end{beamercolorbox}%
\end{beamercolorbox}%
\nointerlineskip
% Header shadowing
\pgfdeclareverticalshading{beamer@topshade}{\paperwidth}{%
color(3pt)=(primaryLight!0);
color(4pt)=(primaryLight)}
\begin{beamercolorbox}[wd=\paperwidth, center]{}%
\pgfuseshading{beamer@topshade}
\end{beamercolorbox}%
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Footer
\setbeamertemplate{footline}
{%
\begin{beamercolorbox}[wd=\textwidth, center]{footer}%
\rule{0.95\paperwidth}{0.2pt}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=\textwidth, leftskip=0.3cm,rightskip=0.3cm, ht=0.3cm,dp=0.15cm]{footer text}%
\usebeamerfont{footnote}\copyright \ \insertauthor\hfill
% Uncomment to display navigation button
%\insertslidenavigationsymbol%
%\insertframenavigationsymbol%
%\insertsubsectionnavigationsymbol%
%\insertsectionnavigationsymbol%
%\insertdocnavigationsymbol%
%\insertbackfindforwardnavigationsymbol%
\hfill\insertframenumber%
\end{beamercolorbox}%
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Custom footnote
\hfuzz=\maxdimen % Remove warning hbox overfull (TODO)
\renewcommand\footnoterule{\color{Gray!50}\hspace*{-0.5cm}\rule{0.95\paperwidth}{0.2pt}\vspace*{0.07cm}}
\setbeamertemplate{footnote}{
\begin{beamercolorbox}[wd=\textwidth, leftskip=0.3cm,rightskip=0.3cm]{footer text}%
\usebeamerfont{footnote}\insertfootnotemark\insertfootnotetext
\end{beamercolorbox}%
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Title Page
\def\titlepage{\usebeamertemplate{title page}}
\def\logo@width{0.15\paperwidth}
\def\logo@height{0.11\paperheight}
\tikzset{
sider/.style={
draw=none,
rectangle,
outer xsep=-0.1mm,
minimum height=\paperheight,
minimum width=0.8cm,
fill=primaryLight
},
icon/.style={
draw=none,
fill=primaryLight!95,
minimum height=\logo@height,
minimum width=\logo@width,
text=background,
outer xsep=0.4cm,
outer ysep=0.4cm,
inner sep=0.3cm,
%rounded corners=\logo@height/2
}
}
\setbeamertemplate{title page}
{
\begin{frame}[plain]
\begin{tikzpicture}[remember picture,overlay]
\hspace*{-1pt}\node[anchor=west,sider] at (current page.west){};
\node[anchor=south west,sider, fill=primary, minimum height=0.3\paperheight] at (current page.south west){};
\node[align=center] at (current page.center){
\usebeamerfont{title}\color{primary}\inserttitle\\[0.3cm]
\usebeamerfont{subtitle}\color{Gray!90!black}\insertsubtitle\\[0.1cm]
\usebeamercolor[fg]{footer}\rule{0.7\paperwidth}{0.2pt} \\[0.35cm]
\usebeamerfont{author}\color{Gray}\insertauthor\\[0.3cm]
\usebeamerfont{institute}\color{Gray}\insertinstitute
};
%\node[anchor=south,outer ysep=0.4cm] at (current page.south){\small\color{Gray!90}\insertdate};
%\node[anchor=south east,icon] at (current page.south east)(logo){\includegraphics[width=\logo@width, height=\logo@height, keepaspectratio]{\inserttitlegraphic}};
\end{tikzpicture}
\end{frame}
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% TOC frame on new section
\AtBeginSection[]
{
\setbeamertemplate{section in toc}{
\hspace*{0.4cm}\tikz[baseline=-0.5ex]\node[section number]{\usebeamerfont*{toc subtitle}\textbf{\inserttocsectionnumber}};
\ \ \tikz[baseline=-0.5ex]\node[section]{\normalsize \textbf{\inserttocsection}};\\[-0.3cm]
\hspace*{1.24cm}{\usebeamercolor*[fg]{footer} \rule{0.6\paperwidth}{0.2pt}\\\nointerlineskip}
}
\setbeamertemplate{subsection in toc}{
\hspace*{0.55cm}\tikz[baseline=-0.5ex]\node[subsection number, fill=secondary!80]{};
\hspace*{0.5cm} \tikz[baseline=-0.5ex]\node[subsection]{\normalsize\inserttocsubsection};\\[-0.2cm]
}
% Uncomment here to activate new page with section.
%\begin{frame}{\hspace{0.5cm}}
% \tableofcontents[currentsection]
%\end{frame}
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\mode<all>
+45
View File
@@ -0,0 +1,45 @@
% Copyright (c) 2018 by P. Vanberg
% https://github.com/pvanberg/flux-beamer
%
% This program 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.
%
% This program 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 can find the GNU General Public License at <http://www.gnu.org/licenses/>.
\mode<presentation>
\mode<presentation>
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Style passing argument
\DeclareOptionBeamer{style}{
\PassOptionsToPackage{style=#1}{styles/beamercolorthemeflux}
}
\ExecuteOptionsBeamer{style=asphalt}
\ProcessOptionsBeamer
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Settings
\usecolortheme{flux}
\usefonttheme{flux}
\useinnertheme{flux}
\useoutertheme{flux}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Hide navigation buttons
\setbeamertemplate{navigation symbols}{}
% Custom margins
\setbeamersize{text margin left=8mm,text margin right=8mm}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\mode<all>
+37
View File
@@ -0,0 +1,37 @@
% Copyright (c) 2018 by P. Vanberg
% https://github.com/pvanberg/flux-beamer
%
% This program 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.
%
% This program 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 can find the GNU General Public License at <http://www.gnu.org/licenses/>.
\mode<presentation>
\mode<presentation>
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Define folder tree
\def\beamer@calltheme#1#2#3{%
\def\beamer@themelist{#2}
\@for\beamer@themename:=\beamer@themelist\do
{\usepackage[{#1}]{\beamer@themelocation/#3\beamer@themename}}}
\def\usefolder#1{
\def\beamer@themelocation{#1}
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Choose color theme
\newcommand{\setThemeColor}[1]{\def\themeColor{#1}}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\mode<all>
+332
View File
@@ -0,0 +1,332 @@
\documentclass[9pt]{beamer}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Use roboto Font (recommended)
\usepackage[sfdefault]{roboto}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Define where theme files are located. ('/styles')
\usepackage{styles/fluxmacros}
\usefolder{styles}
% Use Flux theme v0.1 beta
% Available style: asphalt, blue, red, green, gray
\usetheme[style=asphalt]{flux}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Extra packages for the demo:
\usepackage{booktabs}
\usepackage{colortbl}
\usepackage{ragged2e}
\usepackage{schemabloc}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% Informations
\title{Offensive Sicherheit}
\subtitle{USB-basierte Angriffsvektoren}
\author{David Schwarzkopf \ Magnus Kürderli}
\institute{Institute, location}
\date{\today}
\titlegraphic{assets/overleaf.png}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\begin{document}
% Generate title page
\titlepage
\begin{frame}
\frametitle{Table of contents}
\tableofcontents
\end{frame}
\section{Presentation}
\subsection{introduction}
\begin{frame}{Flux}{introduction}
\justifying
Flux is a modern style beamer presentation. It is provided as a work in progress version and may suffer from inconsistencies. Sources and complementary information are available at\\[0.3cm]
\centering\textbf{github.com/pvanberg/flux-beamer}
\end{frame}
\def\beamer@mytheme@style{green}
\begin{frame}[fragile]{Flux}{colors}
\centering
Flux provides five differents color palettes.\\
\verb+\usetheme[style=asphalt]{flux}+\\[0.8cm]
\newcommand{\colorRow}[1]{
\begin{tabular}{p{4cm}cccc}
#1 & \cellcolor{primary}\hspace*{1cm} &\cellcolor{primaryLight}\hspace*{1cm}&\cellcolor{secondary}\hspace*{1cm}&\cellcolor{tertiary}\hspace*{1cm}\\
\end{tabular}
}
\colorRow{Asphalt}\\[0.3cm]
\definecolor{primaryLight}{HTML}{3a99d9}
\definecolor{primary}{HTML}{2e81b7}
\definecolor{secondary}{HTML}{2e81b7}
\definecolor{tertiary}{HTML}{e76d55}
\colorRow{Blue}\\[0.3cm]
\definecolor{primaryLight}{HTML}{77933c}
\definecolor{primary}{HTML}{4f622a}
\definecolor{secondary}{HTML}{884F4D}
\definecolor{tertiary}{HTML}{2B3234}
\colorRow{Green}\\[0.3cm]
\definecolor{primaryLight}{HTML}{C0392B}
\definecolor{primary}{HTML}{96281B}
\definecolor{secondary}{HTML}{347986}
\definecolor{tertiary}{HTML}{56423e}
\colorRow{Red}\\[0.3cm]
\definecolor{primaryLight}{HTML}{616161}
\definecolor{primary}{HTML}{424242}
\definecolor{secondary}{HTML}{518071}
\definecolor{tertiary}{HTML}{8b7687}
\colorRow{Gray}\\[0.3cm]
\end{frame}
\subsection{fonts}
\begin{frame}[fragile]{Flux}{fonts}
Flux recommends the use of Roboto or Overpass font and a font size of 9pt.\\[0.2cm]
\begin{center}
\verb+\documentclass[9pt]{beamer}+\\
\verb+\usepackage[sfdefault]{roboto}+
\end{center}
Flux also implements default typographies.
\begin{itemize}
\item Regular
\item \alert{Alert}
\item \example{Example}
\item \textit{Italic}
\item \textbf{Bold}
\end{itemize}
\end{frame}
\subsection{footnotes}
\begin{frame}{Flux}{footnotes}
Flux also includes custom footnote integration. For instance, this \textbf{element}\footnote{Footnotes are notes placed at the bottom of a page. They cite references or comment on a designated part of the text above it. For example, say you want to add an interesting comment to a sentence you have written, but the comment is not directly related to the argument of your paragraph. } and this \textbf{element}\footnote{Footnotes are not just for interesting comments, however. Sometimes they simply refer to relevant sources -- they let your reader know where certain material came from, or where they can look for other sources on the subject.} provide a footnote.
\end{frame}
\section{Collections}
\subsection{lists}
\begin{frame}{Flux}{lists}
\begin{columns}[T,onlytextwidth]
\column{0.33\textwidth}
\textbf{Items}
\begin{itemize}
\item Cats \item Dogs \item Birds
\end{itemize}
\column{0.33\textwidth}
\textbf{Enumerations}
\begin{enumerate}
\item First \item Second \item Last
\end{enumerate}
\column{0.33\textwidth}
\textbf{Descriptions}
\begin{description}
\item[Apples] Yes \item[Oranges] No \item[Grappes] No
\end{description}
\end{columns}
\let\thefootnote\relax\footnote{Note the following demo slides are directly taken from metropolis theme. Copyright 2014 Matthias Vogelgesang.\\
Give a look at https://github.com/matze/mtheme/tree/master/demo}
\end{frame}
\subsection{tables}
\begin{frame}{Flux}{tables}
\begin{table}
\caption{Largest cities in the world (source: Wikipedia)}
\begin{tabular}{@{} lr @{}}
\toprule
City & Population\\
\midrule
Mexico City & 20,116,842\\
Shanghai & 19,210,000\\
Peking & 15,796,450\\
Istanbul & 14,160,467\\
\bottomrule
\end{tabular}
\hspace*{1cm}
\setlength\extrarowheight{3pt}
\begin{tabular}{|lr|}
\hline
\rowcolor{primaryLight}\color{background}City & \color{background}Population\\
\hline
Mexico City & 20,116,842\\
Shanghai & 19,210,000\\
Peking & 15,796,450\\
Istanbul & 14,160,467\\
\hline
\end{tabular}
\end{table}
\end{frame}
\subsection{blocs}
\begin{frame}[fragile]{Flux}{blocks}
Flux theme comes with three pre-defined block style collections.\\
Native style (default) available as \verb+\setblockstyle{native}+\\[0.5cm]
\setblockstyle{native} % Default behavior, optional line.
\centering
\begin{minipage}[b]{0.5\textwidth}
\begin{block}{Default}
Block content.
\end{block}
\begin{alertblock}{Alert}
Block content.
\end{alertblock}
\begin{exampleblock}{Example}
Block content.
\end{exampleblock}
\end{minipage}
\end{frame}
\begin{frame}[fragile]{Flux}{blocks}
Flux theme comes with three pre-defined block style collections.\\
NoBackground style available as \verb+\setblockstyle{nobackground}+\\[0.5cm]
\setblockstyle{nobackground}
\centering
\begin{minipage}[b]{0.5\textwidth}
\begin{block}{Default}
Block content.
\end{block}
\begin{alertblock}{Alert}
Block content.
\end{alertblock}
\begin{exampleblock}{Example}
Block content.
\end{exampleblock}
\end{minipage}
\end{frame}
\begin{frame}[fragile]{Flux}{blocks}
Flux theme comes with three pre-defined block style collections.\\
Metropolis style available as \verb+\setblockstyle{metropolis}+\\[0.5cm]
\setblockstyle{metropolis}
\centering
\begin{minipage}[b]{0.5\textwidth}
\begin{block}{Default}
Block content.
\end{block}
\begin{alertblock}{Alert}
Block content.
\end{alertblock}
\begin{exampleblock}{Example}
Block content.
\end{exampleblock}
\end{minipage}
\end{frame}
\begin{frame}{Flux}{diagrams}
\centering
\begin{tikzpicture}
\sbEntree{E}
\sbComp{a}{E}
\sbBlocL{c}{$H_2$}{a}
\sbRelier[$\epsilon$]{a}{c}
\sbComph{d}{c}
\sbRelier[u]{c}{d}
\sbBlocL{e}{$H_3$}{d}
\sbBlocL{f}{$H_4$}{e}
\sbSortie[5]{S1}{f}
\sbRelier{f}{S1}
\sbNomLien[0.8]{S1}{$S_1$}
\sbDecaleNoeudy[-4]{f}{u}
\sbDecaleNoeudy{e}{v}
\sbBlocr{r1}{$R_1$}{u}
\sbBlocr{r2}{$R_2$}{v}
\sbBlocrL{r3}{$R_3$}{r2}
\sbRelieryx{f-S1}{r1}
\sbRelierxy[n1]{r1}{d}
\sbRelieryx{e-f}{r2}
\sbRelierxy[n2]{r3}{a}
\end{tikzpicture}\\[0.4cm]
Bloc diagram example from \textbf{texample.net}
\end{frame}
\begin{frame}{Flux}{plots}
\begin{minipage}{0.56\textwidth}
\begin{figure}
\includegraphics[width=\textwidth]{assets/plot.png}
\end{figure}
\end{minipage}
\hfill
\begin{minipage}{0.38\textwidth}
\begin{block}{Binary Softmax classifier}
\centering
$\sigma(\sum_i w_ix_i + b)$
\end{block}
\begin{exampleblock}{Loss function}
\centering\vspace*{0.1cm}
$L_i = -log(\frac{e^{f_{y_i}}}{\sum_j e^{f_j}})$\\[0.1cm]
cross entropy
\end{exampleblock}
\end{minipage}
\end{frame}
% The [plain] causes the headlines, footlines, and sidebars
% to be suppressed. Useful for showing large pictures
\begin{frame}[plain]
\begin{center}
This is a plain frame.\\
Use it to display full page images.
\end{center}
\end{frame}
\begin{frame}[allowframebreaks]{References}
\nocite{*}
\bibliography{demo}
\bibliographystyle{abbrv}
\end{frame}
\section{Next section}
\subsection{subsection 1}
\subsection{subsection 2}
\subsection{subsection 3}
\section{One more section}
\subsection{subsection 1}
\subsection{subsection 2}
\subsection{subsection 3}
\begin{frame}
\centering
\frametitle{Flux}
\framesubtitle{license}
Flux is licensed under GNU General Public License v3.\\[0.3cm]
\centering\textbf{http://www.gnu.org/licenses}\\[0.3cm]
Inspired by \textbf{Metropolis} theme from Matthias Vogelgesang.\\
https://github.com/matze/mtheme
\end{frame}
\end{document}