Wednesday, April 28, 2010

Facebook chat on your phone with Lampiro 10.4.1

Lampiro 10.4.1 has been released. It specifically improves support for Facebook chat.

This post describes how to set up Facebook chat on your phone.

Requirements:
  • A phone supporting MIDP 2.0 Java applications (If it runs Opera Mini 5 and is not an iPhone / Android phone, you should be fine)
  • Working internet on your phone
  • About 500KB of free space for Java applications
  • A Facebook username. Set it up here: http://www.facebook.com/username/
How to set up Lampiro for Facebook chat on your phone:
  • Download and install Lampiro on your phone. You can go here: http://lampiro.bluendo.com/get on your phone and get the base or TLS version (Don't bother with the non-TLS unless you have space issues on your phone)
  • Follow the instructions when you open Lampiro
  • Choose "Yes" when asked if you have an existing Jabber/XMPP account
  • Login with your Facebook username and password. Use johndoe@chat.facebook.com as username and your normal Facebook password if your Facebook username is "johndoe".
  • Wait for the list of online friends to load
  • Expand a group, choose a friend and start chatting. Left and right switches tabs (between chats / friend list)
About Lampiro
Lampiro is a free software / open-source Jabber/XMPP client for phones supporting Java ME. Its Google code page can be found at http://code.google.com/p/lampiro/ and its website can be found at http://lampiro.bluendo.com/ In addition to Facebook chat, its TLS version also support Google Talk's non-voice chat and other XMPP/Jabber servers.

Share this with your friends:

Saturday, April 24, 2010

m-im Facebook chat support - why it doesn't work

I figured out why Facebook chat won't work in m-im.

Facebook chat requires DIGEST-MD5 authentication that is not supported by m-im. (Implementation would have been easier if Java ME included a MD5 library...)

I logged an issue asking for support if anyone is interested. (My patch only adds support for detecting whether the server supports DIGEST-MD5 authentication)

I like m-im, mostly since it is based on MGtalk, but has a better user interface, and because it supports multiple accounts (although not at the same time, which would have been ideal).

Friday, April 23, 2010

Facebook chat on your phone

Since Facebook have enabled chat through Jabber, getting Facebook chat working from most multi-protocol messengers on a PC have been quite easy.

Using Jabber for Facebook chat requires that you have a Facebook username set up. See this page for instructions: http://www.facebook.com/help/?faq=15085

I tried some mobile Java clients that should work on most phones. I preferred open-source clients and considered freeware clients for testing.

The following settings is used for Facebook chat via Jabber/XMPP: (Taken from here)
  • Username: johndoe
  • Domain: chat.facebook.com
  • Jabber ID: johndoe@chat.facebook.com
  • Password: yourfacebookpassword
  • Port: 5222
  • Server: chat.facebook.com
  • Use SSL/TLS: no
  • Allow plaintext authentication: no
Reblace "johndoe" and "yourfacebookpassword" with the relevant values. Most applications need only some of the settings.

Testing took place using the mpowerplayer emulator and my Sony Ericsson W880i.

Glider
Glider seems to be mostly aimed at users of ooros.com accounts but will try to log in using any JID that you throw at it. Google talk and Facebook chat works. Glider is based on Lampiro.

Website: http://ooros.com/glider/index
Mobile download page: http://ooros.com/getglider.html
Version tested: 10.4.1

Setting up:
  • Install the application from the above link
  • Click through a few options to get to the login screen
  • Enter the Jabber ID as above with your Facebook password
  • Click login and allow internet access if your phone asks
  • It will go to a menu, select messenger to go to your contact list
  • The contact list will show your online friends (With the friend lists as group). If its empty, choosing Menu > "Show offline contacts" will allow you to see your offline friends. The contact list might take a while to load. Expand groups to see contacts
Review
Pro
  • Very easy to set up. Requires the minimum information to connect
  • Google talk works just as easily
  • Tabbed interface looks nice
