Skip to content
Access control Write-up Beginner

How I Hack My Friends Pc For Getting Some Files

The author rebooted a friend's Kali Linux machine, edited the boot entry to gain a root shell without a password, then reset the friend's account password. This gave full access to the machine and its files, though only with physical access and the friend's stated permission.

Rajneesh Kumar Arya Follow

Published on systemweakness.com

Hello Friends, I am Rajneesh K. Arya back again with my new and interesting blog on How I hacked my friend’s computer.

Rajneesh Kumar Arya, on systemweakness.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the bootloader configuration allowed anyone with physical access to edit the kernel command line and start a root shell without authentication.

Impact

Anyone with physical access to the machine could gain full control and read or take any files, as the author did.

What the attacker needed

Physical access to the machine; ability to reboot it; friend's permission (author's own rule)

The fix

The bootloader should be protected with a password and the machine should use full-disk encryption so the boot menu cannot be edited to gain a root shell.

How it was found

  1. Reboot the machine and at the Kali Linux boot option press 'e' to edit the entry.
  2. Find the line starting with Linux and change ro to rw, then add an init parameter after quiet splash.
  3. Press ctrl+x to boot and obtain a root shell.
  4. Read the password file to find the friend's username.
  5. Reset that user's password with the passwd command.
  6. Reboot with exec /sbin/init and log in with the new password.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When a computer starts up, the boot menu lets you change how the operating system loads. Here the author changed the startup options so the machine dropped straight into a root shell, which is a command prompt with full administrator power and no password needed. From there they could reset any user's password and log in normally.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Rajneesh Kumar Arya

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.