Thursday 13 March 2014

Hack A Linux System

Now, in the world of OS, the most secure system is that of Linux. Here I am gonna show you how to break into a linux OS. Basically all you need is the root password to do anything in linux, Right! I have successfully tried it myself. The system I used was LXLE. You just need GRUB to do this trick.

Here's how you do it:
  • Interrupt linux boot. (Basically, keep Shift Key pressed)
  • Now, you have the GRUB menu, highlight the OS and press e for edit
  • Find the line which contains something on the lines
/vmlinuz -somenumber-generic
  •  At the end of said line, add 1 or s or single after a space (I tried with single and 1, but single worked)
  • Boot with the current settings (I can't exactly list how to do so, since it differs in each flavor)
  • By doing just this you may get root access
  • Now, you do whatever you want. But just in case you tried changing root password and it does not give any output. (Well, that's because SELinux is interrupting)
  • Then, type setenforce 0 to switch SELinux into permissive mode and try again. 
  • If it says something on the lines that setenforce is not installed, then install it and try again.
And that's about it. Now, you can pretty much do anything ranging from changing root password to adding new hidden accounts (I am gonna post on it soon) and even changing password of present user accounts or even deleting them.

I don't actually care why you do this. But I just have to say it, this is sweet.

If I didn't mention something or left something out, then please let me know. There are other ways of hacking a linux box which I have not mentioned, so if you do know of it let us all know.

As Always thanks for reading and please comment.

3 comments:

  1. lock down single user : echo "~~:S:wait:/sbin/sulogin" >> /etc/inittab
    Add a password to grub

    ReplyDelete
    Replies
    1. Yep, that would stop this hack. But, then there is one more way, in the boot sequence edit kernel by adding init=/bin/bash and then boot.

      Delete
    2. I have yet to try this one out. Hey, do you know how to hack a linux system if the bootloader was LILO.

      Delete

Stuff that most try to do