-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathexploit.html
More file actions
218 lines (188 loc) · 6.26 KB
/
Copy pathexploit.html
File metadata and controls
218 lines (188 loc) · 6.26 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Barebone jailbreak Experience</title>
<style>
body {
background-color: #111827;
color: white;
}
#console {
color: white;
}
header a {
display: flex;
justify-content: center;
align-items: center;
}
header a button {
border-radius: 12px;
color: white;
background-color: #1d4ed8;
border: none;
padding: 12px 9px;
}
header {
display: flex;
justify-content: space-between;
width: 100%;
}
</style>
</head>
<body>
<header>
<a href="./"><button>Return</button></a>
<h2>Barebone jailbreak experience</h2>
<h4>WebKitty</h4>
</header>
<pre id="console"></pre>
<script src="includes/js/cache.js"></script>
<script>
// --- Define Globals
window.entrypoint672_result = 0;
window.exploitsetup672_result = 0;
const consoleElement = document.getElementById('console');
const exploitChain = parseFloat(localStorage.getItem('exploitChain'));
const ua = navigator.userAgent;
const isPS4 = ua.indexOf("PlayStation 4") !== -1;
const is67x = ((ua.indexOf(" 6.70") !== -1) || (ua.indexOf(" 6.71") !== -1) || (ua.indexOf(" 6.72") !== -1));
const fwVersion = navigator.userAgent.substring(navigator.userAgent.indexOf('5.0 (') + 19, navigator.userAgent.indexOf(') Apple')).replace("layStation 4/", "");
// Redirect check
if (sessionStorage.getItem('payload_path') == null || localStorage.getItem('bareboneJB') != "true") {
log("Redirecting to main page");
window.location.href = "./";
throw new Error();
}
// --- Check if 6.72 to load the entrypoint already
if (exploitChain === 2) loadBadHoist();
// Taken from Feyzee61's ps4jb
function getScript(source) {
return new Promise((resolve, reject) => {
const gs = document.createElement('script');
gs.src = source;
gs.async = false;
gs.onload = () => resolve();
gs.onerror = () => reject(new Error("Script load failed: " + source));
document.body.appendChild(gs);
});
}
function log(message, color) {
if (!consoleElement) return;
const span = document.createElement('span');
span.textContent = message + '\n';
if (color) span.style.color = color;
consoleElement.appendChild(span);
}
function sleep(ms = 0) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function updateJbStats(attempt, isSuccess) {
let total = parseInt(localStorage.getItem('jbTotal') || 0);
let success = parseInt(localStorage.getItem('jbSuccess') || 0);
if (attempt) {
total++;
localStorage.setItem('jbTotal', total);
}
if (isSuccess) {
success++;
localStorage.setItem('jbSuccess', success);
}
}
function jailbreakSuccess(fwValue) {
var fw = (typeof user !== 'undefined') ? user.ps4Fw : fwValue;
sessionStorage.setItem('autoJbRetry', 'false');
updateJbStats(0, 1);
setTimeout(() => { window.location.href = "./"; }, 5000);
}
function loadBadHoist() {
if (isPS4 && is67x && localStorage.getItem('bareboneJB') === 'true' && sessionStorage.getItem('payload_path') != null) {
try {
log("\nInitializing Exploit...");
const xhr = new XMLHttpRequest();
xhr.open('GET', 'src/badhoist/672entrypoint.js', false); // Blocks thread until parsed
xhr.send('');
if (xhr.status === 200) {
eval.call(top.window, xhr.responseText);
}
} catch (e) {
log("Critical early sync hook failure: " + e.message, "red");
}
}
}
async function run672ExploitChain() {
try {
log("Verifying early entrypoint hook state...");
await sleep(150);
if (window.entrypoint672_result < 1) {
location.reload();
return;
}
log("6.72 entrypoint hooked successfully.");
if (window.exploitsetup672_result < 1) {
log("Error occurred during setup phase. Refresh and try again.", "red");
return;
}
log("Exploit setup complete.", "green");
log("Triggering kernel exploit...");
await sleep(200);
await getScript('./src/badhoist/672kexploit.js');
var result = KernelExploit672();
if (result === 0 || result === 91) {
log("\nKernel exploit successful.", "green");
getPayload672(sessionStorage.getItem('payload_path'));
jailbreakSuccess(fwVersion);
} else if (result === 179) {
log("\nAlready jailbroken..", "green");
jailbreakSuccess(fwVersion);
getPayload672(sessionStorage.getItem('payload_path'));
} else {
log("\nKernel execution error code: " + result + ". Please restart the console.", "red");
}
log("\nBad Hoist by Fire30, 6.7x Kernel Exploit by Sleirsgoevy");
log("Implementation taken from Feyzee61");
} catch (err) {
log("Staging failure: " + err.message, "red");
}
}
// Feyzee61's PSFree lapse implementation
async function loadPSFreeLapseBundle() {
log("Loading Feyzee61's PSFree Lapse Bundle implementation..");
await getScript("./src/psfree-lapse/bundle.js");
doJailBreak();
}
// modular psfree lapse by Al-Azif
async function loadPSFreeLapse() {
log("Loading Al-Azif's PSFree Lapse Modular implementation..");
await getScript("./src/psfree-lapse/alert.mjs");
}
// cssfontface by ufm42
async function loadCssFontFace() {
log("Loading ufm42's CSSFontFace exploit chain implementation..");
await getScript('./src/cssfontface/main.js');
doCssFontFaceJailbreak();
}
// add an exploit attempt
updateJbStats(1, 0);
// execute exploit chain
switch (exploitChain) {
case 0:
loadPSFreeLapse();
break;
case 1:
loadPSFreeLapseBundle();
break;
case 2:
run672ExploitChain();
break;
case 3:
case 4:
loadCssFontFace();
break;
default:
window.location.href = "./";
}
</script>
</body>
</html>