2024-02-08 22:20:49 +00:00
|
|
|
|
# 194,6667,6660-7000 - 渗透测试 IRC
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2024-02-08 22:20:49 +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-08 22:20:49 +00:00
|
|
|
|
支持 HackTricks 的其他方式:
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-02-08 22:20:49 +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)
|
2024-02-09 12:48:25 +00:00
|
|
|
|
* **加入** 💬 [**Discord 群组**](https://discord.gg/hRep4RUj7f) 或 [**电报群组**](https://t.me/peass) 或在 **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live) 上 **关注**我们。
|
2024-02-08 22:20:49 +00:00
|
|
|
|
* 通过向 [**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>
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## 基本信息
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-09 12:48:25 +00:00
|
|
|
|
IRC 最初是一种**纯文本协议**,由 IANA 分配了 **194/TCP**,但通常在 **6667/TCP** 和类似端口上运行,以避免需要 **root 权限**进行操作。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-08 22:20:49 +00:00
|
|
|
|
只需一个**昵称**即可连接到服务器。连接后,服务器会对用户的 IP 执行反向 DNS 查找。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-09 12:48:25 +00:00
|
|
|
|
用户分为**操作员**,他们需要**用户名**和**密码**以获得更多访问权限,以及普通**用户**。操作员具有不同级别的特权,管理员位于顶部。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-08 22:20:49 +00:00
|
|
|
|
**默认端口:**194, 6667, 6660-7000
|
2021-10-18 11:21:18 +00:00
|
|
|
|
```
|
2020-07-15 15:43:14 +00:00
|
|
|
|
PORT STATE SERVICE
|
|
|
|
|
6667/tcp open irc
|
|
|
|
|
```
|
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-01-05 23:28:30 +00:00
|
|
|
|
IRC 可以支持 **TLS**。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```bash
|
|
|
|
|
nc -vn <IP> <PORT>
|
|
|
|
|
openssl s_client -connect <IP>:<PORT> -quiet
|
|
|
|
|
```
|
2024-02-08 22:20:49 +00:00
|
|
|
|
### 手册
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-02-08 22:20:49 +00:00
|
|
|
|
在这里,您可以看到如何使用一些**随机昵称**连接并访问IRC,然后枚举一些有趣的信息。您可以在[这里](https://en.wikipedia.org/wiki/List\_of\_Internet\_Relay\_Chat\_commands#USERIP)了解更多IRC命令。
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```bash
|
|
|
|
|
#Connection with random nickname
|
|
|
|
|
USER ran213eqdw123 0 * ran213eqdw123
|
|
|
|
|
NICK ran213eqdw123
|
|
|
|
|
#If a PING :<random> is responded you need to send
|
|
|
|
|
#PONG :<received random>
|
|
|
|
|
|
|
|
|
|
VERSION
|
|
|
|
|
HELP
|
|
|
|
|
INFO
|
|
|
|
|
LINKS
|
|
|
|
|
HELPOP USERCMDS
|
|
|
|
|
HELPOP OPERCMDS
|
|
|
|
|
OPERATOR CAPA
|
|
|
|
|
ADMIN #Admin info
|
|
|
|
|
USERS #Current number of users
|
|
|
|
|
TIME #Server's time
|
|
|
|
|
STATS a #Only operators should be able to run this
|
|
|
|
|
NAMES #List channel names and usernames inside of each channel -> Nombre del canal y nombre de las personas que estan dentro
|
|
|
|
|
LIST #List channel names along with channel banner
|
|
|
|
|
WHOIS <USERNAME> #WHOIS a username
|
|
|
|
|
USERHOST <USERNAME> #If available, get hostname of a user
|
|
|
|
|
USERIP <USERNAME> #If available, get ip of a user
|
|
|
|
|
JOIN <CHANNEL_NAME> #Connect to a channel
|
|
|
|
|
|
|
|
|
|
#Operator creds Brute-Force
|
|
|
|
|
OPER <USERNAME> <PASSWORD>
|
|
|
|
|
```
|
2024-02-08 22:20:49 +00:00
|
|
|
|
你也可以尝试使用密码登录服务器。ngIRCd的默认密码是 `wealllikedebian`。
|
2022-06-13 09:39:23 +00:00
|
|
|
|
```bash
|
|
|
|
|
PASS wealllikedebian
|
|
|
|
|
NICK patrick
|
|
|
|
|
USER test1 test2 <IP> :test3
|
|
|
|
|
```
|
2024-02-09 12:48:25 +00:00
|
|
|
|
### **查找和扫描 IRC 服务**
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```bash
|
2023-01-11 14:37:40 +00:00
|
|
|
|
nmap -sV --script irc-botnet-channels,irc-info,irc-unrealircd-backdoor -p 194,6660-7000 <ip>
|
2020-07-15 15:43:14 +00:00
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### [暴力破解](../generic-methodologies-and-resources/brute-force.md#irc)
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2022-05-01 13:25:53 +00:00
|
|
|
|
### Shodan
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2024-01-05 23:28:30 +00:00
|
|
|
|
* `查找您的主机名`
|