Ip spoofing and teeworlds
Posted: Sun Jul 20, 2014 1:43 pm
Some days ago i asked someone with a good knowledge of teeworlds and network packages to hack my teeworlds server. I wanted to know how save it is. I logged in F2 with the admin password before. Suddenly i saw in the logfile that i had executed the command "sv_rcon_password hello". But i never executed that command. A few seconds later the person logged in with the new admin password and stopped my server.
Now an explanation of the problem:
The internet works with so called "packages". Computers can send packages to IPs and can recieve packages. Unfortunately there is no way to see where the package comes from. The computer that sends the packet just writes his own IP in the package. But what will happen if you write the IP from another player in the package? Yes, your right. And this is called ip spoofing because the server will think the package comes from a player who hasn't actually send it.
So when i logged in with my admin password the server knew that my IP is allowed to execute for example "shutdown". When a hacker sends a packet that includes my IP and the command "shutdown" to the server, it will execute it.
I don't know much about this stuff and i don't know how complicated it will be to fix. But here's the way how it would work:
If I send a package to the server with my IP for example 10.10.10.10 and the command "shutdown" the server won't execute it immediately. It will first send a randomly generated code to the IP 10.10.10.10. When i get the code i'll just send it back to the server. Now the server knows that i sent the command "shutdown" because i got the code that the server sent to my IP. So the server will execute my command.
Because it takes some more time to send the package with the randomly generated code to the client and back to the server it would be bad for actions like move, hook or jump because it would increase the ping. But for important things like disconnect, F2 commands or chat messages it would be a great protection.
This should not be a "hacker guide" and of course only a few people have the knowledge to do what i described here. And people who have this knowledge usually don't use it for bad things. I just want you to know that some people if they know your IP address can disconnect you from every server. I would like to know your opinion about this topic.
DoNe
Now an explanation of the problem:
The internet works with so called "packages". Computers can send packages to IPs and can recieve packages. Unfortunately there is no way to see where the package comes from. The computer that sends the packet just writes his own IP in the package. But what will happen if you write the IP from another player in the package? Yes, your right. And this is called ip spoofing because the server will think the package comes from a player who hasn't actually send it.
So when i logged in with my admin password the server knew that my IP is allowed to execute for example "shutdown". When a hacker sends a packet that includes my IP and the command "shutdown" to the server, it will execute it.
I don't know much about this stuff and i don't know how complicated it will be to fix. But here's the way how it would work:
If I send a package to the server with my IP for example 10.10.10.10 and the command "shutdown" the server won't execute it immediately. It will first send a randomly generated code to the IP 10.10.10.10. When i get the code i'll just send it back to the server. Now the server knows that i sent the command "shutdown" because i got the code that the server sent to my IP. So the server will execute my command.
Because it takes some more time to send the package with the randomly generated code to the client and back to the server it would be bad for actions like move, hook or jump because it would increase the ping. But for important things like disconnect, F2 commands or chat messages it would be a great protection.
This should not be a "hacker guide" and of course only a few people have the knowledge to do what i described here. And people who have this knowledge usually don't use it for bad things. I just want you to know that some people if they know your IP address can disconnect you from every server. I would like to know your opinion about this topic.
DoNe