User
Pass
2FA
 
 

Anti CSDoS [Linux] - Cea mai buna metoda - HL Shield

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash
Author Message21227
Hidden

[Very Important Person]



Status: Offline
(since 25-01-2009 20:13)
Joined: 15 Nov 2006
Posts: 3391, Topics: 172
Location: Universul meu interior

Reputation: 440.7
Votes: 48

Post Posted: 18-04-2007, 13:46:33 | Translate post to: ... (Click for more languages)

Cum vã protejaþi serverul de Counter-Strike impotiva atacurilor cu csdos.pl (pentru servere gãzduite pe Linux)

Ce este csdos.pl?

Este un script perl care exploateazã un bug din serverul de Half-Life (ºi toate mod-urile sale, printre care si Counter-Strike), provocând un Denial of Service (refuz al serviciului). Ce înseamnã acest lucru mai exact ºi cum vã afecteazã pe dumneavoastrã ca owner de server de Counter-Strike? Pãi e foarte simplu, serverul intrã intr-o buclã infinitã care nu mai permite jucãtorilor sã se mai conecteze; în plus, dacã pe maºina respectivã mai aveþi ºi alte servicii, serviciile respective vor fi ºi ele afectate, pentru cã serverul de Counter-Strike are tendinþa de a consuma foarte mult timp de procesor (99%), provocând încetinirea generalã a sistemului. OK, aþi înteles despre ce este vorba, dar ce este de facut în cazul în care serverul nostru este supus unui atac de acest fel? Momentan nu existã nici un patch oficial pentru aceastã vulnerabilitate (descoperitã în februarie 2006). Trebuie menþionat cã aceasta problemã NU afecteazã serverele STEAM.


Ce este de fãcut?

Din fericire existã mai multe variante de a opri atacurile de acest gen. Una din metode este analizarea traficului dintre server ºi clienþi, cu snort sau iptables (utilizând string matching). Ambele metode au însã dezavantajul cã analizeazã fãrã discernãmânt TOT traficul, crescând inutil încãrcarea procesorului. În plus implementarea acestor metode este relativ greoaie ºi dificilã pentru un începãtor (necesitã cunostinþe destul de bune de administrare a serverelor Linux). Un alt dezavantaj este cã aceste metode nu rezistã atacurilor cu csdos.pl modificat.

Soluþia dezvoltatã de Serghei Amelian ºi propusã atenþiei dvs. abordeazã altfel aceastã problemã. În principiu este vorba de o bibliotecã care se interpune între server ºi internet, care analizeazã doar request-urile de tip CONNECT care vin dinspre clienþi (csdos.pl exploateazã un bug care se manifestã doar pentru aceste tipuri de request-uri).

Versiunea curentã a HLShield-ului este 1.6

Instalarea este extrem de simplã, pur ºi simplu rulaþi grupul de comenzi de mai jos în folderul radãcinã a serverului Half Life:
Code:

wget http://download.freakz.ro/hlshield-install.sh
chmod 755 hlshield-install.sh
./hlshield-install.sh


Bineinteles, dupã aceastã operaþiune trebuie sã restartaþi serverul. Dacã totul a fost corect executat, în consola ar trebui sã vedeþi ceva de genul ãsta:

Code:

[AMXX] Loaded 28 admins from file
HLShield[10062]: HLShield 1.6 - (c) 2007 by Serghei Amelian
Master server communication disabled.



Acum a sosit momentul pentru a testa protecþia. Porniþi serverul Half Life, asiguraþi-vã cã pe sistemul dumneavoastrã exista perl (cam orice Linux vine cu perl preinstalat), apoi executaþi comenzile de mai jos:

Code:

wget http://hobby.sarichioi.com/cstrike/csdos.pl
perl csdos.pl IP.SERVER


Pentru a afla dacã atacul iniþiat a fost respins, verificaþi aici:

Code:

tail -f /var/log/daemon.log


Dacã patch-ul a fost corect aplicat, trebuie sa vedeþi ceva de genul ãsta:

Code:

Jan 26 11:26:48 gw HLShield[28563]: rejected atack from IP.SERVER


