Related PR: https://github.com/rapid7/metasploit-framework/pull/2139
I haven't thought about how the handles are handled (unhandily), especially not during migration. I guess we could track them and close via railgun in execute unless they are required and then they have to be manually tidied up by the caller? 

Date: Mon, 30 Sep 2013 18:13:41 -0700From: notifications@github.com
To: meterpreter@noreply.github.com
CC: campbell_ab@hotmail.com
Subject: Re: [meterpreter] Returns the Channel In/Out Handles (#13)

In source/extensions/stdapi/server/sys/process/process.c:

>  			CloseHandle(pi.hThread);
>  		}
>  
>  	} while (0);
>  
> -	// Close the read side of stdin and the write side of stdout
> -	if (in[0])
> -		CloseHandle(in[0]);
> -	if (out[1])
> -		CloseHandle(out[1]);
> -

If we're not closing these handles here, should we be closing them elsewhere? What happens with them during migration?


—
Reply to this email directly or view it on GitHub.