-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local File Read and RCE in Cacti 1.1.27+ds1-2 #1066
Comments
I confirm the local file read issue. |
Those two issues have been assigned http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-16660 and http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-16661 |
- This issue will stop the injection point in the call - Also adding a timeout to the polldata function to prevent long running scripts from blocking the web server.
The Remote Agent part is fixed. I will take a crack at the Cacti log issue. I have an idea since I don't want the impact of this change to be large. |
Resolve second half of Issue #1066 which is CVE-2017-16661.
These both should be resolved now. Please confirm and close if so. |
In your commit a179e8092dbff7406e39ca16c2823f4fe530f5e0, file
I don't understand what it means. |
Yea, damn. Too early on the weekends. Let me fix that up. |
Thanks for catching that. All fixed up now. |
Made the dropdown logic consistent between clog and utilities as well.
Paul, sorry, slow start. Happens when you are too busy. Everything should work as expected now. Certainly there was disconnect between what I thought I had accomplished, and what was done. |
I'll commit my solution |
As far as I can tell from my testing, both issues are indeed fixed with commit 96d793f included. I'll upload to Debian shortly. |
I reviewed the code again. u have fixed the issue, but I don't understand why u remain the parameter |
Satan, Cacti 1.x supports automatic archiving of log files. Does not use logrotate, but a built-in function to copy the log file from cacti.log to cacti.log-TIMESTAMP. This is why we need the filename variable. We need to find other log files in the log directory that are prefixed with cacti.log. You may not have the enabled on your system. |
thx for ur reply |
There still reminds a slight issue that any other logs in the same directory as the CACTI or plugin logs, can be read by cacti. So whilst it is common sense to keep these logs separated, some users may update the log folder setting to be in a directory with other sensitive logs for house keeping purposes, using for example, /var/log. There is nothing in the system to prevent this happening, and if you have access to the Cacti system as an admin via a web page, it would be trivial to change this. It is likely that this would not be a major issue unless the apache2 process was running under a user with access to those logs. Aside from OS user security, the only way I can see to combat that potential information leakage, is a future enhancement to either specifically block /var/log from being used, or to require plugins to define their log file base name, thus providing a limited list of log files that should be read by cacti. |
That is actually not the case. The only files readable will be |
I tested it myself, it was able to read other log files. |
You must be running some Frankenstein install (maybe including the pull request that was not merged and closed), cause you can only read |
My bad, I haven't really used GIT in anger on a linux box, so I was incorrectly using it and thinking I was on the latest sources but I was on 1.1.27 still. I can confirm that the latest version doesn't list my test log file. It also no longer lists any of the plugin logs that were previously visible. So, I have lost visibility there that I previously had. I still believe that the plugin architecture should allow for the return of a base log filename if you wish to have those logs displayed, but that could be created as a separate feature enhancement issue. |
Not a problem. If you would like to propose and enhancement, we would be glad to consider your pull request. Plugins should use the cacti_log() function, which can goto syslog if you like it to, or Splunk, Elastic, AMQP or whatever. Personally, though I would like to see Cacti log in a json based name value format that is easily injested by more modern logging tools, it's not the highest priority for the team at the moment. So, contributions from others are welcomed. |
It requires admin privileges to reproduce the ploblem.
After we login in with default account
admin/cacit
Local File Read
/etc/cacti.log
/etc/passwd
RCE
/var/www/html/shell.php
client-ip
into<?php phpinfo();?>
. Or exec cmdcurl -H "Client-ip: <?php phpinfo();?>" 'http://localhost/cacti/remote_agent.php'
. The evil php code will been writen to /var/www/html/shell.phpThe text was updated successfully, but these errors were encountered: