Git Product home page Git Product logo

whatsapp-crypt12-decrypter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whatsapp-crypt12-decrypter's Issues

How did you figure out which bytes are for key, Id and IV?

This repository is the only source which answers the structure of WhatsApp msgstore.db.crypt12 and its key file. Because of your work I am able to re-write this poc to decrypt chat backup. But I was thinking how did you discover these fields. They look randomly placed.

I was able to figure out that t1 and t2 are same in key file and msgstore.db.crypt12 which I assumed that it is an identifier which tells the server which key to send to the client in order to decrypt chat backup. But I was not able to discover IV.

From your code I learned that IV is stored in crypt12 backup from byte 52 and AES-GCM-256 is stored in key file from byte 127. How did you figure this out? Their position looks randomly placed.

Also in key file t1 starts from byte 30 and AES key starts from byte 127. So what bytes at the beginning and in the middle represent?

Error

I'm getting this error.

But there are no problems with the key file. I checked with other apps.

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
at javax.crypto.Cipher.init(Cipher.java:1393)
at javax.crypto.Cipher.init(Cipher.java:1327)
at decrypt12.decrypt12.decrypt(decrypt12.java:94)
at decrypt12.decrypt12.main(decrypt12.java:146)
... 5 more

Interact Intent?

I use the code to access contact:
Intent intent = new Intent("android.intent.action.MAIN");
intent.setAction(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/" + imageName));
intent.putExtra("jid", phoneNumber + "@s.whatsapp.net"); //phone number without "+" prefix!
intent.setPackage("com.whatsapp");

I need help to capture the submit button(com.whatsapp:id/send)

Db Get Decrypted but requires password

Dear Elite, thanks for the great effort i appreciate it ! well i installed everything and its working but when i decrypt the encrypted DB i get the encrypted DB file but a password is required and i noticed that the program is throwing the following error:
Fatal error:java.io.IOException: javax.crypto.AEADBadTagException: mac check in GCM failed
i don't know if its the problem but i just wanted to point it out, btw it works on Whatcrypt website, thank you!

.crypt14 file results in "Key file mismatch or crypt12 file is corrupt."

After years of successfully using WhatsApp-Crypt12-Decrypter to access MY chat data, this week it stopped working :-(

WhatsApp on my phone looks to have updated to v2.21.8.17 and is now generating local backups with a .crypt14 extension instead of .crypt12.

Unsurprisingly, WhatsApp-Crypt12-Decrypter chokes on this with the error Key file mismatch or crypt12 file is corrupt.

However, armed with hexdump and a bit cunning, I've worked out how to tweak the python so that it successfully decodes .crypt14 files.

Details to follow shortly and/or a fork etc for anyone else interested.

java.security.InvalidKeyException: Illegal key size

Error while decrypting Android-derived whatsap crypt12 file, on Windows 7 (CMD.exe prompt java -jar decrypt12.jar)

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
at javax.crypto.Cipher.init(Cipher.java:1393)
at javax.crypto.Cipher.init(Cipher.java:1327)
at decrypt12.decrypt12.decrypt(decrypt12.java:94)
at decrypt12.decrypt12.main(decrypt12.java:146)
... 5 more

It seems java is not formating the KeyFile Content properly.

Illegal key size

Hi,

I am getting issue at line

cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));

Error :
java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
at javax.crypto.Cipher.init(Cipher.java:1393)
at javax.crypto.Cipher.init(Cipher.java:1327)

After debugging i came to know that
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
maxKeyLen = 128, but it should be 256.

The above error get fixed after replacing 2 jar files "local_policy.jar" and "US_export_policy.jar". Is there any way where we can fix this without doing this change

Decrypt / Crypt

Hi,

It's possible recrypt into crypt12 before modify the sqlite database. If not, then why?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.