Skip to main content

4 million user information easily leaked and questions about the status of network security in Vietnam

Exordium
The lack of privacy, lack of user privacy control is occurring in many businesses in Vietnam and around the world. This problem is not new, not difficult to overcome, but has been and is being overlooked. And the main purpose of this article is warning businesses and organizations as well as users, please pay more attention to the issue of Information Security urgent now.
Because of the respect and do not want to reduce the reputation of this company / organization. I would like to remain anonymous and call them X .
How did I find this hole by chance?
I'm a user of X, and one day when using X 's Android app on my phone, I discovered that I could access other sensitive information such as email, Address, ... This is a feature of the application, allowing users to communicate with each other, perhaps nobody pay attention to. However, in the judgment and experience, this function if not secured properly, hackers can spoof the request identical to the server application of X and then get all the information users. X has a huge number of users - MILLIONS , so if this is feasible, this is a serious security breach.
From judgment to reality
Starting with this thought, I proceeded to analyze the requests that X 's application had . I use ARC Welder to run X application on my computer and Fiddler to capture all requests coming out from that application. Finished configuration, try to open the application up and use some basic features, Fiddler immediately caught a lot of 
Fiddler captures the X android app requestinteresting information rub, you can see the application request to pages of the form Https: // x-server-api / profile / id-users , try copying the urls of these pages and accessing with a trial browser is even more amazing: 
Api get user public informationsYou can see that I can completely Obtain the user's information through the browser, this means:
  • Retrieving user information requires only ID, but the ID is self-raised by Database (auto_increment) so only for 1 to max scan, hacker can retrieve all user information.
  • This API has no authentication method, including authorization token or authorization header, and so on. Even API passes arguments through GET rather than POST .
To this point, my judgment is correct. It is dangerous, this information if falling into the wrong hands will cause serious consequences.
Determine how many users are affected
The vulnerability is so serious, but the question is how many users through X have been exposed? To answer this question, I proceed to determine by classic guessing method .
Since the ID in the API retrieves the above information by incrementing the ID by the database (one additional user ID is incremented by 1), it is easy to determine the number of hits easily by finding the Min ID and finding Max. ID . 
Find Min ID is simple, run from 1 and gradually increase until the API returns information. And right from the 1st, the API has shown a user (probably the first user of X ). 
Continue to find Max ID , X is a big company so I boldly try out the number 1 million (1000000), API is not error, up to 2 million, still not always, rub much, The same API indicates an error with the number 5 MILLION . This means more than 4 MILLION users in Vietnam are affected (more than 4 million 100 thousands). An extremely high number, compared with the number of Internet users in Vietnam (source) by the year 06/2016 is 52 million users, every one of 13 Internet users in Vietnam has a person has been exposed information. .
Search for holes
Android applications can easily decode and view the original code, so I proceeded to decompress the APK file of the X application for review. 
Extract X android appWe just need to care about 2 files are classes.dexand classes2.dex, here are 2 files save java code in binary form. Continue to extract these two files using the dex2jax tool Extract a lot of java code files, if you spend a lot of time, I decided to use the grep tool to find the file containing the code associated with the hole. 
Grep find vulnerable files 1Grep find vulnerable files 2It is easy to identify three files that are linked Config.javaApiConfig.javaand XService.java, try to open these three files Sublime Textfor a closer look.
The first is the file Config.java, which configures the path to the server API along with the authorization keys (why the API does not use this one for security reasons?)X Api ConfigNext is the file ApiConfig.java, exactly as the name implies. of it, this file contains the configuration related to API X . 
X Api Config DetailFinally, the most important file we need to consider is the file XService.java, which contains a series of methods that interact with the API . And I easily find the method we are most interested in here: This 
Request Public Profile Methodmethod is passed to the user ID ( String str) and Request to API (API URL is configured in the above two files). This is the place where information is lost.
Solution:
  • Changing use of IDs increases with randomly generated IDs for each user (on an X server that has hash_id do this but somehow does not use it).
  • Eliminate sensitive user information via the API, keeping only the things you need.
  • Added feature to only send sensitive information to others if the user allows.
  • Add the authorization key, authorization header needed for the API.
  • Limit the number of API calls per IP.
  • Obfuscate code to make it harder for hackers to read code.
