Blame
b58610 | Arpan S. | 2024-03-30 14:30:56 | 1 | # Malicious Methods |
2 | ||||
3 | ### Delete Windows Recovery Partition | |||
4 | There are many reasons why one would want to delete the recovery partion on windows, It can be: | |||
5 | - Want to use a thrid party recovery program | |||
6 | - Have a recovery disk already and don't want overhead | |||
7 | - Unable to increase windows C drive partition | |||
8 | ||||
9 | 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. | |||
10 | ||||
11 | ::: info | |||
12 | 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. | |||
13 | ::: | |||
14 | ||||
15 | Steps to remove the partition: | |||
16 | ||||
17 | 1. Open windows command prompt or powershell as **_administrator_**. | |||
18 | 2. Disable recovery enviroment: | |||
19 | ```bash | |||
20 | reagentc /disable | |||
21 | ``` | |||
22 | 3. Run `diskpart` command | |||
23 | ```bash | |||
24 | diskpart | |||
25 | ``` | |||
26 | 4. Check for the **disk number** that has the Recovery Partition. To check, Run | |||
27 | ```python | |||
28 | list disk | |||
29 | ``` | |||
30 | 5. Select the correct **disk** | |||
31 | ``` | |||
32 | select disk NUMBER | |||
33 | ``` | |||
34 | 6. Check for the **partition number** that is the Recovery Partition. To check, Run | |||
35 | ``` | |||
36 | list partition | |||
37 | ``` | |||
38 | 7. Select the correct **partition** | |||
39 | ``` | |||
40 | select partition NUMBER | |||
41 | ``` | |||
42 | 8. Delete the **partition** | |||
43 | ``` | |||
44 | delete partition override | |||
45 | ``` | |||
46 | ||||
47 | Now the Windows Recovery Partition has been deleted and you can exit out of the terminal as no further action is needed. | |||
ddcb5e | Arpan S. | 2024-04-12 11:50:35 | 48 | |
49 | ### How to install CertBot | |||
50 | [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. | |||
51 | ||||
52 | ##### Method 1: Using snapd | |||
f2cae6 | Arpan S. | 2024-04-13 11:30:22 | 53 | 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. |
54 | ||||
55 | ::: info | |||
56 | This method includes the steps to install snapd on the machine. Step 1 & 2 can be skipped if `snapd` happpens to be already installed. | |||
57 | ::: | |||
58 | ||||
59 | 1. Update your package repositories.(Only do this if snapd is not installed) Syntax: | |||
60 | ``` | |||
61 | apt update && apt upgrade -y | |||
62 | ``` | |||
63 | 2. Install snapd. (Only required if snapd is not already installed.) Syntax: | |||
64 | ``` | |||
65 | apt install snapd -y | |||
66 | ``` | |||
67 | 3. Install certbot. Syntax: | |||
68 | ``` | |||
69 | snap install --classic certbot | |||
70 | ``` | |||
71 | 4. Set snapd binary. Syntax: | |||
72 | ``` | |||
73 | ln -s /snap/bin/certbot /usr/bin/certbot | |||
74 | ``` | |||
80ce5c | Arpan S. | 2024-04-12 15:15:03 | 75 | |
7561fa | Arpan S. | 2024-04-14 08:39:09 | 76 | ##### Method 2: Using apt |
77 | 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. | |||
78 | ||||
79 | 1. Update your package repositories & install `software-properties` package. Syntax: | |||
80 | ``` | |||
81 | apt install software-properties-common && apt update && apt upgrade -y | |||
82 | ``` | |||
83 | 2. Install certbot. Syntax: | |||
84 | ``` | |||
85 | apt install certbot | |||
86 | ``` | |||
87 | 4. Install `nginx` plugin. Syntax: | |||
88 | ``` | |||
89 | apt install python-certbot-nginx | |||
90 | ``` | |||
91 | 5. Install `apache` plugin. Syntax: | |||
92 | ``` | |||
93 | apt install python-certbot-apache | |||
94 | ``` | |||
80ce5c | Arpan S. | 2024-04-12 15:15:03 | 95 | ### Reset Password on Debian Based systems |
96 | 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. | |||
97 | ||||
98 | 1. On the grub menu, Press `e` | |||
99 | 2. Find the line that starts with `linux` and usually (_but not always_) ends with `quiet`. | |||
100 | 3. At the end of that line, Type `init=/bin/bash`. If for some reason, bash shell isn't available, `sh` can be used. | |||
101 | 4. Press `Ctrl + X` to boot into shell. | |||
102 | 5. In the shell, Make sure the disks show up using the `lsblk`/`blkid`/`df` command. | |||
103 | 6. Once verified, Type `mount -rw -o remount /` to make the filesystem writeable | |||
104 | 7. Now, Type `passwd root` to change the root password of the server. | |||
105 | 8. Once done, Reboot the server. | |||
106 | ::: warning | |||
107 | 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. | |||
108 | ::: | |||
109 | 9. Now once the server is booted, you can login to the server using the new password. |