Skip to content
RCE Write-up Intermediate

How I Earned $750 Bounty Reward From AT&T bug Bounty -Adesh Kolte

The author found several vulnerabilities in AT&T systems, including an OS command injection, a clickjacking issue due to a missing X-Frame-Options header, a reflected cross-site scripting flaw, and a WordPress Same-Origin Method Execution (SOME) vulnerability. These could allow an attacker to execute commands, trick users into unintended actions, or run malicious scripts in a victim's browser.

Adesh Nandkishor kolte Follow

Published on web.archive.org

Bounty$750 View original

{{media:0}}

Adesh Kolte, on web.archive.org

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

AT&T Inc. is an American multinational conglomerate holding company headquartered at Whitacre Tower in downtown Dallas, Texas, and the world's largest telecommunications company. This write-up covers several issues I submitted to the AT&T bug bounty programme, which paid out $750.00 in recognition of one or more report submissions that AT&T remediated during 1Q18.

Adesh Kolte
Adesh Kolte From the original on web.archive.org

The report groups four separate findings against AT&T web assets: an arbitrary code execution issue, a clickjacking issue on the teleconference login servlet, a reflected cross-site scripting issue on a login controller, and a Same-Origin Method Execution (SOME) issue in a WordPress 4.5.1 installation. Each is presented below as it was reported.

Image for post
Image for post From the original on web.archive.org

Setup

No accounts, roles or special tooling are described. The testing was done as an independent security researcher against public AT&T web endpoints. The only version stated anywhere in the report is WordPress 4.5.1, on the networking exchange blog. The report does not describe the browser or any proxy used.

Finding it

Arbitrary code execution

I describe the issue as a Remote Code Execution finding for the AT&T programme, and introduce the class first: arbitrary code execution, also known as command injection, is a technique used via a web interface in order to execute OS commands on a web server. The user supplies operating system commands through a web interface in order to execute OS commands. Any web interface that is not properly sanitised is subject to this exploit. With the ability to execute OS commands, the user can upload malicious programs or even obtain passwords. OS command injection is preventable when security is emphasized during the design and development of applications.

The report states that the issue I found was straightforward and needs no explanation, and that I was able to execute an OS level command. No endpoint, parameter, payload or output is given for this finding.

Clickjacking

The vulnerable URL is:

Text
https://www.teleconference.att.com/servlet/ATTClogin

The X-FRAME-OPTIONS header is missing in the RTA application. Because of that, it might be possible for a web page controlled by an attacker to load the content of this response within an iframe on the attacker's page. That may enable a clickjacking attack, in which the attacker's page overlays the target application's interface with a different interface provided by the attacker.

Cross-site scripting

The vulnerable application is:

Text
https://cprodmasx.att.com

The vulnerable parameter is controller.do?, and the payload used is:

Text
'-confirm(`1`)-'

WordPress SOME

The vulnerable URL is:

Text
https://networkingexchangeblog.att.com/wp-includes/js/plupload/plupload.flash.swf?target%g=alert&uid%g=hello&

WordPress 4.5.1 is vulnerable against a Same-Origin Method Execution (SOME) vulnerability that stems from an insecure URL sanitisation process performed in the file plupload.flash.swf. The code in the file attempts to remove flashVars in case they have been set as GET parameters but fails to do so, enabling XSS via ExternalInterface.

Exploitation

Step 1: Confirm the missing frame header

Request the login servlet and inspect the response headers. The report's finding is that X-FRAME-OPTIONS is absent from the response of the RTA application, so the page can be framed by a third-party origin.

Step 2: Frame the login page

The proof of concept is the following page, which loads the servlet inside a 500 by 500 iframe:

The src points at the vulnerable servlet, framed at 500 by 500. An attacker could host this page and lure a victim to it, potentially overlaying the genuine AT&T interface with attacker-controlled content.

Step 3: Deliver the XSS payload through the login controller

The vulnerable URL as reported is:

