Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
09-10-2007, 10:49 PM
|
#16
|
|
Member
Registered: Jul 2003
Location: NY
Distribution: None (src & compile)
Posts: 249
Rep:
|
You know, there is a newer XT Tarpit. I've been using it awhile now. There's an ipset patch too, but you didn't ask. Here's the ones I used from the 2.6.22.6 I put together last night. Vanilla kernel and iptables snapshot, I started with. Make sure ip_TARPIT is cleared out of your config, and <M> (module) the XT_TARPIT option:
CONFIG_NETFILTER_XT_TARGET_TARPIT=m
# CONFIG_IP_NF_TARGET_TARPIT is not set
Code:
Gumming up an infested Win32 host (iptraf w/o the colors):
203.81.47.211:4150 = 11461 --A- ppp0
atr2.ath.cx:ssc-agent = 11440 --A- ppp0
tftp://atr2.ath.cx/tarpit-xt.zip
( Note tftp, not ftp- I find people stumbling around ftp directories looking for files that aren't there sometimes, but possibly that's an MSIE bug^H^H^Hfeature...)
See the zip comment for a few, umm... comments
Update: in.tftp evidently has its own idea of how hosts_access should be looked up when the service doesn't appear in either allow or deny, so if the link doesn't work, switch protocol to https and use the same path. Sorry 'bout that.
Last edited by jayjwa; 09-11-2007 at 09:30 AM.
Reason: in.tftpd being flaky
|
|
|
|
09-11-2007, 12:55 PM
|
#17
|
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Quote:
Originally Posted by jayjwa
You know, there is a newer XT Tarpit. I've been using it awhile now. There's an ipset patch too, but you didn't ask.
|
Just for confirmation, x_tables is the new netfilter framework designed to unify the backend for {ip,ip6,arp}_tables, correct?
Do you know if/whether xt_TARPIT coming into POM-ng or mainline kernel anytime soon? This thread suggests it is ready, but may not make it until after 2.6.24.
|
|
|
|
09-29-2007, 08:36 PM
|
#18
|
|
LQ Newbie
Registered: Jan 2006
Location: USA
Distribution: CentOS for servers and Ubuntu for desktop
Posts: 25
Original Poster
Rep:
|
Update on this. I finally got the module compiled using the fixes in this thread but could not get the module loaded no matter what. Just said module didnt exist.
So the other night in irc someone found this site
http://enterprise.bidmc.harvard.edu/pub/tarpit-updates/
Didnt compile, tried on 2.6.19.2-grsec and 2.6.22.9-grsec (testing patch) similar errors as the old one.
2.6.22.9-grsec errors - http://pastebin.ca/720168
2.6.19.2-grsec errors - http://pastebin.ca/720174
Doesnt look like the tarpit module is gonna work out with any newer kernel. If someone has got this to work with at least a 2.6.19 kernel please elaborate how you did it.
But I think I will pretty much give up on it, will have to. Doesnt look like its gonna be maintained anymore and there is a real lack of interest in it. So probably another good idea that is gonna fade away
|
|
|
|
09-29-2007, 09:46 PM
|
#19
|
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Quote:
Originally Posted by felosi
Update on this. I finally got the module compiled using the fixes in this thread but could not get the module loaded no matter what. Just said module didnt exist.
|
What was the exact message? Was the module in /lib/modules? Did you run “ depmod” after installation? Did you try insmoding the object by hand? Was there any output in dmesg?
Quote:
Originally Posted by felosi
|
Both of those errors seem to be addressed in the bottom portion of post 13. Basically, the fix is to remove the line that references nf_debug. Alternatively, you could compile your kernel without selecting CONFIG_NETFILTER_DEBUG. My guess is that nobody has noticed this compilation error since almost nobody builds their kernel with CONFIG_NETFILTER_DEBUG.
Quote:
Originally Posted by felosi
Doesnt look like the tarpit module is gonna work out with any newer kernel. If someone has got this to work with at least a 2.6.19 kernel please elaborate how you did it.
|
I actually have an almost-vanilla 2.6.21 kernel running it as we speak. It’s the vanilla patch-o-matic-ng version, and my kernel’s .config file says “ # CONFIG_NETFILTER_DEBUG is not set” (you can check if this is the case on your running kernel with “ zgrep CONFIG_NETFILTER_DEBUG /proc/config.gz”). I also have an older version of tarpit running on 2.6.16-grsec on which I made a few minor changes, the details of which escape me after so long. In both cases, the modules seem to work as intended.
Quote:
Originally Posted by felosi
But I think I will pretty much give up on it, will have to. Doesnt look like its gonna be maintained anymore and there is a real lack of interest in it. So probably another good idea that is gonna fade away
|
You don’t have to give up on it. In any case, it seems that this module is being supplanted by its x_tables-compatible counterpart, as mentioned here. Hopefully, it will be in the kernel within a few releases.
|
|
|
|
09-30-2007, 12:07 AM
|
#20
|
|
LQ Newbie
Registered: Jan 2006
Location: USA
Distribution: CentOS for servers and Ubuntu for desktop
Posts: 25
Original Poster
Rep:
|
Thank you very much!
unchecking the netfilter debig option fixed it, now am able to load and use the module just fine.
Thanks for all your help
|
|
|
|
10-16-2007, 02:15 PM
|
#21
|
|
LQ Newbie
Registered: Oct 2007
Posts: 3
Rep:
|
I'm having trouble compiling the xt_tarpit module as well.
kernel is a vanilla 2.6.22.10 kernel from kernel.org, I first tried applying the patch offered on page one of this thread, and wound up with the compile failing:
ERROR: "secure_tcp_sequence_number" [net/netfilter/xt_TARPIT.ko] undefined!
so I tried the patch-o-matic patch for 2.6.22 as well, and it comes up with a similar error:
ERROR: "secure_tcp_sequence_number" [net/ipv4/netfilter/ipt_TARPIT.ko] undefined!
google found reference to this:
http://archives.free.net.ph/message/...8f567d.en.html
which deals with secure_tcp_sequence_number not being exported from drivers/char/random.c ... I looked in random.c and found this:
#ifdef CONFIG_INET
EXPORT_SYMBOL(secure_tcp_sequence_number);
#endif
which indicates to me that it is exported, right?
any thoughts?
|
|
|
|
10-16-2007, 09:29 PM
|
#22
|
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
Quote:
Originally Posted by justdiy
#ifdef CONFIG_INET
EXPORT_SYMBOL(secure_tcp_sequence_number);
#endif
which indicates to me that it is exported, right?
|
It indicates the symbol is exported if and only if CONFIG_INET is defined. Are you trying to compile for a kernel configured without a network stack (or perhaps it is IPv6 only)? In any case, check the output of
Code:
grep 'CONFIG_INET' .config
where .config is the config file for the target kernel.
|
|
|
|
10-17-2007, 08:21 AM
|
#23
|
|
LQ Newbie
Registered: Oct 2007
Posts: 3
Rep:
|
turns out that secure_tcp export was added by the xt_tarpit patch ... so I did a make clean on the kernel source, then a make to rebuild everything (ditto on the iptables source, just to be safe). after rebooting with the new kernel, the module loads just fine.
|
|
|
|
10-18-2007, 07:45 PM
|
#24
|
|
Member
Registered: Jul 2003
Location: NY
Distribution: None (src & compile)
Posts: 249
Rep:
|
Still working on 2.6.23.1, with fuzzy matchup. I should do a cleaned up diff. More stuff seems to be moving to the XT format with the 2.6.23 series. I think patch-o-matic is of little or no use with these kernels; wish they'd update it.
|
|
|
|
05-09-2008, 09:04 AM
|
#25
|
|
LQ Newbie
Registered: May 2008
Posts: 1
Rep:
|
Quote:
Originally Posted by jayjwa
Still working on 2.6.23.1, with fuzzy matchup. I should do a cleaned up diff. More stuff seems to be moving to the XT format with the 2.6.23 series. I think patch-o-matic is of little or no use with these kernels; wish they'd update it.
|
I tried to compile iptables 1.4.0 TARPIT with 2.26.23 vanilla using the following patches:
http:
enterprise.bidmc.harvard.edu/pub/tarpit-updates/
Unfortunately, there is error when compiling it. It has something to do with the following lines of code:
net/netfilter/xt_TARPIT.c: In function ‘tarpit_tcp’:
net/netfilter/xt_TARPIT.c:114: error: implicit declaration of function ‘nf_conntrack_put’
net/netfilter/xt_TARPIT.c:114: error: ‘struct sk_buff’ has no member named ‘nfct’
net/netfilter/xt_TARPIT.c:115: error: ‘struct sk_buff’ has no member named ‘nfct’
make[2]: *** [net/netfilter/xt_TARPIT.o] Error 1
make[1]: *** [net/netfilter] Error 2
Could someone point me to a patch that could fix the problem? Sorry for the broken URL because I am a newbie. This is my first post and I cannot post URL.
Thanks in advance!
Hung
Last edited by thehungle; 05-09-2008 at 01:02 PM.
|
|
|
|
05-10-2008, 12:10 AM
|
#26
|
|
LQ Newbie
Registered: Jan 2006
Location: USA
Distribution: CentOS for servers and Ubuntu for desktop
Posts: 25
Original Poster
Rep:
|
make sure you deselect the netfilter debugging in kernel config. I recently got the new updates from that hardvard site and they have worked flawlessly with the latest kernels.
Here is a config for the 2.6.24.3 kernel with grsecurity and tarpit, works like a charm
Last edited by felosi; 05-10-2008 at 12:11 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:12 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|