The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
determining actual directory of a symlinked directory chiru_h Shell Programming and Scripting 3 09-24-2007 04:40 PM
determine owner directory permissions from within the directory Sniper Pixie Shell Programming and Scripting 4 03-07-2006 02:06 PM
How to set HIGH importance to a mail sent through mailx or sendmail command mitte_dino UNIX for Dummies Questions & Answers 2 09-20-2005 07:07 AM
cp first ~/bin what is ~ symbols importance in this. singh85 Linux 1 01-30-2004 12:56 PM
moving files from a unix directory to a windows directory gleads UNIX for Dummies Questions & Answers 2 08-29-2002 05:42 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 12-12-2000
Registered User
 

Join Date: Dec 2000
Posts: 1
Lightbulb

Can any one tell me what is the importance of '/dev' directory in unix. Is there any possibility to get 'root' by using the files stored in this directory.

Beleive me this is not for any hacking purpose. just for learning.

Hopes a detail reply. thak you

__________________
:o
Forum Sponsor
  #2  
Old 12-13-2000
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,435
The /dev directory is where the user interface to kernel device drivers and other <em> special files </em> are located. The UNIX kernel interface to devices such as modems, printers, disks happens using device drivers built into the kernel. User processes typically access devices (kernel device drivers) via special files. Many of the files are located in the /dev/ directory.

You ask, can someone gain root access via these files. To answer that we should define what root access means:


The UNIX <B> superuser </B> is a user with UID (user ID) 0 (zero) that are granted special privileges by the UNIX kernel. The login name for this user is normally "root" (it does not have to be). When a device file is called by a process and the process was run by the superuser, then the behavior of the device driver has special privileges. So, if a device driver had malicious code or a logic flaw that compromises the integrity of the system, the system can be compromised.

On many UNIX platforms, RAM is also managed via a special file, for example /dev/kmem (or something to that effect). A system vulnerability exists when this special file is world readable because clever people could read the system memory at any time. Reading system memory can compromise any system, not only UNIX but all systems.

The bottom line is that all files should have the proper permissions. Any file which runs as UID 0 has the potential for misuse. Remember the Stoll story about the C Egg? One of the methods used by the hackers was crontab files that are executed by the superuser process. When the root crontab file was found world writable, any process that is executed by the cron will execute as the superuser. Naturally, it is a very poor configuration management to leave these crontab files world-writable.

Files in the /dev directory can be the source of security breaches. Not all files are created nor executed equal. There are also files with permission that say 'set the UID of the calling user to 0' (SUID). When this flag is set, a file which is not owned by UID 0 gets the same privileges as the UID 0 user. All SUID 0 files require special precautions.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0