Mcrosoft Azure App Certificate is used to secure Azure App Services, now they allow export of this SSL certificate in PFX format, so it can be used in other services like Azure VM or third party applications. You need to use a powershell script provided by Microsoft to do the Export.
To use the SSL certficiate in FPX format in Apache or Nginx web server, you need to convert it.
To do this, run
openssl pkcs12 -in ssl.pfx -nocerts -out key.pem
It will ask for Import password. If you enter a password during pfx file creation, enter it. If not just press enter.
Next it ask for PEM password, enter a password, with out password, it won’t work.
We have key.pem, that is password protected, we need to remove key file with out password, for this, run
If you want to reset password or fix some booting issue, you may need to boot the server in rescue, then mount old live disks and chroot it. Once it is done, you will be able to run commands like passwd to change password or install any missing software with apt/dnf/yum etc.
To chroot a file system, run
mkdir /mnt
mount /dev/sdc1 /mnt
mount /dev/sdc2 /mnt/boot
cd /mnt
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc
mount --bind /dev/pts /mnt/dev/pts/
chroot /mnt
In the above example /dev/sdc1 was / partition. /dev/sdc2 was /boot.
Once you chroot, you can change the root password on the server with the command
passed
If you use LVM for root partition, do
vgscan && vgchange -ay vgubuntu
mount /dev/VG_NAME/root /mnt
Symlink Attack allow a hacker to hack one web site and gain access to another Apache Virtual Hosts in a cpanel server. Hacker will be able to get read access to files on other hosting accounts, with that, they can read web site config files, giving them MySQL or other login info stored in configuration files.
To check if your server have infected with symlink attack, run
find /home/*/public_html -type l > /root/smylinks.txt
Check the content of the file “/root/smylinks.txt”. if you see any site having too many symlinks to other sites, your server is infected with symlink attack.
To prevent this, you can install CloudLinux CageFS.