Actually, I think I do still have an issue. As I mentioned before, I have my Nagios server behind an AWS WAF, and I discovered that there were still some attacks going on, most of them failing to get past the WAF. However, when I started up for work this morning, I discovered that there was an attack going on from my home IP address (I work from home). So I did some digging, and found that it was definitely my work laptop, and that it appears to be a server-side javascript attack, as I only had a couple of tabs with nagios open, but despite that they were logged out (timed out), I was getting some 40-90 hits per 5 min according to the WAF logs. See a sample of the logs here (IPs masked):
Code: Select all
Nagios-acl xxx.xxx.xxx.xxx (US) /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_getting_started_html%22%2C%22args%22%3A%22%22%7D&nsp=205d3ad988e9eb0d7a8207c9a79f13027404427d9b92196a1575703d2d50d480 - ALLOW Mon Jan 25 2021 13:04:55 GMT-0500 (Eastern Standard Time)
Nagios-acl xxx.xxx.xxx.xxx (US) /nagiosxi/includes/js/dashlets.js?1610744847 - ALLOW Mon Jan 25 2021 13:22:35 GMT-0500 (Eastern Standard Time)
Nagios-acl xxx.xxx.xxx.xxx (US) /nagiosxi/includes/dashlets/textenhanced/textenhanced.js - ALLOW Mon Jan 25 2021 13:22:36 GMT-0500 (Eastern Standard Time)
Nagios-acl xxx.xxx.xxx.xxx (US) /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_tray_alert_html%22%2C%22args%22%3A%22%22%7D&nsp=205d3ad988e9eb0d7a8207c9a79f13027404427d9b92196a1575703d2d50d480 - ALLOW Mon Jan 25 2021 13:04:55 GMT-0500 (Eastern Standard Time)
Nagios-acl xxx.xxx.xxx.xxx (US) /nagiosxi/includes/js/views.js?1610744847 - ALLOW Mon Jan 25 2021 13:22:35 GMT-0500 (Eastern Standard Time)
Nagios-acl xxx.xxx.xxx.xxx (US) /nagiosxi/ajaxhelper.php?cmd=keepalive&nsp=205d3ad988e9eb0d7a8207c9a79f13027404427d9b92196a1575703d2d50d480 - ALLOW Mon Jan 25 2021 13:03:55 GMT-0500 (Eastern Standard Time)
Nagios-acl xxx.xxx.xxx.xxx (US) /nagiosxi/ajaxhelper.php?cmd=keepalive&nsp=205d3ad988e9eb0d7a8207c9a79f13027404427d9b92196a1575703d2d50d480 - ALLOW Mon Jan 25 2021 13:05:55 GMT-0500 (Eastern Standard Time)
Nagios-acl xxx.xxx.xxx.xxx (US) /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_admin_tasks_html%22%2C%22args%22%3A%22%22%7D&nsp=205d3ad988e9eb0d7a8207c9a79f13027404427d9b92196a1575703d2d50d480 - ALLOW Mon Jan 25 2021 13:08:55 GMT-0500 (Eastern Standard Time)
Nagios-acl xxx.xxx.xxx.xxx (US) /nagiosxi/ajaxhelper.php?cmd=getxicoreajax&opts=%7B%22func%22%3A%22get_tray_alert_html%22%2C%22args%22%3A%22%22%7D&nsp=205d3ad988e9eb0d7a8207c9a79f13027404427d9b92196a1575703d2d50d480 - ALLOW Mon Jan 25 2021 13:11:25 GMT-0500 (Eastern Standard Time)
Nagios-acl xxx.xxx.xxx.xxx (US) /nagiosxi/ajaxhelper.php?cmd=keepalive&nsp=205d3ad988e9eb0d7a8207c9a79f13027404427d9b92196a1575703d2d50d480 - ALLOW Mon Jan 25 2021 13:04:55 GMT-0500 (Eastern Standard Time)
I browsed to the login.php page again, and used developer tools to take a look at the code, and I saw this at the beginning (full url replaced with example.org):
Code: Select all
<script type="text/javascript">
var base_url = "https://nagios.example.org/nagiosxi/";
var backend_url = "https%3A%2F%2Fnagios.example.org%2Fnagiosxi%2Flogin.php";
var ajax_helper_url = "https://nagios.example.org/nagiosxi/ajaxhelper.php";
var ajax_proxy_url = "https://nagios.example.org/nagiosxi/ajaxproxy.php";
var suggest_url = "https://nagios.example.org/nagiosxi/suggest.php";
var request_uri = "%2Fnagiosxi%2Flogin.php%3Fredirect%3D%2Fnagiosxi%2Findex.php%253f%26noauth%3D1";
var demo_mode = 0;
var nsp_str = "3a8821ad1494dd3c6ea60e8c63fbd36fb6be534f2cf163b4d8689cf332cb601b";
var theme = "xi5";
// Language string for translations
var lang = {
'Add to Dashboard': "Add to Dashboard",
'Add Dashboard': "Add Dashboard",
'Edit Dashboard': "Edit Dashboard",
'Dashlet Title': "Dashlet Title",
'Dashboard Added': "Dashboard Added",
'Add It': "Add It",
'Add this powerful little dashlet to one of your dashboards for visual goodness.': "Add this powerful little dashlet to one of your dashboards for visual goodness.",
'Select a Dashboard to Add To': "Select a Dashboard to Add To",
'Add this graph to a dashboard.': "Add this graph to a dashboard.",
'Dashlet is now loaded on your dashboard.': "Dashlet is now loaded on your dashboard.",
'Dashlet Added': "Dashlet Added",
'Please Wait': "Please Wait",
'Submitting command': "Submitting command",
'Show Details': "Show Details",
'Hide Details': "Hide Details",
'Show password': "Show password",
'Hide password': "Hide password",
'Permalink': "Permalink",
'Copy the URL below to retain a direct link to your current view.': "Copy the URL below to retain a direct link to your current view.",
'URL': "URL",
'Thank You!': "Thank You!",
'Thanks for helping to make this product better! We will review your comments as soon as we get a chance. Until then, kudos to you for being awesome and helping drive innovation!': "Thanks for helping to make this product better! We will review your comments as soon as we get a chance. Until then, kudos to you for being awesome and helping drive innovation!",
'Error': "Error",
'An error occurred. Please try again later.': "An error occurred. Please try again later.",
'Sending Feedback': "Sending Feedback",
'Use this to add a new dashboard to your Dashboards page.': "Use this to add a new dashboard to your Dashboards page.",
'Dashboard Title': "Dashboard Title",
'Background Color': "Background Color",
'Submit': "Submit",
'Processing': "Processing",
'Success! Your new dashboard has been added.': "Success! Your new dashboard has been added.",
'An error occurred processing your request.': "An error occurred processing your request.",
'Dashboard Changes Saved': "Dashboard Changes Saved",
'Success! Your dashboard was updated successfully.': "Success! Your dashboard was updated successfully.",
'You cannot delete your home page dashboard.': "You cannot delete your home page dashboard.",
'Confirm Dashboard Deletion': "Confirm Dashboard Deletion",
'Are you sure you want to delete this dashboard and all dashlets it contains?': "Are you sure you want to delete this dashboard and all dashlets it contains?",
'Delete': "Delete",
'Cancel': "Cancel",
'The requested dashboard has been deleted.': "The requested dashboard has been deleted.",
'Dashboard Deleted': "Dashboard Deleted",
'Clone Dashboard': "Clone Dashboard",
'Use this to make an exact clone of the current dashboard and all its wonderful dashlets.': "Use this to make an exact clone of the current dashboard and all its wonderful dashlets.",
'Clone': "Clone",
'New Title': "New Title",
'Dashboard Cloned': "Dashboard Cloned",
'Dashboard successfully cloned.': "Dashboard successfully cloned.",
'Deleting dashlets from the home page dashboard is disabled while in demo mode.': "Deleting dashlets from the home page dashboard is disabled while in demo mode.",
'Dashlet Deleted': "Dashlet Deleted",
'Dashlet removed from dashboard.': "Dashlet removed from dashboard.",
'The dashlet has been added and will now show up on your dashboard.': "The dashlet has been added and will now show up on your dashboard.",
'Masquerade Notice': "Masquerade Notice",
'You are about to masquerade as another user. If you choose to continue you will be logged out of your current account and logged in as the selected user. In the process of doing so, you may lose your admin privileges.': "You are about to masquerade as another user. If you choose to continue you will be logged out of your current account and logged in as the selected user. In the process of doing so, you may lose your admin privileges.",
'Continue': "Continue",
'Add View': "Add View",
'Use this to add what you see on the screen to your views page.': "Use this to add what you see on the screen to your views page.",
'View Title': "View Title",
'View Added': "View Added",
'Success! Your view was added to your views page.': "Success! Your view was added to your views page.",
'View Deleted': "View Deleted",
'View has been removed.': "View has been removed.",
'Edit View': "Edit View",
'View Changes Saved': "View Changes Saved",
'Success! Your view was updated successfully.': "Success! Your view was updated successfully.",
'Start Rotation': "Start Rotation",
'Stop Rotation': "Stop Rotation",
'Pause rotation': "Pause rotation",
'Resume rotation': "Resume rotation",
'You are about to delete the view': "You are about to delete the view",
'Cannot schedule outside pages.': "Cannot schedule outside pages.",
'Any page not under nagiosxi cannot be scheduled.': "Any page not under nagiosxi cannot be scheduled.",
'Loading': "Loading",
'Update': "Update",
'Close': "Close",
'Time Range': "Time Range",
'Last 4 Hours': "Last 4 Hours",
'Last 24 Hours': "Last 24 Hours",
'Last Week': "Last Week",
'Last Month': "Last Month",
'Last Year': "Last Year",
'Last 7 Days': "Last 7 Days",
'Last 30 Days': "Last 30 Days",
'Last 365 Days': "Last 365 Days",
'My graph': "My graph",
'You must fill out the entire form.': "You must fill out the entire form.",
'Copy to Clipboard': "Copy to Clipboard",
'Copied': "Copied",
'Press Ctrl+C to copy': "Press Ctrl+C to copy",
'Dismiss' : "Dismiss"
};
// Translation helper function
function _(str) {
var trans = lang[str];
if (trans) { return trans; }
return str;
}
</script>
What can I do to clear this up? the timestamps of the login.php files suggests that they haven't been modified since I upgraded to 5.8.1, which is troubling since that suggests that this code might have survived an upgrade. Any suggestions?