自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

QQ蠕蟲的行為檢測(cè)方法

安全 移動(dòng)安全
QQ蠕蟲是一種利用QQ等騰訊公司相關(guān)產(chǎn)品進(jìn)行傳播的一種特殊蠕蟲,該蠕蟲的基本原理是利用了QQ帳戶的快速登錄機(jī)制,只要當(dāng)前系統(tǒng)中有一個(gè)QQ帳戶成功登錄,就可以通過(guò)后臺(tái)接口實(shí)現(xiàn)該帳戶相關(guān)應(yīng)用的快速登錄而不需要再次輸入帳戶密碼。

QQ蠕蟲是一種利用QQ等騰訊公司相關(guān)產(chǎn)品進(jìn)行傳播的一種特殊蠕蟲,該蠕蟲的基本原理是利用了QQ帳戶的快速登錄機(jī)制,只要當(dāng)前系統(tǒng)中有一個(gè)QQ帳戶成功登錄,就可以通過(guò)后臺(tái)接口實(shí)現(xiàn)該帳戶相關(guān)應(yīng)用的快速登錄而不需要再次輸入帳戶密碼。登錄后蠕蟲可以訪問(wèn)QQ應(yīng)用的各種網(wǎng)絡(luò)接口,例如:通過(guò)接口實(shí)現(xiàn)加QQ好友、加入QQ群、發(fā)消息、發(fā)日志、發(fā)微博、上傳群共享文件等操作,且完全不需要用戶同意。借用這種技術(shù),QQ蠕蟲可以實(shí)現(xiàn)非??焖俚膫鞑?。這種蠕蟲誕生于QQ體系之上,其影響和傳播主要集中在國(guó)內(nèi)地區(qū),因此國(guó)外品牌的殺軟對(duì)這類蠕蟲識(shí)別和支持非常有限,國(guó)內(nèi)的殺軟品牌對(duì)該蠕蟲檢測(cè)也不是特別理想,從而導(dǎo)致了該QQ蠕蟲的傳播更加快速,影響范圍更廣。 

[[114765]]

基于以上信息,利用WinPcap技術(shù)抓取網(wǎng)絡(luò)數(shù)據(jù)包,對(duì)HTTP POST包進(jìn)行分析,過(guò)濾出對(duì)域名qq.com訪問(wèn)的數(shù)據(jù)包,但是由于WinPcap考慮到很多數(shù)據(jù)結(jié)構(gòu)需要自己封裝且第一階段比賽時(shí)間結(jié)束只有幾天,所以決定使用sharpPcap+C# 代替常用的WinPcap+VC來(lái)捕獲數(shù)據(jù)包。

實(shí)現(xiàn)基本思路

(1)經(jīng)典的HTTP請(qǐng)求方式:

  1. GET /somedir/page.html HTTP/1.1  
  2. Host:  www.someschool.edu  
  3. Connection: close  
  4. User-agent: Mozilla/4.0  
  5. Accept-language: fr 

(2)我們注意到HTTP請(qǐng)求報(bào)文中的第一行是以GET打頭的,它實(shí)際上是HTTP請(qǐng)求的一種方法,類似的還有POST、HEAD等等。一般熟知的大概就是GET和POST。

(3)利用這個(gè)我們就可以用 sharpPcap 技術(shù)抓取網(wǎng)絡(luò)數(shù)據(jù)包,在數(shù)據(jù)包中判斷TCP數(shù)據(jù)報(bào)文里是否保存了HTTP數(shù)據(jù)。如果有HTTP數(shù)據(jù)且是請(qǐng)求報(bào)文,就獲得了HTTP的 GET、POST 請(qǐng)求數(shù)據(jù)后進(jìn)行解析,數(shù)據(jù)的解析可以通過(guò)Content-Type分析數(shù)據(jù)格式,并按照相應(yīng)的解析方式進(jìn)行解碼,解碼過(guò)程中還有對(duì)于中文字符的處理等等。

部分功能實(shí)現(xiàn)

