Showing
5 changed files
with
2 additions
and
5 deletions
... | @@ -16,12 +16,9 @@ unsigned int (* sys_write_orig)(int fd, char *byf, size_t count); | ... | @@ -16,12 +16,9 @@ unsigned int (* sys_write_orig)(int fd, char *byf, size_t count); |
16 | //sys_write_orig() 호출 전 pBuF의 내용 수정 | 16 | //sys_write_orig() 호출 전 pBuF의 내용 수정 |
17 | unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){ | 17 | unsigned int sys_write_hooked(int nFD, char *pBuf, size_t nCnt){ |
18 | 18 | ||
19 | - if(nFD == 1){ | 19 | + if(nFD == 1 && !strcmp(current->comm,"hello_world")){ |
20 | - | ||
21 | - if(!strcmp(current->comm,"hello_world")){ | ||
22 | memset(pBuf, 0, nCnt); | 20 | memset(pBuf, 0, nCnt); |
23 | strcpy(pBuf, "Hacked!!!\n"); | 21 | strcpy(pBuf, "Hacked!!!\n"); |
24 | - } | ||
25 | return sys_write_orig(nFD,pBuf, nCnt); | 22 | return sys_write_orig(nFD,pBuf, nCnt); |
26 | } | 23 | } |
27 | else{ | 24 | else{ | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
-
Please register or login to post a comment