here's a bit of a step-by-step description on how to keep nimda
and codered from filling your apache logs.
- SuSE 7.2 Professional
- iptables 1.2.3
- linux kernel 2.4.13-pre5
1. install kernel sources for a kernel >> 2.4.9, running 2.4.13-
pre5 here, works fine so far
2. get the sources for iptables 1.2.3 from
3. unpack sources somewhere
4. export KERNEL_DIR=$(where you put the kernel tree)
5. cd into unpacked iptables sources, there's a subdirectory
named patch-o-matic there
6. apply wanted patches by running ./runme $(name.of.patch)patch
for this here You'll want the string patch
You can also apply other patches, like the irc-conntrack patch
7. now there's a little bug in this patch...
here's a diff:
--- linux/net/ipv4/netfilter/ipt_string.c~ Sun Oct 21
+++ linux/net/ipv4/netfilter/ipt_string.c Sun Oct 21
@@ -62,7 +62,7 @@
sk = skip[haystack[right_end - i]];
sh = shift[i];
- right_end = max(int, right_end - i + sk,
right_end + sh);
+ right_end = max(right_end - i + sk, right_end +
8. now, make config/menuconfig/xconfig... as usual. You can
import your running kernel's config first.
9. enable the experimental stuff
10. go to networking options->netfilter, there's an option there
to enable string matching; set that to M
11. compile and install kernel as usual; remember to uncomment
the export INSTALL_PATH=/boot in the main makefile.
12. now build a rpm file for the new iptables stuff by installing
the source rpm which comes with suse, then edit the spec file,
put the iptables source in /usr/src/packages/SOURCE and rebuild.
13. now there are some small changes to the firewall config
a) uncomment the last line in
b) edit that file, I got the following stuff in mine:
for forbidden_string in root.exe cmd.exe .ida; do
iptables -I input_ext -p tcp --dport http -m string \
--string $forbidden_string -m state \
--state ESTABLISHED -j REJECT --reject-with tcp-reset
put that in the last supfunction defined in the custom rc file.
c) change the FW_LOG setting in firewall2.rc.config from reading
-log-level warning to -log-level kernel.warning
14. last: some small changes to /sbin/SuSEfirewall2
search in the script for the parts where the modules are loaded
and unloaded; be sure to add ipt_string (and the other new
modules you created by patching the kernel and enabling them in
make config) to the modules loading/unloading code there.
16. if you try now to access (from outside, of course) one of the
nimda or codered URLS, all you get is a 'connection reset by
peer', and the request doesn't show in apache log files.
btw, no guarantees, and the usual YMMV :)
-----BEGIN PGP SIGNED MESSAGE-----
SuSE Security Announcement
Date: Thu Apr 24 12:00:00 MEST 2003
Affected products: 7.1, 7.2, 7.3, 8.0, 8.1, 8.2
SuSE eMail Server 3.1
SuSE eMail Server III
SuSE Firewall Adminhost VPN
SuSE Linux Admin-CD for Firewall
SuSE Firewall on CD 2 - VPN
SuSE Firewall on CD 2
SuSE Linux Connectivity Server
SuSE Linux Enterprise Server 7
SuSE Linux Office Server
Vulnerability Type: various security vulnerabilities
Severity (1-10): 5
SuSE default package: yes
Cross References: http://www.kde.org/info/security/advisory-20030409-1.txthttp://www.kde.org/info/security/advisory-20021220-1.txthttp://www.kde.org/announcements/announce-3.0.5a.html
Content of this advisory:
1) security vulnerability resolved: Results of security audit of KDE.
problem description, discussion, solution and upgrade information
2) pending vulnerabilities, solutions, workarounds:
3) standard appendix (further information)
1) problem description, brief discussion, solution, upgrade information
The K Desktop Environment KDE allows to generate postscript previews which
can be viewed via certain konqueror plug-ins for example. The previews
are generated by invoking the ghostscript program but without supplying the
"-dSAFER" option as an argument. This allows embedded code to be executed.
Additionally to the correction made to the postscript generation process,
various other security related bug fixes and patches from KDE 3.0.5a have
been incorporated. For more information regarding these fixes please visit
the URLs given as cross references.
The complete list of fixed packages is as follows:
Due to the large list of update packages we do not provide MD5 sums in this
advisory. This would blow up the advisory and make it unreadable.
Rather we recommend to either update your system via YaST2 where the
auto updater automatically checks the integrity of the packages or to follow
the guideline from section 3, "Package authenticity verification".
Please download the update package for your distribution and verify its
integrity by the methods listed in section 3) of this announcement.
Then, install the package using the command "rpm -Fhv file.rpm" to apply
Our maintenance customers are being notified individually. The packages
are being offered to install from the maintenance web.
2) Pending vulnerabilities in SuSE Distributions and Workarounds:
New glibc packages will be available soon which fix a RPC XDR integer
overflow. The packages are currently being tested.
A buffer overflow was found in the pptpd server. New packages will be
3) standard appendix: authenticity verification, additional information
- Package authenticity verification:
SuSE update packages are available on many mirror ftp servers all over
the world. While this service is being considered valuable and important
to the free and open source software community, many users wish to be
sure about the origin of the package and its content before installing
the package. There are two verification methods that can be used
independently from each other to prove the authenticity of a downloaded
file or rpm package:
1) md5sums as provided in the (cryptographically signed) announcement.
2) using the internal gpg signatures of the rpm package.
1) execute the command
after you downloaded the file from a SuSE ftp server or its mirrors.
Then, compare the resulting md5sum with the one that is listed in the
announcement. Since the announcement containing the checksums is
cryptographically signed (usually using the key security(a)suse.de),
the checksums show proof of the authenticity of the package.
We disrecommend to subscribe to security lists which cause the
email message containing the announcement to be modified so that
the signature does not match after transport through the mailing
Downsides: You must be able to verify the authenticity of the
announcement in the first place. If RPM packages are being rebuilt
and a new version of a package is published on the ftp server, all
md5 sums for the files are useless.
2) rpm package signatures provide an easy way to verify the authenticity
of an rpm package. Use the command
rpm -v --checksig <file.rpm>
to verify the signature of the package, where <file.rpm> is the
filename of the rpm package that you have downloaded. Of course,
package authenticity verification can only target an un-installed rpm
a) gpg is installed
b) The package is signed using a certain key. The public part of this
key must be installed by the gpg program in the directory
~/.gnupg/ under the user's home directory who performs the
signature verification (usually root). You can import the key
that is used by SuSE in rpm packages for SuSE Linux by saving
this announcement to a file ("announcement.txt") and
running the command (do "su -" to be root):
gpg --batch; gpg < announcement.txt | gpg --import
SuSE Linux distributions version 7.1 and thereafter install the
key "build(a)suse.de" upon installation or upgrade, provided that
the package gpg is installed. The file containing the public key
is placed at the top-level directory of the first CD (pubring.gpg)
and at ftp://ftp.suse.com/pub/suse/pubring.gpg-build.suse.de .
- SuSE runs two security mailing lists to which any interested party may
- general/linux/SuSE security discussion.
All SuSE security announcements are sent to this list.
To subscribe, send an email to
- SuSE's announce-only mailing list.
Only SuSE's security announcements are sent to this list.
To subscribe, send an email to
For general information or the frequently asked questions (faq)
send mail to:
SuSE's security contact is <security(a)suse.com> or <security(a)suse.de>.
The <security(a)suse.de> public key is listed below.
The information in this advisory may be distributed or reproduced,
provided that the advisory is not modified in any way. In particular,
it is desired that the clear-text signature shows proof of the
authenticity of the text.
SuSE Linux AG makes no warranties of any kind whatsoever with respect
to the information contained in this security advisory.
Type Bits/KeyID Date User ID
pub 2048R/3D25D3D9 1999-03-06 SuSE Security Team <security(a)suse.de>
pub 1024D/9C800ACA 2000-10-19 SuSE Package Signing Key <build(a)suse.de>
- -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
- -----END PGP PUBLIC KEY BLOCK-----
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
~ perl self.pl
~ krahmer(a)suse.de - SuSE Security Team
i have got :
network A with ip adress room 192.168.x.x (this side also connects to the
network B with ip adress room 10.x.x.x (my internal LAN)
and a router with is a Linux box to connect the 2 lans via routing.
So far so good, the traffic is running between the 2 networks, since i
configures the routes on both networks.
LAN A |-----------------------ROUTER---------------| LAN B
My problem is though, i have no restrictions!
I know the first few commands like : iptables -P FORWARD DROP, but i want to
regulate, that WKS_A from LAN_A can communicate with WKS_1 from LAN_B but
not with WKS_2 from LAN_B.
Or that WKS_1 on LAN_A is allowed to use SSH ánd nothing else, but WKS_2 on
LAN_A can use all tcp/ip services.......
Thanx a lot in advance
Tel : 089/55878-151
Mobile : 0172-8391368
E-mail : ggrutsch(a)statestreet.com
I'm trying to mount a file to the loopback device but the losetup command
complains about it.
I'm using the command line:
losetup -e twofish /dev/loop0 /root/testfile
losetup asks for a password but returns:
ioctl: LOOP_SET_STATUS: invalid argument
when one is entered
"losetup -e none" works
I have tried with the standard kernel in SuSE 8.2 but also kernel 2.4.20-13 with both
"loopback device support" and "Twofish encryption for loopback device" compiled
into the kernel.
Thanks in advance
Would anyone at SuSE or anyone else like to make a comment about the
following on the Snort home pages ...
http://www.snort.org/ .... news page
Snort Advisory: Integer Overflow in Stream4 Brian @ Wed Apr 16
14:52:33 EDT 2003
# All versions of the following products are affected: Snort 1.8
# Snort CVS - current branch up to version 2.0.0 beta
I notice that SuSE 8.2 uses Snort Version 1.9.1 (Build 231)
By Martin Roesch (roesch(a)sourcefire.com, www.snort.org).
Will there be an update soon or is the SuSE version of Snort not
vulnerable to this bug ?
I think the easier/more efficient answer to Q3 is "which", as in `which
From: Martin Peikert [mailto:firstname.lastname@example.org]
Sent: Wednesday, April 30, 2003 7:17 AM
Subject: Re: [suse-security] updatedb@locate
> I understand. Why is it no longer installed by default? Is it
> replaced by something else? If I need to search for a command, how
> can I do it?
Q1 + Q2: Ask SuSE. Q3: Install the needed packages or try
find / -name command_you_need
(please don't tell me that find is not installed by default ;)
Public Key: http://www.tschetter.org/~ryan/ryan_punt.asc
I'm having some fun with SuSE and FTP.
If the firewall on the server is turned off, the client works perfectly
happily. But if the firewall on the server is turned on, it won't. I have
opened up both 20 and 21 TCP and UDP to a limited IP range (within my
network), but it just won't have any of it. I can log in, but I can't ls or
Anyone got any suggestions?
Many thanks in advance.
I am running a mysql and http server. Now I would like to block all
connections to mysql (tcp 3306). (Only connections from localhost to
localhost are allowed). The http-port (tcp 80) should be reachable by
So I made the following:
#accept everything from localhost to localhost
iptables -A INPUT -p all -s localhost -d localhost -j ACCEPT
#block mysql (tcp 3306)
iptables -A INPUT -p tcp --destination-port 3306 -j REJECT
Well, connections from outside are blocked, BUT:
1) nmap says tcp/3306 (mysql) filtered
2) in my xconsole (and tty10) the following warning appears:
<date> <time> <my-pc> mysqld-max: warning: can't get client address:
Connection reset by peer
Now would like to know, why does nmap know that the port is filtered?
And why does mysql notices that there was a connectionrequest, althought it
Thanks for the answers so far. So
NOQUEUE: [18.104.22.168] did not issue MAIL/EXPN/VRFY/ETRN during connection
is nothing to worry about. However I'm very worried about the
PAM-warn: user: (uid=0) -> admin [remote: ?nobody@?nowhere]
messages. It looks to me as if someone already has gained root rights
and made an su to "admin" (which should be impossible, because
/etc/passwd as I see it doesn't contain that user). I hope to be misleaded...
Best regards, Matthias