Monday, July 27, 2009

hacking root shell in linux

Here describes the way you can obtain linux root shell,by changing the init process.
we need to edit the grub(editing grub is described in previous posts) bootup screen using press 'e' place the end of the line as following

init=/bin/sh

enter and press 'b' for boot

after boot you will get a shining root shell "#"!!
in this above procedure we could bypass the init proces to a shell from what it does in normal.
in this point we didn't mount any file system. (manually mount if it required.normally dont need)
for checking the read right permission for the file system use touch utility

touch something

if it is given an error message then you dont have write permission to the file system.

to gain the filesystem read write permission u need to remount it as follows

mount -o remount,rw /

after that you can do anything as root!!!eg. change the root password. placing commands in inittab etc...remember dont press ctrl+D it will kill the shell causing kernel panic.

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails