LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 04-29-2009, 10:08 PM   #1
ipshita
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Rep: Reputation: 0
Changing the hierarchy of system calls executed in response to a command


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!!!!
 
Old 04-30-2009, 07:13 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 20,982
Blog Entries: 44

Rep: Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236
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?
 
Old 04-30-2009, 07:55 AM   #3
ipshita
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
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,
 
Old 04-30-2009, 08:49 AM   #4
pixellany
Guru
 
Registered: Nov 2005
Location: Pasadena, CA
Distribution: Arch+KDE
Posts: 16,552

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Moved: This thread is more suitable in <Programming> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 04-30-2009, 09:43 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 20,982
Blog Entries: 44

Rep: Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236
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.
 
Old 04-30-2009, 11:49 AM   #6
ipshita
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 04-30-2009, 01:23 PM   #7
ipshita
LQ Newbie
 
Registered: Apr 2009
Posts: 4

Original Poster
Rep: Reputation: 0
its kernel module programming using LSM hooks.

If anyone could help me with books and references,
I would be thankful
 
Old 05-01-2009, 08:24 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 20,982
Blog Entries: 44

Rep: Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236
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?
 
  


Reply

Tags
help


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 09:34 PM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration