11-29-2009
The pseudo-device provides a “backdoor” for gaining root access for a particular user.
Problem statement.
In this part of the assignment, delegates will create a pseudo-device and write a device driver for it. The pseudo-device provides a “backdoor” for gaining root access for a particular user. Instead of compiling the device driver into the kernel, delegate will create a module. Modules are object binaries that can be dynamically loaded into the kernel. They are similar to a DLL in MS Windows. Below is the description of the device the delegates are creating and the functionality your device driver is required to implement.
This pseudo-device gives root privileges to the task whose pid is written to the device. When the module is installed, the uid of the user who are allowed to use this device can be passed as module parameters. Any other user, including root, that tries to use this device will get an “access denied” error. When the correct user accesses the device for executing operations, the device driver finds the task associated with the pid and grants that task root privileges.
Work expected:
1. Identify proper device id, registration functions, and driver methods for the above given problem statement
2. Design the proper data structures required and the identified functions/methods to be implemented. Note: Issues of race conditions and synchronization should be taken care if required.
3. Develop the kernel module code for the designed functions with proper entry points to the driver
4. Write Makefile for compilation of the developed kernel module. Construct your Makefile so that developed kernel module will compile with “make” command
5. Accommodate the platform interface for the access to the developed module
6. Add the compiled kernel module into the running kernel
7. A program that uses the developed module to exec() a bash shell with root privileges. Modify the Makefile so that above program will compile when “make test” is run
8. Test the developed module for its functionality and discuss the obtained results
9. Demonstrate the working of device driver to the module leader.
This is An Assignment Given from Collage for Home work and Self study.
We are requesting help from this forum. the collage details is given below as per forum rules. Thanks In advance.
M.S RAMAIAH SCHOOL OF ADVANCED STUDIES.
Bangalore
India.
Department: Electronics and communication engineering
Course: Real-time Embedded Systems
Module Code: ESD 519
Module Title: Device Driver Development
Module Leaders: Shilpa Chaudhari
10 More Discussions You Might Find Interesting
1. Solaris
Hi I have a system that gave me some messages on bootup that I was not used to seeing:
pseudo: pseudo-device: vol0
genunix: vol0 is /pseudo/vol@0
these came with these:
Feb 13 17:42:17 system1 eri: SUNW,eri0 : 100 Mbps full duplex link up
Feb 13 17:42:21 system1sendmail: My unqualified... (0 Replies)
Discussion started by: mndavies
0 Replies
2. Linux
I have been experimenting with Linux and the latest one is Mint. After a few weeks it has become like some of the others I have tried, gone into silly mode. In other words the Linux bugs have defeted me. Yeh, I have no idea what I am doing to a point but I like to see how things tick and try... (4 Replies)
Discussion started by: Tony_photoplus
4 Replies
3. UNIX for Dummies Questions & Answers
hi
i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help
Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies
4. Shell Programming and Scripting
Can Anybody help to create a pseudo-device and write a device driver for it. The pseudo-device provides a “backdoor” for gaining root access for a particular user. Instead of compiling the device driver into the kernel. Modules are object binaries that can be dynamically loaded into the kernel.
... (1 Reply)
Discussion started by: nyjilgeorge1
1 Replies
5. UNIX for Advanced & Expert Users
I am trying to load into the kernel a system-call dynamically (without restarting the kernel and compailing it) in an attempt to (once in kernel mode) write to user process's memory.
(I know there is a way to do this with the ptrace interface but it is not an option.)
I know the only way to... (1 Reply)
Discussion started by: hopelessProgram
1 Replies
6. Cybersecurity
Tails (LiveCD) is crap, and I'm being nice here. Bloated, contains HAMRADIO and PACKET RADIO modules which no one in their right mind would use on a distro aimed at Tor use, I don't even believe 1% of Linux users use them, yet they're generated right there in the directories. Google about ham radio... (0 Replies)
Discussion started by: chipinmybrain
0 Replies
7. Solaris
Hello
I am a new (and only) administrator of a Solaris 10 environment. The previous admin gave me a use (say user123) that is supposed to have administrative privileges.
Now the problem is, the user does not have this privilege! Here is what i tried so far:
$ id
uid=109(user123) gid=1(other)... (3 Replies)
Discussion started by: abohmeed
3 Replies
8. Shell Programming and Scripting
Currently in my system Red Hat is installed. And Many user connect to my machine via SSH Techia Terminal.
I want to give some users a root level access.
Can anyone please help me how to make it possible. I too searched on the Google but didn't find the correct way
Regards
ADI (4 Replies)
Discussion started by: adisky123
4 Replies
9. Ubuntu
I cannot access or boot from my C drive. I'm running Zorin 9 and the drive is a Samsung SSD. The disk was encrypted on install, and that has not given me any problems before.
When I start the system it gets to the memory test page, and does not then load the password prompt, which it used to.... (1 Reply)
Discussion started by: David4321
1 Replies
10. AIX
greetings, just ran across a fun situation we had overlooked.
We have a backdoor user, no special privileges, which we put on every server so that anyone in the shop can get in (passwd in vault) if they need to, even if they don't have a local account on that server. The point of course is to... (3 Replies)
Discussion started by: maraixadm
3 Replies
usb_mid(7D) Devices usb_mid(7D)
NAME
usb_mid - USB Multi Interface Driver
SYNOPSIS
device@unit-address
DESCRIPTION
The usb_mid driver is a USBA (Solaris Universal Serial Bus Architecture) compliant nexus driver that binds to device level nodes of a com-
posite (multi interface) device if no vendor or class specific driver is available. The usb_mid driver attempts to bind drivers to each of
the composite device's interfaces.
FILES
/kernel/drv/usb_mid 32-bit x86 ELF kernel module
/kernel/drv/amd64/usb_mid 64-bit x86 ELF kernel module
/kernel/drv/sparcv9/usb_mid 64-bit SPARC ELF kernel module
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+------------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+------------------------------+
|Architecture |SPARC, x86, PCI-based systems |
+-----------------------------+------------------------------+
|Availability |SUNWusb |
+-----------------------------+------------------------------+
SEE ALSO
cfgadm_usb(1M), attributes(5), usba(7D)
Writing Device Drivers
Universal Serial Bus Specification 1.0 and 1.1
System Administration Guide: Basic Administration
http://www.sun.com/io
DIAGNOSTICS
In addition to being logged, the following messages may appear on the system console. All messages are formatted in the following manner:
Warning: <device path> (usb_mid<instance number>): Error Message...
Cannot access <device>. Please reconnect.
This device has been disconnected because a device other than the original one has been inserted. The driver informs you of this fact
by displaying the name of the original device.
Device not identical to the previous one on this port. Please disconnect and reconnect.
Same condition as described above; however in this case, the driver is unable to identify the original device with a name string.
Please disconnect and reconnect this device.
A hotplug of the device is needed before it can be restored.
SunOS 5.10 9 Oct 2004 usb_mid(7D)