Începând cu versiunea 0.9, HLShield[.b] are câteva noi opþiuni, care se configureazã prin adãugarea câtorva variabile de mediu în [b]hlds_run. Pentru a le introduce, deschideþi cu editorul de text preferat (vi, nano, joe, mcedit, etc.) fiºierul hlds_run ºi introduceþi (înainte de linia cu "export LD_PRELOAD=./hlshield.so") variabilele corespunzãtoare. De exemplu pentru mesaj de rãspuns la atac trebuie sã arate cam aºa:

Code:

export HLSHIELD_REPLY="Ratatii sã se lase de meserie!"
export LD_PRELOAD=./hlshield.so


Dacã doriþi sã blocaþi un IP care incearcã prea multe connect-uri într-un interval de timp foarte scurt (în general atacatorii procedeazã astfel), editaþi hlds_run pentru a arata astfel:

Code:

export HLSHIELD_INTERVAL=30
export LD_PRELOAD=./hlshield.so


Acest lucru înseamnã cã într-un interval de 30 de secunde nu pot fi efectuate mai mult de 3 încercãri de conectare. Puteþi testa asta conectând-vã/de-conectându-vã (în serie rapidã) cu clientul de counter. O sã vã aparã o fereastrã ca cea de mai jos. Dacã atacatorul nu respectã cele 30 de secunde, intervalul se prelungeºte cu încã 30 de secunde, º.a.m.d.



Aceastã ultimã opþiune poate proteja serverul dvs. de exploit-ul cu "born to be pig", care blocheazã serverul dupã încercãri repetate de reconectare.

Începând cu versiunea 1.5 (aceastã opþine nu funcþioneazã împreunã cu versiunea 3561 a engine-ului Half Life), am introdus posibilitatea de a ºterge din numele jucãtorului unele caractere, cum ar fi de exemplu ` sau ~. Pentru a face acest lucru, hlds_run trebuie editat pentru a arãta în felul urmãtor:

Code:

export HLSHIELD_REMOVE='`~'
export LD_PRELOAD=./hlshield.so


Începând cu versiunea 1.6, HLShield poate funcþiona cu versiunea 3561 a engine-ului Half Life. Notaþi cã dacã veþi folosi versiunea 3561, opþiunea HLSHIELD_REMOVE nu va putea fi utilizatã (aceastã versiune a Half Life-ului nu acceptã sã fie modificat string-u CONNECT).


Notã: Locaþia fiºierului daemon.log poate diferi, în funcþie de distribuþia folositã.

Notã: patch-ul a fost testat doar pentru Counter Strike 1.6 non-steam, dar este posibil sã funcþioneze ºi cu alte MOD-uri HalfLife.

Autor:Serghei Amelian


...va asigur ca greselile ortografice, ortoepice, de punctuatie, morfosintactice si folosirea inadecvata a unitatilor lexico-semantice imi apartin, mi le asum, dar la scoala sa stiti ca tot nu ma duc!

0 0
  
Back to top
View user's profile Send private message
kERPLUNK

[Mentally Stable]



Status: Offline
(since 28-03-2009 05:23)
Joined: 13 Dec 2008
Posts: 7, Topics: None
Location: Argentina

Reputation: 87.9
Votes: 4

Post Posted: 13-12-2008, 07:12:13 | Translate post to: ... (Click for more languages)

does not work with cbooster, do u have any solution to work together?
0 0
  
Back to top
View user's profile Send private message
Donche

[Mentally Stable]



Status: Offline
(since 24-10-2010 23:05)
Joined: 22 Aug 2010
Posts: 47, Topics: 8
Location: Albania

Reputation: 68.2
Votes: 2

Post Posted: 14-09-2010, 12:06:24 | Translate post to: ... (Click for more languages)

I INstalle HL Shield
But when i Start my root and when i write in console root screen -r for a see console is he started or not
He showed this :

Code:
Auto detecting CPU
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
Using Pentium II Optimised binary.
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
Auto-restarting the server on crash
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
Error:libSteamValidateUserIDTickets_i386.so: cannot open shared object file: No such file or directory
Unable to load engine, image is corrupt.
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.

