<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Vulnerability Analysis Blog</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/" />
    <link rel="self" type="application/atom+xml" href="https://www.cert.org/blogs/vuls/atom.xml" />
    <id>tag:www.cert.org,2009-03-02:/blogs/vuls//1</id>
    <updated>2009-11-13T14:23:28Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.24-en</generator>

<entry>
    <title>Plain Text Email in Outlook Express</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/11/plain_text_email_in_outlook_ex.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.48</id>

    <published>2009-11-13T14:23:00Z</published>
    <updated>2009-11-13T14:23:28Z</updated>

    <summary>Reading email messages in plain text seems like a reasonable thing to do to improve the security of your email client. Plain text takes less processing than HTML, which should help minimize your attack surface, right? As it turns out,...</summary>
    <author>
        <name>Will Dormann</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Reading email messages in plain text seems like a reasonable thing to do to improve the security of your email client. Plain text takes less processing than HTML, which should help minimize your attack surface, right? As it turns out, Outlook Express (and its derivatives) is doing more than you think when it is configured with the &quot;Read all messages in plain text&quot;&nbsp;option enabled.</p>]]>
        <![CDATA[<p>Outlook Express is an email client that is provided with various versions of Microsoft Windows, starting with Windows 98. In Windows Vista, the client was renamed <a href="http://www.microsoft.com/windows/windows-vista/features/mail.aspx">Windows Mail</a>. Windows 7 does not come with an email client, but a newer version of Windows Mail called <a href="http://download.live.com/wlmail">Windows Live Mail</a> is available for download. Despite the different names, all three products are essentially different versions of the same software. In this blog entry, the term &quot;Outlook Express&quot; refers to all three versions.</p><p>Security-conscious people tend to disable unnecessary features to improve the security of software that we use. For example, most web browsers can be <a href="http://www.cert.org/tech_tips/securing_browser/">made more secure</a> by disabling features like Java, ActiveX, or even JavaScript by default. Sure, it's a trade-off with functionality, but when you're constantly processing untrusted data by viewing web pages, it makes sense to minimize your <a href="http://www.cert.org/blogs/vuls/2009/06/vulnerabilities_and_software_a.html">attack surface</a>. The same techniques can be applied to your email client. For example, most popular email clients include an option to display messages as plain text. In <a href="http://www.microsoft.com/protect/computer/advanced/browsing.mspx#ENF">Improving Internet Safety and Security Settings</a>, Microsoft recommends setting the option &quot;Read all messages in plain text.&quot;</p><p>It is reasonable to guess that the &quot;Read all messages in plain text&quot; option means that Outlook Express displays only the plain text MIME part of an email message. Or perhaps it just strips out the HTML&nbsp;tags from the message. However, both these guesses are wrong. Outlook Express is doing much more than this.</p><p>When Outlook Express receives an HTML email message, it determines the handler for the &quot;text/html&quot; MIME type. Outlook Express then uses the&nbsp;Internet Explorer rendering engine (MSHTML)&nbsp;to process the message. If the &quot;Read all messages in plain text&quot; option is specified, then the content is reduced to a plain text form. The important concept here is that the Internet Explorer rendering engine is used to process HTML email messages, regardless of the plain text setting.</p><p>In fact, ironically, setting the option to read messages in plain text can put the system at increased risk! While investigating attack vectors for the Windows animated cursor stack buffer overflow vulnerability (<a href="http://www.kb.cert.org/vuls/id/191609">VU#191609</a>), I noticed that when the &quot;Read all messages in plain text&quot; option was enabled, Outlook Express could be compromised just by displaying an email message in the preview pane. The default configuration of displaying messages in HTML format was not vulnerable via the preview pane. The HTML&nbsp;email referenced an ANI&nbsp;file on a remote server, and even though it was configured to display messages in plain text, Outlook Express retrieved the remote ANI file and processed it. Microsoft was notified of this behavior, and they updated their <a href="http://www.microsoft.com/technet/security/Bulletin/MS07-017.mspx">security bulletin</a>  with the text:&nbsp;&quot;<strong>Note</strong> Reading e-mail in plain text on Outlook Express does <strong>not</strong> mitigate attempts to exploit this vulnerability.&quot; The behavior of Outlook Express does not appear to have changed since then.</p><p>Consider the recent <a href="http://g-laurent.blogspot.com/2009/11/windows-7-server-2008r2-remote-kernel.html">Windows 7 / Server 2008 R2 denial-of-service vulnerability</a>. This vulnerability can cause a Windows 7 or Server 2008 R2 system to hang upon attempting to create an SMB connection to a malicious server. Similar to the ANI&nbsp;bug, if Windows Live Mail is configured to display messages in plain text, the vulnerability can be triggered by simply receiving a malicious email and displaying it in the preview pane. The default configuration of displaying messages in HTML format is not as vulnerable because it appears to require additional user interaction, such as clicking the &quot;Show images&quot;&nbsp;link or forwarding or replying to the message.</p><p>If you are using an email client based on Outlook Express (including Windows Mail and Windows Live Mail), avoid using the &quot;Read all messages in plain text&quot; option. While it is possible that the setting could protect against some vulnerabilities, I have investigated several scenarios where it puts the user at <strong>increased</strong> risk. Note that Microsoft Outlook does not appear to be affected by this problem. In Outlook, the option to read messages in plain text does appear to offer increased protection against vulnerabilities.</p>]]>
    </content>
</entry>

<entry>
    <title>Managing IPv6 - Part 2</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/10/managing_ipv6_-_part_2.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.45</id>

    <published>2009-10-06T19:44:00Z</published>
    <updated>2009-10-06T19:44:54Z</updated>

    <summary>Past entries have addressed both securing and disabling IPv6. This entry describes ways that administrators can secure their networks and generate test cases to test those settings....</summary>
    <author>
        <name>Ryan Giobbi</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Past entries have addressed both securing and disabling IPv6. This entry describes ways that administrators can secure their networks and generate test cases to test those settings.</p>]]>
        <![CDATA[<p>Administrators and developers who work with IPv4 will notice that IPv6 has made some changes beyond offering many more addresses than IPv4. The following are some of the changes that have security impacts:</p> <ul>     <li>Many hosts that currently have private IPv4 addresses will have global, publicly reachable addresses.</li>     <li>ICMPv6 contains much of the functionality of DHCP in IPv4 and cannot easily be entirely filtered.</li>     <li>IPv6 addresses can be predictable or partially random. Modern operating systems allow both, and there is a tradeoff between system management ease of use and user privacy.</li> </ul> <p>These changes can cause problems. For example, a host that accepts any ICMPv6 type can be fingerprinted easily from remote systems. That might not be a problem for some networks, but it could be critical for others.</p> <p>There are ways for administrators to handle these challenges. The examples below aren't universally applicable, so use them as a general guide.</p> <p>&nbsp;</p> <p><em><strong>Managing networks using global IPv6 addresses</strong></em></p> <p>Globally reachable addresses are not &quot;hidden&quot; in the same way as NAT addresses. To filter traffic destined to these clients, administrators can use application-layer proxy servers, stateful network filtering, or host-based firewalls.</p> <p>Below is an example of filtering traffic to a globally reachable IPv6 address. For the purpose of these rules, 2001:1::/64 is the local network, eth0 is the LAN interface on a firewall, eth1 is the WAN interface on the firewall, and 2001:3::1 is an IPv6 address on the internet.</p> <p style="margin-left: 40px;"><code>ip6tables -A FORWARD -p tcp -i eth0 -s 2001:1::/64 -p tcp -j ACCEPT<br /> ip6tables -A FORWARD -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT</code><br /> <code>ip6tables -A FORWARD -p tcp -i eth1 --dport 3389 -s 2001:3::1 -j ACCEPT</code><br /> <code>ip6tables -A FORWARD -p tcp -i eth1 -m state --state NEW,INVALID -j DROP</code></p> <p>The following is an explanation of what's happening in these rules, based on the behavior of a typical router doing NAT.</p> <p style="margin-left: 40px;"><code>ip6tables -A FORWARD -p tcp -i eth0 -s 2001:1::/64 -p tcp -j ACCEPT</code><br /> <em>Pass any traffic that has entered on our LAN's ethernet interface (-i eth0) and that has a source address in the range our LAN is using (2001:1::/64).</em></p> <p style="margin-left: 40px;"><code>ip6tables -A FORWARD -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT</code><code><br /> <em>Pass any traffic that is part of an existing connection.</em></code></p> <p style="margin-left: 40px;"><code>ip6tables -A FORWARD -p tcp -i eth1 --dport 3389 -s 2001:3::1 -j ACCEPT</code><br /> <em>Allow any traffic coming into our WAN interface (-i eth1) to pass through to our LAN if it matches the TCP port used for RDP (--dport 3389). <br /> </em></p> <p style="margin-left: 40px;"><code>ip6tables -A FORWARD -p tcp -i eth1 -m state --state NEW,INVALID -j DROP<br /> </code><em>Drop all other traffic.</em></p> <p>After configuring the firewall, administrators should test the ruleset to confirm it is working as expected. Two commonly used tools that can test IPv6 TCP and UDP policies are nmap and netcat6.</p> <p>Building on the example above, let's imagine that a user logs into a host with IP address <code>2001:1::2/64</code> and starts a netcat listener on port 3389:</p> <p style="margin-left: 40px;"><code>$ netcat6 -l -p 3389</code></p> <p>A scan of that IP from any host on the internet other than <code>2001:3::1 </code>should fail. This result can be verified with an nmap comand:</p> <p style="margin-left: 40px;"><code>$ nmap -PN&nbsp;-sT </code><code>2001:1::2/64 -p 3389</code> <br /> <code><br /> Starting Nmap 4.76 ( http://nmap.org ) at 2009-09-02 14:32 EDT<br /> Interesting ports on </code><code>2001:1::2:</code><br /> <code>PORT&nbsp;&nbsp;&nbsp;&nbsp; STATE SERVICE<br /> </code></p><p>&nbsp;</p> <p><em><strong>Filtering selected ICMPv6 types</strong></em></p> <p>The ICMPv6 protocol includes some great functionality. IANA maintains a <a href="http://www.iana.org/assignments/icmp-parameters">list</a> of ICMPv6 types and codes.<br /> <br /> It is hard to make general statements about which ICMPv6 types should be allowed or denied. The following chart provides some guidance about reasonable firewall policies applied to ICMPv6 types. The types are listed based on whether or not the ICMPv6 type can typically be allowed or denied.</p> <table cellspacing="1" cellpadding="1" border="1" style="width: 504px; height: 173px;">     <tbody>         <tr>             <td><small><strong>ICMPv6 types typically safe to allow<br />             </strong></small></td>             <td><small><strong>Purpose/Comments</strong></small></td>         </tr>         <tr>             <td><small>1, Destination Unreachable</small></td>             <td><small>general connectivity testing</small></td>         </tr>         <tr>             <td><small>2, Packet Too Big</small></td>             <td><p><small>sent by routers to notify a node that it should fragment the packets</small></p></td>         </tr>         <tr>             <td><small>3, Time Exceeded</small></td>             <td><small>protects against routing loops</small></td>         </tr>         <tr>             <td><small>4, Parameter Problem</small></td>             <td><small>error messages and handling</small></td>         </tr>         <tr>             <td><small>128, Echo Request</small></td>             <td><small>ping</small></td>         </tr>         <tr>             <td><small>129, Echo Reply</small></td>             <td><small>ping reply</small></td>         </tr>         <tr>             <td><small>133, Router Solicitation</small></td>             <td><small>sent by clients to the all-nodes multicast address to request an IP address assignment</small></td>         </tr>         <tr>             <td><small>134, Router Advertisement</small></td>             <td><p><small>sent by routers to the all-nodes multicast address; clients can use the information in this message to generate an address</small></p></td>         </tr>         <tr>             <td><small>135, Neighbor Solicitation</small></td>             <td><small>queries nodes for IP and connectivity information</small></td>         </tr>         <tr>             <td><small>136, Neigbor Advertisement</small></td>             <td><p><small>sends IP and connectivity information to other nodes</small></p></td>         </tr>         <tr>             <td>&nbsp;</td>             <td>&nbsp;</td>         </tr>         <tr>             <td><small><strong>ICMPv6 types that can typically be denied</strong></small><strong><br />             </strong></td>             <td><small><strong>Purpose/Comments</strong></small></td>         </tr>         <tr>             <td><small>137, Redirect</small></td>             <td><p><small>alerts clients to send traffic to another router, presumably one with a more direct route to the destination; like other ICMPv6 types listed, these messages are unauthenticated and could be malicious</small></p></td>         </tr>         <tr>             <td><small>138, Router Renumbering</small></td>             <td><small>automatic reconfiguration of routers</small></td>         </tr>         <tr>             <td><small>139, Node Information&nbsp;Query</small></td>             <td><small>allows a host to be fingerprinted</small></td>         </tr>         <tr>             <td><small>140, Node Information Response</small></td>             <td><small>allows a host to be fingerprinted</small></td>         </tr>         <tr>             <td><small>151-154</small></td>             <td><small>deny by default</small></td>         </tr>         <tr>             <td><small>others</small></td>             <td><small>not yet used, deny by default</small></td>         </tr>     </tbody> </table> <p><br /> We've talked about filtering ICMPv6 types <a href="https://www.cert.org/blogs/vuls/2008/11/icmpv6_types_and_hostbased_fir.html">before</a>, so there's no reason to discuss it again. Instead, let's focus on some test case generation options.</p> <p>There don't seem to be many tools that can generate arbitrary ICMPv6 packets. One of the more commonly used tools is ping6 or ping -6. The ping command sends an echo request message to an individual IPv6 address. Creating arbitrary ICMPv6 types requires a different tool.</p> <p>Newer versions of the scapy packet crafting tool can be used to generate most ICMPv6 types. Here's an example of typical scapy usage:</p> <p style="margin-left: 40px;"><code># scapy<br /> Welcome to Scapy (2.0.1-dev)<br /> &gt;&gt;&gt; a=IPv6(dst=&quot;2001:1::2&quot;)/ICMPv6ND_Redirect()<br /> &gt;&gt;&gt; send(a)</code></p> <p>To list the available ICMPv6 types (layers), use the ls() command:</p> <p style="margin-left: 40px;"><code>&gt;&gt;&gt; ls()<br /> ARP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : ARP<br /> ASN1_Packet : None<br /> BOOTP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : BOOTP<br /> CookedLinux : cooked linux<br /> ...<br /> ICMPerror&nbsp; : ICMP in ICMP<br /> ICMPv6DestUnreach : ICMPv6 Destination Unreachable<br /> ICMPv6EchoReply : ICMPv6 Echo Reply<br /> ICMPv6EchoRequest : ICMPv6 Echo Request<br /> ICMPv6HAADReply : ICMPv6 Home Agent Address Discovery Reply<br /> ICMPv6HAADRequest : ICMPv6 Home Agent Address Discovery Request<br /> ICMPv6MLDone : MLD - Multicast Listener Done<br /> ICMPv6MLQuery : MLD - Multicast Listener Query<br /> ICMPv6MLReport : MLD - Multicast Listener Report<br /> ...</code></p> <p>To view what parameters a layer will take, use the ls() command again:</p> <p style="margin-left: 40px;"><code>&gt;&gt;&gt; ls(ICMPv6ND_Redirect())<br /> type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : ByteEnumField&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 137&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (137)<br /> code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : ByteField&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (0)<br /> cksum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : XShortField&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = None&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (None)<br /> res&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : XIntField&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (0)<br /> tgt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : IP6Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = '::'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ('::')<br /> dst&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : IP6Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = '::'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ('::')</code></p> <p>This information can be used when creating packets to allow greater control over specific packets:</p> <p style="margin-left: 40px;"><code>a=IPv6(dst=&quot;2001:1::2&quot;)/ICMPv6ND_Redirect(tgt=&quot;2001:1::3&quot;)</code></p> <p>&nbsp;</p> <p><em><strong>Disabling/enabling privacy extensions</strong></em></p> <p>Currently, IPv6 addresses are typically assigned via stateless autoconfiguration, DHCPv6 or static assignment.</p> <p>With stateless autoconfiguration, an operating system is expected to generate part (usually the lower 64-bits) of its address. If privacy extensions are enabled, the generated address will be pseudo-random. This is good for privacy but makes remote management difficult.</p> <p>On Windows Server 2008, privacy extensions can be controlled with a netsh command:</p> <p style="margin-left: 40px;"><code>C:\&gt; netsh interface ipv6 privacy enabled|disabled</code></p> <p>Linux users should check /proc/sys/net/ip6/conf (the exact location varies between distributions and kernel versions).</p> <p>Testing the address status of other systems on the same Ethernet segment is possible, assuming that echo requests and replies are accepted on those machines. If the following commands run on a Linux system produce predictable addresses, privacy extensions are disabled:</p><p style="margin-left: 40px;"><code>$ ping6 -B -I eth0 -I [global IPv6 address attached to eth0] ff02::1<br /> $ ip neighbor</code></p> <p>Windows users can use these commands:</p><p style="margin-left: 40px;"><code>C:\&gt; ping -S <code>[global IPv6 address] -6 ff02::2<br /> C:\&gt; netsh interface ipv6 show neighbors</code><br /> </code></p>]]>
    </content>
</entry>

<entry>
    <title>Managing IPv6 - Part 1</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/08/managing_ipv6_part_i.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.44</id>

    <published>2009-08-19T14:07:00Z</published>
    <updated>2009-08-19T14:07:46Z</updated>

    <summary>This entry is the first in a series about securely configuring the IPv6 protocol on selected operating systems. Although this entry focuses on how to disable IPv6, we are not recommending that everyone immediately disable IPv6. However, if critical parts...</summary>
    <author>
        <name>Ryan Giobbi</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>This entry is the first in a series about securely configuring the <a href="http://en.wikipedia.org/w/index.php?title=IPv6&amp;oldid=306038060">IPv6</a> protocol on selected operating systems. Although this entry focuses on how to disable IPv6, we are not recommending that everyone immediately disable IPv6. However, if critical parts of your infrastructure (firewall, IDS, etc.) do not yet fully support the IPv6 protocol, consider disabling IPv6 until those components can be upgraded.</p>]]>
        <![CDATA[<p>The following are some of the reasons why an administrator would want to disable IPv6:</p>
<ul>
    <li>Many networks have IPv6 connectivity running on their LAN but do not have IPv6 WAN connectivity. Programs may see the connectivity on the LAN and unsuccessfully attempt to use IPv6 to connect to remote IPv6-enabled servers.</li>
    <li>Local IPv6 traffic might be able to bypass IDS systems or other low-layer network defenses.</li>
    <li>Operating systems may obtain global (publicly reachable) IPv6 addresses by creating <a href="http://www.cert.org/blogs/vuls/2009/04/bypassing_firewalls_with_ipv6.html">tunnels</a>.</li>
    <li>Running an additional protocol increases a system's <a href="http://www.cert.org/blogs/vuls/2009/06/vulnerabilities_and_software_a.html">attack surface</a>.</li>
    <li>Global addressing restores end-to-end connectivity.</li>
</ul>
<p>There are also more than a couple of reasons why an administrator wouldn't want to disable IPv6 connectivity:</p>
<ul>
    <li>The network has full IPv6 connectivity, and software on the network actively uses some of the features (usually the large pool of <a href="http://en.wikipedia.org/w/index.php?title=IPv6&amp;oldid=306038060#Addressing">global addresses</a>) found only in IPv6.</li>
    <li>Network services running on the LAN are actively using IPv6.</li>
    <li>The network is designed to be a &quot;dump pipe,&quot; and the administrator is expected to not interfere with passing traffic.</li>
    <li>Global addressing restores end-to-end connectivity.</li>
</ul>
<p>Below are instructions for disabling IPv6 on some popular operating systems. At the bottom of the entry are links to scripts that you can run from the command line.</p>
<p>&nbsp;</p>
<p><em><strong>Disabling IPv6 via firewalls or access control lists</strong></em></p>
<p>To disable IPv6 at a router or firewall, block protocols 41, 43, 44, 58, 59, and 60 as well as UDP ports 3544 and 3545. This firewall policy will likely miss some tunneled and non-routed IPv6 traffic (such as Teredo-compatible tunnels on non-standard ports) running on the local network.</p>
<p>There is too much variation in firewall syntax for us to list rules for every vendor; instead, we've written a few rules in Cisco's ACL syntax and included an ip6tables script linked at the bottom of this page.</p>
<p><span class="content">
<pre style="margin-left: 40px;">
access-list ipv6 deny 41 any any
access-list ipv6 deny 43 any any
access-list ipv6 deny 44 any any
access-list ipv6 deny 58 any any
access-list ipv6 deny 59 any any
access-list ipv6 deny 60 any any
access-list ipv6 deny udp any any eq 3544
access-list ipv6 deny udp any any eq 3545 
</pre>
</span></p>
<p>&nbsp;</p>
<p><em><strong>Disabling IPv6 on Windows XP and Server 2003</strong></em></p>
<p>The easiest way to disable IPv6 on Windows XP and Server 2003 is to run this command from a prompt with administrator privileges and reboot:</p>
<p style="margin-left: 40px;"><code>netsh.exe interface ipv6 uninstall</code></p>
<p>&nbsp;</p>
<p><em><strong>Disabling IPv6 on Windows Vista and Server 2008<br />
</strong></em></p>
<p>The IPv6 protocol cannot be uninstalled from Windows Vista. The most <a href="http://technet.microsoft.com/en-us/network/cc987595.aspx#EBE">effective</a> way of disabling it is to edit the registry:</p>
<p style="margin-left: 40px;"><code>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\DisabledComponents]<br />
&quot;Compatibility Flags&quot;=dword:0xFFFFFFFF<br />
</code></p>
<p>If you don't want to edit the registry, the following netsh commands will effectively block IPv6. Note to administrators: using the &quot;<a href="http://technet.microsoft.com/en-us/library/cc748991(WS.10).aspx">domain profile</a>&quot; feature of the Windows firewall will allow you to create rules that block IPv6 connectivity based on whether the user is authenticated to your domain.</p>
<p style="margin-left: 40px;"><code>netsh advfirewall firewall add rule name &quot;IPv6&quot; protocol=icmpv6 dir=out action=block <br />
netsh advfirewall firewall add rule name &quot;IPv6&quot; protocol=icmpv6 dir=in action=block <br />
netsh advfirewall firewall add rule name &quot;IPv6&quot; action=block protocol=41 dir=out<br />
netsh advfirewall firewall add rule name=&quot;IPv6 protocol 43&quot; protocol=43 action=block dir=out<br />
netsh advfirewall firewall add rule name=&quot;IPv6 protocol 44&quot; protocol=44 action=block dir=out<br />
netsh advfirewall firewall add rule name=&quot;IPv6 protocol 58&quot; protocol=58 action=block dir=out<br />
netsh advfirewall firewall add rule name=&quot;IPv6 protocol 59&quot; protocol=59 action=block dir=out<br />
netsh advfirewall firewall add rule name=&quot;IPv6 protocol 60&quot; protocol=60 action=block dir=out</code></p>
<p style="margin-left: 40px;">&nbsp;</p>
<p><em><strong>Disabling IPv6 on Red Hat Enterprise Linux 5</strong></em></p>
<ol>
    <li>Edit <code>/etc/sysctl.conf</code></li>
    <li>Append &quot;<code>net.ipv6.conf.all.disables_ipv6 = 1</code>&quot;</li>
    <li>Execute &quot;<code>sysctl -p</code>&quot; as root</li>
</ol>
<p>You can modify &quot;<code>net.ipv6.conf.all.disables_ipv6 = 1</code>&quot; for a specific interface (e.g., &quot;<code>net.ipv6.conf.eth1.disables_ipv6 = 1</code>&quot;) to selectively disable IPv6 on that interface.</p>
<p>The following steps will disable IPv6 connectivity on all interfaces:</p>
<ol>
    <li>Edit <code>/etc/modprobe.conf</code></li>
    <li>Append &quot;<code>alias net-pf-10 off</code>&quot;</li>
    <li>Execute the command &quot;<code>modprobe -a</code>&quot; as root</li>
</ol>
<p>For those of you who really want to disable IPv6, add these lines to your iptables scripts:</p>
<p style="margin-left: 40px;"><code>ip6tables -P INPUT DROP<br />
ip6tables -P OUTPUT DROP<br />
ip6tables -P FORWARD DROP</code><br />
<code><br />
ip6tables -I INPUT -p all -j DROP<br />
ip6tables -I OUTPUT -p all -j DROP</code></p>
<p style="margin-left: 40px;">&nbsp;</p>
<p><em><strong>Disabling IPv6 on Ubuntu Linux (version 9.04) </strong></em></p>
<ol>
    <li>Edit <code>/etc/sysctl.conf</code></li>
    <li>Append &quot;<code>net.ipv6.conf.all.disable_ipv6 = 1</code>&quot;</li>
    <li>Execute &quot;<code>sysctl -p</code>&quot; as root</li>
</ol>
<p>You can modify &quot;<code>net.ipv6.conf.all.disable_ipv6 = 1</code>&quot; for a specific interface (e.g., &quot;<code>net.ipv6.conf.eth1.disable_ipv6 = 1</code>&quot;) to selectively disable IPv6 on that interface.</p>
<p>The following steps will disable IPv6 connectivity on all interfaces:</p>
<ol>
    <li>Edit <code>/etc/modprobe.d/blacklist</code></li>
    <li>Append &quot;<code>blacklist ipv6</code>&quot;</li>
    <li>Execute the command &quot;<code>modprobe -a</code>&quot; as root</li>
</ol>
<p>Ubuntu users who run <a href="https://wiki.ubuntu.com/UbuntuFirewall">UFW</a> can check <code>/etc/default/ufw</code>. If <code>IPV6=no</code>, you can block IPv6 connectivity with this command:</p>
<p style="margin-left: 40px;"><code>sudo ufw disable &amp;&amp; sudo ufw enable</code></p>
<p>&nbsp;</p>
<p><em><strong>Scripts</strong></em></p>
<p>Here are files you can use to disable IPv6. As with all scripts, make sure you understand the implications before running these on your system.</p>
<ul>
    <li><a href="http://www.cert.org/downloads/IPv6/ip6tables_rules_dropipv6.sh">ip6tables router/firewall shell script</a></li>
    <li><a href="http://www.cert.org/downloads/IPv6/ipv6.cmd">batch file to disable on Windows XP and Server 2003</a></li>
    <li><a href="http://www.cert.org/downloads/IPv6/ipv6_disable.reg">reg file to disable IPv6 on Windows Vista and Server 2008</a> (Microsoft has published <a href="http://support.microsoft.com/kb/310516">instructions</a> on how to import. Also see the instructions in the solution section of <a href="http://www.us-cert.gov/cas/techalerts/TA09-020A.html">TA09-020A</a>.)</li>
</ul>
<p>&nbsp;</p>]]>
    </content>
</entry>

<entry>
    <title>Internet Explorer Kill-Bits</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/07/internet_explorer_kill-bits.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.43</id>

    <published>2009-07-31T19:18:00Z</published>
    <updated>2009-08-03T13:05:28Z</updated>

    <summary><![CDATA[The Kill-Bit (or &quot;killbit&quot;) is a Microsoft Windows registry value that prevents an ActiveX control from being used by Internet Explorer. More information is available in Microsoft KB article 240797. If a vulnerability is discovered in an ActiveX control or...]]></summary>
    <author>
        <name>Will Dormann</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Discovery" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>The Kill-Bit (or &quot;killbit&quot;) is a Microsoft Windows registry value that prevents an ActiveX control from being used by Internet Explorer. More information is available in Microsoft KB article <a href="http://support.microsoft.com/kb/240797">240797</a>. If a vulnerability is discovered in an ActiveX control or COM object, a common mitigation is to set the killbit for the control, which will cause Internet Explorer to block use of the control. Or will it?</p>]]>
        <![CDATA[<p>Killbits are a good thing. They are part of the mechanism for mitigating ActiveX vulnerabilities. Other technologies, such as <a href="http://www.cert.org/blogs/vuls/2008/06/signed_java_security_worse_tha.html">signed java applets</a>, may not have this sort of capability. And in some cases, such as when the vendor is no longer in business, the killbit may be the best mitigation for the vulnerability. However, it is not infallible.</p> <p>I first encountered a killbit weakness four years ago. I discovered a way to completely bypass the killbit protection on Microsoft Windows systems&mdash;just by making a trivial modification to the HTML source code. The impact of this vulnerability is that an attacker would have the entire arsenal of known-vulnerable ActiveX controls at his disposal, which is pretty significant. More information is available as US-CERT Vulnerability Note <a href="http://www.kb.cert.org/vuls/id/998297">VU#998297</a>. Fortunately, we have not seen any indication of attackers using the technique in the wild.&nbsp;</p> <p>Fast forward to 2009. Mark Dowd, Ryan Smith, and David Dewey presented great information at Black Hat about subverting ActiveX controls. One of the impacts is a limited way of bypassing the killbit. Further details are available in the paper <a href="http://hustlelabs.com/stuff/bh2009_dowd_smith_dewey.pdf">Attacking Interoperability</a> [pdf]. This vulnerability is addressed in Microsoft Security Bulletin <a href="http://www.microsoft.com/technet/security/bulletin/ms09-034.mspx">MS09-034</a>, so make sure you're up to date.</p> <p>Today, in the process of testing some <a href="http://www.cert.org/vuls/discovery/dranzer.html">Dranzer</a> functionality on x64 versions of Windows, I noticed some odd behavior with respect to killbits. In particular, the killbit was not being obeyed. D&eacute;j&agrave; vu perhaps? Actually, not in this case. Although the behavior is <a href="http://blogs.technet.com/srd/archive/2008/02/06/The-Kill_2D00_Bit-FAQ_3A00_-Part-1-of-3.aspx">documented</a> (as of March 11, 2009), it may not be very well understood.</p> <p>The default version of Internet Explorer on 64-bit versions of Microsoft Windows is actually the 32-bit version of the browser. This is to retain compatibility with existing ActiveX controls, such as Adobe Flash, Sun Java, or Microsoft Update. When running this browser configuration, the 32-bit Internet Explorer on x64 platforms obtains the killbit values <strong>from a different registry location</strong>. In particular, 32-bit IE on 32-bit Windows and 64-bit IE on 64-bit Windows both look in the following location:</p> <ul><tt>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\</tt></ul>     <p>However, 32-bit IE on 64-bit Windows will look here:</p>     <ul><tt>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\ActiveX Compatibility\</tt></ul>         <p>What this means is that killbits that have been set manually may fail to set the <tt>Wow6432Node</tt> version of the registry key. In fact, even Microsoft fails to mention the <tt>Wow6432Node</tt> location for killbits on x64 platforms in <a href="http://support.microsoft.com/kb/240797">KB Article 240797</a>.</p>         <p>Software vendors and end users who are relying on the killbit for protection against ActiveX vulnerabilities need to be using both registry locations. Otherwise, Windows x64 users will remain at risk.</p>]]>
    </content>
</entry>

<entry>
    <title>Mitigating Slowloris</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/07/slowloris_vs_your_webserver.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.42</id>

    <published>2009-07-01T16:18:00Z</published>
    <updated>2009-07-01T16:18:24Z</updated>

    <summary>Slowloris is a denial-of-service (DoS) tool that targets web servers. We have some suggestions about mitigation techniques and workarounds to protect your server. However, use caution if you implement any of these suggestions because they will likely have some unintended...</summary>
    <author>
        <name>Ryan Giobbi</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Slowloris is a denial-of-service (DoS) tool that targets web servers. We have some suggestions about mitigation techniques and workarounds to protect your server. However, use caution if you implement any of these suggestions because they will likely have some unintended side effects.</p>]]>
        <![CDATA[<p>The Slowloris author's <a href="http://ha.ckers.org/slowloris/">web page</a> offers an excellent description of how the tool works:</p> <blockquote> <p>Slowloris holds connections open by sending partial HTTP requests. It continues to send subsequent headers at regular intervals to keep the sockets from closing. In this way webservers can be quickly tied up. In particular, servers that have threading will tend to be vulnerable, by virtue of the fact that they attempt to limit the amount of threading they'll allow.</p> </blockquote> <p>We've generated a few packet capture files that show Slowloris <a href="http://www.cert.org/downloads/slowloris_scan.pcap">in action</a>. The web server being targeted is an Apache 2 (172.16.65.5) installation, a normal web browser is connecting from 172.16.65.4 and the Slowloris tool is running on 172.16.65.2. During the attack, Apache became unresponsive after a few seconds but recovered quickly once the attack was stopped.</p> <p>We know that Slowloris works, and SANS <a href="http://isc.sans.org/diary.html?storyid=6622">reports</a> that some attackers are already using a similar tool to attack web servers. As an administrator, we have some ideas about how you can stop an attack. <em>Our mitigations below only apply to a limited number of deployed servers&mdash;ones that have relatively low volume and serve&nbsp;(usually) a small number of clients.</em></p> <p>Before going further, it's important to figure out what device is actually affected by Slowloris. Although your routers shouldn't be affected (wrong network layer), reverse proxies, web application firewalls, and web servers might be.</p> <p>After you've determined what components are affected, you'll probably want to look for something like Apache's <a href="http://httpd.apache.org/docs/2.2/mod/core.html#timeout">TimeOut directive</a> on an affected device. By lowering the TimeOut directive, Apache will more quickly discard the partial HTTP requests the Slowloris tool is sending. This change (slightly) increases the amount of bandwidth an attacker needs to sustain a DoS attack on the web server.</p> <p>In addition to lowering the timeout for connections, Slowloris needs to use a different (although not sequential) source port for each connection. This makes each connection appear &quot;new&quot; to the web server and the operating system that it is running on. Below are some iptables rules using the recent module that demonstrate this concept. The rules allow ten new connections from a given IP every fifteen seconds and drop additional packets from the sending host that is over that limit.</p> <pre wrap="" style="margin-left: 40px;">
iptables -I INPUT -p tcp -m state --state NEW --dport 80 -m recent \
--name slowloris --set

iptables -I INPUT -p tcp -m state --state NEW --dport 80 -m recent \
--name slowloris --update --seconds 15 --hitcount 10 -j DROP

iptables -A INPUT -p tcp --dport 80 -j ACCEPT</pre> <p>View the packet capture file to see how well our <a href="http://www.cert.org/downloads/slowloris_mitigated.pcap">mitigations</a> worked.</p> <p>Although the results look good, it's important to note that the TimeOut directive <a href="http://isc.sans.org/diary.html?storyid=6613">doesn't help</a> that much, and these iptables rules will trigger an unacceptable amount of false positives on busy servers receiving connections from proxies and NAT gateways. The workarounds listed above might be applicable on low-volume but critical web servers. They might also be useful for servers under attack when the option of serving pages to some clients is better than serving pages to none.</p> <p>Thanks to Robert Hansen of SecTheory and Jason McCormick of the Software Engineering Institute for providing technical advice.</p>]]>
    </content>
</entry>

<entry>
    <title>Vulnerabilities and Attack Surface</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/06/vulnerabilities_and_software_a.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.40</id>

    <published>2009-06-25T16:02:00Z</published>
    <updated>2009-06-25T16:01:25Z</updated>

    <summary>Two recent US-CERT Vulnerability Notes describe similar issues in the Adobe Reader and Foxit Reader PDF viewing applications. The vulnerabilities, that both applications failed to properly handle JPEG2000 (JPX) data streams, were discovered as part of our Vulnerability Discovery initiative....</summary>
    <author>
        <name>Will Dormann</name>
        
    </author>
    
        <category term="Discovery" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Two recent <a href="http://www.kb.cert.org/vuls/byid?searchview&amp;query=VU%23251793,VU%23568153">US-CERT Vulnerability Notes</a> describe similar issues in the Adobe Reader and Foxit Reader PDF viewing applications. The vulnerabilities, that both applications failed to properly handle JPEG2000 (JPX) data streams, were discovered as part of our <a href="http://www.cert.org/vuls/discovery/">Vulnerability Discovery</a> initiative. The two vulnerability notes are quite similar, except for one aspect: attack surface.</p>]]>
        <![CDATA[<p>According to Pratyusa K. Manadhata's <a href="http://www.cs.cmu.edu/~pratyus/as.html">web page on attack surface</a>, &quot;A system's attack surface is the set of ways in which an adversary can enter the system and potentially cause damage. Hence the larger the attack surface, the more insecure the system.&quot; It may be an oversimplification, but the more functionality that is included with software, the larger the potential attack surface.</p> <p>Shortly after the <a href="http://www.kb.cert.org/vuls/id/905281">JBIG2 vulnerability</a> in Adobe Reader was disclosed, I started investigating other image formats. Just like JBIG2, the JPX format is slightly obscure, and the support for it within PDF&nbsp;documents is relatively new. JBIG2 support was introduced in version 1.4 of the PDF specification, while JPX&nbsp;support is even newer at version 1.5 of the spec. Though not always the case, one would think that newer formats are not tested as well as older, popular formats such as JPEG.</p> <p>As the result of investigating JPX format support in PDF readers, I&nbsp;found vulnerabilities in both Adobe Reader and in Foxit Reader. Both vendors wrote faulty JPX-handling code. Nobody is perfect at writing software; if they were, my job would be quite different. However, there is an important difference between the two applications with respect to attack surface: Adobe Reader comes with JPX support built in, while Foxit Reader requires an add-on to view JPX (and JBIG2)&nbsp;images. The modular design of Foxit Reader means that the extra functionality such as JBIG2/JPX decoding is only present on systems where the user has made the decision that they would like that ability. This design reduces attack surface.</p> <p>Adobe Reader and Foxit Reader are just two examples that I have chosen to demonstrate the problem of software attack surface. Both vendors appear to understand security, and both handled the coordination aspect of the vulnerabilities quite well. <a href="http://en.wikipedia.org/w/index.php?title=Feature_creep&amp;oldid=297298682">Feature creep</a> is a problem that is endemic to the software industry.</p> <p>One driving force with software vendors is to include more features and to have those features enabled by default. End users of software may appreciate not having to make decisions about what features to enable when installing an application. However, not even giving them a choice is doing them a disservice, especially when it comes to security. I would like to see a more modular design with software and its installers. If I want the <a href="http://www.mozilla.org/docs/web-developer/samples/kitchensink.xml">kitchen sink</a>, I'll let you know. Don't give it to me by default.</p>]]>
    </content>