Questions about cybersecurity in Vietnam through this incident
Question 1: Is our information secure?
I am a security researcher who uses a variety of methods and habits to keep my information confidential. But just one web page, the one I use is attacked, the bad guys can easily get this information and proceed to attack me no matter how many security methods I apply. . And you? Are you a lucky person not on the list of 4 million users and countless other information disclosures?
Question 2: Do businesses and organizations in Vietnam pay attention to network security?
The issue of exposing user information via the API is not the first. Lozi cases of 2 million users by Pham Huy Hoang discovered or similar to the figure of 3 million by Blogger Juno_Okyo found and now has reached 4 million shows the alarming situation of the poor The heart of the business, organization with the problem of information security.
Question 3: Question for everyone
Somewhere out there, on the impetus of the development of information technology today, how many similar holes still exist?
POC (Proof of Concept)
Exploit X Server
Timeline
  • 15:11 19/02/2017: Email the gap report to X.
  • 11:01 20/02/2017: X contact by phone, discussing that the hole is being technically reviewed and patched.
  • 17:05 23/02/2017: After more than 3 days, this serious hole has not been patched X. The only action of X is to obfuscate the android application code and update it (even without modifying the code). However, the main part of the vulnerability is that the API has not yet adopted any security measures. For that reason I decided to post this article to warn users who are being threatened by the vulnerability.
  • 24/02/2017 16:30: Meet the direct representation of X on the office of the X and exchange some information.
Source Yabeow.com : View Thread - Bui Dai Gia - Translation: Nguyen Trung Nhan


Comments

Popular posts from this blog

Modern robots planned to drill Saigon underground from 26/5

As planned, on May 26, the robot tunneling will officially operate, construction of the 781 m long underground. According to a statement issued by the contractor directly operating underground metro drilling robot, the staff of this unit consists of 17 foreign experts, 5 engineers and 25 Vietnamese workers will operate TBM tunnel drilling machine. From Ba Son Station to Ho Chi Minh City Theater Station. Install underground tunnel drilling robot. As planned, on May 26, this tunnel robot will be officially operated, construction of the 781 m long underground section.  This is the item of package 1b of the metro line 1 (Ben Thanh - Suoi Tien) contractor contractor Shimizu - Meada (Japan).  Ben Thanh - Suoi Tien will be the first metro line in Vietnam to excavate tunnels underground TBM machine with a tunnel diameter up to 6.79 m.  The modern TBM submersible robot from Japan has a total length of 70 m, weighs 300 tons, is being assembled by the unit to exc...

Meteorites fall velocity 2400 kilometers / h to cities in Argentina, causing huge explosions

People initially thought it was terrorism. A series of earth-shattering explosions have caused people south of the country was Argentina where her worry that the cottages, buildings shaking with tremors. But fortunately because there is nothing so dangerous cases happened: it was caused by a meteorite falling to Earth. On the last 20/7 would be a normal Wednesday afternoon in the city of General Roca 85,000 people , and suddenly the afternoon turned into unusual was that a series of large explosions rocked buildings and many glass doors in the city. Police, firefighters and other rescue team members were quick soon to be determined where the blast but were surprised, they did not find any evidence of a bomb explosion, the consequences of an earthquake or other natural disaster. Ultimately, the scientists have found the reason: a meteor has entered the Earth's atmosphere at an altitude of 10,000 meters, moving at a speed of 2,400 km / h. "This meteorite fell to Ea...

Today is the 25th anniversary of the world are connected to each other thanks to the advent of the Web page

You know today, August 23 is on the 25th anniversary of the birth of the Web? Quiz you know today, August 23 is the day? Around the 1980s, Tim Berners-Lee, a software engineer working at the CERN laboratories in Geneva, Switzerland was rekindled in his idea of a global information system. The original purpose for which he is aiming to create the environment for scientists to share research, his experience with colleagues. Sample models that he first outline named "Enrique". Tim Berners-Lee. Tim Berners-Lee. In 1989, Tim launched the article entitled "Information Management: A Proposal"-suggestions on information management, in which he insisted that his ambition is directed to global networks, all over the world the same connections over public networks. The name that the heart set for kids are her pregnancy is "World Wide Web"-or the WWW today that everyone must type before accessing a site. In the meantime, however, the World Wide Web is still a concept ...