0 0
  
Back to top
View user's profile Send private message
Donche

[Mentally Stable]



Status: Offline
(since 24-10-2010 23:05)
Joined: 22 Aug 2010
Posts: 47, Topics: 8
Location: Albania

Reputation: 68.2
Votes: 2

Post Posted: 19-09-2010, 02:54:20 | Translate post to: ... (Click for more languages)

Anyone can answer in this topic ?
0 0
  
Back to top
View user's profile Send private message
Shocker

[Freakz owner]



Status: Offline
(since 08-02-2020 12:17)
Joined: Momentul zero
Posts: 33986, Topics: 1350
Location: localhost

Reputation: 6485.6
Votes: 829

   
Post Posted: 19-09-2010, 12:39:33 | Translate post to: ... (Click for more languages)

HL Shield is extremely OLD, either use a newer version of it or use dproto

FREAKZ COMMUNITY @ Facebook
WOW FREAKZ @ Facebook
0 0
  
Back to top
View user's profile Send private message
Donche

[Mentally Stable]



Status: Offline
(since 24-10-2010 23:05)
Joined: 22 Aug 2010
Posts: 47, Topics: 8
Location: Albania

Reputation: 68.2
Votes: 2

Post Posted: 22-09-2010, 19:22:13 | Translate post to: ... (Click for more languages)

I Put HL Shield in my server in root
And when i start i se in screen console in root and showed this:

Code:

ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
./hlds_run: line 209: gdb: command not found
email debug.log to [email protected]
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.
Wed Sep 22 19:20:41 CEST 2010: Server restart in 10 seconds
ERROR: ld.so: object './hlshield.so' from LD_PRELOAD cannot be preloaded: ignored.



And not showed server :S
I Have server only in Protocol 47 :S

Another server in my country have server in Protocol 47 but servers my friend worked HL Shield
Me not worked :s ?

0 0
  
Back to top
View user's profile Send private message
Donche

[Mentally Stable]



Status: Offline
(since 24-10-2010 23:05)
Joined: 22 Aug 2010
Posts: 47, Topics: 8
Location: Albania

Reputation: 68.2
Votes: 2

Post Posted: 29-09-2010, 01:14:21 | Translate post to: ... (Click for more languages)

I Restart my Srw but now Started HL Shild ?
Maybe i need to put any command in hlds run for started HL Shield ?

0 0
  
Back to top
View user's profile Send private message
M3T@LL1Ka
[Banned user]


Banned


Status: Offline
(since 06-09-2011 21:23)
Joined: 17 Aug 2011
Posts: 125, Topics: 26
Location: Romania

Reputation: 70.1
Votes: 7

Post Posted: 26-08-2011, 18:29:29 | Translate post to: ... (Click for more languages)

nu trebuie nimic downloadat de aici...doar comanda si atat :o ?



IP : 92.55.137.75:27015
0 0
  
Back to top
View user's profile Send private message
*0ranGe ! extrem

[I ❤ MY POLO!]



Status: Offline
(since 11-12-2017 12:06)
Joined: 01 Jul 2007
Posts: 11419, Topics: 191
Location: Romania

Reputation: 683.4
Votes: 117

   
Post Posted: 26-08-2011, 19:14:18 | Translate post to: ... (Click for more languages)

Code:
wget http://download.freakz.ro/hlshield-install.sh


E pentru linux in primul rand iar acela este link-ul de download.



0 0
  
Back to top
View user's profile Send private message
M3T@LL1Ka
[Banned user]


Banned


Status: Offline
(since 06-09-2011 21:23)
Joined: 17 Aug 2011
Posts: 125, Topics: 26
Location: Romania

Reputation: 70.1
Votes: 7

Post Posted: 26-08-2011, 22:37:15 | Translate post to: ... (Click for more languages)

orange..si unde trebuie adaugat..poti sa ma ajuti putin..am probleme serioase rau cu legends...pica de 13 ori pe zi -



IP : 92.55.137.75:27015
0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash  


The time now is 29-03-2024, 13:38:14
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x