DEV Community

Discussion on: Cryptographically protecting your SPA

 
victorwm profile image
Victor Nascimento

Image description

Thread Thread
 
matpk profile image
Matheus Adorni Dardenne

You're not disabling the signature, kid (what you said you could trivially do).

You did not prevent the signature verification. You have to disable the verification and then modify the network response to accurately represent what we're discussing.

What you did simply wouldn't work on a function that deals with all requests, your hardcoded data would instantly break the application.

But that's my fault, I set the bar too low. LoL 😂

Thread Thread
 
victorwm profile image
Victor Nascimento

It still proves my point, which you fail to see.

Image description

Thread Thread
 
matpk profile image
Matheus Adorni Dardenne

I see no evidence of what you claim in this screenshot. "John Doe" is the correct data. How does this prove the validation was bypassed?

But it was valuable. Try changing it to "false". If this works, it will probably show the error message.

Working or not (it probably won't, but could, anyway would be nice to know), I expect you learned that someone with technical knowledge responding with a mere attempt after three hours of intently messing around with it (your hurt ego is clearly a strong motivation) is comfortably outside the range of "trivial". Which ultimately proved my point: it is sufficiently secured against the profile of the potential attackers: employees with no tech skills but incentives to fiddle around.

Thread Thread
 
victorwm profile image
Victor Nascimento

Image description

The whole point is you don't need to change the server response. And even if you did, returning true from the validation function would work.

Again, this took me 5 minutes - it's your terribly inefficient attitude that made this take 3 hours to understand.

Thread Thread
 
victorwm profile image
Victor Nascimento

If you're assuming your users are not capable of attacking you, why even bothering then? It appears to me you have wasted your time.

Thread Thread
 
matpk profile image
Matheus Adorni Dardenne

The whole point is that you do. As I explained, your other attempt would simply break everything else.

Just checking the times on the notifications from your messages we can clock you out at four hours (at least, since you're been interacting for several days at this point). That with full guidance, since I was here correcting every failed attempt you made, and disregarding the other measures in place. Thanks for taking your time into providing this very useful benchmark and proof of concept.

And I wasn't inefficient at all. I was constantly engaged in our conversation since ~6 in the morning, answering everything you said. If it took you four hours to do this with my constant guidance, then it does what it was designed to do: to protect the UI controls.

Thread Thread
 
matpk profile image
Matheus Adorni Dardenne

They have motivation to try. I'd say the only person wasting my time was you, but you also provided a valuable benchmark for me, so I thank you for that.

Thread Thread
 
victorwm profile image
Victor Nascimento • Edited

"With my constant guidance"

How can you be so presumptuous? I really should have let you stay in ignorance and denial but it goes against my principles.

It was a step by step process because you failed to extrapolate my ideas to the full solution. It's partially on me for not explaining them well enough.

Thread Thread
 
matpk profile image
Matheus Adorni Dardenne

I see. Your principles involve writing an article misrepresenting what this article claims trying to make fun of me for the crime of........ shuffles card..... asking for feedback.

Thread Thread
 
victorwm profile image
Victor Nascimento

You're obviously heavily invested in this. No one likes being disproven, especially with something they're proud of making. But please reconsider your attitude against someone that is trying to help.

You got humbled by technology and facts. I think my article served it's purpose.

Thread Thread
 
matpk profile image
Matheus Adorni Dardenne

Your article proved this measure accomplishes what it was designed to do.

I'm even tired of repeating the phrase "with enough time and effort". And voi la. It took an ego-hurt engineer half a dozen hours to do something that could work, with guidance and disregarding the other measures in place. It is sufficiently secured against our employees.

Thread Thread
 
victorwm profile image
Victor Nascimento

Not if they see my article 😏 don't tell them.

Thread Thread
 
matpk profile image
Matheus Adorni Dardenne

I am skeptical they could even if they did read. You made lots of jumps based on knowledge assumptions (things you don't know if other people know). That's probably the whole reason you naively said it was trivial, several hours before actually managing to do it.

Thread Thread
 
victorwm profile image
Victor Nascimento

As someone else pointed out, this is just security through obscurity at this point.

Thread Thread
 
matpk profile image
Matheus Adorni Dardenne

Putting a padlock in your locker is not obscurity just because a skilled attacker can pick it open if given enough time.

As I responsed to that person, obscurity would be changing the name of the "isAdmin" property to "dhASDuhVNAS132" trying to conceal what it does. So implementing something like Fractal as a security measure would be obscurity.

But OK. Thank you.

Thread Thread
 
victorwm profile image
Victor Nascimento

Point is you already have a padlock. What you did was to paint "TSA Certified" on it hoping nobody would be attempt to pick it.