Raised This Month: $51 Target: $400
 12% 

[HELP] A2S/Dos attack exploit


Post New Thread Reply   
 
Thread Tools Display Modes
dedimark
Senior Member
Join Date: Jul 2015
Location: London
Old 02-19-2016 , 20:55   Re: [HELP] A2S/Dos attack exploit
Reply With Quote #11

ZombiMod

GAME server mitigation - configure it at ovh/soyoustart panel

Last edited by dedimark; 02-19-2016 at 20:55.
dedimark is offline
cTmoNe
AlliedModders Donor
Join Date: Jul 2010
Location: Germany
Old 02-19-2016 , 22:06   Re: [HELP] A2S/Dos attack exploit
Reply With Quote #12

Quote:
Originally Posted by dedimark View Post
ZombiMod

GAME server mitigation - configure it at ovh/soyoustart panel
Is on mitigation but not stopped the attack.

https://i.gyazo.com/7604c93ba4fb6dc7...fae6f51273.png
https://i.gyazo.com/d35afc10f0b0fc83...94f8856594.png


Under attack

__________________



Last edited by cTmoNe; 02-20-2016 at 12:26.
cTmoNe is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 02-20-2016 , 02:17   Re: [HELP] A2S/Dos attack exploit
Reply With Quote #13

Any chance you can add a spoiler to that image so it doesn't break the formatting of the page?
Darkness_ is offline
poel
Veteran Member
Join Date: Mar 2013
Old 02-20-2016 , 17:19   Re: [HELP] A2S/Dos attack exploit
Reply With Quote #14

Quote:
Originally Posted by ZombiMod.Com View Post
Damn, you changed 3 times your IP server and still ddosed since few months ? wtf, someone dont like you lel
poel is offline
LaRoVV66
Senior Member
Join Date: Jul 2015
Old 02-20-2016 , 19:29   Re: [HELP] A2S/Dos attack exploit
Reply With Quote #15

hallo

this is spofing attack

you can limited this attack for iptables.

mfg
LaRoVV66 is offline
cTmoNe
AlliedModders Donor
Join Date: Jul 2010
Location: Germany
Old 02-20-2016 , 22:03   Re: [HELP] A2S/Dos attack exploit
Reply With Quote #16

Quote:
Originally Posted by LaRoVV66 View Post
hallo

this is spofing attack

you can limited this attack for iptables.

mfg
Dont work.
__________________


cTmoNe is offline
LaRoVV66
Senior Member
Join Date: Jul 2015
Old 02-21-2016 , 08:52   Re: [HELP] A2S/Dos attack exploit
Reply With Quote #17

Quote:
Originally Posted by ZombiMod.Com View Post
Dont work.
hallo

add me steam i help you

http://steamcommunity.com/profiles/76561198002158170/
LaRoVV66 is offline
cTmoNe
AlliedModders Donor
Join Date: Jul 2010
Location: Germany
Old 02-21-2016 , 11:06   Re: [HELP] A2S/Dos attack exploit
Reply With Quote #18

Quote:
Originally Posted by LaRoVV66 View Post
Your list is full.
__________________


cTmoNe is offline
cTmoNe
AlliedModders Donor
Join Date: Jul 2010
Location: Germany
Old 02-22-2016 , 12:46   Re: [HELP] A2S/Dos attack exploit
Reply With Quote #19

Who have server to OVH, because i dont understand why when i delete the UDP rules for port 27015 in GAME firewall the attack is stopped, but some players can not connect to the game server.

https://gyazo.com/b10657e7547a354a886c2b7f1bc940d2
__________________


cTmoNe is offline
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 02-23-2016 , 11:59   Re: [HELP] A2S/Dos attack exploit
Reply With Quote #20

Hello, I have had these attacks aswell, I have made a firewall script which has stopped them for me.

Make sure you properly configure this firewall script with your UDP and TCP ports, also add your IPs needed for rcon whitelist such as gameme stats etc and get rid of any tcp / udp ports which you don't need.

