Hacking Apps for Unlimited Trial Periods

Listen to this Post

Here’s a fun report I recently reviewed in one of the Bug Bounty programs I manage (redacted for obvious reasons):

App X integrates with an external payment provider Y. App X allows users to sign up for a maximum of a 30-day trial period before they have to start paying. This value can’t be changed in the user interface, but it can be changed directly in the HTTP request to 90, 120, and even 1000 days.

  • Payment provider trusts the data coming from App X.
  • App’s backend trusts the data coming from App’s frontend.
  • Hacker gets 2 years of free services. 🙂

Places in infrastructure where services integrate and pass information to each other are prone to vulnerabilities. It’s not uncommon that each service assumes that the other one performed the security checks and input can be trusted. “Where everyone is responsible, no one is really responsible.”

Practice Verified Codes and Commands:

1. Intercepting HTTP Requests with Burp Suite:

  • Configure your browser to use Burp Suite as a proxy.
  • Intercept the HTTP request containing the trial period value.
  • Modify the value in the request (e.g., from `30` to 1000).
  • Forward the modified request to the server.

2. Using cURL to Manipulate HTTP Requests:

curl -X POST -d 'trial_period=1000' https://appx.com/api/signup

3. Automating with Python:

import requests

url = "https://appx.com/api/signup"
payload = {"trial_period": 1000}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.json())

4. Linux Command to Monitor Network Traffic:

sudo tcpdump -i eth0 -s 0 -w output.pcap

5. Windows Command to Check Network Connections:

netstat -an | find "ESTABLISHED"

What Undercode Say:

In the realm of cybersecurity, the importance of validating and sanitizing inputs cannot be overstated. The scenario described in the article highlights a common vulnerability where trust between integrated services is exploited. This is a classic example of a “trust boundary” issue, where data is assumed to be valid without proper verification.

To mitigate such vulnerabilities, developers should implement strict input validation and ensure that all data passing between services is verified. Additionally, security checks should be performed at every layer of the application stack, not just at the frontend or backend.

Here are some additional commands and practices to enhance security:

1. Linux Command to Check for Open Ports:

sudo nmap -sS -O 192.168.1.1

2. Windows Command to List Running Services:

sc query

3. Linux Command to Check for Rootkits:

sudo rkhunter --check

4. Windows Command to Check for Malware:

mrt

5. Linux Command to Monitor System Logs:

sudo tail -f /var/log/syslog

6. Windows Command to Check Firewall Status:

netsh advfirewall show allprofiles
  1. Linux Command to Check for Unauthorized SUID/SGID Files:
    sudo find / -perm -4000 -o -perm -2000
    

  2. Windows Command to Check for Unauthorized Scheduled Tasks:

    schtasks /query /fo LIST /v
    

  3. Linux Command to Check for Unauthorized Cron Jobs:

    crontab -l
    

  4. Windows Command to Check for Unauthorized Startup Programs:

    wmic startup get caption,command
    

By implementing these practices and commands, you can significantly reduce the risk of vulnerabilities in your infrastructure. Always remember, in cybersecurity, trust should be verified, not assumed.

For further reading on securing web applications, consider the following resources:
OWASP Top Ten Project
Burp Suite Documentation
Nmap Network Scanning

Stay vigilant, and always validate your inputs!

References:

initially reported by: https://www.linkedin.com/posts/aaandrei_%F0%9D%90%87%F0%9D%90%9A%F0%9D%90%9C%F0%9D%90%A4%F0%9D%90%A2%F0%9D%90%A7%F0%9D%90%A0-%F0%9D%90%9A%F0%9D%90%A9%F0%9D%90%A9%F0%9D%90%AC-%F0%9D%90%9F%F0%9D%90%A8%F0%9D%90%AB-%F0%9D%90%AE%F0%9D%90%A7%F0%9D%90%A5%F0%9D%90%A2%F0%9D%90%A6-activity-7302237910391513088-zHtW – Hackers Feeds
Extra Hub:
Undercode AIFeatured Image