-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                              ESB-2022.2050.2
        K23605346: BIG-IP iControl REST vulnerability CVE-2022-1388
                                12 May 2022

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           F5 BIG-IP (all modules)
Publisher:         F5 Networks
Operating System:  Network Appliance
Resolution:        Patch/Upgrade
CVE Names:         CVE-2022-1388  

Original Bulletin: 
   https://support.f5.com/csp/article/K23605346

Comment: CVSS (Max):  9.8 CVE-2022-1388 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
         CVSS Source: F5 Networks
         Calculator:  https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Revision History:  May 12 2022: Indicators of compromise added by vendor
                   May  5 2022: Initial Release

- --------------------------BEGIN INCLUDED TEXT--------------------

K23605346: BIG-IP iControl REST vulnerability CVE-2022-1388

Original Publication Date: 04 May, 2022
Latest   Publication Date: 10 May, 2022

Security Advisory Description

Undisclosed requests may bypass iControl REST authentication. (CVE-2022-1388)

Impact

This vulnerability may allow an unauthenticated attacker with network access to
the BIG-IP system through the management port and/or self IP addresses to
execute arbitrary system commands, create or delete files, or disable services.
There is no data plane exposure; this is a control plane issue only.

Security Advisory Status

F5 Product Development has assigned IDs 1033837, 1051561, and 1052837 (BIG-IP)
to this vulnerability. This issue has been classified as CWE-306: Missing
Authentication for Critical Function.

To determine if your product and version have been evaluated for this
vulnerability, refer to the Applies to (see versions) box. To determine if your
release is known to be vulnerable, the components or features that are affected
by the vulnerability, and for information about releases, point releases, or
hotfixes that address the vulnerability, refer to the following table. For more
information about security advisory versioning, refer to K51812227:
Understanding security advisory versioning.

Note: After a fix is introduced for a given minor branch, that fix applies to
all subsequent maintenance and point releases for that branch, and no
additional fixes for that branch will be listed in the table. For example, when
a fix is introduced in 14.1.2.3, the fix also applies to 14.1.2.4, and all
later 14.1.x releases (14.1.3.x., 14.1.4.x). For more information, refer to
K51812227: Understanding security advisory versioning. Additionally, software
versions preceding those listed in the Applies to (see versions) box of this
article have reached the End of Technical Support (EoTS) phase of their
lifecycle and are no longer evaluated for security issues. For more
information, refer to the Security hotfixes section of K4602: Overview of the
F5 security vulnerability response policy.

+------------+------+--------------+----------+----------+------+-------------+
|            |      |Versions known|Fixes     |          |CVSSv3|Vulnerable   |
|Product     |Branch|to be         |introduced|Severity  |score^|component or |
|            |      |vulnerable^1  |in^3      |          |2     |feature      |
+------------+------+--------------+----------+----------+------+-------------+
|            |17.x  |None          |17.0.0    |          |      |             |
|            +------+--------------+----------+          |      |             |
|            |16.x  |16.1.0 -      |16.1.2.2  |          |      |             |
|            |      |16.1.2        |          |          |      |             |
|            +------+--------------+----------+          |      |             |
|            |15.x  |15.1.0 -      |15.1.5.1  |          |      |             |
|            |      |15.1.5        |          |          |      |             |
|            +------+--------------+----------+          |      |             |
|BIG-IP (all |14.x  |14.1.0 -      |14.1.4.6  |          |      |             |
|modules)    |      |14.1.4        |          |Critical  |9.8   |iControl REST|
|            +------+--------------+----------+          |      |             |
|            |13.x  |13.1.0 -      |13.1.5    |          |      |             |
|            |      |13.1.4        |          |          |      |             |
|            +------+--------------+----------+          |      |             |
|            |12.x  |12.1.0 -      |Will not  |          |      |             |
|            |      |12.1.6        |fix       |          |      |             |
|            +------+--------------+----------+          |      |             |
|            |11.x  |11.6.1 -      |Will not  |          |      |             |
|            |      |11.6.5        |fix       |          |      |             |
+------------+------+--------------+----------+----------+------+-------------+
|            |8.x   |None          |Not       |          |      |             |
|BIG-IQ      |      |              |applicable|Not       |      |             |
|Centralized +------+--------------+----------+vulnerable|None  |None         |
|Management  |7.x   |None          |Not       |          |      |             |
|            |      |              |applicable|          |      |             |
+------------+------+--------------+----------+----------+------+-------------+
|F5OS-A      |1.x   |None          |Not       |Not       |None  |None         |
|            |      |              |applicable|vulnerable|      |             |
+------------+------+--------------+----------+----------+------+-------------+
|F5OS-C      |1.x   |None          |Not       |Not       |None  |None         |
|            |      |              |applicable|vulnerable|      |             |
+------------+------+--------------+----------+----------+------+-------------+
|Traffix SDC |5.x   |None          |Not       |Not       |None  |None         |
|            |      |              |applicable|vulnerable|      |             |
+------------+------+--------------+----------+----------+------+-------------+

^1F5 evaluates only software versions that have not yet reached the End of
Technical Support (EoTS) phase of their lifecycle.

