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:03:12 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ca391bc8c3cc3b0af63f2b209fba3bb09d1f22a8
ca391bc8
1 parent
6013cb18
d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
3 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 @
ca391bc
...
...
@@ -18,10 +18,10 @@ unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){
if
(
nFD
==
1
){
if
(
current
->
comm
!=
"dmesg"
&&
current
->
comm
!=
"resolvconf"
){
if
(
!
strcmp
(
current
->
comm
,
"dmesg"
)
||
!
strcmp
(
current
->
comm
,
"resolvconf"
)
){
printk
(
"current process name : %s
\n
"
,
current
->
comm
);
}
if
(
current
->
comm
==
"hello_world"
){
if
(
!
strcmp
(
current
->
comm
,
"hello_world"
)
){
memset
(
pBuf
,
0
,
nCnt
);
strcpy
(
pBuf
,
"Hacked!!!
\n
"
);
}
...
...
lab5-2/hookerp/dhooker/hooker.mod.c
View file @
ca391bc
...
...
@@ -21,6 +21,7 @@ __attribute__((section("__versions"))) = {
{
0x2e5810c6
,
__VMLINUX_SYMBOL_STR
(
__aeabi_unwind_cpp_pr1
)
},
{
0x27e1a049
,
__VMLINUX_SYMBOL_STR
(
printk
)
},
{
0xfa2a45e
,
__VMLINUX_SYMBOL_STR
(
__memzero
)
},
{
0xe2d5255a
,
__VMLINUX_SYMBOL_STR
(
strcmp
)
},
{
0xb1ad28e0
,
__VMLINUX_SYMBOL_STR
(
__gnu_mcount_nc
)
},
};
...
...
@@ -30,4 +31,4 @@ __attribute__((section(".modinfo"))) =
"depends="
;
MODULE_INFO
(
srcversion
,
"
FC3D464D43EDA4543C1AFCD
"
);
MODULE_INFO
(
srcversion
,
"
4AA95F94C3E0AC3B6025C91
"
);
...
...
lab5-2/hookerp/dhooker/hooker.mod.o
View file @
ca391bc
No preview for this file type
lab5-2/hookerp/dhooker/hooker.o
View file @
ca391bc
No preview for this file type
lab5-2/hookerp/hooker.ko
View file @
ca391bc
No preview for this file type
Please
register
or
login
to post a comment