Installing IonCube bootloader on VPS CentOS 7

The IonCube Uploader is a PHP module that allows PHP to upload files protected by the IonCube encoder software. It is mainly used by many commercial software vendors to protect and hide their code. In this tutorial, we will show you how to connect an IonCube bootloader on a CentOS 7 VPS.

Login to VPS CentOS 7 via SSH as root user

ssh [email protected]_Address

and update all installed services

yum update

Run ‘arch’ command in terminal to check if your system is 32-bit (i686) or 64-bit (x86_64)

# arch
x86_64

In our case, the system is 64-bit, so we will download the 64-bit version of the IonCube bootloader

Wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

If you have a 32-bit version of the system, then download the following archive

Wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz

After downloading, unpack the archive

tar xfz ioncube_loaders_lin_x86-64.tar.gz

The IonCube loader for all PHP versions will be extracted to a new ‘IonCube’ directory.

We need to know the PHP version installed on our server. We can find out the version with the following command

# php -v
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

We have PHP version 5.4.16 installed on our test server, so we need an appropriate IonCube downloader.

List the contents of the ‘IonCube’ directory to find the file you want

# ls ioncube
ioncube_loader_lin_4.1.so     
ioncube_loader_lin_4.4.so     
ioncube_loader_lin_5.1.so     
ioncube_loader_lin_5.3.so     
ioncube_loader_lin_5.5.so     
LICENSE.txt        
USER-GUIDE.txt
ioncube_loader_lin_4.2.so     
ioncube_loader_lin_4.4_ts.so  
ioncube_loader_lin_5.1_ts.so  
ioncube_loader_lin_5.3_ts.so  
ioncube_loader_lin_5.5_ts.so  
loader-wizard.php
ioncube_loader_lin_4.3.so     
ioncube_loader_lin_5.0.so     
ioncube_loader_lin_5.2.so     
ioncube_loader_lin_5.4.so     
ioncube_loader_lin_5.6.so     
README.txt
ioncube_loader_lin_4.3_ts.so  
ioncube_loader_lin_5.0_ts.so  
ioncube_loader_lin_5.2_ts.so  
ioncube_loader_lin_5.4_ts.so  
ioncube_loader_lin_5.6_ts.so  
USER-GUIDE.pdf

We will use the file ‘ioncube_loader_lin_5.4.so’ because it matches our PHP version. If you have a different PHP version installed on your server you will need to use the appropriate file.

To find out the location of the extension directory, run the following command

# php -i | grep extension_dir
extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules
sqlite3.extension_dir => no value => no value

Copy the ‘ioncube_loader_lin_5.4.so’ IonCube loader to the extensions directory marked in red.

cp ioncube/ioncube_loader_lin_5.4.so /usr/lib64/php/modules

Now open your PHP config file and add the following line

# vi /etc/php.ini
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.4.so

Take note of the path to the PHP configuration file, which may be different on your server. You can search for the name ‘php-ini’ to find the loaded PHP config file.

# php --ini |grep "Loaded Configuration File"
Loaded Configuration File:         /etc/php.ini

Save the configuration file and restart the Apache web server to apply the changes to the server.

systemctl restart httpd

You can check if the IonCube bootloader is activated successfully or not with the following command

# php -v
PHP 5.4.16 (cli) (built: Aug 11 2016 21:24:59)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.2, Copyright (c) 2002-2016, by ionCube Ltd.

PS. If you liked this pos, you can share it with your friends in social. networks using the buttons on the right side of the post or just leave a comment below. Thank you.

Sidebar