낙서장

웹개발보안Rule

kenu허광남 2005. 6. 20. 19:09

웹개발보안Rule

  1. Do not underestimate the power of the dark side
    (어둠의 세력을 과소평가하지 마라.)
  2. Use POST requests when actions have side effects
    (부작용을 고려해서 POST 리퀘스트를 사용할 것.)
  3. In a server-side context, there's no such thing as client-side security
    (서버측 관점에서 본다면, 클라이언트쪽 보안같은 것은 없다.)
  4. Never use the Referer header for authentication or authorization
    (절대로 리퍼러 헤더를 사용해서 인증과 권한을 부여하지 말 것)
  5. Always generate a new session ID once the user logs in
    (사용자 로그인시 매번 새롭게 세션ID를 생성할 것.)
  6. Never pass detailed error messages to the client
    (절대로 구체적인 에러메시지를 클라이언트쪽으로 보내지 말 것)
  7. Identify every possible metacharacter to a subsystem
    (서브시스템으로 보내지는 모든 가능한 메타정보는 확인할 것)
  8. Always handle metacharacters when passing data to subsystems
    (서브시스템으로 보내지는 데이터는 매번 메타정보를 이용할 것)
  9. When possible, pass data separate from control information
    (가능하다면 제어정보와 데이터는 분리해서 보낼 것)
  10. Watch out for Multi-level Interpretation
    (멀티레벨 인터프리테이션(해석)을 주의할 것)
  11. Strive for "Defense in Depth"
    ("깊이있는 방어"에 전력하라)
  12. Don't blindly trust the API documentation
    (맹목적으로 API 문서를 신뢰하지 마라)
  13. Identify all sources of input to the application
    (어플리케이션에 들어오는 모든 입력의 원천을 확인하라)
  14. Pay attention to the invisible security barrier: validate all input, always
    (보이지 않는 보안 장벽에 주의를 기울이라: 모든 입력을 언제나 검증하라)
  15. When filtering, use whitelisting rather than blacklisting
    (필터링할 때, 블랙리스트보다는 화이트리스트를 사용하라)
  16. Do not massage invalid input to make it valid
    (잘못된 입력을 유효한 입력으로 만들지 마라)
  17. Create application-level logs
    (어플리케이션-레벨 로그를 남겨라)
  18. Never use client-side scripts for security
    (보안을 위해서 클라이언트쪽 스크립트를 절대로 쓰지마라)
  19. When possible, use data indirection for server-generated input
    (가능하다면 서버에서 생성된 입력을 위해 데이터 데이터 속임을 사용하라)
  20. Pass as little internal state information as possible to the client
    (가능한한 클라이언트쪽에 넘기는 내부 상태 정보를 최소화하라)
  21. Do not assume that requests will come in a certain order
    (리퀘스트가 예상된 순서로 들어올것이라고 가정하지 마라)
  22. Filter all data before including them in a web page, no matter what the origin
    (근원이 어디이든 상관없이, 웹페이지에 데이터를 표시하기 전에 항상 모든 데이터를 필터링하라)
  23. Stick to existing cryptographic algorithms, do not create your own
    (현존하는 암호화 알고리즘을 적극적으로 이용하고, 섯불리 암호화 알고리즘을 만들어서 쓰지마라)
  24. Never store clear-text passwords
    (절대로 암호화되지 않은 상태로 패스워드를 저장하지 마라.\)
  25. Never use GET for secret data, including session IDs
    (세션ID를 포함해서,절대로 비밀 데이터를 위해 GET방식을 사용하지 마라)
  26. Assume that server-side code is available to attackers
    (서버쪽 코드가 공격자에게 노출될 수 있음을 감안하라.)
  27. Security is not a product; it's a process
    (보안은 제품이 아니다;프로세스이다)

from innocent code

from: http://www.okjsp.pe.kr/jspwiki/Wiki.jsp?page=Security