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

WP Weekly 191 - Essentials - Duplicate in Core, White Label Kadence, Studio for Mac

Monday, April 29, 2024

Read on Website WP Weekly 191 / Essentials It seems many essential features are being covered in-house, be it the upcoming duplicate posts/pages feature in the WordPress core or the launch of Studio

SRE Weekly Issue #422

Monday, April 29, 2024

View on sreweekly.com A message from our sponsor, FireHydrant: FireHydrant is now AI-powered for faster, smarter incidents! Power up your incidents with auto-generated real-time summaries,

Quick question

Sunday, April 28, 2024

I want to learn how I can better serve you ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Kotlin Weekly #404 (NOT FOUND)

Sunday, April 28, 2024

ISSUE #404 28st of April 2024 Announcements Kotlin Multiplatform State of the Art Survey 2024 Help to shape and understand the Kotlin Multiplatform Ecosystem! It takes 4 minutes to fill this survey.

📲 Why Is It Called Bluetooth? — Check Out This AI Text to Song Generator

Sunday, April 28, 2024

Also: What to Know About Emulating Games on iPhone, and More! How-To Geek Logo April 28, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your

Daily Coding Problem: Problem #1425 [Easy]

Sunday, April 28, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Microsoft. Suppose an arithmetic expression is given as a binary tree. Each leaf is an

PD#571 Software Design Principles I Learned the Hard Way

Sunday, April 28, 2024

If there's two sources of truth, one is probably wrong. And yes, please repeat yourself. ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

When Procrastination is Productive & Ghost integrating with ActivityPub

Sunday, April 28, 2024

Automattic, Texts, and Beeper join forces to build world's best inbox, Reflect launches its iOS app, how to start small rituals, and a lot more in this week's issue of Creativerly. Creativerly

C#503 Building pipelines with System.Threading.Channels

Sunday, April 28, 2024

Concurrent programming challenges can be effectively addressed using channels ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

RD#453 Get your codebase ready for React 19

Sunday, April 28, 2024

Is your app ready for what's coming up in React 19's release ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