<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Security Research by Alexander Sotirov</title>
  <link href="http://www.phreedom.org/" rel="alternate" type="text/html"/>
  <link href="http://www.phreedom.org/blog/atom.xml" rel="self" type="application/atom+xml"/>
  <updated>2011-02-09T21:29:26Z</updated>
  <author>
    <name>Alexander Sotirov</name>
    <email>alex@sotirov.net</email>
  </author>
  <id>tag:www.phreedom.org,2008-09-15:/</id>
  <entry>
    <title>Assured Exploitation 2011</title>
    <link href="http://www.phreedom.org/blog/2011/assured-exploitation-2011/" rel="alternate" type="text/html"/>
    <id>tag:www.phreedom.org,2011-02-09:blog/2011/assured-exploitation-2011/</id>
    <published>2011-02-09T21:29:26Z</published>
    <updated>2011-02-09T21:29:26Z</updated>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>This year Dino Dai Zovi and I are teaching our <a href="http://cansecwest.com/dojos/2011/csw_2_04.1.html" class="external">Assured Exploitation</a>
class again at the CanSecWest conference. This is a two day training on March
7-8, focusing on on the advanced exploitation techniques required for
developing state of the art exploits for the latest Windows 7 systems.</p>
        <p>Why do we feel that this course is necessary? Many security professionals
have mastered stack overflows and heap spraying, but these techniques are
no longer sufficient for developing exploits in 2011. Reliable
exploitation on Vista and Windows 7 requires advanced techniques such as heap
layout manipulation, return oriented programming and ASLR information leaks. In
addition, robust exploitation necessitates repairing the heap and continuing
execution without crashing the process. The goal of our Assured Exploitation
course is to teach the principles behind these advanced techniques
and give the students hands-on experience developing real-world exploits.</p>
        <p>Here is a list of the topics that we indend to cover in the 2011 edition of the class:</p>
        <ul>
	<li>in-depth review of GS, ASLR, DEP, SafeSEH and SEHOP exploitation mitigations</li>
	<li>heap implementation details and manipulation of the heap state (including Windows 7)</li>
	<li>building primitives for heap layout control in new applications</li>
	<li>bypassing DEP and ASLR</li>
	<li>return oriented programming and shellcode development</li>
	<li>implementing a universal bypass of DEP and ASLR in Internet Explorer 8</li>
	<li>multistage stack pivots</li>
</ul>
        <p>The training will be based on a series of hands-on exercises that will
incrementally guide the students through building their own exploits for
the recent Aurora vulnerability, with capabilities far exceeding those of the
publicly available samples. At the end of the course, the students will have
the skills to reliably exploit Internet Explorer 8 on Windows 7 with both ASLR
and DEP enabled.</p>
        <p>To register for the course, please visit the <a href="http://cansecwest.com/dojos/2011/csw_2_04.1.html" class="external">CanSecWest</a>
website. We encourage you to register early because the class size is limited
and prices are going up next month.</p>
      </div>
    </summary>
  </entry>
  <entry>
    <title>You Should Work for Symantec</title>
    <link href="http://www.phreedom.org/blog/2011/you-should-work-for-symantec/" rel="alternate" type="text/html"/>
    <id>tag:www.phreedom.org,2011-01-10:blog/2011/you-should-work-for-symantec/</id>
    <published>2011-01-10T23:54:55Z</published>
    <updated>2011-01-10T23:54:55Z</updated>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>This video perfectly describes the life of an independent security
researcher. I hope you like it.</p>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="640" height="385">
          <param name="allowFullScreen" value="true"/>
          <param name="allowscriptaccess" value="never"/>
          <param name="movie" value="http://www.youtube.com/v/pzcLTPy8yDQ?fs=1&amp;hl=en_US"/>
<!--[if gte IE 7]> <!-->
          <object type="application/x-shockwave-flash" data="http://www.youtube.com/v/pzcLTPy8yDQ?fs=1&amp;hl=en_US" width="640" height="385">
            <param name="allowFullScreen" value="true"/>
            <param name="allowscriptaccess" value="never"/>
            <param name="movie" value="http://www.youtube.com/v/pzcLTPy8yDQ?fs=1&amp;hl=en_US"/>
<!--<![endif]-->
            <div class="alternate">
        <p>To view this video, go to <a href="http://www.youtube.com/watch?v=pzcLTPy8yDQ" class="external">YouTube</a></p>
    </div>
<!--[if gte IE 7]> <!-->
          </object>
<!--<![endif]-->
        </object>
      </div>
    </summary>
  </entry>
  <entry>
    <title>CSAW final reverse engineering challenge</title>
    <link href="http://www.phreedom.org/blog/2010/csaw-final-challenge/" rel="alternate" type="text/html"/>
    <id>tag:www.phreedom.org,2010-11-06:blog/2010/csaw-final-challenge/</id>
    <published>2010-11-06T05:03:58Z</published>
    <updated>2010-11-06T05:03:58Z</updated>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>The final round of the CSAW CTF competition took place on October 29th in
