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 08:10:52 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e5e9646fba3e9808b57d0902f18805d73672d394
e5e9646f
1 parent
2336662a
d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
5 deletions
lab5-2/hookerp/dhooker/hooker.c
lab5-2/hookerp/dhooker/hooker.mod.c
lab5-2/hookerp/dhooker/hooker.mod.o
lab5-2/hookerp/dhooker/hooker.o
lab5-2/hookerp/hooker.ko
lab5-2/hookerp/dhooker/hooker.c
View file @
e5e9646
...
...
@@ -16,12 +16,9 @@ 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
(
!
strcmp
(
current
->
comm
,
"hello_world"
)){
if
(
nFD
==
1
&&
!
strcmp
(
current
->
comm
,
"hello_world"
)){
memset
(
pBuf
,
0
,
nCnt
);
strcpy
(
pBuf
,
"Hacked!!!
\n
"
);
}
return
sys_write_orig
(
nFD
,
pBuf
,
nCnt
);
}
else
{
...
...
lab5-2/hookerp/dhooker/hooker.mod.c
View file @
e5e9646
...
...
@@ -31,4 +31,4 @@ __attribute__((section(".modinfo"))) =
"depends="
;
MODULE_INFO
(
srcversion
,
"
41DBD0D0A44067D769467DB
"
);
MODULE_INFO
(
srcversion
,
"
55CB21EDEE8A98ECC603404
"
);
...
...
lab5-2/hookerp/dhooker/hooker.mod.o
View file @
e5e9646
No preview for this file type
lab5-2/hookerp/dhooker/hooker.o
View file @
e5e9646
No preview for this file type
lab5-2/hookerp/hooker.ko
View file @
e5e9646
No preview for this file type
Please
register
or
login
to post a comment