Skip to content

Commit 4456798

Browse files
committed
v2.9
1 parent b9187de commit 4456798

File tree

7 files changed

+47
-28
lines changed

7 files changed

+47
-28
lines changed

Packages/Arguments/Arguments.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ type FlagOptions struct {
2323
}
2424

2525
var (
26-
version = "2.8"
27-
versionName = "Ice Tea"
26+
version = "2.9"
27+
versionName = "Black Tea"
2828
license = "MIT"
2929
author = "@nickvourd"
3030
github = "https://github.com/nickvourd/Supernova"
@@ -101,7 +101,7 @@ func ArgumentLength(versionFlag bool) {
101101
// if one argument
102102
if versionFlag {
103103
// if version flag exists
104-
fmt.Printf("[+] Current version: " + Colors.BoldRed(version) + "\n\n[+] Version name: " + Colors.BoldRed(versionName) + "\n\n")
104+
fmt.Print("[+] Current version: " + Colors.BoldRed(version) + "\n\n[+] Version name: " + Colors.BoldRed(versionName) + "\n\n")
105105
os.Exit(0)
106106
} else {
107107
// if version flag not exists

Packages/Converters/Converters.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func ShellcodeDecimalArray2String(decArray []int) string {
243243
func ConvertObfShellcode2Template(shellcode string, language string, variable string) string {
244244
switch language {
245245
case "c":
246-
template := fmt.Sprintf(`unsigned char *%s[] = {%s};`, variable, shellcode)
246+
template := fmt.Sprintf(`unsigned char %s[] = {%s};`, variable, shellcode)
247247
return template
248248
case "csharp":
249249
template := fmt.Sprintf(`string[] %s = new string[] {%s};`, variable, shellcode)
@@ -274,6 +274,9 @@ func ConvertObfShellcode2Template(shellcode string, language string, variable st
274274
case "java":
275275
template := fmt.Sprintf(`String[] %s = {%s};`, variable, shellcode)
276276
return template
277+
case "vba":
278+
template := fmt.Sprintf(`%s = Array(%s)`, variable, shellcode)
279+
return template
277280
default:
278281
fmt.Println("[!] Unsupported programming language:", language)
279282
os.Exit(1)

Packages/Manager/Manager.go

+22-12
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

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

@@ -26,29 +26,29 @@ func EncryptionManager(Key int, Encryption string, Obfuscation string, Debug boo
2626
// Handle the case when Obfuscation is empty
2727
if fileSizeFlag {
2828
// If fileSizeFlag is true
29-
fmt.Printf("[!] The size of the encrypted shellcode exceeds the maximum display limit.\n\n[!] Supernova cannot display it on the screen.\n\n")
29+
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))
3030
} else {
3131
if foundLanguage == "raw" {
3232
// If the foundLanguage is "raw"
33-
fmt.Printf("[!] The encrypted shellcode is displayed in raw format represented as hexadecimal on the terminal.\n\n")
33+
fmt.Printf("[!] The %s shellcode is displayed in raw format represented as hexadecimal on the terminal.\n\n", strings.ToLower(process))
3434
}
3535
// Print the encrypted template
36-
fmt.Printf("[+] The encrypted payload with %s:\n\n%s\n\n", strings.ToUpper(Encryption), template)
36+
fmt.Printf("[+] The %s payload with %s:\n\n%s\n\n", strings.ToLower(process), strings.ToUpper(Encryption), template)
3737
}
3838
} else {
3939
// Handle the case when Obfuscation is not empty
4040
if Debug {
4141
// If Debug mode is enabled
4242
if fileSizeFlag {
4343
// If fileSizeFlag is true
44-
fmt.Printf("[!] The size of the encrypted shellcode exceeds the maximum display limit.\n\n[!] Supernova cannot display it on the screen.\n\n")
44+
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))
4545
} else {
4646
if foundLanguage == "raw" {
4747
// If the foundLanguage is "raw"
48-
fmt.Printf("[!] The encrypted shellcode is displayed in raw format represented as hexadecimal on the terminal.\n\n")
48+
fmt.Printf("[!] The %s shellcode is displayed in raw format represented as hexadecimal on the terminal.\n\n", strings.ToLower(process))
4949
}
5050
// Print the encrypted template
51-
fmt.Printf("[+] The encrypted payload with %s:\n\n%s\n\n", strings.ToUpper(Encryption), template)
51+
fmt.Printf("[+] The %s payload with %s:\n\n%s\n\n", strings.ToLower(process), strings.ToUpper(Encryption), template)
5252
}
5353
}
5454
}
@@ -57,7 +57,7 @@ func EncryptionManager(Key int, Encryption string, Obfuscation string, Debug boo
5757
}
5858

5959
// OutputManager function
60-
func OutputManager(OutFile string, Language string, template string, Encryption string, Obfuscation string) {
60+
func OutputManager(OutFile string, Language string, template string, Encryption string, Obfuscation string, process string) {
6161
language := strings.ToLower(Language)
6262
// Declare variables
6363
var encryptionFlag bool
@@ -68,15 +68,15 @@ func OutputManager(OutFile string, Language string, template string, Encryption
6868
// Obfuscation option is enable
6969
if Obfuscation != "" {
7070
// Call function named SaveOutputToFile
71-
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag)
71+
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag, process)
7272
if err != nil {
7373
fmt.Println("[!] Error:", err)
7474
return
7575
}
7676
} else {
7777
if language == "raw" {
7878
// Call function named SaveShellcodeToFile
79-
err := Output.SaveShellcodeToFile(template, OutFile)
79+
err := Output.SaveShellcodeToFile(template, OutFile, process)
8080
if err != nil {
8181
fmt.Println("[!] Error:", err)
8282
return
@@ -86,7 +86,7 @@ func OutputManager(OutFile string, Language string, template string, Encryption
8686
encryptionFlag = true
8787

8888
// Call function named SaveOutputToFile
89-
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag)
89+
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag, process)
9090
if err != nil {
9191
fmt.Println("[!] Error:", err)
9292
return
@@ -95,7 +95,7 @@ func OutputManager(OutFile string, Language string, template string, Encryption
9595
}
9696
} else {
9797
// Call function named SaveOutputToFile
98-
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag)
98+
err := Output.SaveOutputToFile(template, OutFile, encryptionFlag, process)
9999
if err != nil {
100100
fmt.Println("[!] Error:", err)
101101
return
@@ -129,3 +129,13 @@ func ObfuscationManager(shellcode []byte, Obfuscation string, Language string, V
129129

130130
return template
131131
}
132+
133+
// ManageProcess function
134+
func ManageProcess(encryption string) (string, string) {
135+
switch strings.ToLower(encryption) {
136+
case "rot":
137+
return "Encoding", "Encoded"
138+
default:
139+
return "Encryption", "Encrypted"
140+
}
141+
}

Packages/Obfuscators/Obfuscators.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ func IPv4Obfuscation(shellcode string) string {
310310
}
311311
}
312312

313-
fmt.Printf(" " + result + "\n\n")
313+
fmt.Print(" " + result + "\n\n")
314314

315315
// if generated numbers are more than one
316316
if count > 1 {
@@ -442,7 +442,7 @@ func CustomPayloadMessage(obfuscation string, randomHexCount int, randomHexValue
442442
}
443443
}
444444

445-
fmt.Printf(" " + hexString + "\n\n")
445+
fmt.Print(" " + hexString + "\n\n")
446446

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

Packages/Output/Output.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"log"
1010
"os"
1111
"strconv"
12+
"strings"
1213
)
1314

1415
// PrintKeyDetails function
@@ -54,7 +55,7 @@ func DetectNotification(key int) int {
5455
}
5556

5657
// SaveOutputToFile function
57-
func SaveOutputToFile(outputData string, filename string, statement bool) error {
58+
func SaveOutputToFile(outputData string, filename string, statement bool, process string) error {
5859
// Open the file for writing
5960
file, err := os.Create(filename)
6061
if err != nil {
@@ -77,16 +78,16 @@ func SaveOutputToFile(outputData string, filename string, statement bool) error
7778

7879
//fmt.Println(statement)
7980
if statement {
80-
fmt.Printf("[+] The encrypted shellcode saved to " + absolutePath + " file.\n\n")
81+
fmt.Printf("[+] The %s shellcode saved to %s file.\n\n", strings.ToLower(process), absolutePath)
8182
} else {
82-
fmt.Printf("[+] The obfuscated shellcode saved to " + absolutePath + " file.\n\n")
83+
fmt.Print("[+] The obfuscated shellcode saved to " + absolutePath + " file.\n\n")
8384
}
8485

8586
return nil
8687
}
8788

8889
// SaveShellcodeToFile function
89-
func SaveShellcodeToFile(shellcode, filename string) error {
90+
func SaveShellcodeToFile(shellcode, filename string, process string) error {
9091
// Removes Spaces and the "0x" prefix from the string
9192
shellcode = Converters.CleanShellcodeString(shellcode)
9293

@@ -116,6 +117,6 @@ func SaveShellcodeToFile(shellcode, filename string) error {
116117
return err
117118
}
118119

119-
fmt.Printf("[+] The encrypted shellcode saved to " + absolutePath + " file.\n\n")
120+
fmt.Printf("[+] The %s shellcode saved to %s file.\n\n", strings.ToLower(process), absolutePath)
120121
return nil
121122
}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Real fucking shellcode encryptor & obfuscator.
44
<p align="center">
55
<img width="350" height="350" src="/Pictures/Logo/Supernova-Logo.png"><br /><br />
66
<img alt="Static Badge" src="https://img.shields.io/badge/License-MIT-green?link=https%3A%2F%2Fgithub.com%2Fnickvourd%2FSupernova%2Fblob%2Fmain%2FLICENSE">
7-
<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 />
7+
<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 />
88
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/nickvourd/Supernova?logoColor=yellow">
99
<img alt="GitHub forks" src="https://img.shields.io/github/forks/nickvourd/Supernova?logoColor=red">
1010
<img alt="GitHub watchers" src="https://img.shields.io/github/watchers/nickvourd/Supernova?logoColor=blue">
@@ -137,7 +137,7 @@ go build Supernova
137137
███████║╚██████╔╝██║ ███████╗██║ ██║██║ ╚████║╚██████╔╝ ╚████╔╝ ██║ ██║
138138
╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝
139139
140-
Supernova v2.8 - Real fucking shellcode encryptor & obfuscator tool.
140+
Supernova v2.9 - Real fucking shellcode encryptor & obfuscator tool.
141141
Supernova is an open source tool licensed under MIT.
142142
Written with <3 by @nickvourd.
143143
Please visit https://github.com/nickvourd/Supernova for more...

Supernova.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ func main() {
2020
var template string
2121
var encryptedShellcode []byte
2222
var shellcode []byte
23+
var processType string
24+
var processVerb string
2325

2426
// Call function named PrintAscii
2527
Arguments.PrintAscii()
@@ -60,6 +62,9 @@ func main() {
6062
if options.Encryption != "" {
6163
// Call function named ValidateArgument
6264
Arguments.ValidateArgument("enc", options.Encryption, []string{"ROT", "XOR", "RC4", "AES", "CHACHA20"})
65+
66+
// Call function named ManageProcess
67+
processType, processVerb = Manager.ManageProcess(options.Encryption)
6368
}
6469

6570
// Obfuscation option is enable
@@ -108,15 +113,15 @@ func main() {
108113
encryptionStartTime := time.Now()
109114

110115
// Call function named EncryptionManager
111-
template, encryptedShellcode = Manager.EncryptionManager(options.Key, options.Encryption, options.Obfuscation, options.Debug, options.Variable, rawShellcode, foundLanguage, fileSizeFlag)
116+
template, encryptedShellcode = Manager.EncryptionManager(options.Key, options.Encryption, options.Obfuscation, options.Debug, options.Variable, rawShellcode, foundLanguage, fileSizeFlag, processVerb)
112117

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

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

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

122127
// Obfuscation option is enables
@@ -154,5 +159,5 @@ func main() {
154159
}
155160

156161
// Call function named OutputManager
157-
Manager.OutputManager(options.OutFile, foundLanguage, template, options.Encryption, options.Obfuscation)
162+
Manager.OutputManager(options.OutFile, foundLanguage, template, options.Encryption, options.Obfuscation, processVerb)
158163
}

0 commit comments

Comments
 (0)