Skip to content

Commit

Permalink
Add draft results table
Browse files Browse the repository at this point in the history
  • Loading branch information
lamida committed Jul 20, 2021
1 parent c56887c commit b70ecc5
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Chapters/Chapter1.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ \chapter{Introduction} % Main chapter title

\section{Motivation}

\xt{To be completed}

This research are trying to answer these questions.
\begin{itemize}
\item How to implement offline program analysis for the ScaRR novel model for remote attestation?
Expand All @@ -16,6 +18,8 @@ \section{Motivation}

\section{Related Works}

\xt{Review the literature review here. Put sufficient figures.}

In this section we present related work in model for remote attestation. Specifically we discuss how different attestation scheme encode the offline program representations.

C-Flat \cite{aberaCFLATControlFlowAttestation2016} is the first remote attestation scheme to detect runtime control flow attack for embedded systems. C-Flat are generating offline measurement by traversing all possible path of program from start node to the termination node. In each node, C-Flat hashes the node ID and the hash of previous node. In the first node, since there is no previous hash, we pass 0. This creates hash chains which is stored as offline measurement database.
Expand Down
4 changes: 3 additions & 1 deletion Chapters/Chapter2.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

\chapter{Scope} % Main chapter title

\xt{TBD}

\label{Chapter2} % For referencing the chapter elsewhere, use \ref{Chapter2}

\section{Implementation}
This thesis is implementing the ScaRR Control Flow Model as LLVM passes using LLVM 13.0.0.

\section{Analysis}

We analyzed the control-flow model extracted against different programs with various size and complexities. In this thesis, we are only analyzing program written in C. However, since the LLVM pass is running control from graph extraction against the intermediate representation, we should get consistent result on any programming language that compiles to IR.
We analyze the control-flow model extracted against different programs with various size and complexities. In this thesis, we are only analyzing program written in C. However, since the LLVM pass is running control from graph extraction against the intermediate representation, we should get consistent result on any programming language that compiles to IR.
4 changes: 2 additions & 2 deletions Chapters/Chapter4.tex
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ \subsection{List of Actions}

Consider again the CFG in the Figure \ref{fig:simple-loop-checkpoints}. The LoA between node 3 (Checkpoint Virtual) and node 10 (checkpoint ThreadEnd) is $[(BBL_3, BBL_{10})]$. However, the LoA between node 0 and node 3 is $[]$ (empty set).

\section{ScaRR LLVM Pass}
\section{ScaRR LLVM Pass}

