Showing posts with label Geeky. Show all posts
Showing posts with label Geeky. Show all posts

Sunday, August 22, 2010

The Emerald Mess and Trust in a virtual world environemt

Since I mentioned the Emerald viewer in my post yesterday, I feel the need to raise a general warning about the use of 3rd party viewers.

All software you install on your PC is a potential security threat. There are a few technical security measures on modern operating systems (Linux, MacOS and Windows 7) that limits what an application can do without being given consent, but there is still a lot of headroom for creating havoc.

More specifically, any application can access the net, upload information and receive instructions on what to do without you knowing anything about it. So really, you are at the mercy of the supplier when it comes to your security on the net.

Last week, the head of the Emerald development team inserted code in the splash screen to facilitate a Denial of Service attack on a blog writer he had some grudges about. He misused the computers and network connections of EVERY Emerald user, making us all an unwilling tool for his childish prank. The Emerald project seems to be in deep shit right now, mostly because the lack of trust this incident have created.

But it could actually have been a lot worse. When you use any viewer to log into Second Life, you give that viewer total control over your account.

I don't know what security measures Linden Lab have on the server side, but in principle nothing is stopping malicious code inside the viewer to send your password to an external server, transfer money to another account, or use your avatar to send griefing IMs or do any action whatsoever.

Not only that, but nothing is stopping it from receiving commands from a central server in real time. This is an exploit normally known as a botnet.

It's a scary thought, but anyone with such a control over a popular viewer could actually destroy Second Life, or at least force the lab to roll back everything to last backup. Lets say someone managed to insert code into the latest release of the imaginary and very popular Pink (:-)) viewer: Two scenarios are particularly scary:

1. The bored prank's wet dream:
Sunday evening, with concurrency at its highest, every running Pink viewer starts to shuffle money around randomly to other Pink viewer users. If you have payment details on file, the viewer will buy as many lindens it can and transfer those too. The viewer deletes every no-copy item in anyones invent, and when it's done your avatar undresses, shows off a big Pink d**k, and jumps on the nearest avatar it can find. If that avatar too is Pink controlled, well, there is no telling what position they might start to use.... If you panic and close the viewer, another Pink users instance will log in your avatar as a bot, the bot will go around all your land, delete all builds, abandon all land, and the mad dance will continue until Linden Lab is forced to shut down the grid.

2. The cold criminal:
He is in this for the money. So, he will slowly tap accounts and buy lindens with your credit card, hiding the fact from the owner by displaying a fake sum in the top-right corner. If he is not greedy, he might be able to get real dollars out of SL before anyone raised the alarm.

To be sure, I will guess that Linden Lab has server-side and other operational security measures that may detect and stop such attacks, and there are technical and legal ways to find the ones responsible afterwards. Also, it will probably require too much work for anyone to fully exploit the possibilities. But they are scary enough even on a much smaller scale. So, using a 3rd party viewer really requires trust.

How do you find whom to trust? If the viewer is registered in the labs Third-Party Viewer Directory, then it's a sign that the authors are probably not going to mess with you (though it must be said that Emerald was on that list until recently:( )

This brings us directly to the core of trust in a virtual world where the only thing you know about a person is their avatar profile and the sum of all public statements they make: In blogs, on twitter and inworld.

Some viewer developers are active bloggers. I find that attitudes and expressions are rather exposing of the characters behind the av. There are developers I trust and developers I don't trust. I can't tell you who you should trust, because you have to make that choice by yourselves. I just wanted to tell you that yes: there are third-party viewers that is much better than the official ones, but you really do have to be a bit careful when choosing one.

Thursday, March 11, 2010

Server 1.38 - bigger than viewer 2.0?


LL has just announced the beta of Server version 1.38, scheduled for roll-out in April. Now, why is this great news?

One of the new features of server 1.38 is llSetLinkPrimitiveParamsFast(). It will allow a script in a root prim to control other prims in the link set, without a 0.2 second sleep as the previously available llSetLinkPrimitiveParams imposed.

The great upside of this is that for objects with moving parts (for instance, the Drama Dolls), it will reduce the need for having a script in each prim to do animations. As you can see on the illustration above, its quite a few scripts:-) /me hurts in the head just remembering all that coding.... Fewer scripts means less memory usage, and less memory usage means less load on the server, leading to less lag:-)

In the Drama Queen set, there are 25 scripts that could probably have been replaced with code in the root prim script using this function. That's 1.6 Mb of memory at rez time - not to mention all the work on creating and maintaining all those really small bits of code and the interface between them.

There are a few other nifty bug fixes too, although not revolutionary. What I really like about the 1.38 announcement is the attitude it shows: LL seems determined to fix server side stuff and script functionality to make SL work smoother. So it's not all bells and whistles and big spaceships GUI's, but grinding nuts and bolts too.

And while viewer 2.0 is highly controversial, I have yet to see big protests against the 1.38 features.

We are heading for a more flexible script environment where there will be limitations on script resources on a per parcel / per avatar basis, but where one will also have better control on these resources. It will also be possible to allocate far more resources to some scripts, which may be real helpful.

So, while Server 2.0 is still a long way into the future, its nice to get at least some attention on the server side problems too.

Monday, October 5, 2009

Using OpenVPN to access SL from behind a firewall


Warning: Geeky content:-)

The corporation where I work has some rather strict security standards. All the serious systems are connected to an internal network, almost fully decoupled from the Internet. No work stations or servers have direct connections outside. To access the net, we have a totally separate LAN with separate workstations.

And even that network is firewalled, blocking all UDP and high port connections, sigh. I can't even read my email because they block the POP port.

So: How then to access SL? By company regulations, we do allow hired consultants to connect to their corporate network using VPN. So I thougth, why can't I do the same thing? I'm allowed, so it's just a matter of setting it up.

So I tried to install OpenVPN on an old Linux server at home. Running Ubuntu 9.04 it's extremely stable, and with just 384K RAM it runs Apache2, mysql, Logitech Squeezecenter and now OpenVPN with no breathing problems. OpenVPN is directly supported in Ubuntu, so it can be installed from the standard package handler. The HOWTO is rather elaborate, but even so you should have some experience with linux and networking before you start on such a project.

I connected the client through port 443 using the tcp protocol. This is the shttp port, and few firewalls will block tcp communication on this port.

I have set up OpenVPN in socalled Bridged Mode, and are using a directive called

push "redirect-gateway def1"

This makes the windows client route all internet traffic to my vpn host. In the OpenVPN documentation this is not recommended, as they say it will slow down browsing. But actually I have found that almost all kinds of access is FASTER when sent through the vpn. My theory is that OpenVPN circumvents microsoft's IP stack, replacing it with the IP stack in Linux on my vpn server. It was very notably when I ran the vpn over the cellular modem. Also, I guess that through a small bandwith line, its faster to have one connection open and speeding all the time instead of continuosly openening and closing connections to the servers. Linux on a fast net connections is much more efficient for handling that.

So now Hagrid (my big laptop) is for all practical purposes connected to my home network, which has a 25/15 mb fibre optic connection to the net with no ports blocked. Performance is great, with graphics set on High I can walk around my favourite skin and hair shop Adam n Eve with 20+ fps, ping time < 300 ms and bandwith rates bursting up above 1gb.

To stess test the connection I started streaming FLAC music files while I was running around in SL. I had a downloadrate to the PC of about a mb/sec, SL was doing fine, music was fine and uninterrupted, and still the OpenVPN process used less than 2% of the really old CPU in my server. So even topping with Squeezecenter and its associated mysql database the server ran 94% idle..... I wonder how a Windows server would on the same hardware would have performed? Hmm, I guess it would still be downloading all the security fixes:-)

So, if you are bothered with firewalls at the office or in hotels while travelling, and are not afraid to get your hands a little dirty by digging into the interior of a Linux installation, this is a highly recommended setup. And all the software is free and open, so no hassle or expenses there either. I guess it could work equally well running on a vps server, if you just have enough bandwith the CPU load is almost negligable.