<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ossi Salmi on Medium]]></title>
        <description><![CDATA[Stories by Ossi Salmi on Medium]]></description>
        <link>https://medium.com/@38fbf5a9?source=rss-5f43614830b2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*K-x85crNk0hoQWdt</url>
            <title>Stories by Ossi Salmi on Medium</title>
            <link>https://medium.com/@38fbf5a9?source=rss-5f43614830b2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:23:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@38fbf5a9/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Revisiting Isolated Networks in the Cloud]]></title>
            <link>https://medium.com/sensorfu/revisiting-isolated-networks-in-the-cloud-6d7372f85858?source=rss-5f43614830b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d7372f85858</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[computer-security]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Ossi Salmi]]></dc:creator>
            <pubDate>Mon, 21 Mar 2022 10:08:51 GMT</pubDate>
            <atom:updated>2022-03-21T10:08:51.916Z</atom:updated>
            <content:encoded><![CDATA[<p>We <a href="https://medium.com/sensorfu/isolated-networks-in-the-cloud-bf421701da7b">previously</a> tested how network isolation works on the major cloud platforms: Amazon AWS, Google GCP, and Microsoft Azure and concluded that only AWS was able to achieve true network isolation. Now we are revisiting those findings to see if the remaining issues have been addressed.</p><figure><img alt="The Cloud" src="https://cdn-images-1.medium.com/max/1024/1*DFNxBSUxCacfihAGEqL4rA.png" /></figure><p>On each of the platforms, we started with the same simple setup. An isolated VPC and subnet without any egress gateways attached to the network and a virtual server with no public IP address running SensorFu Beacon.</p><p>On AWS and GCP this setup worked as we expected. Without either public IPs or NAT, there were no leaks from direct connections to the Internet. On Azure however, we saw that Beacon was successfully calling home with multiple protocols and ports. We found out that networks without explicit outbound connectivity have an implicit <a href="https://docs.microsoft.com/en-us/azure/virtual-network/ip-services/default-outbound-access">default outbound access</a>. Adding a security group rule blocking egress Internet access stopped the leaks. This served as a reminder that proper firewalling is always important and, of course, reading the documentation.</p><p>With direct routes to the Internet plugged, it was time to address the remaining leak vector. This vector was common to all platforms.</p><h3>It’s Always DNS</h3><p>Each cloud platform has metadata servers that, among other things, provide recursive DNS resolution. If left unrestricted, this can be used to tunnel out of an otherwise isolated network. Last time we did these tests, only AWS allowed disabling the DNS service. Luckily things have improved since.</p><p>Previously, only AWS allowed you to <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html">disable</a> the DNS service and <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html">use your own</a> DNS servers. Since then the <a href="https://aws.amazon.com/about-aws/whats-new/2021/03/introducing-amazon-route-53-resolver-dns-firewall/">Route 53 Resolver DNS Firewall</a> has been introduced for more fine grained control.</p><p>We were glad to find out that both Azure and GCP have since introduced options to disable or filter the DNS service.</p><p>In Azure, the DNS service can be <a href="https://docs.microsoft.com/en-us/azure/virtual-network/what-is-ip-address-168-63-129-16#scope-of-ip-address-1686312916">blocked</a> by outbound security group rules. Custom DNS servers can then be <a href="https://docs.microsoft.com/en-us/azure/virtual-network/manage-virtual-network#change-dns-servers">configured</a> if needed.</p><p>GCP does not allow completely disabling the DNS service, but <a href="https://cloud.google.com/dns/docs/server-policies-overview#dns-server-policy-out">DNS server policies</a> can be used to forward all queries to your own server where they can be filtered.</p><p>With these improvements we could now create truly isolated networks on all three platforms. Still, the differences in default behavior and configuration between the platforms are easy to overlook, highlighting the importance of testing the policies.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d7372f85858" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sensorfu/revisiting-isolated-networks-in-the-cloud-6d7372f85858">Revisiting Isolated Networks in the Cloud</a> was originally published in <a href="https://medium.com/sensorfu">SensorFu</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lopsided routing, a stealthy hole punch into FortiGate]]></title>
            <link>https://medium.com/sensorfu/lopsided-routing-a-stealthy-hole-punch-into-fortigate-6f25b2805b9c?source=rss-5f43614830b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f25b2805b9c</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Ossi Salmi]]></dc:creator>
            <pubDate>Fri, 07 Jan 2022 08:01:35 GMT</pubDate>
            <atom:updated>2022-01-07T08:07:51.241Z</atom:updated>
            <content:encoded><![CDATA[<p>A critical infrastructure player found a way for traffic to leak out from their isolated network and asked us for help. They had updated their <a href="http://www.sensorfu.com/">SensorFu Beacon</a> to a version that included a new <a href="https://medium.com/sensorfu/internet-protocol-next-header-escape-248ab1574e7c">IP payload</a> test. After the update Beacon alerted the customer that IP protocol number 132, also known as SCTP protocol, is leaking out of the isolation to the Internet. Our products are good in finding these types of leaks, and typically they can be fixed in 15 minutes. But this time there were no quick fixes. This customer had a FortiGate firewall with default blocking policy enabled, really strict firewall rules in general, and there were no exceptions related to SCTP traffic.</p><p>Since configuration looked fine on the surface, we started to dig deeper in order to find the elusive root cause in a joint investigation with the Customer’s service provider.</p><p>We set up a simple test network with two virtual Linux servers running Beacon and Beacon Home applications, and a virtual FortiGate firewall in between.</p><figure><img alt="Test network diagram" src="https://cdn-images-1.medium.com/max/215/1*wXJvTlscqHkpVVydKGikqg.png" /><figcaption>Virtualized test network</figcaption></figure><p>First we wanted to validate the correct functionality of the FortiGate firewall in its default configuration. The firewall has a default deny all policy which should not let anything pass.</p><figure><img alt="Default FortiGate firewall rules" src="https://cdn-images-1.medium.com/max/1024/0*UIzUeX_Nn3gdLYLK" /></figure><p>After leaving the Beacon running overnight we could confirm that there were no leaks.</p><figure><img alt="No leaks seen in Beacon Home" src="https://cdn-images-1.medium.com/max/1024/0*U3T3WvSa1lVwfUjq" /></figure><p>We reported our results to our customer but the question still remained. Why are we not able to reproduce the leak?</p><h3>Enter Asymmetric Routing</h3><p>We got a hint from the service provider that the firewall is running in asymmetric routing mode. In asymmetric routing, the outbound packets and return packets of traffic flow travel different routes. This can happen, for example, in a redundant firewall setup. Asymmetric routing can cause problems when combined with stateful firewalls. If the firewall only sees the return packets, they are dropped as the firewall has no prior state information about the flow.</p><figure><img alt="Example asymmetric routing diagram" src="https://cdn-images-1.medium.com/max/317/1*elgW8Xny0nYHFRONfsP7Qg.png" /><figcaption>Asymmetric routing</figcaption></figure><p>The FortiGate firewall <a href="https://docs.fortinet.com/document/fortigate/7.0.2/administration-guide/139692/routing-concepts#Asymmetr">can be configured</a> to permit the return packets of asymmetrically routed flows to pass. We enabled this option while keeping everything else the same.</p><figure><img alt="Enabling asymmetric routing via CLI" src="https://cdn-images-1.medium.com/max/1024/0*VrnDzy1mAv5HHHar" /></figure><p>After a couple of hours we checked the results and found out that IP protocol 132, SCTP, was now indeed leaking through the firewall.</p><figure><img alt="Leaks observed in Beacon Home" src="https://cdn-images-1.medium.com/max/1024/0*VzEFf6TOn4tYbQtT" /></figure><p>The first assumption was that the asymroute option changes the behaviour of the default deny policy, so we added explicit rules to deny all incoming traffic on the port the Beacon was connected to, and another rule to deny IP protocol 132. Even so, the firewall was still leaking the SCTP traffic.</p><p>Then we found a <a href="https://community.fortinet.com/t5/FortiGate/Technical-Note-How-the-FortiGate-behaves-when-asymmetric-routing/ta-p/198575?externalID=FD39943">technical note</a> describing the asymmetric routing option in more detail, especially the handling of TCP and ICMP packets:</p><blockquote>If the packet is not a SYN and the session doesn’t exist (asymmetric routing), then all packets are passed to the CPU and the <strong>FortiGate doesn’t lookup for matching firewall policies</strong>.</blockquote><blockquote>For ICMP packets the rule is the same as for TCP packets. When asymmetric routing is enabled, if the ICMP packet is not a request and the session doesn’t exist on the FortiGate, the ICMP reply will be routed if a route exists on the routing table <strong>without security inspection</strong>.</blockquote><p>Turns out that enabling asymmetric routing allows the return packets of TCP and ICMP flows to bypass the firewall rules completely. What the technical note does not mention is that all SCTP packets also seem to bypass the firewall.</p><p>Beacon’s IP payload escape works by changing the protocol number in the IP header and sending it with the escape payload. Since the packets leak even though they are not actually valid SCTP packets, it is possible to bypass the firewall just by spoofing the protocol number.</p><p>This means that in this setup with the asymmetric routing option enabled, there is currently no way to completely isolate networks connected via this firewall product. Your mileage may vary if your setup has been configured for high availability or router redundancy and firewall states are properly synchronized between the gateway devices. Unfortunately with generic asymmetric routing you are in for a surprise, and it is used in the wild, so please check your setup.</p><p>PS. After turning asymmetric routing off again, SCTP leak stopped, but the firewall rule denying IP protocol 132 did not get any hits and the logs did not tell anything about the blocked SCTP packets. I bet this sort of stealth mode should not be there by design. :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f25b2805b9c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sensorfu/lopsided-routing-a-stealthy-hole-punch-into-fortigate-6f25b2805b9c">Lopsided routing, a stealthy hole punch into FortiGate</a> was originally published in <a href="https://medium.com/sensorfu">SensorFu</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>