January 8, 2023

How to Secure Your Linux System by Adding a Bootloader Password



The GRUB (Grand Unified Bootloader) is a bootloader that is used by many Linux distributions to boot the operating system. You can set a password for GRUB to protect the boot process and prevent unauthorized changes to the boot options.

To set a password for GRUB in Linux, follow these steps:
 

1) Open a terminal window on your Linux machine.

2) Run the grub-mkpasswd-pbkdf2 command to generate a password hash. For example:

$ sudo grub-mkpasswd-pbkdf2


This will prompt you to enter a password and confirm it. The command will then output a password hash.


3) Edit the GRUB configuration file using a text editor. The file is usually located at /etc/grub.d/40_custom, but the location may vary depending on your distribution.


$ sudo nano /etc/grub.d/40_custom


4) Add the following lines to the configuration file, replacing <username> with your desired username and <password_hash> with the password hash generated in step 2:

set superusers="{username}"
password_pbkdf2 {username} {password_hash}


5) Save and close the configuration file. 


6) Run the update-grub command to update the GRUB configuration.


$ sudo update-grub


7) Reboot your machine and test the password by pressing e at the GRUB boot menu to edit the boot options. You should be prompted for the password before you can make any changes.

It's important to note that the password protection provided by GRUB is only as secure as the password you set. Choose a strong, unique password to protect your system from unauthorized access.

That's it! If you have any problem regarding this, please comment below. 


Also Read -

How to create a ESP8266 Wi-Fi Deauthenticator in just $4

DIY WiFi Repeater with an ESP8266: A Step by Step Guide 

How to do rogue AP attack in Linux using WifiPumpkin3

January 4, 2023

DIY WiFi Repeater with an ESP8266: A Step by Step Guide


 

The ESP8266 is a low-cost, low-power microcontroller with built-in WiFi support. It was originally developed by Espressif Systems as a solution for offloading WiFi networking functions from more expensive, power-hungry microprocessors.

An ESP8266 WiFi repeater, also known as a WiFi range extender, takes an existing WiFi signal and rebroadcasts it to create a second network. This can be used to extend the range of a WiFi network, or to provide wireless connectivity to devices that are out of range of the main network.

 

To set up an ESP8266 WiFi repeater, you will need:

 

  • An ESP8266 development board, such as the NodeMCU or Wemos D1 mini or Lolin
  • A USB data cable, to power the ESP8266
  • The Arduino IDE software, which you can download for free from the Arduino website (https://www.arduino.cc/en/Main/Software)

 

1] First you need to configure the ESP8266 in the Arduino IDE, follow these steps:

  1. Download and install the Arduino IDE from the Arduino website (https://www.arduino.cc/en/Main/Software).
  2. Connect your ESP8266 development board to your computer using a USB cable.
  3. Open the Arduino IDE and go to "File" > "Preferences".
  4. In the "Additional Board Manager URLs" field, enter the following URL: http://arduino.esp8266.com/stable/package_esp8266com_index.json
  5. Click "OK" to close the Preferences window.
  6. Go to "Tools" > "Board: " > "Boards Manager...".
  7. In the Boards Manager, search for "esp8266" and click on the "Install" button for the "esp8266" entry.
  8. Wait for the installation to complete, then close the Boards Manager window.
  9. Go to "Tools" > "Board: " and select your ESP8266 board from the list. The exact board name will depend on the specific ESP8266 development board you are using.
  10. Go to "Tools" > "Port" and select the COM port for your ESP8266. The COM port should appear as "USB-SERIAL CH340 (COMxx)" or "FT232R USB UART (COMxx)".

 

2] After configuration, Copy and paste the following code into the Arduino IDE, replacing "your_ssid" and "your_password" with the SSID and password of your existing WiFi network:

 

#include 
 //Replace Your Router's SSID and password.

const char * ssid = "your_ssid";
const char * password = "your_password";

// Replace ESP Wifi SSID and Password

const char * ssid_soft_ap = "ESPRepeater";
const char * pwd_soft_ap = "Pass@12345"
int Wifi_SoftAP_Channel = 9;

// Rename ESP name to find easily on your router

const char * espHostname = "ESPRepeater";
void setup() {
  WiFi.mode(WIFI_AP_STA);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    WiFi.hostname(espHostname);
    delay(500);
  }
  WiFi.softAP(ssid_soft_ap, pwd_soft_ap, Wifi_SoftAP_Channel);
}
void loop() {}

 

3] Click the "Upload" button to upload the code to the ESP8266.

 

4] Once the code has been uploaded, open the serial monitor in the Arduino IDE. The ESP8266 should connect to your existing WiFi network and display its IP address.

 

5] Connect a device to the ESP8266's WiFi network and verify that it is able to connect to the internet.

 

That's it! Your ESP8266 should now be functioning as a WiFi repeater, rebroadcasting the signal from your existing WiFi network and providing wireless connectivity to devices that are out of range.

Also Read -

How to create a ESP8266 Wi-Fi Deauthenticator in just $4

How to do rogue AP attack in Linux using WifiPumpkin3 

Enable monitor mode in linux without disconnecting Wi-Fi