2024-02-09 08:58:25 +00:00
|
|
|
|
# 23 - Telnet渗透测试
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2024-02-09 08:58:25 +00:00
|
|
|
|
<summary><strong>从零开始学习AWS黑客技术,成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE(HackTricks AWS红队专家)</strong></a><strong>!</strong></summary>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-02-09 08:58:25 +00:00
|
|
|
|
支持HackTricks的其他方式:
|
2024-01-02 22:21:01 +00:00
|
|
|
|
|
2024-02-09 08:58:25 +00:00
|
|
|
|
* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**,请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
|
|
|
|
|
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family),我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
|
|
|
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
|
|
|
|
|
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-04-30 21:54:03 +00:00
|
|
|
|
</details>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-01-11 13:57:14 +00:00
|
|
|
|
<figure><img src="/.gitbook/assets/image (2).png" alt=""><figcaption></figcaption></figure>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-02-09 08:58:25 +00:00
|
|
|
|
**即时提供的漏洞评估和渗透测试设置**。使用从侦察到报告的20多种工具和功能从任何地方运行完整的渗透测试。我们不取代渗逗者 - 我们开发定制工具、检测和利用模块,让他们有更多时间深入挖掘、弹出shell并享受乐趣。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-01-11 13:57:14 +00:00
|
|
|
|
{% embed url="https://pentest-tools.com/" %}
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## **基本信息**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-09 08:58:25 +00:00
|
|
|
|
Telnet是一种网络协议,为用户提供了一种不安全的方式通过网络访问计算机。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-09 08:58:25 +00:00
|
|
|
|
**默认端口:** 23
|
2022-05-01 13:25:53 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
23/tcp open telnet
|
|
|
|
|
```
|
2024-01-02 22:21:01 +00:00
|
|
|
|
## **枚举**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-01-02 22:21:01 +00:00
|
|
|
|
### **横幅抓取**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```bash
|
|
|
|
|
nc -vn <IP> 23
|
|
|
|
|
```
|
2024-01-02 22:21:01 +00:00
|
|
|
|
所有有趣的枚举都可以通过 **nmap** 来执行:
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```bash
|
|
|
|
|
nmap -n -sV -Pn --script "*telnet* and safe" -p 23 <IP>
|
|
|
|
|
```
|
2024-02-08 04:42:06 +00:00
|
|
|
|
```markdown
|
|
|
|
|
脚本`telnet-ntlm-info.nse`将获取NTLM信息(Windows版本)。
|
|
|
|
|
|
2024-02-09 08:58:25 +00:00
|
|
|
|
从[telnet RFC](https://datatracker.ietf.org/doc/html/rfc854)中:在TELNET协议中有各种“**选项**”,这些选项将被批准,并可以与“**DO, DON'T, WILL, WON'T**”结构一起使用,以允许用户和服务器同意使用更复杂(或者可能只是不同)的约定集进行TELNET连接。这些选项可能包括更改字符集,回显模式等。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-08 04:42:06 +00:00
|
|
|
|
**我知道可以枚举这些选项,但我不知道如何操作,所以如果您知道,请告诉我。**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### [暴力破解](../generic-methodologies-and-resources/brute-force.md#telnet)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## 配置文件
|
2024-02-08 04:42:06 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```bash
|
|
|
|
|
/etc/inetd.conf
|
|
|
|
|
/etc/xinetd.d/telnet
|
|
|
|
|
/etc/xinetd.d/stelnet
|
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## HackTricks 自动命令
|
2022-05-01 13:25:53 +00:00
|
|
|
|
```
|
2021-08-12 13:37:00 +00:00
|
|
|
|
Protocol_Name: Telnet #Protocol Abbreviation if there is one.
|
|
|
|
|
Port_Number: 23 #Comma separated if there is more than one.
|
|
|
|
|
Protocol_Description: Telnet #Protocol Abbreviation Spelled out
|
|
|
|
|
|
2021-08-15 17:54:03 +00:00
|
|
|
|
Entry_1:
|
2023-08-03 19:12:22 +00:00
|
|
|
|
Name: Notes
|
|
|
|
|
Description: Notes for t=Telnet
|
|
|
|
|
Note: |
|
|
|
|
|
wireshark to hear creds being passed
|
|
|
|
|
tcp.port == 23 and ip.addr != myip
|
2021-08-15 17:54:03 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
https://book.hacktricks.xyz/pentesting/pentesting-telnet
|
2021-08-15 17:54:03 +00:00
|
|
|
|
|
|
|
|
|
Entry_2:
|
2023-08-03 19:12:22 +00:00
|
|
|
|
Name: Banner Grab
|
|
|
|
|
Description: Grab Telnet Banner
|
|
|
|
|
Command: nc -vn {IP} 23
|
2021-08-15 17:54:03 +00:00
|
|
|
|
|
|
|
|
|
Entry_3:
|
2023-08-03 19:12:22 +00:00
|
|
|
|
Name: Nmap with scripts
|
|
|
|
|
Description: Run nmap scripts for telnet
|
|
|
|
|
Command: nmap -n -sV -Pn --script "*telnet*" -p 23 {IP}
|
|
|
|
|
|
2022-07-01 13:10:24 +00:00
|
|
|
|
Entry_4:
|
2023-08-03 19:12:22 +00:00
|
|
|
|
Name: consoleless mfs enumeration
|
|
|
|
|
Description: Telnet enumeration without the need to run msfconsole
|
|
|
|
|
Note: sourced from https://github.com/carlospolop/legion
|
|
|
|
|
Command: msfconsole -q -x 'use auxiliary/scanner/telnet/telnet_version; set RHOSTS {IP}; set RPORT 23; run; exit' && msfconsole -q -x 'use auxiliary/scanner/telnet/brocade_enable_login; set RHOSTS {IP}; set RPORT 23; run; exit' && msfconsole -q -x 'use auxiliary/scanner/telnet/telnet_encrypt_overflow; set RHOSTS {IP}; set RPORT 23; run; exit' && msfconsole -q -x 'use auxiliary/scanner/telnet/telnet_ruggedcom; set RHOSTS {IP}; set RPORT 23; run; exit'
|
2021-08-14 09:02:12 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
```
|
2024-01-11 13:57:14 +00:00
|
|
|
|
<figure><img src="/.gitbook/assets/image (2).png" alt=""><figcaption></figcaption></figure>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-02-08 04:42:06 +00:00
|
|
|
|
**立即提供的漏洞评估和渗透测试设置**。从侦察到报告,使用 20 多种工具和功能运行完整的渗透测试。我们不取代渗透测试人员 - 我们开发定制工具、检测和利用模块,为他们节省时间深入挖掘、弹出 shell 并享受乐趣。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-01-11 13:57:14 +00:00
|
|
|
|
{% embed url="https://pentest-tools.com/" %}
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-04-30 21:54:03 +00:00
|
|
|
|
<details>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-02-08 04:42:06 +00:00
|
|
|
|
<summary><strong>从零开始学习 AWS 黑客技术,成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE(HackTricks AWS 红队专家)</strong></a><strong>!</strong></summary>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-02-08 04:42:06 +00:00
|
|
|
|
支持 HackTricks 的其他方式:
|
2024-01-02 22:21:01 +00:00
|
|
|
|
|
2024-02-08 04:42:06 +00:00
|
|
|
|
* 如果您想看到您的**公司在 HackTricks 中做广告**或**下载 PDF 版本的 HackTricks**,请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 获取[**官方 PEASS & HackTricks 商品**](https://peass.creator-spring.com)
|
|
|
|
|
* 探索[**PEASS 家族**](https://opensea.io/collection/the-peass-family),我们的独家[**NFT**](https://opensea.io/collection/the-peass-family)收藏品
|
2024-02-09 08:58:25 +00:00
|
|
|
|
* **加入** 💬 [**Discord 群组**](https://discord.gg/hRep4RUj7f) 或 [**电报群组**](https://t.me/peass) 或在 **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)** 上关注我们**。
|
2024-02-08 04:42:06 +00:00
|
|
|
|
* 通过向 [**HackTricks**](https://github.com/carlospolop/hacktricks) 和 [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github 仓库提交 PR 来分享您的黑客技巧。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|