LinuxQuestions.org
Review your favorite Linux distribution.
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 02-17-2004, 02:16 PM   #1
netwizio
LQ Newbie
 
Registered: Jul 2003
Posts: 8

Rep: Reputation: 0
accessing system calls information


Hello i want to count the important system calls execuetd with in a time interval in linux. How can i do that . I have not worked much with the system calls . Further is there any library which can give me such information or so.

Eventually i want to block any malicious system call. How can i do this sort of hooking

every sort of help tutorials web sites links are welcomed

regards

Last edited by netwizio; 02-17-2004 at 02:19 PM.
 
Old 02-17-2004, 04:55 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
I am not sure you can count the system calls in a given interval without directly modifying the kernel to do so.

Also.... How are you going to determine what system calls are made maliciously? You pretty much have to assume if something makes a syscall and there are no permission issues to block it that you have to let it work. Otherwise you could seriously break the system.
 
Old 02-17-2004, 06:05 PM   #3
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
hooking system calls is pretty simple, see here:
http://ouah.kernsh.org/kernel-hijack.txt
i can explain it to u if u like.
 
Old 02-17-2004, 10:29 PM   #4
netwizio
LQ Newbie
 
Registered: Jul 2003
Posts: 8

Original Poster
Rep: Reputation: 0
jtshaw wrote
"I am not sure you can count the system calls in a given interval without directly modifying the kernel to do so.

Also.... How are you going to determine what system calls are made maliciously? You pretty much have to assume if something makes a syscall and there are no permission issues to block it that you have to let it work. Otherwise you could seriously break the system."

actually i m making some seperate program to decide upon the maliciousness of the system calls by checking their probability of existence based on their previous occurences
 
Old 02-18-2004, 12:53 AM   #5
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
if you have a separeate program, then you are going to have to somehow forward requests from kernel space to user space, EVERYTIME A SYSTEM CALL IS MADE. i think that is slowdown you might notice. i just realized that the link i gave you isn't exactly what you need... you said you wanted to screen ALL system calls?? in that case, if you used the above method i posted, you'd have to hijack all 250+ individiually, which prolly isnt waht you want. i think, and im speculating here, that you could instead replace the interrupt vector 0x80 and screen calls from there instead. makes more sense that way, but i've never tried hackin up the interrupt vectors yet.
 
  


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
System calls question alltime Programming 1 11-29-2005 08:31 PM
Information on Processes in linux using System calls Anup Kumar Programming 3 05-06-2005 11:51 AM
Some system calls Spooky Programming 1 11-24-2004 10:17 AM
Accessing information from a floppy drive inZioN Linux - Newbie 2 04-14-2004 08:40 AM
Accessing Video Memory Information...need help! KneeLess Programming 1 08-19-2003 01:38 AM

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

All times are GMT -5. The time now is 02:57 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