day959

一定要过滤单引号!

跳转后逻辑未结束漏洞(success跳转函数加exit)

跨站请求伪造(CSRF)漏洞(检查Referer字段)

 

检测到目标URL存在HTTP HOST头攻击漏洞

解决办法:修改nginx.conf

例子:

server {
  listen 80 default;
  server_name _;
  location / {
    return 403;
  }
}

在目标站点的配置文件还可以增加

if ($http_Host !~* ^www.test.com$)
{
return 403;
}

 

参考资料:https://www.freesion.com/article/18441013466/

 

检测到目标主机可能存在 PHP multipart/form-data 远程DOS漏洞

解决办法:./upgrade_php.sh,升级到5.4.41

 

隐藏X-Powered-By
修改 php.ini 文件 设置 expose_php = Off

 

修改nginx的http响应头server字段

进入nginx的安装目录,修改src/http/ngx_http_header_filter_module.c

内容:
static char ngx_http_server_string[] = "Server: nginx" CRLF;
static char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF;
更改为:
static char ngx_http_server_string[] = "Server: X-Web" CRLF;
static char ngx_http_server_full_string[] = "Server:X-Web " CRLF;

编译安装:
[root@localhost nginx-1.8.1]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module
[root@localhost nginx-1.8.1]# make && make install

 

检测到会话cookie中缺少HttpOnly属性

解决办法:修改/usr/local/php/etc/php.ini,设置session.cookie_httponly = 1

 

 禁用OPTIONS不安全方法

解决办法:在站点配置文件加入代码

if ($request_method !~* GET|POST) {
return 403;
}

 

#会话 Cookie 中缺少 secure 属性

#解决办法:修改/usr/local/php/etc/php.ini,设置session.cookie_secure = 1

加入这个后,session无效

设置了secure属性的cookie只能用https协议发送给服务器, 如果网站是http的,会导致服务器无法接收到带有secure属性的cookie的值

 

点击劫持:X-Frame-Options未配置

解决办法:在/usr/local/nginx/conf/nginx.conf中http区域加上add_header X-Frame-Options SAMEORIGIN;

 

检测到目标站点存在javascript框架库漏洞

解决办法:使用最新的jquery版本

 

curl -I -X GET http://XXXXXXXXXXXXXXX

隐藏响应的server,X-Powered-By

隐藏X-Powered-By
修改 php.ini 文件 设置 expose_php = Off

Thinkphp 修改Library/Think/View.class.php中header(\'X-Powered-By:ThinkPHP\');

修改nginx.conf 在http里面设置

server_tokens off;

 

404页面不起作用

在/usr/local/nginx/conf/nginx.conf加上 fastcgi_intercept_errors on;

 

HTTP 响应头 X-Content-Type-Options 缺失漏洞

add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

 

分类:

技术点:

相关文章: