Ultimate linux password cracking

Source: Internet
Author: User

Author: gbm team: www.anying.org Original: http://www.anying.org/thread-3710-1-1.html
Reprinted, please indicate the author and team, the offenders must investigate

I have been writing articles related to linux for a long time. As a pseudo-technology developed by O & M personnel, I think linux is a future trend. Therefore, the first step of linux Password security is crucial, this post describes the attack and defense of linux passwords. The platform is Red Hat Linux (2.4.20-8 ).

Certificate ----------------------- Part 1: crack the logon password GRUB: enter [e] on the boot loader menu to enter the editing mode. You will face a list of pilot projects. Find the line with the output similar to the following: kernel/vmlinuz-2.4.18-0.4 ro root =/dev/hda2 press the arrow keys until the line is highlighted and then press [e]. Now you can add a single entry at the end of the text to tell GRUB to guide the Linux mode of a single user. Press the [Enter] key to make the editing result take effect. You will be taken with the edit mode screen. From here, press and GRUB will guide the single-user Linux mode. After loading, you will face a shell prompt similar to the following: sh-2.05 # now, you can change the root command and type: bash # passwd root you will be asked to retype the password for verification. After the password is changed, you can enter reboot at the prompt to reboot. Then, you can log on as the root user as usual. When the LILO boot screen appears after the LIL system is started, press TAB for the graphic Boot Mode to enter the text mode, and then enter linux single press enter at LILO to enter the password-free console, use the passwd command to change the root password. Method 2: Choose grub-> linux-> select the intermediate item --- E ---> enter (/linux s init 1) at the prompt and press enter -- B --> restart, enter (vi/etc/passwd) at the prompt and remove the user's password transfer bit (x) and save it forcibly)-restart! This is the most common and quickest way to prevent others from modifying passwords in single-user mode. To guide the single-user mode, you must edit it in grub. Therefore, we only need to encrypt grub and prevent others from modifying grub. The method is as follows: 1. grub has a configuration file in the/etc folder. The name is "grub. conf". Locate the file and use vi to edit it. 2. let's take a look at the content in the file: (annotation is free) default = 0 timeout = 10 splashimage = (hd0, 0)/grub/splash.xpm.gz title Red Hat Linux (2.4.20-8) root (hd0, 0) kernel/vmlinuz-2.4.20-8 ro root = LABEL =/initrd/initrd-2.4.20-8.img specific meaning you can view the grub documentation, here we want to add a password. You can add a password in two places. 3. Add "password = 123456" (123456 is your password) under "timeout = 10 ). Save, exit, and restart. We can see that the grub interface cannot be modified by "e. To modify the password, press "p" to enter the password. 4. The second place is under "initrd/initrd-2.4.20-8.img. Add "password = 123456" here (123456 is your password ). Save, exit, and restart. We can see that there is another password before linux is started (after the grub interface. It is worth noting that this password can prevent entry in single-user mode. That is to say, even if we start the single-user mode by editing grub, we still need to enter this password. Certificate -------------------------- Part 2: how to crack the grub Password and obtain user permissions. To obtain the grub Password, we have to find a way to read the grub. conf file. But there is no grub Password, no root password... Therefore, we cannot boot through grub. The method is as follows: 1. First, modify the VM startup mode. We need to start the VM from the CD. By default, virtual machines use the hard disk as the first boot mode. When the virtual machine is started (the big "vmware" Interface), immediately press "F2" to enter the bios. 2. Select the boot column. Select the CD-ROM Drive item and press + to upgrade the CD-ROM Drive to the top. In this way, the first boot mode is enabled by default. 3. Bind The first installation disk image of linux to the optical drive, save it, and restart it. The system directly enters the installation interface of linux. Enter "linux rescue" at the prompt and press Enter. The system will start the linux rescue mode. 4. There are several options on the way, just select as prompted. Finally, we will see a description, which means that the rescue system mounts the original system file (the one on the hard disk) to the "/mnt/sysimage" folder. 5. After starting, we can find the grub. conf file. Note the structure of the folder: we are now in the root directory of the rescue system. We are looking for the "/etc/grub. conf" of the original system, so the complete path is: "/mnt/sysimage/etc/grub. conf ". You can use vi to edit the file and modify it. To crack the grub Password. Prevent others from booting to the linux rescue mode. We can see that the bios must be modified to boot to the rescue mode. Then, we can encrypt the bios to prevent others from modifying the bios and thus cannot boot from the disc. The method is as follows. After entering the bios, select "Security. Press enter on "Set Supervisor Password. Set the password. In this way. We need a password when restarting the system and entering the bios again. Part 5: how to crack the bios password. What methods do we usually use to clear the host bios password? Unplug the Jumper and swap the battery to restore the bios settings. Is there a similar method on a virtual machine? The method is as follows: Find the folder where the VM is located. There should be a file with the suffix ". nvram. Delete this file. Start the system. We can see that. The bios is reset. Summary -------------------------- this article is over.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.