{"id":91,"date":"2010-01-18T21:19:43","date_gmt":"2010-01-19T02:19:43","guid":{"rendered":"http:\/\/zitstif.no-ip.org\/?p=91"},"modified":"2010-01-18T23:58:24","modified_gmt":"2010-01-19T04:58:24","slug":"ssh2-how-i-love-thee","status":"publish","type":"post","link":"http:\/\/zitstif.no-ip.org\/?p=91","title":{"rendered":"SSH2, How I love Thee"},"content":{"rendered":"<p>A while ago, I read an article regarding SSH2 and an insecurity that it possessed. Being a person who depends on SSH2, I was highly intrigued about this insecurity.<\/p>\n<p>The insecurity involves with the handling of credentials in memory when a client is connecting to an openssh server. When the client is authenticating to the server, on the server side, the password in memory is in clear text. So, this attack is merely a local one. For one to worry about this attack, they would have to have their openssh server compromised and the would attacker run the shell script that I wrote.<\/p>\n<p>I&#8217;m not taking credit for the discovery of this flaw. I merely wrote a program to automate the capture of the ssh client&#8217;s credentials. Once I find the discoverer of the flaw, I will post it. Keep in mind that this program isn&#8217;t perfect, but it does work.<\/p>\n<p>Here&#8217;s the program in plain text:<br \/>\n<a title=\"http:\/\/zitstif.no-ip.org\/capturessh2.txt\" href=\"http:\/\/zitstif.no-ip.org\/capturessh2.txt\" target=\"_blank\">http:\/\/zitstif.no-ip.org\/capturessh2.txt<\/a><\/p>\n<p>Here&#8217;s the program in a tar file:<a title=\"http:\/\/zitstif.no-ip.org\/capturessh2.tar\" href=\"http:\/\/zitstif.no-ip.org\/capturessh2.tar\" target=\"_blank\"><br \/>\nhttp:\/\/zitstif.no-ip.org\/capturessh2.tar<\/a><\/p>\n<p>MD5sum: f9ebfe85ff73641f06625a8c21261d4f<\/p>\n<p>#Tested to work on SSH-2.0-OpenSSH_4.7p1 Debian-8ubuntu1.2<br \/>\n#Tested to work on SSH-2.0-OpenSSH_5.1p1 Debian-5ubuntu1<br \/>\n#Tested to work on OpenSSH 5.2 (protocol 2.0) Fedora 11<\/p>\n<p>If you want to test this on your ssh server, first log into your ssh server and then execute the script with <strong>sudo.<\/strong><\/p>\n<p>Then posing as the victim yourself, login to the same ssh server and do your usual business and then log out.<\/p>\n<p>In the attacker&#8217;s console, you will see the victim&#8217;s user name and password that the used to authenticate in the ssh server.<\/p>\n<p>Also a quick side note, I&#8217;m reminded of a pretty nasty attack on ssh clients that can be performed with Ettercap. It&#8217;s known as a downgrade attack. Essentially, instead of the client authenticating through the Protocol 2.0 version of SSH, the attacker modifies the traffic in transmit and downgrades it to Protocol 1.0, which is susceptible to password sniffing via Ettercap.<\/p>\n<p>Here&#8217;s a link to a tutorial on how to perform this attack:<br \/>\n<a title=\"http:\/\/openmaniak.com\/ettercap_filter.php\" href=\"http:\/\/openmaniak.com\/ettercap_filter.php\" target=\"_blank\">http:\/\/openmaniak.com\/ettercap_filter.php<\/a><\/p>\n<p>This attack only affects servers that allow ssh 1.0 authentication, ergo it&#8217;s not a very high level of threat.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A while ago, I read an article regarding SSH2 and an insecurity that it possessed. Being a person who depends on SSH2, I was highly intrigued about this insecurity. The insecurity involves with the handling of credentials in memory when a client is connecting to an openssh server. When the client is authenticating to the &hellip; <a href=\"http:\/\/zitstif.no-ip.org\/?p=91\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SSH2, How I love Thee<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[13],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-code","tag-capturessh2"],"_links":{"self":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=91"}],"version-history":[{"count":4,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":93,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=\/wp\/v2\/posts\/91\/revisions\/93"}],"wp:attachment":[{"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zitstif.no-ip.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}