
Some APIs may have permissive CORS settings, encouraging websites to make requests to an API – such as AWS – but as they are credentialed, a common method employed by website owners is to employ JavaScript that contains the credentials necessary. Many are not accidents, nor are they in “observable text blocks”, the developer says, but are actually in active use by JavaScript on a page when APIs allow CORS. Flip the scriptĪccording to Ayrey, many of today’s SaaS applications are built in a way that “encourages frontend applications to contain keys in their JavaScript”. This time around, Ayrey told The Daily Swig that he worked with HackerOne and a few select researchers in an early beta to clean up “low-hanging fruit” ahead of public release, and the extension was prompted by the need to examine cross-origin resource sharing ( CORS) security flaws – an area the researcher says “has not been explored much”. The developer allegedly responsible for the accidental leaks was fined and jailed by the Chinese government. Read more about the latest open source hacking tools However, it proved controversial after it was used by a member of the drone hacking community to discover leaks in drone developer DJI’s enterprise GitHub repository. The original TruffleHog tool was originally released back in 2017 as a git repository scanner. In a video describing the extension, Mike Ruth, infrastructure security engineer at Bex, said that such keys could be utilized to “access something we shouldn’t”.Īyrey was able to find one such secret – an AWS key that was buried in the code of the front page of, a domain that has received over 740 million visitors in the past six months.

The cybersecurity firm’s co-founder, Dylan Ayrey, said in a blog post dated September 19 that often, API Keys for software-as-a-service (SaaS) and cloud providers are making their way into JavaScript, and so the company is “proud” to offer a Chrome extension able to find them. The open source extension, now available on GitHub, is called TruffleHog and is the work of Truffle Security. Here’s how to find themĪ new Chrome browser extension has been released to help bug bounty hunters find keys that have made their way into JavaScript online. API keys are accidentally being leaked by websites.
