With the rise of cheaters on this website, there's the new addition of "slanted board" feature. For those who haven't seen it, lichess skews the board for a few seconds, making it difficult to get the board position for cheating software that relies on pixels. But this comes at the cost of annoying thousands of users who are honest players.
If you are going to these extents to prevent cheating, you might really want to patch this hole that I showed you a few months ago. It's still present, and it seems it fell on deaf ears.
Please consider stopping programmers from injecting code in lichess that hijacks the page's websocket implementation by embedding an iframe element and redefining the object's prototype.
As a simple test: this javascript code should not succeed, but it does, unfortunately. Try running jquery and then injecting the following script on lichess:
$('body').children().hide();
var i = $('<iframe>').attr('sandbox', 'allow-same-origin allow-forms allow-scripts').appendTo('body').load(function() {
//sniffing "secure" lichess socket data is literally this easy...
this.contentWindow.WebSocket.prototype.send = function() {
this.addEventListener('message', function(e) {
console.log(e.data);
});
return window.WebSocket.prototype.send.apply(this, arguments);
}
});
i.css({position: 'absolute', width: '100%', height: '100%', top: 0, left: 0, border: 0, background: '#fff'}).attr('src', location.href.replace(/\?.*/,''));
This code prints every message sent from server to web client to console, which then could be interfaced to an engine of sorts for cheating purposes, especially at faster time controls.
Try running that code on google.com or stackoverflow.com or any other secure website. They will not allow it. It is a serious security flaw.
With the rise of cheaters on this website, there's the new addition of "slanted board" feature. For those who haven't seen it, lichess skews the board for a few seconds, making it difficult to get the board position for cheating software that relies on pixels. But this comes at the cost of annoying thousands of users who are honest players.
If you are going to these extents to prevent cheating, you might really want to patch this hole that I showed you a few months ago. It's still present, and it seems it fell on deaf ears.
Please consider stopping programmers from injecting code in lichess that hijacks the page's websocket implementation by embedding an iframe element and redefining the object's prototype.
As a simple test: this javascript code should not succeed, but it does, unfortunately. Try running jquery and then injecting the following script on lichess:
$('body').children().hide();
var i = $('<iframe>').attr('sandbox', 'allow-same-origin allow-forms allow-scripts').appendTo('body').load(function() {
//sniffing "secure" lichess socket data is literally this easy...
this.contentWindow.WebSocket.prototype.send = function() {
this.addEventListener('message', function(e) {
console.log(e.data);
});
return window.WebSocket.prototype.send.apply(this, arguments);
}
});
i.css({position: 'absolute', width: '100%', height: '100%', top: 0, left: 0, border: 0, background: '#fff'}).attr('src', location.href.replace(/\?.*/,''));
This code prints every message sent from server to web client to console, which then could be interfaced to an engine of sorts for cheating purposes, especially at faster time controls.
Try running that code on google.com or stackoverflow.com or any other secure website. They will not allow it. It is a serious security flaw.