c# - 在 C# 中实现所有端口扫描技术/在 C# 中创建原始低级数据包

标签 c# .net sockets network-programming port-scanning

我正在尝试用 C# 编写一个端口扫描器。我对端口扫描方法做了一些研究。

If you are interested, these are the links I found useful:

  1. http://www.cs.wright.edu/~pmateti/InternetSecurity/Lectures/Probing/index.html ^PPT Presentation^
  2. http://www.auditmypc.com/freescan/readingroom/port_scanning.asp
  3. (old) NMAP - The Art of Port Scanning : http://nmap.org/nmap_doc.html
  4. Port Scanning Techniques : http://nmap.org/book/man-port-scanning-techniques.html
  5. Port Scanning Interactive Example : http://www.osischool.com/concept/communication/port-scanning

来回答我的问题。这些是端口扫描方法:

  1. TCP Connect() Scan
  2. TCP SYN Scan
  3. TCP FIN Scan
  4. TCP XMAS Scan
  5. TCP NULL Scan
  6. TCP Window Scan
  7. UDP Scan

但我只实现了TCP Connect() Scan(显示here)。但这太慢了(测试每个端口需要 >0.5 秒)。为了实现其余方法,我需要数据包级别的访问权限。我需要创建原始数据包。有可能在 C# 中做到这一点吗?如果是这样该怎么做?

最佳答案

当我很久以前使用它时,这似乎是一个很好的 WinPCap 库包装器:

http://sourceforge.net/projects/sharppcap/

我相信现在好多了。

关于c# - 在 C# 中实现所有端口扫描技术/在 C# 中创建原始低级数据包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2001300/

相关文章:

c# - 重复值的部分取消分组列表

.net - .Net 中的 XSD 正则表达式模式导致应用程序挂起

c# - 关闭最后一个连接后,如何通过套接字监听传入连接?

networking - 读写 UDP 连接的套接字?

c# - 从 C# 运行 MySQL 命令时忽略 @ 符号

c# - 来自 SQLiteConnection 对象的 SQLite .dump 命令

c# - 使用 Google Location API

c# - WPF重构: Moving DataTemplate to another file

c# - 获取全局目录的 PrincipalContext 的连接服务器

无法通过多个 'read' 调用从多播套接字读取 RTP 数据包(或获取其大小)