How to Optimize MySQL

CentOS
There is a default my.cnf that comes with mysql (4+5) that will make mysql run a bit quicker if you have 2+ gig of ram cp -f /usr/share/mysql/my-large.cnf /etc/my.cnfThere is also my-huge.cnf, or my-medium.cnf depending on your hardware setup.   Check the contents of these my*.cnf files for the one that’s right for you.

*NOTE* the log-bin option is enabled  by default.  This will quickly use a lot of disk space.  It’s recommended to comment out the log-bin line from your /etc/my.cnf, if it exists.

 

Remember to restart mysql when you are done with your my.cnf tweaking:

Redhat:/sbin/service mysqld restart

FreeBSD:/usr/local/etc/rc.d/mysqld restart

WHMCS SQL injection Exploit

** A patch was released. See http://blog.whmcs.com/?t=80223  

WHMCS, a popular billing/support/customer management system, is still suffering from critical SQL injection issues. Today, yet another vulnerability, including exploit was released. 

Due to the fact that there is no patch available at this point, I will refrain from linking to any exploit details, but it is pretty trivial to find the respective blog post which includes a script to exploit the vulnerability. WHMCS acknowledged the problem.

The root cause of this problem, as well as prior problems with the software, appears to be a lack in understanding of proper controls to prevent SQL injection. Good input validation is just a start, but prepared statements are a must. Instead, the WHMCS developers used a rather complex (and buggy) function to escape user input and assemble dynamic SQL queries.

The bug is in a function used throughout WHMCS, so the exploit is not limited to a particular URL.

http://blog.whmcs.com/?t=80206

Multiple vulnerabilities mysql – Mandriva

  Problem Description:
  Multiple vulnerabilities has been discovered and corrected in mysql:
  Unspecified vulnerability in MySQL 5.5.x before 5.5.23 has unknown
  impact and attack vectors related to a Security Fix, aka Bug
  #59533. NOTE: this might be a duplicate of CVE-2012-1689, but as of
  20120816, Oracle has not commented on this possibility (CVE-2012-2750).
  Unspecified vulnerability in the MySQL Server component in Oracle
  MySQL 5.1.70 and earlier, 5.5.32 and earlier, and 5.6.12 and earlier
  allows remote authenticated users to affect availability via unknown
  vectors related to Optimizer (CVE-2013-3839).
  The updated packages have been upgraded to the 5.1.72 version which
  is not vulnerable to these issues.
  _______________________________________________________________________
  References:
  _______________________________________________________________________
  Updated Packages:
  Mandriva Enterprise Server 5:
  ba2a7994838db84ffdc554e6897ec6b8  mes5/i586/libmysql16-5.1.72-0.1mdvmes5.2.i586.rpm
  f761773fd2dd239a9982e41488a01589  mes5/i586/libmysql-devel-5.1.72-0.1mdvmes5.2.i586.rpm
  abfdfe6c0c1af08a146002d41c65ccf7  mes5/i586/libmysql-static-devel-5.1.72-0.1mdvmes5.2.i586.rpm
  5a356e9080a7e351c34d69615b67138f  mes5/i586/mysql-5.1.72-0.1mdvmes5.2.i586.rpm
  ceea7d8c944d46832cd7d1715a0b9faa  mes5/i586/mysql-bench-5.1.72-0.1mdvmes5.2.i586.rpm
  0c534ad2edd6e3a19ab619bff7e28411  mes5/i586/mysql-client-5.1.72-0.1mdvmes5.2.i586.rpm
  1b8da9ced8bb0f1b641f4a610da6dfc1  mes5/i586/mysql-common-5.1.72-0.1mdvmes5.2.i586.rpm
  1cf5ea7c2186cae90ca188fe5ee4d96b  mes5/SRPMS/mysql-5.1.72-0.1mdvmes5.2.src.rpm
  Mandriva Enterprise Server 5/X86_64:
  412d97676eff68f560968bfb499342ca  mes5/x86_64/lib64mysql16-5.1.72-0.1mdvmes5.2.x86_64.rpm
  d53dc8b107a306df0da123b00fef42e4  mes5/x86_64/lib64mysql-devel-5.1.72-0.1mdvmes5.2.x86_64.rpm
  3f65e5f322b7d0cb98bfb3d5c92937a1  mes5/x86_64/lib64mysql-static-devel-5.1.72-0.1mdvmes5.2.x86_64.rpm
  5237d5ee69b11bb576f117dd9477ec56  mes5/x86_64/mysql-5.1.72-0.1mdvmes5.2.x86_64.rpm
  db8fe6784e34ddb88b7e020db79d1272  mes5/x86_64/mysql-bench-5.1.72-0.1mdvmes5.2.x86_64.rpm
  9a15c79afd52d0a5794d52d06eef1146  mes5/x86_64/mysql-client-5.1.72-0.1mdvmes5.2.x86_64.rpm
  bb37ec21d892efe9950f1dc4b09fda6b  mes5/x86_64/mysql-common-5.1.72-0.1mdvmes5.2.x86_64.rpm
  1cf5ea7c2186cae90ca188fe5ee4d96b  mes5/SRPMS/mysql-5.1.72-0.1mdvmes5.2.src.rpm
  _______________________________________________________________________
  To upgrade automatically use MandrivaUpdate or urpmi.  The verification
  of md5 checksums and GPG signatures is performed automatically for you.
  All packages are signed by Mandriva for security.  You can obtain the
  GPG public key of the Mandriva Security Team by executing:
  gpg –recv-keys –keyserver pgp.mit.edu 0x22458A98
  You can view other update advisories for Mandriva Linux at:

WordPress WP Realty Plugin – Blind SQL Injection

# Exploit Title: WordPress - wp-realty - MySQL Time Based Injection

# Google Dork: inurl:"/wp-content/plugins/wp-realty/"
# Vendor: http://wprealty.org/
# Date: 10/08/2013
# Exploit Author: Napsterakos
Link: http://localhost/wordpress/wp-content/plugins/wp-realty/
Exploit: http://localhost/wordpress/wp-content/plugins/wp-realty/index_ext.php?action=contact_friend&popup=yes&listing_id=[SQLi]

Zabbix 2.0.8 SQL Injection and Remote Code Execution

This exploits an unauthenticated SQL injection vulnerability affecting Zabbix versions 2.0.8 and lower.  The SQL injection issue can be abused in order to retrieve an active session ID.  If an administrator level user is identified, remote code execution can be gained by uploading and executing remote scripts via the 'scripts_exec.php' file.