Text
https://cprodmasx.att.com/commonLogin/igate_wam/controller.do?TAM_OP=login&USERNAME=unauthenticated&ERROR_CODE=0x00000000&ERROR_TEXT=HPDBA0521ISuccessfulcompletion&METHOD=GET&URL=/crsdmn?tucd567=https://messages.att.net/'-confirm(`1`)-'&REFERE

The vulnerable URL as reported places the payload inside the URL value, after the tucd567 parameter. The payload '-confirm(1)-' is placed inside the URL value, after the tucd567 parameter.

Step 4: Trigger the SOME issue in plupload

Request the vulnerable URL:

Text
https://networkingexchangeblog.att.com/wp-includes/js/plupload/plupload.flash.swf?target%g=alert&uid%g=hello&

The report also gives a simple PoC form of the same URL:

Text
http://example.com//wp-includes/js/plupload/plupload.flash.swf?target%g=alert&uid%g=hello&

The target value is alert and the uid value is hello. Because the sanitisation in plupload.flash.swf fails to strip flashVars supplied as GET parameters, XSS via ExternalInterface is enabled.

Root cause

  • Clickjacking: the RTA application does not return an X-FRAME-OPTIONS response header, so the browser has no instruction to refuse framing and the login page renders inside an attacker's iframe.
  • XSS: the report gives the vulnerable URL and payload but does not describe the mechanism. As the report puts it, XSS occurs when a web application makes use of unvalidated or unencoded user input within the output it generates.
  • SOME: the insecure URL sanitisation in plupload.flash.swf attempts to remove flashVars when they have been set as GET parameters but fails, which allows XSS via ExternalInterface.
  • Command injection: the report does not describe the mechanism, only that an OS level command could be executed through a web interface that was not properly sanitised.

Impact

For the clickjacking issue, the attacker can trick a user into visiting a malicious page containing the vulnerable application inside the frame, and by inducing victim users to perform actions such as mouse clicks and keystrokes, the attacker can cause them to unwittingly carry out actions within the application that is being targeted. This technique allows the attacker to circumvent defences against cross-site request forgery, and may result in unauthorized actions.

For the XSS issue, by leveraging XSS an attacker does not target a victim directly. Instead, the attacker exploits a vulnerability within a website or web application that the victim would visit, essentially using the vulnerable website as a vehicle to deliver a malicious script to the victim's browser. In order for an XSS attack to take place the vulnerable website needs to directly include user input in its pages; an attacker can then insert a string that will be used within the web page and treated as code by the victim's browser.

For the command injection issue, the report states that with the ability to execute OS commands the user can upload malicious programs or even obtain passwords. No specific impact is claimed beyond that.

Fix

For the clickjacking issue the recommendation is that, to effectively prevent framing attacks, the application should return a response header with the name X-FRAME-OPTIONS.

Reward

Image for post
Image for post From the original on web.archive.org

Variants to test

  1. Frame-header checks on other servlets. Request login and account pages on sibling hosts and look at the response headers. A positive result is a 200 response with no X-FRAME-OPTIONS and no frame-ancestors in a CSP, confirmed by loading the page in an iframe from another origin.
  2. Reflection points in controller.do-style login handlers. Take any parameter that carries a return URL or path, such as URL, and place a string-breaking payload in it. A positive result is the payload executing in the target origin, for example a confirm dialog.
  3. %g parameter syntax on Flash and SWF endpoints. Append ?target%g=alert&uid%g=hello& to any .swf that accepts variables. A positive result is the supplied method being invoked in the hosting origin.
  4. WordPress versions around 4.5.1. Check wp-includes/js/plupload/plupload.flash.swf on other installations and compare the file against the fixed version. A positive result is the same flashVars handling behaviour on an unpatched copy.
  5. Command injection in web interfaces that shell out. Any feature that passes user input to an OS command is worth testing with a benign marker command. A positive result is the marker appearing in the output or in a side effect such as a created file.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 15 min read.

What happened, in plain words