ScaRR offline measurement is represented as the following key-value pair.
ScaRR LLVM pass\footnote{https://github.com/lamida/llvm-project/pull/3} is the implementation of ScaRR offline measurement using LLVM. ScaRR offline measurement is represented as the following key-value pair.

$$(cp_A, cp_B, H(LoA)) \Rightarrow [(BBL_{s1}, BBL_{d1}), ..., (BBL_{sn}, BBL_{dn})]$$

Expand Down
43 changes: 41 additions & 2 deletions Chapters/Chapter5.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,49 @@ \chapter{Results} % Main chapter title

\label{Chapter5} % For referencing the chapter elsewhere, use \ref{Chapter5}

In this research we used the offline measurement generator in getting the measurement across different programs. We calculated the ScaRR control flow information from each of the program.
In this research we used the offline measurement generator in getting the measurement across different real world programs. We calculated the ScaRR control flow information from each of the program. We are applying the research methodology into the following different programs \footnote{https://github.com/lamida/scarr-sample-program/}:

\begin{itemize}
\item redis 6.2.4
\item bzip2 1.0.8
\item openssl 1.1.1j
\item coreutils 8.32
\end{itemize}

For each of program, we are collecting the following measurements:

\begin{itemize}
\item source code lines
\item IR lines
\item number of basic blocks (nBB)
\item number of ScaRR measurements (nM)
\item number of checkpoints (nCP)
\item number of LoA (nLoA)
\end{itemize}

\section{ScaRR Control Flow Result}

\xt{Elaborate the results, add charts for better visualization than just table.}

\csvautolongtable{csv/coreutils.csv}
\xt{Find a way to add caption to this long table}

\begin{table}[hbtp]
\centering
\csvautotabular{csv/redis.csv}
\caption{Redis ScaRR measurements}
\end{table}

\begin{table}[hbtp]
\centering
\csvautotabular{csv/misc.csv}
\caption{Some additional programs ScaRR measurements}
\end{table}

\section{Complexity Analysis}

\section{Case Study}
TBD

\section{Case Study}

TBD
4 changes: 3 additions & 1 deletion Chapters/Chapter7.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ \chapter{Conclusion} % Main chapter title

\label{Chapter7} % For referencing the chapter elsewhere, use \ref{Chapter7}

In this thesis we implemented ScaRR control flow model extractor that can be used to build offline measurement database. We We presented the design and the implementation of the tool as two different LLVM passes.
In this thesis we implemented ScaRR control flow model extractor that can be used to build offline measurement database. We We presented the design and the implementation of the tool as two different LLVM passes.

TBD
72 changes: 72 additions & 0 deletions csv/coreutils.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
program,code lines,IR lines,nBB,nM,nCP,nLoA
basename,190,827,19,17,13,26
cat,767,2215,119,151,94,216
chgrp,319,1158,43,44,32,60
cksum,310,1012,9,11,8,20
cp,1226,3619,79,37,27,56
csplit,1526,5550,,,,
cut,609,2196,40,36,25,56
date,604,2223,69,80,57,110
dd,2581,9420,366,451,235,748
df,1847,8146,377,410,278,698
dirname,136,635,13,13,10,20
du,1140,3973,206,273,138,424
env,952,3875,197,241,141,374
expand,238,1057,46,55,37,78
expr,1117,5549,,,,
false,2,442,6,7,6,12
fmt,1029,4083,44,45,26,64
getlimits,172,2681,109,189,109,324
head,1095,3596,196,253,149,386
id,464,1922,67,47,31,84
install,1059,3545,120,129,72,162
kill,314,1376,64,90,49,142
link,93,581,10,8,8,12
ln,681,2350,64,60,37,100
ls,5520,24925,394,450,249,654
make-prime-list,230,813,32,43,27,78
mkdir,296,1230,28,30,21,42
mktemp,350,1347,65,80,53,120
mv,512,1903,66,61,40,92
nice,221,905,27,31,24,54
nl,596,1994,35,39,24,58
numfmt,1651,6036,113,118,69,154
od,1987,7876,230,291,173,454
paste,530,2234,31,41,27,54
pathchk,422,1306,56,77,44,120
pinky,602,3161,72,84,48,128
pr,2848,10596,105,89,50,142
printenv,154,742,25,34,20,60
printf,715,2811,118,147,92,200
ptx,2153,7888,487,651,294,1060
pwd,394,1777,65,74,50,116
readlink,178,813,34,36,24,50
realpath,278,1382,74,86,49,134
rm,373,1213,40,41,26,64
rmdir,253,1048,31,38,23,62
seq,736,3057,105,132,84,226
shred,1279,3789,67,83,52,130
shuf,615,2524,128,177,106,310
sleep,146,688,21,28,18,46
split,1668,6262,248,302,189,510
stat,1907,18653,55,65,44,86
stdbuf,394,1644,87,109,76,154
stty,2322,5885,163,167,110,250
sum,273,1312,15,19,14,32
sync,239,838,29,39,27,58
tac,713,2324,64,75,48,116
tail,2537,8657,458,575,329,894
tee,278,1193,48,61,37,96
test,867,3968,,,,
tr,1914,6139,152,167,97,282
true,80,441,6,7,6,12
truncate,388,1564,78,94,58,150
tty,133,624,13,14,12,20
uname,376,1236,76,101,61,140
unexpand,326,1255,60,67,46,98
uniq,662,2379,110,125,77,192
unlink,88,543,7,5,6,10
uptime,257,1249,5,2,3,4
users,150,899,5,2,3,4
wc,895,3689,89,100,68,158
yes,130,765,19,26,15,44
3 changes: 3 additions & 0 deletions csv/misc.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
program,code lines,IR lines,nBB,nM,nCP,nLoA
bzip2,2036,8542,143,132,76,244
openssl,832,1793,28,30,19,42
4 changes: 4 additions & 0 deletions csv/redis.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
program,code lines,IR lines,nBB,nM,nCP,nLoA
redis-benchmark,1982,29367,254,407,211,564
redis-cli,8400,45836,513,630,388,1002
server,6397,25790,88,91,52,138
Binary file modified main.pdf
Binary file not shown.
9 changes: 5 additions & 4 deletions main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@

\usepackage{minted} % code listing

% TODO: Enabling listing breaking the compilation
% \usepackage{listings}

\usepackage{xcolor}
\definecolor{mGreen}{rgb}{0,0.6,0}
\definecolor{mGray}{rgb}{0.5,0.5,0.5}
Expand All @@ -77,9 +74,13 @@
\definecolor{pink-shocking}{rgb}{0.99, 0.06, 0.75}
\definecolor{green-shocking}{rgb}{0.0, 1, 0.0}
\newcommand{\ft}[1]{\todobox{pink-shocking}{Flavio}{#1}}
\newcommand{\xt}[1]{\todobox{red}{Jon}{#1}}

\usepackage{tocbibind}

\usepackage{csvsimple}


%----------------------------------------------------------------------------------------
% MARGIN SETTINGS
%----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -295,7 +296,7 @@
% Include the appendices of the thesis as separate files from the Appendices folder
% Uncomment the lines as you write the Appendices

\include{Appendices/AppendixA}
%\include{Appendices/AppendixA}
%\include{Appendices/AppendixB}
%\include{Appendices/AppendixC}

Expand Down

0 comments on commit b70ecc5

Please sign in to comment.