(论文:字数:17564页数: 45带程序)摘 要:随着计算机科学的发展,Sniffer(嗅探器)技术在网络中的应用越来越广泛。Sniffer在网络管理、维护、安全方面发挥了重要作用。本文研究了一种基于Sniffer思想的电子邮件监控程序,可以使在共享式局域网中传输的电子邮件受到监控。管理人员可以根据这些信息进行必要的管理。 该电子邮件监控程序的主要功能是监听共享式以太网中网关或某台主机的网络流量,从中提取电子邮件的原始信息并转存为文件。 本文主要内容如下:介绍Sniffer一些背景技术;介绍电子邮件相关协议和编码技术;介绍WinPcap及相关技术;电子邮件分析、提取的技术;阐述了程序的设计思路、结构及相关技术。
关键词:嗅探器,电子邮件,WinPcap,包捕获
Abstract :With the development of computer science, Sniffer technology is widely used in network. Sniffer plays an important part in network manage, maintenance and security field. I developed an Email monitor program, it can monitor the Email that transmit in shared LAN. Administrator could use the infomation to manage the network. The main function of the Email monitor program is that monitors the information of gateway or host transmit in shared LAN, and picks up the original infomation of Email and saves as file. The main content of this paper are : introduces the background technology of the Sniffer; introduces the protocols and encode technology of the Email; introduces the WinPcap; the technology of analyzing and picking Email; expatiates the design, framework and some other technologies of the program.
Keywords:Sniffer; Email; WinPcap; Packet Capture
目 录 1 绪论 …………………………………………………………………………… (1) 2 涉及技术现状及介绍 ………………………………………………………… (1) 2.1 .Net简介 ………………………………………………………………… (1) 2.2 电子邮件相关技术介绍 ………………………………………………… (2) 2.2.1 POP3协议简介 ………………………………………………… (2) 2.2.2 SMTP协议简介 ………………………………………………… (2) 2.2.3 电子邮件中的TCP序号 ……………………………………… (3) 2.2.4 电子邮件的编码 ……………………………………………… (7) 2.3 WinPcap简介 …………………………………………………………… (9) 2.4 NDIS简介 …………………………………………………………………(10) 3 设计的具体实现 ………………………………………………………………(11) 3.1 软件的工作环境 …………………………………………………………(11) 3.2 软件实现的功能 …………………………………………………………(11) 3.3 使用的工具 ………………………………………………………………(12) 3.4 如何使用软件 ……………………………………………………………(12) 3.5 软件的整体结构 …………………………………………………………(13) 3.6 捕获网络封包 ……………………………………………………………(15) 3.7 分析网络封包中的邮件 ………………………………………………(17) 3.7.1 特征位 …………………………………………………………(17) 3.7.2 分析SMTP系列封包 ………………………………………… (17) 3.7.3 分析POP3系列封包 ………………………………………… (19) 3.8 分析、提取邮件的实现方法 ……………………………………………(20) 3.8.1 二次过滤法 ……………………………………………………(21) 3.8.2 失败的方法 ……………………………………………………(23) 3.9 GUI ……………………………………………………………………… (24) 3.9.1 GUI主要窗体 ………………………………………………… (24) 3.9.2 GUI主要技术 ………………………………………………… (26) 3.9.3 缺陷 ………………………………………………………………(27) 3.10 Win32控制台程序分析 …………………………………………………(28) 3.10.1 dev.exe ……………………………………………………………(28) 3.10.2 sn.exe …………………………………………………………… (29) 3.10.3 listip.exe ……………………………………………………… (30) 3.10.4 pickmail.exe …………………………………………………… (32) 3.10.5 base64.exe ……………………………………………………… (35) 4 展望 ……………………………………………………………………………(38) 4.1 可能的改进及发展空间 …………………………………………………(38) 4.2 应用前景 …………………………………………………………………(38) 致谢 ………………………………………………………………………………(39) 参考文献 …………………………………………………………………………(39) 附录A …………………………………………………………………………… (40)
1 绪论 本毕业论文(设计)是电子邮件监控软件。其功能是捕获共享式以太网中经电子邮件客户端发送的电子邮件并转存为文件,以达到监控在局域网(若非特别指出,本文所提及的局域网均指以太网)中传输的电子邮件的内容的目的。因其本质是一个Sniffer(嗅探器)类软件,所以我将其命名为1Nut Sniffer。在我的网站www.openai.com上有下载。 1Nut Sniffer是基于WinPcap 3.1beta4开发包,使用C语言编写核心的。其本质功能是按照用户的需求捕获网络封包并分析、提取所需的信息。在本设计中,1Nut Sniffer的主要功能是监控共享式以太网中的网络流量,从中提取电子邮件的原始信息并转存为文件。它只能起到监听的作用,并不能阻塞网络流量。在监听电子邮件时,有4种工作方式:1、监听SMTP和POP3协议的Email;2、监听SMTP协议的Email;3、监听POP3协议的Email;4、监听所有网络流量。 需要说明的是,1Nut Sniffer并不能进行实时分析处理,它目前只能按照先监听、捕获网络封包,再分析处理的流程工作。 另外,1Nut Sniffer提供了一个工作在Win32控制台方式下的BASE64编码/解码器,可以进行1500个字符的编码和2000个字符的解码工作。

|