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

137 lines
5.7 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>
<summary><strong>Support HackTricks and get benefits!</strong></summary>
Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family)
Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com)
**Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.**
**Share your hacking tricks submitting PRs to the** [**hacktricks github repo**](https://github.com/carlospolop/hacktricks)**.**
</details>
2022-05-08 23:13:03 +00:00
{% hint style="danger" %}
<img src="../.gitbook/assets/SB logo black_034525.png" alt="" data-size="original">\
_A **digital transformation** tailored to your organization is unique. It also comes with its **risks**. **Defend yourself against hackers**. Get protection before it's too late. **Talk to the professionals at Securityboat**:_
{% embed url="https://securityboat.in/contact-us" %}
{% endhint %}
2022-04-28 16:01:33 +00:00
2022-05-08 23:13:03 +00:00
## Basic Information
2022-05-08 23:13:03 +00:00
Is an [Internet](https://en.wikipedia.org/wiki/Internet) [protocol](https://en.wikipedia.org/wiki/Protocol\_\(computing\)) that helps identify the user of a particular [TCP](https://en.wikipedia.org/wiki/Transmission\_Control\_Protocol) connection.
**Default port:** 113
```
PORT STATE SERVICE
113/tcp open ident
```
2022-05-08 23:13:03 +00:00
## **Enumeration**
2022-05-08 23:13:03 +00:00
### **Manual - Get user/Identify the service**
If a machine is running the service ident and samba (445) and you are connected to samba using the port 43218. You can get which user is running the samba service by doing:
![](<../.gitbook/assets/image (15).png>)
If you just press enter when you conenct to the service:
![](<../.gitbook/assets/image (16).png>)
Other errors:
![](<../.gitbook/assets/image (17).png>)
2022-05-08 23:13:03 +00:00
### Nmap
By default (-sC) nmap will identify every user of every running port:
```
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 4.3p2 Debian 9 (protocol 2.0)
|_auth-owners: root
| 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 is a simple PERL script to query the ident service (113/TCP) in order to determine the owner of the process listening on each TCP port of a target system. The list of usernames gathered can be used for password guessing attacks on other network services. It can be installed with `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`
2022-05-08 23:13:03 +00:00
## Files
identd.conf
2022-05-08 23:13:03 +00:00
## HackTricks Automatic Commands
2021-08-12 12:39:37 +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:
Name: Notes
Description: Notes for Ident
Note: |
Is an Internet protocol that helps identify the user of a particular TCP connection.
https://book.hacktricks.xyz/pentesting/113-pentesting-ident
Entry_2:
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
2022-05-08 23:13:03 +00:00
{% hint style="danger" %}
<img src="../.gitbook/assets/SB logo black_034525.png" alt="" data-size="original">\
_A **digital transformation** tailored to your organization is unique. It also comes with its **risks**. **Defend yourself against hackers**. Get protection before it's too late. **Talk to the professionals at Securityboat**:_
{% embed url="https://securityboat.in/contact-us" %}
{% endhint %}
2022-04-28 16:01:33 +00:00
<details>
<summary><strong>Support HackTricks and get benefits!</strong></summary>
Do you work in a **cybersecurity company**? Do you want to see your **company advertised in HackTricks**? or do you want to have access the **latest version of the PEASS or download HackTricks in PDF**? Check the [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
Discover [**The PEASS Family**](https://opensea.io/collection/the-peass-family), our collection of exclusive [**NFTs**](https://opensea.io/collection/the-peass-family)
Get the [**official PEASS & HackTricks swag**](https://peass.creator-spring.com)
**Join the** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** me on **Twitter** [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/carlospolopm)**.**
**Share your hacking tricks submitting PRs to the** [**hacktricks github repo**](https://github.com/carlospolop/hacktricks)**.**
</details>