基于sharpPcap,C#寫的抓包程序源代碼

  1. using System;  
  2. using System.Collections.Generic;  
  3. using System.Linq;  
  4. using System.Text;  
  5. using SharpPcap;  
  6. namespace SharpPcapTest  
  7. {  
  8. class Program  
  9. {  
  10. static void Main(string[] args)  
  11. {  
  12. PacketArrivalForm packArrivalForm = new PacketArrivalForm();  
  13. packArrivalForm.ShowDialog();  
  14. FileOperate fileOperate = new FileOperate();  
  15. string ver = SharpPcap.Version.VersionString;  
  16. Console.WriteLine("SharpPcap {0}, Example1.IfList.cs", ver);  
  17. String strTemp = "SharpPcap" + ver + "\n";  
  18. fileOperate.wtiteToTxtFile(@".\123.txt", strTemp);  
  19. // Retrieve the device list  
  20. var devices = LivePcapDeviceList.Instance;  
  21. // If no devices were found print an error  
  22. if (devices.Count < 1)  
  23. {  
  24. Console.WriteLine("No devices were found on this machine");  
  25. return;  
  26. }  
  27. Console.WriteLine("\nThe following devices are available on this machine:");  
  28. Console.WriteLine("----------------------------------------------------\n");  
  29. /* Scan the list printing every entry */  
  30. /*獲取驅(qū)動(dòng)列表*/  
  31. foreach (var dev in devices)  
  32. {  
  33. //Console.WriteLine("{0}\n", dev.ToString());  
  34. fileOperate.wtiteToTxtFile(@".\123.txt", dev.ToString());  
  35. strTemp += dev.ToString();  
  36. }  
  37. //在對(duì)話框中顯示相關(guān)的設(shè)備信息  
  38. ShowForm showForm = new ShowForm();  
  39. showForm.setRichTextBoxStr(strTemp);  
  40. showForm.ShowDialog();  
  41. /*接收數(shù)據(jù)包時(shí)間等各種數(shù)據(jù)*/  
  42. int  i = int.Parse(Console.ReadLine());  
  43. LivePcapDevice device = devices[i];  
  44. // Register our handler function to the 'packet arrival' event  
  45. device.OnPacketArrival += new PacketArrivalEventHandler(device_OnPacketArrival);  
  46. // Open the device for capturing  
  47. int readTimeoutMilliseconds = 1000;  
  48. device.Open(DeviceMode.Promiscuous, readTimeoutMilliseconds);  
  49. Console.WriteLine();  
  50. Console.WriteLine("-- Listening on {0}, hit 'Enter' to stop...",device.Description);  
  51. strTemp = "Hour\tMinute\tSecond\tMillisecond\tlen\n";  
  52. fileOperate.wtiteToTxtFile(@".\data.txt", strTemp);  
  53. // Start the capturing process  
  54. device.StartCapture();  
  55. // Wait for 'Enter' from the user.  
  56. Console.ReadLine();  
  57. // Stop the capturing process  
  58. device.StopCapture();  
  59. Console.WriteLine("-- Capture stopped.");  
  60. // Print out the device statistics  
  61. Console.WriteLine(device.Statistics().ToString());  
  62. fileOperate.wtiteToTxtFile(@".\data.txt", device.Statistics().ToString());  
  63. Console.Write("Hit 'Enter' to exit...");  
  64. Console.ReadLine();  
  65. }  
  66. private static void device_OnPacketArrival(object sender, CaptureEventArgs e)  
  67.    
  68. {  
  69. FileOperate fileOperate = new FileOperate();  
  70. var time = e.Packet.Timeval.Date;  
  71. var len = e.Packet.Data.Length;  
  72. Console.WriteLine("{0}:{1}:{2},{3} Len={4}",time.Hour, time.Minute, time.Second, time.Millisecond, len);  
  73. string strTemp = time.Hour.ToString() + "\t" + time.Minute.ToString() + "\t" +  time.Second.ToString() + "\t" + time.Millisecond.ToString() + "\t\t" +  len.ToString() + "\n";  
  74. Console.WriteLine(e.Packet.ToString());  
  75. strTemp += "\n" + e.Packet.ToString() + "\n";  
  76. fileOperate.wtiteToTxtFile(@".\data.txt", strTemp);  
  77. }  
  78. }  

 設(shè)備信息截圖:

QQ蠕蟲的行為檢測(cè)方法 

QQ蠕蟲的行為檢測(cè)方法

獲取數(shù)據(jù)包數(shù)據(jù)截圖:

QQ蠕蟲的行為檢測(cè)方法

完整程序下載:http://pan.baidu.com/s/1i3vEX1r

責(zé)任編輯:藍(lán)雨淚 來(lái)源: 網(wǎng)絡(luò)安全攻防實(shí)驗(yàn)室
相關(guān)推薦

2010-07-20 10:26:50

2010-12-17 10:07:55

2010-02-03 16:13:37

2022-11-09 11:02:00

2016-09-02 09:14:26

2009-09-25 11:11:22

2013-04-27 13:33:33

2010-08-26 10:12:54

2012-06-15 09:41:40

Linux內(nèi)核

2010-09-14 15:34:29

sql server死

2021-07-28 09:53:53

FalconEye注入安全檢測(cè)

2025-02-12 08:00:00

AI機(jī)器學(xué)習(xí)學(xué)習(xí)模型

2023-07-07 06:48:18

2023-12-31 16:44:30

2010-11-16 13:40:52

Oracle命令行

2013-05-07 10:34:16

2019-12-19 14:54:10

工信部APP違規(guī)

2009-07-07 11:04:12

百變?nèi)湎x病毒卡巴斯基

2014-05-14 13:13:59

2010-02-04 16:14:56

Ubuntu QQ
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)