Issue 131: API vulnerabilities at John Deere, Springfox, JWT lab, AutoGraphQL 🔎

The Latest API Security News, Vulnerabilities and Best Practices
Issue: #131
API vulnerabilities at John Deere, Springfox, JWT lab, AutoGraphQL
This week, we check out the recent API vulnerability in John Deere farming machinery, the best practices in using Springfox annotations for API security, a new JWT penetration testing lab, and AutoGraphQL  – a tool for GraphQL authorization testing.
Vulnerability: John Deere
 

John Deere is one of the leading manufacturers of expensive farming equipment, such as tractors and combine harvesters. Many of these are automated to the highest degree and cost millions of dollars.

Researchers found a few vulnerabilities in the APIs behind the web and mobile applications for the machinery. John Deere has since fixed the found vulnerabilities.

The first vulnerability allowed attackers to look up usernames. The researchers found that as they were creating the username in the John Deere Account Portal, the interface kept making API calls to check if the username existed. There seemed to be no authentication and no rate-limiting in place. A quick script iterating the names of Fortune 1000 companies found 192 company usernames in the system:

while IFS=, read -r COMPANY JUNK; do
TRIMMED_COMPANY="$(tr -dc "[:alnum:]" <<< "${COMPANY}")"
echo "${TRIMMED_COMPANY}"
USERNAME="${TRIMMED_COMPANY}"
RESPONSE="$(curl 'https:// myjohndeere. deere. com/wps/PA_myjd_live/struts/validateUserName' -H 'User-Agent: Mozilla/5.0 (X11;
Linux i686; rv:60.0) Gecko/20100101 Firefox/60.0' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Accept-Language:
en-US,en;q=0.5' --compressed -H 'Content-Type: application/x-www-form-urlencoded' -H 'X-Requested-With: XMLHttpRequest' -H 'Origin:
https:// myjohndeere. deere. com' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Sec-GPC: 1' -H 'Pragma: no-cache' -H 'Cache-Control:
no-cache' --data-raw "userName=${USERNAME}")"
echo "${USERNAME}"$'\t'"${RESPONSE}" >> results.tsv
done < Fortune1000.csv

The second vulnerability was in the APIs behind John Deere Operations Center. The researchers could easily enroll for a developer account and get access to the portal. They looked at the API call for adding new equipment to the operations center and found out that the API responded with a whopping 5,800-character-long JSON.

John-Deere-VIN-API-1

The JSON contained lots of information about the equipment, including the owner’s name, physical address, equipment GUID, terminal remote access availability, and so on. The information was returned for any equipment regardless of the owner (and, interestingly, even the manufacturer if a non-Deere VIN was provided).

This is effectively a combination of:

It’s also worth noting that even with significant software and API use in their machines, at the time, John Deere seemed to be lacking a clearly defined process for reporting vulnerabilities and bugs in a safe and secure way, as attested by the complaints on the issue in our researchers’ report.

Lessons learned here:

  • Authentication is not enough. You need to also implement authorization checks for any resource access in your APIs. Rate limiting and other protections against enumeration and scripted attacks rarely go amiss, either.
  • Beware of your API responses. For any API, consider the actual use-case, the bare minimum of the information that you need from the API, and the risks of the data getting retrieved by malicious actors.
  • If software, web services, or APIs play any significant part in your products — especially if data classified as PII or sensitive is involved — do set up and clearly document a process how bugs — especially security bugs — can be safely reported.
Best Practices: Springfox annotations and OpenAPI
 

Spring is a popular framework in the world of Java development, especially for micro-services and thus API development. Spring uses annotations to programmatically mark chains of dependencies and define the behavior of the Spring framework.

And, even better, Spring annotations can actually make your APIs a lot more secure. I.e., they can automate generating machine and human-readable API definitions in JSON from Spring projects:

  • Springfox for generating API definitions that follow the OpenAPI Specification (OAS) v2
  • Springdoc for generating API definitions that follow the OAS v3

These annotations not only document the APIs, thus enable testing their security and behavior and protecting them, they also enable some automated data validation from Spring. Thus, adding the annotations to your Spring projects is time well spent.

Isabelle Mauny and Edgar Silva from 42Crunch have published a two-part blog post on this scenario:

If you work with Spring, definitely worth checking out.

Pentesting: JWT hacking challenges
 

JWT (JSON Web Token) vulnerabilities and attacks are a common topic in this newsletter. They are critical because JWT serves as the foundation for authentication in many modern OAuth and OpenID Connect APIs.

Ricardo J. Uviedo Garrido has created an open-source lab that you can use to see some of these vulnerabilities in action. The lab includes the following JWT signature attacks:

  • none
  • weak secret key
  • key confusion
  • key injection
  • JWKS spoofing
  • kid
Tools: AutoGraphQL
 

