Getting attacked, any help?
#1

Hello there, everyone.

I had to forcibly create this topic cause I am out of idea now. The server randomly freezes and nothing is logged inside server_log. Crash detect does not log anything either. I had few array index out of bounds error before thought it's probably the reason for server freeze and I solved the error but it still keeps freezing. I finally found that there are some people out there constantly attacking the server and freezing it, range ban does not work either since they are possibly using VPN. However, the server does not log anything. I guess, I am not the only one facing this problem and I can see there are other servers too which are running fine so I guess there might be a way around to at least prevent the server from crashing whenever they attack. I tried as much possible ways as I could to prevent the runtime error in the script caused by those attacks but, I found this log today;

Code:
[11:27:33] [debug] Run time error 4: "Array index out of bounds"
[11:27:33] [debug]  Accessing element at negative index -1
[11:27:33] [debug] AMX backtrace:
[11:27:33] [debug] #0 00039ee8 in ?? (-1) from ***.amx
[11:27:33] [debug] #1 0003a738 in ?? (12, 0) from ***.amx
[11:27:33] [debug] #2 000212bc in public Iter_OnPlayerDisconnect (12, 2) from ***.amx
[11:27:33] [debug] #3 native CallLocalFunction () from samp03svr
[11:27:33] [debug] #4 0000dd94 in public ppb_OnPlayerDisconnect (12, 2) from ***.amx
[11:27:33] [debug] #5 0000c484 in public SSCANF_OnPlayerDisconnect (12, 2) from ***.amx
[11:27:33] [debug] #6 00000868 in public OnPlayerDisconnect (12, 2) from ***.amx
[11:27:33] [debug] #7 native BanEx () from samp03svr
[11:27:33] [debug] #8 000195cc in public OnPlayerFloodControl (12, 8, 7135) from ***.amx
[11:27:33] [debug] #9 native CallRemoteFunction () from samp03svr
[11:27:33] [debug] #10 0000fe48 in public Iter_OnPlayerConnect (12) from ***.amx
[11:27:33] [debug] #11 native CallLocalFunction () from samp03svr
[11:27:33] [debug] #12 0000d45c in public SSCANF_OnPlayerConnect (12) from ***.amx
[11:27:33] [debug] #13 00000828 in public OnPlayerConnect (12) from ***.amx
All of these plugins/includes are up to date. These error appeared after some random nicks were spamming connection. I was not in-game at that time so I have no idea what they might have done. I am also using anti flood protection include made by Ryder, but that's not really helpful either.

Any help will be appreciated, thanks.
Reply
#2

I don't really think it's an attack, the debug log clearly says that there's an array being accessed in negative index (-1), you should track the error from above to see which array exactly causes that.
Reply
#3

It is indeed an attack. I didn't post the entire log cause it contains lot of random nicks and IPs (probably bots). There are many connection spams before the script finally gave these errors in the log. Plus, you can see there are errors coming out from the foreach and sscanf includes. I don't think errors from those includes get triggered normally.
Reply
#4

They're coming from these places because usually these callbacks are hooked, so actual function is called by the hooked function (sscanf_*). I would say put debug messages everywhere on OnPlayerConnect & OnPlayerDisconnect to see what exactly causes this.
Reply
#5

Quote:
Originally Posted by Sjn
View Post
It is indeed an attack. I didn't post the entire log cause it contains lot of random nicks and IPs (probably bots). There are many connection spams before the script finally gave these errors in the log. Plus, you can see there are errors coming out from the foreach and sscanf includes. I don't think errors from those includes get triggered normally.
No, these errors aren't coming from foreach and sscanf. You didn't enabled debug mode (-d3 argument).
Reply
#6

This is not an attack, this is a poorly coded script that accesses array indexes that are out of bounds.

Compile with debug flags (-d3) as stated above, then find out which function call the runtime error comes from.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)