A team made up of security researchers from the Georgia Institute of Technology has found a way to exploit Node.js applications by manipulating the hidden properties used to track internal program states, the group plans to announce at the virtual Black Hat USA security conference next week.
The novel attack technique, dubbed Hidden Property Abusing, allows a remote attacker to inject new values into Node.js programs through passing objects that the framework, under the right circumstances, will treat as internal data. Using a tool to analyze a sample of 60 major Node.js components, the researchers found 13 vulnerabilities — ranging from SQL injection to the ability to bypass input validation.
The tool, dubbed Lynx, will be released at during the virtual Black Hat USA security conference, says Feng Xiao, the primary researcher and a doctoral student in the School of Computer Science at Georgia Tech.
"Our attacks focuses on certain program states or properties defined by the developers, such as the user ID or other program features," he says. "We found that this attack pattern is pretty common, but they can be complex to find, so we built the tool to help others."
Hidden Property Abusing takes advantage of developers' assumption that the internal program states are unreachable by an external attacker. The root cause of the problem is that "[a]fter the input data is converted to objects, Node.js treats them as legitimate objects like any other internal ones," the researchers state in a yet-to-be-published paper on the topic.
"These parameters sometimes associate with some critical program states, but nobody knows their existence until an attacker exploits them, so that is why we call them hidden properties," Feng says. The research team consists of six students and Wenke Lee, a professor of computer science at Georgia Tech.
"[D]ue to the heavy reuse phenomenon in the Node.js ecosystem, a huge number of Node.js applications may be impacted if a widely-used module is found to be vulnerable," the report states.
However, if an attacker can send objects with extra properties, they can enumerate hidden possibilities that could then be manipulated to attack the application. Hidden properties often represent the internal program state and changing them can have an impact on the program's security, the researchers say.
"In our analysis, we find the replaced property can be any data, such as a critical function or a key program state," the report states. "Thus, the attacker may abuse the propagation process ... of a hidden property to powerfully manipulate critical program logic associated with the compromised property."
To help developers identify potential attack vectors in their own Node.js application, the research team has created a tool, dubbed Lynx, that will be released during the Black Hat Security Briefings in early August. The tool identifies potential vulnerable properties by propagating fake parameters to enumerate and track the use of properties in the code.
"Lynx combines the advantages of static and dynamic analysis to track property propagation, identify hidden properties, and generate corresponding concrete exploits," the paper states.
The 13 vulnerabilities disclosed by the team were discovered using the tool to evaluate 60 popular Node.js programs. Using Lynx, the group found 318 candidates for hidden properties, with more than two-thirds of the programs containing such properties. Then, using dynamic analysis, the researchers were able to identify likely vulnerable properties.
"For Lynx, we track the data flows of the user and we statically analyze the propagation to find potential data dependencies that the attacker could create," Feng says. "Two groups of people should use the tools: The developers who develop APIs can use ours tools to attacks their own program and fix the program by building or deleting these hidden properties, and security researchers — white-hat hackers — can use the tools to find potential issues in open source programs."
Register now for this year's fully virtual Black Hat USA, scheduled to take place August 1–6, and get more information about the event on the Black Hat website. Click for details on conference information and to register.