> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/ports-and-services.md).

# 端口与服务

用于渗透测试的端口和服务枚举笔记，包括 FTP、SSH、SMB、Kerberos、LDAP、SNMP、WinRM、RDP、数据库、C2 面板以及暴露的管理服务。

渗透测试和 CTF 工作流中实用的服务枚举与利用笔记。使用本节从开放端口推进到已验证的攻击路径：匿名访问、弱凭据、暴露文件、默认配置、已知 CVE、远程命令执行以及横向移动。

## 服务枚举工作流

1. 识别开放端口、协议版本和暴露的产品。
2. 检查匿名访问、默认凭据、弱认证和管理面板。
3. 枚举特定服务数据：共享、用户、横幅、票据、数据库、OID、邮箱或目录对象。
4. 验证已知 CVE、危险功能、凭据复用和配置错误。
5. 将发现转化为清晰的攻击路径：文件读取、凭据发现、远程命令执行、反向 Shell、权限提升或横向移动。

## 高价值检查

* **身份服务：** Kerberos、LDAP、SMB、WinRM 和 RDP 往往会暴露用户、票据、哈希和管理路径。
* **文件和数据服务：** FTP、SMB、NFS、MongoDB、MSSQL、Elasticsearch 和 InfluxDB 通常会泄露凭据或敏感文件。
* **远程执行入口：** distcc、gdbserver、Consul、C2 面板、MSSQL `xp_cmdshell`以及存在漏洞的 SMB 服务可直接导致代码执行。
* **远程访问服务：** SSH、RDP、VNC 和 WinRM 有助于凭据验证、隧道转发和横向移动。

## 服务笔记

## 推荐工具

* [Nmap](/zh/reconnaissance/nmap.md) 用于端口扫描、服务检测和 NSE 脚本。
* 用于 SMB、LDAP、Kerberos、WinRM 和 MSSQL 检查的 CrackMapExec、NetExec、Impacket 和 rpcclient。
* 用于受控凭据验证的 Hydra、Kerbrute 和特定服务客户端。
* 用于 HTTP 和 HTTPS 服务发现的 Gobuster、ffuf、Nikto 和 Burp Suite。
* 用于协议特定枚举的 snmpwalk、ldapsearch、smbclient、enum4linux-ng 和 showmount。

<table data-view="cards" data-full-width="false" data-search="false"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-folder-open" style="color:$primary;">:folder-open:</i></h4></td><td><strong>FTP - 21</strong></td><td>FTP 枚举笔记，涵盖匿名访问、暴力破解检查、文件上传滥用、Web Shell 和反向 Shell。</td><td><a href="/zh/ports-and-services/ftp-21.md">FTP - 21</a></td></tr><tr><td><h4><i class="fa-terminal" style="color:$primary;">:terminal:</i></h4></td><td><strong>SSH - 22</strong></td><td>SSH 枚举笔记，涵盖暴力测试、用户枚举、基于密钥的访问和凭据验证。</td><td><a href="/zh/ports-and-services/ssh-22.md">SSH - 22</a></td></tr><tr><td><h4><i class="fa-globe" style="color:$primary;">:globe:</i></h4></td><td><strong>HTTP 和 HTTPS - 80/443</strong></td><td>HTTP 和 HTTPS 服务笔记，涵盖 TLS 检查、证书审查、Heartbleed 检测以及面向 Web 的攻击面验证。</td><td><a href="/zh/ports-and-services/http-and-https-80-443.md">HTTP 与 HTTPS - 80/443</a></td></tr><tr><td><h4><i class="fa-ticket" style="color:$primary;">:ticket:</i></h4></td><td><strong>Kerberos - 88</strong></td><td>Kerberos 枚举笔记，涵盖 AS-REP roasting、Kerberoasting、用户发现和 Active Directory 认证攻击。</td><td><a href="/zh/ports-and-services/kerberos-88.md">Kerberos - 88</a></td></tr><tr><td><h4><i class="fa-circle-nodes" style="color:$primary;">:circle-nodes:</i></h4></td><td><strong>SNMP - 161</strong></td><td>SNMP 枚举笔记，涵盖团体字串、OID 遍历、信息泄露、凭据和计划任务泄露。</td><td><a href="/zh/ports-and-services/snmp-161.md">SNMP - 161</a></td></tr><tr><td><h4><i class="fa-folder-tree" style="color:$primary;">:folder-tree:</i></h4></td><td><strong>LDAP - 389/636/3268/3269</strong></td><td>LDAP 枚举笔记，涵盖命名上下文、Active Directory 对象、用户、组、已认证绑定和敏感属性。</td><td><a href="/zh/ports-and-services/ldap-389-636-3268-3269.md">LDAP - 389/636/3268/3269</a></td></tr><tr><td><h4><i class="fa-network-wired" style="color:$primary;">:network-wired:</i></h4></td><td><strong>SMB - 445</strong></td><td>SMB 枚举与利用笔记，涵盖共享、空会话、RID 暴力破解、PsExec、NetExec、CrackMapExec、SMBMap 和 EternalBlue。</td><td><a href="/zh/ports-and-services/smb-445.md">SMB - 445</a></td></tr><tr><td><h4><i class="fa-lock" style="color:$primary;">:lock:</i></h4></td><td><strong>IKE/IPsec - 500</strong></td><td>使用 ike-scan 进行 IKE/IPsec 激进模式枚举、PSK 哈希捕获、hashcat 破解以及 SSH 访问。</td><td><a href="/zh/ports-and-services/ike-ipsec-500.md">IKE/IPsec - 500</a></td></tr><tr><td><h4><i class="fa-bug" style="color:$primary;">:bug:</i></h4></td><td><strong>gdbserver - 1337</strong></td><td>使用 Searchsploit、msfvenom payload 生成和反向 Shell 执行来利用 gdbserver。</td><td><a href="/zh/ports-and-services/gdbserver-1337.md">gdbserver - 1337</a></td></tr><tr><td><h4><i class="fa-database" style="color:$primary;">:database:</i></h4></td><td><strong>MSSQL - 1433</strong></td><td>MSSQL 利用笔记，涵盖凭据测试、mssqlclient 访问、xp_cmdshell、PowerShell payload 投递和反向 Shell。</td><td><a href="/zh/ports-and-services/mssql-1433.md">MSSQL - 1433</a></td></tr><tr><td><h4><i class="fa-share-nodes" style="color:$primary;">:share-nodes:</i></h4></td><td><strong>NFS - 2049</strong></td><td>NFS 枚举笔记，涵盖导出共享、挂载权限、可读备份、配置文件和凭据发现。</td><td><a href="/zh/ports-and-services/nfs-2049.md">NFS - 2049</a></td></tr><tr><td><h4><i class="fa-gears" style="color:$primary;">:gears:</i></h4></td><td><strong>distcc - 3632</strong></td><td>使用 Nmap、Python 漏洞利用代码和反向 Shell 验证 distcc CVE-2004-2687 并实现远程命令执行。</td><td><a href="/zh/ports-and-services/distcc-3632.md">distcc - 3632</a></td></tr><tr><td><h4><i class="fa-desktop" style="color:$primary;">:desktop:</i></h4></td><td><strong>RDP - 3389</strong></td><td>RDP 笔记，涵盖暴力破解检查、凭据验证、BlueKeep 检测以及渗透测试期间的远程桌面访问。</td><td><a href="/zh/ports-and-services/rdp-3389.md">RDP - 3389</a></td></tr><tr><td><h4><i class="fa-envelope" style="color:$primary;">:envelope:</i></h4></td><td><strong>James Server - 4555/119/110</strong></td><td>跨 NNTP、远程管理、POP3 邮箱访问、密码重置滥用和凭据发现对 Apache James 进行枚举。</td><td><a href="/zh/ports-and-services/james-server-4555-119-110.md">James Server - 4555/119/110</a></td></tr><tr><td><h4><i class="fa-desktop" style="color:$primary;">:desktop:</i></h4></td><td><strong>VNC - 5800,5801,5900,5901</strong></td><td>通过 SSH 进行 VNC 端口转发、VNC 服务扫描、vncviewer 访问以及 root 会话验证。</td><td><a href="/zh/ports-and-services/vnc-5800-5801-5900-5901.md">VNC - 5800,5801,5900,5901</a></td></tr><tr><td><h4><i class="fa-windows" style="color:$primary;">:windows:</i></h4></td><td><strong>WinRM - 5986</strong></td><td>WinRM 笔记，涵盖 Evil-WinRM 访问、暴力测试、Pass-the-Hash、证书认证和远程 PowerShell 管理。</td><td><a href="/zh/ports-and-services/winrm-5986.md">WinRM - 5986</a></td></tr><tr><td><h4><i class="fa-helmet-safety" style="color:$primary;">:helmet-safety:</i></h4></td><td><strong>HardHatC2 - 7096</strong></td><td>HardHatC2 认证绕过、伪造 JWT 生成、TeamLead 用户创建以及植入程序反向 Shell 执行。</td><td><a href="/zh/ports-and-services/hardhatc2-7096.md">HardHatC2 - 7096</a></td></tr><tr><td><h4><i class="fa-globe" style="color:$primary;">:globe:</i></h4></td><td><strong>InfluxDB - 8086</strong></td><td>InfluxDB CVE-2019-20933 认证绕过、数据库枚举和凭据发现。</td><td><a href="/zh/ports-and-services/influxdb-8086.md">InfluxDB - 8086</a></td></tr><tr><td><h4><i class="fa-globe" style="color:$primary;">:globe:</i></h4></td><td><strong>Devzat - 8443</strong></td><td>Devzat 文件参数滥用、备份发现、路径遍历、shadow 文件读取以及 root SSH 密钥访问。</td><td><a href="/zh/ports-and-services/devzat-8443.md">Devzat - 8443</a></td></tr><tr><td><h4><i class="fa-server" style="color:$primary;">:server:</i></h4></td><td><strong>Consul - 8500</strong></td><td>Consul REST API 暴露以及恶意服务检查注册，用于反向 Shell 执行。</td><td><a href="/zh/ports-and-services/consul-8500.md">Consul - 8500</a></td></tr><tr><td><h4><i class="fa-chart-simple" style="color:$primary;">:chart-simple:</i></h4></td><td><strong>Elasticsearch - 9200</strong></td><td>Elasticsearch 索引枚举、数据暴露审查、关键字过滤和 base64 凭据恢复。</td><td><a href="/zh/ports-and-services/elasticsearch-9200.md">Elasticsearch - 9200</a></td></tr><tr><td><h4><i class="fa-database" style="color:$primary;">:database:</i></h4></td><td><strong>MongoDB - 27017</strong></td><td>MongoDB 未认证访问、数据库枚举、通过 app.js 进行命令注入以及反向 Shell 执行。</td><td><a href="/zh/ports-and-services/mongodb-27017.md">MongoDB - 27017</a></td></tr><tr><td><h4><i class="fa-helmet-safety" style="color:$primary;">:helmet-safety:</i></h4></td><td><strong>Havoc-C2 - 40056</strong></td><td>Havoc-C2 的 SSRF 到 RCE 工作流，结合托管 payload 投递和反向 Shell 访问。</td><td><a href="/zh/ports-and-services/havoc-c2-40056.md">Havoc-C2 - 40056</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/zh/ports-and-services.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
