Spot on. Last summer I successfully reversed the WIn7 console behavior and am able to create and control the console with only NTDLL calls. I was quite happy
.
Last week, I tried to run my code on Win8 and it blew up on CsrClientConnectToServer when trying to connect to the new separated console server (CONHOST). I debugged down to where RtlHeapAlloc was returning NULL because the SIZE_T being passed in happened to be a ptr which RtlHeapAlloc nicely (?) determined that it had to be a programmer error. I was a bit confused as the ptr was a "reasonable" value to alloc (less than 700k), but perhaps there's some sanity/alignment checks.
From that I traced back up to the CsrClientConnectToServer call and realized it now just wanted a SIZE_T rather than a ptr to one. I fixed that in my code and it got way further, so I came here first before going down that rabbit hole
Anyway I am now motivated to get my code working on Win8 (and will be happy to share). Perhaps I'll now have to understand more about the new /Device/ConDrv piece of the puzzle as well and any of the changes to the Csr port communication. They probably re-architected the CSR console system with a kernel driver to reduce the costs of constant context switching (ala NT4 user/gdi Win32.sys).
hbelusca wrote:@asherkobin: "Perhaps there are other changes as well. Does anyone have insight into this before I spend more time reversing it?" <--- they changed quite a bit of stuff in Win8, amongst which how the console is architectured (now it is in conhost.exe as on windows 7 AND in some obscure driver called condrv.sys). Knowing that before win7 (and in win7 to some extent), console was the main thing that used CSR to work, it may be that due to those internal changes, they "simplified" a bit the CSR functions (btw I've doublechecked your asserts concerning CsrClientConnectToServer by looking at kernelbase.dll, because this API is called to initialize a client/server connection between CSRSS servers and the rest, "the rest" == console and "base" clients that are in kernel***.dll).
Also, it may be interesting to reverse how the console is architectured in Windows 8+...