-
Notifications
You must be signed in to change notification settings - Fork 14.3k
vBulletin replaceAdTemplate Remote Code Execution #20235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
vBulletin replaceAdTemplate Remote Code Execution #20235
Conversation
beaf745
to
1f6dd34
Compare
modules/exploits/multi/http/vbulletin_replace_ad_template_rce.rb
Outdated
Show resolved
Hide resolved
modules/exploits/multi/http/vbulletin_replace_ad_template_rce.rb
Outdated
Show resolved
Hide resolved
modules/exploits/multi/http/vbulletin_replace_ad_template_rce.rb
Outdated
Show resolved
Hide resolved
documentation/modules/exploit/multi/http/vbulletin_replace_ad_template_rce.md
Outdated
Show resolved
Hide resolved
documentation/modules/exploit/multi/http/vbulletin_replace_ad_template_rce.md
Outdated
Show resolved
Hide resolved
documentation/modules/exploit/multi/http/vbulletin_replace_ad_template_rce.md
Outdated
Show resolved
Hide resolved
documentation/modules/exploit/multi/http/vbulletin_replace_ad_template_rce.md
Show resolved
Hide resolved
documentation/modules/exploit/multi/http/vbulletin_replace_ad_template_rce.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Julien Voisin <[email protected]>
Co-authored-by: Julien Voisin <[email protected]>
…template_rce.md Co-authored-by: Julien Voisin <[email protected]>
…template_rce.md Co-authored-by: Julien Voisin <[email protected]>
…template_rce.md Co-authored-by: Julien Voisin <[email protected]>
aaa38b3
to
427b929
Compare
427b929
to
6644bfa
Compare
@Chocapikk @jvoisin just for the records: the affected versions should be all 5.x and early 6.x versions before 6.0.4. So, it's not just 5.1.0-6.0.3, but 5.0.0-6.0.3. |
@Chocapikk Furthermore, I'd also suggest to revisit the
Simple and more efficient than relying on versions matching, IMHO. |
Hi @EgidioRomano , Thanks for the suggestions, I'll take this into consideration, the goal being that the check function is as less intrusive as possible, but yes, I see what you mean, it's also a valid solution |
@Chocapikk one more thing: furthermore, relying on versions matching could provide false positives... For instance, I guess most of the vBulletin 5.x websites out there are using the latest 5.7.5 version, but the question is that some (most?) of those websites have likely applied security patches, so they're not vulnerable... Even if your current |
@EgidioRomano Complimenti 🇮🇹 invece di delegare a version matching si può tentare un approccio leggermente più aggressivo ma comunque innoquo. Si forza il target ad eseguire qualcosa come |
🇮🇹 @Admin9961 Grazie! Si, anche il tuo metodo può funzionare... Ma come dice anche @Chocapikk, l'obiettivo è rendere la funzione 🇬🇧 @Admin9961 Thanks! Yeah, your method might work too... But as @Chocapikk also says, the goal is to make the |
Yes this is less aggressive, I've actually missed that method. It's very optimal, implement that please @Chocapikk |
Hey @Admin9961 , I'll do it. Just not right away. I've been working too hard these past few days, but yes, I'll use this method. Thanks for the feedback, guys! |
e0031c9
to
2b1fa02
Compare
346e672
to
c84237e
Compare
771554e
to
717b995
Compare
717b995
to
854d235
Compare
end | ||
|
||
def check | ||
inject_and_trigger(:check) ? CheckCode::Appears : CheckCode::Safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be vulnerable
, since we're performing the exploit?
modules/exploits/multi/http/vbulletin_replace_ad_template_rce.rb
Outdated
Show resolved
Hide resolved
inject_and_trigger(:exploit, payload: payload.encoded) | ||
end | ||
|
||
def inject_and_trigger(mode, payload: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By using the exploit for the check, this is giving little feedback to the user. It might be worthwhile to print out status messages using something like vprint_status
to the user.
'vars_post' => render_vars | ||
) | ||
|
||
if mode == :check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also explicitly use false
.
Yes, nil
will be falsey, but in this case, we can just return the clearer value.
0f22fe4
to
33439fc
Compare
Hello Metasploit Team,
This PR introduces the unauthenticated RCE module
exploit/multi/http/vbulletin_replace_ad_template_rce
. It exploits a flaw in vBulletin 5.0.0–6.0.3 on PHP 8.1+ by abusing thereplaceAdTemplate
AJAX endpoint to inject a<vb:if>
template that executes"system"("base64_decode"($_POST[<param>]))
, then triggers it viaajax/render/ad_<location>
. No CVE has been assigned for this issue; it was publicly documented by Egidio Romano (EgiX) at Karma(In)Security: https://karmainsecurity.com/dont-call-that-protected-method-vbulletin-rce.cc: @EgidioRomano
I've provided a vBulletin 6.0.1 package to the msfdev team by email (Please check, because I think the email has been blocked as a “security issue”) for private testing.
Verification
After installing vBulletin as documented, run:
Verify a Meterpreter session is established as the webserver user.
The module's documentation covers additional details on setup and usage.
Thanks for reviewing!