1 / 7

14 장 Code review (MS 21 장 )

14 장 Code review (MS 21 장 ). 2009.6. 신수정. 1. Code review. Text search search for hard-coded strings 2. XSS Input 을 출력하는 code 정의 잠재적으로 위험한 HTML tags 와 attributes 정의 URL 을 다루는 code 정의 Output 이 encoded 되었는지 점검 정확한 character encoding 에 대한 점검 validRequest attribute 점검

Download Presentation

14 장 Code review (MS 21 장 )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 14장 Code review (MS 21장) 2009.6 신수정

  2. 1. Code review • Text search • search for hard-coded strings 2. XSS • Input을 출력하는 code 정의 • 잠재적으로 위험한 HTML tags와 attributes 정의 • URL을 다루는 code 정의 • Output이 encoded 되었는지 점검 • 정확한 character encoding에 대한 점검 • validRequest attribute 점검 • HttpOnly cookie option 점검 • <frame> security attribute 점검 • innerText 와 innerHTMP properties 사용 점검

  3. 1. Code review 3. SQL injection • DB를 접근하는 code 찾기 • Code가 parameterized stored procedure를 사용하는지 점검 • Code가 SQL statement에서 parameter를 사용하는지 체크 • Code가 input을 filter하려 시도하는지 체크 4. Buffer overflow • Unmanaged code에 대한 call을 locate • Unmanaged APIs에 전달되는 string parameter 점검 • File path length 점검 • Output string 점검 • Array bound 점검 • Unmanaged code가 /GS switch로 컴파일되었는지 점검

  4. 1. Code review 5. Managed code • Class 설계가 안전한가? • Thread를 생성하는가? • Serialization을 사용하는가? • Reflection을 사용하는가? • 예외를 다루는가? • 암호화를 사용하는가? • Secrete를 저장하는가? • Delegates를 사용하는가? 6. Code access security • Partial-trust caller를 지원하는가? • Public type과 members에 대한 접근을 제한하는가? • Declarative security를 사용하는가? • Assert를 call하는가? • Permission demand를 사용하는가? • Link demand를 사용하는가? • Deny or PermitOnly를 사용하는가? • 특별히 위험한 permission을 사용하는가? • /unsafe option을 가지고 compile 하는가?

  5. 1. Code review 7. Unmanaged code • Unmanaged code permission을 assert하는가? • SuppressUnmanagedCodeAttribute를 사용하는가? • Unmanaged entry point가 공개적으로 visible한가? • Buffer overflow에 대해 guard하는가? • Enumerated type을 range check하는가? • Unmanaged code method에 대한 naming convention을 사용하는가? • 잠재적으로 위험한 API를 call하는가? 8. ASP.NET pages and controls • 세부 에러 메시지를 disable하는가? • Tracing을 disable하는가? • Form field input를 validate하는가? • XSS 공격에 취약한가? • Query string과 cookie input을 validate하는가? • 보안을 위해 HTTP header에 의존하는가? • view state를 안전케 하는가? • XSS를 방지하는가? • Global.asx event handler를 안전케하는가? • 적절한 authorization을 제공하는가?

  6. 1. Code review 9. 웹 서비스 • 제한된 운영이나 데이터를 expose하는가? • 어떻게 caller를 autjorize하는가? • 권한 운영을 제한하는가? • Custom 인증을 사용하는가? • 모든 입력을 validate하는가? • SOAP Header를 validate하는가? 10. Serviced components • Assembly level metadata을 사용하는가? • 익명 접근을 금지하는가? • 제한된 impersonation level을 사용하는가? • Role-based security를 사용하는가? • Method level 허가를 사용하는가? • Object constructor string을 사용하는가? • Middle tier를 audit하는가?

  7. 1. Code review 11. remoting • Object를 parameter로 전달하는가? • Custom 인증과 principal object를 사용하는가? • 어떻게 proxy credentials을 configure하는가? 12. Data access code • SQL injection을 금하는가? • 윈도우 인증을 사용하는가? • 데이터베이스 connection string을 안전케하는가? • Unauthorized code를 어떻게 제한하는가? • DB의 민감한 데이터를 어떻게 안전하게 하는가? • ADO.NET 예외를 다루는가? • Database connection을 close하는가?

More Related