Re: Thread Injection + Cygwin problems

2006-06-21 Thread Kaveh Goudarzi
Christopher Faylor wrote: On Wed, Jun 21, 2006 at 07:44:15AM +0100, Kaveh Goudarzi wrote: cgf wrote: Sorry. Don't know. I've given you the basic facts but researching this further is not something that I'm interested in doing. Your use is very much a corner case and if it do

Re: Thread Injection + Cygwin problems

2006-06-20 Thread Kaveh Goudarzi
Hi, The problem may be due to the fact that the injected thread doesn't have a cygtls area. If the thread is injected prior to the completion of cygwin's initialization or if it somehow bypasses the DLL_THREAD_ATTACH phase of the initialization (which was one problem that I had to deal with in

Thread Injection + Cygwin problems

2006-06-19 Thread Kaveh Goudarzi
Hi, I've written a program to detect the invocation of processes and then inject them with a remote thread in the hope of getting the cmdLine/cwd and environment variables of the running process. In doing so I came across the fact that cygwin does not synch its vars with windows for cygwin

Re: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API

2006-05-02 Thread Kaveh Goudarzi
Hi Guys, Thanks for your input. So it looks like my version of cygwin1.dll does not have the functionality I was trying to use namely the CW_SYNC_WINENV (doing an nm on cygwin1.dll I don't see sync_winenv ()). So unless there is going to be an imminent release I would be gratefu

Re: Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API

2006-04-29 Thread Kaveh Goudarzi
Hi Eric/Brian, Thanks for your responses. I hope you don't mind answering a few more questions :-) 1. is it possible to somehow force cygwin to always sync the env with windows prior to spawning a child process (any child process)? 2. How does cygwin work out if it's spawning a

Truncated Environment Variables? - using Cygwin + GetEnvironmentStrings() WIN32 API

2006-04-29 Thread Kaveh Goudarzi
Hi, I'm working on an app which attempts to get the environment of running cygwin apps. It does this by running the GetEnvironmentStrings() win32 api call in the context of the running cygwin app (code injection). However the result that comes back as a truncated version of the environme