Advertising
Is your server exploited (Part 2)

30.08.2011 - 22:09:41

werd ich tun :)

  schnoog
First Sergeant

User Pic

Posts: 294
Registred: 08.12.2010
Origin: Südbaden

    

0 approved this posting.


04.09.2011 - 12:16:43

Läuft bisher einwandfrei :)

  schnoog
First Sergeant

User Pic

Posts: 294
Registred: 08.12.2010
Origin: Südbaden

    

0 approved this posting.


04.09.2011 - 20:14:01

Schön zu hören, freud mich :)

  OldMan
Private First Class

User Pic

Posts: 44
Registred: 28.08.2011

   

0 approved this posting.


12.09.2011 - 22:17:41

Weiterhin alles bestens!!!!

  schnoog
First Sergeant

User Pic

Posts: 294
Registred: 08.12.2010
Origin: Südbaden

    

0 approved this posting.


13.09.2011 - 02:00:22

Sehr schön. Ich habe noch ein paar kleine Änderungen vogenommen.

- unnötigen Programmcode entfernt
- Pfade werden jetzt automatisch ermittelt
- kleine Fehler gefixt

Läuft bei mir momentan per Cronjob 1x pro Minute,
CAPTURETIME=5
MAXPERSECONDS=4

>>> Download <<<

testen erwünscht :)

Tip:
Bei jeder Ausführung per Cronjob wird an den Benutzer ein E-Mail mit dem ablaufenden Programm gesendet. Das lässt sich unterbinden wenn man das Script mit folgender Erweiterung ausführt:

../getstatus_ban.sh /dev/null 2>&1


Grüße

OldMan


last changed by OldMan2011 am 13.09.2011 - 11:32:05

  OldMan
Private First Class

User Pic

Posts: 44
Registred: 28.08.2011

   

0 approved this posting.


14.09.2011 - 06:34:38

läuft seit gestern aufm server..
schöne sache!

  schnoog
First Sergeant

User Pic

Posts: 294
Registred: 08.12.2010
Origin: Südbaden

    

0 approved this posting.


15.09.2011 - 21:11:08

Leider nicht, ein Satz mit X, das war wohl nix. :-(

Das Script funktioniert in der Shell aber leider nicht als Cron.
Cron ignoriert die Übergabe an eine Variable von `which iptables`.
Egal was ich anstelle es funktioniert so nicht.
Nach stundenlanger Suche verwerfe ich den Weg.

Falls jemand eine Lösung dafür hat, immer her damit ;)

Abhilfe schafft hier im Moment die PATH-Angabe im Script.
Ich lade das geänderte Script heute abend noch hoch.

Hier ist auch noch ein Fehler:

../getstatus_ban.sh /dev/null 2>&1 ist falsch

muss natürlich

../getstatus_ban.sh > /dev/null 2>&1

heissen.
Allerdings werden dann auch die Debuginfos nicht ausgegeben.
Besser wäre es evtl. : als root ausführen #crontab -e und dann MAILTO="" oben einzufügen.
Dann werden aber alle Mails von Cron deaktiviert.
Auch hier könnten die Umgebungsvariablen gesetzt werde damit Cron iptables findet.

Grüße

OldMan

  OldMan
Private First Class

User Pic

Posts: 44
Registred: 28.08.2011

   

0 approved this posting.


15.09.2011 - 21:17:36

bei mir hat er den which genommen :smiley_hb1:

Aber vielen Dank für Deine Mühe!

  schnoog
First Sergeant

User Pic

Posts: 294
Registred: 08.12.2010
Origin: Südbaden

    

0 approved this posting.


16.09.2011 - 00:17:06

mach ich doch gerne :)

Kann das sein das die Umgebungsvariablen in deiner Crontab gesetzt werden?
Packe ich diese nämlich in das Script funktioniert es auch mit `which`.

Hier das geänderte Script:

>>> Download <<<

.

  OldMan
Private First Class

User Pic

Posts: 44
Registred: 28.08.2011

   

0 approved this posting.


16.09.2011 - 03:13:40

someone can translate it for english please? im lost now :(

  zer0o0
Private First Class

User Pic

Posts: 37
Registred: 26.01.2011

   

0 approved this posting.


17.09.2011 - 00:20:16

I`ll translate it ASAP

  schnoog
First Sergeant

User Pic

Posts: 294
Registred: 08.12.2010
Origin: Südbaden

    

0 approved this posting.


19.09.2011 - 06:37:22

OldMan 20111 rewrote the script to bring the bans to an own iptables chain.
The script runs smoother now, so simply give it a try. ( http://et-zone.de/downloads/?action=download&id=14 ) works fine for me.
Thanks oldman (yes, I`ve set the env. in cron for another script I`m running.

  schnoog
First Sergeant

User Pic

Posts: 294
Registred: 08.12.2010
Origin: Südbaden

    

0 approved this posting.


19.09.2011 - 18:30:46

thanks for that schnoog!!! Gona try it now!!

  zer0o0
Private First Class

User Pic

Posts: 37
Registred: 26.01.2011

   

0 approved this posting.


19.09.2011 - 22:27:23

something strange now happens to my server seems all the scripts not are working im getting almost 40mb/s now and nobody is playing in my servers and im running the oldman script every 1 minute

  zer0o0
Private First Class

User Pic

Posts: 37
Registred: 26.01.2011

   

0 approved this posting.


19.09.2011 - 22:29:51

i shutdown 2 servers now and the speed as decreased to 15mb/s, i really dont know what are happening i try all the script versions and no good results!!!

  zer0o0
Private First Class

User Pic

Posts: 37
Registred: 26.01.2011

   

0 approved this posting.


20.09.2011 - 00:04:28

Hello,

please give me more information. Server and OS version?
Check it: iptables, tcpdump, grep, cat and awk installed?

Run the script for fault-finding not as cronjob, run only in the console!

Enable all debugging options in the script, start the script in the console with:

. / getstatus_ban.sh >> log.txt

post log.txt here

Sorry for my bad english.....

Thx

OldMan

  OldMan
Private First Class

User Pic

Posts: 44
Registred: 28.08.2011

   

0 approved this posting.


20.09.2011 - 00:09:53

its not a problem in your script, its something different, i already talked to schnoog i ask him if was possible use a variation of getstatus request because seems the requests not are getting catch by this kind of scripts!!! Schnoog is experiencig the same problem them me right now!!!


last changed by zer0o0 am 20.09.2011 - 00:10:22

  zer0o0
Private First Class

User Pic

Posts: 37
Registred: 26.01.2011

   

0 approved this posting.


20.09.2011 - 06:44:09

Seems like the massiv amount of getstatus packets flooding the script.
After decreasing the capturetime to 5 s, and the maximal packet captured by tcpdump to 1000000, the traffic dropped from 12MB/s to 3kB/s

  schnoog
First Sergeant

User Pic

Posts: 294
Registred: 08.12.2010
Origin: Südbaden

    

0 approved this posting.


20.09.2011 - 13:01:05

Seems to be a new problem. If, however, does not occur continuously

tcpdump:

* 65 535 zoneRef still be | $ [26469q] [| domain] 02:46:49.493966 IP 204.202.229.62.domain> **.***. 62.254.27962
E. P. .*....|......>> 5m .. :........ GetStatus

I'm trying to find a solution.

  OldMan
Private First Class

User Pic

Posts: 44
Registred: 28.08.2011

   

0 approved this posting.


22.09.2011 - 23:41:35

seems the attacks has been stop for now i hope everything will run ok again!!

  zer0o0
Private First Class

User Pic

Posts: 37
Registred: 26.01.2011

   

0 approved this posting.




Images by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Powered by IlchBB Forum 3.1 © 2010 Weblösungen Florian Körner