# Malicious Methods
### Delete Windows Recovery Partition
There are many reasons why one would want to delete the recovery partion on windows, It can be:
- Want to use a thrid party recovery program
- Have a recovery disk already and don't want overhead
- Unable to increase windows C drive partition
Cons of removing this partition: The recovery partition is a special windows partition that is used to restore windows back to its factory settings by request in the [windows recovery menu](https://support.microsoft.com/en-us/windows/recovery-options-in-windows-31ce2444-7de3-818c-d626-e3b5a3024da5) or in case of a system failure.
::: info
It is completely safe to remove the windows recovery partition as a recovery media can be created or a Windows Installation Medium can be used in case of disaster.
:::
Steps to remove the partition:
1. Open windows command prompt or powershell as **_administrator_**.
2. Disable recovery enviroment:
```bash
reagentc /disable
```
3. Run `diskpart` command
```bash
diskpart
```
4. Check for the **disk number** that has the Recovery Partition. To check, Run
```python
list disk
```
5. Select the correct **disk**
```
select disk NUMBER
```
6. Check for the **partition number** that is the Recovery Partition. To check, Run
```
list partition
```
7. Select the correct **partition**
```
select partition NUMBER
```
8. Delete the **partition**
```
delete partition override
```
Now the Windows Recovery Partition has been deleted and you can exit out of the terminal as no further action is needed.
### How to install CertBot
[Certbot](https://certbot.eff.org) is an SSL installer tool that works with [`letsencrypt`](https://letsencrypt.org) and supports [`nginx`](/Nginx) and `apache`. It works on many systems but this guide will only contain how to use it for debian based systems.
##### Method 1: Using snapd
This is the recommened way of installing certbot (_application_) by certbot (_application developers_). Although, Avoiding snapd should be considered in general applications. It does install certbot with all the plugins you may require which can be an advantage.
::: info
This method includes the steps to install snapd on the machine. Step 1 & 2 can be skipped if `snapd` happpens to be already installed.
:::
1. Update your package repositories.(Only do this if snapd is not installed) Syntax:
```
apt update && apt upgrade -y
```
2. Install snapd. (Only required if snapd is not already installed.) Syntax:
```
apt install snapd -y
```
3. Install certbot. Syntax:
```
snap install --classic certbot
```
4. Set snapd binary. Syntax:
```
ln -s /snap/bin/certbot /usr/bin/certbot
```
##### Method 2: Using apt
Prefering to use apt would always be the recommended way to install software even though it might be behind few versions/not always the latest release of the software. Even though certbot developers don't recommend this way of installation, It can be considered the "better way" to install the software.
1. Update your package repositories & install `software-properties` package. Syntax:
```
apt install software-properties-common && apt update && apt upgrade -y
```
2. Install certbot. Syntax:
```
apt install certbot
```
4. Install `nginx` plugin. Syntax:
```
apt install python-certbot-nginx
```
5. Install `apache` plugin. Syntax:
```
apt install python-certbot-apache
```
### Reset Password on Debian Based systems
Resetting the password on debian based systems is faily easy as long as there's access to the Grub Menu and _don't even require **hotkeys** to be working_. Here's how to reset the password on debian systems using grub menu.
1. On the grub menu, Press `e`
2. Find the line that starts with `linux` and usually (_but not always_) ends with `quiet`.
3. At the end of that line, Type `init=/bin/bash`. If for some reason, bash shell isn't available, `sh` can be used.
4. Press `Ctrl + X` to boot into shell.
5. In the shell, Make sure the disks show up using the `lsblk`/`blkid`/`df` command.
6. Once verified, Type `mount -rw -o remount /` to make the filesystem writeable
7. Now, Type `passwd root` to change the root password of the server.
8. Once done, Reboot the server.
::: warning
Traditional methods of rebooting the server like `reboot` or `systemctl reboot` command won't work. It is recommended that you use `Ctrl` + `Alt` + `Del` to reboot it. Or Power cycling the server is also an option here.
:::
9. Now once the server is booted, you can login to the server using the new password.