Changeset 1360
- Timestamp:
- 08/24/07 21:28:24 (1 year ago)
- Files:
-
- honeytrap/trunk/ChangeLog (modified) (1 diff)
- honeytrap/trunk/src/dynsrv.c (modified) (1 diff)
- honeytrap/trunk/src/ipqmon.c (modified) (2 diffs)
- honeytrap/trunk/src/modules/htm_ftpDownload.c (modified) (2 diffs)
- honeytrap/trunk/src/nfqmon.c (modified) (3 diffs)
- honeytrap/trunk/src/pcapmon.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeytrap/trunk/ChangeLog
r1356 r1360 11 11 - Improved connection request handling in the nfq stream monitor 12 12 - Reconfiguration on SIGHUP fixed 13 - Log addressed destination 13 14 Version 0.7.0 14 15 - Plugins can be prioritized honeytrap/trunk/src/dynsrv.c
r1356 r1360 195 195 if (FD_ISSET(sigpipe[0], &rfds) && (check_sigpipe() == -1)) exit(EXIT_FAILURE); 196 196 if (FD_ISSET(listen_fd, &rfds)) { 197 logmsg(LOG_NOISY, 1,198 " %s Connection request from %s.\n", portstr, inet_ntoa(ip_r));197 logmsg(LOG_INFO, 1, " %s Handling %s connection request from %s:%d to %s:%d.\n", 198 portstr, PROTO(proto), inet_ntoa(ip_r), ntohs(port_r), inet_ntoa(ip_l), ntohs(port_l)); 199 199 200 200 /* initialize attack record */ honeytrap/trunk/src/ipqmon.c
r1355 r1360 128 128 129 129 /* Got a connection request, start dynamic server and pass packet processing back to the kernel */ 130 logmsg(LOG_NOISY, 1, "%s:%d requesting %s connection on %s:%d.\n", 131 inet_ntoa(ip->ip_src), sport, PROTO(ip->ip_p), inet_ntoa(ip->ip_dst), dport); 130 132 switch (port_mode) { 131 133 case PORTCONF_NONE: … … 169 171 if (process == 0) break; 170 172 171 logmsg(LOG_NOISY, 1, "%s:%d/%s requesting connection on port %d/%s.\n",172 inet_ntoa(ip->ip_src), sport, PROTO(ip->ip_p), dport, PROTO(ip->ip_p));173 173 start_dynamic_server(ip->ip_src, htons(sport), ip->ip_dst, htons(dport), ip->ip_p); 174 174 break; honeytrap/trunk/src/modules/htm_ftpDownload.c
r1356 r1360 260 260 /* Do FTP transaction */ 261 261 return(get_ftp_resource(user, pass, (struct in_addr *) &lhost, 262 (struct in_addr *) host->h_addr_list[0], atoi(port), file, attack));262 (struct in_addr *) host->h_addr_list[0], atoi(port), file, attack)); 263 263 } 264 264 } … … 361 361 case ENETUNREACH: 362 362 case ETIMEDOUT: 363 case EHOSTUNREACH: 363 364 if (rhost != (struct in_addr *) &attack->a_conn.r_addr) { 364 365 rhost = (struct in_addr *) &attack->a_conn.r_addr; honeytrap/trunk/src/nfqmon.c
r1355 r1360 39 39 struct udp_header *udp; 40 40 struct tcp_header *tcp; 41 char *payload ;41 char *payload, *srcip, *dstip; 42 42 uint16_t sport, dport; 43 43 u_int8_t port_mode; … … 84 84 } 85 85 86 logmsg(LOG_NOISY, 1, "%s:%d requesting %s connection on %s:%d.\n", 87 inet_ntoa(ip->ip_src), sport, PROTO(ip->ip_p), inet_ntoa(ip->ip_dst), dport); 86 88 switch (port_mode) { 87 89 case PORTCONF_NONE: … … 123 125 } 124 126 125 logmsg(LOG_NOISY, 1, "%s:%d/%s requesting connection on port %d/%s.\n", 126 inet_ntoa(ip->ip_src), sport, PROTO(ip->ip_p), dport, PROTO(ip->ip_p)); 127 if ((srcip = strdup(inet_ntoa(ip->ip_src))) == NULL) { 128 logmsg(LOG_ERR, 1, "Error - Unable to allocate memory: %m.\n"); 129 exit(EXIT_FAILURE); 130 } 131 if ((dstip = strdup(inet_ntoa(ip->ip_dst))) == NULL) { 132 logmsg(LOG_ERR, 1, "Error - Unable to allocate memory: %m.\n"); 133 exit(EXIT_FAILURE); 134 } 127 135 start_dynamic_server(ip->ip_src, htons(sport), ip->ip_dst, htons(dport), ip->ip_p); 128 136 honeytrap/trunk/src/pcapmon.c
r1355 r1360 93 93 } 94 94 95 if (ip->ip_p == UDP) logmsg(LOG_NOISY, 1, "%s:%d requesting udp connection on %s:%d.\n", 96 inet_ntoa(ip->ip_src), sport, inet_ntoa(ip->ip_dst), dport); 97 else if (ip->ip_p == TCP) logmsg(LOG_NOISY, 1, "%s:%d requesting udp connection on %s:%d.\n", 98 inet_ntoa(ip->ip_dst), dport, inet_ntoa(ip->ip_src), sport); 95 99 switch (port_mode) { 96 100 case PORTCONF_NONE: … … 116 120 } 117 121 118 if (ip->ip_p == UDP) { 119 logmsg(LOG_NOISY, 1, "%s:%d/%s requesting connection on port %d/%s.\n", 120 inet_ntoa(ip->ip_src), sport, PROTO(ip->ip_p), dport, PROTO(ip->ip_p)); 121 start_dynamic_server(ip->ip_src, htons(sport), ip->ip_dst, htons(dport), ip->ip_p); 122 } else if (ip->ip_p == TCP) { 123 logmsg(LOG_NOISY, 1, "%s:%d/%s requesting connection on port %d/%s.\n", 124 inet_ntoa(ip->ip_dst), dport, PROTO(ip->ip_p), sport, PROTO(ip->ip_p)); 125 start_dynamic_server(ip->ip_dst, htons(dport), ip->ip_src, htons(sport), ip->ip_p); 126 } 122 if (ip->ip_p == UDP) start_dynamic_server(ip->ip_src, htons(sport), ip->ip_dst, htons(dport), ip->ip_p); 123 else if (ip->ip_p == TCP) start_dynamic_server(ip->ip_dst, htons(dport), ip->ip_src, htons(sport), ip->ip_p); 124 127 125 return; 128 126 }
