| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Sep 15, 2002 1:28 pm Post subject: ADMIN$ Share / RPC Service Interface |
|
|
Does anyone have a clue about how to use the RPC Service Interface? I am trying to use it with VDS so that I can copy a client program (that will shut down a computer) and run it on the remote computer on the network... Seems that I am very close to finishing a script I have been working on all year if I can figure this out... but until then, I'm stuck...
| Quote: | | This client is working on the system account and is not required to have additional user's threads or user's rights to shutdown or restart. |
Thanks for any help  _________________ FreezingFire
VDSWORLD.com
Site Admin Team
Last edited by FreezingFire on Sun Oct 06, 2002 4:24 pm; edited 1 time in total |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Sep 17, 2002 12:57 pm Post subject: |
|
|
Hi FreezingFire,
I think the only VDS DLL out there that could come close to doing this would be my Gadget DLL. If you have either some C/C++ or VB example code that uses RPC send it to me and I would be glad to try and translate it to my Gadget's syntax for you. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Tue Sep 17, 2002 5:26 pm Post subject: |
|
|
If you really are to use Gadget, try the InitiateSystemShutdown API call in advapi32.dll.
BOOL InitiateSystemShutdown(
LPTSTR lpMachineName, // address of name of computer to shut down
LPTSTR lpMessage, // address of message to display in dialog box
DWORD dwTimeout, // time to display dialog box
BOOL bForceAppsClosed, // force applications with unsaved changes flag
BOOL bRebootAfterShutdown // reboot flag
);
I really doubt this allows the remote machine to be powered off though. |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Sep 19, 2002 1:33 pm Post subject: |
|
|
Tommy,
According to the Win32 API help file that I posted to vdsworld.com's Doc's section it says
| Quote: | To shut down the local computer, the calling process must have the SE_SHUTDOWN_NAME privilege. To shut down a remote computer, the calling process must have the SE_REMOTE_SHUTDOWN_NAME privilege on the remote computer. By default, users can enable the SE_SHUTDOWN_NAME privilege on the computer they are logged onto, and administrators can enable the SE_REMOTE_SHUTDOWN_NAME privilege on remote computers.
Common failures include an invalid or inaccessible computer name or insufficient privilege. |
I am thinking of looking into SNMP and see if there is some simple examples that I can put together either with Gadget or with another DLL.
As for using RPC I will need to do some research on using this before I could say if it can be done or not.
I might add remotely shutting down PC's is not a good thing and if used in a bad way it could be very dangerous . Security has to be accounted for here and any programs written should not be released to the general public. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Thu Sep 19, 2002 2:44 pm Post subject: |
|
|
| Quote: | | I might add remotely shutting down PC's is not a good thing and if used in a bad way it could be very dangerous . Security has to be accounted for here and any programs written should not be released to the general public. |
Just my opinion here... Remotely shutting down PC's is not a good thing if used in a bad way. Yes it could be very dangerous if used in a bad way. Security does need to be accounted for. But I disagree that because a tool has the potential to be used in a bad way that it should not be released to the general public. Where would we be if all the tools that had the potential to be used in a bad way were never shared by their inventors for fear that someone might use it for something other than the intended purpose? |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Thu Sep 19, 2002 3:14 pm Post subject: |
|
|
| mindpower wrote: | I might add remotely shutting down PC's is not a good thing and if used in a bad way it could be very dangerous . Security has to be accounted for here and any programs written should not be released to the general public. |
I must agree with it that this is absolute nonsense. All things can be used to do bad things,
even a pen could possibly be used by someone out there to kill someone. |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Sep 19, 2002 4:37 pm Post subject: |
|
|
Hi All,
The only thing I really have to say here is that locks are only there to keep an honest man honest.
I don't know about you but I would not be very happy if while working on my gadget DLL someone targeted my PC and shut it down and I loose everthing that I was working on. While I do have backups and I have taken steps to lessen the effects of something like this happening no system is 100% and until that happens I do not think that we should write software that can be destructive without taking the proper steps to control such power. That was all I was trying to say.
Also would you give the blueprints of where you hide your valuables in your house to a thef? I would not... Just food for thought... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Sep 19, 2002 7:02 pm Post subject: |
|
|
A firewall such as ZA (Zone Alarm) should stop
unauthorized access to your PC, both from the
internet and/or a LAN...
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Thu Sep 19, 2002 7:04 pm Post subject: |
|
|
Also of course you could simply disable "Client for Microsoft Networks" on your internet-specific
connection. |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Sep 19, 2002 8:49 pm Post subject: |
|
|
This program is intended for the administrators of a school's network. They then can remotely shut down a computer. So far, I have found no other way to power off a remote computer. There are plenty of programs out there that use the RPC Service Interface, including ones to shut computers down with. The program is not intended for bad use.
If anyone else knows about any ways to power off a remote computer on a network without using the RPC Service Interface, I'd like to hear it.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sat Sep 21, 2002 11:25 pm Post subject: |
|
|
I think this will work for shutting down remote computers if you have Gadget:
| Code: |
external gadget.dll
%%STDCALL = 32
%%STDCALL_MS = @Sum(%%STDCALL,%%Microsoft)
%%advapidll = @Gadget(demo,loadlib,advapi32.dll)
if %%advapidll
gadget demo,declare,InitiateSystemShutdown,%%advapidll,InitiateSystemShutdown,lpMachineName As String;lpMessage As String;dwTimeout As DWORD;bForceAppsClosed As Long;bRebootAfterShutdown As Long,Long,%%STDCALL_MS
info @gadget(demo,InitiateSystemShutdown,backup,System is about to shutdown...,60,0,0)@cr()
gadget demo,freelib,%%advapidll
end
|
I don't think this will actually power off the computer though, I think it would leave the
"You can now safely power off your computer" message until manual reboot or poweroff. |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Sep 22, 2002 12:08 am Post subject: |
|
|
The ideal way to do it is (and I've seen it in action) to copy the client onto the network computer and run it (RPC Interface), and using VDSDLL shut it down. It seems simple enough, but is really hard to find out how to use RPC Interface.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Sep 22, 2002 12:10 am Post subject: |
|
|
I think using the utility I posted a link to, it won't even be neccesary to copy any tool
to the remote computer, I think the tool can power off the computer remotely on
its own. |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Sep 22, 2002 12:16 am Post subject: |
|
|
That article looks like it may a big help! Thanks, Tommy!
I just have to look into that, but I don't know if that alone will lead me to an answer...  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
|