hacktricks/network-services-pentesting/pentesting-irc.md
2024-02-10 17:52:19 +00:00

4.4 KiB

194,6667,6660-7000 - Pentesting IRC

htARTE (HackTricks AWS Red Team Expert) !HackTricks AWS Red Team Expert!

Other ways to support HackTricks:

Basic Information

IRC, initially a plain text protocol, was assigned 194/TCP by IANA but is commonly run on 6667/TCP and similar ports to avoid needing root privileges for operation.

A nickname is all that's needed to connect to a server. Following connection, the server performs a reverse-DNS lookup on the user's IP.

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

Banner

IRC TLS jatlhlaH.

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

Qap

Qapmey je DujDaq yuQmey je IRC vItlhutlh je random nickname 'ej vItlhutlh 'e' vItlhutlh. Qapmey je IRC qaStaHvIS yuQmey.

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

Translation:


ghItlh: vaj login vItlhutlhlaHbe'chugh server. ngIRCd'e' vItlhutlhlaHbe'chugh password 'wealllikedebian' Hoch.


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

Qap tu'lu'chugh IRC tIq

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

Brute Force

Shodan

  • looking up your hostname
Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!

Other ways to support HackTricks: