
OPNsense 26.7.6 - उच्च - रिमोट - कॉन्फ़िग लाइन इंजेक्शन - ट्यूनएबल्स लोडर
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · opnsense-tunables-loader
Class: Config line injection Reach: Remote
OPNsense core 26.7.6 (a842fe48) - opnsense.org
System: Advanced: Tunables अभी भी name/value को /boot/loader.conf में interpolate करता है। GHSA-fq94 का बचा हुआ sibling। Tunables.xml के tunable / value bare TextField हैं (newlines on)। system_login_configure() {$param}="{$value}" लिखता है। Tunables reconfigure login को भी restart करता है। Live sysctl(8) shell_safe और एक OID filter से होकर जाता है, इसलिए वह hop shell injection नहीं है। बचा हुआ हिस्सा अगले boot पर extra loader directives है। Privilege page-system-advanced-sysctl है, page-all नहीं।
यह GitHub pack coordinated disclosure तक private रहता है।
| ID | अभी कोई CVE नहीं |
| Class | Config line injection |
| Reach | Remote (authenticated WebGUI / API) |
| CWE | CWE-93 |
| CVSS | High: 8.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Product | OPNsense core |
| Affected | 26.7.6 (a842fe48c21288d11a422cb944678e8eb308becf) System: Advanced: Tunables |
| Auth | WebGUI session या page-system-advanced-sysctl वाली API key |
| License | GNU Affero GPL v3.0 |
| Lab | compose exec gadget (hunt slot 18850) |
मैंने tag 26.7.6 peel a842fe48 pin किया। Lab pinned system_login_configure() interpolation का एक PHP gadget है। Compose project opnsense-tunables-loader। 18800-18860 gadget family में hunt slot 18850; यह compose file docker compose exec php का उपयोग करती है, किसी published HTTP bind का नहीं।
| Method | Sink | Privilege |
|---|---|---|
Tunables value CR/LF (hw.usb.no_boot_wait plus "\n# witness) | /boot/loader.conf में system_login_configure() extra line pin करें | Integrity (lab-proven): closed assignment के बाद अपनी अलग line पर extra # OPNSENSE-TUNABLES-LOADER-WITNESS। Lab: newline-extra-line=yes। |
Clean value 1 | वही writer | Negative (lab-proven): single assignment line, कोई witness नहीं। Lab: clean-value-single-line=yes। |
| अगले boot पर वही extra loader lines | loader init_path / module_path / *_load / vfs.root.mountfrom / console | Integrity (inferred): next-boot loader attacker keys को honor करता है। इस gadget में reboot नहीं किया गया। |
Garbage loader lines / गलत vfs.root.mountfrom | /boot/loader.conf | Availability (inferred): boot fail या गलत root। |
POST /api/core/tunables/searchItem | tunables API | Recon (inferred): tunables list करें, current/default/type सहित। इस ACL के लिए intended। |
किसी valid OID का live sysctl -w | set_sysctl + OID filter | Intended page job। Extra loader lines ही बचा हुआ हिस्सा हैं। |
Lab-proven vs inferred: newline extra loader line और clean-value single-line lab SUCCESS हैं। Next-boot loader apply inferred है। Gadget, पूरा OPNsense FreeBSD VM नहीं।
Requires: signed-in user या उस user की Local API key जिसके पास page-system-advanced-sysctl हो और page-all न हो। POST /api/core/tunables/*। session POST पर CSRF। Reconfigure login को restart करता है; rc.reload_all और boot भी system_login_configure को call करते हैं।
| Surface | Lab |
|---|---|
| Live sysctl shell injection | shell_safe plus OID filter |
| Clean value | single assignment line |
| Unauth | 401 |
page-system-advanced-sysctl के बिना user | 403 |
user-config-readonly | save() throws |
page-all tunables admin द्वारा असली OID set करना | intended |
| GHSA-fq94 patched GUI text fields | अलग sinks; इस field का नाम नहीं लिया गया |
कोई unauth नहीं। कोई live sysctl shell नहीं। कोई Diagnostics: Command नहीं।
cd lab
./run.sh
Compose project opnsense-tunables-loader। Witness OPNSENSE-TUNABLES-LOADER-WITNESS। अंतिम line:
SUCCESS opnsense-tunables-loader newline-extra-line=yes clean-value-single-line=yes OPNSENSE-TUNABLES-LOADER-WITNESS
Root launcher: python3 opnsense-tunables-loader-Abraxas-Labs.py.
tunables name और value से CR/LF और " strip करें, GHSA-fq94 जैसी ही class। name को OID mask के रूप में type करें, bare TextField के रूप में नहीं। ऐसे helper से quote करें जो assignment को close न कर सके। किसी tunable को /boot/loader.conf में तब तक न लिखें जब तक वह known loader key न हो।
a842fe48c21288d11a422cb944678e8eb308becfsystem.inc system_login_configure loader.conf interpolationTunables.xml bare TextField name/value