
How I cracked NQ Vault's “encryption” - ninjadoge24
https://ninjadoge24.github.io/#002-how-i-cracked-nq-vaults-encryption
======
andrebalza1
NQ Mobile is not really new to some sloppy ethics.

[http://www.forbes.com/sites/afontevecchia/2013/10/24/nq-
mobi...](http://www.forbes.com/sites/afontevecchia/2013/10/24/nq-mobile-a-
massive-fraud-worth-0-muddy-waters-says-as-500m-is-wiped-out/)

link to original muddywaters research: [http://www.muddywatersresearch.com/wp-
content/uploads/2013/1...](http://www.muddywatersresearch.com/wp-
content/uploads/2013/10/MW_NQ_10242013.pdf)

~~~
kumarm
NQ Mobile buys cheap installs in under developed countries where there are no
in app purchases (Or very low).

The same technique is followed by several Chinese mobile companies. I don't
think its well understood why these companies are buying installs and where
the money is coming from.

Here are the top ten Tool in India. 8 of 10 are by Chinese companies
(Primarily by buying Installs. I am not saying all of them but most of them
are). India and China have Conflicts. Tools is one category that require scary
permissions.

[http://i.imgur.com/3JGtnre.png](http://i.imgur.com/3JGtnre.png)

------
dmgbrn
Hey let's actually do something about this: go to the play store and leave a 1
star review saying something like "this app doesn't encrypt anything, <non-
technical explanation>".

[https://play.google.com/store/apps/details?id=com.netqin.ps](https://play.google.com/store/apps/details?id=com.netqin.ps)

There are already a couple of comments by people who obviously read this
article, please upvote them. I mean, you have to install it but I just told it
to install it on a phone that broke years ago ;-)

Edit: formatting

~~~
darklajid
Impossible, requires a G+ account..

So, the app might suck, but where can I rate the play store experience with a
single star?

------
Potando
If true, this also shows the TRUSTe privacy seal is worthless. The name
implies it's undergone some kind of assessment that showed it's good for
privacy when just looking at an encrypted file would immediately show the
problem. TRUSTe itself is a bit vague on what they really do.

[https://www.truste.com/business-products/dpm-
services/#pCert](https://www.truste.com/business-products/dpm-services/#pCert)

I can't find NQ in their search tool for certified companies. Perhaps it's
been retracted or was never really issued? Maybe I'm looking in the wrong
place

[https://www.truste.com/consumer-resources/trusted-
directory/](https://www.truste.com/consumer-resources/trusted-directory/)

~~~
dsacco
Never trust a website just because it has a seal of approval from an
organization like TRUSTe.

I routinely perform code and web app audits on companies that proudly bear
this seal and find security flaws that will compromise users. The seal means
nothing.

------
MichaelGG
It'd be nice to see the fake tech journalists/reviewers issue a retraction, or
even Google Play get involved as this is rather much like fraud.

And also, what does the developer even gain from using XOR? In most common
frameworks, using, perhaps incorrectly, AES is about the same effort.

~~~
TillE
XOR is the appropriate operation if you're using a stream cipher to generate
an arbitrarily long keystream. Or a one-time pad. It also makes random access
a lot simpler.

Of course, you do actually need to generate that keystream and not just repeat
a short key.

~~~
nullc
There are very few cases where you should be doing encryption without
authentication... and as soon as you're doing authentication you'll be doing
more than just xoring with a stream cipher output. :)

------
CocaKoala
A couple summers ago, myself and some fellow interns were considering looking
at android file vault applications as a research project. We downloaded a
bunch of the top rated free ones and they were all universally crap. I think
the most secure one just ran the entire file through a substitution cipher.
There were plenty of others that would just swap the file header with
something else, or just XOR the file with some constant value. When I read
this blog post, all I could think was "Yeah, looks about right".

------
iokanuon
Relevant xkcd: [https://xkcd.com/937](https://xkcd.com/937)

------
mrb
_" Google it up if you want to: NQ Vault. I don't wanna link it form here."_

Please do link it, if only to put your readers 1 click away from giving it bad
but honest ratings. Do this also for search engines to find and associate your
post with the app. Such bad software needs to be exposed. So here it is:
[https://play.google.com/store/apps/details?id=com.netqin.ps](https://play.google.com/store/apps/details?id=com.netqin.ps)

------
pearjuice
Give a man the assumption he is safe and he will lower his guard. There is no
reason to not believe the algorithm used is intentionally marketed as safe but
is in fact not. From the top of my head I can think of numerous three-to-four
character organizations which would benefit from people thinking they have
secured their data when they in fact have not.

~~~
PhantomGremlin
> I can think of numerous three-to-four character organizations which would
> benefit

But this encryption is _laughably_ simple. Those organizations would probably
encourage at least somewhat better security. From their point of view the best
possible situation is if _they_ can read the data but non-state actors can't.

------
octatoan
The Play Store page basically implies that the kid is seven-timing his GF.
Interesting.

------
sergers
I noticed the app got updated today... Wonder what the bug fix was

------
lfx
Maybe someone know better alternatives? I would like to hide/lock some images
(bank passwords card images).

------
jenandre
hahhaha (sadness)

------
sarciszewski
Using XOR is terrible. The fact that they only apply it to the first 128 bytes
of the file is even worse.

~~~
zaroth
I think actually there is nothing worse than using XOR, full stop.

~~~
sirclueless
XOR is not, by itself, a problem. Heck, the most secure encryption method on
the entire planet, the one time pad[1], is just an XOR of some secret bytes
with a plaintext. XOR is also one of two fundamental building blocks of the
current state-of-the-art AES-256 encryption algorithm[2] (the other being a
series of bit shifts).

The problem here is deriving something so simple from the key, and only
applying it to the first 128 bytes. This is unforgivably dumb, when there are
perfectly serviceable encryption services available as part of open source
libraries, such as the aforementioned AES-256 algorithm.

[1]: [http://en.wikipedia.org/wiki/One-
time_pad](http://en.wikipedia.org/wiki/One-time_pad) [2]:
[http://en.wikipedia.org/wiki/Advanced_Encryption_Standard#Th...](http://en.wikipedia.org/wiki/Advanced_Encryption_Standard#The_AddRoundKey_step)

~~~
MatthewWilkes
XOR is only one implementation of one time pad, it is also commonly used with
modular addition. If you do it with letters then it effectively becomes a
Vigenère cipher with a long key.

The one-time-pad is a special case of any number of poly-alphabetic
substitution ciphers, XOR just being one that happens to be implemented on
lots of silicon. Considering this is all about an app that has very short keys
(a few numeric digits) it's perfectly legitimate to criticise the use of a
substitution cipher as they are especially poor when used with short keys
compared to real crypto libraries that will use that short key as the
passphrase for a real key.

------
plantbased
Hey don't diss xor. If the key is at least as long as the message and is used
once, it's unbreakable.

~~~
duaneb
Well, to decrypt the xor'd data you need to keep the key around. So either you
a) memorize the entire one-time pad for every file, or b) you encrypt the one-
time pads with AES.

Now you have two encryption problems.

~~~
meowface
If only there was a way of generating a pseudorandom stream of bytes with
which to XOR against based on a shorter randomly generated key...

