HPR Live – The One Week Extravaganza

August 13th, 2010
Howdie guys,
I’ve dropped you guys emails because i was hoping that on your shows you could mention /shout out/ media whore the following;
I’ve had the thumbs up for an idea i had for HPR (hackerpublicradio.org). Basically i’m taking over for a week, well sort of.
I’m doing 4 shows, Monday to Thursday then i’m gonna do a live Phone-in/feedback show.
The shows i’m doing are;
SSLSniff & SSLStrip.
The why’s, the what’s and the how’s. A show about why you would want to use these tools, how to install them and how you can deploy them on your test network.
TorTunnel
The why’s, the what’s and the how’s. Tortunnel is a tool used for making tor a one hop proxy, this doesn’t do much for annonymity but it does allow you to jump out of network segments, with out the three hop over head standard tor gives you. The show will look at how to install and get it up and running.
Kismet
Forget what finux has said in the past, they’ve changed Kismet. Kismet is in the process of a massive overhaul and everything from the UI to how it is configured is changed. The show will look at what kismet is, why you would use kismet and get it up and running.
Social Engineers Toolkit (SET)
The social engineers toolkit isn’t a fake telco’s engineers uniform and a doddgy fake mustache, it is however a collection of tools that can make social engineering a breeze, very good for testing companies readiness for these sort of attacks. The show will look at what SET is and what tools you can find in there, and of course how to get it up and running.
Friday Night HPR Live
So you’ve played with the tools from the past four episodes, they all worked no problems great. What happens if they didn’t, does it go on the back burner list until you find the time to make it work? No join us live to Friday night of the week for the phone-in/feedback show. Get some support, ask some questions, get them tools working. Got a good story about one of the tools then join us and share it.
Now the dates for the week long HPR series is penciled in form the 27th September till the 1st October (The 1st would be the Live show)
For the live show we’ll be using a mix of things i would imagine, TalkShoe.com, Skype and the likes, and of course IRC chat for the geekness.

Howdie guys,

I’ve had the thumbs up for an idea i had for HPR (hackerpublicradio.org). Basically i’m taking over for a week, well sort of.

I’m doing 4 shows, Monday to Thursday then i’m gonna do a live Phone-in/feedback show.

The shows i’m doing are;

SSLSniff & SSLStrip.

The why’s, the what’s and the how’s. A show about why you would want to use these tools, how to install them and how you can deploy them on your test network.

TorTunnel

The why’s, the what’s and the how’s. Tortunnel is a tool used for making tor a one hop proxy, this doesn’t do much for annonymity but it does allow you to jump out of network segments, with out the three hop over head standard tor gives you. The show will look at how to install and get it up and running.

Kismet

Forget what finux has said in the past, they’ve changed Kismet. Kismet is in the process of a massive overhaul and everything from the UI to how it is configured is changed. The show will look at what kismet is, why you would use kismet and get it up and running.

Social Engineers Toolkit (SET)

The social engineers toolkit isn’t a fake telco’s engineers uniform and a doddgy fake mustache, it is however a collection of tools that can make social engineering a breeze, very good for testing companies readiness for these sort of attacks. The show will look at what SET is and what tools you can find in there, and of course how to get it up and running.

Friday Night HPR Live

So you’ve played with the tools from the past four episodes, they all worked no problems great. What happens if they didn’t, does it go on the back burner list until you find the time to make it work? No join us live to Friday night of the week for the phone-in/feedback show. Get some support, ask some questions, get them tools working. Got a good story about one of the tools then join us and share it.

Now the dates for the week long HPR series is penciled in form the 27th September till the 1st October (The 1st would be the Live show)

For the live show we’ll be using a mix of things i would imagine, TalkShoe.com, Skype and the likes, and of course IRC chat for the geekness.

I’d love to get people ideas, thoughts and feedback on the above.  It should be a real blast and if we can get the message out i’m sure the live show will be awesome.

Soon as its official i’ll let everyone know

My BruCON abstract submission

May 4th, 2010

Hi Guys,

Thought i would post my submission to the he BruCON Security Conference.  As anyone that follows either of the Podcasts i’m involved in you’ll know that i have great affinity with the conference.  Tickets are available, if you book them now you’ll benefit from the early bird prices, their available from here.

Abstract Bellow