^2The CVSSv3 score link takes you to a resource outside of AskF5, and it is
possible that the document may be removed without our knowledge.

^3If your Public Cloud provider's marketplace does not have the Fixes
introduced in images, you can upgrade your existing public cloud BIG-IP
deployment via the traditional live install process. For information about
upgrading or updating your BIG-IP deployment, refer to the BIG-IP update and
upgrade guide. For cases where new images are required, you can create a custom
image using the fixed version. For information about creating a custom image
for Public Cloud, refer to K18908626: Creating Custom Images for Public Cloud.

Recommended Actions

If you are running a version listed in the Versions known to be vulnerable
column, you can eliminate this vulnerability by installing a version listed in
the Fixes introduced in column. If the Fixes introduced in column does not list
a version for your branch, then no update candidate currently exists for that
branch and F5 recommends upgrading to a version with the fix (refer to the
table).

If the Fixes introduced in column lists a version prior to the one you are
running, in the same branch, then your version should have the fix.

Mitigation

Until it is possible to install a fixed version, you can use the following
sections as temporary mitigations. These mitigations restrict access to
iControl REST to only trusted networks or devices, thereby limiting the attack
surface.

  o Block iControl REST access through the self IP address
  o Block iControl REST access through the management interface
  o Modify the BIG-IP httpd configuration

Block iControl REST access through the self IP address

You can block all access to the iControl REST interface of your BIG-IP system
through self IP addresses. To do so, you can change the Port Lockdown setting
to Allow None for each self IP address in the system. If you must open any
ports, you should use the Allow Custom option, taking care to disallow access
to iControl REST. By default, iControl REST listens on TCP port 443 or TCP port
8443 on single NIC BIG-IP VE instances. If you modified the default port,
ensure that you disallow access to the alternate port you configured.

Note: Performing this action prevents all access to the Configuration utility
and iControl REST using the self IP address. These changes may also impact
other services, including breaking high availability (HA) configurations.

Before you make changes to the configuration of your self IP addresses, F5
strongly recommends that you refer to the following articles:

  o K17333: Overview of port lockdown behavior (12.x - 16.x)
  o K13092: Overview of securing access to the BIG-IP system
  o K31003634: The Configuration utility of the Single-NIC BIG-IP Virtual
    Edition now defaults to TCP port 8443
  o K51358480: The single-NIC BIG-IP VE may erroneously revert to the default
    management httpd port after a configuration reload

If you must expose port 443 on your self IP addresses and want to restrict
access to specific IP ranges, you may consider using the packet filtering
functionality built into the BIG-IP system. For more information, refer to the
following article:

  o K13383: Configuring CIDR Network Addresses for the BIG-IP packet filter

Block iControl REST access through the management interface

To mitigate this vulnerability for affected F5 products, you should restrict
management access only to trusted users and devices over a secure network. For
more information about securing access to BIG-IP systems, refer to the
following articles:

  o K13092: Overview of securing access to the BIG-IP system
  o K46122561: Restricting access to the management interface using network
    firewall rules
  o K69354049: Restricting access to the BIG-IP management interface for
    Configuration Utility and iControl REST services using iptables

Note: Restricting access to the management interface by IP address in httpd is
not a viable mitigation for this issue.

Modify the BIG-IP httpd configuration

In addition to blocking access through the self IP addresses and management
interface, or as an alternative to blocking access if those options are not
possible in your environment, you can modify the BIG-IP httpd configuration to
mitigate this issue.

  o BIG-IP 14.1.0 and later
  o BIG-IP 14.0.0 and earlier

BIG-IP 14.1.0 and later

