{"description": "The <tt>rsyslog</tt> daemon should not accept remote messages unless the system acts as a log\nserver. To ensure that it is not listening on the network, ensure any of the following lines\nare <i>not</i> found in <tt>rsyslog</tt> configuration files.\n\nIf using legacy syntax:\n<pre>$ModLoad imtcp\n$InputTCPServerRun <i>port</i>\n$ModLoad imudp\n$UDPServerRun <i>port</i>\n$ModLoad imrelp\n$InputRELPServerRun <i>port</i></pre>\n\nIf using RainerScript syntax:\n<pre>module(load=\"imtcp\")\nmodule(load=\"imudp\")\ninput(type=\"imtcp\" port=\"514\")\ninput(type=\"imudp\" port=\"514\")\n</pre>", "rationale": "Any process which receives messages from the network incurs some risk of receiving malicious\nmessages. This risk can be eliminated for rsyslog by configuring it not to listen on the\nnetwork.", "severity": "medium", "references": {"cis-csc": ["1", "11", "12", "13", "14", "15", "16", "18", "3", "4", "5", "6", "8", "9"], "cobit5": ["APO01.06", "APO11.04", "APO13.01", "BAI03.05", "BAI10.01", "BAI10.02", "BAI10.03", "BAI10.05", "DSS01.05", "DSS03.01", "DSS05.02", "DSS05.04", "DSS05.07", "DSS06.02", "MEA02.01"], "isa-62443-2009": ["4.2.3.4", "4.3.3.3.9", "4.3.3.4", "4.3.3.5.8", "4.3.4.3.2", "4.3.4.3.3", "4.3.4.4.7", "4.4.2.1", "4.4.2.2", "4.4.2.4", "4.4.3.3"], "isa-62443-2013": ["SR 2.10", "SR 2.11", "SR 2.12", "SR 2.8", "SR 2.9", "SR 3.1", "SR 3.5", "SR 3.8", "SR 4.1", "SR 4.3", "SR 5.1", "SR 5.2", "SR 5.3", "SR 7.1", "SR 7.6"], "iso27001-2013": ["A.10.1.1", "A.11.1.4", "A.11.1.5", "A.11.2.1", "A.12.1.1", "A.12.1.2", "A.12.4.1", "A.12.4.2", "A.12.4.3", "A.12.4.4", "A.12.5.1", "A.12.6.2", "A.12.7.1", "A.13.1.1", "A.13.1.2", "A.13.1.3", "A.13.2.1", "A.13.2.2", "A.13.2.3", "A.13.2.4", "A.14.1.2", "A.14.1.3", "A.14.2.2", "A.14.2.3", "A.14.2.4", "A.6.1.2", "A.7.1.1", "A.7.1.2", "A.7.3.1", "A.8.2.2", "A.8.2.3", "A.9.1.1", "A.9.1.2", "A.9.2.3", "A.9.4.1", "A.9.4.4", "A.9.4.5"], "nist": ["CM-7(a)", "CM-7(b)", "CM-6(a)"], "nist-csf": ["DE.AE-1", "ID.AM-3", "PR.AC-5", "PR.DS-5", "PR.IP-1", "PR.PT-1", "PR.PT-4"], "srg": ["SRG-OS-000480-GPOS-00227"], "ism": ["0988", "1405"]}, "control_references": {"ism": ["0988", "1405"]}, "components": [], "identifiers": {}, "ocil_clause": "rsyslog accepts remote messages and is not documented as a log aggregation system", "ocil": "Verify that the system is not accepting \"rsyslog\" messages from other systems unless it is\ndocumented as a log aggregation server.\nDisplay the contents of the rsyslog configuration files:\n<pre>find /etc -maxdepth 2 -regex '/etc/rsyslog\\(\\.conf\\|\\.d\\/.*\\.conf\\)' -exec cat '{}' \\;</pre>\n\nIf any of the below lines are found, ask to see the documentation for the system being used\nfor log aggregation:\n\nIf using legacy syntax:\n<pre>$ModLoad imtcp\n$InputTCPServerRun <i>port</i>\n$ModLoad imudp\n$UDPServerRun <i>port</i>\n$ModLoad imrelp\n$InputRELPServerRun <i>port</i></pre>\n\nIf using RainerScript syntax:\n<pre>module(load=\"imtcp\")\nmodule(load=\"imudp\")\ninput(type=\"imtcp\" port=\"514\")\ninput(type=\"imudp\" port=\"514\")\n</pre>", "oval_external_content": null, "fixtext": "The Ubuntu 22.04 must be configured so that the rsyslog daemon does not accept log\nmessages from other servers unless the server is being used for log aggregation.", "checktext": "", "vuldiscussion": "", "srg_requirement": "", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "Ubuntu 22.04 must be configured so that the rsyslog daemon does not accept log messages from other servers unless the server is being used for log aggregation.", "vuldiscussion": "Unintentionally running a rsyslog server accepting remote messages puts the system at increased risk. Malicious rsyslog messages sent to the server could exploit vulnerabilities in the server software itself, could introduce misleading information into the system's logs, or could fill the system's storage leading to a denial of service.\n\nIf the system is intended to be a log aggregation server, its use must be documented with the information system security officer (ISSO).", "checktext": "Verify that Ubuntu 22.04 is not configured to receive remote logs using rsyslog with the following commands:\n\n$ grep -i modload /etc/rsyslog.conf /etc/rsyslog.d/*\n\n$ModLoad imtcp\n$ModLoad imrelp\n$ModLoad imudp\n\n$ grep -i 'load=\"imtcp\"' /etc/rsyslog.conf /etc/rsyslog.d/*\n\n$ grep -i 'load=\"imrelp\"' /etc/rsyslog.conf /etc/rsyslog.d/*\n\n$ grep -i serverrun /etc/rsyslog.conf /etc/rsyslog.d/*\n\n$InputTCPServerRun 514\n$InputRELPServerRun 514\n$InputUDPServerRun 514\n\n$ grep -i 'port=\"\\S*\"' /etc/rsyslog.conf /etc/rsyslog.d/*\n\n/etc/rsyslog.conf:#input(type=\"imudp\" port=\"514\")\n/etc/rsyslog.conf:#input(type=\"imtcp\" port=\"514\")\n/etc/rsyslog.conf:#Target=\"remote_host\" Port=\"XXX\" Protocol=\"tcp\")\n\nIf any uncommented lines are returned by the commands, rsyslog is configured to receive remote messages, and this is a finding.\n\nNote: An error about no files or directories from the above commands may be returned. This is not a finding.\n\nIf any modules are being loaded in the \"/etc/rsyslog.conf\" file or in the \"/etc/rsyslog.d\" subdirectories, ask to see the documentation for the system being used for log aggregation.\n\nIf the documentation does not exist or does not specify the server as a log aggregation system, this is a finding.", "fixtext": "Configure Ubuntu 22.04 to not receive remote logs using rsyslog.\n\nRemove the lines in /etc/rsyslog.conf and any files in the /etc/rsyslog.d directory that match any of the following:\nmodule(load=\"imtcp\")\nmodule(load=\"imudp\")\nmodule(load=\"imrelp\")\ninput(type=\"imudp\" port=\"514\")\ninput(type=\"imtcp\" port=\"514\")\ninput(type=\"imrelp\" port=\"514\")\n\nThe rsyslog daemon must be restarted for the changes to take effect:\n\n$ sudo systemctl restart rsyslog.service"}}, "platform": null, "platforms": [], "sce_metadata": {}, "inherited_platforms": ["system_with_kernel"], "cpe_platform_names": [], "inherited_cpe_platform_names": ["system_with_kernel"], "bash_conditional": null, "fixes": {}, "title": "Ensure rsyslog Does Not Accept Remote Messages Unless Acting As Log Server", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/logging/rsyslog_accepting_remote_messages/rsyslog_nolisten/rule.yml", "template": null}