Con
  • Only supports a single Jabber/XMPP account at a time. No way to log in both Facebook and Google Talk for example
  • Quite large (~500KB for TLS version) to download. Might not work on older phones (works fine on my w880i)
  • Does not always integrate as expected on my phone
Summary
Worthwhile to try. Works similar to Lampiro, small UI differences and somewhat bigger. Extra size only makes sense if you user the Ooros features.

See Lampiro 10.4.1 review for further comments.

Note: This review was update for an updated version

Lampiro 10.2
Note: This is an old version. A review of a much improved new version can be found below.

Glider is based on Lampiro. It lacks some features specific to ooros's site and defaults to a different color scheme.

A newer version than tested can be found here: http://code.google.com/p/lampiro/downloads/list, but due to the ZIP format used, it needs to be downloaded via your PC and then copied to your phone.

Website: http://lampiro.bluendo.com/ and http://code.google.com/p/lampiro/
Mobile download page: http://lampiro.bluendo.com/get
Version tested: 10.1 (Normal, not TLS / Compression) (Google talk requires TLS, Facebook doesn't support it) (Compression version might save on data costs)

Setting up:
  • Install the application from the above link
  • Click through a few options to get to a screen asking if you already have a jabber account
  • Click Yes to get to the login screen
  • Enter the Jabber ID as above with your Facebook password
  • Choose "Advanced config"
  • Change server type to manual. Don't change any settings, it will now login (For subsequent attempts, the login button should be enough)
  • Click login and allow internet access if your phone asks
  • It will go to the contact list. If it doesn't, select messenger to open it
  • The contact list might show empty. Choosing Menu > "Show offline contacts" might help. The contact list might take a while to load.Expand groups to see contacts
  • To see who the contact behind the weird number username, select it, Open the Actions menu and choose "See details". It will then load a page that will display the user's profile picture and name after a few seconds
Review
Pro
  • Easy to set up. Requires the minimum information and some minor fiddling with server settings (See below)
  • Google talk should work in TLS version (Which was not tested)
  • Tabbed interface looks nice
  • Does not contain menu for ooros services that doesn't work on Facebook / Google Talk
Con
  • Harder to get connected than Glider
  • I couldn't get it to load all my online Facebook contacts, nevermind my entire friend list. This might be caused by a slow network connection
  • Only supports a single Jabber/XMPP account at a time. No way to log in both Facebook and Google Talk for example
  • Normally show ugly JIDs in contact list
  • Google code download page have newer version, but it is not in the standard JAR / JAD format for phone downloads
Summary
It might be a worthwhile program to watch if they could sort out the contact list issues.

The harder connection setup seems to be a minor bug, that is fixed in 10.3, that needs to be downloaded via a computer.

Lampiro 10.4.1
Glider is based on Lampiro. It lacks some features specific to ooros's site and defaults to a different color scheme.

Lampiro 10.4.1 is the latest version at the time of updating.

Website: http://lampiro.bluendo.com/ and http://code.google.com/p/lampiro/
Mobile download page: http://lampiro.bluendo.com/get Direct link
Version tested: 10.4.1 (TLS) (Google talk requires TLS)

Setting up:
  • Install the application from the above link
  • Click through a few options to get to a screen asking if you already have a jabber account
  • Click Yes to get to the login screen
  • Enter the Jabber ID as above with your Facebook password
  • Click login and allow internet access if your phone asks
  • It will go to the contact list, showing your online friends (in groups)
  • Press "Ok" on a friend to send a message
  • Choosing Menu > "Show offline contacts" will show your offline friends
Review
Pro
  • Very easy to set up
  • Google talk works (in TLS version)
  • Tabbed interface looks nice
  • Does not contain menu for ooros services that doesn't work on Facebook / Google Talk
Con
  • Only supports a single Jabber/XMPP account at a time. To switch between Google Talk and Facebook chat, you need to logout and type the other username and password before logging in
  • Quite large (~420KB for TLS version) to download. Might not work on older phones (works fine on my w880i)
  • Does not always integrate as expected on my phone
Summary
Almost perfect. The only possible improvements that I can think of is a account manager (allowing you to choose where to login) and support for multiple simultaneous connections (or multiple installs with slightly different names, for phones supporting multitasking)

Can be optimized better for specific phones (which might be hard without multiple versions, which is impossible to maintain). My Sony Ericsson's "back" button does not work for example, and I often need to look at the screen to find the softkey for the action.

Some other problems might become apparent after extended use, but I'm really impressed by initial testing on the current version.

JabberMixClient
JabberMixClient is base on MicroJabber and seem to be updated quite often.

It was only tested my W880i, it was unusably slow under mpowerplayer.

Website: http://jabbermixclient.sourceforge.net/
Mobile download page: http://codeapi.altervista.org/wap/jmc.wml
Version tested: 2.1 Beta (Rich GUI version)

Setting up:
  • The application starts at it "Offline menu" screen
  • Open the User setting screen
  • Fill in the following option according to the values above: username, password, server, jabber domain
  • Choose connect
  • Login fails for facebook, works for Google Talk
Pro
  • Nice user interface
Con
  • Doesn't work for Facebook
  • Really slow under mpowerplayer
  • Supports only one account
Summary
JabberMixClient is a nice client for Google Talk, but it refuses to connect to Facebook chat.

m-im
m-im is primarily aimed at Google Talk, but supports other Jabber servers as well.

Website: http://code.google.com/p/m-im/
Mobile download page: http://code.google.com/p/m-im/downloads/list
Version tested: 1.5.0

Setting up:
  • Download, instasll and start the applicaiton
  • Choose no when aseked whether you want to use the wizard to set up a Google Talk account
  • The profiles screen open. Choose menu > new
  • Fill in Facebook in the profile name box, the Jabber ID in the username box, a short nickname in the "Display name" box, your password and the server address in the host box
  • Uncheck the google account box and choose save
  • Press OK on the new profile to log in
  • Blank screen opens with no indication of progress
Pro
  • Google code site has up to date downloads
  • Supports multiple profiles
  • Supports Google Talk
Con
  • No mobile site. Most phones should be able to handle Google code link though
  • No indication of progress
  • Current version doesn't seem to work
  • Only tested on a few phones according to website
Summary
m-im looks like it might have potential. The interface to configure accounts and the screen that is shown while it is connecting needs a lot of work.

According to the changelog, some major changes took place in this version. Older version might work better.


Conclusion
It is disappointing that Facebook caht did not work immediately on most Jabber clients. It seems that many of the clients are only usable with a basic server and/or Google Talk.

Lampiro 10.4.1 works well for Facebook chat with basic testing.

[Update 2010-04-28: Updated for Lampiro 10.4.1. Left old review for historical interest]

Thursday, April 22, 2010

Vodacom breaks Opera Mobile downloads on Symbian

When I go to http://m.opera.com on my Nokia 6120 on Vodacom, I get a page that only allows me to download a "Vodafone optimized Opera Mini" that installs with a generic "Internet" icon. It does not give an option to get the proper Opera Mobile that works on Symbian.

To bypass this and actually download Opera Mobile or a non-branded Opera Mini (without going through the registration required Ovi store), use this link: http://www.opera.com/mobile/download/versions/ in the build-in browser, choose the relevant version (Opera Mobile for S60 / Opera Mini) and click the link to get the normal version. (This relies on the quite-decent build-in browser of the Nokia)

Note: Downloading the applications to your PC and transferring it to your phone might be easier, faster and/or cheaper.

Note2: This assumes that you are not using a phone set only to accept application signed by their cellphone provider.

Tuesday, February 24, 2009

Sane rules for determining likely safety of executables

Some autorun based viruses and, more recently, a thread on the Wine developer mailing list had me thinking a bit about a reasonable way of identifying potentially dangerous Windows executables.

Background
Windows XP SP2

Recent version of Windows (from XP SP2 IIRC) has a mechanism (which seem to be based on IAttachmentExecute) to determine whether or not to prompt the user before running an application that might be consider dangerous. In Windows XP, this is at least files that were downloaded from the Internet and files on network shares under certain circumstances. Browsers, Firefox 3 and IE 6 that comes with Windows XP SP2, marks files that was downloaded from the Internet in order for this to work. Some more details about this can be found elsewhere.

For the Windows XP implementation of this, the user has an option to disable prompts to run the file, either from the file properties dialog or from the prompt that opens. IIRC signed files allow you to disable the prompt for all files from a publisher. (I cannot find any information on the handling of signed files)

This mechanism was probably added to remind the user that the program is potentially dangerous and that it should be checked before being run.

Autorun based malware
Autorun based "viruses" (trojans or worms are probably more correct) are another, but related problem. This kind of malware spread by infecting drives, including removable drives, such as external hard drives, USB flash drives, SD cards, etc. with an executable that is triggered from the autorun.inf file when the drive is connected to a computer or if autorun is triggered manually. (Double clicking on the drive in My Computer usually has this effect.) The risk of infection with this kind of malware can be mitigated by disabling outrun on removable drives.

The main factor that enable the effective distribution of autorun based malware is that autorun is enabled writable, removable devices, which allows any application that can write (on any computer where it is used) to the drive to execute arbitrary code on another computer. CDs and DVDs can also be infected, but the opportunities are limited for the read-only and non-rewritable versions, since they are normally not easily writable directly (special software are typically used to write to these media) and only a few computers have the opportunity to write to it.

Complete protection
The most common way (other ways, such as exploits are not considered here) that malware reaches a computer is from an external source, such as the Internet, e-mail attachments, network shares and removable drives. The mechanism mentioned earlier, describes the approach that Microsoft took to mitigate the risk for some cases. The risk could be mitigated further by including additional external sources of executables to the list of sources that is distrusted by default. The only completely effective way to ensure that the user is prompted before any malware is run, is to distrust anything that was not part of the operating system (these can be made identifiable with a digital signature) by default. The user would then need to specifically whitelist any other executable that he / she wants to use. A slight tradeoff would be to allow the user to whitelist the vendor of signed applications, rather each executable.

Another tradeoff would be to trust everything that was marked as trustworthy by a trusted application. This should allow, when the user trusts an installer, to run the applications installed by it without further prompts.

A problem with any system that allows executables to be marked trusted, without restricting applications from marking others as trusted, is that trusting a single malicious executable can bypass the trust system for any other files. Vista UAC seem to indicate that users do not like to be prompted about the actions of a program. Users are likely to ignore prompts anyway if they do not know what it is about.

Suggestions
The suggestions are based on my view of a theoretical ideal and do not take the feasibility of the implementation of the suggestions into account.

Security and usability was the criteria used to decide on these suggestions.

A sensible middle ground
Existing files on local, fixed drives and read-only removable drives are more trustworthy than files on a writable removable disk, or files that is known to be from an external source. (A read-only disk is not completely safe and old files on a local disk are only safe if they were checked as they arrived)

Prompting users to run files that they have just requested to run will be annoying or even confusing to some users. This is made worse by users that simply ignores anything that looks like an error message and clicks whichever option seem likely to make it go away.

Ignoring possible annoyance to users, a reasonable level of protection would involve prompting the user before running anything from a writable removable drive, writable network share or anything that was downloaded from the Internet. (The writable requirement is to find files that could have been modified by anyone)

For files with a digital signature, a SSH-like trust system should be able to reduce annoyance by allowing the user to trust a specific certificate (irrespective whether it was self-signed or signed by a "trusted" certification provider) and not prompting again from applications signed with that certificate.

If easily protectable from malicious ratings, a web based trust indicator for certificates (or individual executables for unsigned files) might optionality be used in order to guide users. (This has privacy implications, and the user should opt-in explicitly)

Mapping trustworthiness in a Wine environment
Drives that should be distrusted by default should be marked by the user or his distribution by mounting them with the noexec option. (Candidates for this should be writeable removable storage (flash drives, but not CDs) and network shares) The user can then be prompted before running the file. (The user should be able to disable the prompts in the same way as the attachment manager prompts)

Files on noexec volumes should be able to be marked as trustworthy. If the filesystem is writable and supports, extended attributes can be used, otherwise a database needs to be kept in the WINEPREFIX.

For other volumes, files can be assumed to be trustworthy if their executable flag is set and can be marked as non-trustworthy by removing the bit. Extended attributes are another option, and a database in the WINEPREFIX (a system-wide database in /etc might be useful for administrators) should always be an option as a fallback on a non-writable filesystem. Windows applications should be able to manipulate a file's trustworthiness in the same way as used on Windows XP SP2 or higher.

Prompts should at least tell the user to run an anti-virus on the file before running it, allow him to run the file, cancel running the file or add the file to a list of trusted files.

For signed files, an option to trust / distrust the certificate should be present as well.

Monday, October 27, 2008

Secure communication within a limited user group

Introduction
Police and other emergency services in South-Africa require reasonably secure communication, in order to discourage the abuse of the information transmitted for personal gain or criminal activities.

Traditionally police use their own frequencies (sometimes with an unusual modulation for the frequency) to ensure privacy. Integrated wide-band capable radio receiver chips has made these analogue measures ineffective. This could be expected, since it is based on a "security through obscurity" approach, which relies on no one figuring out the frequency or obtaining a radio, which is impossible to prevent in the long term. Scanners are available that allow anyone in possession of one to receive a wide range of radio signals, including police communication. In addition someone skilled in electronics can build/modify their own radio capable of receiving a wide range of frequencies.

Legislation often exist banning the possession, sale and/or use of scanners, but this does not prevent people from obtaining/building them. Scanners do not transmit significant signals, which make them hard to detect. (Tempest-like methods, as possibly used for the detection of pirate TV viewers for the enforcement of TV license legislation, might work from nearby.) When used by criminals, who is probably committing crimes far more serious than owning / using a scanner, the scanner is can be used for actively avoiding the police, in which case the benefits far outweighs the risks.

Digital communication can solve these problems by utilizing encryption. With proper error-correction codes, the range of the radios can also be extended. The design of such a system can be based on a conditional access system, such as those used for satellite TV. While I'm not familiar with any specific system, it is not hard to design a system based on a mixture of public key and symmetric encryption systems that would be relatively secure.

The basics
Using a purely public-key system is not practical, since radios need to keep track of the public keys of all radios that they want to communicate with. A symmetric-key method is a much more practical solution. It has the problem that only a single key need to be compromised in order to gain access to all encrypted communication. In order to ensure that a compromised key or device do not grant an attacker long term access to the encrypted information, it is critical that the key changes often (at least a few times a day). For a pair of devices, securely exchanging keys is not really a problem (Diffie-Hellman key exchange can be used). This is where the public-key system comes in.

Key distribution
The keys are much smaller than the data protected by them. This makes it practical to distribute a large number of copies of the keys, each encrypted with the public key of the recipient. The recipient needs a private key in order to decrypt the symmetric-cypher's keys. It is preferable that these keys are stored in the hardware used to decrypt the data. A smart card is the ideal vehicle for such a purpose (provided that the key is stored securely and not easily exposed or cloned). Several keys, each marked with the time they come into effect need to be distributed, since the radios may be out of range of the key distribution system for some time (This reduces security somewhat by increasing the time that a stolen device / smart-card is useful). The encrypted keys can be transferred to the devices using several methods such as in-band distribution, central distribution from the police station, GSM modems, etc.

Security of the system
The system is kept secure by strictly keeping track of the smart cards in use. If a smart-card is lost or stolen, the distribution of keys encrypted with its public key is simply discontinued. Strict procedures, such as weekly / daily automated audits of the smart cards should be used. (The system should require the smart card to be physically present to verify its identity.)

Weaknesses and countermeasures
The basic weaknesses in the system is similar to those in pay-TV systems: It is possible to modify a device to share the decrypted keys or the hardware used to decrypt the keys with other devices. This can result in unauthorized devices gaining access to the encrypted signal.

The hardware decryption device can be modified to allow a limited amount of decryption operations in a certain time-frame in an attempt to limit the risk. Hardware modification or caching of the decrypted keys can bypass such measures.

The difficulty of properly managing devices that go missing increase with the number of devices. The system should therefore be managed on a relatively small scale, such as within a city.

Conclusion
Regulatory methods of controlling access to private radio signals are ineffective and only provide for reactive management of the security of the system by destroying unauthorized receivers if they are found.

It is possible to provide a much higher level of security to communication within an exclusive group of users, such as a police department or the subscribers of a pay-TV system. This method also allow for central manageability and access revocation.

Monday, September 8, 2008

HTTPS should not require special treatment by browsers

Google Chrome was recently criticized for indexing information transferred from HTTPS pages such as Internet banking.

While the concerns, private information being indexed is valid, the best solution is not to exclude HTTPS from indexing by default. Many useful sites are served over HTTPS that do not contain private data. Users benefit from having this information easily available. Some browsers even exclude HTTPS from caching by default.

The HTTP standard specifies a much better way to ensure that certain data is excluded from caching (it is probably a good idea to exclude it from indexing as well in such cases).

The HTTP 1.1 standard states "Unless specifically constrained by a cache-control directive, a caching system MAY always store a successful response as a cache entry..."

Unless a response from a server is specifically marked not to be cacheable, any browser (or proxy for normal HTTP) should try to cache the response in order to improve the user experience.

How sensitive data should be protected
Even though caches improve the user experience, some data should never be stored. The data mentioned in the linked articles fall within that category. This data is usually transferred over HTTPS in order to ensure its privacy and integrity while being transported between the server and user.

HTTP 1.1 provides a mechanism in order to ensure that this data is protected at the end points (and caches for normal HTTP). It specifies a "Cache-Control" header. This header allows the data to be tagged with several levels of cacheability. Anything marked with anything other than a no-store Cache-Control header should be expected to be cached at least in a limited way by the browser. (Other headers are indented to ensure that a cache do not return out of date data and no to ensure its privacy on the user's computer)

Most browsers since the days of Internet Explorer 4 supports enough HTTP 1.1 to understand Cache-Control headers.

Banks and other sites should therefore ensure that they include the correct headers in the responses from their severs. They should not prevent non-sensitive content such as static style-sheets, scripts and images from being cached, since reloading this data each time degrades the user experience and wastes bandwidth. Depending on browsers to be more paranoid than the standards require them to be is irresponsible.

If sensitive data leaks, the party responsible for the disclosure should be held responsible. This can be the user, if his/her system's security was breached (due to his/her negligence), the browser vendor, if the browser does not follow the standards and caches data that is marked no-store, or the party serving the content if they do not mark their content properly.

Interoperability with HTTP 1.0
HTTP 1.0 do not provide the Cache-Control header. In most such cases a Pragma: no-cache over HTTPS should be enough to exclude the page totally from caching. (This seems to be the common behaviour) When HTTP 1.1 is used, the finer-grained Cache-Control header should be used, if present. (HTTP 1.0-like behaviour as fall back in its absence is probably a safe option)

Deja Vu
The outcry over Chrome indexing page transferred over HTTPS reminds of the reaction after Google started indexing pages hosted on HTTPS in 2002.

An article written then sums it up nicely: "The misconception that Google is going where it shouldn't comes partly from the somewhat vague definition of "secure." The SSL protocol is simply a transmission protocol. It has nothing to do with whether an individual page should be considered "secure" or not."