LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-23-2011, 03:47 AM   #1
derchris
LQ Newbie
 
Registered: Feb 2011
Posts: 27

Rep: Reputation: 0
Only executing signed code


Hi everyone,


I need to build a Linux environment in which only "signed" processes are allowed to run. When I say signed I don't mean a VeriSign etc. signature like you know it from Windows, but I mean signed by myself. I.e. I choose the software allowed to run, sign it, and then want to deny any other processes to run.
If it is somehow possible I'd like to extend this even to scripts and the kernel (i.e. no unsigned modules can be loaded).
Does anyone have a good idea how to solve this problem?
The bad thing is: I'm pretty fine with coding stuff myself in C, but have absolutely 0 experience or knowledge in kernel (module)-programming.

Any tipps, links, literature, finished programs will be appreciated, thanks

One approach I came up with (just a rough idea at the moment): Linux starts new processes with a fork-and-exec-combination. I therefore wonder if it is possible to change exec() in such a way that it will only execute signed programs.

Thank you
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-23-2011, 04:32 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,279

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Can you precise purpose of this signing? I like this idea, but for me, one PC user, it will be only encumbrance as I known what I want to run and in principle I will must to sign all applications. But for multiuser environments it can give some security.

If you mean about anti-hacking purposes, I think it will not work, as hackers run their exploits in running processes, already signed. It can little difficult attack, but all harmful action can be made undercover of signed proccess.
 
Old 02-23-2011, 05:06 AM   #3
derchris
LQ Newbie
 
Registered: Feb 2011
Posts: 27

Original Poster
Rep: Reputation: 0
Well, it is actually more about embedded systems, not on a PC.
Imagine you sell a mobile phone and don't want the user to use any software you didn't sign or to change the software you gave him. So you basically want to make sure that the user can only use programs that he payed for (i.e. he got from you). (I know this example isn't perfect as it disregards the possibilty of getting signed software from somewhere else, but just to give you a brief example)

So it's basically to make sure that you can control which processes your customers can run and that noone just tries to execute a totally different code. Against a real hacking exploit I'm thinking of additional protection in form of a MAC (which doesn't belong to this topic)

Edit: It's basically about Code Integrity. That's the keyword I was looking for

Last edited by derchris; 02-23-2011 at 05:10 AM.
 
Old 02-23-2011, 06:37 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
What your describing has generally been referred to as Trusted Computing. A number of companies, particularly Microsoft, have been pursuing this idea for years. Here in the FOSS world, you're highly likely to run into a huge amount a skepticism and outright hostility since Trusted Computing pretty much goes against every tenet of FOSS. I'd be highly surprised if there were any Linux tools out there that would help you, but I may be wrong about that.
 
Old 02-23-2011, 10:12 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by Hangdog42 View Post
Here in the FOSS world, you're highly likely to run into a huge amount a skepticism and outright hostility since Trusted Computing pretty much goes against every tenet of FOSS. I'd be highly surprised if there were any Linux tools out there that would help you, but I may be wrong about that.
There's non-TPM checking embedded signatures before execution (BSign, DigSig and DSI: http://disec.sourceforge.net/ IBM DeveloperWorks tutorial Attacking binary signatures) and there's a lot of code to make use of TPM hardware work: the tpmddTPM Device Driver, the TrouSerS OSS TCG Software Stack, TrustedGRUB, a TPM Manager GUI and SmartRM. This h-online article reminds all that GPLv3-licensed software is forbidden from running on platforms which require a private signing key unless the key is freely available to the computer owner. (http://gplv3.fsf.org/, http://www.fsf.org/licensing/license...ide-gplv3.html) and among these IBM TCG papers is one that tries to combat wrong criticism. Also see the OpenTC Open Trusted Computing Consortium
 
2 members found this post helpful.
Old 02-23-2011, 03:06 PM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Wow. I had absolutely no idea there was that much activity.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to upload manually signed packages to PPA that are showing up as not signed. Kenny_Strawn Ubuntu 3 10-14-2010 05:54 PM
LXer: Executing Signed Binaries in Linux Kernel LXer Syndicated Linux News 0 07-20-2007 09:46 AM
executing C++ code from within PHP code vineet7kumar Programming 1 06-03-2007 04:13 PM
Problem in executing code in gcc gcc_learner Programming 3 03-26-2005 03:28 AM
executing shell code from stack djidji Fedora 3 03-07-2005 05:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:33 AM.

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