New York and included a reverse engineering challenge I created specifically
for this event. Since the teams in the qualifying round showed some pretty
impressive reversing talent, I tried to make the final harder. Much harder. So
hard that in fact not a single team solved the challenge.</p>
        <p>If you'd like to try, you can download the <a href="http://www.phreedom.org/blog/2010/csaw-final-challenge/CSAW-FINAL-SOTIROV.RAR">CSAW-FINAL-SOTIROV.RAR</a> archive, which
contains an installer for a modified version of Adobe Reader 9.2 and a PDF
file. Once you extract the files, follow the instructions below:</p>
        <ol>
	<li><p>Install AdbeRdr910_bg_BG.msi. This is a slighly modified
	version of Adobe Reader with some extra functionality.</p></li>

	<li><p>Open CSAW.pdf and enter a key in the form. If the key is
	correct, Adobe Reader will pop up a message box to congratulate
	you.</p></li>
</ol>
        <p>Your goal is to find the modifications in Adobe Reader and find the key that
brings up the message box. If solve the challenge, I would appreciate it if you
post a description of how you solved it and email me to let me know.</p>
      </div>
    </summary>
  </entry>
  <entry>
    <title>CSAW reverse engineering challenge</title>
    <link href="http://www.phreedom.org/blog/2010/csaw-reversing-challenge/" rel="alternate" type="text/html"/>
    <id>tag:www.phreedom.org,2010-09-25:blog/2010/csaw-reversing-challenge/</id>
    <published>2010-09-25T23:09:41Z</published>
    <updated>2010-09-25T23:09:41Z</updated>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>NYU Poly is one the schools with the best information security programs in
the United States, with strong connections to the security community in the New
York area. Together with Dino Dai Zovi, Erik Cabetas, Marcin Wielgoszewski and
other NYC hackers I helped create a set of challenges for the CTF
competition during the <a href="http://www.poly.edu/csaw">Cyber-Security
Awareness Week</a>.</p>
        <p>The <a href="http://128.238.66.100/index.html">CTF</a> started this Friday
and will be open until 8pm on Sunday. Anyone is welcome to play, but even if
you don't want to register you can still download the challenges and try to
solve them. My reverse engineering challenge is called
<a href="http://www.phreedom.org/blog/2010/csaw-reversing-challenge/KFJSCGEH.EXE">KFJSCGEH.EXE</a>
and is worth 500 points.</p>
        <p>Your goal is to find the magic incantation that will cause the program to
display a message box with the secret key.</p>
      </div>
    </summary>
  </entry>
  <entry>
    <title>Darknet design</title>
    <link href="http://www.phreedom.org/blog/2010/darknet-design/" rel="alternate" type="text/html"/>
    <id>tag:www.phreedom.org,2010-08-03:blog/2010/darknet-design/</id>
    <published>2010-08-03T03:03:15Z</published>
    <updated>2010-08-03T03:03:15Z</updated>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Back in 2007 I spent some time playing with a design for a file sharing darknet.
It was never implemented, but I recently found my notes from that project and
decided to post them here in the hope that someone might find this useful.</p>
        <pre>
network size
    small darknet
        10-50 users
        full trust model
        but how do you prevent it from getting too big?
            it will degenerate into large scale unless you do friend of a friend
    multiple darknets
        5 x 10-50 users
        each user is a member of multiple networks
        no cross network identity or trust
    large scale friend of a friend network
        each user can see only their friends and friends of friends

user identities
    user id
    user SSL certificate

node identities
    IP address
    node SSL certificate
    all the above information is signed by the user SSL certificate

services provided by the darknet
    file sharing - GET requests over HTTPS
    messaging - XML-RPC over HTTPS, either direct or broadast

trust model (chosen by each user)
    everybody - as long as they are part of the network
    friends - only friends on your trust list
    friends of friends - single hop or multiple hops

join algorithm
    Alice invites Bob into the network
        Alice generates an invite key containing:
            SSL certificate for Alice
            temporary client SSL certificate for Bob, signed by Alice
            IP address of Alice's node
            expiration date
        Alice sends the invite key to Bob over an external secure channel
    Bob creates a new identity
        Bob connects to Alice using the temp SSL certificate from the invite key
            Bob authenticates Alice using her SSL certificate from the invite key
            Alice authenticates Bob by verifying his client SSL certificate
            if the invite is expired, Bob needs a new invite key
        Bob picks a user id and sends it to Alice
            if the user id is already taken, Bob has to try again with a new id
        Bob creates a permanent user SSL certificate and sends it to Alice
    Alice broadcasts the new user id and certificate to all other nodes
    Bob reconnects to Alice using his permanent client SSL certificate
    Bob gets the IPs and certificates of neighboring nodes from Alice

limited visibility of IPs
    connect only to servers you trust (need at least one, see join algorithm above)
    send your IP only to servers you trust
    your IP is forwarded to other servers only:
        if your trust model is everybody
            forwarded to everybody
        if your trust model is friend of a friend
            forwarded to their friends
        if your trust model is friends only
            no forwarding

threat model
    privacy
        get IPs that a specific user is communicating with
            attacker: ISP
            defense: random ssl traffic, no defense for high speed traffic
        get full user list
            attacker: rogue/compromised node
            defense: a node can see only friends of friends, not beyond that
        get full server list
            attacker: rogue/compromised node
            defense: a node can see only friends of friends, not beyond that
        get shares/files of user
            attacker: rogue/compromised node
            defense: per share permissions
        get records of transactions
            attacker: ISP
            defense: ssl
    disrupt network
        traffic filtering
            attacker: ISP
            defense: ssl on port 443, dedicated servers
        traffic throttling
            attacker: ISP
            defense: ssl on port 443
        DoS against network
            attacker: rogue/compromised node
            defense: none
