Skip to content

char-driver, which keeps your secrets in kernel space via procfs

Notifications You must be signed in to change notification settings

d1sgr4c3/kernel-vault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ksecret driver with userspace tool

Motivation

The driver was developed as part of my mission at INT-13, PT-START 2024. Personal motivation is understanding Linux kernel modules and C basics of development.

Installation

You can install the package:

git clone https://github.com/flipthewho/INT-13-Stage-2.git
cd INT-13-Stage-2/

Installing driver:

git clone https://github.com/flipthewho/INT-13-Stage-2.git
cd driver/
make
sudo insmod Ksecret.ko

Building tool:

cd tool/
gcc KStool.c -o KStool

Usage

usage: ./KStool -d | -r | -w
  -d   delete the secret from memory
  -r   read the secret from memory
  -w   write the secret to memory from stdin

Example

$ ./KStool 
usage: ./KStool -d | -r | -w
  -d   delete the secret from memory
  -r   read the secret from memory
  -w   write the secret to memory from stdin
$ ./KStool -r
secret: 
$ ./KStool -w
enter the secret: 
123ioctl
$ ./KStool -r
secret: 123ioctl
$ ./KStool -d
$ ./KStool -r
secret: 

Possible QA

Q: How can i remove temp files like Ksecret.mod Ksecret.mod.c Ksecret.mod.o Ksecret.o modules.order Module.symvers ?
A: $ make clean in current driver directory

Q: How can i remove module?
A: $ sudo rmmod Ksecret

About

char-driver, which keeps your secrets in kernel space via procfs

Resources

Stars

Watchers

Forks