Trustwave Unveils New Offerings to Maximize Value of Microsoft Security Investments. Learn More

Trustwave Unveils New Offerings to Maximize Value of Microsoft Security Investments. Learn More

Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Offensive Security
Solutions to maximize your security ROI
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

Unauthenticated Backdoor Access in Unanet

The default configuration of the Unanet web application has a backdoor that can allow unauthenticated users to login and manipulate the user accounts and the roles they maintain. This vulnerability is due to a code branch that exists within the product that maintains a hardcoded user that is unlisted in the users table of the database. The user was originally identified via a user enumeration vulnerability (see below).

Although the user is unable to login directly, the vulnerable nature of how session cookies function within Unanet (zero entropy and no session timeouts) allows anyone to bypass the need to authenticate with this user.

The construction of a Unanet session cookie is as follows, UserID, username in uppercase, roles concatenated together with '^', static cookie value, and digest. The digest is created similar to the following psuedo code:

username = "csanders".upper()
roles = ["unaSourceUser","timesheetUser","expenseUser"]
cookval = "q4Z26w&3@1xya"
m = hashlib.md5(id+"|"+username+"|"+('^'.join(roles))+"|"+cookval)
digest = m.hexdigest()

Another issue is that usernames and ID's were available via a user enumeration. By iterating the 'personkey' value, each username and id would echo into an error page that could be parsed to obtain a list of existing usernames within the system.

Role values were also known as they exist within the 'Roles' tab on ''. The actual value that is used within the cookie is available as the value of each checkbox. We identified 19 roles within our environment. Without any knowledge of the normal roles associated with users (for instance customer and administrator are not typically used together) there are 19! permutations, with intelligence we brought this number down ~5! permutations, well within the range of a simple brute force.


Having obtained the userID, usernames, roles, the last remaining piece of data is the special cookie value. This value is referred to as a nonce. However, a nonce by definition is only used once ( This is set to a default value that is outlined in The default nonce value can be changed from 'q4Z26w&3@1xya' but this is only a recommendation, not a requirement.

As long as that default value has not been changed, the hidden cookie value can be brute forced offline using the knowledge of all other values. This is true because the algorithm for generating the digest is known and when userid, username, roles, and digest are known it becomes a simple problem of solving for the single missing variable.

However, it became clear that user unanet (id 0) was not handled in the same way. Since this user was identified by the user enumeration but not within our user list, we investigated the code. We found the following within the personfactory.class:

public static Person make(Long personKey, Connection con)
throws SQLException
if (personKey == null) {
return null;
if (personKey.longValue() == 0L) {
return makeAdmin();
public static Person makeAdmin()
Person unanet = new Person(Long.valueOf(0L), "UNANET", UNANET");
unanet.setName(new Name("Unanet", (Character)null, "Unanet", ull, unanet.getUsername()));
unanet.setPasswordDate(new java.util.Date());
return unanet;

This identified that if the personkey was zero, it would go to the makeadmin section. When this method was called, it generated a new person 'unanet' and assigned that password, 'UNANET'. More interestingly though it then called 'setUnanetAdministrator(true)'. Tracing that method we get:

public void setUnanetAdministrator(boolean unanetAdministrator)
if (unanetAdministrator) {
} else {

After uncovering the UserID, Username, and seeing the secret group __unanetAdministrator__, we could now generate our digest. Our cookie then becomes:


We were able to successfully log in with this user.

This is not some deep, arcane issue. Anyone having access to a Unanet system is capable of generating the same conclusion via a simple code review. Additionally, even if the cookie 'nonce' was changed, any user of the system (or attacker who intercepts a request) is capable of brute forcing the new nonce offline. Currently any system that has not changed their cookie 'nonce' is vulnerable to an unauthenticated attacker being able to login with unanetAdministrator privileges. This includes public facing instances of Unanet. A simple Google search ( returns ~1600 results of such instances.

Exploitation of this vulnerability allows an unauthenticated attacker access to remove users, change roles, and create a new administrator. An attacker can use these privileges to deny availability, comprise integrity, and remove confidentiality.

Steps to Reproduce

  1. Navigate to a Unanet site.
  2. Open up a proxy such as Burp.
  3. Proxy the initial login page through Burp
  4. Add the 'Cookie: unanetAccess=0%7CUNANET%7C__unanetAdministrator__%7C477c49a990eeabde873313578ce1daeb' to the report
  5. Forward the request and you will be logged into the application as Unanet



Fixes for this issue were released in Unanet versions 10.0.51, 10.1.43, and 10.2.5.
For more information see the Trustwave advisory: TWSL2017-004

Latest SpiderLabs Blogs

Network Isolation for DynamoDB with VPC Endpoint

DynamoDB is a fully managed NoSQL database service offered by Amazon Web Services (AWS). It is renowned for its scalability, dependability, and easy connection with other AWS services....

Read More

The Underdog of Cybersecurity: Uncovering Hidden Value in Threat Intelligence

Threat Intelligence, or just TI, is sometimes criticized for possibly being inaccurate or outdated. However, there are compelling reasons to incorporate it into your cybersecurity defense strategy....

Read More

Clockwork Blue: Automating Security Defenses with SOAR and AI

It’s impractical to operate security operations alone, using manual human processes. Finding opportunities to automate SecOps is an underlying foundation of Zero Trust and an essential architecture...

Read More