Expect The Unexpected: Discovering fresh ZeroDay for Bounty
The LDAP integration in FastVue Reporter allowed an attacker to change the LDAP server address without re-entering the stored password, and then force a sync to send the password to an attacker-controlled server. This exposed the stored LDAP credentials.
Published on sinsinology.medium.com
It’s common to see applications have additional features to connect/integrate with other components across the network, from setting up webhooks, connecting to SMTP servers, syncing LDAP, and whatnot.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Applications often ship extra features to connect and integrate with other components across the network: webhooks, SMTP servers, LDAP sync and similar. This is the story of a zero-day I found in one of those integration features, reported to the vendor and patched.
Context
The target was a special program that rewarded anyone who found a vulnerability in the scope of its IP addresses with what the author calls an enormous bounty. The client had lots of software and appliances, all completely up to date, so instead of going after known issues I decided to hunt for zero-days in the products in scope.
One of those products was Sophos FastVue (Fastvue Reporter). It is a relatively new product, which made it an attractive target. As the vendor describes it:
Fastvue Reporter, makes the log data from your firewall reflect real Internet usage activity. It removes images, scripts, fonts, ads, and other background traffic so you can send meaningful Internet usage reports and alerts, to the right person.
FastVue ships several Reporter products, and according to the write-up all of them were vulnerable:
- Sophos Reporter
- FortiGate Reporter
- Palo Alto Reporter
- SonicWall Reporter
- Baracuda Reporter
- ContentKeeper Reporter
- TMG Reporter
The feature I focused on was the Active Directory / LDAP integration. Whenever you create a new LDAP / Active Directory setting, the application creates a "Source" entity. An LDAP source consists of:
- LDAP Server Address
- Port
- SSL or Not
- Username
- Password
When you save this information through the dashboard and later return to the same menu, you see the current setting but without the password field. The application reads the LDAP information from its database through an endpoint that returns the current sources.
Setup
Finding it
While testing the LDAP integration I looked at what the application returns when it loads the stored sources. The response shows the current setting but not the stored password: the password is not readable through that endpoint.
That is the expected behaviour, and it is exactly what made the next observation interesting. When updating an LDAP source, you can change the settings without supplying the current password. So I asked myself:
What happens if we change only the LDAP Server address to attacker controlled server?
To my surprise, it was possible to change only the LDAP server address. The update only needs the ID of the existing source, taken from the previous step, and a SetLdapSource request that updates the LDAP settings, including the server address.
Exploitation
Step 1: read the existing LDAP source and note its ID
Load the LDAP sources through the dashboard endpoint. The response contains the stored configuration but not the password. The ID of the source is what the next step needs.
Step 2: point the source at an attacker-controlled server
Send a SetLdapSource request that updates the existing source, identified by its ID, and changes only the LDAP server address to a server you control. Because the password field is not sent, the application keeps the stored password, which is precisely the value we want.
Step 3: force an LDAP sync
With the server address now pointing at the fake LDAP server, the application has to be made to authenticate. To force the sync, request the endpoint that triggers it.
Step 4: capture the credentials
On the attacker-controlled side, the incoming LDAP authentication delivers the credentials, including the stored password. The write-up shows the received credentials as the result of the forced sync.
Root cause
The flaw is in a function called SetLDAP. When an LDAP setting is updated, the ID is received from the request and a search is done in the database to find the corresponding LDAP source. After retrieving the object, FastVue uses all the parameters sent in the request to update that object. Only for the password parameter does it check whether a new password was sent and is not empty: if so it updates the previous password, otherwise it keeps the current value by default.
That default is what makes the attack work. Changing the server address while omitting the password leaves the stored secret attached to the source, and the next sync sends it to whatever server the source now points at. Because the stored password is kept when the field is omitted, the next sync sends it to whatever server the source now points at.
Impact
An attacker who can edit an LDAP source can redirect the LDAP sync to a server they control and recover the stored password, without ever knowing it beforehand. The write-up states that all the Reporter products listed above were vulnerable.
Fix
The vulnerability was reported to the vendor, who patched it quickly. The write-up does not describe the code change itself.
Variants to test
The pattern generalises to any integration where a stored secret is reused against a destination the user can edit:
- Other sync connectors. SMTP, syslog, webhook and directory connectors that store a password and let you change only the host. A positive result is an update accepted without the password and a subsequent connection to your listener carrying the stored credential.
- Partial updates on other objects. Look for update endpoints that merge submitted fields into the stored object and treat an absent secret field as "keep existing". A positive result is a successful update that changes the destination while the secret survives.
- Forced-sync endpoints. Any endpoint that triggers an outbound authentication on demand makes extraction fast and repeatable. A positive result is a sync you can trigger at will after changing the destination.
- Test-connection buttons. Features that verify connectivity often authenticate with the stored secret. A positive result is credentials arriving at your listener from a test action rather than a scheduled sync.


