Security

Unpatched Cacti Zero-Day ‘4HTTP2SHELL’ Gets RCE in Four Requests When Guest Access Is On

Leave a comment

If you run Cacti for network graphs, pay attention to this one. A researcher going by ek0ms savi0r published a zero-day chain and a working proof of concept on Thanksgiving Day, dubbed 4HTTP2SHELL (originally 4HTTP2ROOT). It goes from an unauthenticated session to command execution on the Cacti server in four HTTP requests. There’s no CVE and no fix yet, and the researcher says Cacti wasn’t told before release.

The catch is that the guest account has to be enabled. According to The Hacker News and watchTowr, a guest writes non-numeric text into the preview_graphs_per_page display setting. That value is later used in a SQL query without validation, which allows a second-order SQL injection that rewrites a row in the poller table. Then the realtime graph page passes that row to PHP’s popen(). It was tested on Cacti 1.2.31, the current release. You get whatever account runs the web server and poller, often a low-privileged user rather than root. Still, Cacti usually holds SNMP strings and device credentials, so it’s a great pivot point. watchTowr says no exploitation in the wild had been reported as of Nov. 27.

What to do

Disable the guest account (it has been off by default since 0.8.7), keep the web UI reachable only from trusted networks, check the poller for commands you don’t recognize, watch the logs for non-numeric-value warnings, and patch as soon as a fix ships.

My take

Monitoring boxes are the keys to the kingdom, and they’re always the ones we “set and forget.” Go check yours tonight. I wrote up a quick how-to for that in this same batch.

God Bless, and Needs Garlic!

References & Further Reading

Subscribe (RSS) Follow Security via RSS

Leave a note

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.