免费A级毛片无码专区网站-成人国产精品视频一区二区-啊 日出水了 用力乖乖在线-国产黑色丝袜在线观看下-天天操美女夜夜操美女-日韩网站在线观看中文字幕-AV高清hd片XXX国产-亚洲av中文字字幕乱码综合-搬开女人下面使劲插视频

某 .NET RabbitMQ SDK 有采集行為,你怎么看?

一:背景1.講故事前幾天有位朋友在微信上找到我,說他的一個程序上了生產(chǎn)之后,被運維監(jiān)控定位到這個程序會向一個網(wǎng)址為: http://m.365ey.net 上不定期打數(shù)據(jù),而且還是加密的格式,要他解釋到底是怎么回事?朋友說根本不認識這個網(wǎng)址,最后在恐慌中排查到是項目中引用了 DeveloperSharp.RabbitMQ 組件所致,截圖如下:

某 .NET RabbitMQ SDK 有采集行為,你怎么看?

文章插圖
朋友反編譯了下sdk源碼,發(fā)現(xiàn)都是混淆過的沒法看,聊的過程中朋友很恐慌,很焦慮,擔(dān)心生產(chǎn)的數(shù)據(jù)被泄漏,讓我?guī)兔聪率欠裼惺侄味ㄎ幌碌降锥疾杉耸裁磾?shù)據(jù)?
說實話,這種事情聽起來就很驚魂,情從肺腑出,方能入肺腑 。。。只要是一個正能量的人,這個忙肯定是盡最大可能的幫一下 。
二:WinDbg 分析1. 前置工作準備從 nuget 中把 DeveloperSharp.RabbitMQ 下載下來,寫好一個測試案例 。
internal class Program{static void Main(string[] args){for (int i = 0; i < int.MaxValue; i++){try{var queueName = "jk";var content = $" hello world! {i}";RabbitMQHelper.SendMessage(queueName, content);Console.WriteLine($"時間:{DateTime.Now}, i={i} 次處理!");}catch (Exception ex){Console.WriteLine(ex.Message);}finally{Thread.Sleep(1000);}}}}為了安全,我把程序放到虛擬機中,同時在 hosts 下給它設(shè)置個錯誤的 ip 地址 。
192.168.1.30 m.365ey.net接下來打開 Fiddler,再用 WinDbg TTD 的方式把程序啟動起來來記錄程序的全部行為,方便我后續(xù)分析,
某 .NET RabbitMQ SDK 有采集行為,你怎么看?

文章插圖
正如朋友所說,真的有采集行為:
  • http://m.365ey.net:13064/AssistLog.svc
  • http://m.365ey.net:13063/QueryLog.svc
2. 如何尋找請求代碼塊截獲請求的代碼很簡單,因為屏蔽了 IP,所以請求肯定會拋異常,我只需要用 sxe clr 攔截下 First Chance Exception 就能捕獲到調(diào)用代碼 。
0:013> sxe clr0:013> g(3398.3f7c): CLR exception - code e0434352 (first/second chance not available)First chance exceptions are reported before any exception handling.This exception may be expected and handled.Time Travel Position: 16D93B:0eax=079befe8 ebx=00000005 ecx=00000005 edx=00000000 esi=079bf0a8 edi=00000001eip=77207380 esp=079befe0 ebp=079bf040 iopl=0nv up ei pl nz ac pe nccs=0023ss=002bds=002bes=002bfs=0053gs=002befl=00000216ntdll!RtlRaiseException:77207380 55pushebp0:013> !clrstackOS Thread Id: 0x3f7c (13)Child SPIP Call Site079bf0fc 77207380 [HelperMethodFrame: 079bf0fc]079bf1ac 78861902 System.Net.HttpWebRequest.GetResponse() [f:\dd\NDP\fx\src\net\System\Net\HttpWebRequest.cs @ 2254]079bf1fc 0a5a2e89 System.ServiceModel.Channels.HttpChannelFactory`1+HttpRequestChannel+HttpChannelRequest[[System.__Canon, mscorlib]].WaitForReply(System.TimeSpan)079bf24c 0a5a1199 System.ServiceModel.Channels.RequestChannel.Request(System.ServiceModel.Channels.Message, System.TimeSpan)079bf2c0 0a5a1026 System.ServiceModel.Dispatcher.RequestChannelBinder.Request(System.ServiceModel.Channels.Message, System.TimeSpan)079bf2d0 0a5703f3 System.ServiceModel.Channels.ServiceChannel.Call(System.String, Boolean, System.ServiceModel.Dispatcher.ProxyOperationRuntime, System.Object[], System.Object[], System.TimeSpan)079bf3cc 0a57010d System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(System.Runtime.Remoting.Messaging.IMethodCallMessage, System.ServiceModel.Dispatcher.ProxyOperationRuntime)079bf3f8 0a56f79e System.ServiceModel.Channels.ServiceChannelProxy.Invoke(System.Runtime.Remoting.Messaging.IMessage)079bf438 7b224e24 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(System.Runtime.Remoting.Proxies.MessageData ByRef, Int32) [f:\dd\ndp\clr\src\BCL\system\runtime\remoting\realproxy.cs @ 823]079bf5d0 7a5df148 [TPMethodFrame: 079bf5d0] wfP8f24Vyfpc8suOyj.bBZbSsm9FOwaYWDWVc.Record1(System.String, System.String, System.String, System.String, System.String, System.String, System.String)079bf644 067c835f System.Base.ApplicationContext+c.b__19_0()079bf6b0 7b1dd4bb System.Threading.Tasks.Task.InnerInvoke() [f:\dd\ndp\clr\src\BCL\system\threading\Tasks\Task.cs @ 2884]...

經(jīng)驗總結(jié)擴展閱讀