mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-26 22:52:06 +00:00
170 lines
9.4 KiB
Markdown
170 lines
9.4 KiB
Markdown
# 110,995 - Pentesting POP
|
||
|
||
<details>
|
||
|
||
<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>
|
||
|
||
* 你在一个**网络安全公司**工作吗?你想在HackTricks中看到你的**公司广告**吗?或者你想获得**PEASS的最新版本或下载PDF格式的HackTricks**吗?请查看[**订阅计划**](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)或[**电报群组**](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 repo](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud repo](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享你的黑客技巧**。
|
||
|
||
</details>
|
||
|
||
<figure><img src="/.gitbook/assets/image (675).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
发现最重要的漏洞,以便更快地修复它们。Intruder跟踪您的攻击面,运行主动威胁扫描,发现整个技术堆栈中的问题,从API到Web应用程序和云系统。[**立即免费试用**](https://www.intruder.io/?utm\_source=referral\&utm\_campaign=hacktricks)。
|
||
|
||
{% embed url="https://www.intruder.io/?utm_campaign=hacktricks&utm_source=referral" %}
|
||
|
||
***
|
||
|
||
## 基本信息
|
||
|
||
**邮局协议**(**POP**)是一种计算机网络和互联网标准**协议**,用于从远程邮件服务器提取和检索电子邮件,以供主机机器访问。**POP**是OSI模型中的应用层**协议**,为终端用户提供获取和接收电子邮件的能力(来自[这里](https://www.techopedia.com/definition/5383/post-office-protocol-pop))。
|
||
|
||
POP客户端通常连接,检索所有消息,将其存储在客户端系统上,并从服务器上删除。有3个版本的POP,但POP3是最常用的版本。
|
||
|
||
**默认端口:**110,995(ssl)
|
||
```
|
||
PORT STATE SERVICE
|
||
110/tcp open pop3
|
||
```
|
||
### 枚举
|
||
|
||
#### 横幅抓取
|
||
|
||
横幅抓取是一种枚举技术,用于获取目标主机上运行的网络服务的版本和其他相关信息。这可以帮助黑客确定目标系统上可能存在的漏洞和弱点。横幅抓取通常通过发送特定的网络请求来获取服务的响应横幅。这些响应横幅通常包含有关服务的版本号、操作系统信息和其他标识符。
|
||
|
||
黑客可以使用各种工具来执行横幅抓取,例如Telnet、Netcat和Nmap。这些工具可以发送不同类型的请求,以获取服务的响应横幅。黑客可以分析响应横幅中的信息,以确定目标系统上可能存在的漏洞和弱点。
|
||
|
||
横幅抓取是一种被动的枚举技术,因为它不会对目标系统造成任何影响。然而,黑客应该小心使用横幅抓取工具,以避免引起目标系统管理员的注意。
|
||
```bash
|
||
nc -nv <IP> 110
|
||
openssl s_client -connect <IP>:995 -crlf -quiet
|
||
```
|
||
## 手动
|
||
|
||
您可以使用命令 `CAPA` 来获取 POP3 服务器的功能。
|
||
|
||
## 自动化
|
||
```bash
|
||
nmap --script "pop3-capabilities or pop3-ntlm-info" -sV -port <PORT> <IP> #All are default scripts
|
||
```
|
||
`pop3-ntlm-info`插件将返回一些敏感数据(Windows版本)。
|
||
|
||
### [POP3暴力破解](../generic-methodologies-and-resources/brute-force.md#pop)
|
||
|
||
## POP语法
|
||
```bash
|
||
POP commands:
|
||
USER uid Log in as "uid"
|
||
PASS password Substitue "password" for your actual password
|
||
STAT List number of messages, total mailbox size
|
||
LIST List messages and sizes
|
||
RETR n Show message n
|
||
DELE n Mark message n for deletion
|
||
RSET Undo any changes
|
||
QUIT Logout (expunges messages if no RSET)
|
||
TOP msg n Show first n lines of message number msg
|
||
CAPA Get capabilities
|
||
```
|
||
从[这里](http://sunnyoasis.com/services/emailviatelnet.html)
|
||
|
||
示例:
|
||
```
|
||
root@kali:~# telnet $ip 110
|
||
+OK beta POP3 server (JAMES POP3 Server 2.3.2) ready
|
||
USER billydean
|
||
+OK
|
||
PASS password
|
||
+OK Welcome billydean
|
||
|
||
list
|
||
|
||
+OK 2 1807
|
||
1 786
|
||
2 1021
|
||
|
||
retr 1
|
||
|
||
+OK Message follows
|
||
From: jamesbrown@motown.com
|
||
Dear Billy Dean,
|
||
|
||
Here is your login for remote desktop ... try not to forget it this time!
|
||
username: billydean
|
||
password: PA$$W0RD!Z
|
||
```
|
||
## 危险的设置
|
||
|
||
来自[https://academy.hackthebox.com/module/112/section/1073](https://academy.hackthebox.com/module/112/section/1073)
|
||
|
||
| **设置** | **描述** |
|
||
| ------------------------- | ----------------------------------------------------------------------------------------- |
|
||
| `auth_debug` | 启用所有身份验证调试日志记录。 |
|
||
| `auth_debug_passwords` | 此设置调整日志详细程度,记录提交的密码和方案。 |
|
||
| `auth_verbose` | 记录未成功的身份验证尝试及其原因。 |
|
||
| `auth_verbose_passwords` | 记录用于身份验证的密码,也可以进行截断。 |
|
||
| `auth_anonymous_username` | 指定在使用ANONYMOUS SASL机制登录时要使用的用户名。 |
|
||
|
||
## HackTricks自动命令
|
||
```
|
||
Protocol_Name: POP #Protocol Abbreviation if there is one.
|
||
Port_Number: 110 #Comma separated if there is more than one.
|
||
Protocol_Description: Post Office Protocol #Protocol Abbreviation Spelled out
|
||
|
||
Entry_1:
|
||
Name: Notes
|
||
Description: Notes for POP
|
||
Note: |
|
||
Post Office Protocol (POP) is a type of computer networking and Internet standard protocol that extracts and retrieves email from a remote mail server for access by the host machine. POP is an application layer protocol in the OSI model that provides end users the ability to fetch and receive email (from here).
|
||
The POP clients generally connect, retrieve all messages, store them on the client system, and delete them from the server. There are 3 versions of POP, but POP3 is the most used one.
|
||
|
||
https://book.hacktricks.xyz/pentesting/pentesting-whois
|
||
|
||
Entry_2:
|
||
Name: Banner Grab
|
||
Description: Banner Grab 110
|
||
Command: nc -nv {IP} 110
|
||
|
||
Entry_3:
|
||
Name: Banner Grab 995
|
||
Description: Grab Banner Secure
|
||
Command: openssl s_client -connect {IP}:995 -crlf -quiet
|
||
|
||
Entry_4:
|
||
Name: Nmap
|
||
Description: Scan for POP info
|
||
Command: nmap --script "pop3-capabilities or pop3-ntlm-info" -sV -p 110 {IP}
|
||
|
||
Entry_5:
|
||
Name: Hydra Brute Force
|
||
Description: Need User
|
||
Command: hydra -l {Username} -P {Big_Passwordlist} -f {IP} pop3 -V
|
||
|
||
Entry_6:
|
||
Name: consolesless mfs enumeration
|
||
Description: POP3 enumeration without the need to run msfconsole
|
||
Note: sourced from https://github.com/carlospolop/legion
|
||
Command: msfconsole -q -x 'use auxiliary/scanner/pop3/pop3_version; set RHOSTS {IP}; set RPORT 110; run; exit'
|
||
|
||
```
|
||
<details>
|
||
|
||
<figure><img src="/.gitbook/assets/image (675).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
找到最重要的漏洞,以便您能更快地修复它们。Intruder跟踪您的攻击面,运行主动威胁扫描,发现整个技术堆栈中的问题,从API到Web应用程序和云系统。[**立即免费试用**](https://www.intruder.io/?utm\_source=referral\&utm\_campaign=hacktricks)。
|
||
|
||
{% embed url="https://www.intruder.io/?utm_campaign=hacktricks&utm_source=referral" %}
|
||
|
||
<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>
|
||
|
||
* 您在**网络安全公司**工作吗?您想在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)或[**电报群组**](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 repo](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud repo](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享您的黑客技巧**。
|
||
|
||
</details>
|