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

103 lines
4.6 KiB
Markdown
Raw Normal View History

# 194,6667,6660-7000 - Pentesting IRC
2022-04-28 16:01:33 +00:00
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
<details>
2022-04-28 16:01:33 +00:00
<summary>Support HackTricks</summary>
2022-04-28 16:01:33 +00:00
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}
2022-04-28 16:01:33 +00:00
## Informazioni di base
IRC, inizialmente un **protocollo di testo semplice**, è stato assegnato **194/TCP** da IANA ma viene comunemente eseguito su **6667/TCP** e porte simili per evitare di avere bisogno di **privilegi di root** per il funzionamento.
Un **nickname** è tutto ciò che serve per connettersi a un server. Dopo la connessione, il server esegue una ricerca DNS inversa sull'IP dell'utente.
Gli utenti sono divisi in **operatori**, che necessitano di un **nome utente** e **password** per avere più accesso, e **utenti** normali. Gli operatori hanno vari livelli di privilegi, con gli amministratori al vertice.
2024-02-10 13:03:23 +00:00
**Porte predefinite:** 194, 6667, 6660-7000
```
PORT STATE SERVICE
6667/tcp open irc
```
2024-02-10 13:03:23 +00:00
## Enumerazione
2022-05-01 13:25:53 +00:00
### Banner
2024-02-10 13:03:23 +00:00
IRC può supportare **TLS**.
```bash
nc -vn <IP> <PORT>
openssl s_client -connect <IP>:<PORT> -quiet
```
2024-02-10 13:03:23 +00:00
### Manuale
Qui puoi vedere come connetterti e accedere all'IRC utilizzando un **nickname casuale** e poi enumerare alcune informazioni interessanti. Puoi imparare più comandi dell'IRC [qui](https://en.wikipedia.org/wiki/List\_of\_Internet\_Relay\_Chat\_commands#USERIP).
```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>
```
Puoi, inoltre, tentare di accedere al server con una password. La password predefinita per ngIRCd è `wealllikedebian`.
2022-06-13 09:39:23 +00:00
```bash
PASS wealllikedebian
NICK patrick
USER test1 test2 <IP> :test3
```
2024-02-10 13:03:23 +00:00
### **Trova e scansiona i servizi IRC**
```bash
nmap -sV --script irc-botnet-channels,irc-info,irc-unrealircd-backdoor -p 194,6660-7000 <ip>
2024-02-10 13:03:23 +00:00
```
### [Brute Force](../generic-methodologies-and-resources/brute-force.md#irc)
2024-02-10 13:03:23 +00:00
### Shodan
2024-02-10 13:03:23 +00:00
* `cercando il tuo hostname`
2022-06-13 09:39:23 +00:00
2022-04-28 16:01:33 +00:00
{% hint style="success" %}
Impara e pratica il hacking AWS:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Impara e pratica il hacking GCP: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
<details>
2022-04-28 16:01:33 +00:00
<summary>Supporta HackTricks</summary>
2022-04-28 16:01:33 +00:00
* Controlla i [**piani di abbonamento**](https://github.com/sponsors/carlospolop)!
* **Unisciti al** 💬 [**gruppo Discord**](https://discord.gg/hRep4RUj7f) o al [**gruppo telegram**](https://t.me/peass) o **seguici** su **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Condividi trucchi di hacking inviando PR ai** [**HackTricks**](https://github.com/carlospolop/hacktricks) e [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos su github.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}