2
lurker -- ettercap plugin -- try to search for other ettercap
4
Copyright (C) 2001 ALoR <alor@users.sourceforge.net>, NaGA <crwm@freemail.it>
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
$Id: H00_lurker.c,v 1.6 2002/10/01 21:40:52 alor Exp $
29
#include "../../src/include/ec_main.h"
30
#include "../../src/include/ec_version.h"
31
#include "../../src/include/ec_plugins.h"
32
#include "../../src/include/ec_inet_structures.h"
33
#include "../../src/include/ec_inet.h"
34
#include "../../src/include/ec_inet_forge.h"
38
int Plugin_Init(void *);
39
int Plugin_Fini(void *);
40
int lurker(void *buffer);
44
struct plugin_ops lurker_ops = {
45
ettercap_version: VERSION,
46
plug_info: "Try to search for other ettercaps",
49
hook_point: PCK_RECEIVED_RAW,
50
hook_function: &lurker,
53
//==================================
55
int Plugin_Init(void *params)
57
return Plugin_Register(params, &lurker_ops);
60
int Plugin_Fini(void *params)
65
// =================================
67
int lurker(void *buffer) // very lame searching...
68
{ // only for script-kiddes...
76
pck_raw = (RAW_PACKET *)buffer;
78
eth = (ETH_header *) pck_raw->buffer;
79
if ( ntohs(eth->type) == ETH_P_IP )
81
ip = (IP_header *)(eth+1);
83
strcpy(IPS, inet_ntoa(*(struct in_addr *)&ip->source_ip) );
84
strcpy(IPD, inet_ntoa(*(struct in_addr *)&ip->dest_ip) );
86
if ( ntohs(ip->ident) == 0xe77e )
88
Plugin_Hook_Output("ettercap traces coming from %s ...\n", IPS );
91
if ( ntohs(ip->ident) == 0xbadc )
93
Plugin_Hook_Output("Banshee is killing from %s to %s ...\n", IPS, IPD );
96
if ( ip->proto == IPPROTO_TCP )
99
tcp = (TCP_header *) ((int)ip + ip->h_len * 4);
101
switch( ntohl(tcp->seq) )
104
Plugin_Hook_Output("ettercap traces coming from %s ...\n", IPS );
107
Plugin_Hook_Output("%s is shadowing (scanning) %s ...\n", IPS, IPD );
110
if ( ntohs(ip->ident) == 0xe77e && ntohl(tcp->ack_seq) == 0xabadc0de)
111
Plugin_Hook_Output("Spectre is flooding the LAN...\n");
113
Plugin_Hook_Output("%s is golemizing %s ...\n", IPS, IPD );