PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : HILFE: Mein Server dient als Relay-Server



akula
27.01.03, 19:46
Hallo zusammen

Seit letzten Freitag bekomme ich massenhaft Fehlermeldungen vom Mailer-Daemon von Qmail.
Die Mail kommen von irgendeiner Adresse, die ich nicht kenne, und gehen an ebenso mir unbekannte E-Mail Adressen. Der Inhalt sind meistens irgendwelche aufforderungen sich ein Programm zu installieren sowie auch pornographische Inhalte.

Ich werde also für den Spam-Mail Versand missbraucht.

Nur ich habe alle Domains die ich auf dem Rechner habe in die Datei rcpthosts eingetragen, dann sollte doch das relaying nicht aktiv sein . oder ???

bitte helft mir es ist ein produktiv system im Internet

gruss akula

LKH
27.01.03, 20:05
Hi,

kannst du mal einen Mailheader posten und dokumentieren (was dein Rechner ist etc.). Ebenso solltest du uns mal einen Blick in dene Mail-Konfig's werfen lassen.

Auf einem produktiven System, das vom Internet erreichbar ist, würde ich grundsätzlich STMP-AUTH nutzen, d.h. der Mailversender muss sich authentifizieren.

[WCM]Manx
27.01.03, 20:14
Hi!

Rück mal die IP des Mailservers raus, dann sag ich Dir ob's ein Open Relay ist :D
Welche Software ist noch installiert, bzw nach welchem Howto?
(ucspi-tcp, vpopmail, daemontools, usw)

Grüße

Manx

akula
27.01.03, 20:24
@[WCM]Manx

Wenn du mir versprichst keinen Mist damit anzustellen !!!!

IP: 193.109.216.54

@LKH

SMTP-Auth ist installiert.

[WCM]Manx
27.01.03, 20:39
Hi!

Sollte eigentlich kein Open Relay sein (hätt mich bei Qmail auch gewundert.)


ldap:~ # telnet 193.109.216.54 25
Trying 193.109.216.54...
Connected to 193.109.216.54.
Escape character is '^]'.
mail from: test@test.com
220 akula.ch ESMTP
250 ok
rcpt to: test@test.de
553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
rcpt to: test@aon.at
553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
quit


Der Server ist nur extrem lahm, und der reverse DNS passt auch nicht.
Poste mal so einen Mail-Header.

Grüße

Manx

akula
27.01.03, 20:52
Hier ist so ein header:


Hi. This is the qmail-send program at akula.ch.
I tried to deliver a bounce message to this address, but the bounce bounced!

<anonymous@akula.ch>:
Sorry, no mailbox here by that name. (#5.1.1)

--- Below this line is the original bounce.

Return-Path: <>
Received: (qmail 20513 invoked for bounce); 27 Jan 2003 19:34:35 -0000
Date: 27 Jan 2003 19:34:35 -0000
From: MAILER-DAEMON@akula.ch
To: anonymous@akula.ch
Subject: failure notice

Hi. This is the qmail-send program at akula.ch.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<ea9n@44o6.com>:
Sorry, I couldn't find any host named 44o6.com. (#5.1.2)

--- Below this line is a copy of the message.

Return-Path: <anonymous@akula.ch>
Received: (qmail 20056 invoked by uid 33); 27 Jan 2003 19:07:49 -0000
Date: 27 Jan 2003 19:07:49 -0000
Message-ID: <20030127190749.20055.qmail@akula.ch>
To: ea9n@44o6.com
From: NortonSystmWrksh@s03s2hx.com (NortonSystmWrksh@s03s2hx.com)
Subject: Over 90% off Nortons Antivirus/Systemworks. Offer ends Jan 31st, act now!


<HTML></P><P ALIGN=CENTER><FONT_ SIZE=5 PTSIZE=16>Norton SystemWorks 2003 Software Suite Professional Edition</FONT><FONT_ SIZE=5 PTSIZE=14>
</FONT><FONT_ SIZE=4 PTSIZE=12>
<U>Five</U> Feature-Packed Utilities, <U>One</U> Great Price
A $300_ Combined Retail Value for Only $39.99!
Includes FREE Shipping!
<U>Act now, this limited time offer ends January 31st!</U>
</FONT><FONT_ SIZE=5 PTSIZE=14>
</P><P ALIGN=LEFT></FONT><FONT_ SIZE=3 PTSIZE=10><B>Norton AntiVirus 2003 (retail $49.95) --</FONT><FONT_ SIZE=5 PTSIZE=14></B> </FONT><FONT_ SIZE=3 PTSIZE=10>Norton AntiVirus is the world's most trusted anti-virus solution. The sad fact is that over 50% of all computers purchased today will be infected with some sort of virus in their lifetime, viruses that could potentially destroy your entire system, costing hundreds (even thousands) of dollars. Norton's offers the most effective and widely used virus protection to date. Safeguard your computer!

<B>Norton Ghost 2003 (retail $69.95) -- </B>Norton Ghost 2003 provides high-performance utilities for fast and safe system upgrading, backup, and recovery. Allows you to backup the contents of your computer quickly and easily.

<B>GoBack 3 Personal Edition (retail $39.95) -- </B>GoBack 3 is the most advanced system recovery program developed. Any mistake made, no matter how crippling to your computer, can be undone in a matter of seconds by simply turning back the clock on your computer, restoring it to a previous/healthy state.

<B>Norton Utilities 2003 (retail $49.95) -- </B>Norton Utilities 2003 optimizes your PC's performance and solves problems easily. It diagnoses and solves Windows problems, tunes your computers' hard drive for maximum efficiency, and monitors your PC continuously to detect and fix potential problems. You can launch different tools from a single convenient window, and run key utilities directly from the CD to save disk space.

<B>Norton CleanSweep 2003 (retail $69.95) -- </B>Clean out Internet buildup with award-winning Norton CleanSweep from Symantec. It improves your PC's performance by removing unwanted programs and other files that waste disk space-while protecting you from accidentally deleting important files. Trust Norton CleanSweep 2003 for safe, easy, complete hard drive cleanup.

</FONT><FONT_ SIZE=4 PTSIZE=12><B>
</P><P ALIGN=CENTER>Your Price for this entire package: $39.99__ free shipping!
</FONT><FONT_ SIZE=3 PTSIZE=10>
</FONT><FONT_ SIZE=4 PTSIZE=12><A HREF="http://rd.yahoo.com/partner/2766679/overture/first/OV=1/6/1/computer/*http://computerssystems.com/nsw48.htm">For more information about this limited-time amazing package, or to place your order, Click here</A>



</FONT><FONT_ SIZE=2 PTSIZE=8>------------
Opt-Out Instructions:
We are strongly against sending unsolicited emails to those
who do not wish to receive our special mailings. You have opted
i

ok zu deinem Versuch mit telnet auf den server zu kommen:

da bei dem Server SMTP-Auth installiert ist müsstest du dich zuerst mit User und PWD anmelden.

Als ich es dann versuchte ging das Mail weg

gruss

akula
27.01.03, 21:04
ich habe gesehen, dass ich die domains (akula.ch) nur im rcpthosts eingetragen habe aber nicht im me-file und local-file.

ist das ein problem ??

gruss akula

[WCM]Manx
27.01.03, 21:06
Hi!

Entweder, da spamt jemand mit Benutzerkennung und Passwort oder Du hast über einen tcpserver z.B einen IP Bereich freigegeben, in den ich nicht hineinfalle. Für mich definitiv kein Open Relay.

Komisch ist allerdings, dass überhaupt keine Sende-IP aufscheint, die normalerweise beim HELO übergeben wird.
ein bounce bei mir z.B


Return-Path: <apache@wwwstock>
Received: (qmail 6999 invoked by uid 505); 27 Jan 2003 13:54:28 -0000
Received: from apache@wwwstock by mail by uid 502 with qmail-scanner-1.14
(f-prot: 3.12. Clear:.
Processed in 0.212399 secs); 27 Jan 2003 13:54:28 -0000
Received: from www.austrostocks.com (HELO wwwstock) (195.110.213.57)
by 0 with SMTP; 27 Jan 2003 13:54:27 -0000
...


Manx

[WCM]Manx
27.01.03, 21:10
Hi!

In's me file gehört "mail.akula.ch", der MX-Record passt.


> set type=MX
> akula.ch
Server: WS01IS01.highway.telekom.at
Address: 195.3.96.67

Non-authoritative answer:
akula.ch preference = 30, mail exchanger = mail.akula.ch
akula.ch preference = 20, mail exchanger = pop.akula.ch

Authoritative answers can be found from:
akula.ch nameserver = ns1.powerhost.ch
akula.ch nameserver = ns2.powerhost.ch
mail.akula.ch internet address = 193.109.216.54
pop.akula.ch internet address = 193.109.216.54
ns1.powerhost.ch internet address = 193.109.216.70
ns2.powerhost.ch internet address = 213.189.143.71
> exit

akula
27.01.03, 21:10
hi

in /etc/tcp.smtp habe ich das drinnstehen:

127.:allow,RELAYCLIENT=""

gruss

[WCM]Manx
27.01.03, 21:14
Hi!

Wie schauen die tcpserver Optionen für den smtpd aus?
"cat /var/qmail/supervise/qmail-smtpd/run"



...
exec /usr/local/bin/tcpserver -v -p -l 0 -x
...


Grüße

Manx

akula
27.01.03, 21:18
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
#if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
# echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
# echo /var/qmail/supervise/qmail-smtpd/run
# exit 1
#fi
#exec /usr/bin/softlimit -m 2000000 /usr/bin/tcpserver -v -R -l "$LOCAL" -c "$MAXSMTPD" -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd mail.akula.ch /bin/checkpassword /bin/true 2>&1

exec /usr/bin/softlimit -m 2000000 /usr/bin/tcpserver -v -R -l "akula.ch" -c "20" -u "qmaild" -g "qmaild" 0 smtp /var/qmail/bin/qmail-smtpd mail.akula.ch /bin/checkpassword /bin/true 2>&1

Jinto
27.01.03, 21:41
Also ich hab das auch gerade mal probiert und konnte nichts über deinen Computer verschicken.

Mich würde interessieren, welches Programm hinter uid 33 steckt? Kann es evtl. sein dass dein Webserver uid 33 hat und jemand dein Mailformular verwendet (hab nicht nahcgesehen ob du soetwas überhaupt vewerwndest).

HTH

[WCM]Manx
27.01.03, 21:41
Hi!

Erster Vorschlag:
Dreh mal das "data gathering" das tcpservers auf paranoid, sprich, tausche das "-R" auf "-p".
Damit bekommst Du Infos über den remote-host (IP), die Du in den Logfiles (nach Sendedatum) rausfinden kannst.
http://www.die.net/doc/linux/man/man1/tcpserver.1.html

Du solltest zwei Logfiles dazu verwenden können.
"less /var/log/qmail/current |tai64nlocal"
"less /var/log/qmail/smtpd/current |tai64nlocal


2003-01-27 21:20:39.231740500 tcpserver: pid 10354 from 195.3.96.75
2003-01-27 21:20:39.260747500 tcpserver: ok 10354 0:192.168.100.102:25 1234.telekom.at:195.3.96.75::17957
2003-01-27 21:20:41.305487500 tcpserver: end 10354 status 0
2003-01-27 21:20:41.305490500 tcpserver: status: 0/20


Manx

[WCM]Manx
27.01.03, 21:48
Original geschrieben von Jinto
Mich würde interessieren, welches Programm hinter uid 33 steckt? Kann es evtl. sein dass dein Webserver uid 33

... Adlerauge, wow.
"getent passwd" => was läuft sonst so noch am Rechner? fax2mail gateway?

Grüße

Manx

akula
27.01.03, 21:55
Hier sind ein paar log-auszüge:

/var/log/qmail/smtp :

2003-01-27 21:52:28.854083500 tcpserver: end 22340 status 256
2003-01-27 21:52:28.854123500 tcpserver: status: 2/20
2003-01-27 21:52:34.447353500 tcpserver: status: 3/20
2003-01-27 21:52:34.447834500 tcpserver: pid 22392 from 64.12.138.3
2003-01-27 21:52:45.823775500 tcpserver: ok 22369 akula.ch:193.109.216.54:25 :205.188.156.71::63628
2003-01-27 21:53:02.793690500 tcpserver: end 22369 status 0
2003-01-27 21:53:02.793746500 tcpserver: status: 2/20
2003-01-27 21:53:06.387306500 tcpserver: status: 3/20
2003-01-27 21:53:06.387801500 tcpserver: pid 22408 from 64.12.138.5
2003-01-27 21:53:30.910140500 tcpserver: ok 22387 akula.ch:193.109.216.54:25 :64.12.138.5::51517
2003-01-27 21:53:30.914160500 tcpserver: end 22387 status 256
2003-01-27 21:53:30.914218500 tcpserver: status: 2/20
2003-01-27 21:53:59.560149500 tcpserver: ok 22392 akula.ch:193.109.216.54:25 :64.12.138.3::63411
2003-01-27 21:54:31.503825500 tcpserver: ok 22408 akula.ch:193.109.216.54:25 :64.12.138.5::56458
2003-01-27 21:54:44.068049500 tcpserver: end 22408 status 0
2003-01-27 21:54:44.068060500 tcpserver: status: 1/20

/var/qmail/current:

2003-01-27 21:54:42.078908500 bounce msg 58329 qp 22496
2003-01-27 21:54:42.079051500 end msg 58329
2003-01-27 21:54:42.079579500 new msg 58330
2003-01-27 21:54:42.079721500 info msg 58330: bytes 7426 from <#@[]> qp 22496 uid 64012
2003-01-27 21:54:42.084807500 starting delivery 213: msg 58330 to local postmaster@akula.ch
2003-01-27 21:54:42.084915500 status: local 1/10 remote 2/20
2003-01-27 21:54:42.104009500 new msg 58321
2003-01-27 21:54:42.104167500 info msg 58321: bytes 7529 from <#@[]> qp 22499 uid 64010
2003-01-27 21:54:42.108967500 starting delivery 214: msg 58321 to local bm@akula.ch
2003-01-27 21:54:42.109075500 status: local 2/10 remote 2/20
2003-01-27 21:54:42.109242500 delivery 213: success: did_0+1+0/qp_22499/
2003-01-27 21:54:42.109442500 status: local 1/10 remote 2/20
2003-01-27 21:54:42.109724500 end msg 58330
2003-01-27 21:54:42.120754500 delivery 214: success: did_1+0+0/
2003-01-27 21:54:42.120983500 status: local 0/10 remote 2/20
2003-01-27 21:54:42.121238500 end msg 58321
2003-01-27 21:55:17.200864500 delivery 200: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connecti on._(#4.4.1)/
2003-01-27 21:55:17.200883500 status: local 0/10 remote 1/20

akula
27.01.03, 21:57
Original geschrieben von Jinto
Mich würde interessieren, welches Programm hinter uid 33 steckt? Kann es evtl. sein dass dein Webserver uid 33 hat und jemand dein Mailformular verwendet (hab nicht nahcgesehen ob du soetwas überhaupt vewerwndest).

HTH

wo hast du uid 33 gesehen ???

edit : habs gesehen. ja uid 33 ist der apache-user

Jinto
27.01.03, 22:00
@[WCM]Manx

... Adlerauge, wow. :D

@akula
leider falsches Logfile. uid 33 ist der Webserver => Tippe ich auf XSS-Attacke. Befrage dein Webserver Logfile und mach ein update deiner Board Software.

Am besten du machst ein Abgleich zwischen Maillogfile und Webserver.

HTH

akula
27.01.03, 22:01
auszug aus dem apache log:

pd958df64.dip.t-dialin.net - - [26/Jan/2003:06:37:21 +0100] "HEAD / HTTP/1.0" 200 0 "-" "-"
211.99.139.190 - - [26/Jan/2003:18:07:16 +0100] "GET /scripts/..%255c%255c../winnt/system32/cmd.exe?/c+dir" 404 - "-" "-"
66.188.27.208.bay.mi.chartermi.net - - [27/Jan/2003:01:10:39 +0100] "HEAD / HTTP/1.0" 200 0 "-" "-"
dsl-200-67-17-141.prodigy.net.mx - - [27/Jan/2003:01:43:28 +0100] "GET /sumthin HTTP/1.0" 404 264 "-" "-"
pd9e7ea59.dip.t-dialin.net - - [27/Jan/2003:13:55:40 +0100] "HEAD / HTTP/1.0" 200 0 "-" "-"
185.55.202.62.dial.bluewin.ch - - [27/Jan/2003:19:52:07 +0100] "-" 408 - "-" "-"m341p020.dipool.highway.telekom.at - - [27/Jan/2003:20:50:30 +0100] "GET / HTTP/1.0" 200 12 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"
ort-r01.mx.aol.com - - [27/Jan/2003:21:02:37 +0100] "CONNECT ort-r01.mx.aol.com:25 HTTP/1.0" 405 294 "-" "-"
p508f529a.dip.t-dialin.net - - [27/Jan/2003:21:09:57 +0100] "GET / HTTP/1.0" 200 12 "-" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461)"
p213.54.46.91.tisdip.tiscali.de - - [27/Jan/2003:21:44:31 +0100] "GET / HTTP/1.0" 200 12 "-" "-"

man bemerke den eintrag "aol"

akula
27.01.03, 22:04
Original geschrieben von Jinto
@[WCM]Manx
:D

@akula
leider falsches Logfile. uid 33 ist der Webserver => Tippe ich auf XSS-Attacke. Befrage dein Webserver Logfile und mach ein update deiner Board Software.

Am besten du machst ein Abgleich zwischen Maillogfile und Webserver.

HTH

hmm, was ist eine XSS-Atacke und welche board-software soll ich updaten ??

gruss

akula
27.01.03, 22:16
hmm wenn ich ein tail -f /var/log/apache/access.log mache sollte ich doch jeden Zugriff sofort sehen können oder ? das macht es aber nicht

gruss

Jinto
27.01.03, 22:26
Ich dachte, dass phpBB2 evtl anfällig ist (ok die von dir eingesetzte Version 2.0.3 gibt ein Sicherheitsupdate her). Aber so wie es aussieht, musst du den schuldigen wohl in deiner Apache Konfiguration suchen.

PS: XSS=Cross Side Scripting

akula
28.01.03, 08:59
ok ich habe phpBB2 mal auf version 2.0.4 upgedatet

soll ich mal meine apache config posten ??

gruss

Jinto
28.01.03, 11:56
ja, aber ohne Kommentarzeilen.

akula
28.01.03, 14:00
wie entferne ich schnell alle Kommentar-Zeilen aus eine Datei (will nicht jede Zeile einzeln löschen) ???

akula
28.01.03, 14:25
naja habe mir nun halt die mühe gemacht, ich wäre aber trotzdem noch froh wenn mir jemand einen Tipp geben könnte wegen den Kommentazeilen

edit: wie müssten die Benutzerrechte auf den CGI-BIN Verzeichnissen sein ? WIr haben alle Daten in /home/httpd. Die html-Seiten sind in /home/httpd/html/www.*.ch die CGI's sind ind /home/htpd/cgi-bin/www.*.ch

jeder user hat dann einen Link der Verzeichnisse in sein HomeVerzeichnis.

rasi
28.01.03, 16:21
das sollte so gehen:

cat /etc/httpd/httpd.conf |grep -v ^# >/tmp/http.txt


versuchs mal

rasi

ps
dein thread liest sich wie ein krimi :eek: