[jcifs] Re: Remote command Execution?
Christopher R. Hertel
crh at ubiqx.mn.org
Fri Sep 10 16:21:24 GMT 2004
On Fri, Sep 10, 2004 at 04:19:19PM +0200, michael melhem wrote:
> Hi Mike, et al.
>
> Remote execution via atsvc + jarapac is working fine for me. However there
> are two issues:
>
> 1. There appears to be no way of running tasks immediately using atsvc. the
> best I can do is work out the time of the remote windows machine and
> calculate a invocation time + 2mins. I can get the time from the remote
> windows machine using NET TIME. (Seems strange that relative or immediate
> scheduling is not supported by the standard windows schedulers)
There may be an RPC call that supports (on purpose!?) arbitrary command
execution. If such a beast exists, it would be a heavily guarded secret.
I find it humorous that you can use atsvc.
> 2. The other problem with this is that you cannot get the return code of
> remote command. This we might just have to live with.
How does atsvc report results? Any way to capture the output?
> An aside:
>
> I think its possible using RPC to remotely install and start an arbitrary
> service on a remote windows machine (from a windows machine).
Heck, you could use atsvc to install something. :)
In the Samba4 source tree (somewhere) there's an example RPC server for
Windows. I think it's called RPCECHO or somesuch. It simply echoes back
whatever you send it, but it's great for testing and would work as a piece
of example code.
> Is it possible
> to do something similar from Linux, using jarapac perhaps? This could be
> another way to implement remote command execution by installing the
> appropriate service.
Installing such a service is very dangerous, of course. Security alarms
are already blaring in my head.
Chris -)-----
--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jcifs
mailing list