This module exploits an arbitrary file creation vulnerability in the pfSense HTTP interface (CVE-2021-41282). The vulnerability affects versions <= 2.5.2 and can be exploited by an authenticated user if they have the "WebCfg - Diagnostics: Routing tables" privilege. This module uses the vulnerability to create a web shell and execute payloads with root privileges.
Exploit database
Vulnerability
CVE-2021-41282
Vulnerability details
- Score
- 8.8
- Severity
- high
CVSS 3.1 · NVD
Vector string
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HDescription
diag_routes.php in pfSense 2.5.2 allows sed data injection. Authenticated users are intended to be able to view data about the routes set in the firewall. The data is retrieved by executing the netstat utility, and then its output is parsed via the sed utility. Although the common protection mechanisms against command injection (i.e., the usage of the escapeshellarg function for the arguments) are used, it is still possible to inject sed-specific code and write an arbitrary file in an arbitrary location.
CVE ProgramShowing saved CVE details. Refresh is temporarily unavailable.
Exploit source choices
3 sourcespfSense Diag Routes Web Shell Upload
2022-02-23pfsense_diag_routes_webshell.rb
arpsyndicate/kenzer-templates
essential templates for kenzer [DEPRECATED]
2020-09-185,308 files · 118 stars
bantahacka/pfsense_2021-41282
bantahacka/pfsense_2021-41282 source repository
2022-10-062 files · 2 stars