What happened, in plain words
Imagine a company keeps a spare key to a locked cupboard in a drawer, and the drawer has a little window so you can see the key is there but not reach it. Now imagine you can swap the cupboard for one of your own, and the company, without checking, posts the key to the new cupboard. That is roughly the bug in this story.
A security researcher was taking part in a bug bounty program. A bug bounty program is a scheme where a company says: if you find a security problem in our systems and tell us about it responsibly, we will pay you a reward, called a bounty. This particular program promised what the author calls an enormous bounty to anyone who found a vulnerability in the range of IP addresses it covered. An IP address is the number that identifies a computer on a network, a bit like a postal address for a machine.
The client in scope had lots of software and appliances, and all of it was completely up to date. That matters because up-to-date software usually means the known bugs have already been fixed. So instead of hunting for known problems, the researcher decided to look for a zero-day: a vulnerability that nobody has found or published before, so the vendor has had zero days to fix it.
One of the products in scope was Sophos FastVue, also called Fastvue Reporter. It is a relatively new product, which made it an attractive target: newer software has had less time to be picked over by other researchers. The vendor describes it like this:
Fastvue Reporter, makes the log data from your firewall reflect real Internet usage activity. It removes images, scripts, fonts, ads, and other background traffic so you can send meaningful Internet usage reports and alerts, to the right person.
In plain terms, a firewall is the device or software that sits between a company network and the internet and decides what traffic is allowed in and out. It writes logs, which are records of what happened. Fastvue Reporter takes those records and tidies them up so a manager can read a useful report about who used the internet and for what, instead of a giant list of every image and advert loaded.
FastVue ships several Reporter products, and according to the write-up all of them were vulnerable:
- Sophos Reporter
- FortiGate Reporter
- Palo Alto Reporter
- SonicWall Reporter
- Baracuda Reporter
- ContentKeeper Reporter
- TMG Reporter
The feature the researcher focused on was the Active Directory / LDAP integration. LDAP is a standard way for software to look up information about people and accounts in a directory, a bit like a company phone book for user accounts. Active Directory is Microsoft's version of that directory. Many products let you connect to it so that, for example, users can log in with their normal company username and password, or so the product can look up who belongs to which team.
Whenever you create a new LDAP / Active Directory setting in FastVue, the application creates something called a "Source" entity. An entity here just means a saved record in the application's database, like a contact card. An LDAP source consists of:
- LDAP Server Address
- Port
- SSL or Not
- Username
- Password
A port is a numbered channel on a server, so the address says which machine and the port says which service on that machine to talk to. SSL is the encryption that protects connections, so "SSL or Not" is a switch for whether the connection is encrypted. The username and password are the credentials FastVue uses when it connects to the directory.
When you save this information through the dashboard and later come back to the same menu, you see the current setting but without the password field. The dashboard is the web page where an administrator manages the product. The application reads the LDAP information from its database through an endpoint that returns the current sources. An endpoint is simply a specific address on a web application that does one job, like a counter in a shop: you go to that counter to ask for that one thing. When your browser loads a page, it is really sending requests to endpoints and drawing the answers on screen.
Setup
A host is just a computer or server you control. A fake LDAP server is a program that pretends to be the company directory so that anything sent to it can be recorded.
Finding it
While testing the LDAP integration, the researcher looked at what the application returns when it loads the stored sources. The response shows the current setting but not the stored password: the password is not readable through that endpoint. This is good behaviour on the surface. A password that the application needs to keep for its own use should not be handed back to whoever opens the settings page, because anyone who can see that page could then read it.
That is the expected behaviour, and it is exactly what made the next observation interesting. When updating an LDAP source, you can change the settings without supplying the current password. Think about a form on a website: normally, if you want to change your password, the site asks you for the old one first. Here, the application did not ask. So the researcher asked:
What happens if we change only the LDAP Server address to attacker controlled server?
To the researcher's surprise, it was possible to change only the LDAP server address. The update only needs the ID of the existing source, taken from the previous step, and a SetLdapSource request that updates the LDAP settings, including the server address. An ID is a unique number the application gives each saved record so it can tell them apart, like a customer number. A request is the message your browser sends to a web application when you click a button or submit a form. The name SetLdapSource is the name of the request that saves an LDAP source.
Exploitation
Step 1: read the existing LDAP source and note its ID
Load the LDAP sources through the dashboard endpoint. The response contains the stored configuration but not the password. The ID of the source is what the next step needs. The reason for this step is simple: to change a record, you first have to know which record you are changing, and the ID is how the application identifies it.
Step 2: point the source at an attacker-controlled server
Send a SetLdapSource request that updates the existing source, identified by its ID, and changes only the LDAP server address to a server you control. Because the password field is not sent, the application keeps the stored password, which is precisely the value we want. This is the heart of the trick. The application treats a missing password field as "leave the old password alone", which is convenient for the administrator but dangerous when the destination address can also be changed in the same request.
Step 3: force an LDAP sync
With the server address now pointing at the fake LDAP server, the application has to be made to authenticate. To authenticate means to prove who you are, usually by presenting a username and password. A sync is when the application connects to the directory to fetch or check information. To force the sync, request the endpoint that triggers it. The reason for this step is that the password only leaves the application when the application actually connects somewhere, so we need to make that connection happen on demand rather than waiting for a scheduled one.
Step 4: capture the credentials
On the attacker-controlled side, the incoming LDAP authentication delivers the credentials, including the stored password. The write-up shows the received credentials as the result of the forced sync. In other words, the fake server writes down whatever username and password are presented to it, and one of those values is the secret that the dashboard refused to show.
Root cause
The flaw is in a function called SetLDAP. A function is a named block of code that does one job when it is called. When an LDAP setting is updated, the ID is received from the request and a search is done in the database to find the corresponding LDAP source. After retrieving the object, FastVue uses all the parameters sent in the request to update that object. Parameters are the individual pieces of information in a request, like the fields of a form. Only for the password parameter does it check whether a new password was sent and is not empty: if so it updates the previous password, otherwise it keeps the current value by default.
That default is what makes the attack work. Changing the server address while omitting the password leaves the stored secret attached to the source, and the next sync sends it to whatever server the source now points at. Because the stored password is kept when the field is omitted, the next sync sends it to whatever server the source now points at. In transit means while the data is travelling over the network. Hiding a password on screen is like frosting a window: it stops people looking in, but it does nothing if the key is then posted to a different address.
Impact
An attacker who can edit an LDAP source can redirect the LDAP sync to a server they control and recover the stored password, without ever knowing it beforehand. The write-up states that all the Reporter products listed above were vulnerable.
Fix
The vulnerability was reported to the vendor, who patched it quickly. A patch is an update that fixes the problem. The write-up does not describe the code change itself.
Variants to test
The pattern generalises to any integration where a stored secret is reused against a destination the user can edit. In other words, whenever software keeps a password for you and lets you change where it sends that password, ask whether it checks that the destination is still the one you originally trusted.
- Other sync connectors. SMTP, syslog, webhook and directory connectors that store a password and let you change only the host. SMTP is the protocol for sending email, syslog is a standard way of sending log messages, and a webhook is an automatic message one system sends to another when something happens. A positive result is an update accepted without the password and a subsequent connection to your listener carrying the stored credential. A listener is a program that waits for incoming connections and records them.
- Partial updates on other objects. Look for update endpoints that merge submitted fields into the stored object and treat an absent secret field as "keep existing". A positive result is a successful update that changes the destination while the secret survives.
- Forced-sync endpoints. Any endpoint that triggers an outbound authentication on demand makes extraction fast and repeatable. A positive result is a sync you can trigger at will after changing the destination.
- Test-connection buttons. Features that verify connectivity often authenticate with the stored secret. A positive result is credentials arriving at your listener from a test action rather than a scheduled sync.


