Skip to content
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

modules/exploits/multi/http/struts_code_exec_parameters.rb throwing error for nto able to generate an executable payload #10000

Closed
1 task
gsinghlally opened this issue May 9, 2018 · 6 comments

Comments

@gsinghlally
Copy link

Steps to reproduce

How'd you do it?
just run and you will see the error
ERROR Message
Exploit failed: Msf:: NoCompatiblePayloadError Failed to generate an executable payload due to an invalid platform or arch

Metasploit version

v4.16.36-dev

I installed Metasploit with:

OS

What OS are you running Metasploit on?
ubuntu 14.04

@busterb
Copy link
Member

busterb commented May 9, 2018

You just had to spoil #10000 didn't you :P

@busterb
Copy link
Member

busterb commented May 9, 2018

Sigh, what parameters did you use... Did you set a payload?

@timwr
Copy link
Contributor

timwr commented May 10, 2018

10000!

@wvu
Copy link
Contributor

wvu commented May 16, 2018

Try again, thanks.

@wvu wvu closed this as completed May 16, 2018
@wvu
Copy link
Contributor

wvu commented May 16, 2018

msf5 exploit(multi/http/struts_code_exec_parameters) > options

Module options (exploit/multi/http/struts_code_exec_parameters):

   Name             Current Setting              Required  Description
   ----             ---------------              --------  -----------
   CHECK_SLEEPTIME  5                            yes       The time, in seconds, to ask the server to sleep while check
   GET_PARAMETERS                                no        Additional GET Parameters to send. Please supply in the format "param1=a&param2=b". Do apply URL encoding to the parameters names and values if needed.
   PARAMETER        username                     yes       The parameter to perform injection against.
   Proxies                                       no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOST            127.0.0.1                    yes       The target address
   RPORT            8080                         yes       The target port (TCP)
   SSL              false                        no        Negotiate SSL/TLS for outgoing connections
   TARGETURI        /blank-struts2/login.action  yes       The path to a struts application action
   TMP_PATH                                      no        Overwrite the temp path for the file upload. Sometimes needed if the home directory is not writeable. Ensure there is a trailing slash!
   VHOST                                         no        HTTP server virtual host


Payload options (java/meterpreter/reverse_tcp):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST  127.0.0.1        yes       The listen address
   LPORT  4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   2   Java Universal


msf5 exploit(multi/http/struts_code_exec_parameters) > run

[!] You are binding to a loopback address by setting LHOST to 127.0.0.1. Did you want ReverseListenerBindAddress?
[*] Started reverse TCP handler on 127.0.0.1:4444
[-] Exploit failed: Msf::NoCompatiblePayloadError Failed to generate an executable payload due to an invalid platform or arch.
[*] Exploit completed, but no session was created.
msf5 exploit(multi/http/struts_code_exec_parameters) >

It doesn't work with Java payloads (ironically the default target), since you can't generate_payload_exe on them.

@wvu
Copy link
Contributor

wvu commented May 16, 2018

Tried again for you and fixed.

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

No branches or pull requests

4 participants