LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-14-2011, 11:43 AM   #1
Jorgee!
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Rep: Reputation: 0
Block certain crafted packets with IP Tables before reaching a server?


Hi guys, im desperated, im coming here to see if someone can help me.

I have basic knowledge of Linux.... if you tell me how to do it, ill find the way.

What's going on:

Battlefield 2 server being attacked by packets that creates infinite loop, then when a player disconnects, server crash.

The packets seems to be always the same.....

Attacker Script: http://aluigi.altervista.org/poc/bf2loop.zip

Script in action:

PHP Code:
you must check the server manually to know if it's vulnerable or not
- start connection:
..
  received: 02 7
..
  received: 07 12
..
  received: 0f 25
....
  received: 03 6

- you must check the server manually to know if it'
s vulnerable or not
start connection:
..
  
received02 7
..
  
received07 12
..
  
received0f 25
....
  
received03 6

you must check the server manually to know if it's vulnerable or not
- start connection: 
I need to find a way to block these 4 packets (i think theyre 4 for what i tested) with IP TABLES.

Please! Please help me!

Thanks a lot!


EDIT: There seem to be other different replies, maybe 1 different but no more.... maybe you can find something useful in the script.

Last edited by Jorgee!; 03-14-2011 at 12:20 PM.
 
Old 03-14-2011, 11:56 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
If anything, I would make the script capture the IP address and add an iptables rule to block my IP address. Unless you don't want to do it this way....
 
Old 03-14-2011, 12:21 PM   #3
Jorgee!
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks but true is that the script is the attacker, not something in the server.

Anyway, i don't know how to make a rule to identify it and block it... how would you identify such packets?

Thanks a lot.
 
Old 03-14-2011, 12:40 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Jorgee! View Post
Battlefield 2 server being attacked by packets that creates infinite loop
This vulnerability was disclosed a long time ago. As http://aluigi.altervista.org/adv/bf2loop-adv.txt indicates a (mcrsft-only) patch was released and the text refers to another patch as well. If you run your BF2 server on mcrsft then first patch. If that doesn't (completely) mitigate things see if the other patch works. Only if you run your BF2 server on Linux I suggest capturing UDP packets with tcpdump. Once you have packets you could create an iptables rule.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IP-Tables configuration dropping packets. J.Sherman Linux - Networking 2 08-10-2009 09:28 PM
block ftp brute force without ip tables reeseslover531 Linux - Server 2 11-24-2006 06:48 PM
Block/open all port using IP Tables rules shipon_97 Linux - Networking 1 09-06-2006 11:20 PM
Is it possible to block text strings with IP tables? abefroman Linux - Security 27 06-29-2005 05:36 PM
Setting ip tables to block all traffic LinuxBAH Linux - Security 1 02-07-2004 06:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration