Re: freeconsole()

From: Oscar Gallego Sendín (ogs@robota.net)
Date: 02/27/03

  • Next message: Rory Savage: "Non registering shell"
    From: Oscar Gallego Sendín <ogs@robota.net>
    To: <vuln-dev@securityfocus.com>
    Date: Thu, 27 Feb 2003 11:20:17 +0100
    
    

    > I am using a basic reverse shell written in C as part of an html based
    > exploit recently revealed by malware.com. it uses WSAStartup() and
    > CreateProcess(). I'm looking for a way to hide the console created by
    > CreateProcess. I've tried freeconsole() with no params as suggested by
    some
    > sources, however this does not work.
    >
    > Any ideas would be appreciated.
    >

    Try to add this values into your startupinfo struct:

    si.dwFlags = STARTF_USESHOWWINDOW ;
    si.wShowWindow = SW_HIDE ;

    Also, look for info on CreateProcess. There are flags like:

    DETACHED_PROCESS
    CREATE_NO_WINDOW

    This values, when combined, should hide the console
    window and also GUI windows... So you can execute, for
    instance, a hidden calc.exe

    Good luck

    --
    Oscar Gallego Sendin
    ROBOTA [ http://www.robota.net ]
    


    Relevant Pages

    • Screen flash when using cl.exe
      ... same bug exists with Microsoft's cl.exe compiler. ... I request that it be replaced with CreateProcess. ... When Windows starts a subprocess, it will try and attach it to a console unless ...
      (microsoft.public.dotnet.languages.vc)
    • Re: Using PsSetCreateProcessNotifyRoutine on Terminal Services
      ... CreateProcessAsUseronly start a new process in the session the ... service using CreateProcess(), this is the console session -- and only the ... Author of "Windows Server 2003 Terminal Services", ... I'd think that the window station's user ...
      (microsoft.public.windows.terminal_services)
    • CreateProcess
      ... CreateProcess but finding the hwnd of the process is giving me troubles. ... EnumWindows searching for the window that has the treadID returned by ... I trying to call::GetWindowInfo in the EnumWindows ...
      (microsoft.public.vc.atl)
    • Re: How to run a program silently with CreateProcessWithLogonW()?
      ... I don't have a window showing up when I used ... > The first thing was that I didn't see any console window and per our ... > default characteristics from that of CreateProcess(). ... > STARTUPINFOW si; ...
      (microsoft.public.win32.programmer.kernel)
    • Re: WinHelp on W2003 SP1
      ... it looks like if I have to I can use CreateProcess to make the help ... window each time, there could be lots of open windows. ... > process terminates. ... >> 3> in Log On tabpage, if you log on your service as Local System Account, ...
      (microsoft.public.win32.programmer.tools)