Hacking via SQL injection
-
- Power Poster
- Posts: 444
- Joined: Wed Dec 27, 2006 5:15 pm
Hacking via SQL injection
Two sites, related only because they have the same owner, have been hacked. The hacker only changes the Admin users. password in the database which means of course that he can then use the 'lost password' facility to get in to the CMS.
The website host says: 'DB change probably was done through some DB injection and not from the cPanel.'
The host also says: 'SQL injection targets the data residing in the database. It attempts to modify the parameters of a web-based application in order to alter the SQL statements that are parsed to retrieve data from the database. Exploits usually occur due to coding errors as well as inadequate validation checks. In order to prevent this from happening again, I recommend making sure that all website software is kept up to date.'
One of the hacked sites is running the latest version of CMSMS. The other one an earlier version.
One way of stopping this sort of event I suppose is to disable the 'lost password' facility but how to do this and the implications of doing it are outside my 'pay grade'
Any advice please would be appreciated. Thank you.
Martin
The website host says: 'DB change probably was done through some DB injection and not from the cPanel.'
The host also says: 'SQL injection targets the data residing in the database. It attempts to modify the parameters of a web-based application in order to alter the SQL statements that are parsed to retrieve data from the database. Exploits usually occur due to coding errors as well as inadequate validation checks. In order to prevent this from happening again, I recommend making sure that all website software is kept up to date.'
One of the hacked sites is running the latest version of CMSMS. The other one an earlier version.
One way of stopping this sort of event I suppose is to disable the 'lost password' facility but how to do this and the implications of doing it are outside my 'pay grade'
Any advice please would be appreciated. Thank you.
Martin
Re: Hacking via SQL injection
Just curious, is the admin login name like "john" and the mail address like "john@domain.com"?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Hacking via SQL injection
No this will not help preventing SQL injection or its consequences.burlington wrote:One way of stopping this sort of event I suppose is to disable the 'lost password' facility
By far not enough information. You might start with providing the full system info for both sites. And even then there will be thousands of other questions that can be asked before anyone can guess how it happened.burlington wrote:One of the hacked sites is running the latest version of CMSMS. The other one an earlier version.
-
- Power Poster
- Posts: 444
- Joined: Wed Dec 27, 2006 5:15 pm
Re: Hacking via SQL injection
Thank you.
The site that run on 1.11.13 has the system info:
----------------------------------------------
Cms Version: 1.11.13
Installed Modules:
CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.5
MenuManager: 1.8.6
MicroTiny: 1.2.9
ModuleManager: 1.5.8
News: 2.15
Search: 1.7.12
ThemeManager: 1.1.8
FormBuilder: 0.8.1.1
Captcha: 0.5.2
CGExtensions: 1.38.1
SiteMapMadeSimple: 1.2.7
Showtime: 3.4
TinyMCE: 2.9.12
JQueryTools: 1.2.5
CGSimpleSmarty: 1.7
Products: 2.19.6
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.4.19
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 0
memory_limit: 256M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.40
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found
________________________________________
and the site that uses 1.11.7 has:
---------------------------------------------
Cms Version: 1.11.7
Installed Modules:
CMSMailer: 5.2.1
CMSPrinting: 1.0.4
FileManager: 1.4.3
MenuManager: 1.8.5
MicroTiny: 1.2.5
ModuleManager: 1.5.5
News: 2.12.12
Search: 1.7.8
ThemeManager: 1.1.8
TinyMCE: 2.9.12
FormBuilder: 0.7.4
CGExtensions: 1.38
SiteMapMadeSimple: 1.2.7
Showtime: 3.3
Album: 1.10.3
Captcha: 0.4.6
Gallery: 1.6.1
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.4.19
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 0
memory_limit: 256M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.40
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
----------------------------------------------
The site that run on 1.11.13 has the system info:
----------------------------------------------
Cms Version: 1.11.13
Installed Modules:
CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.5
MenuManager: 1.8.6
MicroTiny: 1.2.9
ModuleManager: 1.5.8
News: 2.15
Search: 1.7.12
ThemeManager: 1.1.8
FormBuilder: 0.8.1.1
Captcha: 0.5.2
CGExtensions: 1.38.1
SiteMapMadeSimple: 1.2.7
Showtime: 3.4
TinyMCE: 2.9.12
JQueryTools: 1.2.5
CGSimpleSmarty: 1.7
Products: 2.19.6
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.4.19
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 0
memory_limit: 256M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.40
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found
________________________________________
and the site that uses 1.11.7 has:
---------------------------------------------
Cms Version: 1.11.7
Installed Modules:
CMSMailer: 5.2.1
CMSPrinting: 1.0.4
FileManager: 1.4.3
MenuManager: 1.8.5
MicroTiny: 1.2.5
ModuleManager: 1.5.5
News: 2.12.12
Search: 1.7.8
ThemeManager: 1.1.8
TinyMCE: 2.9.12
FormBuilder: 0.7.4
CGExtensions: 1.38
SiteMapMadeSimple: 1.2.7
Showtime: 3.3
Album: 1.10.3
Captcha: 0.4.6
Gallery: 1.6.1
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.4.19
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 0
memory_limit: 256M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.40
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
----------------------------------------------
-
- Power Poster
- Posts: 444
- Joined: Wed Dec 27, 2006 5:15 pm
Re: Hacking via SQL injection
Thank youRolf wrote:Just curious, is the admin login name like "john" and the mail address like "john@domain.com"?
No. The admin user's name is nothing like a personal name and the @ address bears no relationship to the domain name.
Regards
Martin
Re: Hacking via SQL injection
CMS version: 1.11.13 is NOT the latest version 
1.12 has some security fixes

