Live data from Hacker News

How I reverse engineered my bank's security token

valverde.me

11–20 of 67 posts

Re: How I reverse engineered my bank's security token

#11
he is going to get a very awkard phone call from the bank...

Some years ago I stumbled with something similar on a webpage, posted it on reddit, and the next day the IT manager of the company called me... it was one of the most embarrassing days of my life.

Lesson: don't mess with other peoples work just because you can...

Re: How I reverse engineered my bank's security token

#12
post #9
post #8

The only point of these token generators is to provide a stream of tokens, so that if the generator is cloned (which is trivial), that can be detected. That's it. As far as I can tell, this attack does not prevent the server from detecting a cloned token. (To do that, you would have to install a new client on the victim's device that will increment its counter and tell you the counter when you ask.)

This specific token is time-based, so a clone would not be detected. On the other hand, counter-based tokens as you described them do exist, and it would indeed be simple to detect if one of those was cloned. I wouldn't even call this an attack, given that you would need physical access to a rooted device to carry it out.

Ah, time-based tokens are basically against adversaries with physical access to your time-based token. Good against password guessers / leaked password databases, however, which is a much more realistic attack these days.

Re: How I reverse engineered my bank's security token

#13

he is going to get a very awkard phone call from the bank... Some years ago I stumbled with something similar on a webpage, posted it on reddit, and the next day the IT manager of the company called me... it was one of the most embarrassing days of my life. Lesson: don't mess with other peoples work just because you can...

What was embarrassing about it? You didn't add the security hole to the software.

Re: How I reverse engineered my bank's security token

#14

he is going to get a very awkard phone call from the bank... Some years ago I stumbled with something similar on a webpage, posted it on reddit, and the next day the IT manager of the company called me... it was one of the most embarrassing days of my life. Lesson: don't mess with other peoples work just because you can...

I recognize this as a possibility and I would definitely take it down if the bank requested it.

On the other hand, if anything, I exposed that they did a good job. They could have rolled out their own crypto, or some flawed form of code generation, in which case I would have disclosed it to them through proper means. But they adhered to standards (TOTP, RFC6238) and protected their data as well as possible. This article should be seen as praise.

Then again, corporations aren't always that understanding, which is why I would be happy to comply.

Re: How I reverse engineered my bank's security token

#15

he is going to get a very awkard phone call from the bank... Some years ago I stumbled with something similar on a webpage, posted it on reddit, and the next day the IT manager of the company called me... it was one of the most embarrassing days of my life. Lesson: don't mess with other peoples work just because you can...

I think the lesson you were supposed to learn is "responsible disclosure"

Re: How I reverse engineered my bank's security token

#16

he is going to get a very awkard phone call from the bank... Some years ago I stumbled with something similar on a webpage, posted it on reddit, and the next day the IT manager of the company called me... it was one of the most embarrassing days of my life. Lesson: don't mess with other peoples work just because you can...

He didn't "mess with other peoples work". He looked at what his computer was executing. This isn't even like poking at a webpage and telling someone it appears to not validate inputs - the code was running on his own computer.

On top of that, why would you ever feel embarrassed? Perhaps if you posted something very damaging with the sole intent of harming that person, then realised they weren't responsible for the problem.

Re: How I reverse engineered my bank's security token

#17
post #6

A good lesson for those of us who have had the idea of building a similar app to generate one-time passwords. Now we have a better idea of the minimum that needs to be done to build such an app securely. Thanks.

Looked like they did pretty much everything right to me.

Re: How I reverse engineered my bank's security token

#18

he is going to get a very awkard phone call from the bank... Some years ago I stumbled with something similar on a webpage, posted it on reddit, and the next day the IT manager of the company called me... it was one of the most embarrassing days of my life. Lesson: don't mess with other peoples work just because you can...

I recognize this as a possibility and I would definitely take it down if the bank requested it. On the other hand, if anything, I exposed that they did a good job. They could have rolled out their own crypto, or some flawed form of code generation, in which case I would have disclosed it to them through proper means. But they adhered to standards (TOTP, RFC6238) and protected their data as well as possible. This arti…

I agree. If anything, reading this analysis would make me feel /more/ comfortable about the security of this bank's software, not less It seems that they did pretty much everything right, if a bit strangely, in some cases.

TOTP and co. require a private key, just like all crypto. If you have that private key, bad things happen. This is not exactly news at 11.

Re: How I reverse engineered my bank's security token

#19

he is going to get a very awkard phone call from the bank... Some years ago I stumbled with something similar on a webpage, posted it on reddit, and the next day the IT manager of the company called me... it was one of the most embarrassing days of my life. Lesson: don't mess with other peoples work just because you can...

What was embarrassing about it? You didn't add the security hole to the software.

What security hole?

Re: How I reverse engineered my bank's security token

#20
Wonderful work, and thank you for documenting the experience. From the title, I thought this would be a story about decoding a banking website's cookies and gaining access to other peoples accounts, or something similar. I was quite surprised to see that your bank did basically everything right. I was also surprised that you went so far as to implement an embedded clone. Very cool!

P.S. Consider yourself lucky to have such a bank. Here in the U.S., our major banks do not take security seriously by any stretch of the imagination (they have little incentive to).

Post reply on HN