Free software and security – Defending on a budget
Talk submission BruCON
Arron “finux” Finnon
Location: Dundee, Scotland, Tayside, United Kingdom.
British Passport
Talk is proposed and has not been given to any conference or user group before.  It will be in English.
I have given a number of talks on both security related topics and free and open source software.
http://finux.co.uk  ||  http://tracsec.com  ||  http://hackerpublicradio.org
Abstract
From Personal Computers to Corporate infrastructure, times have required an attitude of evolution and change to defend against the many threats and challenges faced by users.  All though no one really likes to admit it, all users have to become defenders.  From “Harry Home Owner” to System Admins, educated informed decisions should always take precedence.
Free Software has the ability to stand at least ’shoulder-to-shoulder’ with its commercial counterparts, yet it faces attacks from groups that have a vested interested in seeing ‘commercial licensing’ prevail over ‘free and open licensing’ model, not all of these groups are in the ’security software’ sphere.
Legions of defenders work relentlessly on writing code that  not only competes in the real world, but enables its users freedom.  Its this very freedom that these relentless developers use to produce code, applications, and software used in defending against many threats, and attacks.
The talks aim is to look at some commonly used software that all users share and how Free Software can fit into that space.  It will cover some aspects of software used in commercial/corporate environment and how free software can liberate those users to evolve their software to fit their needs in defending against constantly changing threats and demands they face.
All though Free Software doesn’t mean that it comes without cost, in most cases it doesn’t have a price tag attached.  Its about freedom.  The talk will look at some of the Free Software that has little or no cost.  Security, defence, protection on a budget with Free Software.
The speaker hopes this talk will act as an ‘Anti-FUD’ (Fear Uncertainty Doubt) talk on free software and security.
Someone listening to talk can expect to leave knowing;
An understanding of what free software is, and how it differs from other types of software.  Some examples of flagship free software used in security, that has little or no cost.  How the ‘Free Software’ ethos can benefit those trying to defend themselves or assets against threats.  How people who wish to help and support free software projects can.  How people can promote and encourage free software within their organisations, and what ‘to do’ and ‘not to do’ when it comes to selling the concept of free software in the workplace.
Speakers Bio
Arron M Finnon (aka finux), has been involved in Free and Open Source software for over four years.  Whilst studying a hacking degree in Scotland’s technology hub Dundee, he was one of the founding officers of ‘The University of Abertay Dundee Linux Society’ and president for over three years, later  receiving the SCISA (Scottish Informatics and Computer Science Alliance) Open Source Award for exemplary Advocacy for his activities in promoting Free and Open Source Software.
Working with Local User Groups and communities members throughout United Kingdom to promote, encourage, and facilitate ‘Free and Open Source Software’ at a grass roots level has given Arron a unique and passionate view of ‘how’ and ‘where’ Free Software fits in the demanding real world.
As the ‘Team Leader’ and main organiser for the successful ‘Software Freedom Day Dundee’ events, in 2009 and 2010 he was able to engage with a large number of people who may never have experienced or engaged with Free Software ideals, and promote debate, discussion, and adoption with these people.
Gaining experience at public speaking about free software has enabled Arron to talk to people about many threats faced by users in the computing world, and he has spoken at a number of User Groups in the UK, as well as guest lecturing back at his old university on security related topics.
Arron has always managed to blend his love for ‘Free and Open Source software’ and ‘Computer Security’, and this has been expressed in many formats such has podcasting and public speaking.
A sample of some of Arron’s recorded talks can be found at http://www.hackerpublicradio.org/correspondents.php?hostid=85
Arron is also co-host on http://www.tracsec.com –A monthly security podcast
Arron now is an independent security researcher, consultant, and blogger.  You can find him at www.finux.co.uk and www.twitter.com/f1nux

Free software and security – Defending on a budget

Talk submission BruCON

Arron “finux” Finnon

Talk is proposed and has not been given to any conference or user group before.  It will be in English.

I have given a number of talks on both security related topics and free and open source software.

http://finux.co.uk ||  http://tracsec.com ||  http://hackerpublicradio.org

From Personal Computers to Corporate infrastructure, times have required an attitude of evolution and change to defend against the many threats and challenges faced by users.  All though no one really likes to admit it, all users have to become defenders.  From “Harry Home Owner” to System Admins, educated informed decisions should always take precedence.

Free Software has the ability to stand at least ’shoulder-to-shoulder’ with its commercial counterparts, yet it faces attacks from groups that have a vested interested in seeing ‘commercial licensing’ prevail over ‘free and open licensing’ model, not all of these groups are in the ’security software’ sphere.

Legions of defenders work relentlessly on writing code that  not only competes in the real world, but enables its users freedom.  Its this very freedom that these relentless developers use to produce code, applications, and software used in defending against many threats, and attacks.

The talks aim is to look at some commonly used software that all users share and how Free Software can fit into that space.  It will cover some aspects of software used in commercial/corporate environment and how free software can liberate those users to evolve their software to fit their needs in defending against constantly changing threats and demands they face.

All though Free Software doesn’t mean that it comes without cost, in most cases it doesn’t have a price tag attached.  Its about freedom.  The talk will look at some of the Free Software that has little or no cost.  Security, defence, protection on a budget with Free Software.

The speaker hopes this talk will act as an ‘Anti-FUD’ (Fear Uncertainty Doubt) talk on free software and security.

Someone listening to talk can expect to leave knowing;

An understanding of what free software is, and how it differs from other types of software.  Some examples of flagship free software used in security, that has little or no cost.  How the ‘Free Software’ ethos can benefit those trying to defend themselves or assets against threats.  How people who wish to help and support free software projects can.  How people can promote and encourage free software within their organisations, and what ‘to do’ and ‘not to do’ when it comes to selling the concept of free software in the workplace.

Speakers Bio

Arron M Finnon (aka finux), has been involved in Free and Open Source software for over four years.  Whilst studying a hacking degree in Scotland’s technology hub Dundee, he was one of the founding officers of ‘The University of Abertay Dundee Linux Society’ and president for over three years, later  receiving the SCISA (Scottish Informatics and Computer Science Alliance) Open Source Award for exemplary Advocacy for his activities in promoting Free and Open Source Software.

Working with Local User Groups and communities members throughout United Kingdom to promote, encourage, and facilitate ‘Free and Open Source Software’ at a grass roots level has given Arron a unique and passionate view of ‘how’ and ‘where’ Free Software fits in the demanding real world.

As the ‘Team Leader’ and main organiser for the successful ‘Software Freedom Day Dundee’ events, in 2009 and 2010 he was able to engage with a large number of people who may never have experienced or engaged with Free Software ideals, and promote debate, discussion, and adoption with these people.

