Dank Writeup On Broken Access Control On An Indian Startup

Divyanshu Shukla
Nov 30, 2019 · 5 min read

This writeup is about a critical broken access control along with unrestricted file upload on the server. This company had a bug bounty program for a very long time. I challenged myself to find bugs in the main application which was already tested multiple times. Here due to non-disclosure policy, the application server is considered as an example.com

This issue was acknowledged but it was neither rewarded nor any further feedback was provided with absolutely no hall of fame.


There was a support page which allowed the creation of tickets by the user and allowed to upload a screenshot for the same which will be viewed by customer support executive. So it was possible to create a ticket from any user due to broken access control and upload file by bypassing an extension check on image. Since this page is used as feedback and support form, any support executive may open if it has malware or ransomware.
Uploaded files represent a significant risk to applications when it is .exe or .ps1 file which can be used to upload malware but due to the content-disposition as an attachment, it was not possible to execute the file.


The impact of this vulnerability is high since any malicious entity can create a ticket on the behalf of other user and enter any details which may cause failure in solving customer issues as well as once the ticket is open, user cannot create a new ticket for 10 hours due to restriction on multiple ticket creation.
It is important to check a file upload module’s access controls to check the risks properly. Once uploaded, the attacker only needs to find a way to get the code executed to which it can send the malicious file inside the ticket itself since the ticket creation is controlled by an attacker it can paste the link as a customer care executive and any user while checking false ticket may download and execute that file.
Also the attachment it downloadable so it can be used to share malicious content from a valid website and can be used in phishing emails to download an attachment from valid example.com servers

File upload functionality is for attaching screenshots for customer support executive but due to failure in restricting file upload along with ticket creation due to broken access control makes it vulnerable to malicious malware execution once downloaded and it is possible that malware may spread across the network and to the clients. Also if any user can create ticket for other user causes loss of integrity and availability of customer support.

Vulnerable URL:

API call: https://api.example.com/p/account/tickets/v3/tickets

Steps to Reproduce:

  1. Visit https://www.example.com/help/support
  2. Select category like services, asking to answer a few questions before the last request is sent.
  3. Select the right answer and then select no to get customer support chat window.
  4. Type malicious content or post the malicious link for malicious URLs and attach any .exe or .dmg or .ps1 file.
  5. Hit submit and intercept the request. Change the value of email and cell which can be easily brute-forced for any existing user.


POST /p/account/tickets/v3/tickets HTTP/1.1
Host: api.example.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://www.example.com/
Authorization: .f6r2tgfc5lvfou2krbdubk
Content-Type: multipart/form-data; boundary= — — — — — — — — — — — — — -163405244814986157001545857884
Content-Length: 6096
Origin: https://www.example.com/
DNT: 1
Connection: close

— — — — — — — — — — — — — — -1634051111111111545857884
Content-Disposition: form-data; name=”category”

— — — — — — — — — — — — — — -1634051111111111545857884
Content-Disposition: form-data; name=”cell”

— — — — — — — — — — — — — — -1634051111111111545857884
Content-Disposition: form-data; name=”email”

— — — — — — — — — — — — — — -1634051111111111545857884
Content-Disposition: form-data; name=”quesHistory”

[{“key”:”initialiserView”,”value”:”{\”greetings\”:\”XXXX from XXXXX\”,\”hi\”:\”Hi YYYY!\”,\”question\”:\”Are you facing problem with any of these services ?\”,\”problem\”:\”What are the problems you are facing\”}”},{“key”:”questionView”,”value”:”Are you facing problem with any of these services ?”},{“key”:”userView”,”value”:”XXXXXX”},{“key”:”questionView”,”value”:”Select the query we can help you with !”},{“key”:”userView”,”value”:”How can I download my xxxxxxx ?”},{“key”:”answerView”,”value”:”{\”answerTextBody\”:\”1. Click on the ‘xxxx’ option on the xxxxx. \\n2.,{“key”:”userView”,”value”:”no it did not solve my query
— — — — — — — — — — — — — — -1634051111111111545857884
Content-Disposition: form-data; name=”mild”

— — — — — — — — — — — — — — -1634051111111111545857884
Content-Disposition: form-data; name=”ticketstate”

— — — — — — — — — — — — — — -1634051111111111545857884
Content-Disposition: form-data; name=”query”

— — — — — — — — — — — — — — -1634051111111111545857884
Content-Disposition: form-data; name=”resolve”

— — — — — — — — — — — — — — -1634051111111111545857884
Content-Disposition: form-data; name=”attachments”; filename=”SHELL.EXE”
Content-Type: image/png


/î@ IiCCPICC ProfileH‰•WXSÉž[RIhH ½‰Ò«”Z©‚JŒ AÄ⬂k°¡«”Š®µ¢®uì®å¡,*+ëbÁ†Ê›X×ýÞ{ß;ß7÷þ9sÎJæÞ;€N-O*ÍCuȗÈ”CY“ÓÒY¤n€hS`ÌãË¥ìøøeøþwysZC¹æ¢äúçü=PΉ‡8S
— — — — — — — — — — — — — — -1634051111111111545857884 —

Image for post
Post request to customer support
Image for post
Malicious File uploaded via Post request

6. Since it is an attachment section for an image but due to no validation check, we can upload any file. Uploaded non-malicious Eicar file.

7. Submit the request and check the victim’s account the account has been created.

8. Now to download that file or make it downloadable we need valid session so we can host any website and upload the content and give the link as example.com app/download to make it phishing page and making users download.
Thus abusing the nature of this vulnerability.

Image for post
File download by changing the value of chat id


For Broken Access control, one much put role-based authentication and confirm both server and client while creating a ticket.

Only allow specific file extensions by using both client-side and server-side validation. Only allow authorized and authenticated users to use the feature. Check any file fetched from the web for content.

Bug Bounty Tip:

Always check for file uploads at customer support or help page where there are chances to send attachments or upload any kind of data for interacting to customer support. By this trick, I was able to find misconfigured s3 bucket in Amazon.



Note: File uploaded is Eicar file which is a harmless file with sha256sum :

InfoSec Write-ups

A collection of write-ups from the best hackers in the…

Sign up for Infosec Writeups

By InfoSec Write-ups

Newsletter from Infosec Writeups Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Divyanshu Shukla

Written by

Security Engineer | Threat Hunter | DevSecops | Linux Administrator

InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. In a nutshell, we are the largest InfoSec publication on Medium. Maintained by Hackrew

Divyanshu Shukla

Written by

Security Engineer | Threat Hunter | DevSecops | Linux Administrator

InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. In a nutshell, we are the largest InfoSec publication on Medium. Maintained by Hackrew

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store