hacktricks/network-services-pentesting/pentesting-pop.md

152 lines
8.9 KiB
Markdown
Raw Normal View History

# 110,995 - POPのペンテスト
2022-04-28 16:01:33 +00:00
<details>
<summary><strong>ゼロからヒーローまでAWSハッキングを学ぶ</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTEHackTricks AWS Red Team Expert</strong></a><strong></strong></summary>
2022-04-28 16:01:33 +00:00
* **サイバーセキュリティ企業**で働いていますか? **HackTricksで会社を宣伝**してみたいですか?または、**PEASSの最新バージョンにアクセスしたり、HackTricksをPDFでダウンロード**したいですか?[**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)をチェックしてください!
* [**The PEASS Family**](https://opensea.io/collection/the-peass-family)を発見しましょう、当社の独占的な[NFTコレクション](https://opensea.io/collection/the-peass-family)
* [**公式PEASSHackTricksスウェグ**](https://peass.creator-spring.com)を手に入れましょう
* **[💬](https://emojipedia.org/speech-balloon/) [Discordグループ](https://discord.gg/hRep4RUj7f)**に参加するか、[telegramグループ](https://t.me/peass)に参加するか、**Twitter**で私をフォローする🐦[@carlospolopm](https://twitter.com/hacktricks\_live)**。**
* **ハッキングトリックを共有するために、PRを**[**hacktricksリポジトリ**](https://github.com/carlospolop/hacktricks) **と**[**hacktricks-cloudリポジトリ**](https://github.com/carlospolop/hacktricks-cloud) **に提出してください。**
2022-04-28 16:01:33 +00:00
</details>
2023-07-07 23:42:27 +00:00
## 基本情報
2022-04-28 16:01:33 +00:00
**ポストオフィスプロトコルPOP**は、コンピューターネットワーキングとインターネットの領域内で説明されるプロトコルで、リモートメールサーバーからの電子メールの取り出しと**取得**に使用され、これによりローカルデバイスでアクセスできるようになります。 OSIモデルのアプリケーション層に配置されているこのプロトコルは、ユーザーが電子メールを取得して受信することを可能にします。 **POPクライアント**の動作は通常、メールサーバーに接続し、すべてのメッセージをダウンロードし、これらのメッセージをクライアントシステムにローカルに保存し、その後サーバーから削除することを含みます。 このプロトコルには3つのイテレーションがありますが、**POP3**が最も一般的に使用されるバージョンとして際立っています。
**デフォルトポート:** 110、995SSL
2022-05-01 13:25:53 +00:00
```
PORT STATE SERVICE
110/tcp open pop3
```
## 列挙
### バナーの取得
```bash
nc -nv <IP> 110
openssl s_client -connect <IP>:995 -crlf -quiet
```
2023-07-07 23:42:27 +00:00
## マニュアル
POP3サーバーの機能を取得するために`CAPA`コマンドを使用できます。
## 自動
```bash
2021-03-28 12:50:16 -04:00
nmap --script "pop3-capabilities or pop3-ntlm-info" -sV -port <PORT> <IP> #All are default scripts
```
`pop3-ntlm-info`プラグインはいくつかの "**sensitive**" データWindows バージョン)を返します。
### [POP3 ブルートフォース](../generic-methodologies-and-resources/brute-force.md#pop)
## POP 構文
[こちら](http://sunnyoasis.com/services/emailviatelnet.html)からの POP コマンドの例
```bash
POP commands:
2023-07-07 23:42:27 +00:00
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
```
例:
2022-05-01 13:25:53 +00:00
```
root@kali:~# telnet $ip 110
2023-07-07 23:42:27 +00:00
+OK beta POP3 server (JAMES POP3 Server 2.3.2) ready
USER billydean
+OK
PASS password
+OK Welcome billydean
2021-03-31 10:21:23 +00:00
2023-07-07 23:42:27 +00:00
list
2021-03-31 10:21:23 +00:00
2023-07-07 23:42:27 +00:00
+OK 2 1807
1 786
2 1021
2023-07-07 23:42:27 +00:00
retr 1
2021-03-31 10:21:23 +00:00
2023-07-07 23:42:27 +00:00
+OK Message follows
From: jamesbrown@motown.com
Dear Billy Dean,
2023-07-07 23:42:27 +00:00
Here is your login for remote desktop ... try not to forget it this time!
username: billydean
password: PA$$W0RD!Z
```
2023-07-07 23:42:27 +00:00
## 危険な設定
From [https://academy.hackthebox.com/module/112/section/1073](https://academy.hackthebox.com/module/112/section/1073)
2022-10-02 21:10:53 +00:00
2023-07-07 23:42:27 +00:00
| **設定** | **説明** |
2022-10-02 21:10:53 +00:00
| ------------------------- | ----------------------------------------------------------------------------------------- |
| `auth_debug` | すべての認証デバッグログを有効にします。 |
| `auth_debug_passwords` | この設定はログの詳細度を調整し、送信されたパスワードとスキームが記録されます。 |
| `auth_verbose` | 認証に失敗した試行とその理由が記録されます。 |
| `auth_verbose_passwords` | 認証に使用されるパスワードが記録され、切り捨てられることもあります。 |
| `auth_anonymous_username` | ANONYMOUS SASL メカニズムを使用してログインする際に使用するユーザー名を指定します。 |
2021-08-12 09:23:35 -04:00
## HackTricks Automatic Commands
2022-05-01 13:25:53 +00:00
```
2021-08-12 09:23:35 -04:00
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
2021-08-15 13:31:12 -04:00
Entry_1:
2023-07-07 23:42:27 +00:00
Name: Notes
Description: Notes for POP
Note: |
Post Office Protocol (POP) is described as a protocol within the realm of computer networking and the Internet, which is utilized for the extraction and retrieval of email from a remote mail server**, making it accessible on the local device. Positioned within the application layer of the OSI model, this protocol enables users to fetch and receive email. The operation of POP clients typically involves establishing a connection to the mail server, downloading all messages, storing these messages locally on the client system, and subsequently removing them from the server. Although there are three iterations of this protocol, POP3 stands out as the most prevalently employed version.
2021-08-15 13:31:12 -04:00
https://book.hacktricks.xyz/network-services-pentesting/pentesting-pop
2021-08-15 13:31:12 -04:00
Entry_2:
2023-07-07 23:42:27 +00:00
Name: Banner Grab
Description: Banner Grab 110
Command: nc -nv {IP} 110
2021-08-15 13:31:12 -04:00
Entry_3:
2023-07-07 23:42:27 +00:00
Name: Banner Grab 995
Description: Grab Banner Secure
Command: openssl s_client -connect {IP}:995 -crlf -quiet
2021-08-15 13:31:12 -04:00
Entry_4:
2023-07-07 23:42:27 +00:00
Name: Nmap
Description: Scan for POP info
Command: nmap --script "pop3-capabilities or pop3-ntlm-info" -sV -p 110 {IP}
2021-09-13 11:39:29 -04:00
Entry_5:
2023-07-07 23:42:27 +00:00
Name: Hydra Brute Force
Description: Need User
Command: hydra -l {Username} -P {Big_Passwordlist} -f {IP} pop3 -V
2022-07-18 08:05:04 -04:00
Entry_6:
2023-07-07 23:42:27 +00:00
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'
2023-07-07 23:42:27 +00:00
```
2022-04-28 16:01:33 +00:00
<details>
<summary><strong>htARTEHackTricks AWS Red Team Expert</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>を使って、ゼロからヒーローまでAWSハッキングを学ぶ</strong></a><strong></strong></summary>
<img src="../.gitbook/assets/image (675).png" alt="" data-size="original">
最も重要な脆弱性を見つけて修正を迅速化します。Intruderは攻撃面を追跡し、積極的な脅威スキャンを実行し、APIからWebアプリやクラウドシステムまで、技術スタック全体で問題を見つけます。[**無料でお試しください**](https://www.intruder.io/?utm\_source=referral\&utm\_campaign=hacktricks) 今すぐ。
* **サイバーセキュリティ企業**で働いていますか? **HackTricksで会社を宣伝**したいですか?または**PEASSの最新バージョンを入手したり、HackTricksをPDFでダウンロード**したいですか?[**サブスクリプションプラン**](https://github.com/sponsors/carlospolop)をチェックしてください!
* [**The PEASS Family**](https://opensea.io/collection/the-peass-family)を発見し、独占的な[**NFTs**](https://opensea.io/collection/the-peass-family)のコレクションを見つけます
* [**公式PEASSHackTricksスウェグ**](https://peass.creator-spring.com)を手に入れます
* **[💬](https://emojipedia.org/speech-balloon/) Discordグループ**に**参加**するか、[**テレグラムグループ**](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) **にPRを提出してください。**
2022-04-28 16:01:33 +00:00
</details>