A security researcher from India, Adesh Nandkishor Kolte, sent several bug reports to AT&T's bug bounty programme. A bug bounty programme is a deal offered by a company: if you find a security problem in their systems and tell them privately, they pay you a reward instead of calling the police. AT&T authorised a payout of $750.00 for one or more report submissions it remediated during 1Q18. The payment covered one or more reports that AT&T remediated during the first quarter of 2018 (1Q18).

Adesh Kolte
Adesh Kolte From the original on web.archive.org

AT&T Inc. is an American multinational conglomerate holding company headquartered at Whitacre Tower in downtown Dallas, Texas, and the world's largest telecommunications company.

Image for post
Image for post From the original on web.archive.org

This article walks through the four separate findings in the report, in the order they were written: an arbitrary code execution issue, a clickjacking issue on a teleconference login page, a cross-site scripting issue on a login controller, and a Same-Origin Method Execution issue in a WordPress 4.5.1 installation. Each one is explained from scratch, because none of it requires any special knowledge to follow.

Setup

The report does not describe any accounts, roles or special tooling. The testing was done as an independent security researcher against public AT&T web endpoints, meaning pages anyone on the internet can reach. The only version number stated anywhere in the report is WordPress 4.5.1, on the networking exchange blog. The report does not describe the browser or any proxy used.

Finding it

Arbitrary code execution

The report describes this as a Remote Code Execution finding for the AT&T programme, and introduces the class first. Arbitrary code execution, also known as command injection, is a technique used via a web interface in order to execute OS commands on a web server. The user supplies operating system commands through a web interface in order to execute OS commands. Any web interface that is not properly sanitised is subject to this exploit. With the ability to execute OS commands, the user can upload malicious programs or even obtain passwords. OS command injection is preventable when security is emphasized during the design and development of applications.

To unpack that: a web server is the computer that sits behind a website and answers your browser's requests. An operating system (OS) is the software that runs on that computer, the thing that lets you list files, copy them, or start programs. A web interface is any form on a website that takes what you type and does something with it. Normally the website takes your text and treats it as text. Command injection happens when the website passes your text to the operating system as if it were an instruction. A simple comparison: imagine a form at a restaurant where you write your order, and the kitchen reads it out loud to the chef. If you write "one soup, and also unlock the back door", and the kitchen reads the whole line to the chef, the chef may do both. The website is meant to read only the order, not the extra instruction.

The report states that the issue found was straightforward and needs no explanation, and that an OS level command could be executed. No endpoint, parameter, payload or output is given for this finding, so there is nothing more to show here.

Clickjacking

The vulnerable URL is:

Text
https://www.teleconference.att.com/servlet/ATTClogin

This is a login page for AT&T's teleconference service. A URL is just the address of a page, the same thing you type into the address bar of a browser. The servlet/ATTClogin part is the name of the piece of server software that produces the page.

Clickjacking is a trick where an attacker puts a real website inside an invisible or disguised frame on their own page, so that when you click what looks like one thing, you are actually clicking a button on the real site. A comparison: someone places a transparent sheet over a cash machine keypad with the labels shifted, so you press what you think is "cancel" and actually press "withdraw".

The report says the X-FRAME-OPTIONS header is missing in the RTA application. A header is a small piece of information a web server sends alongside a page, before the page content itself. X-FRAME-OPTIONS is a header that tells the browser whether the page is allowed to be shown inside a frame (an iframe, a small window embedded in another page). When it is missing, the browser has no instruction to refuse, so the page can be loaded inside someone else's page. Because of that, it might be possible for a web page controlled by an attacker to load the content of this response within an iframe on the attacker's page. That may enable a clickjacking attack, in which the attacker's page overlays the target application's interface with a different interface provided by the attacker.

Cross-site scripting

The vulnerable application is:

Text
https://cprodmasx.att.com

The vulnerable parameter is controller.do?, and the payload used is:

Text
'-confirm(`1`)-'