Gaining experience at public speaking about free software has enabled Arron to talk to people about many threats faced by users in the computing world, and he has spoken at a number of User Groups in the UK, as well as guest lecturing back at his old university on security related topics.

Arron has always managed to blend his love for ‘Free and Open Source software’ and ‘Computer Security’, and this has been expressed in many formats such has podcasting and public speaking.

A sample of some of Arron’s recorded talks can be found at http://www.hackerpublicradio.org/correspondents.php?hostid=85

Arron is also co-host on http://www.tracsec.com –A monthly security podcast

Arron now is an independent security researcher, consultant, and blogger.  You can find him at www.finux.co.uk and www.twitter.com/f1nux

END of ABSTRACT SUBMISSION

Remember you can get a great rate on the tickets if you book early, so be a good sport and get your ticket brought.  They are available from here.

PS all please cross your fingers for my talk to be accepted

finux

Null Prefix Attack Talk – Available On HPR

December 2nd, 2009

My recent talk at thelinuxsociety.org.uk on Moxie Marlinspike’s Null Prefix Attack, used in defeating SSL/TLS.  Has been released on HPR.  You can find the Notes and Slides that accompany the talk here

A .mp3 version of the talk can be found here

Finux

Note Added 10/12/09

Video (.avi) of the talk can be downloaded here

Seccubus – Frank’s baby is changing

November 21st, 2009

Well guys,

I’m very proud to announce good friend of mine and HackerPublicRadio.Org Frank Breedijk has annonuced recently that he project formally known as AutoNessus has changed its name.

“Seccubus is a mythical creature that helps security professionals analyze and report the results of, repeated, vulnerability scans. Like its distant cousins the Succubus (http://en.wikipedia.org/wiki/Succubus) and Incubus (http://en.wikipedia.org/wiki/Incubus) the Seccubus is also a creature of the night. At night, or any other scheduled time, the Seccubus draws its energy from repeatedly performing vulnerability scans  of infrastructures until the vulnerabilities become exhausted or die. The Inseccubus is the male counterpart of the Seccubus. While the Inseccubus draws his life energy from the assessor by repeatedly requiring him to (re-)analyse the same findings, the Seccubus get her energy from pleasing the assessor by reducing the number of findings by means of delta reporting.”

Now that the new name has been announced the “rebranding” will be complete before the end of the year. The website www.seccubus.com is already live but still points to the AutoNessus.com site. Also Frank’s twitter account, @autonessus, will be renamed to @seccubus soon.

Well done to Jason Mansfield, who runs the website http://www.clinicallyawasome.com, who won the contest by sending in the name Seccubus.

Frank has promissed to come on to HackerPublicRadio.Org and annonuce the news personally, i’ll keep you informed when the show comes out

Finux

Notes-From-My-Null-Prefix-Attack-Talk

November 21st, 2009

Hi Guys,

I’m just posting my notes and slides from my flash talk last night at the Linux Society, it seemed to go well.  It maybe better for me to explain what the Linux Society flash talk nights are all about.  The basic concept is that is that three to four speakers volunteer to do a small 10 minute talk on any subject they wish.  The aim is that the member’s of the Linux Society get to hear about three or four new things that they may never have heard about before.

I volunteered to talk about Moxie Marlinspike’s Null Prefix Attack, in defeating SSL/TLS.  It was a little tight to get it squeezed into 10 minutes.  I’ve posted my notes and my slides from the talk, as for those there i had to cover a lot of ground very fast.  It maybe of some interest to someone out there.  Someone was videoing the talks, and i also recorded the audio for HackerPublicRadio.Org so i’ll let you guys know.

My Notes From The Talks: – ** indicates change of slide

Moxie Marlinspike’s Null Prefix Attack – Deafening SSL/TLS

Linux Society Flash Talk

19th September 2009

By Arron Finnon

Good evening ladies and gentleman, my name is Arron Finnon and I will be talking to you this evening about Moxie Marlinspike’s Null Prefix Attack. Ever since I first heard about this attack I have been fascinated by it. I was also lucky enough to interview the security researcher who discovered this particular attack.

**

The talk should outline and you should hope to know the following by the end;

What is the Null Prefix Attack

What are SSL Implementations

What is Online Domain Validation

The process used in Certificate requests and revocations

What a Universal Wild Card Cert is

And how OCSP was defeated

**

My intro

So tonights aim is for me to give you a crash course in this particular attack, and the vulnerability it exploits its only suppose to wet your appetite. I will give you a couple of web addresses and suggestions at the end if you want to know more. This one is going to be a tight squeeze to fit it in to 10 minutes, I have a lot of ground to cover in very little time but I think I should just about do it.

**

So in short tonights talk focuses on an implementation vulnerability in the secure protocol SSL/TLS, which was left unpatched on some operating systems for well over 10 weeks. At its heart the null prefix attack had the potential ability for an attacker to intercept and decrypted secure browser traffic, reading usernames and passwords entered for sites such as paypal, gmail, facebook without them or their users knowing. SSL/TLS had been effectively broken not just in browsers, but in vast arrays of software that is dependent on SSL/TLS implementations. All though this attack has predominately been patched i’m not going to imply that there still isn’t a real world threat from this, however its more than likely that this threat will fade away over time.

In October 2009 nearly 2% of Firefox users where running a vulnerable version of Firefox, which may not sound like a big number, but when you look at Firefox having a 47% market share for that same month it starts to become a vast number. In addition most of Microsoft’s product range where vulnerable during the first half of October too. In fact Microsoft took an astonishing 10 weeks to fix the problem.

**

In laying the ground work I want to very quick touch on what TLS and its predecessor SSL is, and where it is in common use today. However it is not my aim for this to be a definitive guide, but just a reference, if you decide to find out more about SSL/TLS there is a lot of content about it available.

In short Transport Layer Security or TLS and Secure Socket Layer or SSL, are a cryptographic protocols, who’s aim is to provide security for communications over networks such as the Internet. The protocols are in widespread use in applications such as web browsers, email, instant messaging, VoIP, and some VPN’s. TLS is based on the earlier SSL specifications developed by Netscape Corporation.

TLS allows client/server programs to communicate over networks in method that makes eavesdropping, data tampering and message forgery hard to accomplish. In a typical deployment such as a web browser, TLS authentication is unilateral: which means that only the server is authenticated. The client knows the server’s identity, the client remains unauthenticated

So a simple TLS handshake where the server is authenticated by its certificate would work like so;

**

A negotiation phase would start with a client sending a ClientHello message, in that message the client will inform the server of the TLS protocol versions it supports, a random number, list of preferred cyphers and compression methods.

The server then responds with a ServerHello message, and within that message the chosen TLS protocol version, a random number, and the selected cypher suite and compression method. It may also contain a session ID to preform resumed handshakes. The server will then send a certificate message, followed by a ServerHelloDone, indicating that the negotiation phase has finished.

The client then responds with a ClientKeyExchange message, which contains a PreMasterSecret and a public key. Both the client and the server use the random numbers from the negotiation phase, and the PreMasterSecret to compute a common “master secret”. Key Data for this connection will be derived from the master secret and the random numbers generated earlier, which is passed through a pseudo-random function which has been carefully designed.

The client will then send a ChangeCipherSpec record informing the server that all communication will be authenticated. The client will then follow this up with an authenticated and encrypted Finished Message which contains the hash of the previous handshake message. The server will try and decrypt the client’s Finished message and match the Hash, if the server fails to verify the hash then the handshake will be considered failed and the connection torn down. The server will follow up by sending a ChangeSipherSpec to the client, informing the client that everything now passed to you from me will be authenticated, and a Finished Message encrypted with the hash of the previous message, the client will then attempt to decrypt and verify.

**

The certificates that are generally used in browsers is the X.509 type, and its a crucial part to how the null prefix attack is implemented. The X.509 is a standard for public key infrastructure also known as PKI, it has standard formats for public key certificates and, certificate revocation lists.

X.509 was initially issued on July the 3rd, 1988 and was in association with the X.500 standard. It assumes a strict hierarchical system of certificate authorities (CAs) for issuing the certificates. In the X.509 system, a CA issues a certificate binding a public key to a particular Distinguished Name as was before in the X.500 tradition, however it can also be to an Alternative Name such as an e-mail address or a DNS-entry. Browsers such as Internet Explorer, Netscape/Mozilla, Opera and Safari come with root certificates pre-installed, so SSL certificates from larger vendors will work instantly; in effect the browsers’ developers determine which CAs are trusted third parties for the browsers’ users. Although these root certificates can be removed or disabled, users rarely do so. X.509 as I have also mentioned includes standards for certificate revocation list (CRL) implementations. The IETF-approved way of checking a certificate’s validity is the Online Certificate Status Protocol (OCSP). Firefox 3 enables OCSP checking by default.

Defeating OCSP is also a key aspect of this attack, however I will discuss it a little later

**

If we look at the X.509 structure for a digital certificate, it is as follows;

  • Certificate

    • Version

    • Serial Number

    • Algorithm ID

    • Issuer

    • Validity

      • Not Before

      • Not After

    • Subject

    • Subject Public Key Info

      • Public Key Algorithm

      • Subject Public Key

    • Issuer Unique Identifier (Optional)

    • Subject Unique Identifier (Optional)

    • Extensions (Optional)

  • Certificate Signature Algorithm

  • Certificate Signature

**

Now for the SSL/TLS protocol it is “common name” field within the Subject field that is used to identify servers presenting certificates over the Internet. So when paypal request a certificate they will list www.paypal.com, if ebay request a certificate they will list www.ebay.com, and of course if I where requesting a certificate then I would list www.finux.co.uk.

When requesting a Certificate Signing Request to a Certificate Authority also known as a CA, the request is validated by establishing ownership of the domain. This can be as simple as checking the WHOIS database of the root domain and sending an confirmation email to the details listed. So in our example the CA would look up the root domain for www.ebay.com, which of course is ebay.com, and we would find the administration email is host...@ebay.com. Confirmation request is sent to them informing them that a request for a certificate has been made and could they please confirm the request.

Only the root domain is looked up and everything else is ignored by the CA, its an automated process. So we can register anything in the common name in the subject field and only the root domain is checked and validated, so we could request foobar.finux.co.uk, certificate.authorities.suck.finux.co.uk, even this.subdomain.is.fictional.finux.co.uk and all CA would see and validate is finux.co.uk.

It is at this point that the attack begins to take place. X509 certificates are formatted using ASN.1 notation, which supports lots of different string types. However all of them are represented in some variation of PASCAL. When in memory PASCAL strings are represented by a series of bytes, specifiying the length of the string, and then the string data. One character per byte. It is very important to pay attention to this being very different to how C reads a string, which is a series of bytes, one character per byte terminated by a single NULL character. In PASCAL NULL characters have no special meaning.

So we could be free to request www.paypal.com\0.finux.co.uk and the verification will be sent to finux.co.uk.

As we have earlier discussed with CA’s they tend to ignore everything before the root domain, and we are free to insert a NULL Character with in our request the NULL character has no special meaning in PASCAL.

However most modern SSL/TLS implementation will view the data from an X.509 certificate as an ordinary C string, using standard functions for comparisons and manipulation. One of the consequences of this is if we take our issued certificate with www.paypal.com\0.finux.co.uk in the CN field, in C the termination will happen at the Null Character, so when we go to verify that the trusted CA cert used to identify www.paypal.com it will compare only the www.paypal.com part of our CN. This enables us amongst other things to deploy a man in the middle attack, and present to the client a valid signed cert by a CA, which will compare to to the site we’re eavesdropping on.

It is here where authenticity of SSL/TLS is defeated.

However the story really doesn’t end here, as I mentioned previously we still have the issues of Online Certificate Status Protocol to worry about, it was designed to be quick and effective way of revocation to CA signed certificates. So it would be easy for the CA to check its records and find certificates that contained NULL characters.

OCSP was designed to support a light weight requests from the clients who have been presented with a certificate that they haven’t seen before, or recently. Within each CA signed certificate is an OSCP url for the issuer, which browsers like firefox will quickly check before accepting the certificate.

This could be fatal when deploying a Null Prefix Certificate in a MiTM (Man in The Middle) attack, if the CA has revoked our certificate.

However Moxie Marlinspike who discovered the Null Prefix Attack, also managed to defeat OCSP with similar easy. It is not far to say this whole protocol has been defeated by one single byte

After studying the response codes, Moxie has noticed that the code 3 which informed the browser to check the OCSP URL later did not generate any negative indicators on the browsers, and would continue. During that he discovered that ResponseByte structure had a signature from the CA which would be hard to forge, but that signature only covered ResponseData which is an optional. It however doesn’t cover the ResponseStatus.

Enumeration of the OCSPResponseStatus followed;

**

successful (0)

malformedRequest (1)

internalError (2)

tryLater (3)

sigRequired(5)

unauthorised (6)

Successful response would be hard to sign the subsequent ResponseData, however malformedRequests’s, internalError, sigRequired, unauthorised, and tryLater do not. Then OCSP requests can be watched for during our MiTM attack, and an appropriate 3 will be supplied. Meaning the browser never actually gets to check the validity of the certificate.

**

OCSP Defeated by the Number 3

**

I’m going to pick on firefox for little moment here, I must admit they react well and in a timely manner. NSS the library firefox uses was vulnerable to two other attacks that splinted off the null prefix attack.

It is possible to request a universal wild card for your domain, it costs a little extra. The idea is that a domain like google would only need to manage on cert, so they could request something like *.google.com. The way that NSS varified wildcards enabled Moxie to request from the CA’s and was issued an X509 cert for the common name;

*.\0.thoughtcrime.org

Firefox would then check this and validate any site with it. So the same certificate could be used to catch, gmail, facebook, paypal, ebay, amazon just to name a few. This was named a Universal Wild Card Certificate as you only needed one to intercept anything on Firefox.

**

Which then led to probably the most scary part of this attack as a platform. Think of a piece of software on your system, that contacts a server out on the Internet, this server will tell it to download an unsigned data blob and run it, conducted over SSL/TLS. I have described to you the process of auto-updates on firefox, which is turned on by default. The same process is also used for firefox addon-s.

We could in theroy upgrade the vulnerable firefox, to a non-vulnerable version of firefox, of course embedding our own root CA certificate. We could also bind it with a number of other nasty surprises such as boot and rootkits keyloggers, or something crazy like wubi.exe install for windows.

**

I think it important to mention here that the tools for preforming these attacks are released under the GPL Version 3, and you are free to download and examine the code. It is available from Moxie’s website www.thoughtcrime.org in the Software Section

Sslsniff has been updated to support Null Prefix Certificates, including the universal wildcard certificate, OCSP Denial, Firefox Auto-Update hijacking. I managed to get it working on Ubuntu 8.10 I haven’t tried it on anything other than 9.10. Your free to try it on any platform.

**

SCREEN SHOTS

**

So in closing tonight I hope that I have demonstrated how the Null Prefix Attack is deployed, enlightened you to potential targets for attackers with this attack, potential payloads that can be deployed, OCSP being defeated, and software that you can try at home.

Any Questions

End of Notes

Slides Available

Here – PDF

Here – PPT

Here – ODP

As i have said when the audio and video are available from the flash talk then i’ll post

Finux

Moxie Marlinspike’s Null Prefix Attack – Deafening SSL/TLS

Linux Society Flash Talk

19th September 2009

By Arron Finnon

Good evening ladies and gentleman, my name is Arron Finnon and I will be talking to you this evening about Moxie Marlinspike’s Null Prefix Attack. Ever since I first heard about this attack I have been fascinated by it. I was also lucky enough to interview the security researcher who discovered this particular attack.

**

The talk should outline and you should hope to know the following by the end;

What is the Null Prefix Attack

What are SSL Implementations

What is Online Domain Validation

The process used in Certificate requests and revocations

What a Universal Wild Card Cert is

And how OCSP was defeated

**

My intro

So tonights aim is for me to give you a crash course in this particular attack, and the vulnerability it exploits its only suppose to wet your appetite. I will give you a couple of web addresses and suggestions at the end if you want to know more. This one is going to be a tight squeeze to fit it in to 10 minutes, I have a lot of ground to cover in very little time but I think I should just about do it.

**

So in short tonights talk focuses on an implementation vulnerability in the secure protocol SSL/TLS, which was left unpatched on some operating systems for well over 10 weeks. At its heart the null prefix attack had the potential ability for an attacker to intercept and decrypted secure browser traffic, reading usernames and passwords entered for sites such as paypal, gmail, facebook without them or their users knowing. SSL/TLS had been effectively broken not just in browsers, but in vast arrays of software that is dependent on SSL/TLS implementations. All though this attack has predominately been patched i’m not going to imply that there still isn’t a real world threat from this, however its more than likely that this threat will fade away over time.

In October 2009 nearly 2% of Firefox users where running a vulnerable version of Firefox, which may not sound like a big number, but when you look at Firefox having a 47% market share for that same month it starts to become a vast number. In addition most of Microsoft’s product range where vulnerable during the first half of October too. In fact Microsoft took an astonishing 10 weeks to fix the problem.

**

In laying the ground work I want to very quick touch on what TLS and its predecessor SSL is, and where it is in common use today. However it is not my aim for this to be a definitive guide, but just a referencer, if you decide to find out more about SSL/TLS there is a lot of content about it available.

In short Transport Layer Security or TLS and Secure Socket Layer or SSL, are a cryptographic protocols, who’s aim is to provide security for communications over networks such as the Internet. The protocols are in widespread use in applications such as web browsers, email, instant messaging, VoIP, and some VPN’s. TLS is based on the earlier SSL specifications developed by Netscape Corporation.

TLS allows client/server programs to communicate over networks in method that makes eavesdropping, data tampering and message forgery hard to accomplish. In a typical deployment such as a web browser, TLS authentication is unilateral: which means that only the server is authenticated. The client knows the server’s identity, the client remains unauthenticated

So a simple TLS handshake where the server is authenticated by its certificate would work like so;

**

A negotiation phase would start with a client sending a ClientHello message, in that message the client will inform the server of the TLS protocol versions it supports, a random number, list of preferred cyphers and compression methods.

The server then responds with a ServerHello message, and within that message the chosen TLS protocol version, a random number, and the selected cypher suite and compression method. It may also contain a session ID to preform resumed handshakes. The server will then send a certificate message, followed by a ServerHelloDone, indicating that the negotiation phase has finished.

The client then responds with a ClientKeyExchange message, which contains a PreMasterSecret and a public key. Both the client and the server use the random numbers from the negotiation phase, and the PreMasterSecret to compute a common “master secret”. Key Data for this connection will be derived from the master secret and the random numbers generated earlier, which is passed through a pseudo-random function which has been carefully designed.

The client will then send a ChangeCipherSpec record informing the server that all communication will be authenticated. The client will then follow this up with an authenticated and encrypted Finished Message which contains the hash of the previous handshake message. The server will try and decrypt the client’s Finished message and match the Hash, if the server fails to verify the hash then the handshake will be considered failed and the connection torn down. The server will follow up by sending a ChangeSipherSpec to the client, informing the client that everything now passed to you from me will be authenticated, and a Finished Message encrypted with the hash of the previous message, the client will then attempt to decrypt and verify.

**

The certificates that are generally used in browsers is the X.509 type, and its a crucial part to how the null prefix attack is implemented. The X.509 is a standard for public key infrastructure also known as PKI, it has standard formats for public key certificates and, certificate revocation lists.

X.509 was initially issued on July the 3rd, 1988 and was in association with the X.500 standard. It assumes a strict hierarchical system of certificate authorities (CAs) for issuing the certificates. In the X.509 system, a CA issues a certificate binding a public key to a particular Distinguished Name as was before in the X.500 tradition, however it can also be to an Alternative Name such as an e-mail address or a DNS-entry. Browsers such as Internet Explorer, Netscape/Mozilla, Opera and Safari come with root certificates pre-installed, so SSL certificates from larger vendors will work instantly; in effect the browsers’ developers determine which CAs are trusted third parties for the browsers’ users. Although these root certificates can be removed or disabled, users rarely do so. X.509 as I have also mentioned includes standards for certificate revocation list (CRL) implementations. The IETF-approved way of checking a certificate’s validity is the Online Certificate Status Protocol (OCSP). Firefox 3 enables OCSP checking by default.

Defeating OCSP is also a key aspect of this attack, however I will discuss it a little later

**

If we look at the X.509 structure for a digital certificate, it is as follows;

  • Certificate

    • Version

    • Serial Number

    • Algorithm ID

    • Issuer

    • Validity

      • Not Before

      • Not After

    • Subject

    • Subject Public Key Info

      • Public Key Algorithm

      • Subject Public Key

    • Issuer Unique Identifier (Optional)

    • Subject Unique Identifier (Optional)

    • Extensions (Optional)

  • Certificate Signature Algorithm

  • Certificate Signature

**

Now for the SSL/TLS protocol it is “common name” field within the Subject field that is used to identify servers presenting certificates over the Internet. So when paypal request a certificate they will list www.paypal.com, if ebay request a certificate they will list www.ebay.com, and of course if I where requesting a certificate then I would list www.finux.co.uk.

When requesting a Certificate Signing Request to a Certificate Authority also known as a CA, the request is validated by establishing ownership of the domain. This can be as simple as checking the WHOIS database of the root domain and sending an confirmation email to the details listed. So in our example the CA would look up the root domain for www.ebay.com, which of course is ebay.com, and we would find the administration email is host...@ebay.com. Confirmation request is sent to them informing them that a request for a certificate has been made and could they please confirm the request.

Only the root domain is looked up and everything else is ignored by the CA, its an automated process. So we can register anything in the common name in the subject field and only the root domain is checked and validated, so we could request foobar.finux.co.uk, certificate.authorities.suck.finux.co.uk, even this.subdomain.is.fictional.finux.co.uk and all CA would see and validate is finux.co.uk.

It is at this point that the attack begins to take place. X509 certificates are formatted using ASN.1 notation, which supports lots of different string types. However all of them are represented in some variation of PASCAL. When in memory PASCAL strings are represented by a series of bytes, specifiying the length of the string, and then the string data. One character per byte. It is very important to pay attention to this being very different to how C reads a string, which is a series of bytes, one character per byte terminated by a single NULL character. In PASCAL NULL characters have no special meaning.

So we could be free to request www.paypal.com\0.finux.co.uk and the verification will be sent to finux.co.uk.

As we have earlier discussed with CA’s they tend to ignore everything before the root domain, and we are free to insert a NULL Character with in our request the NULL character has no special meaning in PASCAL.

However most modern SSL/TLS implementation will view the data from an X.509 certificate as an ordinary C string, using standard functions for comparisons and manipulation. One of the consequences of this is if we take our issued certificate with www.paypal.com\0.finux.co.uk in the CN field, in C the termination will happen at the Null Character, so when we go to verify that the trusted CA cert used to identify www.paypal.com it will compare only the www.paypal.com part of our CN. This enables us amongst other things to deploy a man in the middle attack, and present to the client a valid signed cert by a CA, which will compare to to the site we’re eavesdropping on.

It is here where authenticity of SSL/TLS is defeated.

However the story really doesn’t end here, as I mentioned previously we still have the issues of Online Certificate Status Protocol to worry about, it was designed to be quick and effective way of revocation to CA signed certificates. So it would be easy for the CA to check its records and find certificates that contained NULL characters.

OCSP was designed to support a light weight requests from the clients who have been presented with a certificate that they haven’t seen before, or recently. Within each CA signed certificate is an OSCP url for the issuer, which browsers like firefox will quickly check before accepting the certificate.

This could be fatal when deploying a Null Prefix Certificate in a MiTM (Man in The Middle) attack, if the CA has revoked our certificate.

However Moxie Marlinspike who discovered the Null Prefix Attack, also managed to defeat OCSP with similar easy. It is not far to say this whole protocol has been defeated by one single byte

After studying the response codes, Moxie has noticed that the code 3 which informed the browser to check the OCSP URL later did not generate any negative indicators on the browsers, and would continue. During that he discovered that ResponseByte structure had a signature from the CA which would be hard to forge, but that signature only covered ResponseData which is an optional. It however doesn’t cover the ResponseStatus.

Enumeration of the OCSPResponseStatus followed;

**

successful (0)

malformedRequest (1)

internalError (2)

tryLater (3)

sigRequired(5)

unauthorised (6)

Successful response would be hard to sign the subsequent ResponseData, however malformedRequests’s, internalError, sigRequired, unauthorised, and tryLater do not. Then OCSP requests can be watched for during our MiTM attack, and an appropriate 3 will be supplied. Meaning the browser never actually gets to check the validity of the certificate.

**

OCSP Defeated by the Number 3

**

I’m going to pick on firefox for little moment here, I must admit they react well and in a timely manner. NSS the library firefox uses was vulnerable to two other attacks that splinted off the null prefix attack.

It is possible to request a universal wild card for your domain, it costs a little extra. The idea is that a domain like google would only need to manage on cert, so they could request something like *.google.com. The way that NSS varified wildcards enabled Moxie to request from the CA’s and was issued an X509 cert for the common name;

*.\0.thoughtcrime.org

Firefox would then check this and validate any site with it. So the same certificate could be used to catch, gmail, facebook, paypal, ebay, amazon just to name a few. This was named a Universal Wild Card Certificate as you only needed one to intercept anything on Firefox.

**

Which then led to probably the most scary part of this attack as a platform. Think of a piece of software on your system, that contacts a server out on the Internet, this server will tell it to download an unsigned data blob and run it, conducted over SSL/TLS. I have described to you the process of auto-updates on firefox, which is turned on by default. The same process is also used for firefox addon-s.

We could in theroy upgrade the vulnerable firefox, to a non-vulnerable version of firefox, of course embedding our own root CA certificate. We could also bind it with a number of other nasty surprises such as boot and rootkits keyloggers, or something crazy like wubi.exe install for windows.

**

I think it important to mention here that the tools for preforming these attacks are released under the GPL Version 3, and you are free to download and examine the code. It is available from Moxie’s website www.thoughtcrime.org in the Software Section

Sslsniff has been updated to support Null Prefix Certificates, including the universal wildcard certificate, OCSP Denial, Firefox Auto-Update hijacking. I managed to get it working on Ubuntu 8.10 I haven’t tried it on anything other than 9.10. Your free to try it on any platform.

**

SCREEN SHOTS

**

So in closing tonight I hope that I have demonstrated how the Null Prefix Attack is deployed, enlightened you to potential targets for attackers with this attack, potential payloads that can be deployed, OCSP being defeated, and software that you can try at home.

Any Questions

Robert “Swifty” Ladyman – Software Freedom Day Dundee 2009 – Free Software In Business

November 6th, 2009

Well sorry dude’s to blog spam once again, however I’m playing catch up and i have had two shows out on HackerPublicRadio.Org recently.  Well when i say i have had two that’s not quite true.  Robert Ladyman from File-Away Ltd, recently gave a fantastic and insightful talk at this years Software Freedom Day Dundee 2009.  Robert’s use of Free and Open Source Software, in the business environment has given him an expertise which lucky enough he agreed to share with us.

The talk is aimed at everyone, and is not one of technical spiel but of good advice.  I recommend if you did not make it Software Freedom Day Dundee Event, that you download and listen to this fantastic talk.

Robert’s company can be found at www.file-away.co.uk

A .mp3 version of the show can be downloaded from here

Interviewing Ryan Dewhurst

November 6th, 2009

Hi Guys,

Well guys, another post and another HackerPublicRadio.Org show out.  I’m a little slow at writing this post, but hey real life being what it is i’m sure all of you can appreciate this happens from time to time.  I’m very happy to announce that i spoke to Ryan Dewhurst from the Damn Vulnerable Wep App (DVWA) project last month, about his project and his time studying Ethical Hacking.

All though the interview was done a couple of weeks ago, Ryan’s project has had a version release in that time, mainly due to DVWA being bundled with Samurai WTF.

Ryan is an interesting guy, and its nice to see that the UK ethical hacking scene is alive and kicking.  His project is one of education and everyone i have spoken to about it has commented on what a nice idea it is.  For my opinion i think it goes a long way in helping people understand the the threats faced by many web app owners.

Ryan also has a nice blog that can be found at www.ethicalhack3r.co.uk and his project can be found at www.dvwa.co.uk

The A .mp3 version of the podcast can be downloaded from Here

Thanks Ryan for the great interview

Andrej Hajto’s SFDDundee2009 talk out

October 23rd, 2009

Hi guys,

Well just to give you all the heads up, one of the talks from our successful Software Freedom Day Dundee 2009 even http://hackerpublicradio.org/eps.php?id=0471t

The talk was by Andrej Hajto, and he discuss VoIP and h323.  He also discuss some security issues with the protocol.  It was a very interesting talk, and i hope you all enjoy it.

Direct Download

Mp3 Version

Ogg Version

The Project Formally Known As AutoNessus

October 17th, 2009

Howdie Folks,

Well as promised trying to be proactive with my blogging, but hey I’m here and doing it so enough with the self bitching.

I have some truly awesome news for the HackerPublicRadio.Org show 467, Frank “@AutoNessus” Breedijk came on to a call with me, to discuss his project AutoNessus.

AutoNessus is a program designed to help with regular vulnerabilities scans, and it enables the user the ability to manage the reporting of discoveries.  Its original concept was designed to help Frank, with Nessus scans, and then with all great stories he opened it up and released it to the world (i believe his employers are very supportive of this).  However i think its fair to say that the program has grown beyond its original design, and now is supporting more than just Nessus.

AutoNessus is currently being re-written, and a whole new version change is coming.  With plans to support more and more scanning tools.  It looks like AutoNessus is going to be a rocking ethical hacking tool.  With these changes its time to remove the pegging of the term AutoNessus, implies.  Namely its for Nessus (now AutoNessus is in no way connected with Tenable, the owners of the Nessus program and brand.).

Frank is a true gentleman and i have grown very fond of him and his project, and i always love the chance to shoot the breeze with him, so when he asked if there was anyway that HackerPublicRadio.Org audience could help, the natural answer was lets do a show.  This is the result of it.

So Frank has asked everyone at HackerPublicRadio.Org (and the rest of the Internet world), to please have a think about what AutoNessus should be renamed to and supply him suggestions.  He during his forth coming talk at Confidence Poland in mid November will announce the new name of the project.  The winner of the best suggestion also has a bottle of champagne coming their way.

The name must be free for Frank to use, and the suggestion being made is being made knowing that the name will be used for the project, so all rights to that name will be waived by the person making the suggestion.  That the URL should be available, apart form that he’s open to ideas.

You can contact Frank in numerous ways they are listed below;

www.autonessus.com/contact-us

www.twitter.com/autonessus

or suggestions AT autonessus DOT com

and for the awesome rename movie (a little tongue in cheek) www.tinyurl.com/renamemovie

Catch Frank at www.cupfighter.net

www.autonessus.com

The show can be downloaded here

I think i’ll submit a suggestion of FiMoT (FindMoreTime)

Moxie Marlinspike Interview Out

October 14th, 2009

Hi Guys,

Sure most people have heard but the Moxie Marlinspike interview was released yesterday, he’s had a pretty strange week or so.  As you guys also know he had his PayPal account suspended, more on that story can be found here.

I’m also pretty glad to say that the CryptoAPI was patched this week, 10 weeks or so after the disclosure of the the Null Prefix Attack.  I’ve heard a few argue that this is probably a lot to do with some wild-card certs being out in the wild (all though not from Moxie).

The mp3 version of the show can be downloaded from here

The ogg version of the show can be downloaded from here

My previous blog post on the interview can be found here