Impact of procedure: Performing the following procedure should not have a
negative impact on your system.

 1. Log in to the TMOS Shell (tmsh) of the BIG-IP system by entering the
    following command:

    tmsh

 2. Open the httpd configuration for editing by entering the following command:

    edit /sys httpd all-properties

 3. Locate the line that starts with include none and replace none with the
    following text:

    Note: If the current include statement already contains a configuration
    other than none, add the following configuration to the end of the current
    configuration, within the existing double-quotation mark characters (").

    "<If \"%{HTTP:connection} =~ /close/i \">
    RequestHeader set connection close
    </If>
    <ElseIf \"%{HTTP:connection} =~ /keep-alive/i \">
    RequestHeader set connection keep-alive
    </ElseIf>
    <Else>
        RequestHeader set connection close
    </Else>"

 4. After updating the include statement, use the ESC key to exit the editor
    interactive mode, then save changes by entering the following command:

    :wq

 5. At the Save changes (y/n/e) prompt, select y to save the changes.
 6. Save the BIG-IP configuration by entering the following command:

    save /sys config

BIG-IP 14.0.0 and earlier

Impact of procedure: Performing the following procedure should not have a
negative impact on your system.

 1. Log in to tmsh of the BIG-IP system by entering the following command:

    tmsh

 2. Open the httpd configuration for editing by entering the following command:

    edit /sys httpd all-properties

 3. Locate the line that starts with include none and replace none with the
    following text:

    Note: If the current include statement already contains a configuration
    other than none, add the following configuration to the end of the current
    configuration, within the existing double-quotation mark characters (").

    "RequestHeader set connection close"

 4. After updating the include statement, use the ESC key to exit the editor
    interactive mode, then save changes by entering the following command:

    :wq

 5. At the Save changes (y/n/e) prompt, select y to save the changes.
 6. Save the BIG-IP configuration by entering the following command:

    save /sys config

Indicators of compromise

 

Important: F5 last updated this section on May 9, 2022, at 8:00 AM Pacific
Time.

The information in this section is based on evidence that F5 has collected and
believes to be reliable indicators of compromise. It's important to note that
exploited systems may show different indicators, and a skilled attacker may be
able to remove traces of their work. It's impossible to prove a device is not
compromised; if you have any uncertainty, consider the device to be
compromised.

All versions

  o Use this comparison to determine the intent and potential impact of BIG-IP
    logs. For example, you may see the following entries in these logs:

    Entry in '/var/log/audit'

    May 00 00:00:00 hostname notice icrd_child[11111]: 11111111:5: AUDIT - pid=
    11111 user=admin folder=/Common module=(tmos)# status=[Command OK] cmd_data
    =run util bash -c id

    Entry in '/var/log/restjavad-audit.0.log'

    [I][1111][00 May 0000 00:00:00 UTC][ForwarderPassThroughWorker]
    {"user":"local/admin","method":"POST","uri":"http://localhost:8100/mgmt/tm/
    util/bash","status":200,"from":"nnn.nnn.nnn.nnn"}

    If the logs display any entries similar to these examples, this may
    indicate that a REST request from IP address nnn.nnn.nnn.nnn invokes
    command run util bash -c id. (in these log entries the id command is used
    only as an example). You must closely examine any /var/log/
    restjavad-audit.*.log and /var/log/audit* entries and compare them to
    legitimate REST calls against the device.

  o Other indicators of compromise may include unexpected modifications to any
    files, configurations, or running processes. F5 has iHealth heuristics
    designed to detect the following:
       Unknown processes running (H511618)
       When the Configuration utility iControl REST interface has been exposed
        to the Internet through the management interface (H444724)
       When a self IP address has Port Lockdown set to Allow All (H458565)

Additionally, refer to K11438344: Considerations and guidance when you suspect
a security compromise on a BIG-IP system.

Note: A lack of log entries or heuristic reports does not categorically
indicate that a unit is not compromised. A skilled attacker can remove evidence
of compromise, including log files, after successful exploitation.

Acknowledgements

This issue was discovered internally by F5.

Supplemental Information

o K41942608: Overview of security advisory articles
  o K4602: Overview of the F5 security vulnerability response policy
  o K4918: Overview of the F5 critical issue hotfix policy
  o K44525501: Overview of BIG-IP data and control planes
  o K8986: F5 software lifecycle policy
  o K9502: BIG-IP hotfix and point release matrix
  o K13123: Managing BIG-IP product hotfixes (11.x - 17.x)
  o K167: Downloading software and firmware from F5
  o K9970: Subscribing to email notifications regarding F5 products
  o K9957: Creating a custom RSS feed to view new and updated documents

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        https://www.auscert.org.au/bulletins/

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================
-----BEGIN PGP SIGNATURE-----
Comment: https://auscert.org.au/gpg-key/

iQIVAwUBYnxgPMkNZI30y1K9AQhqqg//TbkgzuVsvTypIjVQQW1+h+w7re20YKMZ
jeVjQ2dxFA+vN7Z9NZ7dGFUenv9mcr7ySX5pMJa3I9gJKQZzbX6BuiSbjW0ybCQs
VYyBpanWfIlXnzM8hyyTqJx4TralZSOqk6/qNaKDcd8oj+8XIU/o/XkuWInv8u5n
bDllUAPOvADaCo451ZYNACe3jiURcw39NaY7JWQUioJwYXTnzZYd+PGeFh2tjMtB
9uTEUFZKIFHu75kCfobZJhM95bUA6QrJJJKtZ3gPNjXvcmP8TcwQmYpCymHSyk7H
ACMVtbYYGO+yyEfs/sLp7ww3TifUYfcH0YqbiHhRSpbs5kN74rpCegLuHNGqkvV0
fIqb8q+OuMUMPvGSIkpSwXt7kbtDZl6f5NmK2FYcItVMOwyBDkkTD5VDIsBl3FGX
O9PZd/Ap7Dr2JX5iJ7//V9DgHW0a+Pukyhfxc14aUlgjB8MMAkQoqwvpFGrDeZch
wE02GihhAIPwgNLH8QdGdHmqEHs5sz2rYNwT9sqyhhq4LyWsivKkADDmMiX0sJAM
l40dYgP7BY2+wPd1/3AZG8SE80/mQiNcGSVxxpRgMUtI/8CaG1uuGAQtpbj1UVrl
fnXdyNSpOLH1oc+5Y4Ehs46JOi8cvCXnGPAt02XDvkPB3XLTazwzVl5zbNE7Dttc
+CDdaMtkfwA=
=+jtr
-----END PGP SIGNATURE-----