On 3/31/07, <b class="gmail_sendername">Zach</b> &lt;<a href="mailto:netrek@gmail.com">netrek@gmail.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Chris,<br><br>That&#39;s great. I&#39;m curious as to precisely how you determined a given<br>player was using a borg in your judgement? Does anyone know of any<br>borg bot code I could see?<br>Zach</blockquote><div><br>
Combat features can be taken from the robot code in the server.&nbsp; Info-borg features are fairly trivial to add; showing cloakers on the tactical, or army counts for all planets, for example, just involves commenting out an if()
<br><br>Clues to the presence of a borg are it consistently responding to stimuli in a distinctive fashion, e.g. autophasering at a set distance, or behaviour that would be hard to achieve with real input, such as spamming torps in multiple directions almost simultaneously.&nbsp; Detecting infoborgs is harder, unless they&#39;re helpful enough to send team messages or RCDs every time they spot an enemy ship picking a planet.
<br><br>An ethical borg developer (even playing on a non-RSA server) will change the pigcall (5 spaces) response to identify their client.&nbsp; A really ethical developer will turn off the borg features when t-mode starts.<br>
<br>An unethical borg developer (on an RSA server) will use the pigcall of the blessed client that he&#39;s using to spoof the RSA check.<br><br>As this is the dev list, I might as well detail how RSA spoofing works.&nbsp; Anyone capable of implementing this is probably capable of figuring it out as well, so I don&#39;t accept the proposition that obscurity brings security.
<br><br>Trivially, the borg client performs a man-in-the-middle attack.&nbsp; It opens a listening socket (you can just swipe the server code) and both connects to the real server, and accepts a connection from a blessed client (note: any blessed client, running on any platform, not necessarily the same as the one that the borg runs on) that you&#39;ll use to spoof the RSA check.&nbsp; When the borg client receives the RSA challenge from the server, it passes it on to the blessed client, which dutifully produces the response, which the borg client passes back to the server.&nbsp; It can then just terminate the connection to the blessed client.
<br><br>The subtelty is that the RSA response encodes the result of a getpeername(), to try and spot this MitM attack.&nbsp; To defeat that, you have to ensure that getpeername() reports (to the blessed client) that it&#39;s talking to the server, not the borg client.&nbsp; You can (off the top of my head):
<br><br>Linux: recompile your kernel.<br>Solaris: provide a replacement .so that just implements getpeername() at runtime when linked dynamically to the client.<br>Windows: provide a shim ws2_32.dll that overrides getpeername() and otherwise calls (jmps, actually) to the real dll functions.
<br><br>If blessed client developers want to make things a bit harder, then instead of using getpeername() during the RSA check, instead encode the address that the client was told to connect to (which should be the same as the result of a getpeername()!).&nbsp; This isn&#39;t foolproof, but would raise the bar very slightly.
<br><br>The fundamental lesson of this though is that you *cannot* trust the client.&nbsp; Blessing
will keep casual hackers at bay, but a determined cracker will blow
past the RSA check in a few hours.&nbsp; The only real defence is a design that assumes that the client is a robot, not a human.<br><br>The good news is that Netrek is actually pretty robust as-is!&nbsp; Vector torps just miss clue targets more efficiently, autophasering is subject to missing under any amount of lag (even if you &#39;lead&#39; the target) and can just waste fuel if you get the algorithm wrong.&nbsp; Flicking shields on and off under threat conditions is only a minor efficiency gain (and subject to fatal results if you snafu it), and clued players can det or dodge multiple incoming torps more flexibly and effectively (
i.e. with a better tactical and strategic outcome) than an algorithm.<br><br>The biggest potential benefits are (tactically) showing cloakers on the tactical (with irregular and inaccurate positions, heading and speed info), and (strategically) identifying and marking enemy ships that have picked up.&nbsp; A dumb auto-ogger (turn + speed + tractor + phaser + torp + det) can also save you some button mashing, but only under circumstances where a manual ogg would have worked anyway.
<br><br>IME, a borg will just raise the apparent clue level of a player, but only to middling-competent.&nbsp; An actual clue player will do everything that a borg does anyway, and better, because they can adapt their response to the situation.
<br><br>That said, there are a few &quot;info-borg&quot; features that I feel might as well be allowed, in particular showing army counts on-screen by default.&nbsp; The argument that this gives an unfair advantage over people playing with traditional clients is spurious; there&#39;s no reason why all clients can&#39;t be trivially modified to do this, and limiting all clients to the minimum subset provided by the oldest client is a fine way to ensure stagnation.
<br> </div></div>