Metasploit mailing list archives

Re: smb_relay and vncinject


From: nicob at nicob.net (Nicob)
Date: Mon, 10 Sep 2007 22:43:35 +0200

Le lundi 10 septembre 2007 ? 10:26 -0500, H D Moore a ?crit :

To resolve this, we need spawn a new thread from 
within the wrapper exe and return a successful result back. Is anyone 
familiar with writing EXE-based Windows services?

I was looking at this very problem last week. From my notes :

Higly commented code from the Windows version of SVN :
http://svn.collab.net/repos/svn/trunk/subversion/svnserve/winservice.c

A basic Win32 service which only speak to the SCM and make beeps :
http://www.muukka.net/programming/Beeper%20Service.cpp

A generic skeleton for a simple NT service :
http://www.codeproject.com/system/serviceskeleton.asp?msg=2215914

This kind of code is useful when exploiting a badly ACL-ed service,
where binaries are world writable. Adding a "service" command to
msfpayload, creating a binary telling "I'm running" to the SCM would be
great. But I'm not a C coder ...

Nicob





Current thread: