hacktricks/network-services-pentesting/584-pentesting-afp.md
2023-08-03 19:12:22 +00:00

104 lines
7.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 548 - 渗透测试苹果文件协议AFP
<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仓库](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud仓库](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享你的黑客技巧**。
</details>
## 基本信息
**苹果文件协议****AFP**前身为AppleTalk文件协议是一种专有的网络协议是**苹果文件服务****AFS**的一部分为macOS和经典Mac OS提供文件服务。在macOS中AFP是支持的几种文件服务之一。AFP目前支持Unicode文件名、POSIX和访问控制列表权限、资源分支、命名扩展属性和高级文件锁定。在Mac OS 9及更早版本中AFP是文件服务的主要协议。
**默认端口:**548
```
PORT STATE SERVICE
548/tcp open afp
```
## 枚举
### AFP
The Apple Filing Protocol (AFP) is a network protocol used by Apple devices to share files and folders over a network. During a penetration test, enumerating AFP can provide valuable information about the target system and potential vulnerabilities.
### AFP枚举
苹果文件协议AFP是苹果设备用于在网络上共享文件和文件夹的网络协议。在渗透测试中枚举AFP可以提供有关目标系统和潜在漏洞的宝贵信息。
#### AFP Enumeration Techniques
There are several techniques that can be used to enumerate AFP during a penetration test:
##### 1. Banner Grabbing
Banner grabbing involves connecting to the AFP service and capturing the banner message that is returned. This message often contains information about the AFP version and the operating system running on the target system.
##### 2. User Enumeration
User enumeration involves attempting to enumerate valid usernames on the target AFP service. This can be done by trying common usernames, such as "admin" or "guest," or by using a brute-force attack to guess valid usernames.
##### 3. Share Enumeration
Share enumeration involves identifying the shared folders on the target AFP service. This can be done by connecting to the AFP service and listing the available shares.
##### 4. File and Folder Enumeration
File and folder enumeration involves listing the files and folders within a shared folder on the target AFP service. This can be done by connecting to the AFP service and navigating through the directory structure.
#### AFP枚举技术
在渗透测试中有几种技术可以用来枚举AFP
##### 1. 横幅抓取
横幅抓取涉及连接到AFP服务并捕获返回的横幅消息。该消息通常包含有关AFP版本和运行在目标系统上的操作系统的信息。
##### 2. 用户枚举
用户枚举涉及尝试枚举目标AFP服务上的有效用户名。可以通过尝试常见的用户名如“admin”或“guest”或使用暴力攻击来猜测有效的用户名来完成此操作。
##### 3. 共享枚举
共享枚举涉及识别目标AFP服务上的共享文件夹。可以通过连接到AFP服务并列出可用的共享来完成此操作。
##### 4. 文件和文件夹枚举
文件和文件夹枚举涉及列出目标AFP服务上共享文件夹中的文件和文件夹。可以通过连接到AFP服务并浏览目录结构来完成此操作。
```bash
msf> use auxiliary/scanner/afp/afp_server_info
nmap -sV --script "afp-* and not dos and not brute" -p <PORT> <IP>
```
| **名称** | **描述** |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| afp-ls | 列出可用的AFP卷和文件 |
| afp-path-vuln | 列出所有AFP卷和文件[a](https://learning.oreilly.com/library/view/network-security-assessment/9781491911044/ch15.html#ch15fn48) |
| afp-serverinfo | 显示AFP服务器信息 |
| afp-showmount | 列出可用的AFP共享和相应的ACL |
### [**暴力破解**](../generic-methodologies-and-resources/brute-force.md#afp)
<details>
<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>
- 你在一家**网络安全公司**工作吗你想在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 repo](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud repo](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享你的黑客技巧**。
</details>