hacktricks/network-services-pentesting/113-pentesting-ident.md

121 lines
6.5 KiB
Markdown
Raw Normal View History

2022-05-08 23:13:03 +00:00
# 113 - Pentesting Ident
2022-04-28 16:01:33 +00:00
<details>
2023-04-25 18:35:28 +00:00
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
2022-04-28 16:01:33 +00:00
2023-08-03 19:12:22 +00:00
* 你在一个**网络安全公司**工作吗想要在HackTricks中看到你的**公司广告**吗?或者你想要**获取PEASS的最新版本或下载HackTricks的PDF**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)
* 发现我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
2023-08-03 19:12:22 +00:00
* 获取[**官方PEASS和HackTricks的衣物**](https://peass.creator-spring.com)
* **加入**[**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f) 或者 [**telegram群组**](https://t.me/peass) 或者 **关注**我在**Twitter**上的[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
2023-08-03 19:12:22 +00:00
* **通过向**[**hacktricks repo**](https://github.com/carlospolop/hacktricks) **和**[**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud) **提交PR来分享你的黑客技巧。**
2022-04-28 16:01:33 +00:00
</details>
<figure><img src="../.gitbook/assets/image (3) (1) (1).png" alt=""><figcaption></figcaption></figure>
2022-10-27 23:22:18 +00:00
2023-08-03 19:12:22 +00:00
使用[**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks)可以轻松构建和**自动化工作流程**,使用世界上最先进的社区工具。\
立即获取访问权限:
2022-10-27 23:22:18 +00:00
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
2023-08-03 19:12:22 +00:00
## 基本信息
2023-08-03 19:12:22 +00:00
是一种[互联网](https://en.wikipedia.org/wiki/Internet) [协议](https://en.wikipedia.org/wiki/Protocol\_\(computing\)),用于帮助识别特定[TCP](https://en.wikipedia.org/wiki/Transmission\_Control\_Protocol)连接的用户。
2023-08-03 19:12:22 +00:00
**默认端口:**113
```
PORT STATE SERVICE
113/tcp open ident
```
2023-08-03 19:12:22 +00:00
## **枚举**
2023-08-03 19:12:22 +00:00
### **手动 - 获取用户/识别服务**
2023-08-03 19:12:22 +00:00
如果一台机器正在运行ident和samba445服务并且您通过端口43218连接到samba。您可以通过执行以下操作获取正在运行samba服务的用户
2022-12-24 19:34:46 +00:00
![](<../.gitbook/assets/image (15) (1) (1).png>)
2023-08-03 19:12:22 +00:00
如果您在连接到服务时只是按下回车键:
2022-12-24 19:34:46 +00:00
![](<../.gitbook/assets/image (16) (1) (1).png>)
2023-08-03 19:12:22 +00:00
其他错误:
2022-09-30 10:43:59 +00:00
![](<../.gitbook/assets/image (17) (1).png>)
2022-05-08 23:13:03 +00:00
### Nmap
2023-08-03 19:12:22 +00:00
默认情况下(-sCnmap将识别每个运行端口的每个用户
```
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 4.3p2 Debian 9 (protocol 2.0)
|_auth-owners: root
2023-08-03 19:12:22 +00:00
| ssh-hostkey:
| 1024 88:23:98:0d:9d:8a:20:59:35:b8:14:12:14:d5:d0:44 (DSA)
|_ 2048 6b:5d:04:71:76:78:56:96:56:92:a8:02:30:73:ee:fa (RSA)
113/tcp open ident
|_auth-owners: identd
139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: LOCAL)
|_auth-owners: root
445/tcp open netbios-ssn Samba smbd 3.0.24 (workgroup: LOCAL)
|_auth-owners: root
```
2022-05-08 23:13:03 +00:00
### Ident-user-enum
Ident-user-enum是一个简单的PERL脚本用于查询ident服务113/TCP以确定目标系统上每个TCP端口上监听的进程的所有者。收集到的用户名列表可以用于对其他网络服务进行密码猜测攻击。可以使用`apt install ident-user-enum`进行安装。
```
root@kali:/opt/local/recon/192.168.1.100# ident-user-enum 192.168.1.100 22 113 139 445
ident-user-enum v1.0 ( http://pentestmonkey.net/tools/ident-user-enum )
192.168.1.100:22 root
192.168.1.100:113 identd
192.168.1.100:139 root
192.168.1.100:445 root
```
2022-05-08 23:13:03 +00:00
### Shodan
* `oident`
2023-08-03 19:12:22 +00:00
## 文件
identd.conf
<figure><img src="../.gitbook/assets/image (3) (1) (1).png" alt=""><figcaption></figcaption></figure>
2022-10-27 23:22:18 +00:00
2023-08-03 19:12:22 +00:00
使用[**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks)可以轻松构建和自动化由全球**最先进**的社区工具提供支持的工作流程。\
立即获取访问权限:
2022-10-27 23:22:18 +00:00
{% embed url="https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks" %}
2023-08-03 19:12:22 +00:00
## HackTricks自动命令
```
2021-08-12 12:39:37 +00:00
Protocol_Name: Ident #Protocol Abbreviation if there is one.
Port_Number: 113 #Comma separated if there is more than one.
Protocol_Description: Identification Protocol #Protocol Abbreviation Spelled out
2021-08-15 17:59:11 +00:00
Entry_1:
2023-08-03 19:12:22 +00:00
Name: Notes
Description: Notes for Ident
Note: |
Is an Internet protocol that helps identify the user of a particular TCP connection.
2021-08-15 17:59:11 +00:00
2023-08-03 19:12:22 +00:00
https://book.hacktricks.xyz/pentesting/113-pentesting-ident
2021-08-15 17:59:11 +00:00
Entry_2:
2023-08-03 19:12:22 +00:00
Name: Enum Users
Description: Enumerate Users
Note: apt install ident-user-enum ident-user-enum {IP} 22 23 139 445 (try all open ports)
2021-08-12 12:39:37 +00:00
```
2022-04-28 16:01:33 +00:00
<details>
2023-08-03 19:12:22 +00:00
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks 云 ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 推特 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
2022-04-28 16:01:33 +00:00
* 你在一家 **网络安全公司** 工作吗?想要在 HackTricks 中 **宣传你的公司** 吗?或者你想要获取 **PEASS 的最新版本或下载 HackTricks 的 PDF** 吗?请查看 [**订阅计划**](https://github.com/sponsors/carlospolop)
* 发现我们的独家 [**NFTs**](https://opensea.io/collection/the-peass-family) 集合 - [**The PEASS Family**](https://opensea.io/collection/the-peass-family)
* 获取 [**官方 PEASS & HackTricks 商品**](https://peass.creator-spring.com)
* **加入** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord 群组**](https://discord.gg/hRep4RUj7f) 或者 [**Telegram 群组**](https://t.me/peass),或者在 **Twitter****关注** 我 [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**。**
* **通过向** [**hacktricks 仓库**](https://github.com/carlospolop/hacktricks) **和** [**hacktricks-cloud 仓库**](https://github.com/carlospolop/hacktricks-cloud) **提交 PR 来分享你的黑客技巧。**
2022-04-28 16:01:33 +00:00
</details>