Hunting on ASPX Application For P1's (Unauthenticated SOAP,RCE, Info Disclosure)
An ASPX application exposed a SOAP endpoint and a document viewer that returned user information and documents without authentication. An attacker could retrieve sensitive user data and documents by supplying arbitrary identifiers, and the Telerik upload component was vulnerable to a known remote code execution flaw.
Published on elmahdi.tistory.com
Hi, I wanna share with you how i found a P1 Vulnerabilities in a private program.
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.
Context
This is a write-up of a private-program engagement in which the researcher found several P1 issues on an ASPX application. The report does not name the program or the organisation; the host is shown throughout as care.redacted.com, and the SOAP service path is likewise partly redacted. The application had a login page, a registration page, a document viewer that serves PDFs, and a Telerik-based file upload and file management component. The report was published on 31 May 2020.
The findings covered here are:
- An unauthenticated SOAP endpoint exposing user and system functions, including customer information lookup by document and by id.
- Remote command execution through the Telerik UI file manager (referenced as CVE 2017-9248).
- An unauthenticated IDOR in a document viewer that returns PDFs containing user information.
Setup
The researcher worked without any account on the target. The report states plainly that the registration page existed but that the information needed to register was not available, so every finding below was reached unauthenticated.
The tooling was the tomnomnom set, linked at the end of the post:
assetfinderfor subdomain enumerationhttprobefor resolving which subdomains respondget-titlefor extracting the title of responsive hostsffuffor directory discovery
A browser was used for manual inspection, including viewing page source with CTRL+U. Google was used for dorking. No versions of the tools are given.
Finding it
The entry point was the title list. After grabbing subdomains and titles with assetfinder, resolving them with httprobe and pulling titles with get-title, the researcher noticed one title containing "LOGIN". Opening that page showed an ASPX application with no registration link, so the next attempt was directory discovery with ffuf to find pages and sensitive files. That produced nothing interesting.
The researcher then moved to a search engine and ran a basic dork:
site: care.redacted.com
Opening the indexed pages revealed a registration page, but the information required to register was not available. Viewing the source of that page (CTRL+U) to look for included JavaScript files revealed two files.
Exploitation
Step 1: Unauthenticated SOAP service
Opening the first JavaScript file, config.js, revealed a reference to a SOAP file:
/services/CareRedactedredacted.asmx/
The .asmx endpoint listed many user and system functions. The researcher assumed these would require credentials, picked one of the URLs that took an id parameter, supplied a random value of 328915, and sent the request:
https://care.redacted.com/services/CareRedactedredacted.asmx/GetCustomerinfobydoc?Redacted=string&id=328915
The service returned all of the user's sensitive information without any authentication. The report groups the exposed capability as deleting documents, getting information about users, accessing users' messages, reading any configuration of the system, and other functions.
Step 2: Telerik UI file manager to RCE
After reporting the SOAP issue, the researcher opened the second JavaScript file. It contained a URL for an ASPX page with an upload functionality. Uploads of malicious files (aspx, asp, html) did not work, and even a valid PDF upload did not return the URL or id of the stored document. What the researcher did notice was that the site used Telerik for uploading and managing files.
A search for Telerik exploits led to a blog post describing how to compromise Telerik:
https://captmeelo.com/pentest/2018/08/03/pwning-with-telerik.html
After reading and understanding it, the researcher tried the exploit and it worked: access to the Telerik file manager was obtained, and a TXT file was uploaded to confirm the vulnerability. The post's heading references CVE 2017-9248.
Step 3: IDOR in the document viewer
After reporting the RCE, the researcher returned to the page and checked its source code again. Inside the JavaScript there was an ASPX file used for reading documents:
var url = '/DocumentManagement/' + 'ViewDocumentImage.aspx?id=' + docid;
The URL was copied and the id parameter given a random number, 15. The site returned a PDF document containing sensitive information about a user, again without any authentication. The post's heading calls it a critical IDOR that leaks all users' PII.
Root cause
The report does not include source code or server configuration, so the causes below are inferred from behaviour.
The SOAP service exposes methods such as GetCustomerinfobydoc that take an object identifier as a parameter and return the full record. Nothing in the request carries an identity, and the service returns data anyway, so authorisation is either absent on the method or applied only at the UI layer. The same pattern applies to ViewDocumentImage.aspx: the document id is the only input, and any id resolves to a document, so the check that the caller owns or may view that document is missing. In both cases a random identifier returned data, which suggests enumeration is practical.
The Telerik file manager was reachable and usable, and the exploit against it worked. The upload form itself rejected dangerous extensions and did not disclose stored file paths, but that defence was irrelevant because the file manager component underneath was directly accessible.
Impact
Under the conditions shown, an unauthenticated attacker could:
- Read sensitive user information through the SOAP service, and per the report's function list also delete documents, access users' messages and read system configuration.
- Gain access to the Telerik file manager, confirmed by uploading a TXT file.
- Retrieve PDF documents belonging to users by guessing or enumerating the
idparameter, exposing PII.
The report does not state how many users or records were affected, nor the bounty amounts. The post's title labels the findings P1 and calls the IDOR critical.
Fix
Based on the behaviour shown, the fixes would be: require authentication and per-object authorisation on every SOAP method, in particular GetCustomerinfobydoc, and reject anonymous calls at the service boundary; enforce ownership checks in ViewDocumentImage.aspx so that an id only resolves for a caller entitled to that document, and use non-guessable identifiers; and upgrade or remove the vulnerable Telerik UI component, or at minimum block unauthenticated access to its file manager.
Variants to test
.asmxendpoints referenced from client-side JavaScript. Grepconfig.jsand other bundles for.asmx. A positive result is a service description listing methods, followed by a call to a method that takes an id and returns data without a session.- Sequential document ids in viewer pages. Look for patterns like
ViewDocumentImage.aspx?id=in page source. A positive result is a document returned for an id the tester does not own. - Telerik file managers on ASPX applications. Check for the Telerik upload and file management component. A positive result is access to the file manager, confirmed by uploading a harmless file.
- Title-based triage during recon. Titles containing "LOGIN" on hosts that also expose registration pages are worth manual inspection, since the registration flow often reveals the JavaScript that references backend services.
- Search engine dorking on the in-scope domain. A positive result is an indexed page, such as a registration page, that is not linked from the main site and whose source references additional endpoints.
What happened, in plain words
A security researcher was testing a website that belonged to a private bug bounty program. A bug bounty program is an arrangement where a company invites independent testers to look for security problems in its systems and report them, usually for a reward. The researcher was allowed to test, but the company's name is hidden in the write-up: the site appears as care.redacted.com, and part of the address of one service is also blanked out.
The site had a login page. It had a registration page, a feature for storing and viewing documents (PDF files), and a file upload and file management component built with a product called Telerik. The researcher never managed to create an account, so every problem described here was found without logging in at all. That is what "unauthenticated" means: no username, no password, no session.
Three separate problems were found, in this order:
- A service on the server (a SOAP service) that answered questions about customers and the system without asking who was calling. It could look up a customer's information from a document reference or from a simple number.
- A way to reach the Telerik file manager, a known vulnerability tracked as CVE 2017-9248.
- A document viewer that handed out PDF files containing user information to anyone who changed a number in the address (an IDOR).
The write-up was published on 31 May 2020.
Getting started
Before touching the site, the researcher needed to know what existed on it. Companies often own many subdomains, which are the prefixes in front of a domain name, like shop.example.com or care.example.com. Each one can be a different application, and some are forgotten or less protected than the main site.
The researcher used a small set of free command-line tools, all from a developer known as tomnomnom, linked at the end of the post:
assetfinder, to collect subdomain names.httprobe, to check which of those names actually answer on the web.get-title, to fetch the page title of each one that answers.ffuf, to try many folder and file names on a site (directory discovery).
A command-line tool is a program you run by typing its name in a terminal instead of clicking buttons. The report does not give the versions of any of these tools, nor the exact commands used.
Why start with titles? A page title is the text shown in the browser tab. Scanning a list of titles is a quick way to spot which subdomains host login pages, admin panels or other interesting applications, without opening every single one.
Finding the target
One of the titles contained the word "LOGIN". The researcher opened that page in a browser and saw that the site was an ASPX application. ASPX is a file extension and a technology from Microsoft: pages ending in .aspx are built and run on the server with Microsoft's web framework, and they often expose services alongside the visible pages.
The page had no link to register. Without an account, the researcher could not get past the login. So the next step was directory discovery with ffuf: trying a long list of common folder and file names to see whether any page or sensitive file was reachable. That turned up nothing interesting.
With the site itself unhelpful, the researcher turned to a search engine. Search engines index pages that the site owner may not link from the front page, so they can reveal pages you would never find by clicking around. The search used was a basic "dork", which is just a search query built with special operators:
site: care.redacted.com
Line by line: site: is a search operator that restricts results to one domain. care.redacted.com is the domain being searched. So the query asks the search engine: show me every page you know about on this domain.
The screenshot shows the search results for that query. The researcher opened all the pages that came back and noticed one for registration. But registration required information the researcher did not have, so signing up was not possible.
Instead, the researcher pressed CTRL+U. In most browsers this opens the page source: the raw HTML, the language web pages are written in, that the browser normally turns into the page you see. The reason to look at source is that it often references other files the page loads, including JavaScript files. JavaScript is the programming language that runs inside the browser and makes pages interactive; those files frequently contain addresses of backend services that the visible page never shows. Two such files were found.
The screenshot shows the two JavaScript files referenced by the registration page.
Step 1: A SOAP service that answers anyone
What SOAP and .asmx are
SOAP is a way for two computer programs to talk to each other over the web. Instead of a browser asking for a page, one program sends a structured message (in XML, a text format built from tags) to another program, asking it to run a particular function and return a result. A useful comparison: a web page is like a restaurant menu you read, while a SOAP service is like a service counter where you name a dish and it hands it to you. The list of dishes is the list of functions the service offers.
.asmx is the file extension Microsoft uses for SOAP services on ASPX applications. A single .asmx address can offer dozens of functions, and it will often happily describe them to anyone who asks.
What was found
The researcher opened the first JavaScript file, config.js, and inside it found a reference to a SOAP file:
/services/CareRedactedredacted.asmx/
Line by line: /services/ is a folder on the website. CareRedactedredacted.asmx is the name of the SOAP service file, partly blanked out in the write-up. The trailing / is just the end of the address.
The screenshot shows the reference to the SOAP file inside config.js.
Opening that address showed a long list of user and system functions. The researcher assumed these would require credentials, meaning a login or some proof of identity, because they dealt with customer data. To test the assumption, the researcher picked one of the function addresses that took a parameter called id, gave it a random value of 328915, and sent the request:
https://care.redacted.com/services/CareRedactedredacted.asmx/GetCustomerinfobydoc?Redacted=string&id=328915
Line by line:
https://care.redacted.comis the site./services/CareRedactedredacted.asmx/is the SOAP service file.GetCustomerinfobydocis the name of the function being called: get customer information by document.?starts the list of parameters, the inputs the function needs.Redacted=stringis a parameter whose name and value are blanked out in the write-up; the wordstringis a placeholder value.&separates parameters.id=328915passes the number 328915 as the identifier of the customer or document to look up.
The result surprised the researcher: the service returned all of the user's sensitive information without any authentication. No login, no token, nothing. The report lists what the exposed functions could do: delete documents, get information about users, access users' messages, read any configuration of the system, and other functions.
Why does this matter so much? A service that answers without checking who is calling is like a bank counter with no teller: anyone who knows the form to fill in gets the money. And because the only input is a number, anyone can try 1, 2, 3 and so on to walk through every customer.
Step 2: Running commands on the server through Telerik
What Telerik is and what the vulnerability is
Telerik is a commercial set of user-interface components that developers add to ASPX applications, so they do not have to build things like file uploaders and file managers from scratch. One of its components is a file manager: a web page for uploading, browsing and managing files on the server.
CVE 2017-9248 is a publicly known vulnerability in certain versions of that component. CVE stands for Common Vulnerabilities and Exposures: a public catalogue where each known security flaw gets an identifier, so everyone can refer to the same flaw unambiguously. The flaw was a weakness in how that component protected its file manager, which could let an attacker reach and use it. Once you can upload files through a file manager, you may be able to upload something the server will later execute, which would turn into remote command execution (RCE): the ability to make the server run commands of your choosing.
What was tried
After reporting the SOAP problem, the researcher opened the second JavaScript file. It contained the address of an ASPX page with an upload feature. The researcher first tried uploading malicious files with the extensions aspx, asp and html. These are file types the server might execute or render, so they are the obvious things to try. None of them worked. Even uploading a valid PDF did not work: the site did not return the address of the stored document or its id.
But the researcher noticed that the site used Telerik for uploading and managing files. That changed the approach: instead of fighting the upload form, attack the component underneath it. A search for Telerik exploits led to a blog post explaining how to compromise it:
https://captmeelo.com/pentest/2018/08/03/pwning-with-telerik.html
Line by line: this is simply the address of the blog post the researcher found and read. It is not a request to the target; it is the tutorial that described the technique.
After reading and understanding the post, the researcher tried the exploit and it worked. Access to the Telerik file manager was obtained, and a TXT file was uploaded to confirm the vulnerability. A TXT file is harmless: it is plain text, so uploading it proves you can put files on the server without doing anything destructive. The post's heading references CVE 2017-9248.
Why does the failed upload matter? It shows a common pattern: the visible form had defences (it rejected dangerous extensions and did not reveal where files were stored), but those defences were irrelevant because the component behind the form could be reached directly. Locking the front door is pointless if the back door is open.
Step 3: Reading other people's documents by changing a number
What IDOR means
IDOR stands for Insecure Direct Object Reference. It means the application uses something simple and guessable, such as a number, to point at a record (a document, an order, a user), and it does not check whether the person asking is allowed to see that particular record. A comparison: a cloakroom that hands over any coat to anyone who says a number, without checking the ticket. The number is the "direct object reference"; the missing check is the "insecure" part.
What was found
After reporting the RCE, the researcher went back to the page and looked at its source code again. Inside the JavaScript there was an ASPX file used for reading documents:
var url = '/DocumentManagement/' + 'ViewDocumentImage.aspx?id=' + docid;
Line by line:
var url =creates a variable calledurl, a named box that stores a value.'/DocumentManagement/'is a fixed piece of text: the folder on the site.+joins pieces of text together.'ViewDocumentImage.aspx?id='is the page that displays a document, followed by the start of its parameter list.+ docidappends the value held in another variable,docid, which is the document's identifier.
So the browser builds an address like /DocumentManagement/ViewDocumentImage.aspx?id=<some number> and asks the server for it. The researcher copied that address and gave the id parameter a random number, 15. The site returned a PDF document containing sensitive information about a user, again without any authentication. The report describes this as a critical IDOR that leaks all users' PII. PII stands for Personally Identifiable Information: data that can identify a person, such as names, addresses or identity numbers.
Why is this serious? Because the only thing standing between a stranger and someone's document is a number. If 15 works, then 14, 16 and 17 probably work too, and a script can try them all in seconds.
Why these problems existed
The report does not include source code or server configuration, so the explanations below are inferred from how the site behaved.
The SOAP service offers functions such as GetCustomerinfobydoc that take an identifier and return the full record. Nothing in the request carries an identity, and the service returns data anyway. That means the authorisation check, the step that decides whether this caller may see this record, is either missing on the function itself or only applied in the visible web page. The same pattern applies to ViewDocumentImage.aspx: the document id is the only input, and any id resolves to a document, so the check that the caller owns or may view that document is missing. In both cases the identifier is a simple number, which makes guessing practical.
The Telerik file manager was reachable and usable, and the exploit against it worked. The upload form rejected dangerous extensions and did not disclose stored file paths, but that defence did not matter because the file manager component underneath was directly accessible.
What an attacker could have done
Under the conditions shown, someone with no account could:
- Read sensitive user information through the SOAP service, and, per the report's list of functions, also delete documents, access users' messages and read system configuration.
- Gain access to the Telerik file manager, confirmed by uploading a TXT file.
- Retrieve PDF documents belonging to users by guessing or enumerating the
idparameter, exposing PII.
The report does not state how many users or records were affected, nor any bounty amounts. The post's title labels the findings P1 and calls the IDOR critical.
How it should be fixed
Based on the behaviour shown, the fixes would be:
- Require authentication and a per-record authorisation check on every SOAP function, in particular
GetCustomerinfobydoc, and reject anonymous calls at the service boundary. - Enforce ownership checks in
ViewDocumentImage.aspx, so that an id only resolves for a caller entitled to that document, and use identifiers that cannot be guessed. - Upgrade or remove the vulnerable Telerik component, or at minimum block unauthenticated access to its file manager.
Similar things to look for
.asmxaddresses mentioned in browser-side JavaScript. Searchconfig.jsand other bundles for.asmx. A good sign is a service description that lists functions, followed by a call to a function that takes an id and returns data without a session.- Sequential document ids in viewer pages. Look for patterns like
ViewDocumentImage.aspx?id=in page source. A good sign is a document returned for an id you do not own. - Telerik file managers on ASPX applications. Check whether the Telerik upload and file management component is present. A good sign is reaching the file manager, confirmed by uploading a harmless file.
- Sorting hosts by page title during reconnaissance. Titles containing "LOGIN" on hosts that also expose registration pages are worth a manual look, because the registration flow often reveals the JavaScript that references backend services.
- Search engine dorking on the in-scope domain. A good sign is an indexed page, such as a registration page, that is not linked from the main site and whose source references additional endpoints.
Glossary
- API: a defined way for one program to ask another program to do something or return data, without a human clicking through pages.
- ASPX: a file extension and Microsoft web technology for pages that are built and run on the server.
.asmx: the file extension Microsoft uses for SOAP services on ASPX applications.- Authentication: proving who you are, usually with a username and password or a session.
- Authorisation: deciding whether an identified person is allowed to do or see a particular thing.
- Bug bounty program: an arrangement where a company invites independent testers to find and report security problems, often for a reward.
- Command-line tool: a program you run by typing its name in a terminal rather than clicking in a window.
- Cookie / token: a small piece of data a site gives your browser after you log in, which your browser sends back on later requests so the site recognises you. Neither appears in this report's requests.
- CVE: Common Vulnerabilities and Exposures, a public catalogue that gives each known security flaw a unique identifier.
- CVE 2017-9248: the identifier of the publicly known Telerik vulnerability referenced in this report.
- Directory discovery: automatically trying many folder and file names on a site to find pages that are not linked publicly.
- Dork: a search engine query built with special operators, such as
site:, to find specific pages. - HTML: the language web pages are written in, which the browser turns into the page you see.
- HTTP / HTTPS: the protocol browsers and servers use to exchange requests and responses; HTTPS is the encrypted version.
- IDOR: Insecure Direct Object Reference, where a record is addressed by a simple guessable value and the application does not check that the caller may see it.
- JavaScript: the programming language that runs in the browser and makes pages interactive; its files often reveal backend addresses.
- Parameter: an input passed to a page or service, usually after a
?in the address, in the formname=value. - PDF: a document file format commonly used for reports and forms.
- PII: Personally Identifiable Information, data that can identify a specific person.
- P1: the highest priority level in a bug bounty program's severity scale.
- RCE: Remote Command Execution, the ability to make a server run commands of your choosing.
- SOAP: a way for programs to exchange structured messages over the web, where each message asks for a named function to run.
- Subdomain: a prefix in front of a domain name, such as
careincare.example.com, often hosting a separate application. - Telerik: a commercial set of user-interface components for ASPX applications, including a file uploader and file manager.
- TXT file: a plain text file, harmless to upload, useful for proving that file upload works.
- Unauthenticated: done without logging in or proving any identity.
- XML: a text format built from tags, used to structure data in messages such as SOAP requests.