After you are done, save this file as firewall.sh and then chmod 777 to make it executable, after you have done this run the command ./firewall.sh It will install the firewall rules and also automatically save them for reboot.

PHP Code:
#!/bin/bash
LANG=CLC_ALL=Cexport LANG LC_ALL
clear

################################################
#################CONFIGURATION##################
# Path to iptables
IPTABLES='/sbin/iptables'

# Server Ports (UDP)
GS_PORTS="
    27015:27020
    1337
    9987
    42020
    28015
"

# Services ports (TCP)
SRV_PORTS="
    21
    22 
    80
    3306
    12679
    10011
    30033
    10044:10045
    29799:29899
    27015:27020
    28015
    1337
    2044:2050
    17017:17022
    42020
"

# RCON Whitelist
RCON_IPS="
    127.0.0.1

"
################################################
#################CONFIGURATION##################

# Clean IPTables
`$IPTABLES -F; $IPTABLES -X`

# Keep active connections alive.
`$IPTABLES -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT`
`
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT`

# List policies first
`$IPTABLES -P INPUT DROP; iptables -P FORWARD DROP; iptables -P OUTPUT ACCEPT`

# Performance-wise let this back in early:
`$IPTABLES -A INPUT -m state --state ESTABLISHED -j ACCEPT`

# Allow gameservers
echo -"\e[92mAllowing server ports (UDP) \e[0m"
for i in $GS_PORTS
do
    `
$IPTABLES -A INPUT -m state --state NEW -m udp -p udp --dport $i -j ACCEPT`
    `
$IPTABLES -A INPUT -p udp -m udp --dport $i -m string --algo bm --hex-string '|ffffffff54|' -m limit --limit 1/s --limit-burst 1 -j ACCEPT`
    `
$IPTABLES -A INPUT -p udp -m udp --dport $i -m string --algo bm --hex-string '|ffffffff54|' -j DROP`
    `
$IPTABLES -A INPUT -p udp -m udp --dport $i -m string --algo bm --hex-string '|ffffffff55|' -m limit --limit 1/s --limit-burst 1 -j ACCEPT`
    `
$IPTABLES -A INPUT -p udp -m udp --dport $i -m string --algo bm --hex-string '|ffffffff55|' -j DROP`
    `
$IPTABLES -A INPUT -p udp -m udp --dport $i -m string --algo bm --hex-string '|ffffffff56|' -m limit --limit 1/s --limit-burst 1 -j ACCEPT`
    `
$IPTABLES -A INPUT -p udp -m udp --dport $i -m string --algo bm --hex-string '|ffffffff56|' -j DROP`
    `
$IPTABLES -A INPUT -p udp -m udp --dport $i -m string --algo bm --hex-string '|ffffffff57|' -m limit --limit 1/s --limit-burst 1 -j ACCEPT`
    `
$IPTABLES -A INPUT -p udp -m udp --dport $i -m string --algo bm --hex-string '|ffffffff57|' -j DROP`
    `
$IPTABLES -A INPUT -p udp -m udp --dport $i -m length --length 60 -m recent --set --name GameSynF`
    `
$IPTABLES -A INPUT -p udp -m udp --dport $i -m string --algo kmp --hex-string "|ff ff ff ff 56|" -m recent --set --name GameSynF -j DROP`
    
    echo 
Port$i
done

# Allow service ports
echo -"\n\e[92mAllowing service ports (TCP) \e[0m"
for i in $SRV_PORTS
do
    `
$IPTABLES -A INPUT -m state --state NEW -m tcp -p tcp --dport $i -j ACCEPT`
    echo 
Port$i
done

# Allow RCON only from certain IPs.
echo -"\n\e[92mAllowing RCON IPS \e[0m"
for i in $RCON_IPS
do
    `
$IPTABLES -A INPUT -m state --state NEW -m tcp -p tcp -s $i --dport 27015:27019 -j ACCEPT`
    echo 
IP$i
done

# Always allow loopback
`$IPTABLES -A INPUT -i lo -j ACCEPT`

