오류 수정
본문
안녕하세요 해당 부분들 오류 수정해달라는 요청을 받았는데 어떻게 해야하는건가요? 구글링 해봐도 감이 안잡혀요 어디에 작성을 해야하는건가요???
1. X-Content-Type-Options is not nosniff
Browsers may interpret files as a different MIME type than what is specified in the Content-Type HTTP header. This can lead to MIME confusion
attacks.
Expected Headers > x-content-type-options: nosniff
Actual [not set]
First detected Sep 8, 2023
2. HTTP Strict Transport Security (HSTS) not enforced
Without HSTS enforced, people browsing this site are more susceptible to man-in-the-middle attacks. The server should be configured to support
HSTS.
Expected Headers > strict-transport-security: [header set]
Actual [not set]
First detected Sep 8, 2023
3. HttpOnly cookies not used
When HttpOnly cookies are not used, the cookies can be accessed on the client, which enables certain type of client-side attacks. The website
configuration should be changed to enforce HttpOnly cookies.
Expected Headers: [all set-cookie headers include 'httponly']
Actual Set-Cookie: PHPSESSID, Set-Cookie: 2a0d2363701f23f8a75028924a3af643, Set-Cookie: PHPSESSID
First detected Sep 8, 2023
4. Secure cookies not used
When secure cookies are not used, there is an increased risk of third parties intercepting information contained in these cookies. The website
configuration should be changed so that all 'Set-Cookie' headers include 'secure'.
Expected Headers: [all set-cookie headers include 'secure']
Actual Set-Cookie: PHPSESSID, Set-Cookie: 2a0d2363701f23f8a75028924a3af643, Set-Cookie: PHPSESSID
First detected Sep 8, 2023
5. Server information header exposed
Exposing information about the server version increases the ability of attackers to exploit certain vulnerabilities. The website configuration should be
changed to prevent version information being revealed in the 'server' header.
Expected Headers > server: [does not contain version number]
Actual IIS/2.2.31 (CentOS)
First detected Sep 8, 2023
6. X-Frame-Options is not deny or sameorigin
Browsers may display this website's content in frames. This can lead to clickjacking attacks.
Expected Headers > x-frame-options: [deny or sameorigin]
Actual [not set]
First detected Sep 8, 2023
7. CSP is not implemented
No valid Content Security Policy is implemented. This increases the risk of XSS and clickjacking attacks.
Expected Headers > content-security-policy: [valid policy]
Actual [not set]
First detected Sep 8, 2023
답변 2
간단히 설명드리면 다음과 같습니다. 참고하셔서 수정 하시면 될것 같습니다.
X-Content-Type-Options를 nosniff로 설정:
웹 서버 설정 또는 웹 애플리케이션 코드에서 X-Content-Type-Options 헤더를 nosniff로 설정
HSTS를 강제로 설정:
웹 서버 설정에서 Strict-Transport-Security 헤더를 설정 이 헤더는 HTTPS를 통해만 연결할 수 있도록 브라우저에 지시함
HttpOnly 쿠키 사용:
쿠키를 생성할 때 HttpOnly 플래그를 설정하도록 애플리케이션 코드를 수정
보안 쿠키 사용:
모든 'Set-Cookie' 헤더에 secure 속성을 추가하도록 애플리케이션 코드를 수정
서버 정보 숨김:
웹 서버 설정에서 서버 정보를 숨기도록 구성 웹 서버에 따라 설정 방법이 다를 수 있음
X-Frame-Options를 DENY 또는 SAMEORIGIN으로 설정:
웹 서버 설정에서 X-Frame-Options 헤더를 DENY 또는 SAMEORIGIN으로 설정
CSP 구현:
Content-Security-Policy 헤더를 설정하여 CSP를 구현함 이 정책은 웹 애플리케이션의 보안 요구 사항에 따라 맞추어야 함
헤더파일에 메타 태그 외 관련부분을 점검해보세요 모두 보안 성에 관련 노출 문제가 발생 하는것 같습니다.