Skip to content

Commit

Permalink
v2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
nickvourd committed Jan 19, 2025
1 parent b9187de commit 4456798
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 28 deletions.
6 changes: 3 additions & 3 deletions Packages/Arguments/Arguments.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ type FlagOptions struct {
}

var (
version = "2.8"
versionName = "Ice Tea"
version = "2.9"
versionName = "Black Tea"
license = "MIT"
author = "@nickvourd"
github = "https://github.com/nickvourd/Supernova"
Expand Down Expand Up @@ -101,7 +101,7 @@ func ArgumentLength(versionFlag bool) {
// if one argument
if versionFlag {
// if version flag exists
fmt.Printf("[+] Current version: " + Colors.BoldRed(version) + "\n\n[+] Version name: " + Colors.BoldRed(versionName) + "\n\n")
fmt.Print("[+] Current version: " + Colors.BoldRed(version) + "\n\n[+] Version name: " + Colors.BoldRed(versionName) + "\n\n")
os.Exit(0)
} else {
// if version flag not exists
Expand Down
5 changes: 4 additions & 1 deletion Packages/Converters/Converters.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func ShellcodeDecimalArray2String(decArray []int) string {
func ConvertObfShellcode2Template(shellcode string, language string, variable string) string {
switch language {
case "c":
template := fmt.Sprintf(`unsigned char *%s[] = {%s};`, variable, shellcode)
template := fmt.Sprintf(`unsigned char %s[] = {%s};`, variable, shellcode)
return template
case "csharp":
template := fmt.Sprintf(`string[] %s = new string[] {%s};`, variable, shellcode)
Expand Down Expand Up @@ -274,6 +274,9 @@ func ConvertObfShellcode2Template(shellcode string, language string, variable st
case "java":
template := fmt.Sprintf(`String[] %s = {%s};`, variable, shellcode)
return template
case "vba":
template := fmt.Sprintf(`%s = Array(%s)`, variable, shellcode)
return template
default:
fmt.Println("[!] Unsupported programming language:", language)
os.Exit(1)
Expand Down
34 changes: 22 additions & 12 deletions Packages/Manager/Manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// EncryptionManager function
func EncryptionManager(Key int, Encryption string, Obfuscation string, Debug bool, Variable string, rawShellcode string, foundLanguage string, fileSizeFlag bool) (string, []byte) {
func EncryptionManager(Key int, Encryption string, Obfuscation string, Debug bool, Variable string, rawShellcode string, foundLanguage string, fileSizeFlag bool, process string) (string, []byte) {
// Call function ValidateKeySize
Key = Arguments.ValidateKeySize(Key, Encryption)

Expand All @@ -26,29 +26,29 @@ func EncryptionManager(Key int, Encryption string, Obfuscation string, Debug boo
// Handle the case when Obfuscation is empty
if fileSizeFlag {
// If fileSizeFlag is true
fmt.Printf("[!] The size of the encrypted shellcode exceeds the maximum display limit.\n\n[!] Supernova cannot display it on the screen.\n\n")
fmt.Printf("[!] The size of the %s shellcode exceeds the maximum display limit.\n\n[!] Supernova cannot display it on the screen.\n\n", strings.ToLower(process))
} else {
if foundLanguage == "raw" {
// If the foundLanguage is "raw"
fmt.Printf("[!] The encrypted shellcode is displayed in raw format represented as hexadecimal on the terminal.\n\n")
fmt.Printf("[!] The %s shellcode is displayed in raw format represented as hexadecimal on the terminal.\n\n", strings.ToLower(process))
}
// Print the encrypted template
fmt.Printf("[+] The encrypted payload with %s:\n\n%s\n\n", strings.ToUpper(Encryption), template)
fmt.Printf("[+] The %s payload with %s:\n\n%s\n\n", strings.ToLower(process), strings.ToUpper(Encryption), template)
}
} else {
// Handle the case when Obfuscation is not empty
if Debug {
// If Debug mode is enabled
if fileSizeFlag {
// If fileSizeFlag is true
fmt.Printf("[!] The size of the encrypted shellcode exceeds the maximum display limit.\n\n[!] Supernova cannot display it on the screen.\n\n")
fmt.Printf("[!] The size of the %s shellcode exceeds the maximum display limit.\n\n[!] Supernova cannot display it on the screen.\n\n", strings.ToLower(process))
} else {
if foundLanguage == "raw" {
// If the foundLanguage is "raw"
fmt.Printf("[!] The encrypted shellcode is displayed in raw format represented as hexadecimal on the terminal.\n\n")
fmt.Printf("[!] The %s shellcode is displayed in raw format represented as hexadecimal on the terminal.\n\n", strings.ToLower(process))
}
// Print the encrypted template
fmt.Printf("[+] The encrypted payload with %s:\n\n%s\n\n", strings.ToUpper(Encryption), template)
fmt.Printf("[+] The %s payload with %s:\n\n%s\n\n", strings.ToLower(process), strings.ToUpper(Encryption), template)
}
}
}
Expand All @@ -57,7 +57,7 @@ func EncryptionManager(Key int, Encryption string, Obfuscation string, Debug boo
}

// OutputManager function
func OutputManager(OutFile string, Language string, template string, Encryption string, Obfuscation string) {
func OutputManager(OutFile string, Language string, template string, Encryption string, Obfuscation string, process string) {
language := strings.ToLower(Language)
// Declare variables
var encryptionFlag bool
Expand All @@ -68,15 +68,15 @@ func OutputManager(OutFile string, Language string, template string, Encryption
// Obfuscation option is enable
if Obfuscation != "" {
// Call function named SaveOutputToFile
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag)
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag, process)
if err != nil {
fmt.Println("[!] Error:", err)
return
}
} else {
if language == "raw" {
// Call function named SaveShellcodeToFile
err := Output.SaveShellcodeToFile(template, OutFile)
err := Output.SaveShellcodeToFile(template, OutFile, process)
if err != nil {
fmt.Println("[!] Error:", err)
return
Expand All @@ -86,7 +86,7 @@ func OutputManager(OutFile string, Language string, template string, Encryption
encryptionFlag = true

// Call function named SaveOutputToFile
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag)
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag, process)
if err != nil {
fmt.Println("[!] Error:", err)
return
Expand All @@ -95,7 +95,7 @@ func OutputManager(OutFile string, Language string, template string, Encryption
}
} else {
// Call function named SaveOutputToFile
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag)
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag, process)
if err != nil {
fmt.Println("[!] Error:", err)
return
Expand Down Expand Up @@ -129,3 +129,13 @@ func ObfuscationManager(shellcode []byte, Obfuscation string, Language string, V

return template
}

// ManageProcess function
func ManageProcess(encryption string) (string, string) {
switch strings.ToLower(encryption) {
case "rot":
return "Encoding", "Encoded"
default:
return "Encryption", "Encrypted"
}
}
4 changes: 2 additions & 2 deletions Packages/Obfuscators/Obfuscators.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func IPv4Obfuscation(shellcode string) string {
}
}

fmt.Printf(" " + result + "\n\n")
fmt.Print(" " + result + "\n\n")

// if generated numbers are more than one
if count > 1 {
Expand Down Expand Up @@ -442,7 +442,7 @@ func CustomPayloadMessage(obfuscation string, randomHexCount int, randomHexValue
}
}

fmt.Printf(" " + hexString + "\n\n")
fmt.Print(" " + hexString + "\n\n")

fmt.Printf("[!] Be sure to remove %s during the implementation process!\n\n", pronous)

Expand Down
11 changes: 6 additions & 5 deletions Packages/Output/Output.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"log"
"os"
"strconv"
"strings"
)

// PrintKeyDetails function
Expand Down Expand Up @@ -54,7 +55,7 @@ func DetectNotification(key int) int {
}

// SaveOutputToFile function
func SaveOutputToFile(outputData string, filename string, statement bool) error {
func SaveOutputToFile(outputData string, filename string, statement bool, process string) error {
// Open the file for writing
file, err := os.Create(filename)
if err != nil {
Expand All @@ -77,16 +78,16 @@ func SaveOutputToFile(outputData string, filename string, statement bool) error

//fmt.Println(statement)
if statement {
fmt.Printf("[+] The encrypted shellcode saved to " + absolutePath + " file.\n\n")
fmt.Printf("[+] The %s shellcode saved to %s file.\n\n", strings.ToLower(process), absolutePath)
} else {
fmt.Printf("[+] The obfuscated shellcode saved to " + absolutePath + " file.\n\n")
fmt.Print("[+] The obfuscated shellcode saved to " + absolutePath + " file.\n\n")
}

return nil
}

// SaveShellcodeToFile function
func SaveShellcodeToFile(shellcode, filename string) error {
func SaveShellcodeToFile(shellcode, filename string, process string) error {
// Removes Spaces and the "0x" prefix from the string
shellcode = Converters.CleanShellcodeString(shellcode)

Expand Down Expand Up @@ -116,6 +117,6 @@ func SaveShellcodeToFile(shellcode, filename string) error {
return err
}

fmt.Printf("[+] The encrypted shellcode saved to " + absolutePath + " file.\n\n")
fmt.Printf("[+] The %s shellcode saved to %s file.\n\n", strings.ToLower(process), absolutePath)
return nil
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Real fucking shellcode encryptor & obfuscator.
<p align="center">
<img width="350" height="350" src="/Pictures/Logo/Supernova-Logo.png"><br /><br />
<img alt="Static Badge" src="https://img.shields.io/badge/License-MIT-green?link=https%3A%2F%2Fgithub.com%2Fnickvourd%2FSupernova%2Fblob%2Fmain%2FLICENSE">
<img alt="Static Badge" src="https://img.shields.io/badge/Version-2.8%20(Ice Tea)-red?link=https%3A%2F%2Fgithub.com%2Fnickvourd%2FSupernova%2Freleases"><br /><br />
<img alt="Static Badge" src="https://img.shields.io/badge/Version-2.9%20(Black Tea)-red?link=https%3A%2F%2Fgithub.com%2Fnickvourd%2FSupernova%2Freleases"><br /><br />
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/nickvourd/Supernova?logoColor=yellow">
<img alt="GitHub forks" src="https://img.shields.io/github/forks/nickvourd/Supernova?logoColor=red">
<img alt="GitHub watchers" src="https://img.shields.io/github/watchers/nickvourd/Supernova?logoColor=blue">
Expand Down Expand Up @@ -137,7 +137,7 @@ go build Supernova
███████║╚██████╔╝██║ ███████╗██║ ██║██║ ╚████║╚██████╔╝ ╚████╔╝ ██║ ██║
╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝
Supernova v2.8 - Real fucking shellcode encryptor & obfuscator tool.
Supernova v2.9 - Real fucking shellcode encryptor & obfuscator tool.
Supernova is an open source tool licensed under MIT.
Written with <3 by @nickvourd.
Please visit https://github.com/nickvourd/Supernova for more...
Expand Down
11 changes: 8 additions & 3 deletions Supernova.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ func main() {
var template string
var encryptedShellcode []byte
var shellcode []byte
var processType string
var processVerb string

// Call function named PrintAscii
Arguments.PrintAscii()
Expand Down Expand Up @@ -60,6 +62,9 @@ func main() {
if options.Encryption != "" {
// Call function named ValidateArgument
Arguments.ValidateArgument("enc", options.Encryption, []string{"ROT", "XOR", "RC4", "AES", "CHACHA20"})

// Call function named ManageProcess
processType, processVerb = Manager.ManageProcess(options.Encryption)
}

// Obfuscation option is enable
Expand Down Expand Up @@ -108,15 +113,15 @@ func main() {
encryptionStartTime := time.Now()

// Call function named EncryptionManager
template, encryptedShellcode = Manager.EncryptionManager(options.Key, options.Encryption, options.Obfuscation, options.Debug, options.Variable, rawShellcode, foundLanguage, fileSizeFlag)
template, encryptedShellcode = Manager.EncryptionManager(options.Key, options.Encryption, options.Obfuscation, options.Debug, options.Variable, rawShellcode, foundLanguage, fileSizeFlag, processVerb)

// Record the end time
encryptionEndTime := time.Now()

// Calculate the duration
encryptionDuration := encryptionEndTime.Sub(encryptionStartTime)

fmt.Printf("[+] Payload encryption with %s completed successfully! (Completed in %s)\n\n", strings.ToUpper(options.Encryption), encryptionDuration)
fmt.Printf("[+] Payload %s with %s completed successfully! (Completed in %s)\n\n", strings.ToLower(processType), strings.ToUpper(options.Encryption), encryptionDuration)
}

// Obfuscation option is enables
Expand Down Expand Up @@ -154,5 +159,5 @@ func main() {
}

// Call function named OutputManager
Manager.OutputManager(options.OutFile, foundLanguage, template, options.Encryption, options.Obfuscation)
Manager.OutputManager(options.OutFile, foundLanguage, template, options.Encryption, options.Obfuscation, processVerb)
}

0 comments on commit 4456798

Please sign in to comment.