Security Hardening for OS and Web Portal

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "On January 27, 2015, a vulnerability named "GHOST" in the glibc library was publicly announced. GHOST is also referred as '''CVE-2015-0235'''. The vulnerability is a buffer ov...")
 
(Updated for ProSBC)
 
(68 intermediate revisions by 3 users not shown)
Line 1: Line 1:
On January 27, 2015, a vulnerability named "GHOST" in the glibc library was publicly announced. GHOST is also referred as '''CVE-2015-0235'''. The vulnerability is a buffer overflow in the gethostbyname family of functions that can allow arbitrary code execution.
+
{{DISPLAYTITLE:Security Hardening for OS and Web Portal}}
  
= Affected Products =
+
= Applicable Products =
 
* TMG800, TMG3200, TMG7800-CTRL
 
* TMG800, TMG3200, TMG7800-CTRL
 +
* TSG800, TSG3200
 
* Tdev Linux server with (CentOS, RedHat, etc) running Toolpack software
 
* Tdev Linux server with (CentOS, RedHat, etc) running Toolpack software
 +
* TSBC-SW/TSBC-HW-SRV-HIGH/TSBC-HW-SRV-MID
  
= Details =
+
= Introduction =
The impact of this vulnerability on TelcoBridges products depends on their configuration. The vulnerability may only be triggered through requests for domain name resolution. Therefore, only units that enable such services may be exposed to the issue.
+
This page discusses methods for improving overall security of Telcobridges system against unwanted attacks and vulnerabilities with adverse exposure as introduced from internet or connecting to network in general.
  
= Software Versions and Fixes =
+
= Tmedia/Tsig/Tdev =
The TelcoBridges CentOS 5 repository has been updated with the latest glibc version. Services that use glibc must be restarted. Because glibc is thoroughly used in the Linux operating system, it is highly recommended to reboot the unit.
+
  
= Update procedure =
+
== Management Port Protection ==
The operator can use one of the two methods available: GUI/WebPortal or command line interface.
+
* Keep the management port in a protected environment (behind a firewall). See [[Firewall]]. Note that Mysql port 3306 is for internal use only, this should not be allowed for external access.
 +