# Allow Local connections
`$IPTABLES -A INPUT -s 127.0.0.1 -j ACCEPT`

# Allow 3 way handshake
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Drop Query Spam
`$IPTABLES -N CHECK1`
`
$IPTABLES -A INPUT -p udp -m length --length 829 -j CHECK1`
`
$IPTABLES -A CHECK1 -p udp -m length --length 829:65535 -m limit --limit 128/second -j ACCEPT`
`
$IPTABLES -A CHECK1 -j DROP

# Drop Fragmented packets
`$IPTABLES -A INPUT -f -j DROP`

# Drop Malformed packets
`$IPTABLES -A INPUT -p tcp --tcp-flags ALL ALL -j DROP`

# Drop null packets
`$IPTABLES -A INPUT -p tcp --tcp-flags ALL NONE -j DROP`

# Drop invalid packets
`$IPTABLES -A INPUT -m state --state INVALID -j DROP`
`
$IPTABLES -A FORWARD -m state --state INVALID -j DROP`
`
$IPTABLES -A OUTPUT -m state --state INVALID -j DROP`
`
$IPTABLES -A INPUT -p tcp --tcp-flags ALL ACK,RST,SYN,FIN -j DROP`
`
$IPTABLES -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP`
`
$IPTABLES -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j DROP`
`
$IPTABLES -A INPUT -p tcp --tcp-flags FIN,RST FIN,RST -j DROP`
`
$IPTABLES -A INPUT -p tcp --tcp-flags ACK,FIN FIN -j DROP`
`
$IPTABLES -A INPUT -p tcp --tcp-flags ACK,PSH PSH -j DROP`
`
$IPTABLES -A INPUT -p tcp --tcp-flags ACK,URG URG -j DROP`

# Drop spoofed packets
`$IPTABLES -A INPUT -s 0.0.0.0/8 -j DROP`
`
$IPTABLES -A INPUT -d 0.0.0.0/8 -j DROP`
`
$IPTABLES -A INPUT -d 239.255.255.0/24 -j DROP`
`
$IPTABLES -A INPUT -d 255.255.255.255 -j DROP`
`
$IPTABLES -A INPUT -s 224.0.0.0/4 -j DROP`
`
$IPTABLES -A INPUT -d 224.0.0.0/4 -j DROP`
`
$IPTABLES -A INPUT -s 240.0.0.0/5 -j DROP`
`
$IPTABLES -A INPUT -d 240.0.0.0/5 -j DROP`
`
$IPTABLES -A INPUT -s 10.0.0.0/8 -j DROP`
`
$IPTABLES -A INPUT -s 169.254.0.0/16 -j DROP`
`
$IPTABLES -A INPUT -s 172.16.0.0/12 -j DROP`
`
$IPTABLES -A INPUT -s 192.168.0.0/24 -j DROP`


# Misc
`$IPTABLES -A INPUT -p tcp -m tcp --tcp-flags RST RST -m limit --limit 2/second --limit-burst 2 -j ACCEPT`
`
$IPTABLES -A INPUT -p tcp ! --syn -m state --state NEW -j DROP`

# Save for reboot
iptables-save > /etc/firewall.conf
echo "#!/bin/sh" > /etc/network/if-up.d/iptables
echo "iptables-restore < /etc/firewall.conf" >> /etc/network/if-up.d/iptables
chmod 
+/etc/network/if-up.d/iptables

echo -"\n\e[92mFirewall Installed & Active! \e[0m"
echo -"\n\n\e[92mFirewall script written by SM9 \e[0m"

# End script
exit 
Also inside sourcemod.cfg add these lines:
PHP Code:
sm_cvar net_maxroutable 768
sm_cvar net_minroutable 768
sm_cvar sv_max_queries_sec_global 10
sm_cvar sv_max_queries_sec 5 
sm_cvar sv_max_queries_window 10 
And finally install this: https://forums.alliedmods.net/attach...1&d=1404744439

Hope this helps.

Last edited by SM9; 02-23-2016 at 12:02.
SM9 is offline
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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode