Skip to content

Fix BeyondTrust PRA/RS exploit failing on older instances#20938

Merged
bwatters-r7 merged 4 commits intorapid7:masterfrom
Chocapikk:fix-beyondtrust-mech-list-fallback
Feb 20, 2026
Merged

Fix BeyondTrust PRA/RS exploit failing on older instances#20938
bwatters-r7 merged 4 commits intorapid7:masterfrom
Chocapikk:fix-beyondtrust-mech-list-fallback

Conversation

@Chocapikk
Copy link
Copy Markdown
Contributor

@Chocapikk Chocapikk commented Feb 8, 2026

The get_site_info_via_mech_list method only queries /get_mech_list?version=3 which returns JSON on newer BeyondTrust instances. On older instances (e.g. 22.x), this endpoint returns HTTP 500, causing the company name lookup to fail and the exploit to abort with "Invalid company or app name".

This PR adds a fallback to /get_mech_list?version=2, which returns semicolon-separated key=value pairs (e.g. company=example;product=ingredi) and works on all tested versions.

Also removes the "Thank you for using BeyondTrust" string check in the check method's BRDF validation. Privileged Remote Access (PRA) instances do not contain this string in their BRDF data, causing check to incorrectly return Unknown for PRA targets.

Verification

  • Start msfconsole
  • use exploits/linux/http/beyondtrust_pra_rs_unauth_rce
  • set RHOSTS <target> (an older BeyondTrust RS instance, e.g. version 22.x)
  • set RPORT 443
  • set SSL true
  • set VERBOSE true
  • check
  • Verify check returns Appears with detected version (previously failed with Unknown on 22.x instances because version=3 returned HTTP 500)
  • Verify verbose output shows Got site info via the /get_mech_list?version=2 endpoint. confirming the v2 fallback was used
  • Verify check also works on newer instances (version=3 JSON path still tried first)

Tested on

  • BeyondTrust Remote Support 22.x: check returns Appears with detected version (previously failed, v3 returns HTTP 500, v2 fallback succeeds)

The /get_mech_list?version=3 endpoint returns HTTP 500 on older
BeyondTrust versions that do not support the JSON API. Add a
fallback to version=2 which returns semicolon-separated key=value
pairs (e.g. "company=sewtest;product=ingredi").

Also remove the "Thank you for using BeyondTrust" check in the
BRDF validation, as PRA instances do not contain this string,
causing the check method to incorrectly report Unknown for PRA
targets.
Comment thread modules/exploits/linux/http/beyondtrust_pra_rs_unauth_rce.rb Outdated
Comment thread modules/exploits/linux/http/beyondtrust_pra_rs_unauth_rce.rb Outdated
Comment thread modules/exploits/linux/http/beyondtrust_pra_rs_unauth_rce.rb Outdated
Chocapikk and others added 3 commits February 10, 2026 18:02
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
@bwatters-r7 bwatters-r7 self-assigned this Feb 19, 2026
@bwatters-r7 bwatters-r7 added rn-enhancement release notes enhancement labels Feb 19, 2026
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Metasploit Kanban Feb 20, 2026
@bwatters-r7
Copy link
Copy Markdown
Contributor

I only have access to 24.1.2, but I can confirm no regressions.

@bwatters-r7 bwatters-r7 merged commit cf497a8 into rapid7:master Feb 20, 2026
20 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Metasploit Kanban Feb 20, 2026
@bwatters-r7
Copy link
Copy Markdown
Contributor

Release Notes

Improves the check method in the beyondtrust_pra_rs_unauth_rrce to properly detect older versions that are also vulnerable but report the version in a different way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rn-enhancement release notes enhancement

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants