\documentclass[11pt]{article}
\usepackage{amsmath, alltt, amssymb, xspace, times, epsfig}
\usepackage{hyperref}
\urlstyle{same}

\setlength{\evensidemargin}{0in} \setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in} \setlength{\textheight}{8.5in}
\setlength{\topmargin}{0in} \setlength{\headheight}{0in}

\renewcommand{\Pr}{\ensuremath{\mathbf{Pr}}\xspace}

\newcommand{\tuple}[1]{\ensuremath{\langle #1 \rangle}\xspace}

\newcommand{\PT}{\ensuremath{\mathsf{PT}}\xspace}
\newcommand{\CT}{\ensuremath{\mathsf{CT}}\xspace}
\newcommand{\Key}{\ensuremath{\mathsf{Key}}\xspace}

\newcommand{\CC}{\ensuremath{\mathcal{C}}\xspace}
\newcommand{\KK}{\ensuremath{\mathcal{K}}\xspace}
\newcommand{\MM}{\ensuremath{\mathcal{M}}\xspace}

\newcommand{\E}{\ensuremath{\mathbb{E}}\xspace}
\newcommand{\D}{\ensuremath{\mathbb{D}}\xspace}
\newcommand{\K}{\ensuremath{\mathbb{K}}\xspace}

\newcommand{\Gen}{\ensuremath{\mathsf{Gen}}\xspace}
\newcommand{\Enc}{\ensuremath{\mathsf{Enc}}\xspace}
\newcommand{\Dec}{\ensuremath{\mathsf{Dec}}\xspace}



\begin{document}

\thispagestyle{empty}

\noindent \textbf{CS590 DSP: Data Security and Privacy\hspace*{\fill}Spring 2022}
\begin{center}
{\LARGE Homework \#1}
\end{center}

\paragraph{Due date \& time:} 11:59pm on February 1, 2022.
\underline{Please hand in your homework on Brightspace.}

\vspace*{-0.1in}\paragraph{Late Policy:} You have three extra days in total for all
your homeworks and projects.  Any portion of a day used counts as one day; that is,
you have to use integer number of late days each time. If
you exhaust your three late days, any late homework won't be graded.


\vspace*{-0.1in}\paragraph{Additional Instructions:} (1) The submitted homework must be typed. Using Latex is recommended, but not required.
\\


\begin{description}
 \item[Problem 1 (10 pts)] Confidentiality, Integrity, Availability.
\begin{itemize}
 \item  (3 pts)
State what is Confidentiality, Integrity, and Availability.

 \item (3 pts)
For each, give two examples where they are violated.

 \item (4 pts)
Identify two computer security control measures on your computer(s).  Which of the
three properties Confidentiality, Integrity, and Availability do they aim at
providing? What kinds of adversaries they \textbf{cannot} defend against?\\
\end{itemize}

 \item[Problem 2  (10 pts)] Unix Access Control.
\begin{itemize}
 \item  (2 pts)
Explain why the setuid bit is needed in UNIX DAC?  

 \item  (4 pts)
What security problems can be caused by using the setuid bit?  What can one do to mitigate the problem?

 \item (4 pts)
Explain how the sticky bit on directories affect UNIX file access control, and why it is needed. \\
\end{itemize}


 \item[Problem 3 (15 pts) ] More Unix Access Control.
On a UNIX/Linux system, create a directory, that includes sub-directories the following.  Submit a printout of running ``ls -ailR'' on this directory.  You can copy/paste the printout into your homework.

\begin{itemize}
 \item
A sub-directory named ``dir1'' such that any other user on the system can create/delete any files under the directory, but cannot do a listing of the file names in the directory.

 \item
A sub-directory named ``dir2'' such that any other user on the system can create files in the directory, can do a listing of the file names in the directory, but can delete only the files owned by the user.

 \item
A sub-directory named ``dir3'' such that any other user can see the file names under the directory, but not access any of the file.

 \item
Create an executable file with name ``test'' under ``dir1'' such that the setuid bit on the file is set.  

 \item
Create a hard link with name ``test'' under ``dir2'' to the file dir1/test.

 \item
Create a symbolic link with name ``test'' under ``dir3'', and make it point to the file dir1/test.

 \item
After submitting the printout, delete either dir1/test, and see how this affect dir2/test and dir3/test.  Describe your findings. \\
\end{itemize}


 \item[Problem 4 (20 pts) ]
Read Chen, Wagner, and Dean: ``Setuid Demystified''\\
\url{https://www.usenix.org/legacy/events/sec02/full_papers/chen/chen.pdf}

Answer the following problems.  Don't write too long, stay within one page for the answer.

\begin{enumerate}
 \item
Describe a way to support both permanent and temporary dropping of privileges using just euid and ruid. 

 \item
Use your words to describe the two security vulnerabilities identified in Section 7 of the paper. 

 \item
Summarize the guidelines in Section 8 of the paper.\\
\end{enumerate}



 \item[Problem 5 (20 pts) ]
Read Norman Hardy's ``The Confused Deputy''.

\url{https://dl.acm.org/doi/10.1145/54289.871709}
\begin{itemize}
 \item
Explain what is the confused deputy problem.

 \item
Explain how capability-based system solve the confused deputy problem.

 \item
Explain how is the confused deputy problem manifested in setuid root programs in UNIX DAC, and how this problem is addressed in UNIX DAC.

 \item
Recall the weaknesses exploited by the malwares we have examined (Morris).  Are they related to the confused deputy problem?\\
\end{itemize}


 \item[Problem 6 (25 pts) ]
Read the paper ``Linux Capabilities: making them work'' by Serge E. Hallyn and Andrew G. Morgan. \\
\url{https://www.kernel.org/doc/ols/2008/ols2008v1-pages-163-172.pdf}
\begin{itemize}
    \item 
    Explain what are the advantages and disadvantages of capability model compared to \texttt{setuid-bit} and effective UID approach.
    
    \item 
    Is it true that the capability bounding set can only affect the permitted capability set? 
    Can a process still run with capabilities suppressed by the bounding set? 
    Explain your answers.
    
    \item 
    What secure risk(s) will be introduce if a process can add capabilities back into its bounding set?
    
\end{itemize}

\end{description}

\end{document}


