{"id":2995,"date":"2016-09-02T13:29:00","date_gmt":"2016-09-02T13:29:00","guid":{"rendered":"https:\/\/www.thesslstore.com\/blog\/?p=2995"},"modified":"2017-06-07T07:27:18","modified_gmt":"2017-06-07T11:27:18","slug":"linux-tcp-flaw","status":"publish","type":"post","link":"https:\/\/www.thesslstore.com\/blog\/linux-tcp-flaw\/","title":{"rendered":"Linux TCP Flaw Allows Hackers to Modify Internet Traffic"},"content":{"rendered":"<h2>Linux systems and Android have been vulnerable since 2012.<\/h2>\n<p>In early August, researchers at University of California, Riverside and the US Army Research Laboratory published their discovery of a vulnerability in a recent addition to TCP. They found that systems running the Linux operating system could easily be attacked due to this vulnerability.<\/p>\n<p>The vulnerability allows an attacker to know if any two computers on the internet have an open TCP connection. If they do, the attacker can use that information to monitor, track, modify, or terminate the connection. If the connection is unencrypted (HTTP), the attacker can perform content injection.<\/p>\n<p>TCP is part of the TCP\/IP suite, the main communication protocol of the internet. Every time you visit a website, you are using TCP without even knowing it \u2013 the HTTP (or HTTPS) connection your browser makes with that site is operating on top of a TCP connection.<\/p>\n<p>This vulnerability is significant because it can be executed by an <em>off-path<\/em> attacker. Being on or off the path refers to where the attacker\u2019s computer is located relative to the targets. Being off-path means the attacker does not have to be directly involved in the connection or able to monitor the connection, often referred to as a \u201cman in the middle.\u201d An off-path attack can be executed by essentially anyone else on the internet.<\/p>\n<p>This Linux TCP flaw does not have a formal name\u00a0but is known as <a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2016-5696\">CVE-2016-5696<\/a>, a unique identifier given to known vulnerabilities by the <a href=\"https:\/\/cve.mitre.org\/about\/faqs.html#a1\">Common Vulnerabilities &amp; Exposures<\/a> (CVE) program.<\/p>\n<p>Any vulnerability affecting TCP is quite severe simply due to how widely the protocol is used. This Linux TCP flaw is particularly \u00a0dangerous due to ease and speed of execution, and its high success rate. Luckily, this vulnerability can only affect systems that have implemented a more recent specification of TCP, known as <a href=\"https:\/\/tools.ietf.org\/html\/rfc5961\">RFC 5961<\/a>, though the number of affected systems is still quite large.<\/p>\n<p>RFC 5961 is a technical standard that was created to fix an unrelated security problem. \u201cUnfortunately,\u201d the researchers wrote, \u201cone of the most recent specifications intended to improve security creates an even more serious vulnerability.\u201d<a href=\"#_ftn1\" name=\"_ftnref1\">[1]<\/a><\/p>\n<p>RFCs (Request for Comments) are documents produced by the IETF (Internet Engineering Task Force) that define technical standards. They are publicly posted to receive reviews from others in the community, where they are (hopefully) improved through successive drafts. A lot of technologies we are familiar with \u2013 like HTTP and SSL\/TLS \u2013 are designed through this process.<\/p>\n<p>Linux is the only major operating system known to implement this standard. The features of RFC 5961 were implemented in the Linux kernel in 2012 (in version 3.6), and <a href=\"https:\/\/git.zx2c4.com\/linux\/commit\/?id=75ff39ccc1bd5d3c455b6822ab09e533c551f758\" rel=\"nofollow\">the problems were fixed<\/a> in early August in version 4.7. This also means that <a href=\"https:\/\/arstechnica.com\/security\/2016\/08\/linux-bug-leaves-1-4-billion-android-users-vulnerable-to-hijacking-attacks\/\" rel=\"nofollow\">around 80% of Android devices are vulnerable<\/a>\u00a0because they are based on the Linux kernel.<\/p>\n<p>Windows and Mac OS never implemented RFC 5961 and are therefore not vulnerable.<\/p>\n<h2>Executing The Attack<\/h2>\n<p>This vulnerability allows an attacker to learn if a TCP connection exists between two computers, reset or terminate said connection, and possibly perform content injection on that connection.<\/p>\n<p>To execute the attack, all that\u2019s needed is the IP address of both parties in the connection (the TCP connection also needs to stay open long enough to exploit the vulnerability). Only one party in the connection needs to be vulnerable. In this case, the most common target would be web servers running affected versions of Linux.<\/p>\n<p>\u201cGiven any two arbitrary hosts, it takes only 10 seconds to successfully infer whether they are communicating. If there is a connection, subsequently, it takes also only tens of seconds to infer the TCP sequence numbers used on the connection.\u201d The entire attack, on average, takes less than a minute to execute\u00a0and has a success rate between 88 to 97%.<a href=\"#_ftn2\" name=\"_ftnref2\">[2]<\/a><\/p>\n<p>Because the attack can work off-path, this can be an incredibly powerful tool because the attacker does not need to be in the privileged position of controlling part of the path of the connection.<\/p>\n<p>In the worst case scenario, the attacker can inject content into the connection. This can be used to essentially take control of the connection and maliciously modify the page. The researchers demonstrated this in a connection to USA Today\u2019s website in a <a href=\"https:\/\/www.youtube.com\/watch?v=S4Ns5wla9DY\" rel=\"nofollow\">video<\/a> (which won\u2019t look like much if you aren\u2019t familiar with internet networking).<\/p>\n<p>However, content injection cannot occur if the connection is secured with HTTPS. Encrypted connections are only vulnerable to identification and termination.<\/p>\n<p>The researchers also warned that RFC 5961 is written in a way that may result in other developers making the same mistake. Zhiyun Qian told Ars Technica, \u201cI want to say that the RFC is written in a way that if OSes implement it straightforwardly, it is going to be problematic.\u201d<a href=\"#_ftn3\" name=\"_ftnref3\">[3]<\/a><\/p>\n<p>Their paper, Off-Path TCP Exploits: Global Rate Limit Considered Dangerous\u201d, was a finalist in the <a href=\"https:\/\/www.facebook.com\/notes\/protect-the-graph\/2016-internet-defense-prize-winner-brings-new-hope-for-post-quantum-key-exchange\/1755703334669810\" rel=\"nofollow\">2016 Internet Defense Prize<\/a>, an award given to notable research in internet security, by Facebook and <a href=\"https:\/\/www.usenix.org\/\">USENIX<\/a>.<\/p>\n<h2>Patching The\u00a0Linux TCP Flaw<\/h2>\n<p>All Linux kernel versions between 3.6 and 4.7 are affected. If you are running Linux, particularly if you are running a web server, you should see if your specific distribution is affected.<\/p>\n<p>Since this research was published in early August, Many distributions including <a href=\"https:\/\/security-tracker.debian.org\/tracker\/CVE-2016-5696\">Debian<\/a>, <a href=\"https:\/\/bugzilla.redhat.com\/show_bug.cgi?id=1354708\" rel=\"nofollow\">Fedora<\/a>, and <a href=\"https:\/\/people.canonical.com\/~ubuntu-security\/cve\/2016\/CVE-2016-5696.html\">Ubuntu<\/a> have released a patch.<\/p>\n<p>If there is no official patch available, the researchers have also recommended a temporary patch which \u201csimply raises the \u2018challenge ACK limit\u2019 to an extremely large value to make it practically impossible to exploit\u201d this vulnerability:<\/p>\n<pre>Open \/etc\/sysctl.conf, append a command \u201cnet.ipv4.tcp_challenge_ack_limit = 999999999\u201d.\r\n\r\nUse \u201csysctl -p\u201d to update the configuration. <a href=\"#_ftn4\" name=\"_ftnref4\">[4]<\/a>\r\n<\/pre>\n<p>This Linux TCP flaw is a pretty big deal, but the good thing about serious vulnerabilities is that they get\u00a0patched quickly, and hopefully we won\u2019t see any more problematic implementations of RFC 5961.<\/p>\n<hr \/>\n<p><a href=\"#_ftnref4\" name=\"_ftn4\">[4]<\/a> https:\/\/ucrtoday.ucr.edu\/39030<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux systems and Android have been vulnerable since 2012. In early August, researchers at University of California, Riverside and the US Army Research Laboratory published their discovery of a vulnerability&#8230;<\/p>\n","protected":false},"author":2,"featured_media":2997,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":"","tve_updated_post":"","tve_custom_css":"","tve_user_custom_css":"","tve_globals":{},"tcb2_ready":0,"tcb_editor_enabled":0,"tve_landing_page":"","_tve_header":"","_tve_footer":""},"categories":[16],"tags":[200,199,197,198],"class_list":["post-2995","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hashing-out-cyber-security","tag-android","tag-linux","tag-linux-tcp-flaw","tag-rfc-5961","post-with-tags"],"views":8524,"jetpack_featured_media_url":"https:\/\/www.thesslstore.com\/blog\/wp-content\/uploads\/2016\/09\/Depositphotos_74113563_m-2015.jpg","_links":{"self":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts\/2995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/comments?post=2995"}],"version-history":[{"count":0,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/posts\/2995\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/media\/2997"}],"wp:attachment":[{"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/media?parent=2995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/categories?post=2995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thesslstore.com\/blog\/wp-json\/wp\/v2\/tags?post=2995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}