999精品在线视频,手机成人午夜在线视频,久久不卡国产精品无码,中日无码在线观看,成人av手机在线观看,日韩精品亚洲一区中文字幕,亚洲av无码人妻,四虎国产在线观看 ?

一種基于前端JS的CSRF防護設計

2021-09-23 03:54:03鄭蘇寧
電腦知識與技術 2021年24期

鄭蘇寧

關鍵詞: 跨站請求偽造; 前端JS; 令牌; Web應用防火墻

Abstract:CSRF (Cross-Site Request Forgery) is a very popular Web attack method. At present, there are some problems in the universality and effectiveness of the solutions to protect CSRF, which can not achieve good protection effect. Therefore, a CSRF protection design based on JavaScript is proposed. By executing JS (JavaScript) files, the client can add and refresh cookie tokens or URL tokens for POST requests, making the attacker's malicious request unable to refresh the tokens and finally the attack fails. The design can be applied to Web application firewall to defend CSRF attack more effectively.

1 引言

跨站請求偽造[1](Cross-Site Request Forgery,CSRF)攻擊是一種常見的Web攻擊,容易在用戶不知情的情況下進行轉賬、修改密碼等各種敏感操作,造成巨大的危害。

2 基于前端JS的CSRF防護設計

2.1 CSRF攻擊及防御現狀

CSRF攻擊主要有標簽類GET請求、POST請求、鏈接類GET請求三種方式。標簽類GET請求攻擊是一種比較簡單的方式,常常利用惡意網頁的標簽src屬性發出GET請求,攻擊示例有