Author Topic: "Are you paranoid enough?" living in an insecure internet  (Read 7021 times)

zybork

  • Posts: 400
  • Turrets: +68/-72
"Are you paranoid enough?" living in an insecure internet
« on: January 27, 2011, 04:18:54 pm »
As you may have noticed, I recently have written the code for the Tremulous Player Manifest, and nearly right after the first entry, I checked the databases, and found an entry in the databases submitted by a user (which – no wonder – never has confirmed his signing) with a name with an interesting part in it: “"xor”…

For those who are not familiar with SQL, this database-language submits everything with strings, while values are delimited by quotes, and thus can be compromised if the programmer is a beginner, you can submit almost anything to the database if you just manage to put something in that has a quote inside. Obviously, a few hours after I put the code online, somebody tried to break into the database. (Of course anybody who is not a complete greenhorn will catch this by masking quotes, in the Trem-Manifest, this is done by replacing quotes with their HTML-code, which is, well, "…)

Also, if you happen to run a server, you also may often find strange requests in the logs, this is, something like “cmd.exe”, where somebody tries to pull a fast one to gain control over the server. Those attacks are by the way usually automatted and are performed not be any “criminal servers”, but by computers (or even servers!) taken over by viruses and remotely controlled (tough not actively) by people earning their money with spam, fraud, or other criminal activities.

With other words: There are tons of programs out there with the only purpose to find the one idiot out of a million people who actually will buy “\/|agra” or a fake Rolex…

Bots scanning forums, blogs, social media, normal websites, installed on Zombie computers taken over by viruses. This is (part of) the reality of the internet. And sometimes, when writing a pretty small project like the Manifest, it strikes me again, for there are times I tend to forget all that.
I have retired from Tremulous. Definetely. If you play a game just because it has become a habit, but u'r only feeling like a kindergarten teacher - well, maybe I am just getting too old (hell, I was a teenager when DukeNukem3D was *new*) - it's probably not a bad idea to just let it be. And I do.

Don't take this personally. Have fun, guys.

Qrntz

  • Posts: 847
  • Turrets: +204/-12
Re: "Are you paranoid enough?" living in an insecure internet
« Reply #1 on: January 27, 2011, 04:43:18 pm »
Secure it more? Yes, you need to.
« Last Edit: January 27, 2011, 07:14:40 pm by Qrntz »

You make up Qrntz, u always angry, just calmdown. :police:
I am stupid idiot who dares to open mouth and start debating

CreatureofHell

  • Posts: 2422
  • Turrets: +430/-126
    • Tremtopia
Re: "Are you paranoid enough?" living in an insecure internet
« Reply #2 on: January 27, 2011, 06:25:20 pm »
automatted
Automated.

You're welcome.
{NoS}StalKer
Quote
<Timbo> posting on the trem forums rarely results in anything good

Cadynum

  • Posts: 222
  • Turrets: +29/-13
Re: "Are you paranoid enough?" living in an insecure internet
« Reply #3 on: January 28, 2011, 03:10:31 am »
It's always a good idea to be paranoid on the internet.
Trivia: One in 12 million respond to spam: http://www.techradar.com/news/computing/spammers-get-1-response-to-12-500-000-emails-483381?src=rss&attr=all

automatted
Automated.

You're welcome.
It seems like you're trying to be the clippy of the tremulous forums.
Keep in mind that it didn't end very well for clippy.

Qrntz

  • Posts: 847
  • Turrets: +204/-12
Re: "Are you paranoid enough?" living in an insecure internet
« Reply #4 on: January 28, 2011, 01:08:02 pm »
Keep in mind that it didn't end very well for clippy.

You make up Qrntz, u always angry, just calmdown. :police:
I am stupid idiot who dares to open mouth and start debating

zybork

  • Posts: 400
  • Turrets: +68/-72
Re: "Are you paranoid enough?" living in an insecure internet
« Reply #5 on: January 28, 2011, 05:54:06 pm »
Secure it more? Yes, you need to.

What did you do??? (Databases have not been compromised, but this really should NOT happen.)
I have retired from Tremulous. Definetely. If you play a game just because it has become a habit, but u'r only feeling like a kindergarten teacher - well, maybe I am just getting too old (hell, I was a teenager when DukeNukem3D was *new*) - it's probably not a bad idea to just let it be. And I do.

Don't take this personally. Have fun, guys.

Qrntz

  • Posts: 847
  • Turrets: +204/-12
Re: "Are you paranoid enough?" living in an insecure internet
« Reply #6 on: January 28, 2011, 07:02:29 pm »
Secure it more? Yes, you need to.

What did you do??? (Databases have not been compromised, but this really should NOT happen.)
Don't worry, I'm not going to be malicious. I just have a habit of checking the basic security of pretty much any website I wander around.
It responds with that error when you try to form an SQL injection. I strongly advise you to turn off error reporting, or at least shrink the output so it won't reveal so much data.
I didn't have much time to experiment with that, so I'm leaving the further investigation to you. :P

You make up Qrntz, u always angry, just calmdown. :police:
I am stupid idiot who dares to open mouth and start debating

CreatureofHell

  • Posts: 2422
  • Turrets: +430/-126
    • Tremtopia
Re: "Are you paranoid enough?" living in an insecure internet
« Reply #7 on: January 28, 2011, 11:23:07 pm »
automatted
Automated.

You're welcome.
It seems like you're trying to be the clippy of the tremulous forums.
Keep in mind that it didn't end very well for clippy.
I'm honoured. Clippy is my hero.  8)
{NoS}StalKer
Quote
<Timbo> posting on the trem forums rarely results in anything good

zybork

  • Posts: 400
  • Turrets: +68/-72
Re: "Are you paranoid enough?" living in an insecure internet
« Reply #8 on: January 29, 2011, 10:12:54 am »
Don't worry, I'm not going to be malicious. I just have a habit of checking the basic security of pretty much any website I wander around.
It responds with that error when you try to form an SQL injection. I strongly advise you to turn off error reporting, or at least shrink the output so it won't reveal so much data.
I didn't have much time to experiment with that, so I'm leaving the further investigation to you. :P

Ah, then it probably was you to blame for that attempt of breaking in that caused me to write that thread in the first place 8) (IP is plausible).

However, yeah, I admit, I simply forgot to escape all the quote-symbols, ' " and ´ – SQL is a bit unnerving concerning that. However, I fixed it and I also took care about the warning-levels. So, thanks, buddy, until the end of the day, you have my eternal gratitude :)

However, your injection-attempt triggered an error instead of being succesful, this at least is reassuring.
I have retired from Tremulous. Definetely. If you play a game just because it has become a habit, but u'r only feeling like a kindergarten teacher - well, maybe I am just getting too old (hell, I was a teenager when DukeNukem3D was *new*) - it's probably not a bad idea to just let it be. And I do.

Don't take this personally. Have fun, guys.

freezway

  • Posts: 196
  • Turrets: +10/-12

Teapot

  • Posts: 85
  • Turrets: +11/-3
Re: "Are you paranoid enough?" living in an insecure internet
« Reply #10 on: February 11, 2011, 10:26:51 pm »
I dunno if you used these but here are a few links. I'd probably use the first two.

MySQL escape - SQL injection
Full HTML escape - protects against HTML/javascript injection only
Partial HTML escape - protects against HTML/javascript injection only