AutoGraphQL by Ron Chan makes it easier to test GraphQL APIs for authorization vulnerabilities. AutoGraphQL can detect both Broken Object-Level Authorization and Broken Function-Level Authorization, making it very useful as these are high on the OWASP API Security Top 10 list.

The process is quite straightforward:

  1. Read the introspection file.
  2. Pick the API calls that you want to test.
  3. Set user accounts to be used in the tests.
  4. Run the tool and check which calls succeeded and which failed, then see if these authorization tests were in line with what you expected.

Check out this video of the tool in action:

AutoGraphQL_video

 

 
 
Thanks for reading.

That's it for today. If you have any feedback or stories to share, simply reply to this email.

Please forward the newsletter to your friends and colleagues who might benefit from it.

 
42Crunch, Inc.   95 Third Street  2nd Floor  San Francisco  CA   94103   United States
You received this email because you are subscribed to API Security News from 42Crunch, Inc..

Update your email preferences to choose the types of emails you receive or Unsubscribe from all future emails  
 
 

Older messages

Issue 130: GitHub’s new token format, MindAPI, Kiterunner

Thursday, April 22, 2021

Hi, this week we look at API token best practices, and tools for API recon & pentesting APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #130 GitHub's new

Issue 129: Facebook and Clubhouse profiles scraped through APIs, Forrester’s “State of Application Security, 2021”📑

Monday, April 19, 2021

Hi, today we look at the huge API data leaks at Facebook and Clubhouse, Forrester's APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #129 Facebook and

Issue 128: API flaws at VMware and GitLab, URL parameters and SSRF, webinar on recent breaches 🎬

Thursday, April 8, 2021

Hi, this week we look at a couple of recent API flaws, the dangers of URL parameters & APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #128 API flaws at

Issue 127: Hidden OAuth attack vectors, Methodology for BOLA/IDOR 🗝️

Thursday, April 1, 2021

Hi, this week we look at how a login API got breached for an code execution APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #127 Hidden OAuth attack vectors,

Issue 126: F5 iControl REST API under attack, Regexploit, Ford’s API security talk recording 🚗

Thursday, March 25, 2021

Hi, today we look at a couple of recent API vulnerabilities, a new regex analysis tool APIsecurity.io The Latest API Security News, Vulnerabilities and Best Practices Issue: #126 F5 iControl REST API

You Might Also Like

Data Science Weekly - Issue 579

Thursday, December 26, 2024

Curated news, articles and jobs related to Data Science, AI, & Machine Learning ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

💎 Issue 449 - JRuby with JBang

Thursday, December 26, 2024

This week's Awesome Ruby Newsletter Read this email on the Web The Awesome Ruby Newsletter Issue » 449 Release Date Dec 26, 2024 Your weekly report of the most popular Ruby news, articles and

💻 Issue 449 - JavaScript Benchmarking Is a Mess

Thursday, December 26, 2024

This week's Awesome JavaScript Weekly Read this email on the Web The Awesome JavaScript Weekly Issue » 449 Release Date Dec 26, 2024 Your weekly report of the most popular JavaScript news, articles

📱 Issue 443 - EU asks for views on plan to force Apple to open up iOS

Thursday, December 26, 2024

This week's Awesome iOS Weekly Read this email on the Web The Awesome iOS Weekly Issue » 443 Release Date Dec 26, 2024 Your weekly report of the most popular iOS news, articles and projects Popular

💻 Issue 442 - SOLID: The Liskov Substitution Principle (LSP) in C#

Thursday, December 26, 2024

This week's Awesome .NET Weekly Read this email on the Web The Awesome .NET Weekly Issue » 442 Release Date Dec 26, 2024 Your weekly report of the most popular .NET news, articles and projects

Daily Coding Problem: Problem #1649 [Easy]

Thursday, December 26, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Dropbox. Spreadsheets often use this alphabetical encoding for its columns: "A

JSK Daily for Dec 26, 2024

Thursday, December 26, 2024

JSK Daily for Dec 26, 2024 View this email in your browser A community curated daily e-mail of JavaScript news Performance Optimization in React Pivot Table with Data Compression The Syncfusion React

📱 Issue 446 - Fatbobman's Swift Weekly #063

Thursday, December 26, 2024

This week's Awesome Swift Weekly Read this email on the Web The Awesome Swift Weekly Issue » 446 Release Date Dec 26, 2024 Your weekly report of the most popular Swift news, articles and projects

💻 Issue 444 - Four limitations of Rust’s borrow checker

Thursday, December 26, 2024

This week's Awesome Rust Weekly Read this email on the Web The Awesome Rust Weekly Issue » 444 Release Date Dec 26, 2024 Your weekly report of the most popular Rust news, articles and projects

💻 Issue 367 - React 19: A New Era of Web Development

Thursday, December 26, 2024

This week's Awesome React Weekly Read this email on the Web The Awesome React Weekly Issue » 367 Release Date Dec 26, 2024 Your weekly report of the most popular React news, articles and projects