* Iptables could be used to set up rules for management interface to allow only necessary protocols and ports required for access and operation of Telcobridges system. Please check here: [[Centos_syslog_redirect#Firewall_rules_to_the_management_port|Firewall rules on management port]]
 +
* Other ports do not have access to the OS (unless configured on the web portal). Normally, other ports on the system are configured with services other than management such as OAMP/NAT or FIXED MANAGEMENT.
 +
** For example, Voip0 is configured with SIP and RTP, and this port will care for these specific protocols only and discard the rest of the traffic.
 +
** For configuring port IP interface setting and services, see example of  [[Toolpack:Configuring VoIP Interfaces D|VOIP port IP interface configuration]] and [[Parameter: Services to use|Services to use]].
 +
* In normal operation, only default Mgmt port, or a dedicated Ethernet port on external host server, should be used for management access. SIP/RTP/SIGTRAN or RADIUS/H248 together or separate, could be used on voip0/voip1/eth0/eth1.
  
== WebPortal - TMG unit or Linux server '''with access to Internet''' (i.e. with DNS configured) ==
+
== SSH Access Security ==
# login onto the WebPortal
+
* Use a strong password for the SSH access. Default password is a strong password that includes alphanumerical and symbol characters. This password can be chaged: see [[How to change host password on Linux]]
# Select the 'Hosts' section
+
# Click on the hostname
+
# Click on the 'Status' tab
+
# Select 'Upgrade Linux packages' into the host 'Action'
+
# Click on the 'Apply action' button
+
# Refresh the page until the packages are updated as indicated in the 'Action Log' (you may use the 'Now' button to update the page). The results should appear within a minute.
+
# Select 'Shutdown' into the host 'Action'
+
# Select 'Reboot' into the 'Shutdown Type'
+
# Click on the 'Apply action' button
+
# Repeat the process for all hosts listed
+
  
== Command line interface ==
+
== CentOS Update for New Packages ==
 +
* Keep system CentOS with database and Ruby up to date as needed, using yum update or through web portal by doing upgrade linux packages, see [[Upgrade CentOS]].
 +
* Telcobridges has adopted a proactive OS update practice that managing Telcobridges repository according to CentOS announcement.
  
* login with root account
 
[root@TB011107 ~]# uname -m
 
x86_64
 
* If the result is not "x86_64", [[Support:Contacting TelcoBridges technical support|please contact TelcoBridges]] support, otherwise you can proceed with either method below.
 
* Follow one of the two options depending if Internet is accessible from the unit
 
  
=== Option #1 - TMG unit or Linux server '''with access to Internet''' (i.e. with DNS configured) ===
+
== Web Portal Access Security ==
 +
* One or more user groups can be created to define access rights, such as read only, read/write, or no access at all. Access rights can be assigned to all regions of the web portal or to specific areas. One or more users can be created and given access, which was previously defined by user groups. A user is given a name, a password, and assigned to a user group.
 +
* HTTPS is available from 2.9.41 and onwards. HTTPS provides a secure connection between browser and web server. The connection is encrypted using TLS/SSL.
 +
* Web Portal access security enhancement is available on Toolpack 2.10.19 and onwards
 +
** After a web portal failed login access, it will wait about 2 seconds, to prevent brute force attack on web portal login
 +
** There will be new password complexity requirements such as,
 +
*** At least 8 characters total
 +
*** At least 1 upper case character
 +
*** At least 1 lower case character
 +
*** At least 1 number
 +
*** At least 1 special character
 +
** User account disabling (there will be a check box to indicate active users account), uncheck it will disable the account
 +
** Password confirmation when creating/editing users
 +
** Web session auto-logout after a certain amount of time without activity (default 30 mins)
 +
* See [[Toolpack:System Settings C#Access_and_User_Management|Access and User Management]] for configuration
  
* update OS packages with yum
+
= SBC =
yum clean all
+
yum update
+
* reboot the unit
+
reboot
+
 
+
=== Option #2 - TMG unit or Linux server '''without access to Internet''' ===
+
* download the following packages to your PC:
+
** http://repo.telcobridges.com/centos/5.7/updates/x86_64/RPMS/glibc-2.5-123.el5_11.1.x86_64.rpm
+
** http://repo.telcobridges.com/centos/5.7/updates/x86_64/RPMS/glibc-common-2.5-123.el5_11.1.x86_64.rpm
+
** http://repo.telcobridges.com/centos/5.7/updates/x86_64/RPMS/glibc-devel-2.5-123.el5_11.1.x86_64.rpm
+
** http://repo.telcobridges.com/centos/5.7/updates/x86_64/RPMS/glibc-headers-2.5-123.el5_11.1.x86_64.rpm
+
** http://repo.telcobridges.com/centos/5.7/updates/x86_64/RPMS/nscd-2.5-123.el5_11.1.x86_64.rpm
+
* Using WinSCP or similar tool, upload the files to the TMG unit using the root account
+
* login with root account
+
* Install packages
+
yum localinstall glibc-2.5-123.el5_11.1.x86_64.rpm \
+
  glibc-common-2.5-123.el5_11.1.x86_64.rpm \
+
  glibc-devel-2.5-123.el5_11.1.x86_64.rpm \
+
  glibc-headers-2.5-123.el5_11.1.x86_64.rpm \
+
  nscd-2.5-123.el5_11.1.x86_64.rpm
+
* '''Note''': that operation might take a long time since yum will probably experience timeouts when trying to access the external repositories.
+
* Reboot the unit
+
reboot
+
 
+
= How to verify if the vulnerability is fixed? =
+
* login with root account
+
* execute the following to create a test script
+
cat > rhel-GHOST-test.sh << FOF
+
#!/bin/bash
+
# rhel-GHOST-test.sh -  GHOST vulnerability tester. Only for CentOS/RHEL based servers.  #
+
# Version 3
+
# Credit : Red Hat, Inc - https://access.redhat.com/labs/ghost/ #
+
echo "Installed glibc version(s)"
+
+
rv=0
+
for glibc_nvr in \$( rpm -q --qf '%{name}-%{version}-%{release}.%{arch}\n' glibc ); do
+
    glibc_ver=\$( echo "\$glibc_nvr" | awk -F- '{ print \$2 }' )
+
    glibc_maj=\$( echo "\$glibc_ver" | awk -F. '{ print \$1 }')
+
    glibc_min=\$( echo "\$glibc_ver" | awk -F. '{ print \$2 }')
+
+
    echo -n "- \$glibc_nvr: "
+
    if [ "\$glibc_maj" -gt 2 -o \( "\$glibc_maj" -eq 2  -a  "\$glibc_min" -ge 18 \) ]; then
+
        # fixed upstream version
+
        echo 'not vulnerable'
+
    else
+
        # all RHEL updates include CVE in rpm %changelog
+
        if rpm -q --changelog "\$glibc_nvr" | grep -q 'CVE-2015-0235'; then
+
            echo "not vulnerable"
+
        else
+
            echo "vulnerable"
+
            rv=1
+
        fi
+
    fi
+
done
+
+
if [ \$rv -ne 0 ]; then
+
    cat <<EOF
+
+
This system is vulnerable to CVE-2015-0235. <https://access.redhat.com/security/cve/CVE-2015-0235>
+
Please refer to <https://access.redhat.com/articles/1332213> for remediation steps
+
EOF
+
fi
+
+
exit \$rv
+
+
FOF
+
* Execute the script
+
chmod +x rhel-GHOST-test.sh
+
./rhel-GHOST-test.sh
+
* '''You should not see the 'vulnerable' string displayed'''
+
 
+
 
+
= Verify system timezone =
+
We found that some systems got the timezone reset to EST time after the GHOST patch procedures
+
* Verify the timezone on the system
+
date
+
 
+
If it differs from the original, reset the timezone using the [[TMG:Change_Time_Zone|tbtimezone]] script.
+
  
 +
* FreeSBC and ProSBC products follow the same security hardening practices for ''SSH Access Security'', ''CentOS Update for New Packages'', and ''Web Portal Access Security'' (see [[Toolpack:Tsbc System Settings 3.0|Tsbc System Settings 3.0]]) of Tmedia/Tsig/Tdev above.
 +
* Web portal (host interfaces), ssh (when enabled and managed by web), SNMP service (host interfaces) are firewall protected within SBC.
 +
* Web portal/SSH/SNMP access ports refer to LAN/WAN ports that have device defined for management such as OAMP/NAT or FIXED MANAGEMENT. 
 +
* Physical management port (mgmt) should be used for serial connection or put in a private LAN environment at all times for maintenance purpose only if needed.
  
 
= References =
 
= References =
 +
* https://lists.centos.org/mailman/listinfo/centos-announce
 
* https://www.qualys.com/research/security-advisories/GHOST-CVE-2015-0235.txt
 
* https://www.qualys.com/research/security-advisories/GHOST-CVE-2015-0235.txt
 
* https://access.redhat.com/articles/1332213
 
* https://access.redhat.com/articles/1332213
 
* http://www.cyberciti.biz/faq/cve-2015-0235-patch-ghost-on-debian-ubuntu-fedora-centos-rhel-linux/
 
* http://www.cyberciti.biz/faq/cve-2015-0235-patch-ghost-on-debian-ubuntu-fedora-centos-rhel-linux/
 +
 +
[[Category:Revise on Major]]

Latest revision as of 16:06, 19 December 2019


Contents

Applicable Products

  • TMG800, TMG3200, TMG7800-CTRL
  • TSG800, TSG3200
  • Tdev Linux server with (CentOS, RedHat, etc) running Toolpack software
  • TSBC-SW/TSBC-HW-SRV-HIGH/TSBC-HW-SRV-MID

Introduction

This page discusses methods for improving overall security of Telcobridges system against unwanted attacks and vulnerabilities with adverse exposure as introduced from internet or connecting to network in general.

Tmedia/Tsig/Tdev

Management Port Protection

  • Keep the management port in a protected environment (behind a firewall). See Firewall. Note that Mysql port 3306 is for internal use only, this should not be allowed for external access.
  • Iptables could be used to set up rules for management interface to allow only necessary protocols and ports required for access and operation of Telcobridges system. Please check here: Firewall rules on management port
  • Other ports do not have access to the OS (unless configured on the web portal). Normally, other ports on the system are configured with services other than management such as OAMP/NAT or FIXED MANAGEMENT.
    • For example, Voip0 is configured with SIP and RTP, and this port will care for these specific protocols only and discard the rest of the traffic.
    • For configuring port IP interface setting and services, see example of VOIP port IP interface configuration and Services to use.
  • In normal operation, only default Mgmt port, or a dedicated Ethernet port on external host server, should be used for management access. SIP/RTP/SIGTRAN or RADIUS/H248 together or separate, could be used on voip0/voip1/eth0/eth1.

SSH Access Security

  • Use a strong password for the SSH access. Default password is a strong password that includes alphanumerical and symbol characters. This password can be chaged: see How to change host password on Linux

CentOS Update for New Packages

  • Keep system CentOS with database and Ruby up to date as needed, using yum update or through web portal by doing upgrade linux packages, see Upgrade CentOS.
  • Telcobridges has adopted a proactive OS update practice that managing Telcobridges repository according to CentOS announcement.


Web Portal Access Security

  • One or more user groups can be created to define access rights, such as read only, read/write, or no access at all. Access rights can be assigned to all regions of the web portal or to specific areas. One or more users can be created and given access, which was previously defined by user groups. A user is given a name, a password, and assigned to a user group.
  • HTTPS is available from 2.9.41 and onwards. HTTPS provides a secure connection between browser and web server. The connection is encrypted using TLS/SSL.
  • Web Portal access security enhancement is available on Toolpack 2.10.19 and onwards
    • After a web portal failed login access, it will wait about 2 seconds, to prevent brute force attack on web portal login
    • There will be new password complexity requirements such as,
      • At least 8 characters total
      • At least 1 upper case character
      • At least 1 lower case character
      • At least 1 number
      • At least 1 special character
    • User account disabling (there will be a check box to indicate active users account), uncheck it will disable the account
    • Password confirmation when creating/editing users
    • Web session auto-logout after a certain amount of time without activity (default 30 mins)
  • See Access and User Management for configuration

SBC

  • FreeSBC and ProSBC products follow the same security hardening practices for SSH Access Security, CentOS Update for New Packages, and Web Portal Access Security (see Tsbc System Settings 3.0) of Tmedia/Tsig/Tdev above.
  • Web portal (host interfaces), ssh (when enabled and managed by web), SNMP service (host interfaces) are firewall protected within SBC.
  • Web portal/SSH/SNMP access ports refer to LAN/WAN ports that have device defined for management such as OAMP/NAT or FIXED MANAGEMENT.
  • Physical management port (mgmt) should be used for serial connection or put in a private LAN environment at all times for maintenance purpose only if needed.

References

Personal tools