metasploit-framework May 2011 archive
Main Archive Page > Month Archives  > metasploit-framework archives
metasploit-framework: Re: [framework] post append_file kills met

Re: [framework] post append_file kills meterpreter

From: Balint Varga-Perke <vpbalint_at_nospam>
Date: Sun May 29 2011 - 22:56:32 GMT

I also think that write_file() for plain *nix shells is basically broken:

session.shell_command_token("cat #{data} >> '#{file_name}'")

I think echo should be used instead of cat and whitespace in data should
be properly escaped. Unfortunately I don't have idea yet to transfer
binary data...

I would like to work on this issue, how should I send in patches?

On 2011-05-29 19:44, Balint Varga-Perke wrote:
> Hi,
> I'm writing a post module that has to append some lines at the end of
> a file. I'm using Meterpreter on a Win7 machine for testing and
> append_file() of Msf::Post::File for file access.
> As append_file() tries to open the file the Meterpreter process dies
> with c0000417 exception code.
> the actual code can be found here:
> Is this a bug? Thanks in advance:
> Balint