A parameter is a named value you attach to a URL, usually after a question mark, like ?name=value. The server reads it and uses it to decide what to show. A payload is the piece of text an attacker sends in the hope that the server will treat it as code rather than as plain text.

Cross-site scripting, usually shortened to XSS, is the class of bug where a website takes something a visitor supplied and puts it into the page without cleaning it, so the visitor's browser runs it as code. A comparison: a noticeboard where anyone can pin a note. If the person who runs the board copies whatever is pinned onto the official letterhead without reading it, someone can pin a note that says "pay this person" and it will look official. The board is the website, the note is your input, and the letterhead is the trust the browser gives to that site.

The payload '-confirm(1)-' is JavaScript, the language browsers run. confirm is a built-in browser function that shows a small pop-up box with a message and an OK button. The backticks around 1 are just a way of writing the value 1 in JavaScript. The single quotes and dashes around it are there to break out of whatever text the page was already inside, so that the browser stops treating the payload as text and starts treating it as code. If the pop-up appears, the code ran.

WordPress SOME

The vulnerable URL is:

Text
https://networkingexchangeblog.att.com/wp-includes/js/plupload/plupload.flash.swf?target%g=alert&uid%g=hello&

WordPress is a popular system for running blogs. plupload.flash.swf is a file that helps upload files; the .swf ending means it is a Flash file, a format that older browsers ran with a plugin. Flash files can accept settings passed in the URL, called flashVars.

WordPress 4.5.1 is vulnerable against a Same-Origin Method Execution (SOME) vulnerability that stems from an insecure URL sanitisation process performed in the file plupload.flash.swf. The code in the file attempts to remove flashVars in case they have been set as GET parameters but fails to do so, enabling XSS via ExternalInterface.

To unpack that: an origin is the combination of scheme, host and port that a browser uses to decide which pages are allowed to talk to each other. Pages from the same origin can read each other's data; pages from different origins cannot. SOME is a way of getting a page to call a function on another page that shares its origin, which the attacker should not be able to do. Sanitisation means cleaning input before using it, for example stripping out anything dangerous. A GET parameter is a value attached to a URL, as above. ExternalInterface is the part of Flash that lets the Flash file call JavaScript on the page around it. So the file tried to strip out the settings passed in the URL, failed, and let those settings reach the JavaScript-calling part.

Exploitation

Step 1: Confirm the missing frame header

The first step is to request the login servlet and inspect the response headers. You do this by loading the page in a browser and opening the developer tools, or by using a tool that shows the raw response. The point is to check whether the server sends X-FRAME-OPTIONS at all. The report's finding is that X-FRAME-OPTIONS is absent from the response of the RTA application, so the page can be framed by a third-party origin. Without that header, the browser will happily draw the page inside a frame on any other site.

Step 2: Frame the login page

The proof of concept is the following page, which loads the servlet inside a 500 by 500 iframe:

Line by line:

  1. <html> opens the document. Every web page is wrapped in this tag.
  2. <head> opens the section that holds information about the page rather than visible content.
  3. <title>cj</title> sets the text shown in the browser tab. cj is short for clickjacking.
  4. </head> closes the head section.
  5. <body> opens the part of the page the visitor actually sees.
  6. <iframe src=”https://www.teleconference.att.com/servlet/ATTClogin" width=”500" height=”500"></iframe> is the important line. An iframe is a window inside a page that loads another page. The src attribute says which page to load, here the vulnerable login servlet. width and height set the size of that window to 500 by 500 pixels, which keeps the framed login form visible and usable.
  7. </body> and </html> close the page.

The src points at the vulnerable servlet, framed at 500 by 500. An attacker could host this page and lure a victim to it, potentially overlaying the genuine AT&T interface with attacker-controlled content.

Step 3: Deliver the XSS payload through the login controller

The vulnerable URL as reported is:

Text
https://cprodmasx.att.com/commonLogin/igate_wam/controller.do?TAM_OP=login&USERNAME=unauthenticated&ERROR_CODE=0x00000000&ERROR_TEXT=HPDBA0521ISuccessfulcompletion&METHOD=GET&URL=/crsdmn?tucd567=https://messages.att.net/'-confirm(`1`)-'&REFERE

