Package: dsniff
Version: 2.4b1-13
Severity: important
Tags: patch

Arpspoof sends ARP frames in long series without clearing frame buffer.
It causes current frame contains all previous frames.

1st frame is 42 bytes long, 2nd is 84 bytes long, 3rd is 126 bytes long.
Frame 36 is last that can be transmitted over Ethernet (36 * 42 bytes = 1512).
Frame 37 and any then are silently discarded by kernel (they are longer
then MTU).

Arpspoof do not check if frame has been sent properly. It inform that it have
sent frame, but it is not true.

This patch (08_arpspoof_write.dpatch) fix this issue (clears buffer every time, 
and adds check for
return code of libnet_write).

#! /bin/sh /usr/share/dpatch/dpatch-run
## 08_arpspoof_write.dpatch by Krzysztof Burghardt <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: clears buffer every time, and adds check for return code of libnet_write

@DPATCH@
diff -Naur dsniff-2.4b1~/arpspoof.c dsniff-2.4b1/arpspoof.c
--- dsniff-2.4b1~/arpspoof.c    2006-03-08 18:10:46.000000000 +0000
+++ dsniff-2.4b1/arpspoof.c     2006-03-08 18:19:46.000000000 +0000
@@ -44,6 +44,8 @@
 arp_send(libnet_t *l, int op, u_int8_t *sha,
         in_addr_t spa, u_int8_t *tha, in_addr_t tpa)
 {
+       int retval;
+
        if (sha == NULL &&
            (sha = (u_int8_t *)libnet_get_hwaddr(l)) == NULL) {
                return (-1);
@@ -75,7 +77,14 @@
                fprintf(stderr, "%s\n",
                        ether_ntoa((struct ether_addr *)sha));
        }
-       return (libnet_write(l));
+
+       retval = libnet_write(l);
+       if (retval)
+           fprintf(stderr, "%s", libnet_geterror(l));
+
+       libnet_clear_packet(l);
+
+       return retval;
 }
 
 #ifdef __linux__

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'stable'), (700, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.15-1-amd64-k8
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)

Versions of packages dsniff depends on:
ii  libc6                     2.3.5-13       GNU C Library: Shared libraries an
ii  libdb4.2                  4.2.52-23      Berkeley v4.2 Database Libraries [
ii  libice6                   6.9.0.dfsg.1-4 Inter-Client Exchange library
ii  libnet1                   1.1.2.1-2      library for the construction and h
ii  libnids1.20               1.20-3         IP defragmentation TCP segment rea
ii  libpcap0.8                0.9.4-1        System interface for user-level pa
ii  libsm6                    6.9.0.dfsg.1-4 X Window System Session Management
ii  libssl0.9.8               0.9.8a-7       SSL shared libraries
ii  libx11-6                  6.9.0.dfsg.1-4 X Window System protocol client li
ii  libxmu6                   6.9.0.dfsg.1-4 X Window System miscellaneous util
ii  openssl                   0.9.8a-7       Secure Socket Layer (SSL) binary a
ii  xlibs                     6.9.0.dfsg.1-4 X Window System client libraries m

dsniff recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to