上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 52 下一页
摘要: Medium Level 思路与Low级别是一样的,只是生成 token 的函数放到另外的 js 文件中了。 首先我们输入success,点击submit,页面返回“Invalid token.” 抓包发现,请求中的token值为空,所以我们需要构造正确的token。 查看前端源代码,发现生成tok 阅读全文
posted @ 2020-05-06 17:26 zhengna 阅读(433) 评论(0) 推荐(0)
摘要: Low Level 查看页面 点击submit,发现页面返回“You got the phrase wrong.”。页面提示需要我们提交单词success。 尝试将输入框单词改为success,点击submit,后台返回“Invalid token.” F12查看前端源代码,发现token是在前端生 阅读全文
posted @ 2020-05-06 17:24 zhengna 阅读(1196) 评论(0) 推荐(1)
摘要: Impossible Level 查看源码 impossible.php <?php $headerCSP = "Content-Security-Policy: script-src 'self';"; header($headerCSP); ?> <?php if (isset ($_POST[ 阅读全文
posted @ 2020-05-06 17:22 zhengna 阅读(361) 评论(0) 推荐(0)
摘要: High Level 查看源码 high.php <?php $headerCSP = "Content-Security-Policy: script-src 'self';"; header($headerCSP); ?> <?php if (isset ($_POST['include'])) 阅读全文
posted @ 2020-05-06 17:21 zhengna 阅读(454) 评论(0) 推荐(0)
摘要: Medium Level 查看代码 <?php $headerCSP = "Content-Security-Policy: script-src 'self' 'unsafe-inline' 'nonce-TmV2ZXIgZ29pbmcgdG8gZ2l2ZSB5b3UgdXA=';"; heade 阅读全文
posted @ 2020-05-06 17:20 zhengna 阅读(384) 评论(0) 推荐(0)
摘要: CSP Content-Security-Policy是指HTTP返回报文头中的标签,浏览器会根据标签中的内容,判断哪些资源可以加载或执行。翻译为中文就是内容安全策略。是为了缓解潜在的跨站脚本问题(XSS),浏览器的扩展程序系统引入了内容安全策略这个概念。原来应对XSS攻击时,主要采用函数过滤、转义 阅读全文
posted @ 2020-05-06 17:19 zhengna 阅读(887) 评论(0) 推荐(0)
摘要: Impossible Level 查看源码 <?php if( isset( $_POST[ 'btnSign' ] ) ) { // Check Anti-CSRF token checkToken( $_REQUEST[ 'user_token' ], $_SESSION[ 'session_t 阅读全文
posted @ 2020-05-06 17:17 zhengna 阅读(429) 评论(0) 推荐(0)
摘要: High Level 查看源码 <?php if( isset( $_POST[ 'btnSign' ] ) ) { // Get input $message = trim( $_POST[ 'mtxMessage' ] ); $name = trim( $_POST[ 'txtName' ] ) 阅读全文
posted @ 2020-05-06 17:16 zhengna 阅读(405) 评论(0) 推荐(0)
摘要: Medium Level 查看代码 <?php if( isset( $_POST[ 'btnSign' ] ) ) { // Get input $message = trim( $_POST[ 'mtxMessage' ] ); $name = trim( $_POST[ 'txtName' ] 阅读全文
posted @ 2020-05-06 17:15 zhengna 阅读(476) 评论(0) 推荐(0)
摘要: Low Level 查看代码 <?php if( isset( $_POST[ 'btnSign' ] ) ) { // Get input $message = trim( $_POST[ 'mtxMessage' ] ); $name = trim( $_POST[ 'txtName' ] ); 阅读全文
posted @ 2020-05-06 17:13 zhengna 阅读(343) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 52 下一页