Line by line, the parts after the question mark are parameters separated by &:

  1. TAM_OP=login tells the controller that the operation is a login.
  2. USERNAME=unauthenticated says the user is not logged in.
  3. ERROR_CODE=0x00000000 is an error code, here all zeros.
  4. ERROR_TEXT=HPDBA0521ISuccessfulcompletion is the matching error text.
  5. METHOD=GET says the request method is GET, the ordinary way a browser asks for a page.
  6. URL=/crsdmn?tucd567=https://messages.att.net/'-confirm(1)-' is the interesting one. It is a path on the same host, and it contains the payload.
  7. REFERE is the start of another parameter, cut off in the report.

The URL parameter's value is a path on the same host and contains the payload. Reflected means the server copies your input straight back into the HTML it sends. The payload '-confirm(1)-' is placed inside the URL value, after the tucd567 parameter. In other words, the browser believes the code came from AT&T's own site, so it trusts it fully.

Step 4: Trigger the SOME issue in plupload

Request the vulnerable URL:

Text
https://networkingexchangeblog.att.com/wp-includes/js/plupload/plupload.flash.swf?target%g=alert&uid%g=hello&

The report also gives a simple PoC form of the same URL:

Text
http://example.com//wp-includes/js/plupload/plupload.flash.swf?target%g=alert&uid%g=hello&

Line by line:

  1. target%g=alert sets a variable called target to the value alert. alert is a JavaScript function that shows a pop-up box with a message.
  2. uid%g=hello sets a variable called uid to the value hello.
  3. The trailing & is left over from the parameter list.

The parameters use %g in place of =, which is the syntax the Flash file parses for its variables. The target value is alert and the uid value is hello. Because the sanitisation in plupload.flash.swf fails to strip flashVars supplied as GET parameters, XSS via ExternalInterface is enabled. The report also gives this simple PoC form of the same URL.

Root cause

  • Clickjacking: the RTA application does not return an X-FRAME-OPTIONS response header, so the browser has no instruction to refuse framing and the login page renders inside an attacker's iframe.
  • XSS: the report gives the vulnerable URL and payload but does not describe the mechanism. As the report puts it, XSS occurs when a web application makes use of unvalidated or unencoded user input within the output it generates.
  • SOME: the insecure URL sanitisation in plupload.flash.swf attempts to remove flashVars when they have been set as GET parameters but fails, which allows XSS via ExternalInterface.

Impact

For the clickjacking issue, the attacker can trick a user into visiting a malicious page containing the vulnerable application inside the frame, and by inducing victim users to perform actions such as mouse clicks and keystrokes, the attacker can cause them to unwittingly carry out actions within the application that is being targeted. This technique allows the attacker to circumvent defences against cross-site request forgery, and may result in unauthorized actions. Cross-site request forgery is a related trick where a different site makes your browser send a request to a site you are logged into; clickjacking gets around the usual protections against it because the click really does happen on the real site.

For the XSS issue, by leveraging XSS an attacker does not target a victim directly. Instead, the attacker exploits a vulnerability within a website or web application that the victim would visit, essentially using the vulnerable website as a vehicle to deliver a malicious script to the victim's browser. In order for an XSS attack to take place the vulnerable website needs to directly include user input in its pages; an attacker can then insert a string that will be used within the web page and treated as code by the victim's browser.

For the command injection issue, the report states that with the ability to execute OS commands the user can upload malicious programs or even obtain passwords. No specific impact is claimed beyond that.

Fix

For the clickjacking issue the recommendation is that, to effectively prevent framing attacks, the application should return a response header with the name X-FRAME-OPTIONS.

Reward

Image for post
Image for post From the original on web.archive.org

Variants to test

  1. Frame-header checks on other servlets. Request login and account pages on sibling hosts and look at the response headers. A positive result is a 200 response with no X-FRAME-OPTIONS and no frame-ancestors in a CSP, confirmed by loading the page in an iframe from another origin. A CSP is a Content Security Policy, a header that lists what a page is allowed to load and do; frame-ancestors is the part of it that says who may frame the page.
  2. Reflection points in controller.do-style login handlers. Take any parameter that carries a return URL or path, such as URL, and place a string-breaking payload in it. A positive result is the payload executing in the target origin, for example a confirm dialog.
  3. %g parameter syntax on Flash and SWF endpoints. Append ?target%g=alert&uid%g=hello& to any .swf that accepts variables. A positive result is the supplied method being invoked in the hosting origin.
  4. WordPress versions around 4.5.1. Check wp-includes/js/plupload/plupload.flash.swf on other installations and compare the file against the fixed version. A positive result is the same flashVars handling behaviour on an unpatched copy.
  5. Command injection in web interfaces that shell out. Any feature that passes user input to an OS command is worth testing with a benign marker command. A positive result is the marker appearing in the output or in a side effect such as a created file.

Glossary

  • Bug bounty programme: a scheme where a company pays researchers for privately reporting security problems in its systems.
  • Remediated: fixed, in this case by the company that owns the systems.
  • 1Q18: the first quarter of 2018, January to March.
  • Endpoint: a specific address on a server that accepts requests, such as a particular page or script.
  • Web server: the computer and software that answer requests from browsers and send back web pages.
  • Operating system (OS): the software that runs a computer and lets programs list files, copy them and start other programs.
  • OS command: an instruction given to the operating system, such as a request to run a program.
  • Arbitrary code execution: getting a system to run code of your choosing.
  • Remote code execution: arbitrary code execution on a machine you are not sitting in front of.
  • Command injection: passing text to a program that then treats it as an operating system command.
  • Sanitisation: cleaning input before using it, for example removing characters that could be treated as code.
  • Web interface: any form or page on a website that takes input from a visitor.
  • URL: the address of a page or resource, as typed into a browser's address bar.
  • Servlet: a piece of server software that produces a page in response to a request.
  • Header: a small piece of information a server sends alongside a page, before the page content.
  • X-FRAME-OPTIONS: a response header that tells the browser whether a page may be shown inside a frame.
  • iframe: a window inside a web page that loads another page.
  • Frame: a page shown inside another page, usually through an iframe.
  • Clickjacking: tricking a visitor into clicking something on a real site by hiding it under a disguised interface.
  • Parameter: a named value attached to a URL, usually after a question mark.
  • GET parameter: a parameter sent as part of the URL in an ordinary page request.
  • Payload: the text an attacker sends hoping it will be treated as code.
  • Reflected: input that the server copies straight back into the page it sends.
  • JavaScript: the programming language that browsers run.
  • confirm: a browser function that shows a pop-up box with a message and an OK button.
  • Origin: the combination of scheme, host and port that a browser uses to decide which pages may talk to each other.
  • Same-Origin Method Execution (SOME): a way of getting a page to call a function on another page that shares its origin.
  • WordPress: a popular system for running blogs.
  • Flash / SWF: an older format for interactive content in browsers, run through a plugin; .swf is the file ending.
  • flashVars: settings passed into a Flash file, often through the URL.
  • ExternalInterface: the part of Flash that lets a Flash file call JavaScript on the page around it.
  • CSP (Content Security Policy): a header that lists what a page is allowed to load and do.
  • frame-ancestors: the part of a CSP that says which sites may frame the page.
  • Cross-site request forgery: a trick where another site makes your browser send a request to a site you are logged into.
  • Proof of concept (PoC): a small demonstration that a bug is real.
  • Proxy: a tool that sits between your browser and a server and lets you see and change the traffic.
  • Developer tools: the built-in panel in a browser that shows page source, network requests and responses.

More by Adesh Nandkishor kolte

View all

14 more disclosed reports, best first.

More from AT&T

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.