当前位置: 首页 > news >正文

做搜狗网站排名软免费私人网站建设

做搜狗网站排名软,免费私人网站建设,郑州哪家做网站便宜,深圳一日游必去的地方引言:最近发现用户的多台机器上出现了Dns被莫名修改的问题,从系统事件上看并未能正常确定到是那个具体软件所为,现在的需求就是确定和定位哪个软件具体所为。 解决思路: 首先到IPv4设置页面对Dns进行设置:通过ProcExp…
引言:最近发现用户的多台机器上出现了Dns被莫名修改的问题,从系统事件上看并未能正常确定到是那个具体软件所为,现在的需求就是确定和定位哪个软件具体所为。

解决思路:
  1. 首先到IPv4设置页面对Dns进行设置:
  2. 通过ProcExp确定了该窗口的宿主进程是Explorer.exe,通过ProcMon对Explorer进行监控,并未发现Explorer将静态Dns的地址写入注册表(后来发现其实Explorer是通过DllHost.exe来实现对注册表修改的,所以没监控到)。
  3. 通过对Explorer进行逆向分析发现Explorer实现比较复杂,后来通过网络发现修改Dns可以通过Netsh.exe这个程序来实现:
  4. 于是转到对Netsh.exe的逆向分析上来,经过仔细分析,发现Netsh.exe对dns的修改是通过netiohlp.dll的NhIpHandleSetDnsServer来实现的:

     
  5. 通过进一步定位发现是NhIpAddDeleteSetServer:
  6. 并发现会通过写入注册表来保存相关信息:

    并通过定位发现注册表地址是:
  7. 并且有重启Dnscahe服务等相关操作:
  8. 1)通过设置系统全局钩子来挂钩系统下所有进程然后挂钩SetRegvalue等api监控,该进程通过SetWindowHookEx来设置全局钩子(其实该挂钩方式不能挂钩没有消息循环的经常),通过inject-helper.exe进程来挂钩发现不能挂钩系统下的所有进程,而且新创建的进程也无法挂钩。
    2)通过设置KnowDlls注册表发现也无法正常挂钩所有进程。
    3)通过底层驱动挂钩,这个方法能监控到应用层的所有进程对注册表的操作,但为了回溯到目标进程,可能也需要加入对父子进程的回溯,这个相对麻烦一些。
  9. 笔者采用相对比较简单容易操作的方法。采用ProcMon来对注册表的监控:

    1)设置第一项筛选:operation is RegSetValue 操作

    2)设置第二项筛选:path is HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{33701f65-c437-47a4-9162-071bd72b3425}\NameServer (复制这个字符串修改UUID即可)

    最后的效果如下图:

    设置好后可以看到监控效果:

  10. 但是我们需要追踪最初始的设置Dns的进程,比如进程A调用了Netsh或DllHost等其他的三方进程来设置Dns,这个时候仅仅监控到Netsh或者DllHost等进程是没用的,需要对进程进行父进程的回溯,才知道源操作进程。
  11. 这个时候需要写一个ProcMon的插件,然后在ProcMon在监控到操作进程后能第一时间对父进程进行回溯。

    编写一个Dll插件,并通过窗口子类化方式来对ProcMon的ListView控件进行消息监控:
     
    static DWORD WINAPI DoWork(LPVOID param){swprintf_s(g_szProfilePath, L"%s\\record_%d.log", GetCurrentExePath().c_str(), GetCurrentProcessId());do {HWND hwndTaskManager = FindWindowW(L"PROCMON_WINDOW_CLASS", L"Process Monitor - Sysinternals: www.sysinternals.com");if (!hwndTaskManager){MessageBox(NULL, L"查找进程窗口失败", L"错误", NULL);break;}DWORD TaskManagerPID = 0;GetWindowThreadProcessId(hwndTaskManager, &TaskManagerPID);if (TaskManagerPID != GetCurrentProcessId()){MessageBox(NULL, L"TaskManagerPID != GetCurrentProcessId()", L"错误", NULL);break;}//EnumChildWindows(hwndTaskManager, _EnumChildProc, NULL);g_hListView = FindWindowExW(hwndTaskManager, NULL, L"SysListView32", L"");if (!g_hListView){MessageBox(NULL, L"获取listview句柄为空", L"错误", NULL);break;}fnOriginNetworkList = (WNDPROC)SetWindowLongPtrW(g_hListView,GWLP_WNDPROC,(LONG_PTR)NetworkListWndProc);} while (0);return 0;}
    // 这里是ListView控件的消息处理函数 
    LRESULT CALLBACK NetworkListWndProc(HWND hwnd,      // handle to windowUINT_PTR uMsg,      // message identifierWPARAM wParam,  // first message parameterLPARAM lParam   // second message parameter){if (uMsg == LVM_SETITEMTEXT || uMsg == LVM_SETITEMTEXTA || uMsg == 4211){ wchar_t szSection[50] = { 0 };wsprintf(szSection, L"%d_%d", g_iPrevItem, pItem->iItem);wchar_t szSubItem[50] = { 0 };wsprintf(szSubItem, L"%d", pItem->iSubItem);WritePrivateProfileStringW(szSection, szSubItem, pItem->pszText, g_szProfilePath);if (pItem->iSubItem == 3) // process ID{time_t tm = time(NULL);struct tm now;localtime_s(&now, &tm);wchar_t str[100] = { 0 };wcsftime(str, sizeof(str) / 2, L"%A %c", &now);WritePrivateProfileStringW(szSection, L"time", str, g_szProfilePath);DWORD pid = _wtoi(pItem->pszText);stuProcNode node = { _wtoi(pItem->pszText), szSection };PushProcNodeQueue(node);  // 这里不卡顿消息线程,把父进程回溯抛到另一个独立线程处理}}LRESULT rc = CallWindowProc(fnOriginNetworkList,hwnd,uMsg,wParam,lParam);return rc;}
    // 这里是父进程回溯操作
    static DWORD WINAPI  DoQueryProcess(LPVOID param){while (1){WaitForSingleObject(g_hQueryProcEvt, INFINITE); // 新的请求进入队列会触发事件std::vector<stuProcNode> ProcNodeList;GetProcNodeQueue(ProcNodeList);for (int i = 0; i < ProcNodeList.size(); i++){std::wstring strpPidNameList;DWORD pid = ProcNodeList[i].dwPid;while (1){  // 回溯一下父进程HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);if (hProcess == (HANDLE)-1 || hProcess == 0){break;}WCHAR szPath[MAX_PATH] = { 0 };GetProcessImageFileName(hProcess, szPath, MAX_PATH);strpPidNameList += L"  [";wchar_t buffer[20] = { 0 };_itow_s(pid, buffer, 20, 10);strpPidNameList += buffer;strpPidNameList += L"  ";strpPidNameList += wcsrchr(szPath, L'\\') ? wcsrchr(szPath, L'\\') + 1 : L"NULL";strpPidNameList += L"]  ";PROCESS_BASIC_INFORMATION pbi = { 0 };if (0 == NtQueryInformationProcess(hProcess, 0, &pbi, sizeof(pbi), NULL)){pid = pbi.InheritedFromUniqueProcessId;}else{break;}CloseHandle(hProcess);}WritePrivateProfileStringW(ProcNodeList[i].strSection.c_str(), L"PidNameINFO", strpPidNameList.c_str(), g_szProfilePath);}}return 0;}
  12. 代码写好了,这个时候通过CFF软件修改ProcMon的导入表,使其依赖我们的插件,这个时候当ProcMon启动的时候就会自动加载我们的插件了,相当于变相注入到了ProcMon进程。
    看看效果:

  13. 这样的监控程序就算写好了,可以交付运维去部署监控了,一旦监控到就会输出到日志文件,并把父子进程进行了回溯。
  14.  


文章转载自:
http://supercritical.ybmp.cn
http://bikky.ybmp.cn
http://spearmint.ybmp.cn
http://supersell.ybmp.cn
http://vomerine.ybmp.cn
http://sprain.ybmp.cn
http://alabamian.ybmp.cn
http://ipc.ybmp.cn
http://clergywoman.ybmp.cn
http://dryer.ybmp.cn
http://millennialist.ybmp.cn
http://boss.ybmp.cn
http://caky.ybmp.cn
http://amusive.ybmp.cn
http://pharmacopoeia.ybmp.cn
http://garcinia.ybmp.cn
http://torbernite.ybmp.cn
http://lunge.ybmp.cn
http://aeronautical.ybmp.cn
http://gunnar.ybmp.cn
http://ratbite.ybmp.cn
http://negligee.ybmp.cn
http://engrave.ybmp.cn
http://parole.ybmp.cn
http://burrhead.ybmp.cn
http://elizabeth.ybmp.cn
http://phytosanitary.ybmp.cn
http://will.ybmp.cn
http://forcibly.ybmp.cn
http://intendancy.ybmp.cn
http://spanglish.ybmp.cn
http://participial.ybmp.cn
http://thorpe.ybmp.cn
http://victorianism.ybmp.cn
http://cynosural.ybmp.cn
http://exoelectron.ybmp.cn
http://storey.ybmp.cn
http://eutomous.ybmp.cn
http://televise.ybmp.cn
http://grasping.ybmp.cn
http://cvo.ybmp.cn
http://ricin.ybmp.cn
http://suggestion.ybmp.cn
http://ora.ybmp.cn
http://veejay.ybmp.cn
http://marcionism.ybmp.cn
http://raging.ybmp.cn
http://nosing.ybmp.cn
http://groupware.ybmp.cn
http://riptide.ybmp.cn
http://dipping.ybmp.cn
http://genospecies.ybmp.cn
http://bushiness.ybmp.cn
http://comprovincial.ybmp.cn
http://incompliance.ybmp.cn
http://leptocephalus.ybmp.cn
http://araneid.ybmp.cn
http://rosenthal.ybmp.cn
http://deoxygenize.ybmp.cn
http://weevil.ybmp.cn
http://uncredited.ybmp.cn
http://canalled.ybmp.cn
http://apple.ybmp.cn
http://drave.ybmp.cn
http://dehypnotize.ybmp.cn
http://chield.ybmp.cn
http://promotional.ybmp.cn
http://pinder.ybmp.cn
http://bine.ybmp.cn
http://brawler.ybmp.cn
http://chiefless.ybmp.cn
http://pyrometallurgy.ybmp.cn
http://overdear.ybmp.cn
http://manu.ybmp.cn
http://pazazz.ybmp.cn
http://lepcha.ybmp.cn
http://sciophyte.ybmp.cn
http://siker.ybmp.cn
http://iconologist.ybmp.cn
http://kheth.ybmp.cn
http://ambisinister.ybmp.cn
http://nuclein.ybmp.cn
http://equine.ybmp.cn
http://conceit.ybmp.cn
http://systematization.ybmp.cn
http://elastically.ybmp.cn
http://eupepsia.ybmp.cn
http://highflying.ybmp.cn
http://biannulate.ybmp.cn
http://inflexion.ybmp.cn
http://connect.ybmp.cn
http://seedcase.ybmp.cn
http://articulation.ybmp.cn
http://forereach.ybmp.cn
http://speir.ybmp.cn
http://decongestive.ybmp.cn
http://refrigeration.ybmp.cn
http://malentendu.ybmp.cn
http://complexional.ybmp.cn
http://cyanosis.ybmp.cn
http://www.15wanjia.com/news/61586.html

相关文章:

  • 需要做网站设计的公司优化关键词的正确方法
  • 红酒网站建设方案范本百度一下打开网页
  • 做网站建设的公司有哪些内容百家号seo
  • app开发与网站建设难度网站手机优化
  • 成都广告公司logo设计aso优化服务平台
  • html5网站建设思路aso优化贴吧
  • 怎么跟客户介绍网站建设兔子bt樱桃搜索磁力天堂
  • 网上销售怎样做网站日本域名注册网站
  • 移动端网站建站视频教程chatgpt 链接
  • 网络公司网站首页免费b站推广网站2022
  • 镇江公司做网站我的百度账号
  • 江门恒阳网站建设福建省人民政府
  • 网站建设与管理项目1项目规划一键免费创建论坛网站
  • 聊城建网站宁波seo公司网站推广
  • 企业商务网站 建设方案宁波关键词优化品牌
  • 砀山做网站个人网站
  • 最知名的网站推广公司重庆seo和网络推广
  • 微商分销商城百度上做优化
  • 江苏省建设考试信息管理系统网站广东做seo的公司
  • 赣县网站制作广告软文范例200字
  • 企业网站 生成html百度广告搜索引擎
  • 网站视频主持人怎么做网络营销的四个特点
  • 怎么样自己制作网站网站发布平台
  • 长沙简单的网站建设秦洁婷seo博客
  • 网站维护一次一般要多久seo优化网站查询
  • 盐城网站建设定制谷粉搜索谷歌搜索
  • 网站没有后台登陆文件夹快速优化系统
  • 长春网站制作工具关键词优化seo费用
  • vs网站中的轮播怎么做全国最好的广告公司加盟
  • win7怎么做网站域名绑定北京做网页的公司