</pre>
      </div>
    </summary>
  </entry>
  <entry>
    <title>Assured Exploitation training course at CanSecWest</title>
    <link href="http://www.phreedom.org/blog/2010/assured-exploitation-at-cansecwest/" rel="alternate" type="text/html"/>
    <id>tag:www.phreedom.org,2010-02-17:blog/2010/assured-exploitation-at-cansecwest/</id>
    <published>2010-02-17T22:50:29Z</published>
    <updated>2010-02-17T22:50:29Z</updated>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Dino Dai Zovi and I are going to teach a two day training course at the CanSecWest
conference in March of this year. Our course is titled <a href="http://cansecwest.com/dojoassured.html" class="external">Assured Exploitation</a>
and will focus on the advanced exploitation techniques required for
developing state of the art exploits for Vista and Windows 7 systems.</p>
        <p>Why do we feel that this course is necessary? Many security professionals
have mastered stack overflows and heap spraying, but these techniques are
no longer sufficient for developing exploits in 2010. Reliable
exploitation on Vista and Windows 7 requires advanced techniques such as heap
layout manipulation, return oriented programming and ASLR information leaks. In
addition, robust exploitation necessitates repairing the heap and continuing
execution without crashing the process. The goal of our Assured Exploitation
course is to teach the principles behind these advanced techniques
and give the students hands-on experience developing real-world exploits.</p>
        <p>Here is a list of the topics that we indend to cover:</p>
        <ul>
	<li>in-depth review of GS, ASLR, DEP, SafeSEH and SEHOP exploitation mitigations</li>
	<li>heap implementation details and manipulation of the heap state (including Windows 7)</li>
	<li>building primitives for heap layout control in new applications</li>
	<li>bypassing ASLR through memory disclosure</li>
	<li>browser plugin exploitation in Internet Explorer, Firefox and Chrome</li>
	<li>return oriented programming and shellcode development</li>
	<li>repairing the heap and achieving continuation of process execution after the payload is executed</li>
</ul>
        <p>The training will be based on a series of hands-on exercises that will
incrementally guide the students through building their own exploits for
the recent Aurora vulnerability, with capabilities far exceeding those of the
publicly available samples. At the end of the course, the students will have
the skills to reliably exploit Internet Explorer 8 on Windows 7 with both ASLR
and DEP enabled.</p>
        <p>To register for the course, please visit the <a href="http://cansecwest.com/dojoassured.html" class="external">CanSecWest</a>
website. We encourage you to register early because the class size is limited
and prices are going up next month.</p>
      </div>
    </summary>
  </entry>
  <entry>
    <title>Verisign and responsible disclosure</title>
    <link href="http://www.phreedom.org/blog/2009/verisign-and-responsible-disclosure/" rel="alternate" type="text/html"/>
    <id>tag:www.phreedom.org,2009-01-06:blog/2009/verisign-and-responsible-disclosure/</id>
    <published>2009-01-06T20:36:24Z</published>
    <updated>2009-01-06T20:36:24Z</updated>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>In a recent <a class="external" href="https://blogs.verisign.com/ssl-blog/2008/12/on_md5_vulnerabilities_and_mit.php">post</a>
on his company blog, Verisign's vice president of marketing Tim Callan commented on the disclosure
of our <a href="http://www.phreedom.org/research/rogue-ca/">MD5 collision attack</a>:</p>
        <div style="margin-left: 2em; font-style: italic;">
	<p>VeriSign did not receive any of [the] information ahead of the actual
	presentation, rendering it impossible for us to begin work on mitigating
	this issue prior to this morning.</p>
</div>
        <p>I feel that this statement is inaccurate. Not only did we contact Verisign
before our presentation to let them know about our research, we also strongly
advised them to stop using MD5 as soon as possible and were given a chance to
review their mitigation plans. I hope that Tim Callan's post is a result of a
simple miscommunication between the technical people at Verisign their
marketing department.</p>
        <p>To help clarify this issue, in this post I will provide some background
information about the disclosure of our work, as well as the exact timeline of
our communication with the affected certificate authorities.</p>
        <h4>Protecting Internet users</h4>
        <p>From the very beginning of this project, all members of our team agreed that
we needed to disclose this vulnerability without putting any users at risk.
There were two main goals we set out to achieve: first, to prevent our rogue CA
certificate from being abused; and second, to ensure that nobody else can repeat
this attack before the affected CAs get a chance to fix the problem.</p>
        <p>We took the following steps to prevent abuse of our rogue CA certificate:</p>
        <ul>
	<li>We did not release the private key for our rogue CA.</li>

	<li>We set the expiration date of the rogue CA certificate to August 2004,
	ensuring that even if the private key falls into the wrong hands, it will
	be useless against people who have their system date set correctly.</li>

	<li>We contacted the major browser vendors (Microsoft and Mozilla) to offer
	them a chance to explicitly blacklist our certificate if they felt that the
	past expiration date is not effective enough.</li>
