Twitter
Security News
Recent Posts

Monday
Jul262010

How secure is your Webmail ?

Over the past few years, a rapid increase has been seen in the number of people choosing web-based email services over conventional email software such as Microsoft Outlook. Web-based email is truly cross platform, in that it can be accessed on any internet enabled device, be it a Windows or Mac computer, or a mobile device.  In today’s society, we are continually prompted to enter our Username(s) and Password(s), on every website that holds personal information about us, or provides us with some sort of service.  But just what happens when we log on to one of these email services, or indeed any online service that prompts us to authenticate ourselves ?

 

When we go log on to a website such as Facebook for example, we enter our Username and Password into some text boxes, click the “Login” button, and we are authenticated. Most login facilities on websites, are simply an HTML Form, with 2 text boxes and a “Login” button. When we click the “Login” button, the web browser generates a POST message, and our credentials are sent to the website’s server to be authenticated. For most security-savvy web developers, this process is carried out via the protection of SSL, but as countless Penetration Tests have shown – many times it is not ! User’s details are often sent in plain text, which allows any undesirable hacker or criminal to capture your Username and Password as you log into a website. 

 

SSL to the rescue !

SSL (or Secure Socket Layer), is the technology that exists to prevent anybody listening (or sniffing) the traffic between your Internet browser, and the web server to which you are connected. When the website you are on is connected securely (via SSL), you will notice several things about the appearance of your browser, that will reassure you that our connection is secure.

  1. The website address you are visiting will have HTTPS:// at the beginning of it.
  2. There will often be a small padlock icon displayed, either next to the URL bar, or in one of the corners of the browser window.
  3. In some cases, the URL bar itself will turn green when you are connected securely.

 

So what does that mean to me ?

When you are connected securely to a website, all the information that you send to the website is done in a secure manner. The data is not just secure from your computer (as many people wrongly believe), but is in fact secure and encrypted, from the browser, right through to the web server. Encryption from the browser is an important thing to note, as it makes it more difficult for a potential hacker to monitor the traffic sent to your computer’s network connection.

 

Like comedy - Timing is everything !

When the login takes place over a secure connection, it is important to note how the browser behaves during this time. It is quite common, for websites to display the login area over an insecure (HTTP) connection, and it is not until the user clicks the “Login” button that a secure connection is obtained.

On occasion, I have seen websites that will do the opposite, in that the login page is displayed over a secure connection, but the user’s details are sent in plain text. This is sometimes the case, when a 3rd party web app is used for some parts of the web page, or perhaps the login script was set up to use an insecure connection during the development phase of the website, and was not correctly updated when the site was put into public use.

 

You're just trying to scare me ! 

You may think that the risk of somebody listening (or sniffing) the traffic going from your computer is not that great, however there are many malicious hackers,who will quietly sit in public WiFi Hotspots in airports and coffee shops, and monitor network traffic to see what is of interest to them. There may be somebody in your workplace or organisation, with an unhealthy interest in reading your email.  

Many computer users have a very insecure manner in which they use their passwords. Many users will use easily guessable passwords, which are used for their email, banking, social networking etc etc. It is therefore possible for somebody, to capture the login details for your webmail service, and for these credentials to allow access to a multitude of other sites.

While the issue of insecure login’s can affect potentially any website not designed with security in mind, the research in this article concentrates on Web-based Email Providers.  When we log onto our email websites, we are assuming that it is done in a secure manner, and that nobody else can access it without our knowing.  Sadly many providers have either no provision for a secure SSL login, or logging in securely as an option. It is beyond belief WHY they would make security an option on their service, as logging in insecurely is hardly a positive in my opinion.

 

So what can I do ?

When providing your username and password to any website, it is important to be cautious. Not only should you make sure it is done securely, but also that the website requesting the information from you, IS the website you intended to visit. Phishing scams are sadly on a rising incline, whereby criminals will dupe their victims into visiting a website that looks identical to a genuine site, in order to siphon off user credentials as they login. 

