LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 04-29-2009, 10:08 PM   #1
ipshita
LQ Newbie
 
Registered: Apr 2009
Posts: 4
Thanked: 0
Changing the hierarchy of system calls executed in response to a command


[Log in to get rid of this advertisement]
I want to change the way linux reacts to commands and user executables..

i.e i want to change the system calls which will be executed in response to it.


I will have to involve my new code before system goes to sys_execve() to execute the executable

One way could be by tapping the sys_call_table i.e exporting it(which will require a patch) and changing the pointer to point to my code and then my program will point to execve()

But this way has big flaws.

PLEASE help!!!!
ipshita is offline  
Tag This Post , ,
Reply With Quote
Old 04-30-2009, 07:13 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,716
Blog Entries: 30
Thanked: 283
Could you explain what you are trying to accomplish?
What is the purpose of this? (Any code or examples?)
Are you sure you need to do this in the kernel? (Can't you keep to userland?)
In what way does your approach differ from malicious kernel subversion?
Have you ever checked out the LSM?
unSpawn is offline     Reply With Quote
Old 04-30-2009, 07:55 AM   #3
ipshita
LQ Newbie
 
Registered: Apr 2009
Posts: 4
Thanked: 0

Original Poster
ELF encoding

I have embedded certain stuffs in the ELF format for the binary executables.
SO everytime the executable runs, i want it to extract the watermark and then proceed to make the system calls. i.e sys_execve() and the rest

I was thinking of changing the pointer location in sys_call_table to point to my code then simultaneously, to the system call from there.

Its like hacking into the system.

Is there any userland method i could use to support this

I havent an idea of LSM

Thank you,
ipshita is offline     Reply With Quote
Old 04-30-2009, 08:49 AM   #4
pixellany
Moderator
 
Registered: Nov 2005
Location: Pasadena, CA
Distribution: Arch
Posts: 13,130
Thanked: 281
Moved: This thread is more suitable in <Programming> and has been moved accordingly to help your thread/question get the exposure it deserves.
pixellany is offline     Reply With Quote
Old 04-30-2009, 09:43 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,716
Blog Entries: 30
Thanked: 283
Quote:
Originally Posted by ipshita View Post
I have embedded certain stuffs in the ELF format for the binary executables. SO everytime the executable runs, i want it to extract the watermark
5 minutes worth of research shows Immunix' CryptoMark, Bsign, DigSig, signelf and elfsign.
unSpawn is offline     Reply With Quote
Old 04-30-2009, 11:49 AM   #6
ipshita
LQ Newbie
 
Registered: Apr 2009
Posts: 4
Thanked: 0

Original Poster
Yes i have gone through digsig before..


What i need now is to develop a kernel module program in response to the binary signature i have already embedded. i.e, i need to develop the kernel module program to initiate the shell to check the elf before running it.

Could you plz help me with the source code


plz

Last edited by ipshita; 04-30-2009 at 11:50 AM..
ipshita is offline     Reply With Quote
Old 04-30-2009, 01:23 PM   #7
ipshita
LQ Newbie
 
Registered: Apr 2009
Posts: 4
Thanked: 0

Original Poster
its kernel module programming using LSM hooks.

If anyone could help me with books and references,
I would be thankful
ipshita is offline     Reply With Quote
Old 05-01-2009, 08:24 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,716
Blog Entries: 30
Thanked: 283
Since the DigSig kernel module already lays the groundwork for a checking mechanism plus hooks into the LSM, wouldn't it be convenient to use it as conceptual and practical framework to base your work on? Or doesn't that fit the requirements for your assignment?
unSpawn is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
user command,system calls and func like... goldeneagle1234 Linux - Newbie 1 09-14-2008 06:30 AM
A command on shell which does not make system calls piyush masrani Linux - General 12 07-26-2008 08:54 AM
how VI reads from a file ,what flow of system calls gets executed devkpict Linux - Kernel 3 12-04-2007 08:54 AM
Command to display whole filestructure hierarchy f/ command line? mjewell Linux - Newbie 10 01-19-2004 11:48 AM


All times are GMT -5. The time now is 01:04 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration