Chill, people, it's not the debug you're seeing, but the
traceEvent(TRACE_INFO, "FTP: %s", rcStr);

    if(1 /* myGlobals.enablePacketDecoding */) {
      if(len > 0) {
        if((sport == 21) || (dport == 21)) {
          FD_SET(HOST_SVC_FTP, &srcHost->flags);
          memset(rcStr, 0, sizeof(rcStr));
          strncpy(rcStr, packetData, len);
>>>>>     traceEvent(TRACE_INFO, "FTP: %s", rcStr);


It's just echoing back whatever it receives...  It was probably put in to
make sure the fix worked, and commented out in the cvs on 17May2002:

[bstrauss@tigger cvs]$ cvs log sessions.c | less

RCS file: /export/home/ntop/ntop/sessions.c,v
Working file: sessions.c
head: 2.29
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 29;    selected revisions: 29
description:
----------------------------
revision 2.29
date: 2002/05/17 14:07:29;  author: deri;  state: Exp;  lines: +10 -4
Added fixes for Win32
Fixed bug on host/IP traffic chart
----------------------------
revision 2.28
date: 2002/05/16 07:54:38;  author: deri;  state: Exp;  lines: +4 -1
Fixed bug in the code that handles passive FTP (passive FTP
traffic was not recognised as such)

Plugins now terminate/start when the user changes their state
using the web interface



[bstrauss@tigger cvs]$ cvs diff -r 2.27 -r 2.28 sessions.c
Index: sessions.c
===================================================================
RCS file: /export/home/ntop/ntop/sessions.c,v
retrieving revision 2.27
retrieving revision 2.28
diff -r2.27 -r2.28
854c854
<       if(sport == 21) {
---
>       if((sport == 21) || (dport == 21)) {
858a859,861
>
>         traceEvent(TRACE_INFO, "FTP: %s", rcStr);
>
[bstrauss@tigger cvs]$


[bstrauss@tigger cvs]$ cvs diff  -r 2.28 -r 2.29 sessions.c
Index: sessions.c
===================================================================
RCS file: /export/home/ntop/ntop/sessions.c,v
retrieving revision 2.28
retrieving revision 2.29
diff -r2.28 -r2.29
860c860
<         traceEvent(TRACE_INFO, "FTP: %s", rcStr);
---
>         /* traceEvent(TRACE_INFO, "FTP: %s", rcStr); */
863a864,865
>               PORT 172,22,5,95,7,36
>
866c868,869
<         if(strncmp(rcStr, "227", 3) == 0) {
---
>         if((strncmp(rcStr, "227", 3) == 0)
>               || (strncmp(rcStr, "PORT", 4) == 0)) {
869,870c872,876
<           sscanf(&rcStr[27], "%d,%d,%d,%d,%d,%d",
<                  &a, &b, &c, &d, &e, &f);
---
>               if(strncmp(rcStr, "PORT", 4) == 0) {
>                       sscanf(&rcStr[5], "%d,%d,%d,%d,%d,%d", &a, &b, &c,
&d, &e, &f);
>               } else {
>                       sscanf(&rcStr[27], "%d,%d,%d,%d,%d,%d", &a, &b, &c,
&d, &e, &f);
>               }
-----Burton


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of patrick
wong
Sent: Wednesday, May 29, 2002 11:03 PM
To: [EMAIL PROTECTED]
Subject: RE: [Ntop] Suspicious FTP message from ntop


Hello,
Here is the code cut out from the file sessions.c:

    /*
      We leave this is for the moment as we don't expect that
      this takes up much CPU time
    */
    if(1 /* myGlobals.enablePacketDecoding */) {
      if(len > 0) {
        if((sport == 21) || (dport == 21)) {
          FD_SET(HOST_SVC_FTP, &srcHost->flags);
          memset(rcStr, 0, sizeof(rcStr));
          strncpy(rcStr, packetData, len);
          traceEvent(TRACE_INFO, "FTP: %s", rcStr);
          /*
            227 Entering Passive Mode (131,114,21,11,156,95)
            131.114.21.11:40012 (40012 = 156 * 256 + 95)
          */
          if(strncmp(rcStr, "227", 3) == 0) {
            int a, b, c, d, e, f;
            sscanf(&rcStr[27], "%d,%d,%d,%d,%d,%d",
                   &a, &b, &c, &d, &e, &f);
            sprintf(rcStr, "%d.%d.%d.%d", a, b, c, d);
#ifdef DEBUG
            traceEvent(TRACE_INFO, "FTP: (%d) [%d.%d.%d.%d:%d]",
                       inet_addr(rcStr), a, b, c, d, (e*256+f));
#endif
            addPassiveSessionInfo(htonl((unsigned long)inet_addr(rcStr)),
(e*256
+f));
          }
        }
      } /* len > 0 */
    }

This is from the ntop-2.0.99-rc1 source dist from the www.ntop.org site.
I will comment out the traceEvent and recompile.
Thanks,


>From: "Burton M. Strauss III"
>To:
>CC:
>Subject: RE: [Ntop] Suspicious FTP message from ntop
>Date: Wed, 29 May 2002 12:13:28 -0500
>
>If it's coming from ntop, then he's got DEBUG enabled and some other code
>turned on... or it's not the current version of ntop...
>
>check sessions.c around line 880 for the message... it's just what ntop is
>sniffing & logging of passive mode ftp traffic...
>
> /* traceEvent(TRACE_INFO, "FTP: %s", rcStr); */
>
> /*
> 227 Entering Passive Mode (131,114,21,11,156,95)
> PORT 172,22,5,95,7,36
>
> 131.114.21.11:40012 (40012 = 156 * 256 + 95)
> */
> if((strncmp(rcStr, "227", 3) == 0)
> || (strncmp(rcStr, "PORT", 4) == 0)) {
> int a, b, c, d, e, f;
>
> if(strncmp(rcStr, "PORT", 4) == 0) {
> sscanf(&rcStr[5], "%d,%d,%d,%d,%d,%d", &a, &b, &c,
>&d, &e, &f);
> } else {
> sscanf(&rcStr[27], "%d,%d,%d,%d,%d,%d", &a, &b, &c,
>&d, &e, &f);
> }
> sprintf(rcStr, "%d.%d.%d.%d", a, b, c, d);
>
>#ifdef DEBUG
> traceEvent(TRACE_INFO, "FTP: (%d) [%d.%d.%d.%d:%d]",
> inet_addr(rcStr), a, b, c, d, (e*256+f));
>#endif
> addPassiveSessionInfo(htonl((unsigned long)inet_addr(rcStr)),
>(e*256+f));
> }
>
>But, of course, people don't bother tell us how they're running ntop, where
>the got it from, etc. just expect us to read their minds...
>
>-----Burton
>
>
>
>
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Serge
>Maandag
>Sent: Wednesday, May 29, 2002 11:44 AM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: [Ntop] Suspicious FTP message from ntop
>
>
>Hmm, I noticed it too. It are not ftp sessions to the host ntop is on, but
>ftp sessions that come by on the network that is being sniffed.
>I have the The RC1 rpm installed.
>Serge.
>-----Original Message-----
>From: Burton M. Strauss III [mailto:[EMAIL PROTECTED]]
>It's surely not from ntop - there isn't an ftp server in there, unless you
>have a hacked version...
>Try going back to the raw log, not whatever processed version you're
looking
>at - you should see
>May 29 09:55:41 localhost ntop[14850]: Done.
> ^^^^^^^^^^^ a process name and pid...
>Also, turn off the ftp daemon you're running if you don't want it on...
>-----Burton
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of patrick
>wong
>
>
>There are some odd FTP messages coming from the output from NTOP. Can
>someone tell me why this is happening and if normal? It looks odd and
>suspicious.
>



MSN Photos is the easiest way to share and print your photos: Click Here
_______________________________________________ Ntop mailing list
[EMAIL PROTECTED] http://listgateway.unipi.it/mailman/listinfo/ntop

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to