Closed nullprobe closed 11 years ago
Thanks for the report, nullprobe. Does this segfault happen reliably for you, or is it intermittent? And under what conditions? Simply any TCP connection to honeyd? I couldn't reproduce it myself at first, but I'm looking into it.
Could you provide the contents of your honeyd configuration file at /home/xxxx/.config/nova/config/haystack_honeyd.config? You can remove the IP addresses if need be and/or you can email it to the Datasoft team directly at nova@datasoft.com if you'd prefer it not be posted publicly.
Segfault happens every time I try to hping3 a port on a honeyd instance, even ports that are not "served". Note that this only happens in TCP, honeyd works as intended with UDP connections.
Below the config file you asked for, up until now I have kept the default config except for the static IP's.
create default
set default default tcp action filtered
set default default udp action filtered
set default default icmp action filtered
set default personality "Linux 3.0"
set default droprate in 0
clone CustomNodeProfile-0 default
set CustomNodeProfile-0 default tcp action closed
set CustomNodeProfile-0 default udp action closed
set CustomNodeProfile-0 default icmp action open
add CustomNodeProfile-0 tcp port 22 "bash /usr/share/honeyd/scripts/linux/ssh.sh $ipsrc $sport $ipdst $dport /home/xxxx/.config/nova/config/haystackscripts/0"
add CustomNodeProfile-0 tcp port 23 "perl /usr/share/honeyd/scripts/embedded/router-telnet.pl"
set CustomNodeProfile-0 personality "FreeBSD 8.2-STABLE"
set CustomNodeProfile-0 droprate in 0
set CustomNodeProfile-0 ethernet "00:11:43:7d:de:9f"
bind XXX.XXX.XXX.XXX CustomNodeProfile-0
clone CustomNodeProfile-1 default
set CustomNodeProfile-1 default tcp action closed
set CustomNodeProfile-1 default udp action closed
set CustomNodeProfile-1 default icmp action open
add CustomNodeProfile-1 tcp port 21 "bash /usr/share/honeyd/scripts/linux/ftp.sh $ipsrc $sport $ipdst $dport /home/xxxx/.config/nova/config/haystackscripts/1"
add CustomNodeProfile-1 tcp port 22 "bash /usr/share/honeyd/scripts/linux/ssh.sh $ipsrc $sport $ipdst $dport /home/xxxx/.config/nova/config/haystackscripts/2"
add CustomNodeProfile-1 tcp port 80 "tclsh /usr/share/honeyd/scripts/linux/httpd/httpd.tcl $ipsrc $sport $ipdst $dport /home/xxxx/.config/nova/config/haystackscripts/3"
set CustomNodeProfile-1 personality "Linux 3.0 - 3.1"
set CustomNodeProfile-1 droprate in 0
set CustomNodeProfile-1 ethernet "a4:ba:db:7d:27:5e"
bind XXX.XXX.XXX.XXX CustomNodeProfile-1
clone CustomNodeProfile-2 default
set CustomNodeProfile-2 default tcp action closed
set CustomNodeProfile-2 default udp action closed
set CustomNodeProfile-2 default icmp action open
add CustomNodeProfile-2 tcp port 20 open
add CustomNodeProfile-2 tcp port 21 "sh /usr/share/honeyd/scripts/win32/win2k/msftp.sh"
add CustomNodeProfile-2 tcp port 23 "bash /usr/share/honeyd/scripts/linux/telnetd.sh $ipsrc $sport $ipdst $dport /home/xxxx/.config/nova/config/haystackscripts/4"
add CustomNodeProfile-2 tcp port 80 "bash /usr/share/honeyd/scripts/win32/web.sh"
add CustomNodeProfile-2 tcp port 135 open
add CustomNodeProfile-2 tcp port 137 open
add CustomNodeProfile-2 udp port 135 open
add CustomNodeProfile-2 udp port 137 open
set CustomNodeProfile-2 personality "Microsoft Windows Server 2003 SP1 or SP2"
set CustomNodeProfile-2 droprate in 0
set CustomNodeProfile-2 ethernet "00:18:8b:ba:77:fd"
bind XXX.XXX.XXX.XXX CustomNodeProfile-2
Any lead on why this is happening? I can't reliably run Honeyd for the moment. Anything else you want me to test?
We haven't seen anything unusual in that area of the code, and the configuration file you gave us works without any problem for us. Are you sure that's the config file that was used when seeing the segfault? The original post you made showed,
honeyd[6763]: arp reply XXX.XXX.XXX.XXX is-at 00:11:43:fe:e1:cd
But that MAC address isn't in the configuration file you provided.
Out of curiosity, does it segfault with ICMP (a normal ping) as well? Or is it only TCP that has the problem?
Also, are you running hping3 from a separate machine on your network than the one hosting honeyd?
honeyd runs with the following command :
honeyd -i eth0 --disable-webserver -i lo -f /home/xxxx/.config/nova/config/haystack_honeyd.config -p /usr/share/nova/sharedFiles/nmap-os-db -s /var/log/honeyd/honeydHaystackservice.log -t /var/log/honeyd/ipList -m /usr/share/nova/sharedFiles/nmap-mac-prefixes
It does not segfault with ICMP, only with TCP. Hping3 runs on another server in the same subnet, the address right next to the nova machine. They are 2 different physical servers.
Built the latest commit and honeyd is up and running again.
Steps to reproduce :
1) start honeyd 2) hping3 haystack_ip -p dest_port (80 in my case)
This is the gdb output with backtrace :