</entry>

<entry>
    <title>Release of Dranzer ActiveX Fuzzing Tool</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/04/release_of_dranzer_activex_fuz.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.39</id>

    <published>2009-04-16T15:50:26Z</published>
    <updated>2009-04-16T15:51:22Z</updated>

    <summary><![CDATA[Hi, it's Will. As previously mentioned, we have been investigating and discovering ActiveX&nbsp;vulnerabilities over the past few years. Today we released the Dranzer tool that we have developed to test ActiveX&nbsp;controls....]]></summary>
    <author>
        <name>Will Dormann</name>
        
    </author>
    
        <category term="Discovery" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Research" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Hi, it's Will. As <a href="http://www.cert.org/blogs/vuls/2008/07/activex_vulnerability_discover.html">previously mentioned</a>, we have been investigating and discovering ActiveX&nbsp;vulnerabilities over the past few years. Today we released the Dranzer tool that we have developed to test ActiveX&nbsp;controls.</p>]]>
        <![CDATA[<p>We've been using the Dranzer ActiveX fuzz testing tool for over three years, and we've found a <a href="http://www.cert.org/archive/pdf/dranzer.pdf">large number</a> of vulnerabilities with it. I've tagged <a href="http://www.kb.cert.org/vuls/byid?searchview&amp;query=dranzer">a few of the US-CERT Vulnerability notes</a> with the &quot;Dranzer&quot; keyword to show the sort of vulnerabilities we've been <a href="http://www.cert.org/vuls/discovery/">discovering</a> with the tool.</p><p>Because there are literally thousands of vendors that produce ActiveX&nbsp;controls, we have publicly released the Dranzer tool. This way, any vendor that produces ActiveX&nbsp;has the ability to test its own software, ideally before the software is released to the public.</p><p>For more details about the Dranzer tool, check out the <a href="http://www.cert.org/vuls/discovery/dranzer.html">Dranzer</a> page on the CERT website. The tool itself is available on the <a href="https://sourceforge.net/projects/dranzer">Dranzer SourceForge Project page</a>.</p>]]>
    </content>
</entry>

<entry>
    <title>Bypassing firewalls with IPv6 tunnels</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/04/bypassing_firewalls_with_ipv6.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.37</id>

    <published>2009-04-02T15:05:00Z</published>
    <updated>2009-05-15T20:04:36Z</updated>

    <summary>Hello, it&apos;s Ryan. We&apos;ve talked about IPv6 in blog entries and vulnerability notes before. But instead of focusing on IPv6 vulnerabilities, this blog entry will show how functional IPv6 tunneling protocols can be used to bypass IPv4-only firewalls and ACLs....</summary>
    <author>
        <name>Ryan Giobbi</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Hello, it's Ryan. We've talked about IPv6 in blog <a href="http://www.cert.org/blogs/vuls/2008/09/ping_sweeping_in_ipv6.html">entries</a> and vulnerability notes before. But instead of focusing on IPv6 vulnerabilities, this blog entry will show how functional IPv6 tunneling protocols can be used to bypass IPv4-only firewalls and ACLs. If you'd like a demonstration, watch this <a href="http://www.youtube.com/watch?v=1ldPKIobPgs">video</a> that we created.</p>]]>
        <![CDATA[<p>For some background information, you may want to review Wikipedia's definition of <a href="http://en.wikipedia.org/w/index.php?title=IPv6&amp;oldid=279127570">IPv6</a> and our <a href="http://www.cert.org/blogs/vuls/2008/09/ping_sweeping_in_ipv6.html">blog entry</a> explaining why you should care about it. This post is primarily for users who may have IPv6 on their systems but have not actually deployed it.</p> <p>To investigate IPv6 tunnels' effect on firewalls, we created a test to see how an IPv6 <a href="http://www.remlab.net/miredo/">Teredo-compatible</a> tunnel can be used to trivially bypass an IPv4-only firewall. The <a href="http://www.youtube.com/watch?v=1ldPKIobPgs&amp;feature=channel_page">video</a> referenced in the first paragraph shows our whole exercise in real time. We used a typical iptables firewall and appended the following rules to reject TCP connections that have the string &quot;google&quot; anywhere in the packet:</p> <p style="margin-left: 40px;"><code> iptables -A OUTPUT&nbsp;-p tcp -m string --algo bm --string &quot;google&quot; -j&nbsp;REJECT<br /> iptables -A&nbsp;INPUT -p tcp -m string --algo bm --string &quot;google&quot; -j&nbsp;REJECT</code></p> <p>The rules work; browser connections to www.google.com fail. But the rules produce a large number of false positives, won't catch HTTPs connections, and are &quot;expensive&quot; to process, so don't paste them into your iptables script.</p> <p>Lines 1-5 of this <a href="http://www.cert.org/downloads/IPv6/ipv6_tunnel_packets.pcap">packet capture</a> show exactly how the REJECT rule works (connections are closed, not discarded). There are also some interesting packets on <a onclick="window.open('/blogs/vuls/packets6_71.html','popup','width=870,height=42,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false" href="/blogs/vuls/packets6_71.html">lines 6 and 7</a>. The packets in these lines are IPv6 packets being transported by IPv4 UDP. More specifically, the lines show a router solicitation (us asking for an IPv6 address) and a router advertisement (a router offering an IP prefix).</p> <p>To see what happens when we browse to an IPv6-enabled website, let's go to <a href="http://ipv6.google.com">http://ipv6.google.com</a>. Looking at the capture file, you can see that the connection was successful. The HTTP GET string was transferred inside of a UDP packet and didn't trigger the iptables rules that were searching for that string inside of TCP packets (<a onclick="window.open('/blogs/vuls/packets_tunnel_get.html','popup','width=938,height=630,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false" href="/blogs/vuls/packets_tunnel_get.html">line 22</a>).</p> <p>We've illustrated the potential problem, but what about a solution? Trying to block ports can be effective but is likely to only work for specific brokers who are using the expected ports. Consider the following alternatives:</p> <ul>     <li>IPv6-aware host-based firewalls can be effective. In our example, calling the ip6tables rules below would have blocked connections to http://ipv6.google.com. <br />     <p><code> ip6tables -A OUTPUT&nbsp;-p tcp -m string --algo bm --string &quot;google&quot; -j&nbsp;REJECT<br />     ip6tables -A&nbsp;INPUT -p tcp -m string --algo bm --string &quot;google&quot;</code><code>-j&nbsp;REJECT<br />     </code></p></li>     <li><p>If you're trying to block IPv6 tunnels on the network, you could look for router advertisements or solicitations. Those messages are sent to the all-nodes multicast address <a href="http://www.iana.org/assignments/ipv6-multicast-addresses/">ff02::1</a>. Here is an un-optimized example iptables rule that uses iptables: <br />     <br />     <code>iptables -I FORWARD 1 -p udp --dport 1024: -m string --hex-string &quot;|ff 02 00 00 00 00 00 00 00 00 00 00 00 00 00 02|&quot; --algo bm -j REJECT</code></p>     <p>One of our readers pointed out that blocking local IPv6 traffic could cause an operating system to activate an IPv6 tunnel. He is correct; however, this rule should not interfere with native IPv6&mdash;it only applies to IPv4 UDP connections that are going between two interfaces (the FORWARD chain).</p></li> </ul> <p><em><strong>     </strong></em></p> <ul><li><p>We've heard that IPFilter development version <a href="http://sourceforge.net/project/downloading.php?group_id=169098&amp;filename=ip_fil5.0.6.tar.gz&amp;a=49833276">5.06</a> will decapsulate IPv6 in IPv4 packets and apply filtering rules. The following syntax, which we haven't tested, might block IPv6 in IPv4 tunnels:<br /><br /><code>decapsulate in on bge0 family inet6 proto ip all head ipinip6 <br />block in all group ipinip6 <br /></code></p></li></ul><ul><li><p>Evan Wright from our <a href="http://www.cert.org/netsa/">Network Situational Awareness team</a> pointed out that blocking protocols at border routers can stop some types of IPv6 connectivity. Using <a href="http://www.cisco.com/public/news_training/itsnews/tech/chalktalk/200902.html">access control lists</a> at border routers to block <a href="http://www.iana.org/assignments/protocol-numbers/">protocols</a> 41 (used by <a href="http://en.wikipedia.org/w/index.php?title=6to4&amp;oldid=276460987">6to4</a>), 43, 44, 58, 59, 60, and 192.88.99.1 (default anycast address of some 6to4 systems) would be a good place to start.&nbsp; Shown as an iptables example, it would look like this:<br />     <br />     <code>iptables -A&nbsp;FORWARD -p 41 -j REJECT<br />     </code><code>iptables -A&nbsp;FORWARD -p 43 -j REJECT</code><code><br />     </code><code>iptables -A&nbsp;FORWARD -p 44 -j REJECT<br />     </code><code>iptables -A&nbsp;FORWARD -p 58 -j REJECT</code><br />     <code>iptables -A&nbsp;FORWARD -p 59 -j REJECT<br />     </code><code>iptables -A&nbsp;FORWARD -p 60 -j REJECT<br />     </code><code><br />     </code></p></li></ul> <p>These examples may not directly apply to your network, but hopefully they illustrated the problem and gave you some suggestions that you can use as a starting point for improving the security of your firewalls.</p>]]>
    </content>
</entry>

<entry>
    <title>Conficker.C:  How many are there?</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/03/confickerc_how_many_are_there.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.38</id>

    <published>2009-03-31T22:10:14Z</published>
    <updated>2009-06-29T17:33:10Z</updated>

    <summary>Hello, Sid Faber from the Network Situational Awareness group at CERT. Like just about everyone else, we&apos;ve been following the Conficker worm for a while and thought some updated stats on the Conficker.C variant might be useful....</summary>
    <author>
        <name>Sidney Faber</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Research" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Hello, Sid Faber from the <a href="http://www.cert.org/netsa/">Network Situational Awareness</a> group at CERT. Like just about everyone else, we've been following the Conficker worm for a while and thought some updated stats on the Conficker.C variant might be useful.</p>]]>
        <![CDATA[<p>We've been able to separate Conficker.C peer-to-peer (p2p) traffic from other noise, and have enough sites instrumented to get a pretty good population estimate of currently infected hosts. Overall trends mirror those reported in SRI's Technical Report Addendum titled &quot;<a href="http://mtc.sri.com/Conficker/addendumC/index.html">Conficker C Analysis,</a>&quot; figure 8, with initial onset of p2p scanning on March 5 and an increase on March 17.</p> <p>Simple capture-recapture estimation based on our monitored networks suggests a total population of approximately 2.3 million IP addresses on March 30. We've observed between 350,000 to 650,000 addresses online during a given hour of the day, with 13:00-15:00Z being the most active time of day.</p> <p>Conficker.A and Conficker.B originally infected hosts by exploiting a <a href="http://www.kb.cert.org/vuls/id/827267">Microsoft Server RPC stack buffer overflow vulnerability</a>, through network shares, or through <a href="http://www.kb.cert.org/vuls/id/889747">autorun-enabled USB devices</a>.</p> <p>Interestingly, since Conficker.C appears to only come from updates to machines infected with Conficker.A or Conficker.B, a transition which only seems to have occurred on March 5th and 17th, the total number of Conficker.C infected addresses is observed to decrease by roughly 50,000 per day as machines are cleaned.</p> <p>A breakdown of infections by country follows the measurements observed by Conficker.A and Conficker.B as expected. Approximately 16% of the infected addresses come from China, 11% each from Russia and Brazil, and 7% from India.</p>]]>
    </content>
</entry>

<entry>
    <title>Windows Installer Application Resiliency</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/03/windows_installer_application.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.36</id>

    <published>2009-03-13T17:46:00Z</published>
    <updated>2009-03-13T17:46:46Z</updated>

    <summary><![CDATA[Hi, it's Will again. Recently, I was investigating the effectiveness of the workarounds for the Adobe Reader JBIG2 vulnerability, and I&nbsp;encountered an unexpected situation. In certain situations, the application resiliency feature of Windows Installer can actually undo some of the...]]></summary>
    <author>
        <name>Will Dormann</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Research" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Hi, it's Will again. Recently, I was investigating the effectiveness of the workarounds for the Adobe Reader <a href="http://www.kb.cert.org/vuls/id/905281">JBIG2 vulnerability</a>, and I&nbsp;encountered an unexpected situation. In certain situations, the <a href="http://msdn.microsoft.com/en-us/library/aa302344.aspx">application resiliency</a> feature of Windows Installer can actually undo some of the steps taken to mitigate a vulnerability.</p>]]>
        <![CDATA[<p>Microsoft <a href="http://msdn.microsoft.com/en-us/library/cc185688(VS.85).aspx">Windows Installer</a> is a framework for packaging applications into MSI&nbsp;databases. One of the features of Windows Installer is something called application resiliency. If a component of an MSI-packaged application is missing, then Windows Installer may automatically reinstall the components when the application is launched. This automatic repair can be triggered in several ways, but the method of interest here is the use of an <a href="http://msdn.microsoft.com/en-us/library/aa367548(VS.85).aspx">advertised</a> shortcut. Unless an MSI&nbsp;is packaged with the <a href="http://msdn.microsoft.com/en-us/library/aa368297(VS.85).aspx">DISABLEADVTSHORTCUTS</a> property set, a shortcut that the installer creates will be advertised.</p><p>How does this relate to the Adobe JBIG2 vulnerability? Two of the workarounds that are listed in <a href="http://www.kb.cert.org/vuls/id/905281">VU#905281</a> suggest to disable both the Adobe Acrobat Windows shell integration and the Adobe Acrobat indexing service filter. These workarounds involve unregistering the DLL files responsible for these features. Unregistering a DLL&nbsp;will remove certain registry values that tell Windows to use the component.</p><p>When Adobe Reader is installed on a Windows system, it creates two shortcuts for the application. The shortcut on the desktop is a normal non-advertised shortcut. However, the shortcut in the Start menu is an MSI-advertised shortcut. If the workarounds are in place and Adobe Reader is launched via the start menu shortcut, Windows will detect the missing registry values and trigger an MSI application resiliency repair. This repair, which happens with no additional user interaction, will re-register the Windows shell integration and indexing service DLLs, and it will also reconfigure Internet Explorer to automatically open PDF files without prompting the user! Just by launching the application, the workarounds that help protect against vulnerabilities in Adobe Reader are reverted back to the default configuration.</p><p>Any application that is packaged as an MSI&nbsp;has the possibility of exhibiting this behavior. To prevent this from happening, you can delete the advertised shortcut for an application and then create a normal shortcut in its place. To tell if a shortcut is advertised or not, right click on it and choose <em>Properties</em>. A normal shortcut will have an editable path to an application in the <em>Target</em> field. An advertised shortcut, however, will contain a non-editable description of the application in the <em>Target</em> field. By changing the type of shortcuts, you retain the same access points to the software but ensure that the workarounds to protect you from the vulnerability stay intact.</p>]]>
    </content>
</entry>

<entry>
    <title>Internet Explorer Vulnerability Attack Vectors</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/02/internet_explorer_vulnerabilit.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.35</id>

    <published>2009-02-19T20:30:00Z</published>
    <updated>2009-02-19T20:29:21Z</updated>

    <summary>Hey, it&apos;s Will. I noticed that several blogs, including Trend Micro and McAfee, have been talking about the recent attacks on the Internet Explorer 7 vulnerability that was fixed in MS09-002. An interesting thing about these exploits is the attack...</summary>
    <author>
        <name>Will Dormann</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Hey, it's Will. I noticed that several blogs, including <a href="http://blog.trendmicro.com/another-exploit-targets-ie7-bug/">Trend Micro</a> and <a href="http://www.avertlabs.com/research/blog/index.php/2009/02/17/ms09-002-exploit-in-the-wild-uses-msword-lure/">McAfee</a>, have been talking about the recent attacks on the Internet Explorer 7 vulnerability that was fixed in <a href="http://www.microsoft.com/technet/security/bulletin/MS09-002.mspx">MS09-002</a>. An interesting thing about these exploits is the attack vector. The technique used in these attacks has several security impacts that may not be immediately obvious.</p>]]>
        <![CDATA[<p>Some of the reports about the recent attacks are a little unclear about the location of the vulnerability. The reports discuss a DOC&nbsp;file, an embedded ActiveX control, and a backdoor that is installed. However, the vulnerability at play is an Internet Explorer 7 flaw, which is addressed in Microsoft Security Bulletin <a href="http://www.microsoft.com/technet/security/bulletin/MS09-002.mspx">MS09-002</a>.</p>
<p>Microsoft Windows opens files based on their file extension. Microsoft Word has the ability to render HTML files. What happens when you combine these two aspects and put a .DOC file extension on an HTML file? You end up with a file that appears to be a DOC&nbsp;file, and opens with Microsoft Word. Because Microsoft Word is treating the document as HTML, it allows ActiveX controls to run. This opens the document up to vulnerabilities. For example, an attacker can exploit the ActiveX capabilities by using an Internet Explorer ActiveX control in what appears to be a DOC file.</p>
<p>Why would somebody choose to go through these steps to attempt to exploit an Internet Explorer vulnerability, instead of simply sending out links to a malicious web page? I was able to come up with a few possibilities:</p>
<ol>
    <li>It is possible that it is simply for social engineering purposes. A user might be more likely to open a carefully constructed email with a DOC attachment than an email with a web link in it. Maybe.<br />
    &nbsp;</li>
    <li>Some people do not use Internet Explorer as their default web browser. They might even think that they don't need to worry about MS09-002 because they don't use IE. This sort of thinking can be dangerous, as demonstrated by this attack. A DOC file will open with Microsoft Word if the system has Microsoft Office installed. And the document described above will <strong>always</strong> use Internet Explorer to render web pages, regardless of the default browser setting. As mentioned in the CERT/CC&nbsp;<a href="http://www.cert.org/tech_tips/securing_browser/#how_to_secure">Securing Your Web Browser</a> document, it is best to secure every web browser on your system, even if you don't use all of them. If you use Microsoft Windows, you have Internet Explorer, so it would be wise to lock it down. I think that the default-browser scenario seems quite plausible as an explanation for why this attack vector was chosen.<br />
    &nbsp;</li>
    <li>Starting with Windows Vista, Microsoft enables a cool feature in Internet Explorer called <a href="http://blogs.msdn.com/ie/archive/2006/02/09/528963.aspx">Protected Mode</a>. What this means is that regardless of the privileges of the logged-in user, Internet Explorer will run with lower privileges than even a restricted user in Windows. This is great for limiting the impact of an exploited vulnerability. <br />
    <br />
    Consider the scenario where I am able to achieve code execution as the result of a vulnerability in Internet Explorer or an ActiveX control. On systems that use IE Protected Mode, I may be able to execute code, but that code will inherit the same low privileges as the Internet Explorer browser. So the code should not be able to do anything outside of the <a href="http://msdn.microsoft.com/en-us/library/bb250462.aspx#wpm_fliwl">low integrity</a> (or sandbox) areas of the filesystem or registry. This protection happens when the user runs the Internet Explorer web browser application. But what about when another application such as Microsoft Word uses Internet Explorer components to render web pages? No more Protected Mode! So in the attack vector described above, the code will execute with the privileges of the user that is running Microsoft Word. By indirectly using Internet Explorer by way of Microsoft Word, attackers are able to bypass IE's Protected mode.</li>
</ol>
<p>What are the lessons to be learned here?</p>
<ul>
    <li>Keep your system up to date with patches and security updates. Attackers quite often do not need to rely on unpatched &quot;zero-day&quot; vulnerabilities to compromise systems. If you are late to install updates, you are at risk.</li>
    <li>Any application that is on your system can put you at risk, whether you use it or not. By uninstalling unneeded applications,&nbsp; you reduce the attack surface of your system. For applications that cannot be uninstalled, make sure they are up to date.</li>
    <li>Install the update for <a href="http://www.microsoft.com/technet/security/bulletin/MS09-002.mspx">MS09-002</a> if you have not done so already.</li>
</ul>]]>
    </content>
</entry>

<entry>
    <title>Reference Implementations for Securing Your Web Browser Guidelines</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2009/01/reference_implementations_for.html" />
    <id>tag:www.cert.org,2009:/blogs/vuls//1.31</id>

    <published>2009-01-09T16:03:00Z</published>
    <updated>2009-01-09T16:03:31Z</updated>

    <summary>It&apos;s Will again, with the first blog entry of 2009. Our Securing Your Web Browser document describes how to make your web browser more secure, but applying all of the necessary changes can be a bit tedious. To make the...</summary>
    <author>
        <name>Will Dormann</name>
        
    </author>
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>It's Will again, with the first blog entry of 2009. Our <a href="https://www.cert.org/tech_tips/securing_browser">Securing Your Web Browser</a> document describes how to make your web browser more secure, but applying all of the necessary changes can be a bit tedious. To make the process easier, we developed reference implementations of the guidelines for both Microsoft Internet Explorer and Mozilla Firefox.</p>]]>
        <![CDATA[<p>Web browsers have many features, such as ActiveX, Java, and JavaScript, enabled by default. While these features give web sites extra functionality, they also give your web browser a larger attack surface. The primary goal of the <a href="http://www.cert.org/tech_tips/securing_browser">Securing Your Web Browser</a> guidelines is to explain how to disable these defaults while allowing the user to decide which sites should be allowed to use the features. For example, you may want to allow JavaScript for a website that hosts your email, but you wouldn't want a random website that contains a piece of malware to use it.</p> <p>See the original guidelines for details about configuring and using your secured browser. The following sections describe how to use the reference implementations.</p> <p><b>Mozilla Firefox</b></p> <p>The implementation of the recommended settings for Mozilla Firefox 2.x and Firefox 3.x is available in a <tt>user.js</tt> file. To use these settings:</p> <ol>     <li>Install <a href="https://addons.mozilla.org/firefox/addon/722">NoScript</a> using Firefox.</li>     <li>Download the <a href="/downloads/sywb/user.js"><tt>user.js</tt></a> <small>[<a href="/downloads/sywb/user.js.sig">sig</a>]</small> file into your <a href="http://kb.mozillazine.org/Profile_folder_-_Firefox#Finding_the_profile_folder">Firefox profile location</a>.</li>     <li>Restart Firefox.</li> </ol> <p>The settings specified in the <tt>user.js</tt> file will override any of the corresponding settings that you have set. The advantage of this behavior is that if the <tt>user.js</tt> file is removed, then Firefox will behave as it did before the change. The disadvantage is that the settings that are specified in this file cannot be set by using the Firefox preferences GUI.</p> <p>To apply site-specific security settings, use the NoScript add-on. This component gives the browser the ability to whitelist sites so that you can enable features such as JavaScript, Java, and other plug-ins. You can add a site to the whitelist either permanently or temporarily (until the browser is closed) by clicking the <a href="https://www.cert.org/tech_tips/securing_browser/#noscript">NoScript icon</a>.</p> <p><b>Internet Explorer</b></p> <p>The recommended settings for Internet Explorer 6 and Internet Explorer 7 are available as a Windows registry file. To incorporate these changes, simply open the <a href="/downloads/sywb/ie_sywb.reg"><tt>ie_sywb.reg</tt></a> <small>[<a href="/downloads/sywb/ie_sywb.reg.sig">sig</a>]</small> file to merge the changes into the registry. Note that this will overwrite the existing security settings for the web browser. If you use Internet Explorer 7, you can undo the changes by clicking the &quot;Reset all zones to default level&quot; button.</p> <p>To apply site-specific security settings, use the Security Zones feature of the browser. The Internet Zone, which is the default zone for sites on the internet, is locked down with high security settings, while the Trusted Sites Zone is configured to be the equivalent of the default Internet Zone for Internet Explorer. This way, Internet Explorer uses high security settings by default, and as you encounter sites you trust that need extra features, you can add them to the Trusted Sites zone. The easiest way to add a site to the Trusted Sites zone is to</p><ol><li>double-click the zone indicator icon near the bottom right side of the screen</li><li>click the Trusted sites icon</li><li>click the Sites... button</li></ol><p>This dialog allows the user to add the current or other sites to the Trusted Sites zone. Wildcards are also supported. For example, a user can add &quot;*.cert.org&quot; to the list, and any site that resides on the cert.org domain will be trusted.</p> <p>The initial reaction to a secured web browser may be that sites no longer work, because you are now responsible for deciding which sites can use features that may provide additional functionality but at the same time are more dangerous, such as ActiveX and Signed Java Applets. As time goes on, the sites that you visit regularly will be added to your Firefox NoScript whitelist or Internet Explorer Trusted Sites Zone, and those sites should work fine with minimal user interaction. However, you now have significant protection against malicious web sites, including sites that you have not visited before, such as one that may be linked to from a malicious email message, or sites that you may reach when a trusted site is compromised with an injected IFRAME to a malicious site. In both of these cases, you will be protected against the majority of vulnerabilities that affect web browsers.</p> <p>One tip to getting sites to work properly with your secured browser is to be aware that some sites use multiple domains, several of which may require restricted features, such as JavaScript. For example, a Yahoo! Mail user would need to allow both <tt>*.yahoo.com</tt> and <tt>*.yimg.com</tt>. Or YouTube users would need to enable both <tt>*.youtube.com</tt> and <tt>*.ytimg.com</tt>. NoScript clearly indicates which domains are available to add to the whitelist; however, Internet Explorer does not have this ability.</p><p><b>Customization</b></p><p>Both the Mozilla Firefox and Microsoft Internet Explorer reference files are annotated to describe which settings they will change. Feel free to view and modify them to suit your own needs if necessary.</p>]]>
    </content>
</entry>

<entry>
    <title>Recommendations to vendors for communicating product security information</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2008/11/recommendations_to_vendors_for_communicating_product_security_information.html" />
    <id>tag:www.cert.org,2008:/blogs/vuls//1.27</id>

    <published>2008-11-20T21:10:00Z</published>
    <updated>2008-11-20T21:10:41Z</updated>

    <summary>Hi, this is Chad Dougherty of the Vulnerability Analysis team. One of the important roles that our team plays is coordinating vulnerability information among a broad range of vendors. Over the years, we have gained a considerable amount of experience...</summary>
    <author>
        <name>Chad Dougherty</name>
        
    </author>
    
        <category term="Disclosure" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Hi, this is Chad Dougherty of the Vulnerability Analysis team. One of the important roles that our team plays is coordinating vulnerability information among a broad range of vendors. Over the years, we have gained a considerable amount of experience communicating with vendors of all shapes and sizes. Based on this experience, we can offer some guidance to vendors about communicating product security issues.</p>]]>
        <![CDATA[<p style="text-align: left;">Just to be clear, we're talking about product security as opposed to security products. <i>Product security</i> involves vulnerabilities caused by programming or design defects, insecure default or recommended deployment configurations, and other similar issues. These issues potentially affect any product offered by a vendor, including <i>security products</i> such as firewalls, antivirus, and authentication services. This distinction is likely obvious to most readers, but we've seen confusion about it before so it makes sense to clarify.<br /> <br /> First, let's address the topic of receiving information about product security. Vendors should provide a persistent and reliable mechanism for researchers to report vulnerabilities. We agree with statements that, for most vendors, it's a matter of &quot;when&quot; you'll receive a report of a vulnerability affecting your products, not a matter of &quot;if.&quot;&nbsp; Here are some specific recommendations:</p> <ul>     <li><b>Provide an easily identifiable role email address specifically for product security issues</b><br />     In our experience, it's extremely beneficial for the vendor to provide a role email address (e.g., a shared mailbox or an alias) for receiving information. Pick an intuitive and memorable name for the role address, such as &quot;product-security@&quot;, &quot;security-team@&quot;, &quot;security-response@&quot;, or &quot;secure@&quot;. Note that &quot;security@&quot; may not be a viable option because <a href="http://tools.ietf.org/html/rfc2142">IETF RFC 2142</a> suggests using that mailbox name for reporting or inquiring about network operational security issues. Sites that have implemented the recommendations in this RFC may have already allocated that name, and external sites that are familiar with the recommendation may resist sending other types of messages to that address.<br />     <br />     Even if this address only has a small number of recipients, having a fixed point of contact is valuable to external parties. Avoid using individuals as direct points of contact because of the potential problems that can be caused by job changes. Vulnerability reporters get frustrated when messages to individuals bounce or when they learn that the individual is no longer connected with the product(s) in question. While there is some additional management overhead in maintaining a role address, our experience indicates that it's a worthwhile investment. Giving members of the product security group the ability to respond from this role address provides additional consistency to external parties.<br />     <br />     We discourage the use of standard email addresses such as &quot;info@&quot;, &quot;support@&quot;, and &quot;webmaster@&quot; for the security point of contact because security reports sent to these addresses can easily be overlooked or mishandled.</li> </ul> <ul>     <li style="text-align: left;"><b>Provide a web-based reporting form<br />     </b>A web-based reporting form allows vendors to collect reports in a well-structured manner so that the reports can potentially be searched and managed more efficiently. The form also provides a slightly easier mechanism for vulnerability reporters who may wish to remain anonymous. You may want to consider <a href="https://forms.cert.org/VulReport/">our vulnerability reporting form</a> for ideas about how to construct your own page.</li> </ul> <ul>     <li style="text-align: left;"><b>Use cryptography if possible<br />     </b>The vulnerability reports you will receive may contain sensitive information that could be damaging to users or customers if it were exposed to an unauthorized source. Publishing an encryption key corresponding to the role address mentioned above allows researchers, especially those that consider confidential reporting part of the responsible disclosure process, to securely communicate vulnerability reports. If you think the importance of crypto in the vulnerability reporting process is exaggerated, consider this example: We once sent an encrypted mail containing sensitive information to an external researcher. We received a response from the individual telling us how relieved he was that we encrypted the message because his ISP's POP server was discovered to be compromised not long after we sent the message. Disclosure of the information would've had negative implications for a considerable number of parties.<br />     <br />     We use PGP in our processes, but vendors may choose to offer PGP, S/MIME, or both.&nbsp; Maintaining crypto keys also lets vendors sign patches, support bulletins, or advisories. Users can then verify the authenticity of these publications before taking any of the actions they prescribe. Signing can be done with the same key used to receive reports or with a separate signing-only key, depending on the key management practices a vendor chooses to follow. As with the email alias mentioned above, there is some additional overhead in maintaining keys; however, it's been our experience with this, too, that the benefits can outweigh the costs if managed appropriately. The U.S. National Institute of Standards and Technology (NIST) maintains some <a href="http://csrc.nist.gov/groups/ST/toolkit/key_management.html">good resources</a> for key management policies.</li> </ul> <p style="text-align: left;"><br /> Note that we haven't provided any recommendations here about what vendors should actually <b>DO</b> when they receive product security reports. That is a separate topic that we'll try to cover in a future post.<br /> <br /> Because communication should be a bidirectional process, let's next consider the publication of product security information.&nbsp; Here are some specific recommendations:</p> <ul>     <li style="text-align: left;"><b>Provide a &quot;slash security&quot; web page<br />     </b>One of the first places users and potential vulnerability reporters will visit to learn about a vendor's product security is the &quot;/security&quot; page on the vendor's main website (e.g., &quot;http://www.example.com/security&quot;). Ideally, this page will be the primary focal point for everything related to product security. We recommend that it contain or refer to, as appropriate, the following content:<ul>     <li style="text-align: left;">product security bulletins and advisories</li>     <li style="text-align: left;">product security contact information, including all of the resources described above</li>     <li style="text-align: left;">security patches and updates</li>     <li style="text-align: left;">documents (e.g., whitepapers, FAQs, support bulletins, electronic books) describing best practices for secure deployment or operation</li>     <li style="text-align: left;">documents describing secure development practices involving relevant products</li> </ul></li>   <p style="text-align: left;">In some cases, vendors have already devoted the &quot;/security&quot; page to their security product offerings (recall the distinction we described above). Vendors often have a lot of time and money invested in their site layout, so it's unreasonable to expect them to redesign. In these cases, we encourage vendors to include a reference to product security somewhere on the &quot;/security&quot; page, possibly redirecting to a &quot;/support/security&quot; or &quot;/product-security&quot; page, for example.&nbsp; Having &quot;Security&quot; as a dropdown option from a &quot;Support&quot; menu is also helpful.<br /> <br /> We have received positive feedback about vendors that provide good product security pages, and, from a public perception standpoint, it's perhaps the single most valuable security-related resource you can provide.</p> </ul> <ul>     <li style="text-align: left;"><b>Offer security mailing list subscription<br /></b>Sending copies of security advisories (or notifications of their availability on the web) to a mailing list is an effective way to get your users and customers to take action in mitigating a vulnerability. We regularly tell users to subscribe to this type of mailing list for the products they use whenever the lists are available. As with other publications mentioned above, email messages sent to these lists should be cryptographically signed to let users verify the authenticity of the message before taking action. A common technique attackers use is to send spoofed &quot;security advisory&quot; emails that contain malicious code in the form of &quot;security patches.&quot; To confirm authenticity, signing is crucial if you intend to email information to customers.</li> </ul> <p style="text-align: left;"><br /> We recognize that it may be counterproductive for vendors of specialized products or those that are used exclusively in critical deployments to publish product security information so broadly. In these cases, we encourage vendors to contact known customers directly or provide information in a way that is restricted to existing customers.<br /> <br /> One of the underlying themes in this post is the recommendation to centralize points of contact as much as possible. For vendors that have a small or closely related product lines, this centralization can be a straightforward process. However, we understand that many vendors are conglomerates that have a large number of independent divisions. We've dealt with instances where one affected product division had no idea another affected product division even existed. Mergers and acquisitions present another challenge to centralization. The general recommendation we can provide in these cases is to still create points of contact at the coarsest level possible. For example, a company with a network equipment division based in the U.S. and an automation systems division based in Germany might choose to set up &quot;www.bigcorp-networks.example/security/&quot; and &quot;www.bigcorp-automation.de.example/security/&quot; and ideally have links to both of these pages at &quot;www.bigcorp.example/security/&quot;. The same redundancy should apply to email contacts.<br /> <br /> Vendors' attention to product security is receiving increased scrutiny in security and IT communities.&nbsp; Presenting organized methods for communicating product security information is an important element to demonstrating to customers (both current and potential), security researchers, the media, and the general public that you have at least some awareness of and commitment to security.</p>]]>
    </content>
</entry>

<entry>
    <title>Filtering ICMPv6 using host-based firewalls</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2008/11/icmpv6_types_and_hostbased_fir.html" />
    <id>tag:www.cert.org,2008:/blogs/vuls//1.26</id>

    <published>2008-11-07T16:40:00Z</published>
    <updated>2008-11-07T16:39:52Z</updated>

    <summary><![CDATA[Hey, it's Ryan. This blog entry contains some quick recommendations about filtering certain ICMPv6 types using two host-based firewalls&mdash;Linux ip6tables and Microsoft Vista's advfirewall. If you have suggestions or other ideas, let me know....]]></summary>
    <author>
        <name>Ryan Giobbi</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Hey, it's Ryan. This blog entry contains some quick recommendations about filtering certain ICMPv6 types using two host-based firewalls&mdash;Linux ip6tables and Microsoft Vista's <a href="http://support.microsoft.com/kb/947709">advfirewall</a>. If you have suggestions or other ideas, <a href="mailto:cert@cert.org?subject=INFO%23875456">let me know</a>.</p>]]>
        <![CDATA[<p><a href="http://en.wikipedia.org/wiki/ICMPv6">ICMPv6</a> is a protocol that is an integral part of IPv6. ICMPv6 is defined in RFC <a href="http://tools.ietf.org/html/rfc4443">4443</a>, and additional functionality is described in later RFCs. IANA maintains a list of <a href="http://www.iana.org/assignments/icmpv6-parameters">ICMPv6 types</a> with links to the corresponding RFCs. It's not easy to have a functioning IPv6-enabled network without allowing some ICMPv6 types, so below are some examples of how to filter ICMPv6 on hosts using ip6tables and the Vista firewall.</p> <p>Consider these three disclaimers before reading further:</p> <ol>     <li>Don't use any of these rules in production without testing.</li>     <li>These rules may or may not apply to link local addresses. Proceed with caution.</li>     <li>The examples in this entry are not complete. More complete rules are <a href="http://www.cert.org/downloads/IPv6/ip6tables_rules.txt">available</a>.</li>     <li>The ICMPv6 types listed below can be represented by either rules or type codes.</li> </ol> <p>When it comes to building rules, RFC <a href="http://www.ietf.org/rfc/rfc4890.txt">4890</a>, &quot;Recommendations for Filtering ICMPv6 Messages in Firewalls,&quot; has done most of the hard work for us. Looking at section 4.4 and its subsections (we're focusing on host-based firewalls), various ICMPv6 types are assigned to four categories:</p> <ol>     <li>Traffic That Must Not Be Dropped: <br />     Types 1,2,3,4,128,129,130,131,132,143,148,149,151,152,153,133,134,135,136,141,142</li>     <li>Traffic That Normally Should Not Be Dropped:<br />     Types Type 3 - Code 1, Type 4 - Code 0</li>     <li>Traffic That Will Be Dropped Anyway -- No Special Attention Needed: <br />     Types 138,144,145,146,147</li>     <li>Traffic for Which a Policy Should Be Defined:<br />     Types 137,139,140,5-99,102,126</li> </ol> <p>The following example rules do not attempt to cover all the advice in RFC 4890. Instead, we'll get you started with some rules that take advantage of some of the new features offered by IPv6.</p> <p>First, let's set a default deny policy:</p> <ul>     <p><tt>ip6tables -P INPUT -j DROP</tt></p>     <p><tt>ip6tables -P OUTPUT -j DROP</tt></p> </ul> <p>The &quot;Traffic That Must Not Be Dropped&quot; section lists echo request (128) and echo response (129). An attacker could use echo requests (pings) as a DoS attack vector, so we might want to block or limit these requests. Since we're talking about host-based firewalls, we can't stop echo requests from reaching us, but we can limit how many of them we respond to:&nbsp;</p> <ul>     <p><tt>ip6tables -A INPUT -p icmpv6 --icmpv6-type 128 -m limit --limit 900/min -j ACCEPT </tt></p>     <p><tt>ip6tables -A OUTPUT -p icmpv6 --icmpv6-type 129 -m limit --limit 900/min -j ACCEPT</tt></p> </ul> <p>If our host uses DHCPv6 or we manually assign an IPv6 address and gateway, we don't need stateless auto-configuration. We can drop router advertisements and block router solicitations.</p> <p>You could disable the processing of router advertisements in the kernel using <a href="http://linux.die.net/man/8/sysctl">sysctl</a>, and this traffic is dropped by the default policy. For practice, let's reject instead of drop (note that these rules violate RFC 4890 and will break stateless autoconfig):</p> <ul>     <p><tt>ip6tables -A OUTPUT -p icmpv6 --icmpv6-type 133 -j REJECT</tt></p>     <p><tt>ip6tables -A INPUT -p icmpv6 --icmpv6-type 134 -j REJECT</tt></p> </ul> <p>The default setting of the <a href="http://technet.microsoft.com/en-us/library/cc785430.aspx">hop limit</a> field is usually set to 255 and gets decremented by one every time a router forwards a packet. Assuming the router works correctly, this next rule will only allow echo request and echo response messages to and from nodes on the local Ethernet segment. Using the hop limit value, we can allow certain types of traffic only from other nodes connected to the same router.</p> <p>You can adjust the rate to be anything that you think is reasonable. If you only want to use echo request and echo response with nearby nodes, the hl (hop limit) module can be useful. These rules restrict echo request and reply to packets that have 255 as the hop limit:</p> <ul>     <p><tt>ip6tables -A INPUT -p icmpv6 --icmpv6-type 128 -m limit --limit 900/min -m hl --hl-eq 255 -j ACCEPT</tt></p>     <p><tt>ip6tables -A OUTPUT -p icmpv6 --icmpv6-type 129 -m limit --limit 900/min -m hl --hl-eq 255 -j ACCEPT</tt></p>     <p><tt>ip6tables -A INPUT -p icmpv6 --icmpv6-type 128 -m limit --limit 900/min -m hl --hl-lt 255 -j DROP</tt></p>     <p><tt>ip6tables -A OUTPUT -p icmpv6 --icmpv6-type 129 -m limit --limit 900/min -m hl --hl-let 255 -j DROP</tt></p> </ul> <p>By default, the Windows Firewall in Vista (and Server 2008) drops inbound packets and allows outbound packets. Let's work on filtering rules for the &quot;Traffic for Which a Policy Should Be Defined&quot; section of RFC 4890.</p> <p>Use the following command to block router redirects (type 137):</p> <ul>     <p><tt>netsh advfirewall firewall add rule name &quot;block icmpv6 type 137&quot; dir=in action=block protocol=icmpv6:137,any</tt></p> </ul> <p>Although blocking router redirects on untrusted networks is probably a good idea, the default state of the Vista firewall doesn't explicitly allow that ICMPv6 type inbound, so we haven't done anything. Let's try something a little more advanced. This next rule allows ICMPv6 redirect messages, but only if the computer is using the &quot;domain&quot; profile. We could get similar functionality with ip6tables, but only if Networkmanager scripts are used (we might talk about this in a future blog entry).</p> <ul>     <p><tt> netsh advfirewall firewall add rule name &quot;allow icmpv6 type 137 for the domain profile&quot; dir=in action=allow protocol=icmpv6:137,any profile=domain</tt></p> </ul> <p>This rule implies that the computer is logged into a domain controller and has authenticated via Active Directory. Microsoft offers more information about the <a href="http://technet.microsoft.com/en-us/library/cc753545.aspx">profiles</a>.</p> <p>Administrators may worry about bandwidth on some links more than others. The following rule allows inbound echo requests on wired connections only:</p> <ul>     <p><tt>netsh advfirewall firewall add rule name &quot;allow icmpv6 type 128 when wired&quot; dir=in action=allow protocol=icmpv6:128,any inerfacetype=lan</tt></p> </ul> <p>The Vista firewall includes the ability to allow (or deny) connections that are authenticated by IPsec. The security= directive can also require that connections are authenticated (authenticate) or authenticated and encrypted (authenc):</p> <ul>     <p><tt>netsh advfirewall firewall add rule name &quot;allow icmpv6 type 128 when wired&quot; dir=in action=allow protocol=icmpv6:128,any security=authenticate</tt></p>     <p><tt>netsh advfirewall firewall add rule name &quot;allow icmpv6 type 128 when wired&quot; dir=in action=allow protocol=icmpv6:128,any security=authenc</tt></p> </ul> <p>If you'd like to learn more about configuring the Vista firewall by using netsh commands, see the Microsoft Technet article &quot;<a href="http://technet.microsoft.com/en-us/library/cc771920.aspx">Netsh Commands for Windows Firewall with Advanced Security</a>.&quot; The ip6tables documentation is in their <a href="http://manpages.ubuntu.com/manpages/intrepid/man8/ip6tables.html">man page</a>.</p> <p>If you're interested in ip6tables rules, we have a more complete <a href="http://www.cert.org/downloads/IPv6/ip6tables_rules.txt">list</a> that includes rules not mentioned in this blog entry.</p>]]>
    </content>
</entry>

<entry>
    <title>Reported Vulnerability in CERT Secure Coding Standards Website</title>
    <link rel="alternate" type="text/html" href="https://www.cert.org/blogs/vuls/2008/10/reported_vulnerability_in_secu.html" />
    <id>tag:www.cert.org,2008:/blogs/vuls//1.29</id>

    <published>2008-10-29T16:04:00Z</published>
    <updated>2008-10-29T16:04:42Z</updated>

    <summary><![CDATA[Hi, it's Will. Recently, a blog author reported that the CERT&reg; Secure Coding Standards website, which runs on Atlassian Confluence, contained a SQL injection vulnerability. After analyzing the report and discussing it with the Confluence vendor, we have concluded that...]]></summary>
    <author>
        <name>Will Dormann</name>
        
    </author>
    
        <category term="Analysis" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Web" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="https://www.cert.org/blogs/vuls/">
        <![CDATA[<p>Hi, it's Will. Recently, a blog author <a href="http://www.0x000000.com/?i=323">reported</a> that the CERT<sup>&reg;</sup> Secure Coding Standards website, which runs on Atlassian Confluence, contained a SQL injection vulnerability. After analyzing the report and discussing it with the Confluence vendor, we have concluded that the behavior described is not a vulnerability.</p>]]>
        <![CDATA[<p>On October 24, 2008, rvdh posted an entry on the 0x000000 blog that implied that the <a href="https://www.securecoding.cert.org">CERT Secure Coding</a> website contained a SQL injection vulnerability. This website runs Atlassian <a href="http://www.atlassian.com/software/confluence/">Confluence</a>, which is used by multiple organizations. If there were a publicly known SQL injection vulnerability in the Confluence software, it would have a pretty widespread effect on these organizations, CERT included. This prompted us to investigate the issue.</p><p>When performing a specific query to the Confluence software, an error and detailed stack trace is displayed to the user. From this error, rvdh draws the following conclusion: &quot;^ Oops, besides this hideous blob of intelligence it also let us modify the SQL query. Finally something really interesing to discuss at those cocktail parties or is it?&quot;</p><p>It is true that the stack trace is ugly, but that's about as far as the flaw goes. The malformed query does not make it to the SQL part of the Confluence code. If you look at the stack trace, you will notice that the error is generated by the <a href="http://hudson.zones.apache.org/hudson/job/Lucene-trunk/javadoc//org/apache/lucene/queryParser/QueryParser.html">QueryParser</a> component of <a href="http://lucene.apache.org/java/docs/">Apache Lucene</a>. It's not clear where rvdh draws the conclusion that you can modify the SQL query. Sure, you have control over what values might be used to perform the search, but that is expected.</p><p>Here is the response from Atlassian, which is the vendor that produces Confluence:</p><blockquote><p><i>The proposed &quot;attack&quot; supplies the server with an invalid search query that causes Confluence to display an error message. This is a bug only insofar as we don't present a better error message.</i></p><ul><li><i>The query in question is performed against the Lucene index. It is never passed anywhere near SQL, so it can not be used for SQL injection Lucene queries are read-only, so it is impossible for a search query to modify the index in any way, however constructed</i></li><li><i>Lucene queries are constructed programatically, so there is no way for the user-supplied portion of the query can effect the query's security constraints and view data that could not otherwise be found in a search by that user</i></li><li><i>As an application that is mostly used in intranets, Confluence's default error page is very wordy. Customers who want to limit the amount of information leaked during system errors can do so by editing their 500.jsp file to remove the backtrace and error information.</i></li><li><i>Even if this were an SQL query, Confluence uses standard prepared-statement-style parameter insertion to generate SQL queries. As such it is highly resistant to SQL injection attacks.</i></li></ul><p><i>For more information about Confluence security practices, and a list of all recorded Confluence security advisories, please see this page:<br /><br /></i><a href="http://confluence.atlassian.com/display/DOC/Confluence+Security"><i>http://confluence.atlassian.com/display/DOC/Confluence+Security</i></a></p></blockquote>]]>
    </content>
</entry>

</feed>