</ul>
        <p>To make sure that our work could not be repeated by malicious attackers, we
did not release the MD5 collision finding software necessary to do the attack.
In addition, we chose to delay the publication of the improved collision
finding techniques we had to develop for this project. Our team was confident
that the R&amp;D investment required to repeat our attack without access to
this information would be prohibitive and the affected CAs would have enough
time to stop using MD5 before the attack could be repeated.</p>
        <h4>Notifying the affected certificate authorities</h4>
        <p>Since we had already taken steps to ensure that the attack could not be
easily repeated, notifying the affected certificate authorities before our presentation
was not required in order to protect Internet users. A more important consideration was
to ensure that we could present our work at the Chaos Computer Congress without
interference. In the last year we have seen multiple cases in which companies
have used legal threats in an attempt to silence security researchers and
prevent the release of information that exposes their security failures. The
most prominent examples include the <a href="http://www.freedom-to-tinker.com/blog/felten/transit-card-maker-sues-dutch-university-block-paper" class="external">lawsuit</a>
against Dutch researchers who showed fatal security flaws in the MIFARE transit
cards and the <a href="http://blog.wired.com/27bstroke6/2008/08/injunction-requ.html" class="external">restraining
order</a> that led to the cancelation of a talk about vulnerabilities in the
fare collection system of the Boston subway.</p>
        <p>Since the affected CAs did not have a significant track record of responding
to public security vulnerabiltiies in their systems, we could not be confident
that they wouldn't overreact and attempt to stop or delay our presentation
through legal or other means. It was this feeling of uncertainty that led to
our decision to avoid direct contact with them and to obtain Non-Disclosure
Agreements from the browser vendors we contacted.</p>
        <p>Recognizing the significance of the issue, Microsoft offered to act as a
intermediary and contact the affected CAs on our behalf without revealing our
names or the date of our presentation. Their proposal was reviewed by our team
as well as our lawyers and on Dec 23 we agreed to go ahead with it:</p>
        <div style="margin-left: 2em;">
<pre>
<span style="font-weight: bold;">Date: Tue, 23 Dec 2008 05:21:07 -0500
From: Alexander Sotirov &lt;alex@sotirov.net&gt;
To: Microsoft Security Response Center &lt;secure@microsoft.com&gt;</span>

All of the team members agreed with the proposed plan, you can go ahead and
contact Verisign. Thanks for the help with this issue.

Here are the details that you can reveal to Verisign:

1) point them to the 2007 paper that describes the generation of colliding x509
   certificates: http://www.win.tue.nl/hashclash/TargetCollidingCertificates/

2) tell them that Microsoft has been made aware that this crypto attack has been
   improved and some practical limitations have been worked out, allowing the
   successful generation of colliding x509 certificates signed by real
   certificate authorities which still use MD5

3) tell them that RapidSSL and FreeSSL (also owned by Geotrust) use MD5 and
   are vulnerable to this attack

4) encourage them to move to SHA-1 for all new certificates asap

5) it is important to stress that this attack is a generic attack against
   CAs that use MD5 and not specifically targeting Verisign. They have a
   good PR opportunity to react quickly and fix the bug before other CAs
   They don't want to be the _last_ CA that uses MD5 :-)

If they request additional information from us, please pass the request along
and we'll try to help with what we can. You can call me directly at
XXX-XXX-XXXX if rapid response is required. We would be happy to chat with
Verisign directly on Dec 30, but we'd like to avoid direct contact until then.
</pre>
</div>
        <p>The same day Microsoft contacted Verisign and informed them about our
research. Verisign understood the severity of the issue and began working on
it:</p>
        <div style="margin-left: 2em;">
<pre>
<span style="font-weight: bold;">From: Microsoft Security Response Center &lt;secure@microsoft.com&gt;
To: Alexander Sotirov &lt;alex@sotirov.net&gt;
Date: Tue, 23 Dec 2008 13:18:09 -0800</span>

We spoke to Verisign this morning, and essentially used your last e-mail as
a script to introduce them to the issue. We also passed along the roots they
own which you identified as affected, and they are reviewing their next steps
right now. They understood the severity of the issue and are taking it
seriously. At this point in time they did not have any further requests for
information.

They were however surprised by the ssl123 certificate: they claim these are
all issued using sha1. The ip address you listed for that certificate is no
longer live, and the hostname in the CN is using another Verisign certificate.
Would you mind if I pass along the subject and issuer information for them to
progress their validation?
</pre>
</div>
        <p>I was happy to help Verisign by providing extra information about the
SSL123 certificate in question. I also gave Microsoft permission to contact
the other affected CA:</p>
        <div style="margin-left: 2em;">
<pre>
<span style="font-weight: bold;">Date: Tue, 23 Dec 2008 19:38:09 -0500
From: Alexander Sotirov &lt;alex@sotirov.net&gt;
To: Microsoft Security Response Center &lt;secure@microsoft.com&gt;</span>

<span style="color: #990000;">&gt; They were however surprised by the ssl123 certificate: they claim these are
&gt; all issued using sha1. The ip address you listed for that certificate is no
&gt; longer live, and the hostname in the CN is using another Verisign
&gt; certificate. Would you mind if I pass along the subject and issuer
&gt; information for them to progress their validation?</span>

