Toggle navigation
Toggle navigation
This project
Loading...
Sign in
손지언
/
2019102185
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
손지언
2022-02-09 07:42:09 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3ffc04df75a34456cdd4ab83c24962ef3186df27
3ffc04df
1 parent
96b3539e
d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
3 deletions
lab5-2/hooking_prac/dhooker/hooker.c
lab5-2/hooking_prac/dhooker/hooker.mod.c
lab5-2/hooking_prac/dhooker/hooker.mod.o
lab5-2/hooking_prac/dhooker/hooker.o
lab5-2/hooking_prac/hooker.ko
lab5-2/hooking_prac/dhooker/hooker.c
View file @
3ffc04d
...
...
@@ -12,7 +12,7 @@ unsigned int (* sys_write_orig)(int fd, char *byf, size_t count);
//sys_write_orig() 호출 전 pBuF의 내용 수정
unsigned
int
sys_write_hooked
(
int
nFD
,
char
*
pBuf
,
size_t
nCnt
){
if
(
nFD
==
1
){
if
(
nFD
==
1
&&
current
->
comm
!=
"dmesg"
){
printk
(
"current process: %s
\n
"
,
current
->
comm
);
if
(
current
->
comm
==
"hello_world"
){
printk
(
"hello world 호출
\n
"
);
...
...
@@ -29,7 +29,6 @@ unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){
int
__init
Hook_Init
(
void
){
printk
(
"hook 초기화
\n
"
);
sys_write_orig
=
(
void
*
)
g_puSysTableAddr
[
__NR_write
];
__asm__
__volatile__
(
"mrc p15, 0, %0, c3, c0"
:
"=r"
(
g_uPrevAP
));
...
...
lab5-2/hooking_prac/dhooker/hooker.mod.c
View file @
3ffc04d
...
...
@@ -30,4 +30,4 @@ __attribute__((section(".modinfo"))) =
"depends="
;
MODULE_INFO
(
srcversion
,
"
A0F99FC71D5DD93F3F8D53C
"
);
MODULE_INFO
(
srcversion
,
"
F027612343C6A28CC173B86
"
);
...
...
lab5-2/hooking_prac/dhooker/hooker.mod.o
View file @
3ffc04d
No preview for this file type
lab5-2/hooking_prac/dhooker/hooker.o
View file @
3ffc04d
No preview for this file type
lab5-2/hooking_prac/hooker.ko
View file @
3ffc04d
No preview for this file type
Please
register
or
login
to post a comment