content
This commit is contained in:
parent
8bb20127a9
commit
753172cdc3
@ -7,4 +7,9 @@
|
|||||||
short = {ASLR},
|
short = {ASLR},
|
||||||
long = {Address Space Layout Randomization},
|
long = {Address Space Layout Randomization},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\DeclareAcronym{ip}{
|
||||||
|
short = {IP},
|
||||||
|
long = {Instruction Pointer},
|
||||||
|
}
|
||||||
% vim: set filetype=tex ts=2 sw=2 tw=0 et :
|
% vim: set filetype=tex ts=2 sw=2 tw=0 et :
|
||||||
|
17
assets/logic.c
Normal file
17
assets/logic.c
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include<stdio.h>
|
||||||
|
#include<string.h>
|
||||||
|
|
||||||
|
void foo(char *input) {
|
||||||
|
int is_logged_in = 0;
|
||||||
|
char buf[50];
|
||||||
|
strcpy(buf, input);
|
||||||
|
if (is_logged_in) {
|
||||||
|
puts("logged in!!1!");
|
||||||
|
} else {
|
||||||
|
puts("not logged in");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
foo(argv[1]);
|
||||||
|
}
|
BIN
assets/stack.png
Normal file
BIN
assets/stack.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
assets/stack_overflow.png
Normal file
BIN
assets/stack_overflow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
BIN
presentation.pdf
BIN
presentation.pdf
Binary file not shown.
@ -108,16 +108,32 @@
|
|||||||
|
|
||||||
\section{Beispiel}
|
\section{Beispiel}
|
||||||
\begin{frame}
|
\begin{frame}
|
||||||
\inputminted{c}{assets/vuln.c}
|
\inputminted[firstline=4,lastline=13]{c}{assets/logic.c}
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\inputminted[firstline=3,lastline=7]{c}{assets/vuln.c}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
\section{Stack Layout, Execution Flow}
|
\section{Stack Layout, Execution Flow}
|
||||||
\begin{frame}
|
\begin{frame}
|
||||||
\frametitle{Stack Layout}
|
\frametitle{Stack Layout}
|
||||||
|
\includegraphics[width=.30\textwidth]{stack.png}
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
|
\begin{frame}
|
||||||
|
\frametitle{Stack Layout}
|
||||||
|
\includegraphics[width=.60\textwidth]{stack_overflow.png}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
\begin{frame}
|
\begin{frame}
|
||||||
\frametitle{Execution Flow}
|
\frametitle{Execution Flow}
|
||||||
|
\begin{itemize}
|
||||||
|
\item Beim Aufruf einer Funktion, aktuelle Adresse auf Stack
|
||||||
|
\item \emph{\Ac{ip}} auf Adresse der aufgerufenen Funktion
|
||||||
|
\item Bei \mintinline{c}{return}, Stack Frame wiederherstellen, Adresse von Stack in \emph{\Ac{ip}}
|
||||||
|
\item Was wenn die Adresse auf dem Stack überschrieben wurde?
|
||||||
|
\end{itemize}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
\section{Exkurs: Shellcode}
|
\section{Exkurs: Shellcode}
|
||||||
@ -143,8 +159,8 @@
|
|||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item Shellcode im Speicher plazieren
|
\item Shellcode im Speicher plazieren
|
||||||
\item Buffer überschreiben
|
\item Buffer überschreiben
|
||||||
\item \emph{IP} überschreiben
|
\item \emph{\Ac{ip}} überschreiben
|
||||||
\item \emph{IP} auf Shellcode zeigen lassen
|
\item \emph{\Ac{ip}} auf Shellcode zeigen lassen
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user