The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
How to set HIGH importance to a mail sent through mailx or sendmail command mitte_dino UNIX for Dummies Questions & Answers 3 01-29-2009 03:02 PM
determining actual directory of a symlinked directory chiru_h Shell Programming and Scripting 3 09-24-2007 08:40 PM
determine owner directory permissions from within the directory Sniper Pixie Shell Programming and Scripting 4 03-07-2006 05:06 PM
cp first ~/bin what is ~ symbols importance in this. singh85 Linux 1 01-30-2004 03:56 PM
moving files from a unix directory to a windows directory gleads UNIX for Dummies Questions & Answers 2 08-29-2002 09:42 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-13-2000
madhu madhu is offline
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

  #2 (permalink)  
Old 12-13-2000
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,709
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0