this post was submitted on 24 Jan 2024
378 points (98.5% liked)

Cybersecurity - Memes

1940 readers
1 users here now

Only the hottest memes in Cybersecurity

founded 1 year ago
MODERATORS
 
top 40 comments
sorted by: hot top controversial new old
[–] ArbitraryValue@sh.itjust.works 177 points 8 months ago (3 children)

How to say you're vulnerable to code injection without saying you're vulnerable to code injection.

[–] tryptaminev@feddit.de 28 points 8 months ago* (last edited 8 months ago) (6 children)

Are they vulnerable though, if they already exclude it at the user input?

I yet have to learn SQL and is there a way to allow passwords with '); DROP TABLE... without being vulnerable to an injection?

nevermind i googled it, and there various ways to do so

[–] herrvogel@lemmy.world 49 points 8 months ago (1 children)

This still smells though. Why is the raw, plain text password string getting anywhere near database queries in the first place?

[–] cactusupyourbutt@lemmy.world 18 points 8 months ago

I doubt it is. they probably have a WAF that blocks these strings though and didnt want to bother reconfiguring it

[–] rtxn@lemmy.world 32 points 8 months ago* (last edited 8 months ago) (1 children)

Prepared statements, mostly. You define the query using variables, turn that query into a language-dependent object, assign values to those variables, then execute the statement. The values will be passed verbatim, without any parsing.

Or, since we're talking about a password, you could encode or encrypt it before inserting it into the query string. The fact that the website could be negatively affected by phrases in the cleartext password is very concerning.

[–] surewhynotlem@lemmy.world 8 points 8 months ago

At best, it means they're storing your password instead of just a salted hash. And that's horrible.

[–] akincisor@sh.itjust.works 23 points 8 months ago

I noticed that upper case select, drop etc are not prohibited.

Poorly implemented user input filters are not a valid solution to being vulnerable to injection.

[–] emergencyfood@sh.itjust.works 9 points 8 months ago (2 children)

No one in their right mind is storing plain text passwords, or letting them anywhere near the database.

You convert the password to a hash, and store that. And the hash will look nothing like the password the user typed.

[–] acetanilide@lemmy.world 12 points 8 months ago (1 children)

You're right. No one in their right mind would do that.

On the other hand, people not in their right mind often run things. Such as my old professional liability insurance. Which wrote the username and password in the yearly statements...

And also sent you the password through email if you forgot it...

Also you couldn't change it...

[–] BURN@lemmy.world 7 points 8 months ago (1 children)

There was a popular companion app to a game I play that’s stored passwords as MD5 hashes for years and when they got hacked they were able to decrypt everything.

Bonus point, the app was released multiple years after md5 was cracked.

Developers (including myself) cannot be trusted to implement the correct process 100% of the time. It’s happened too many times for it to be a single person issue and has transcended into a problem with software engineers

[–] acetanilide@lemmy.world 2 points 8 months ago

😬😬 that's crazy but good to know

[–] usefulthings@lemmy.world 3 points 8 months ago

Lol. Yes, people do still build systems and store plain text passwords. I regularly get scammers sending me my throwaway passwords from crappy sites. Good thing I never reuse passwords, or email addresses.

[–] agent_flounder@lemmy.world 2 points 8 months ago

Parameterized queries.

[–] trolololol@lemmy.world 1 points 8 months ago

🥲 t Yep it's that easy to do the right thing

[–] pirrrrrrrr@lemmy.dbzer0.com 8 points 8 months ago (1 children)

Maybe they filtered those strings to be safe, and put the notice there to answer the invertible "why won't it accept my password" queries.

It's a shitty password engine. But not necessarily uncleansed

[–] ArbitraryValue@sh.itjust.works 6 points 8 months ago (1 children)

If they're trying to protect themselves from code injection by rejecting certain user input like that, then they don't actually know how to protect themselves from code injection correctly and there may be serious vulnerabilities that they've missed.

(I think it's likely that, as others have said, they're using off-the-shelf software that does properly sanitize user input, and that this is just the product of management making ridiculous demands. Even then, it's evidence of an organization that doesn't have the right approach to security.)

I don't know, maybe they saw that classic XKCD comic and now they're thinking "hahah, I'm wise to your tricks, ya little shit"

[–] thenextguy@lemmy.world 5 points 8 months ago

This is the result of some doc writer or middle manager not fully understanding what they've been told.

[–] RizzRustbolt@lemmy.world 57 points 8 months ago

Oh BobbyTables, you little rapscallion...

[–] bitwaba@lemmy.world 53 points 8 months ago

Little Bobby drop tables

[–] zqwzzle@lemmy.ca 52 points 8 months ago (2 children)

So they’re not hashing or salting the passwords too. Cool…

[–] Rednax@lemmy.world 9 points 8 months ago (1 children)

Which makes me want to try and insert a password of a few megabytes worth of text. Should be fine, since there is no max lenght defined, right?

[–] lars@lemmy.sdf.org 4 points 8 months ago

If there is no overwrought prohibition of something I know that at least in America that means it’s

  1. Affirmatively legal and
  2. Legislatively encouraged by the FREEE Act

So give ’em hell!

[–] CrayonRosary@lemmy.world 1 points 8 months ago* (last edited 8 months ago)

That's not how it works. The code always has access to the submitted plaintext password. It's salted and hashed after it's verified for complexity. The complexity verification can even be done in JavaScript.

[–] fubarx@lemmy.ml 46 points 8 months ago

Obligatory Little Bobby Tables: https://xkcd.com/327/

And for those who feel like saying they've already seen it: https://xkcd.com/1053/

[–] Matriks404@lemmy.world 24 points 8 months ago (1 children)

I don't believe this is real. This isn't real, right?

[–] ABasilPlant@lemmy.world 23 points 8 months ago

This is real - I took the screenshot myself.

[–] dylanTheDeveloper@lemmy.world 19 points 8 months ago

What zero string sanitation does to a mfr

[–] EfreetSK@lemmy.world 17 points 8 months ago

We could still have some fun with ALTER TABLE

[–] Treczoks@lemmy.world 14 points 8 months ago

I consider this an invitation.

[–] lobut@lemmy.ca 13 points 8 months ago

Looking at that I wouldn't be surprised if those rules are just client-side validation.

[–] PhlubbaDubba@lemm.ee 10 points 8 months ago

submits Drop Table as passphrase

Grabs popcorn

[–] Thcdenton@lemmy.world 10 points 8 months ago

Ima just use my butthole with a biometric scanner.

[–] perviouslyiner@lemmy.world 10 points 8 months ago
[–] Kyrgizion@lemmy.world 6 points 8 months ago

Didn't say anything about truncate!

[–] ShaunaTheDead@kbin.social 1 points 8 months ago (4 children)

Some of the strongest and easy to remember passwords are just a few words strung together with a few numbers.

For example: Simpsons7-Purple4-Monkey1-Dishwasher8

Just remember "Simpsons Purple Monkey Dishwasher" and "7418". You're probably never going to forget that and I just tossed it into a password strength tester and it said it would take about 46 billion years to randomly guess it.

[–] Cqrd@lemmy.dbzer0.com 3 points 8 months ago

It would take me about 5 seconds because you just told me what it is genius

[–] thenextguy@lemmy.world 1 points 8 months ago

I'll never understand why spaces are commonly not allowed in passwords.

[–] derpgon@programming.dev 1 points 8 months ago

How about hunter2

[–] olmium@sh.itjust.works 1 points 8 months ago

Now remember these types of passwords, all different for different services. It's not a realistic expectation. Password managers are a must nowadays if you want to protect your accounts. But these types of passwords are also easier to type out.