I have the original cert from that website. I've attached a zip file with all 5
Thawte MD5 certs that I found in the wild, including the SSL123 one. It's a
bit disconcerning that the CAs themselves don't know what algorithms they are
using.

You can give Verisign these certs, I collected them from public websites so
they are not secret in any way.

<span style="color: #990000;">&gt; The RSA root you listed is in fact also owned by Verisign, so they are
&gt; investigating that one as well. There is one other root which belongs to
&gt; another company, being Chosen Security/TC TrustCenter AG. We tentatively have
&gt; a call scheduled with them tomorrow morning at 8 AM PST. If you can confirm
&gt; that we can communicate the same information to them, this would be
&gt; excellent.</span>

Yes, you can communicate the same information to them.
</pre>
</div>
        <p>On Dec 24, Microsoft requested permission to release more information
to the CAs:</p>
        <div style="margin-left: 2em;">
<pre>
<span style="font-weight: bold;">From: Microsoft Security Response Center &lt;secure@microsoft.com&gt;
To: Alexander Sotirov &lt;alex@sotirov.net&gt;
Date: Wed, 24 Dec 2008 09:09:15 -0800</span>

One of the two certificate authorities got back to us and stated they will be
changing their engineering efforts to SHA1 within a *very short* timeframe. We
are literally talking days/weeks here. This is still going to be after your
presentation date. However, they are asking us specifically whether this
timeframe will be acceptable.

We cannot answer any questions on this for now - we are only the "voice box" in
between here. I do feel you should be giving them at least some nod in the
direction that they will still not make it in time, but also that this is not
very critical.

Could I have your permission to release the following statement to them:

"Hi [name],

The finder informed us they will likely take this issue public prior to [your
proposed switch date].  However, he wanted us to convey to you that they will
only be demonstrating that the generation of an “evil twin” certificate is
possible. They will not disclose their collision seeking algorithm, nor will
they be releasing any Proof of Concept code. Given the significant amount of
cryptographic research involved, they feel that their results will not be
repeatable for at least some time. They do plan on releasing a full research
paper on their method, but this will definitely be released much later than
your proposed switch time.

As such they don't feel that making this change will directly affect your
customers. They do think the level of responsiveness you are showing would be a
positive PR opportunity for your organization."

As this statement essentially conveys your plans and opinion, please feel free
to propose any other one with your team or make changes where you deem
necessary.
</pre>
</div>
        <p>I promptly agreed to the proposed statement, with some minor edits:</p>
        <div style="margin-left: 2em;">
<pre>
<span style="font-weight: bold;">From: Alexander Sotirov &lt;alex@sotirov.net&gt;
To: Microsoft Security Response Center &lt;secure@microsoft.com&gt;
Date: Wed, 24 Dec 2008 14:04:40 -0500</span>

<span style="color: #990000;">&gt; "Hi [name],
&gt;
&gt; The finder informed us they will likely take this issue public prior to [your
&gt; proposed switch date]. However, he wanted us to convey to you that they will
&gt; only be demonstrating that the generation of an “evil twin” certificate is
&gt; possible. They will not disclose their collision seeking algorithm, nor will
&gt; they be releasing any Proof of Concept code. Given the significant amount of</span>

make this "...releasing the software that implements the collision generation."

<span style="color: #990000;">&gt; cryptographic research involved, they feel that their results will not be
&gt; repeatable for at least some time. They do plan on releasing a full research
&gt; paper on their method, but this will definitely be released much later than
&gt; your proposed switch time.</span>

add "They will wait until all CAs have completed the move to SHA-1 before publishing
the details necessary to repeat the attack."

<span style="color: #990000;">&gt; As such they don't feel that making this change will directly affect your
&gt; customers. They do think the level of responsiveness you are showing would be
&gt; a positive PR opportunity for your organization."</span>

I agree with this statement. You can share it with all affected CAs.

Alex
</pre>
</div>
        <p>On Dec 29, Verisign confirmed that they are planning to stop using MD5
by the end of January.</p>
        <div style="margin-left: 2em;">
<pre>
<span style="font-weight: bold;">From: Microsoft Security Response Center &lt;secure@microsoft.com&gt;
To: Alexander Sotirov &lt;alex@sotirov.net&gt;
Date: Mon, 29 Dec 2008 13:45:25 -0800</span>

Hi Alexander,

Here is more feedback and contact information from Verisign:

"The SSL123 certs using MD5 are through a legacy reseller platform we are in
the process of EOL'ing.  We do still have resellers using it so will need to
make updates to that platform as well.

We are working on making system changes to stop using MD5. They won't all be in
place by January 5th, but will be by the end of January. From what I am reading
below, the key thing seems to be that we are taking measures to stop using MD5
in the short term - so our plan to have all system changes in place by the end
of January should be Ok. Would you agree?

As far as contacts, from a technical point of view they can contact me. My
information, including cell is below. From a PR standpoint, the best person to
contact is Tim Callan - his email address is xxxxxxxx@verisign.com and direct
line is XXX-XXX-XXXX and cell is XXX-XXX-XXXX. An alternative contact for PR if
you can't reach Tim is Tina Hou (xxxxxxxx@verisign.com). She reports directly
to Tim.

