LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-07-2009, 12:38 AM   #1
peru0002
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Rep: Reputation: 0
System Call Hooking


Hi All,

I am trying to do system call hooking in Linux v2.6.28.8
sys-call-table is not an exported symbol in Linux v2.6, so I have downloaded the source code and tried to apply the patches from
http://kerneltrap.org/node/16668. However I couldn't apply the patches successfully.I think maybe because the patches is for 2.6.21.5.
Is this the correct way or is there any other methods to access the system call table?
 
Old 09-07-2009, 03:42 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If you know a little bit about SCT history (read the LKML?) you know by now that trying to hook into the SCT points to using the wrong method. So why would you want to hook into the SCT anyway if I may ask?
 
Old 09-07-2009, 11:11 AM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
It appears to be a very simple patch, so you can probably just perform it manually provided you can find the correct lines.
Kevin Barry
 
Old 09-08-2009, 12:13 AM   #4
peru0002
LQ Newbie
 
Registered: Sep 2009
Posts: 2

Original Poster
Rep: Reputation: 0
I am trying to replace system calls with my own using Loadable Kernel Modules (LKM). How to replace system calls without accessing SCT? Is there any other method?

I performed the patch manually and built the kernel. But when I try to load my LKM it shows "segmentation fault".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OSE system call functions to Linux Sytem Call functions required roshantraj30 Linux - General 0 06-08-2009 02:06 AM
How to call system call from usb driver's code Mr.J Linux - Kernel 4 09-29-2008 03:47 AM
Sys call hooking - tracing return.c Programming 1 04-09-2008 06:42 PM
How can i make centos 4.5's system call using vDSO(call *%gs:0x10) instead of int80 tclwp Red Hat 3 08-06-2007 12:07 AM
Calling a system call from a system call? Loc_8 Programming 0 09-16-2006 04:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration