Here is a test page from ESET:
Antivirus Software and Internet Security Solutions :: ESET
Another test page:
http://hugelaser.com/ac/ussd-test.php
These are to verify if your phone is vulnerable to USSD code atacks triggered by SMS, QT code o malicious web link.
I own a Samsung Galaxy SII or S2 and used those links and are not malicious, I found my phone was vulnerable and proceeded to install a free tool from ESET (I found this info on a magazine).
If you are afected, try this ESET free tool:
ESET Latinoamérica – Laboratorio » Blog Archive » Herramienta gratuita de ESET contra vulnerabilidad USSD en Android
Or in the Android Market:
https://play.google.com/store/apps/details?id=com.eset.securedialer
What this ESET tool does is what Hadron said: it installs as an alternative dialer so the phone asks you wich dialer you want to use before excecuting an USSD code (When triggered by SMS, QT code or web link, not when you type the USSD code directly in your phone dialer), and you can configure the tool to be your defalut dialer when this happens, then the tool ask you if you want to excecute the USSD code, you probably will want to select "no".