// HackTricks · Network Services

194,6667,6660-7000 - Pentesting IRC

194,6667,6660-7000 - Pentesting IRC

Basic Information

IRC is a text protocol. IANA assigns TCP 194 to IRC, while deployments have historically used TCP 6667 and adjacent unprivileged ports; modern networks also commonly offer TLS on 6697.[1][2]

Registration normally requires at least NICK and USER; a server may additionally require PASS, SASL, or other network-specific authentication. Reverse-DNS lookup is implementation/configuration dependent.[2]

Users are divided into operators, who need a username and password for more access, and regular users. Operators have varying levels of privileges, with administrators at the top.

Default ports: 194, 6667, 6660-7000

PORT     STATE SERVICE
6667/tcp open  irc

Enumeration

IRC can support TLS.

nc -vn <IP> <PORT>
openssl s_client -connect <IP>:<PORT> -quiet

Manual

The following raw session registers a random nickname and exercises useful enumeration commands. Command availability and permissions vary by daemon and network; the IRC command index provides additional commands to test where supported.[5]

#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>

You can also test server-password authentication when the service advertises or requires it. wealllikedebian appeared in an old Debian/ngIRCd sample configuration and is worth testing only when that specific legacy setup is identified; it is not a universal ngIRCd default.[3]

PASS wealllikedebian
NICK patrick
USER test1 test2 <IP> :test3

Find and scan IRC services

nmap -sV --script irc-botnet-channels,irc-info,irc-unrealircd-backdoor -p 194,6660-7000 <ip>

The NSE documentation describes the probes, output, and safety classification for these scripts.[4]

Brute Force

Shodan

  • looking up your hostname

References

☧ CPTS · ordered posts

Locked

Unlock with your Main_Key through local GPG.

Start the local GPG helper

In your cheatsheet checkout, run:

npm run unlock:helper

Open the link it prints, or paste its pairing code below. Keep the terminal open until GPG finishes.

Import an index you already decrypted

Download the encrypted index, then decrypt with GPG:

gpg --output report-index.json --decrypt report-index.gpg

Your private key stays in GPG. The decrypted index is saved in this browser so you can reopen it after navigation, refreshes and restarts. Lock this browser or clear this site's browser data to remove the saved index. Nothing is uploaded.