Jay Schiavo
xxxxxxxx@verisign.com
Direct: XXX.XXX.XXXX
Mobile: XXX.XXX.XXXX"
</pre>
</div>
        <p>Only 5 hours after our presentation, Verisign <a href="https://press.verisign.com/easyir/customrel.do?easyirid=AFC0FF0DB5C560D3&amp;version=live&amp;prid=463259&amp;releasejsp=custom_97" class="external">stopped</a> 
using MD5 for all new RapidSSL certificates, successfully eliminating this
vulnerability.</p>
        <p>Cryptographic algorithms can become broken overnight, so it is important for
CAs to demonstrate the ability to react quickly to such issues. I'm happy with
the reponse from Verisign and the other affected CAs. Based on our experience
with them, I would not hesitate to work with them directly on any
vulnerabilties I might discover in the future.</p>
      </div>
    </summary>
  </entry>
  <entry>
    <title>Creating a rogue CA certificate</title>
    <link href="http://www.phreedom.org/blog/2008/creating-a-rogue-ca-certificate/" rel="alternate" type="text/html"/>
    <id>tag:www.phreedom.org,2008-12-30:blog/2008/creating-a-rogue-ca-certificate/</id>
    <published>2008-12-30T15:50:23Z</published>
    <updated>2008-12-30T15:50:23Z</updated>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>The details of our secret project are out! Our research team, consisting of 7
researchers from the United States, Switzerland and the Netherlands, was able to
execute a practical MD5 collision attack and create a rogue Certification Authority
trusted by all common web browsers. This allows us to perform transparent 
man-in-the-middle attacks against SSL connections and monitor or tamper with the
traffic to secure websites or email servers.</p>
        <p>The infrastructure of Certification Authorities is meant to prevent exactly
this type of attack. Our work shows that known weaknesses in the MD5 hash
function can be exploited in realistic attack, due to the fact that even after
years of warnings about the lack of security of MD5, some root CAs are still
using this broken hash function.</p>
        <p>For more details, see our <a href="http://www.phreedom.org/research/rogue-ca/">project website.</a></p>
      </div>
    </summary>
  </entry>
  <entry>
    <title>Making the theoretical possible</title>
    <link href="http://www.phreedom.org/blog/2008/making-the-theoretical-possible/" rel="alternate" type="text/html"/>
    <id>tag:www.phreedom.org,2008-12-29:blog/2008/making-the-theoretical-possible/</id>
    <published>2008-12-29T15:50:23Z</published>
    <updated>2008-12-29T15:50:23Z</updated>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Tomorrow a team of researchers I've been working with for the last 6 months
will <a href="http://events.ccc.de/congress/2008/Fahrplan/events/3023.en.html" class="external">present</a>
the results of a previously theoretical attack against important Internet
infrastructure that we've been able to execute in practice. I apologize for the
secrecy surrounding our talk, but we had good reasons for it and I hope that
people will understand when the <a href="http://www.phreedom.org/blog/2008/making-the-theoretical-possible/censored.jpg">details</a> are revealed tomorrow.</p>
        <p>The presentation will be at the Chaos Computer Congress in Berlin on Tuesday, December
30th. It will begin at 15:15 German time (6:15am in California, 9:15am in New
York) and will be <a href="http://events.ccc.de/congress/2008/wiki/Streaming" class="external">streamed
live</a> online.</p>
        <p>All our materials, including a full paper about our attack will be published
online shortly after the presentation.</p>
      </div>
    </summary>
  </entry>
  <entry>
    <title>Decompiling the vulnerable function for MS08-067</title>
    <link href="http://www.phreedom.org/blog/2008/decompiling-ms08-067/" rel="alternate" type="text/html"/>
    <id>tag:www.phreedom.org,2008-10-26:blog/2008/decompiling-ms08-067/</id>
    <published>2008-10-26T04:42:08Z</published>
    <updated>2008-10-26T04:42:08Z</updated>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>I spent a couple of hours tonight reversing the vulnerable code responsible
for the <a href="http://www.microsoft.com/technet/security/Bulletin/MS08-067.mspx" class="external">MS08-067</a> vulnerability. This bug is pretty interesting, because it is
in the same area of code as the <a href="http://www.microsoft.com/technet/security/Bulletin/MS08-067.mspx" class="external">MS06-040</a> buffer overflow, but it was completely
missed by all security researchers and Microsoft. It's quite embarassing.</p>
        <p>Here's the code of the vulnerable function on Windows XP SP3 and Vista SP1:</p>
        <pre>
#<span style="font-weight: bold; color: #5F9EA0">include</span> <span style="font-weight: bold; color: #BC8F8F">&lt;wchar.h&gt;</span>

