(stage, sleeptime, jitter, useragent, uri, customuri, customuriGET, customuriPOST, beacon_PE, processinject_min_alloc, Post_EX_Process_Name, metadata, injector, Host, Profile, ProfilePath, outFile, custom_cert, cert_password, CDN, CDN_Value, datajitter, Keylogger string, Forwarder bool, tasks_max_size string, tasks_proxy_max_size string, tasks_dns_proxy_max_size string, syscall_method string, httplib string, ThreadSpoof bool, beacongate string, eaf_bypass bool, rdll_use_syscalls bool, copy_pe_header bool, rdll_loader string, transform_obfuscate string, smartinject bool, sleep_mask bool)
| 76 | var Post bool |
| 77 | |
| 78 | func GenerateOptions(stage, sleeptime, jitter, useragent, uri, customuri, customuriGET, customuriPOST, beacon_PE, processinject_min_alloc, Post_EX_Process_Name, metadata, injector, Host, Profile, ProfilePath, outFile, custom_cert, cert_password, CDN, CDN_Value, datajitter, Keylogger string, Forwarder bool, tasks_max_size string, tasks_proxy_max_size string, tasks_dns_proxy_max_size string, syscall_method string, httplib string, ThreadSpoof bool, beacongate string, eaf_bypass bool, rdll_use_syscalls bool, copy_pe_header bool, rdll_loader string, transform_obfuscate string, smartinject bool, sleep_mask bool) { |
| 79 | Beacon_Com := &Beacon_Com{} |
| 80 | Beacon_Stage_p1 := &Beacon_Stage_p1{} |
| 81 | Beacon_Stage_p2 := &Beacon_Stage_p2{} |
| 82 | Beacon_Stage_p3 := &Beacon_Stage_p3{} |
| 83 | Process_Inject := &Process_Inject{} |
| 84 | Beacon_PostEX := &Beacon_PostEX{} |
| 85 | Beacon_GETPOST := &Beacon_GETPOST{} |
| 86 | Beacon_GETPOST_Profile := &Beacon_GETPOST_Profile{} |
| 87 | Beacon_SSL := &Beacon_SSL{} |
| 88 | var HostStageMessage string |
| 89 | |
| 90 | fmt.Println("[*] Preparing Varibles...") |
| 91 | HostStageMessage, Beacon_Com.Variables = GenerateComunication(stage, sleeptime, jitter, useragent, datajitter, tasks_max_size, tasks_proxy_max_size, tasks_dns_proxy_max_size, httplib) |
| 92 | Beacon_PostEX.Variables = GeneratePostProcessName(Post_EX_Process_Name, Keylogger, ThreadSpoof) |
| 93 | Beacon_GETPOST.Variables = GenerateHTTPVaribles(Host, metadata, uri, customuri, customuriGET, customuriPOST, CDN, CDN_Value, Profile, Forwarder) |
| 94 | Beacon_Stage_p1.Variables, Beacon_Stage_p2.Variables, syscall_method = GeneratePE(beacon_PE, syscall_method, beacongate, eaf_bypass, rdll_use_syscalls, copy_pe_header, rdll_loader, transform_obfuscate, smartinject, sleep_mask) |
| 95 | Process_Inject.Variables = GenerateProcessInject(processinject_min_alloc, injector) |
| 96 | Beacon_GETPOST_Profile.Variables, Beacon_SSL.Variables = GenerateProfile(Profile, CDN, CDN_Value, cert_password, custom_cert, ProfilePath, Host) |
| 97 | fmt.Println("[*] Building Profile...") |
| 98 | Build(custom_cert, cert_password, outFile, Beacon_Com, Beacon_Stage_p1, Beacon_Stage_p2, Beacon_Stage_p3, Process_Inject, Beacon_PostEX, Beacon_GETPOST, Beacon_GETPOST_Profile, Beacon_SSL) |
| 99 | fmt.Println(HostStageMessage) |
| 100 | PE := strings.Split(Beacon_Stage_p2.Variables["pe"], `;`) |
| 101 | PE_Name := strings.Split(PE[len(PE)-3], `"`) |
| 102 | fmt.Println("[*] Beacon DLL Spoofed To: " + PE_Name[1]) |
| 103 | PEX := strings.Split(Beacon_PostEX.Variables["Post_EX_Process_Name"], `sysnative\\`) |
| 104 | PEX_Name := PEX[1] |
| 105 | fmt.Println("[*] Post-Ex Process Name: " + PEX_Name[:(len(PEX_Name)-3)]) |
| 106 | fmt.Println("[!] Beacon Shellcode Will Obfuscate Beacon in Memory Prior to Sleeping") |
| 107 | if ThreadSpoof == true { |
| 108 | fmt.Println("[!] ThreadSpooffing in enabled") |
| 109 | } |
| 110 | if syscall_method == "None" { |
| 111 | fmt.Println("[!] No Syscall method selected") |
| 112 | } else { |
| 113 | fmt.Println("[!] " + syscall_method + " syscall method selected") |
| 114 | } |
| 115 | Name, _ := strconv.Atoi(Profile) |
| 116 | fmt.Println("[*] Seleted Profile: " + Struct.Profile_Names[Name]) |
| 117 | fmt.Println("[+] Profile Generated: " + outFile) |
| 118 | fmt.Println("[+] Happy Hacking") |
| 119 | } |
| 120 | |
| 121 | func GenerateComunication(stage, sleeptime, jitter, useragent, datajitter string, tasks_max_size string, tasks_proxy_max_size string, tasks_dns_proxy_max_size string, httplib string) (string, map[string]string) { |
| 122 | Beacon_Com := &Beacon_Com{} |
no test coverage detected