Below is a simple list of 5 things you can do when logging into your webmail or other online site that requires user authentication.

  1. Check that the website address is the one you intended to visit.
  2. Check that the website address is prefixed with HTTPS://
  3. Check that the secure padlock icon is displayed, or URL bar is green (browser dependant).
  4. Check that when you click the “Login” button, you are taken to a secure web address (HTTPS).
  5. Avoid visiting web links directly from emails. Instead type the organisations address into your browser manually. It is common for phishing emails to have the name of a website as a hyperlink, that when clicked on will take you to the phony web page. Typing the address in manually, ensures that you are visiting the genuine website.

 

 

 

Sunday
Jan312010

WEP Encryption

WEP stands for Wired Equivalent Privacy, and is an encryption algorithm used to secure wireless networks. It is suggested that it has privacy of an equal level to that of wired network, due to it's data packets being transmitted in an encrypted form.

 

RC4 Keystream (Wikipedia)WEP utilises an RC4 cipher stream, which is used to encrypt the transmitted packets. Like many encryption algorithms, a seed value is also added to give a higher degree of randomness, and prevent easy deciphering. The seed value for RC4 comprises of a Key and an Initialisation Vector, which are concatenated together.

 

WEP Keys: The keys used in WEP typically come in either 64-bit, 128-bit or 256-bit form, with some manufacturers occasionally implementing their own propriatory key lengths. WEP keys are usually chosen by the installer of the wireless access point, and take the form of a string of hexadecimal characters.

An example of a 64-bit WEP could be: 00:11:22:33:44

Initialisation Vectors (IV's): Initialisation Vectors (or IV's), are used in conjunction with a cipher in order to make the encrypted data unique against other data, which may have been encrypted with the same key. In a cryptographic sense, an IV can be seen as having a similar function to a "salt" value used with a hash, in that it adds a further degree of randomness to the encrypted data.

Initialisation Vectors are used in many different forms of encryption, including RSA SecurID tokens. Hardware tokens provide a means of 2-Factor Authentication whereby the user not only enters a password, but also enters a unique One Time Password generated on the hardware token. The unique value is usually generated from an internal time base, or alternatively generates unique keys sequentially. In this example, IV's provide a very secure way of authentication.

WEP IV's consist of a 24-bit string of characters, with a significant fundamental flaw - the IV's are reused! The reuse of IV's within a cryptographic cipher, dramatically increases the chance of the underlying key being determined.

WEP Authentication

In the context of WEP, there are 2 types of authentication that exist - Open System and Shared Key.

Open System does not request any credentials from the client, which results in ANY client being able to associate with the access point. The data within the wireless network will still be encrypted, and in order for the client to interact with this data, they must at this point supply the correct key in order to decipher it.

Shared Key requires the wireless clients to submit the correct key before they allow "association" with the wireless network. This is done via a "four-way handshake", which takes place as follows:

  1. The Wireless Client sends an Association Request to the Access Point
  2. The Access Point sends a Challenge String to the Wireless Client in plain text
  3. The Wireless Client encrypts the Challenge String using the WEP key, and sends it back to the Access Point
  4. The Access Point decrypts the encrypted string from the client, and compares it against the Challenge String that was initially sent. If the 2 strings match, then the Wireless Client is allowed to "Associate" with the Access Point.

Once the Client has Associated with the Access Point, the following traffic is encrypted with the same WEP key using RC4 Encryption.

Between the Open System and Shared Key, surprisingly Open System is the more secure method for authentication. The reason for this is that it is possible to derive the keystream during the handshake on a Shared Key, by capturing the frames sent.

Vulnerabilities in WEP Encryption

WEP Encryption is a highly vulnerable method of securing a wireless network, and is easily exploited with several hacking tools available on the the market today. In my tutorials section, I demonstrate how easily WEP keys can be determined, using Cain & Abel and the AirPcap adapter (Cace Technologies).

The vulnerability in WEP exists because of the way in which Initialisation Vectors are applied. In RC4 (and all other "stream ciphers"), it is imperative that the Traffic Key (In this case the WEP key + IV's) is never used more than once. If this happens, then it is only a matter of time before an eavesdropper captures enough encrypted packets, to be able to run a KoreK's or PTW attack to determine the underlying WEP key.

You can learn more about how to demonstrate the vulnerabilities in WEP Encryption here.