
pfSense CE 2.9.0-DEVELOPMENT - High - Remote - RCE - assign Add if_add
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · pfsense-assign-if-add
Class: RCE Reach: Remote
pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org
interfaces_assign.php Add stores $_POST['if_add'] without $portlist membership. Submit remaps only ports in $portlist. wireless_regex is /^(ath|...)[0-9]+/ with no $. ath0;w matches. Clone plus get_wireless_modes interpolates into ifconfig.
| ID | no CVE yet |
| Class | RCE |
| Reach | Remote (authenticated WebGUI unless noted) |
| CWE | CWE-78 |
| CVSS | High: 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Product | pfSense CE |
| Affected | 2.9.0-DEVELOPMENT (9363ac5b8651a1c7a333180425ce7719070f95f9) |
| Auth | WebGUI session with page-interfaces-assignnetworkports then GET interfaces.php?if=optN |
| License | GNU Affero GPL v3.0 |
| Lab | 127.0.0.1 only |
I pinned public master 9363ac5. The lab is a PHP gadget of the pinned sink, loopback HTTP on 127.0.0.1:18920.
Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers
| Method | Sink | Privilege |
|---|---|---|
| POST interfaces_assign.php if_add, then GET interfaces.php?if=optN | unanchored wireless_regex then interface_wireless_clone ifconfig | Integrity: Lab-proven: Add stored ath0;w as opt1; GET interfaces.php?if=opt1 ran clone ifconfig; extra w wrote the witness. |
| same leftover | same sink | Recon: Inferred: root shell can read host files. |
| same leftover | same sink | Availability: Inferred: hostile ifconfig on assigned ports. |
Requires: page-interfaces-assignnetworkports then GET interfaces.php?if=optN. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Requires: page-interfaces-assignnetworkports then GET interfaces.php?if=optN. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.
Submit remap of a non-portlist if_add does not exec. Diagnostics: Command not required.
No Diagnostics: Command unless that page is also granted.
cd lab
./run.sh
Loopback 127.0.0.1:18920. Compose project pfsense-assign-if-add. Witness PFSENSE-ASSIGN-IF-ADD-WITNESS. Loopback only: 127.0.0.1:18920. Compose project pfsense-assign-if-add. Witness PFSENSE-ASSIGN-IF-ADD-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.
Last line:
SUCCESS PFSENSE-ASSIGN-IF-ADD control-no-exec=yes trigger-exec=yes PFSENSE-ASSIGN-IF-ADD-WITNESS
Require if_add in $portlist. Anchor wireless_regex with $. escapeshellarg clone names.
9363ac5b8651a1c7a333180425ce7719070f95f9