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

Msfvenom add win32 shellcode doesn't work for Jar file #9792

Open
UrfTheManatee opened this issue Mar 31, 2018 · 3 comments
Open

Msfvenom add win32 shellcode doesn't work for Jar file #9792

UrfTheManatee opened this issue Mar 31, 2018 · 3 comments

Comments

@UrfTheManatee
Copy link

Steps to reproduce

How'd you do it?

  1. use msfvenom -c to add additional shellcode to a jar file

Expected behavior

Execute the shellcode.

Current behavior

Shellcode executes when outputting to an exe but does not execute when using a jar output.

System stuff

Metasploit version

4.16.45-dev

I installed Metasploit with:

Commercial installer

OS

Ubuntu LTS

@jmartin-tech
Copy link
Contributor

@bcook-r7, @timwr thoughts here? AFAIK -c would not apply to java payloads. Should the solution be to gate this combination better or would be a reasonable feature to add this capability to java?

Based on what I see here current intent is that -c would only be for windows binary payloads.

def add_shellcode(shellcode)
if add_code.present? and platform_list.platforms.include? Msf::Module::Platform::Windows and arch == ARCH_X86
cli_print "Adding shellcode from #{add_code} to the payload"
shellcode_file = File.open(add_code)
shellcode_file.binmode
added_code = shellcode_file.read
shellcode_file.close
shellcode = ::Msf::Util::EXE.win32_rwx_exec_thread(shellcode,0,'end')
shellcode << added_code
else
shellcode.dup
end
end

@timwr
Copy link
Contributor

timwr commented Apr 12, 2018

I think it's reasonable to disable it if it doesn't work or was never implemented.

@github-actions
Copy link

github-actions bot commented Dec 2, 2020

Hi!

This issue has been left open with no activity for a while now.

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

@github-actions github-actions bot added the Stale Marks an issue as stale, to be closed if no action is taken label Dec 2, 2020
@github-actions github-actions bot removed the Stale Marks an issue as stale, to be closed if no action is taken label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants