• SecurePath for Auto Dealers
  • Services
    • SOC Reporting Services
      • SOC 2® Readiness Assessment
      • SOC 2® Reports
      • SOC 3® Reports
      • SOC for Cybersecurity® Reports
    • IT Advisory Services
      • IT Vulnerability Assessment
      • Network Penetration Testing
      • Privileged Access Management
      • Social Engineering Testing
      • Virtual CISO (vCISO)
      • Written Information Security Program (“WISP”)
      • IT General Controls Audit & Compliance
    • IT Government Compliance
      • CMMC Cybersecurity Services & Compliance
      • DFARS Compliance
      • FTC Safeguards Compliance
  • Industries
    • Financial Services
    • Government
    • Auto Dealerships
    • Enterprise
  • Blog
  • About Us
    • Meet The Team
    • Jobs
  • Contact Us

Call us today! 844-OCD-TECH

Find our Location
OCD TechOCD Tech
  • SecurePath for Auto Dealers
  • Services
    • SOC Reporting Services
      • SOC 2® Readiness Assessment
      • SOC 2® Reports
      • SOC 3® Reports
      • SOC for Cybersecurity® Reports
    • IT Advisory Services
      • IT Vulnerability Assessment
      • Network Penetration Testing
      • Privileged Access Management
      • Social Engineering Testing
      • Virtual CISO (vCISO)
      • Written Information Security Program (“WISP”)
      • IT General Controls Audit & Compliance
    • IT Government Compliance
      • CMMC Cybersecurity Services & Compliance
      • DFARS Compliance
      • FTC Safeguards Compliance
  • Industries
    • Financial Services
    • Government
    • Auto Dealerships
    • Enterprise
  • Blog
  • About Us
    • Meet The Team
    • Jobs
  • Contact Us
OCD TECH XSS HUNTING USING GOOGLE DORKING

XSS Hunting using Google Dorking

June 22, 2023 Posted by Aedan (AT) Taylor IT Security

Summary

Generally, vulnerability scanning work is done by having a large database of vulnerabilities and checking them against a single host. However, picking one vulnerability and searching for indicators across many sites can be just as, if not more effective.

Methodology

While browsing Hackerone hacktivity, a stream of public vulnerability submissions by bug bounty hunters to participating companies, I found a public Reddit bounty for reflected cross site scripting, or XSS, on a URL redirect. The researcher set the URL parameter, “dest” to the payload:

javascript:alert(document.domain)

I was later able to exploit the same vulnerability on another company while manually testing.

OCD TECH. XSS SITE

 

Not wanting to stop at just one, I figured I’d search for it elsewhere, and set up a Google dork for the vulnerability. A dork is a search query, usually on Google, searching for specific attributes of a result. In this case, using “inurl” to find parameters referencing a URL was the plan. A Google search for:

inurl:”?dest=”

Returned very few relevant results. Many had Dest as the last name of an athlete, and many more had other uses of the word dest. Trying other URL redirect parameter names and filtering out unwanted results with negative searches yielded various endpoints which automatically take the browser to a page referenced in the URL, also called open redirects. Some of these redirects were only completed after an action such as a login, making automated testing much trickier than manual. The easiest way to test for an open redirect is to visit a page with a modified redirect parameter and see if the browser is redirected, but with login pages, credentials are first required. By prepending a minus (-) to a search query, Google will exclude results containing that query from the search.

OCD TECH GOOGLE DORKING REDIRECT TO

Of the functioning redirects, at least three were vulnerable to replacing the destination URL with the XSS payload. Many more may have also been vulnerable, but lots of available pages were login pages, and many of those didn’t have a signup endpoint.

Impact

XSS can result in a wide variety of malicious activity, including html injection, session hijacking and cookie theft, keylogging, and even browser-based cryptocurrency mining. Any of these can impact the safety and trust of a website, and some specialized attacks can even create worms on a site or take it down. All an attacker would have to do in this scenario is convince a user to click on a company owned link.

Open redirects, while somewhat lower priority, can still diminish trust in a domain. A user may click a link, recognizing the domain associated with the business, and be redirected to objectionable content or a phishing page controlled by an attacker. They’re also a fantastic way to rickroll your friends.

Mitigation

There are multiple ways to mitigate this vulnerability. Having an open redirect can already be a security risk, so limiting the redirect to only approved sites, or creating a lookup table of keys to sites can solve the problem. As always, sanitizing all user inputs against XSS, including all URL parameters, is recommended. This means angle brackets, but also other XSS indicators like parentheses and backticks. Prebuilt sanitization functions exist in many languages and setups. Setting a restrictive Content Security Policy, or CSP, is also recommended. This means configuring your server to only allow the browser to load and execute scripts from an allowlist of trusted sources. If a script manages to make its way to the browser maliciously, it will still be blocked if it doesn’t come from an approved source in the CSP.

Share
4
AEDAN TAYLOR. OCD TECH

About Aedan (AT) Taylor

AT is a penetration tester and cybersecurity researcher working on his Bachelors in Computing Security at Rochester Institute of Technology in New York. In his free time, he hunts for bug bounties, and plays chess, the piano, and roguelike video games.

You also might be interested in

“Four Years In – What have I learned?”

“Four Years In – What have I learned?”

Oct 5, 2022

By Jeff HarmsMy LinkedIn profile recently congratulated me for my[...]

Cybersecurity experience disclosure

SEC Proposed Rule Could Add Cybersecurity to the Boardroom

Mar 21, 2022

On March 9th, 2022, the Security and Exchanges Commission (SEC) issued several proposed amendments that could have a big impact on businesses.

Tools of our trade – a multi part series

Aug 17, 2016

IT Audit & Security testing is a hot topic lately. [...]

Find us on

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Send Message
OCD Tech logo Audit. Security. Assurance.

IT Audit | Cybersecurity | IT Assurance | IT Security Consultants – OCD Tech is a technology consulting firm serving the IT security and consulting needs of businesses in Boston (MA), Braintree (MA) and across New England. We primarily serve Fortune 500 companies including auto dealers, financial institutions, higher education, government contractors, and not-for-profit organizations with SOC 2 reporting, CMMC readiness, IT Security Audits, Penetration Testing and Vulnerability Assessments. We also provide dark web monitoring, DFARS compliance, and IT general controls review.

Contact Info

  • OCD Tech
  • 25 BHOP, Suite 407, Braintree MA, 02184
  • 844-623-8324
  • https://ocd-tech.com

Follow Us

Videos

Check Out the Latest Videos From OCD Tech!

Services

SOC Reporting Services
– SOC 2 ® Readiness Assessment
– SOC 2 ®
– SOC 3 ®
– SOC for Cybersecurity ®

IT Advisory Services
– IT Vulnerability Assessment
– Penetration Testing
– Privileged Access Management
– Social Engineering
– WISP
– General IT Controls Review

IT Government Compliance Services
– CMMC
– DFARS Compliance
– FTC Safeguards vCISO

Industries

  • Financial Services
  • Government
  • Enterprise
  • Auto Dealerships

© 2025 — OCD Tech: IT Audit - Cybersecurity - IT Assurance

  • OCD Tech
  • About Us
  • Contact Us
Prev Next