解决利用SQLInjection遇到的500出错(转)
在SQL Injection脚本的时候.
输入:http://ip/abc.asp?id=1 and 1=1 返回文章.
http://ip/abc.asp?id=1 and 1=2 返回500内部服务器出错!
http://ip/abc.asp?id=1 一样返回500出错.
这个当然存在Sql Injection 漏洞. 但是我们无法了解他是用的什么数据库.
看这个图:

提交 and 1=1

提交 and 1=2
提交 Nclassid=1
好了大家都看到了吗?
我们还是有办法得到他的返回结果的。
用抓包工具可以看到他出错的信息。
我这里写了一个小程序专门来查看远程服务器返回的结果。
如图:

我们看到了返回的结果了吧!
这个程用DELPHI 6.0写的代码只有也很少基本上没有用到什么技术。
代码:
unit MainUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Psock, NMHttp, ExtCtrls, Buttons;
type
TMainForm = class(TForm)
ServerInfo: TMemo;
UrlET: TEdit;
NMHTTP1: TNMHTTP;
Label1: TLabel;
SourCodeBT: TSpeedButton;
Label2: TLabel;
Bevel1: TBevel;
Bevel2: TBevel;
procedure SourCodeBTClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
procedure TMainForm.SourCodeBTClick(Sender: TObject);
begin
IF Trim(UrlET.Text) = Then Exit;
Try
nmhttp1.Get(UrlEt.text);
ServerInfo.Text := nmhttp1.Body;
Except
End;
end;
end.
程序下载地址:
www.xren.net 搜索这个名字LookServerInfo
注:程序用的时候请把IE上的URL,COPY到程序中的URL输入框中.点击我要看代码就OK了
本文来自:http://www.linuxpk.com/30823.html-->linux电子图书免费下载和技术讨论基地·上一篇:怎么关闭受到的入侵端口·下一篇:在局域网中安装和设置防病毒服务器(6)
|
|
|
|
|
|
| 关于我们 | 联系方式 | 广告合作 | 诚聘英才 | 网站地图 | 网址大全 | 友情链接 | 免费注册 |
|
|
| Copyright © 2004 - 2007 All Rights Reserved
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/14102/viewspace-117494/
,如需转载,请注明出处,否则将追究法律责任。
|