windows网络流量监控

摘要:
NPCap官方网站https://nmap.org/npcap/这是一个必须首先安装才能捕获包的工具。具体原因可以从https://github.com/buger/goreplay/wiki/Running-on-WindowsduetothenatureofdifferentnetworkinglayerofWindowsstack.Seehttps://github.com/buger/goreplay/

NPCap

官网 https://nmap.org/npcap/
这是抓包必须先安装的工具,具体的原因可以看 https://github.com/buger/goreplay/wiki/Running-on-Windows

due to the nature of different networking layer of Windows stack. See https://github.com/buger/goreplay/issues/440 for specific details.
By default, windows do not have loopback network driver, like Unix systems, and it has to be installed separately if you want to capture local traffic. 
One of the options is installing https://nmap.org/npcap/ or https://technet.microsoft.com/en-us/library/cc708322.aspx.

网络包抓取库在 Windows 下的版本。Npcap 采用 Microsoft Light-Weight Filter (NDIS 6 LWF) 技术和 Windows Filtering Platform (NDIS 6 WFP) 技术对当前最流行的 WinPcap 工具包进行改进。

  • 兼容性:Npcap兼容Windows 7,Windows 10,因为使用了最新的NDIS 6 Light-Weight Filter (LWF) API. 这比NDIS 5 API快并且后者随时可能被微软在新版本中废除. 另外此驱动由我们的EV证书和微软共同签名,兼容Windows 10 1607最严格的驱动签名要求.
  • 安全性:Npcap可以设置为只允许管理员抓包.
  • Loopback抓包:Npcap通过使用Windows Filtering Platform (WFP),可以探测loopback包(在本机lo网口上传输的应用数据) . 安装后Npcap将创建一个Npcap Loopback Adapter适配器. 如果您使用Wireshark,使用这个适配器抓包可以看见所有的loopback流量. 可以通过 “ping 127.0.0.1” (IPv4) or “ping ::1” (IPv6)进行测试.
  • Loopback包注入: Npcap is also able to send loopback packets using the Winsock Kernel (WSK) technique. User-level software such as Nping can just send the packets out using Npcap Loopback Adapter just like any other adapter. Npcap then does the magic of removing the packet's Ethernet header and injecting the payload into the Windows TCP/IP stack.
  • Libpcap API: Npcap uses the excellent Libpcap library, enabling Windows applications to use a portable packet capturing API that is also supported on Linux and Mac OS X. While WinPcap was based on LibPcap 1.0.0 from 2009, Npcap includes the latest Libpcap release along with improvements that we also contribute back upstream to Libpcap.
  • 兼容WinPcap: 对于未使用Npcap新特性的应,Npcap可以安装成“WinPcap兼容模式”,这将替换当前存在的WinPcap安装. 如果未选择此模式,Npcap将与WinPcap并存; applications which only know about WinPcap will continue using that, while other applications can choose to use the newer and faster Npcap driver instead.

NetCap

官网 https://docs.netcap.io/, https://github.com/dreadl0ck/netcap
功能

  • net.capture (capture audit records live or from dumpfiles)
  • net.dump (dump with audit records in various formats)
  • net.label (tool for creating labeled CSV datasets from netcap data)
  • net.collect (collection server for distributed collection)
  • net.agent (sensor agent for distributed collection)
  • net.proxy (http reverse proxy for capturing traffic from web services)
  • net.util (utility tool for validating audit records and converting timestamps)
  • net.export (exporter for prometheus metrics)

使用

# 列出网卡
getmac /fo csv /v
"Connection Name","Network Adapter","Physical Address","Transport Name"
"Wi-Fi","Intel(R) Dual Band Wireless-AC 7265","01-5E-01-CD-09-EC","DeviceTcpip_{D11E5516-717A-4369-6C95-15F6211513E6}"
"Ethernet","Intel(R) Ethernet Connection (3) I218-LM","34-1E-75-83-8F-63","Media disconnected"
...

# 查看帮助
net.capture.exe --help

# 监听,注意把Tcpip_改成NPF_
net.capture.exe -iface DeviceNPF_{D11E5516-717A-4369-6C95-15F6211513E6}

各个统计结果会分别打成tar包,解开后可以看到其中的记录,IPV4和TCP,UDP都有访问的IP记录

Windows的HTTP/HTTPS访问抓包

http://www.51testing.com/html/42/15142342-4462193.html
里面介绍的 Proxifier,是值得研究的对象

免责声明:文章转载自《windows网络流量监控》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇打造独特的ORM开发框架Discuz论坛密码加密方式详解下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

nginx反向代理+负载均衡+https

  A服务器(192.168.133.1)作为nginx代理服务器   B服务器(192.168.133.2)作为后端真实服务器 访问https://www.test.com请求从A服务器上反向代理到B服务器上 A服务器192.168.133.1的操作流程 1)编译安装nginx省略 2)配置nginx cd /usr/local/nginx/conf v...

Facebook应用程序权限请求以及数据获取

最近因工作需要研究了一下facebook的API调用. 虽然是一个不存在的网站,但也是工作内容的一部分,需要认真对待.既然对于咱们国人来说不存在,当然也就没有汉字可看了.英文文档让我头晕了好一阵子,吐了好几次之后终于摸清了脉络. 大致步骤是: 1、创建一个应用程序,可以获得App ID/API Key和App Secret。 2、使用URL: https:...

confluence的安装

参考链接:https://www.ilanni.com/?p=11989 一、什么是confluence confluence是一个专业的企业知识管理与协同软件,可以用于构建企业wiki。通过它可以实现团队成员之间的协作和知识共享。 网上有关confluence的教程比较多,这里,我主要以confluence5.6.6版本为例进行相关的实验。 二、环境装备...

Fiddler—APP抓包详解(十三)

第一步:Android手机代理设置: 手机和fiddler位于同一个局域网内: 1.首先从fiddler处获取到ip地址和端口号: ,点击online,最后一行就是ip地址 ,可以获知端口号为8888,同时将Allow remote computers to connet勾选上,允许远程设备连接 2.手机上填写代理: 代理主机名处填写刚才获取到的ip地址...

windows搭建ngnix图片服务器

一、配置http可以正常访问的图片服务器   先将图片放在一个文件夹下面   比如D:serverimg   下载一个nginx解压缩,打开nginx.conf文件   nginx默认端口号是80,先启动一下试试   打开cmd窗口,进入nginx.exe所在的目录下   执行命令start nginx.exe   通过任务管理器查询nginx是否运行  ...

DVWA(三):SQL injection 全等级SQL注入

(本文不定期更新) 一、所需环境: 1.DVWA 2.web环境 phpstudy/wamp 3.burp suite 二、SQL注入产生的原因:   程序员在编写代码的时候,没有对用户输入数据的合法性进行判断,使应用程序存在安全隐患 用户可以提交一段数据库查询代码,根据程序返回的结果,获得某些他想得知的数据或进行数据库操作。 三、关于SQL注入需要注意...