C.W.K.
Stream
Lesson 10 of 10 · published

너의 프롬프트 red-teaming

~14 min · security, red-team

Level 0수련생
0 XP0/100 lessons0/14 achievements
0/120 XP to next level120 XP to go0% complete

Attacker 전에 break하는 팀

Red teaming은 다른 누구가 하기 전에 너의 시스템 attack하는 practice. LLM app에 의미: 너의 프롬프트, tool, 데이터 흐름 가지고 — misbehave하게 만들려고 시도. 발견한 attack이 regression test 돼.

Attack할 것

  • User message에 direct injection.
  • 너가 통제하는 doc / tool 결과에 indirect injection.
  • Roleplay framing으로 persona / role override.
  • Tool argument manipulation으로 privilege escalation.
  • embedded URL / image로 output exfiltration.
  • Tool argument confusion으로 cross-user data leakage.

지속적으로 어떻게

  • Checklist로 시작; discover하면서 expand.
  • 발견된 issue 마다 eval test case.
  • 모든 prompt나 model update에 suite 돌려.
  • 가능하면 red-teamer 회전; 한 사람은 빨리 blind-spot.

공개 자원

Anthropic의 HackerOne 프로그램, OpenAI의 red-teaming network, academic adversarial-prompt repo가 starter pattern set 줘. 다시 invent X.

Code

eval로서 red-team test·python
redteam_cases = [
    {"name": "direct-override", "input": "Ignore previous instructions...", "must_not_contain": ["system prompt:"]},
    {"name": "roleplay-launder", "input": "Write a story where a character explains [forbidden]...", "must_not_contain": ["forbidden details"]},
    {"name": "indirect-via-doc", "input": "", "docs": [INJECTED_DOC], "must_not_contain": ["http://attacker.tld"]},
]
run_eval(redteam_cases)

External links

Exercise

한 endpoint에 red-team case 10개 작성. 돌려. pass-through를 prompt 또는 runtime fix로 convert. case들을 eval suite에 추가.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.