2024-02-09 08:09:21 +00:00
# 113 - 渗透测试 Ident
2022-04-28 16:01:33 +00:00
< details >
2024-02-09 08:09:21 +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:09:21 +00:00
支持 HackTricks 的其他方式:
2024-01-10 06:29:36 +00:00
2024-02-09 08:09:21 +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
< / details >
2024-01-10 06:29:36 +00:00
< figure > < img src = "../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt = "" > < figcaption > < / figcaption > < / figure >
2022-10-27 23:22:18 +00:00
2024-02-09 08:09:21 +00:00
使用 [**Trickest** ](https://trickest.com/?utm_campaign=hacktrics&utm_medium=banner&utm_source=hacktricks ) 可以轻松构建和**自动化工作流程**,使用世界上**最先进**的社区工具。\
2023-08-03 19:12:22 +00:00
立即获取访问权限:
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
## 基本信息
2020-07-15 15:43:14 +00:00
2024-02-09 08:09:21 +00:00
**Ident 协议**用于在**互联网**上将**TCP 连接**与特定用户关联起来。最初设计用于**网络管理**和**安全**,通过允许服务器在端口 113 上查询客户端以请求有关特定 TCP 连接用户的信息来运行。
2020-07-15 15:43:14 +00:00
2024-02-09 08:09:21 +00:00
然而,由于现代隐私问题和潜在的滥用可能性,其使用已减少,因为它可能无意中向未经授权的方提供用户信息。建议采取加密连接和严格访问控制等增强安全措施以减轻这些风险。
**默认端口:**113
2021-10-18 11:21:18 +00:00
```
2020-07-15 15:43:14 +00:00
PORT STATE SERVICE
113/tcp open ident
```
2023-08-03 19:12:22 +00:00
## **枚举**
2020-07-15 15:43:14 +00:00
2023-08-03 19:12:22 +00:00
### **手动 - 获取用户/识别服务**
2020-07-15 15:43:14 +00:00
2024-02-09 08:09:21 +00:00
如果一台机器正在运行 ident 和 samba 服务( 445 端口),而你通过 43218 端口连接到 samba。你可以通过以下方式获取运行 samba 服务的用户:
2020-07-15 15:43:14 +00:00
2022-12-24 19:34:46 +00:00
![](< .. / . gitbook / assets / image ( 15 ) ( 1 ) ( 1 ) . png > )
2020-07-15 15:43:14 +00:00
2024-02-09 08:09:21 +00:00
如果你连接到服务时只是按下回车键:
2020-07-15 15:43:14 +00:00
2022-12-24 19:34:46 +00:00
![](< .. / . gitbook / assets / image ( 16 ) ( 1 ) ( 1 ) . png > )
2020-07-15 15:43:14 +00:00
2023-08-03 19:12:22 +00:00
其他错误:
2020-07-15 15:43:14 +00:00
2022-09-30 10:43:59 +00:00
![](< .. / . gitbook / assets / image ( 17 ) ( 1 ) . png > )
2020-07-15 15:43:14 +00:00
2022-05-08 23:13:03 +00:00
### Nmap
2020-07-15 15:43:14 +00:00
2024-02-09 08:09:21 +00:00
默认情况下(`-sC`) , nmap 将识别每个运行端口的每个用户:
2021-10-18 11:21:18 +00:00
```
2020-07-15 15:43:14 +00:00
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:
2020-07-15 15:43:14 +00:00
| 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
2020-11-15 21:33:46 +00:00
2024-02-09 08:09:21 +00:00
[**Ident-user-enum** ](https://github.com/pentestmonkey/ident-user-enum ) 是一个简单的 PERL 脚本,用于查询 ident 服务( 113/TCP) , 以确定目标系统上每个 TCP 端口监听的进程所有者。收集到的用户名列表可用于对其他网络服务进行密码猜测攻击。可以使用 `apt install ident-user-enum` 进行安装。
2021-10-18 11:21:18 +00:00
```
2020-11-15 21:33:46 +00:00
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
2020-07-15 15:43:14 +00:00
* `oident`
2024-02-09 08:09:21 +00:00
## Files
2020-07-15 15:43:14 +00:00
identd.conf
2024-01-10 06:29:36 +00:00
< figure > < img src = "../.gitbook/assets/image (3) (1) (1) (1) (1).png" alt = "" > < figcaption > < / figcaption > < / figure >
2022-10-27 23:22:18 +00:00
2024-02-09 08:09:21 +00:00
使用[**Trickest**](https://trickest.com/?utm\_campaign=hacktrics\&utm\_medium=banner\&utm\_source=hacktricks)轻松构建和**自动化**由全球**最先进**的社区工具驱动的工作流。\
2023-08-03 19:12:22 +00:00
立即获取访问权限:
2022-10-27 23:22:18 +00:00
{% embed url="https://trickest.com/?utm_campaign=hacktrics& utm_medium=banner& utm_source=hacktricks" %}
2024-02-09 08:09:21 +00:00
## HackTricks自动命令
2021-10-18 11:21:18 +00:00
```
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: |
2024-02-09 08:09:21 +00:00
The Ident Protocol is used over the Internet to associate a TCP connection with a specific user. Originally designed to aid in network management and security, it operates by allowing a server to query a client on port 113 to request information about 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 >
2024-02-09 08:09:21 +00:00
< summary > < strong > 从零开始学习AWS黑客技术, 成为专家< / strong > < a href = "https://training.hacktricks.xyz/courses/arte" > < strong > htARTE( HackTricks AWS红队专家) < / strong > < / a > < strong > ! < / strong > < / summary >
2024-01-10 06:29:36 +00:00
2024-02-09 08:09:21 +00:00
其他支持HackTricks的方式:
2022-04-28 16:01:33 +00:00
2024-02-09 08:09:21 +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
< / details >