tcp split handshake что это
What is TCP Split Handshake Attack and How it affect Server Security
Computer network and IT Security professionals know the furious discussion going on about the last NSS lab report. This report is about the recent experiment they have conducted with popular security products. They tested different security products in 6 different situations and one of them «TCP Split Handshake Attack» was very successful for most of the products they have tested. They successfully breached the security of most of the Firewall products from different vendors using TCP Split Handshake Attack method. So what is TCP Split Handshake Attack? How it is a threat for current network? If we refer RFC 793 we can see how a TCP connection is established. TCP (Transmission Control Protocol) is a connection-oriented protocol and thus it needs a handshaking process to establish a successful connection. Diagram provided below explains the working of a handshake process.
Before we go to Transmission Control Protocol Split Handshake, we should understand the process of three-way handshake to establish a connection. Consider a scenario where we have Two TCP devices A and B. Here A wants to start a TCP connection with B and so A acts as client and B acts as a server. In TCP connection the SYN\ACK packet is determining the server and client. So a proper TCP handshake is necessary to establish the correct server client relation. A simplified version of this process between A and B is given below.
ISN= Initial Sequence Number
Now let us check how it occurs. The above three-way handshake method can be written as below.
Step 5: Again the Three-way handshake continues and the server will be A and B will be a client. This process confuses the firewall.
The above error in three-way handshake leads to TCP Split Handshake Attack where Firewall will be confused to find the actual server and client. As a result, firewall thinks like B is the client (where in reality A is the client and requested connection) and it may lead to a security vulnerability. In this split signals, some products (where the signal is strange ) drop the entire connection but some respond to it in unexpected ways.
Многие аппаратные межсетевые экраны не защищают от атак с использованием TCP Split Handshake
Хотя возможность обхода некоторых систем обнаружения вторжения и правил межсетевых экранов с помощью так называемого TCP Split Handshake была найдена и опубликована больше года назад, многие из широко используемых аппаратных брандмауэров все еще неспособны распознать и блокировать ее.
Хотя возможность обхода некоторых систем обнаружения вторжения и правил межсетевых экранов с помощью так называемого TCP Split Handshake была найдена и опубликована больше года назад, многие из широко используемых аппаратных межсетевых экранов все еще неспособны распознать и блокировать ее. Такой вывод делают специалисты NSS Labs, протестировавшие шесть аппаратных межсетевых экранов разных производителей: Check Point Power-1 11065, Cisco ASA 5585, Fortinet Fortigate 3950, Juniper SRX 5800, Palo Alto Networks PA-4020, и SonicWall NSA E8500. В экспериментах NSS Labs только экран Check Point смог предотвратить установление соединения посредством TCP Split Handshake.
Атака с использованием TCP Split Handshake осуществляется со стороны сервера, который при установке соединения посылает клиенту нетрадиционным образом сконфигурированные пакеты TCP. В результате межсетевой экран может «не заметить», что клиент общается с сервером, расположенным за пределами локальной сети.
Не все производители согласны с выводами NSS Labs. В Fortinet и SonicWall утверждают, что их межсетевые экраны при правильной настройке защищают от TCP Split Handshake.
Поделитесь материалом с коллегами и друзьями
What is the TCP Split-Handshake Attack and Does It Affect Me?
If you’ve followed security news over the past few days, you’ve probably seen a lot of hoopla about a TCP split-handshake vulnerability that can affect firewalls and other networking and security devices. Many of the Media’s articles characterize this complicated TCP connection attack as, “a hacker exploit that lets an attacker trick a firewall and get into an internal network as a trusted IP connection” or as a “hole” in firewalls. I’m not sure that these descriptions properly characterize this vulnerability, and I suspect many administrators may not really understand how this attack works (let alone what it does and doesn’t allow an attacker to accomplish). I hope to try and rectify that in this post.
Before I jump into a description of this attack, WatchGuard XTM owners probably want to know if they are vulnerable to this attack. The answers is, No. Our XTM appliances do not allow TCP split-handshake connections. Furthermore, we also enable a feature called TCP SYN checking by default on our devices, which further protects against TCP state-based attacks. Later in this post, I’ll go into more detail on how we tested this, but for now, know that our appliances are not susceptible to this attack. With that out of the way, let’s look at this attack.
What is the TCP Split-Handshake Attack?
To understand the TCP split-handshake attack you need to understand how network devices build TCP connections. I’m going to assume you are familiar with the TCP three-way handshake. If not, this guide will walk you through it. Most network administrator understand this three-way handshake technique quite well, and many gateway security devices (like stateful firewalls) are designed to enforce it. However, less people know about another legitimate way to build TCP connections, called the simultaneous-open handshake. With a simultaneous open connection, both a client and server send a SYN packet to each other at about the same time. Then both sides also send ACK packets to each other in response. This slightly different variant of the TCP handshake doesn’t happen much in the real world, however, it’s a perfectly legitimate way to start a TCP connection (according to RFC 793).
This brings us to the TCP split-handshake (also sometimes called a Sneak ACK attack). As the name suggests, the split-handshake combines aspects of the normal three-way handshake with the simultaneous-open handshake. Essentially, a client sends a SYN packet to a server, intending to complete a normal three-way handshake. However, rather than completing the client’s three-way handshake, a malicious server starts by replying as though it were doing a simultaneous-open connection, and then starts its own three-way handshake in the other direction — from server to client. So in essence, even though the client started the connection to the server, the logical direction of this connection gets reversed.
This is a fairly quick and high-level description of this attack. If you are a technically oriented person that wants to know the nitty-gritty details, I highly recommend you read, The TCP Split Handshake: Practical Effects on Modern Network Equipment. It is the defacto document describing this attack. If you just want the highlights, I also recommend this article. It characterizes the attack well, without diving too deep into the technical detail.
So What Can an Attacker Accomplish with this Attack?
OK. At a high-level, you now know that the TCP split-handshake attack is a sneaky way that a malicious server can reverse the logical direction of a connection that a client initiates. But what exactly does that mean? What can an attacker do with that, and how bad is it?
First, you should know that this attack cannot punch holes in your firewall, willy-nilly, without user interaction. A key mitigating factor to the attack is that a client within your network must first make a connection to a malicious server on the internet, before this attack can even start. Some of the descriptions of the attack, which claim an external attacker can trick a firewall into giving them access as a trusted IP, seem to leave this fact out. So if you were worried that external attackers can just hop through your firewall on their own, don’t be.
Furthermore, when this attack succeeds, the attacker isn’t even getting free reign on the victim computer or your network either, instead the attacker has only reversed the logical direction of your client’s initial connection. This could be bad, as I will explain in a second, but it is not immediate full access to the victim computer or your network.
What this attack really comes down to is an IPS (or other security content-filtering) evasion attack. The key issue is this attack logically reverses the direction of a perfectly legitimate connection your client initiated. This doesn’t really mean the attacker can do anything new on the victim computer, but it may confuse gateway security scanning services that protect your client. Many security systems, like IPS, antivirus (AV), and other content-filtering systems rely on the direction of traffic to decide how to scan it, or even if they will scan it. If an attacker can confuse the gateway devices as to the direction of traffic, it may be able to evade security scanning or IPS policies.
Let’s look at a real world example. Say an unpatched client in your network connects to a malicious drive-by download web server that is not leveraging the split-handshake attack. The malicious web site tries to get your client to execute some javascript that forces your client to download malware. If you have gateway IPS and AV, your IPS may detect the malicious javascript, or your AV may catch the malware. In either case, your security scanning would block the attack.
However, if the malicious web server adds the TCP split-handshake connection to the same attack, your IPS and AV systems may be confused by the direction of the traffic, and not scan the web server’s content. Now the malicious drive-by download would succeed, despite your gateway security protection.
So to summarize, the TCP split-handshake attack may help malicious servers to bypass security scanning services on your gateway security devices. However, it will not allow external attackers to bypass your firewall policies, and it requires an internal client start the connection in the first place.
Is My X-brand Network Device at Risk?
Now you know the true impact of TCP split-handshake attacks. They don’t allow attackers to totally bypass firewalls without user interaction, but they could help attackers evade your security services, assuming your clients connect to them. The next question is, are my network devices vulnerable?
To help you answer that question, I’m going to share how I tested WatchGuard’s XTM appliances.
The authors of the paper I mentioned earlier (The TCP Split Handshake: Practical Effects on Modern Network Equipment) included a special Ruby script in their paper called fakestack.rb. This script sets up a server on port 8080, that listens for incoming connections, and replies to those connection using the TCP split-handshake connection method. If this malicious connection succeeds, the script reports, “The handshake’s a LIE!” You can use this script to test your network equipment, and see whether or not it allows TCP split-handshake connections to complete.
I recommend you use fakestack.rb with a Linux computer. I used my Backtrack 4 installation. Fakestack.rb requires another ruby script called PacketFu, which in turn requires something called PcapRub. The whitepaper above explains these dependencies. Once your have all this installed, you simply have to disable your computer’s local host firewall (on 8080 at least), and run fakestack.rb (sudo fakestack.rb eth0 8080).
Once you have fakestack running, I recommend you first get a client to connect to it directly, without any firewall or gateway device in the mix. This way you can see what happens when the split-handshake connection succeeds. Open a web browser (IE or Firefox) on a Windows computer that is on the same network, and try to connect to the IP of the computer running fakestack, on port 8080 (http://x.x.x.x:8080). You will not see anything in the web browser. However, if you look at fakestack’s output, you will see it generating packets, sending certain replies, and if the attack works, it returns that “handshake’s a lie” message.
Once you have fakestack working, testing your own network gear is simple. Simply put the fakestack computer on the external side of your firewall, IPS, or security appliance, and get an internal client to try to connect to fakestack. If fakestack returns the handshake is a lie message, then you know your security gear may be vulnerable to this attack. However, if you don’t get the handshake is a lie message, fakestack wasn’t able to complete the split-handshake connection, and your device must be doing something to prevent it.
This is the test I did with our XTM appliances. When a client behind an XTM appliance tries to connect to fakestack, the connection never completes. Meanwhile, the XTM logs report:
2011-04-15 19:18:37 Deny 192.168.39.204 192.168.39.38 63316/tcp 8080 63316 0-External Firebox tcp syn checking failed 40 31 (Internal Policy) proc_id=”firewall” rc=”101″ tcp_info=”offset 5 A 1845100933 win 64″ |
2011-04-15 19:18:37 Deny 192.168.39.204 192.168.39.38 63316/tcp 8080 63316 0-External Firebox Denied 44 31 (Unhandled External Packet-00) proc_id=”firewall” rc=”101″ tcp_info=”offset 6 S 794513233 win 64″ |
Our packet handling engine does not recognize split-handshake connections as legitimate connections. Furthermore, split-handshakes trigger our TCP syn checking feature too, which is enabled by default.
This test shows that WatchGuard devices don’t allow split-handshake connections. You can use the same test to figure out whether or not your other network security devices handle TCP split-handshake connections properly.
Summary
I hope this post helped clear up some potential misinterpretations about this complex vulnerability, and has shown you its true severity and impact. Feel free to share your thoughts and ideas about this flaw in the comments section. I find it quite interesting and would love to discuss it. — Corey Nachreiner, CISSP. (@SecAdept)
Распространенные файрволы содержат уязвимости, позволяющие вторжение в сеть
Реверс малвари
Некоторые из наиболее распространенных брандмауэров подвержены уязвимостям,
которые дают атакующим возможность обмануть файрвол и пробраться во внутреннюю
сеть на основе доверенного IP-соединения.
В NSS Labs недавно протестировали полдюжины сетевых брандмауэров для того,
чтобы выявить слабые места в системах безопасности и выяснили, что все, кроме
одного из них, являются уязвимыми для типа атаки, которая называется «TCP Split
Handshake Attack», которая позволяет хакеру, находясь на расстоянии, обманывать
брандмауэр и заставлять его считать, что то или иное IP-соединение является
доверенным.
На этой неделе
NSS Labs
опубликовала документ об исследовании «Network
Firewall 2011 Comparative Test Results», содержащий его результаты. NSS Labs
– хорошо известная организация, занимающаяся тестированием продуктов,
оценивающая широкий спектр систем безопасности, проводящая как спонсируемые
производителями сравнительные тесты, так и совершенно независимые тесты по
собственной инициативе. Network Firewall 2011 Comparative Test, опубликованный
на этой неделе, принадлежит к независимой группе тестов, поэтому NSS Labs взяла
все расходы на себя.
NSS Labs провели независимые тесты Check Point Power-1 11065, Cisco ASA
5585-40, Fortinet Fortigate 3950, Juniper SRX 5800, Palo Alto Networks PA-4020 и
SonicWall NSA E8500.
Мой отметил, что производители неохотно принимают участие в тестах, которые
проводит NSS Labs и что на самом деле около половины файрволов были
предоставлены конечными пользователями, такими, например, как фирмы,
занимающиеся предоставлением финансовых услуг, которые поддержали тест, потому
что хотели узнать о возможных уязвимостях в используемых ими брандмауэрах.
В докладе NSS Labs сказано: «Пять из шести продуктов позволили удаленным
атакующим обойти брандмауэр и стать внутренним доверенным компьютером».
Единственный брандмауэр из протестированных NSS Labs, который не позволил этого
сделать, был Check Point.
Производители, чье оборудование не прошло тест «TCP Split Handshake»,
находятся на различных стадиях исправления проблемы, указывает доклад.
Говорят, что Cisco в настоящее время работает с NSS Labs над этим делом и
«рекомендации будут предоставлены как только они будут готовы».
«По умолчанию, Juniper не задействует защиту от TCP Split Handshake attack»,
но NSS labs рекомендует, чтобы клиенты Juniper изучили конфигурации своих
файрволов и следовали рекомендациям, представленным в докладе. Эксперты NSS Labs
предупреждают, что «защита может негативно повлиять на производительность и/или
привести к сбоям в работе приложений, которые не используют TCP должным
образом».
Доклад NSS Labs также включает анализ цен всего протестированного
программного обеспечения, а также количество средств, необходимых для
пользования им.
Многие аппаратные межсетевые экраны не защищают от атак с использованием TCP Split Handshake
Хотя возможность обхода некоторых систем обнаружения вторжения и правил межсетевых экранов с помощью так называемого TCP Split Handshake была найдена и опубликована больше года назад, многие из широко используемых аппаратных межсетевых экранов все еще неспособны распознать и блокировать ее. Такой вывод делают специалисты NSS Labs, протестировавшие шесть аппаратных межсетевых экранов разных производителей: Check Point Power-1 11065, Cisco ASA 5585, Fortinet Fortigate 3950, Juniper SRX 5800, Palo Alto Networks PA-4020, и SonicWall NSA E8500. В экспериментах NSS Labs только экран Check Point смог предотвратить установление соединения посредством TCP Split Handshake.
Атака с использованием TCP Split Handshake осуществляется со стороны сервера, который при установке соединения посылает клиенту нетрадиционным образом сконфигурированные пакеты TCP. В результате межсетевой экран может «не заметить», что клиент общается с сервером, расположенным за пределами локальной сети.
Не все производители согласны с выводами NSS Labs. В Fortinet и SonicWall утверждают, что их межсетевые экраны при правильной настройке защищают от TCP Split Handshake.
Проведенный в США, Великобритании и Австралии по заказу компании SailPoint опрос показал: уходя из компании самостоятельно или получая уведомление об увольнении, бывшие сотрудники вполне способны прихватить с собой доступную им порцию конфиденциальных сведений с целью их последующего использования или продажи.
В 2007 году компания News International провела внутреннее расследование случаев подслушивания телефонов. Обнаруженные тогда электронные письма были переданы полиции только 20 июня этого года. Как утверждают источники BBC, содержание писем явно говорит о нарушении безопасности королевской семьи.
Компания «Кабест» (группа «Астерос») стала эксклюзивным партнером FortConsult – международного эксперта по угрозам безопасности платежных и банковских систем. На российском рынке ИБ-интегратор будет оказывать консалтинговые услуги по приведению информационной системы организаций в соответствие требованиям стандарта Payment Card Industry Data Security Standard.
Глобальное исследование, проведенное Check Point и Ponemon показывает, что предприятия сталкиваются с ростом проблем, связанных с управлением информационной безопасностью, соблюдением требований и отсутствием осведомленности пользователей.