Glossary
- Active Directory: Microsoft's directory service, a kind of company phone book for user accounts and permissions.
- API: a set of addresses and rules that let one piece of software ask another to do something, like a service counter with defined requests.
- Authentication: proving who you are, usually by presenting a username and password.
- Bug bounty program: a scheme where a company pays researchers for responsibly reporting security problems.
- Bounty: the reward paid for a valid report.
- Credentials: the username and password (or similar) used to prove identity.
- Dashboard: the web page where an administrator manages a product.
- Database: organised storage where an application keeps its records.
- Endpoint: a specific address on a web application that performs one job.
- Entity: a saved record in an application, such as one LDAP source.
- Firewall: the device or software that controls traffic between a network and the internet.
- Function: a named block of code that performs one task when called.
- Host: a computer or server on a network.
- ID: a unique number identifying a saved record.
- Information disclosure: a vulnerability where data that should stay private can be read by someone who should not see it.
- IP address: the number identifying a machine on a network.
- LDAP: a standard protocol for looking up accounts and other information in a directory.
- Listener: a program that waits for incoming network connections and records what arrives.
- Log: a record of events written by software or a device.
- Logic flaw: a bug where the code does what it was written to do, but the rule itself is wrong.
- Parameter: one piece of information inside a request, like a form field.
- Patch: an update that fixes a vulnerability.
- Port: a numbered channel on a server that identifies a particular service.
- Request: the message a browser or program sends to a web application.
- Response: the message the application sends back.
- SMTP: the standard protocol for sending email.
- Source (LDAP source): a saved set of settings FastVue uses to connect to a directory.
- SSL: encryption that protects a network connection.
- Sync: a connection where the application fetches or checks information from another system.
- Syslog: a standard way of sending log messages between systems.
- Token: a short piece of data a site gives your browser to remember that you are logged in; it acts like a temporary pass.
- Vulnerability: a weakness in software that an attacker can use to do something harmful.
- Webhook: an automatic message one system sends to another when an event happens.
- Zero-day: a vulnerability nobody has published or fixed yet, so the vendor has had zero days to prepare.