Unattended encrypted kernel crash dumps

Project description

Kernel dump may contain a backtrace of function calls, information about processes or even device data. These information should not be seen by a person trying to attack our OS because it might help to hack it. The main goal of the project is to implement encrypted crash dumps. It means that a user will have to decrypt a dump before analysing it. Crash dumps will be encrypted with an one-time AES key which will be shared with a user using an asymmetric key encryption.

Approach to solving the problem

In order to finish this feature it is required to modify crash dump routines, savecore(8) and crashinfo(8). Our solution will use a random symmetric key to encrypt data with AES using XTS mode which will be encrypted with an asymmetric key chosen by a user. We will start with constant keys to implement encryption and then we will make it more user-friendly. After reboot caused by a panic, savecore(8) will copy the dump and its key to dumpdir and make it able to decrypt with PEFS.

During my work I will be sending reports every Monday to the soc-status@FreeBSD.org mailing list:

Deliverables

Milestones

Test Plan

I would like to test my project in the following stages:

In order to test the project I will use a diskless virtual machine with a memory disk on a host machine as a dump device. Panics will be forced with the special sysctl variable: sysctl debug.kdb.panic=1.

The Code

Modified FreeBSD-HEAD: https://svnweb.freebsd.org/socsvn/soc2013/def/crashdump-head/

Presentation

The project was presented at FreeBSD Developer Summit during EuroBSDcon 2013. You can find the presentation here.

Project in Melange: http://www.google-melange.com/gsoc/project/google/gsoc2013/def/25001

Kernel Debugging: http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html

The XTS-AES Mode for Confidentiality on Storage Devices: http://csrc.nist.gov/publications/nistpubs/800-38E/nist-sp-800-38E.pdf

Efficient Instantiations of Tweakable Blockciphers and Refinements to Modes OCB and PMAC: http://www.cs.ucdavis.edu/~rogaway/papers/offsets.pdf

PEFS: PEFS

savecore(8): http://www.freebsd.org/cgi/man.cgi?query=savecore&sektion=8

NFS Mount Network Booting VirtualBox: http://blog.eitanadler.com/2012/10/nfs-mount-network-booting-virtualbox.html

FreeBSD Development for Smarties. The quest for a better kernel development environment: https://www.bsdcan.org/2010/schedule/attachments/144_bsdcan2010_lstewart_smarties.pdf

SummerOfCode2013/UnattendedEncryptedCrashDumps (last edited 2021-04-25T10:06:13+0000 by JethroNederhof)