0

Please tell me how to cause reboot w2k3 (Without using rpc-calls to do it) on the assembler. In advance thanks!

  • 1
    Why would you ever need to reboot the machine from assembler? I mean, there may just be something I am not seeing, so I'm curious. – Ed S. Jul 26 '09 at 20:08
  • Actually, I'm also curious why you mention "rpc-calls". RPC is Remote Procedure Call, which depending on the context might mean "API function" or might mean "from another machine over the network". Perhaps you could explain more about what you're trying to do. – Greg Hewgill Jul 26 '09 at 20:11
  • I mean local rpc the requirement (not on a network). But when I try to make reboot /r /f on telnet, it speaks to me about system, is already, going to shutdown, but it shows me it in a current 3ех hours. When I try to make something with telnet command net - the system speaks that is inaccessible rpc. –  Jul 26 '09 at 20:27
  • @Ed : probably he needs to reboot the machine "really fast" ;) – Stefano Borini Jul 26 '09 at 20:43

3 Answers3

1

The ExitWindowsEx function may be what you're looking for. While this is easy to call in a high level language like C, it takes more manual work to call it from assembly language.

You can also find examples of calling Win32 functions from assembly language; putting the pieces together is up to you.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
  • The program is necessary for a remote server Which has already begun reboot, but during reboot something goes wrong. As a result i have ONLY telnet access + a file transfer to this server. ExitWindowsEx does not work in this case, also as well as taskkill also as well as any other calls to RPC. I think to cause BSOD to reboot this server, but how? –  Jul 26 '09 at 20:20
1

You mentioned causing a BSOD in one of the comments to bring down the system (you might also look at causing a triple-fault, those are fun, but have no API). This is done from kernel land by calling KeBugCheck (or by causing a problem like a null-pointer dereference).

If you want to try another user land API call, I like InitiateSystemShutdown, passing in TRUE for the last two parameters (to force closing hung programs, and to restart, respectively).

mrduclaw
  • 3,965
  • 4
  • 36
  • 37
0

If you're trying to shut down a remote system and something goes wrong and the shutdown hangs, and you still want to reboot it, perhaps you could look at a software-controlled power control circuit. You could send a signal to cut power to the machine for a few seconds, then bring it back online.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285