<span style="font-style: italic; color: #B22222">// This is the decompiled function sub_5B86A51B in netapi32.dll on XP SP3
// and sub_6EA11D4D on Vista SP1
</span>
<span style="font-weight: bold; color: #228B22">int</span> <span style="font-weight: bold; color: #0000FF">ms08_067</span>(wchar_t* path)
{
    wchar_t* p;
    wchar_t* q;
    wchar_t* previous_slash = NULL;
    wchar_t* current_slash  = NULL;
    wchar_t  ch;

#<span style="font-weight: bold; color: #5F9EA0">ifdef</span> <span style="color: #B8860B">VISTA</span>
    <span style="font-weight: bold; color: #228B22">int</span> len = wcslen(path);
    wchar_t* end_of_path = path + len;
#<span style="font-weight: bold; color: #5F9EA0">endif</span>

    <span style="font-style: italic; color: #B22222">// If the path starts with a server name, skip it
</span>
    <span style="font-weight: bold; color: #A020F0">if</span> ((path[0] == L<span style="font-weight: bold; color: #BC8F8F">'\\'</span> || path[0] == L<span style="font-weight: bold; color: #BC8F8F">'/'</span>) &amp;&amp;
        (path[1] == L<span style="font-weight: bold; color: #BC8F8F">'\\'</span> || path[1] == L<span style="font-weight: bold; color: #BC8F8F">'/'</span>))
    {
        p = path+2;

        <span style="font-weight: bold; color: #A020F0">while</span> (*p != L<span style="font-weight: bold; color: #BC8F8F">'\\'</span> &amp;&amp; *p != L<span style="font-weight: bold; color: #BC8F8F">'/'</span>) {
            <span style="font-weight: bold; color: #A020F0">if</span> (*p == L<span style="font-weight: bold; color: #BC8F8F">'\0'</span>)
                <span style="font-weight: bold; color: #A020F0">return</span> 0;
            p++;
        }

        p++;

        <span style="font-style: italic; color: #B22222">// make path point after the server name
</span>
        path = p;

        <span style="font-style: italic; color: #B22222">// make sure the server name is followed by a single slash
</span>
        <span style="font-weight: bold; color: #A020F0">if</span> (path[0] == L<span style="font-weight: bold; color: #BC8F8F">'\\'</span> || path[0] == L<span style="font-weight: bold; color: #BC8F8F">'/'</span>)
            <span style="font-weight: bold; color: #A020F0">return</span> 0;
    }

    <span style="font-weight: bold; color: #A020F0">if</span> (path[0] == L<span style="font-weight: bold; color: #BC8F8F">'\0'</span>)   <span style="font-style: italic; color: #B22222">// return if the path is empty
</span>        <span style="font-weight: bold; color: #A020F0">return</span> 1;

    <span style="font-style: italic; color: #B22222">// Iterate through the path and canonicalize ..\ and .\
</span>
    p = path;

    <span style="font-weight: bold; color: #A020F0">while</span> (1) {
        <span style="font-weight: bold; color: #A020F0">if</span> (*p == L<span style="font-weight: bold; color: #BC8F8F">'\\'</span>) {
            <span style="font-style: italic; color: #B22222">// we have a slash
</span>
            <span style="font-weight: bold; color: #A020F0">if</span> (current_slash == p-1)   <span style="font-style: italic; color: #B22222">// don't allow consequtive slashes
</span>                <span style="font-weight: bold; color: #A020F0">return</span> 0;

            <span style="font-style: italic; color: #B22222">// store the locations of the current and previous slashes
</span>
            previous_slash = current_slash;
            current_slash = p;
        }
        <span style="font-weight: bold; color: #A020F0">else</span> <span style="font-weight: bold; color: #A020F0">if</span> (*p == L<span style="font-weight: bold; color: #BC8F8F">'.'</span> &amp;&amp; (current_slash == p-1 || p == path)) {
            <span style="font-style: italic; color: #B22222">// we have \. or ^.
</span>
            <span style="font-weight: bold; color: #A020F0">if</span> (p[1] == L<span style="font-weight: bold; color: #BC8F8F">'.'</span> &amp;&amp; (p[2] == L<span style="font-weight: bold; color: #BC8F8F">'\\'</span> || p[2] == L<span style="font-weight: bold; color: #BC8F8F">'\0'</span>)) {
                <span style="font-style: italic; color: #B22222">// we have a \..\, \..$, ^..\ or ^..$ sequence
</span>
                <span style="font-weight: bold; color: #A020F0">if</span> (previous_slash == NULL)
                    <span style="font-weight: bold; color: #A020F0">return</span> 0;

                <span style="font-style: italic; color: #B22222">// example: aaa\bbb\..\ccc
</span>                <span style="font-style: italic; color: #B22222">//             ^   ^  ^
</span>                <span style="font-style: italic; color: #B22222">//             |   |  &amp;p[2]
</span>                <span style="font-style: italic; color: #B22222">//             |   |
</span>                <span style="font-style: italic; color: #B22222">//             |   current_slash
</span>                <span style="font-style: italic; color: #B22222">//             |
</span>                <span style="font-style: italic; color: #B22222">//             previous_slash
</span>
                ch = p[2];

#<span style="font-weight: bold; color: #5F9EA0">ifdef</span> <span style="color: #B8860B">VISTA</span>
                <span style="font-weight: bold; color: #A020F0">if</span> (previous_slash &gt;= end_of_path)
                    <span style="font-weight: bold; color: #A020F0">return</span> 0;

                wcscpy_s(previous_slash, (end_of_path-previous_slash)/2, p+2);
#<span style="font-weight: bold; color: #5F9EA0">else</span> // <span style="color: #B8860B">XP</span>
                wcscpy(previous_slash, &amp;p[2]);
#<span style="font-weight: bold; color: #5F9EA0">endif</span>

                <span style="font-weight: bold; color: #A020F0">if</span> (ch == L<span style="font-weight: bold; color: #BC8F8F">'\0'</span>)
                    <span style="font-weight: bold; color: #A020F0">return</span> 1;

                current_slash = previous_slash;
                p = previous_slash;

                <span style="font-style: italic; color: #B22222">// find the slash before p
</span>
                <span style="font-style: italic; color: #B22222">// BUG: if previous_slash points to the beginning of the
</span>                <span style="font-style: italic; color: #B22222">// string, we'll go beyond the start of the buffer
</span>                <span style="font-style: italic; color: #B22222">//
</span>                <span style="font-style: italic; color: #B22222">// example string: \a\..\
</span>
                q = p-1;
                
                <span style="font-weight: bold; color: #A020F0">while</span> (*q != L<span style="font-weight: bold; color: #BC8F8F">'\\'</span> &amp;&amp; q != path)
                    q--;

                <span style="font-weight: bold; color: #A020F0">if</span> (*p == L<span style="font-weight: bold; color: #BC8F8F">'\\'</span>)
                    previous_slash = q;
                <span style="font-weight: bold; color: #A020F0">else</span>
                    previous_slash = NULL;
            }
            <span style="font-weight: bold; color: #A020F0">else</span> <span style="font-weight: bold; color: #A020F0">if</span> (p[1] == L<span style="font-weight: bold; color: #BC8F8F">'\\'</span>) {
                <span style="font-style: italic; color: #B22222">// we have \.\ or ^.\ 
</span>
#<span style="font-weight: bold; color: #5F9EA0">ifdef</span> <span style="color: #B8860B">VISTA</span>
                <span style="font-weight: bold; color: #A020F0">if</span> (current_slash != NULL) {
                    <span style="font-weight: bold; color: #A020F0">if</span> (current_slash &gt;= end_of_path)
                        <span style="font-weight: bold; color: #A020F0">return</span> 0;
                    wcscpy_s(current_slash, (end_of_path-current_slash)/2, p+2);
                    <span style="font-weight: bold; color: #A020F0">goto</span> <span style="font-weight: bold; color: #5F9EA0">end_of_loop</span>;
                }
                <span style="font-weight: bold; color: #A020F0">else</span> {  <span style="font-style: italic; color: #B22222">// current_slash == NULL
</span>                    <span style="font-weight: bold; color: #A020F0">if</span> (p &gt;= end_of_path)
                        <span style="font-weight: bold; color: #A020F0">return</span> 0;
                    wcscpy_s(p, (end_of_path-p)/2, p+2);
                    <span style="font-weight: bold; color: #A020F0">goto</span> <span style="font-weight: bold; color: #5F9EA0">end_of_loop</span>;
                }
#<span style="font-weight: bold; color: #5F9EA0">else</span> // <span style="color: #B8860B">XP</span>
                <span style="font-weight: bold; color: #A020F0">if</span> (current_slash != NULL) {
                    wcscpy(current_slash, p+2);
                    <span style="font-weight: bold; color: #A020F0">goto</span> <span style="font-weight: bold; color: #5F9EA0">end_of_loop</span>;
                }
                <span style="font-weight: bold; color: #A020F0">else</span> { <span style="font-style: italic; color: #B22222">// current_slash == NULL
</span>                    wcscpy(p, p+2);
                    <span style="font-weight: bold; color: #A020F0">goto</span> <span style="font-weight: bold; color: #5F9EA0">end_of_loop</span>;
                }
#<span style="font-weight: bold; color: #5F9EA0">endif</span>
            }
            <span style="font-weight: bold; color: #A020F0">else</span> <span style="font-weight: bold; color: #A020F0">if</span> (p[1] != L<span style="font-weight: bold; color: #BC8F8F">'\0'</span>) {
                <span style="font-style: italic; color: #B22222">// we have \. or ^. followed by some other char
</span>
                <span style="font-weight: bold; color: #A020F0">if</span> (current_slash != NULL) {
                    p = current_slash;
                }
                *p = L<span style="font-weight: bold; color: #BC8F8F">'\0'</span>;
                <span style="font-weight: bold; color: #A020F0">return</span> 1;
            }
        }

        p++;

<span style="font-weight: bold; color: #5F9EA0">end_of_loop</span>:
        <span style="font-weight: bold; color: #A020F0">if</span> (*p == L<span style="font-weight: bold; color: #BC8F8F">'\0'</span>)
            <span style="font-weight: bold; color: #A020F0">return</span> 1;
    }
}

<span style="font-style: italic; color: #B22222">// Run this program to simulate the MS08-067 vulnerability
</span>
<span style="font-weight: bold; color: #228B22">int</span> <span style="font-weight: bold; color: #0000FF">main</span>()
{
    <span style="font-weight: bold; color: #A020F0">return</span> ms08_067(L<span style="font-weight: bold; color: #BC8F8F">"\\c\\..\\..\\AAAAAAAAAAAAAAAAAAAAAAAAAAAAA"</span>);
}
</pre>
      </div>
    </summary>
  </entry>
</feed>