1.12 has some security fixes
Re: Hacking via SQL injection
The two sites reside on the same host, server and probably under the same account? Are there any other scripts installed other than CMSMS on that account/s?burlington wrote:Two sites, related only because they have the same owner, have been hacked. The hacker only changes the Admin users. password in the database which means of course that he can then use the 'lost password' facility to get in to the CMS.
Probably but not surely. There are other ways to get hold of sensitive data and access the database.burlington wrote:The website host says: 'DB change probably was done through some DB injection and not from the cPanel.'
The host also says: 'SQL injection targets the data residing in the database. It attempts to modify the parameters of a web-based application in order to alter the SQL statements that are parsed to retrieve data from the database. Exploits usually occur due to coding errors as well as inadequate validation checks. In order to prevent this from happening again, I recommend making sure that all website software is kept up to date.'
As Jos implied, to be able to make use of the 'lost password' facility for this the database must be compromised first, and that is what needs to be stopped.Jos wrote:No this will not help preventing SQL injection or its consequences.burlington wrote:One way of stopping this sort of event I suppose is to disable the 'lost password' facility
Once you updated and fixed the sites (hopefully you have full periodic backups), I recommend changing all passwords, including the CPanel ones (access to CPanel can also have been compromised), the FTP ones too if used. There are too many ways to get hold of sensitive data to be sure that this was just an SQL injection issue.
Besides CMSMS has been tested, and has mechanisms to sanitize user input, which are also available to 3rd party modules.
We still need to be able to reproduce this to be able to access if it is a CMSMS issue, and be able to fix it in case it is.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
-
- Power Poster
- Posts: 444
- Joined: Wed Dec 27, 2006 5:15 pm
Re: Hacking via SQL injection
Ok point taken BUT it is new enough for the moment.Jos wrote:CMS version: 1.11.13 is NOT the latest version
1.12 has some security fixes
-
- Power Poster
- Posts: 444
- Joined: Wed Dec 27, 2006 5:15 pm
Re: Hacking via SQL injection
All passwords have been changed. What next please?Jo Morg wrote:The two sites reside on the same host, server and probably under the same account? Are there any other scripts installed other than CMSMS on that account/s?burlington wrote:Two sites, related only because they have the same owner, have been hacked. The hacker only changes the Admin users. password in the database which means of course that he can then use the 'lost password' facility to get in to the CMS.Probably but not surely. There are other ways to get hold of sensitive data and access the database.burlington wrote:The website host says: 'DB change probably was done through some DB injection and not from the cPanel.'
The host also says: 'SQL injection targets the data residing in the database. It attempts to modify the parameters of a web-based application in order to alter the SQL statements that are parsed to retrieve data from the database. Exploits usually occur due to coding errors as well as inadequate validation checks. In order to prevent this from happening again, I recommend making sure that all website software is kept up to date.'As Jos implied, to be able to make use of the 'lost password' facility for this the database must be compromised first, and that is what needs to be stopped.Jos wrote:No this will not help preventing SQL injection or its consequences.burlington wrote:One way of stopping this sort of event I suppose is to disable the 'lost password' facility
Once you updated and fixed the sites (hopefully you have full periodic backups), I recommend changing all passwords, including the CPanel ones (access to CPanel can also have been compromised), the FTP ones too if used. There are too many ways to get hold of sensitive data to be sure that this was just an SQL injection issue.
Besides CMSMS has been tested, and has mechanisms to sanitize user input, which are also available to 3rd party modules.
We still need to be able to reproduce this to be able to access if it is a CMSMS issue, and be able to fix it in case it is.
-
- Power Poster
- Posts: 444
- Joined: Wed Dec 27, 2006 5:15 pm
Re: Hacking via SQL injection
As an alternative solution, I have been told today by a coder that the CMSMS 'contact form' system is vulnerable.
Any news on this?
Again, another thing beyond my 'pay grade'. Perhaps the solution to this is to use a 3rd party contact form.
Martin
Any news on this?
Again, another thing beyond my 'pay grade'. Perhaps the solution to this is to use a 3rd party contact form.
Martin
Re: Hacking via SQL injection
IIRC it was removed from the core a long time ago. So yeah look for alternatives. Actually as you have FormBuilder installed, why not use it for a contact form? Can't get any simpler than using it's sample template...burlington wrote:As an alternative solution, I have been told today by a coder that the CMSMS 'contact form' system is vulnerable.
Any news on this?
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
-
- Power Poster
- Posts: 444
- Joined: Wed Dec 27, 2006 5:15 pm
Re: Hacking via SQL injection
Thanks BUT it is installed AND was used to create the form.Jo Morg wrote:IIRC it was removed from the core a long time ago. So yeah look for alternatives. Actually as you have FormBuilder installed, why not use it for a contact form?burlington wrote:As an alternative solution, I have been told today by a coder that the CMSMS 'contact form' system is vulnerable.
Any news on this?
Re: Hacking via SQL injection
You really have to be explicit and clear with the info you provide.burlington wrote:Thanks BUT it is installed AND was used to create the form.Jo Morg wrote:IIRC it was removed from the core a long time ago. So yeah look for alternatives. Actually as you have FormBuilder installed, why not use it for a contact form?burlington wrote:As an alternative solution, I have been told today by a coder that the CMSMS 'contact form' system is vulnerable.
Any news on this?
If by "the CMSMS 'contact form'" you mean Form Builder then:burlington wrote:I have been told today by a coder that the CMSMS 'contact form' system is vulnerable.
- Form Builder is not a CMSMS core module;
- You need to upgrade it to the latest version in any case (the one with version 0.7.4 as it is buggy and unstable, but not insecure afaik);
- Stating that "a coder said that...." has absolutely no meaning nor does it help fixing any potential issue that might exist;
- From the number of downloads of Form Builder you would expect more security reports if it was insecure (actually that is also true regarding CMSMS);
- Recover from a backup;
- Update core and 3rd party modules;
- Change all pertinent credentials;
- Look for other potential open doors;
- Take further steps to secure CMSMS: http://docs.cmsmadesimple.org/general-i ... ring-cmsms;
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Hacking via SQL injection
There are several third party contact forms you can use within the CMSMS core. Unless we know which one this is, we can't help...burlington wrote:As an alternative solution, I have been told today by a coder that the CMSMS 'contact form' system is vulnerable.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
-
- Power Poster
- Posts: 444
- Joined: Wed Dec 27, 2006 5:15 pm
Re: Hacking via SQL injection
The version is:There are several third party contact forms you can use within the CMSMS core. Unless we know which one this is, we can't help...
Formbuilder 0.8.1.1