LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-02-2003, 05:40 PM   #1
gdboling
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Rep: Reputation: 0
Malicious C code protection


If you give someone telnet access or ssh access and allow them to do C/C++ code, is this just a risk that you take that someone would/could write some malicious code to do evil things? Or is there a way to isolate what is happening with their C/C++ code?

Thanks.

Gregg
 
Old 09-02-2003, 05:54 PM   #2
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
If you mean you allow them to compile such code, or even write executable files, then they might be able to exploit a vunerability in a service or program, but your file permissions still apply and their apps will run with their user id and permissions.

There are kernel compilation options to try to stop things like buffer overflow exploits, and many complex system integrity apps out there, it just depends how closely you want to monitor and how much to restrict.
 
Old 09-02-2003, 05:59 PM   #3
gdboling
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks for the reply. Basically, I have a few friends who want to learn how to program. Most are on dial-up so downloading something they can use to learn with can take some time. Even the smallest cygwin download sucks on dial-up. I have a DSL connection so I thought I would give them telnet/ssh access to use my gcc and g++ to help them learn.

However, I know my friends a little too well.

But for the most part, unless they really know the ins and outs, people that are just learning how to program, I shouldn't have to worry too much, right? I mean, I know enough to teach them, and wouldn't really know how to exploit a Linux box myself.
 
Old 09-02-2003, 06:12 PM   #4
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
if your on dsl then why not just download a compiler for them? make sure the permissions are correct in /dev or they can have great fun with your soundcard and other hardware. make sure everything that doesnt need to be set{u,g}id isnt. set a max processor and max memory limit for them so they cant crash your machine. you can make things as secure as you like but if you trust them that that should be plenty. dont use telnet it is completely unsecure. there is a great ssh client for windows called putty.
 
Old 09-02-2003, 06:14 PM   #5
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Not quite understanding the need for a fast internet connection to learn to program. Reading Slashdot doesnt count as work or learning

If you're letting them compile or even just save and execute code, then they could concievably nose around your box, track down some exploit code for a running service/installed app, and then gain root access. But all processes and files have permissions, so as long as your config files and executable binaries are root-write-only etc you should be fine.

unSpawn, mod in the Security forum here, knows a heck of a lot about all this.
 
  


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
Malicious Script jspsandhu Linux - General 12 09-29-2005 05:05 PM
Where can I find source code for CPRM (content protection for recordable media)? George2 Linux - Security 2 02-26-2004 12:02 AM
Malicious Files and Virus stored on RAM? Neo_Tux Linux - Security 1 02-01-2004 10:56 AM
(PHP) Stopping Malicious Form Input Obi Perrin Programming 0 04-27-2003 07:43 PM
Protecting against malicious PHP paranoid Linux - Security 0 03-14-2003 09:32 AM

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

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