Lab on Kernel Hardening
1 Background
- Prerequisite:: Successful completion of SysCalls lab.
- Prerequisite:: Apply all known patches for security. http://www.linuxsecurity.com/
- Prerequisite:: Build a kernel yourself. Be fully conversant with
creating a
.config
file.
- Admitted:: We do not know deep-enough about the OS Kernels in
general, and Linux Kernel in particular.
- Goal:: Even so, we can successfully build and deploy a secure
kernel.
- Awareness:: On my Kubuntu system,
grep apparmor /proc/kallsyms |
wc -l
produces 80, and grep selinux /proc/kallsyms | wc -l
produces 288. Check your system.
2 Tasks
- In each task, you are expected to build, document your build,
deploy, and demo the deployed kernel. All of these should be
thoroughly described in the report.
2.1 Task: Kernel with No-SELinux [20 points]
- Include AppArmor, Exclude SELInux. Show that
grep selinux
/proc/kallsyms | wc -l
comes out as (near) zero.
- Provide 5 extra slots for new syscalls in the sys-call-table
2.2 Task: Kernel with No-AppArmor [20 points]
- Exclude AppArmor, Include SELInux. Show that
grep apparmor
/proc/kallsyms | wc -l
comes out as (near) zero.
- Provide 5 extra slots for new syscalls in the sys-call-table
2.3 Task: Devious Kernel [20 points]
- Build a devious kernel that does contain known bugs. We
expect to use such kernels in labs.
- Focus on PIE (Position Independent Code). See the references.
- Write a users' manual.
2.4 Task: Kernel Built by LLVM [20 points]
- Build the "No-SELinux Kernel" above with LLVM, an alternate C
compiler and build system.
- Demonstrate that you are conversant with Unit tests for known LLVM
Linux Bugs. Study https://blog.regehr.org/archives/1450 Testing
LLVM.
3 Submission
- [15 points] Lab Report quality, compliance, and completeness. [5
points] Include a journal. By the hour. You must follow the Lab
Report Template. There should be a section on each of the tasks. A
couple of lines of an answer to each (implied/ explicit) question/
discussion item. Must number them as in this document.
- Use good judgment in (i) what to submit and (ii) what to omit and
(iii) how long the report becomes. Do not make the report way
longer than, say, 20 pages. It is possible to remain under 20 pp, and
receive full score. Lack of judgment earns negative points.
- Submit relevant files of source code that you wrote, and of text.
Always interpret the results.
- Submit a PDF file named exactly
Report-L7.pdf
, and a tarball
L7.tbz
[created with tar cfjvv L7.tbz source-files*
]. (Scripts
are used to check various things – so file names should obey such
"rules".)
Copyright © 2018
www.wright.edu/~pmateti • 2018-11-28