This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:nbrimme1:portfolio:break-into-linux [2019/02/13 03:34] – [Loop Device] nbrimme1 | user:nbrimme1:portfolio:break-into-linux [2019/02/22 00:44] (current) – [Method 2: boot to single-user mode] nbrimme1 | ||
---|---|---|---|
Line 11: | Line 11: | ||
=====Procedure===== | =====Procedure===== | ||
====Method 1: Using /sbin/init to execute a shell==== | ====Method 1: Using /sbin/init to execute a shell==== | ||
+ | [[https:// | ||
- Power on/reboot the target machine | - Power on/reboot the target machine | ||
- Through a graphical login screen: for a clean reboot just use the shutdown/ | - Through a graphical login screen: for a clean reboot just use the shutdown/ | ||
Line 20: | Line 21: | ||
- Continue booting. | - Continue booting. | ||
- | DONE! THAT'S ALL FOLKS! | + | DONE! THAT'S ALL FOLKS!\\ |
After the target machine finishes booting, the kernel will detect the hardware and immediately drop you into a root shell. Since the system initialization script '/ | After the target machine finishes booting, the kernel will detect the hardware and immediately drop you into a root shell. Since the system initialization script '/ | ||
- | we need to remount the root file system | + | you need to remount the root file system to make the system more usable: |
- | - Mount the /proc file system: < | + | - Mount the /proc file system: < |
- Remount the root file system in read-write mode: < | - Remount the root file system in read-write mode: < | ||
- | - Depending on how the target' | + | - Depending on how the target' |
- Do whatever nefarious things you want: | - Do whatever nefarious things you want: | ||
- **Change the root account password:** < | - **Change the root account password:** < | ||
- | - **PROTIP:** I don't recommend doing this as the next time the real user logs into the system they will notice that their root password has been changed. We need to be super sneaky, secretive, and surreptitious so here's something a little less noticeable: | + | - **PROTIP:** I don't recommend doing this. The next time the real user logs into the system they will notice that the root password has been changed |
- Simply add another user without modifying the original root password: < | - Simply add another user without modifying the original root password: < | ||
passwd bad-user</ | passwd bad-user</ | ||
- | - Also add the newly created user to the sudoers file. This is also not as noticable as changing the actual root password: < | + | - Now add the newly created user to the sudoers file. This is also not as noticable as changing the actual root password: < |
bad-user ALL=(ALL) ALL</ | bad-user ALL=(ALL) ALL</ | ||
- | - Reboot the target machine to make the changes | + | - Reboot the target machine to make any changes to the file system persistent. |
- | - Once the file systems are all unmounted, you can reboot | + | - Flush any disk I/O to the hardware: < |
+ | - Unmount any mounted file systems in reverse order: < | ||
+ | - Reboot | ||
====Method 2: boot to single-user mode==== | ====Method 2: boot to single-user mode==== | ||
+ | [[https:// | ||
- Power on/reboot the target machine | - Power on/reboot the target machine | ||
- Through a graphical login screen: for a clean reboot just use the shutdown/ | - Through a graphical login screen: for a clean reboot just use the shutdown/ | ||
Line 132: | Line 136: | ||
**Note:** /dev/sdb1 will be used as the test partition, ' | **Note:** /dev/sdb1 will be used as the test partition, ' | ||
< | < | ||
- | cryptsetup -c aes-xts-plain64 --key-size 512 \ | + | cryptsetup -c aes-xts-plain64 |
- | --hash sha512 --use-urandom /dev/sdb1 | + | --key-size 512 --hash sha512 |
+ | --iter-time 5000 --use-urandom /dev/sdb1 | ||
# open volume onto device mapper | # open volume onto device mapper | ||
cryptsetup open /dev/sdb1 private | cryptsetup open /dev/sdb1 private |