Pidgin — XMPP / Jabber Client
What is this for?
Pidgin is a desktop IM client. On OSCP/labs it is used to interact with XMPP/Jabber servers (ports 5222 / 5223) — a protocol that is not HTTP, SMB, or LDAP, so normal web/SMB tools won’t help you talk to it.
OSCP use: When Nmap shows 5222/tcp open (often
jabber,Openfire, orXMPP), use Pidgin to register, enumerate users, join chat rooms, and find creds — then pivot to AD attacks (Kerbrute, AS-REP roast, Kerberoast).
Canonical lab: HTB Jab — XMPP user enum → AS-REP → chat room cred leak → dcomexec → Openfire admin.
📌 When You Need Pidgin
| You see… | Do this |
|---|---|
| Port 5222 or 5223 open | Install Pidgin, connect via XMPP |
| Web page offers XMPP/Jabber registration | Register account → enumerate |
| Openfire / Prosody / ejabberd in version scan | Expect user search + MUC (chat rooms) |
| Already have XMPP creds | Add second account → check rooms you couldn’t see before |
Not for: general “weird protocol” access — use the right client per service (Database, Impacket, etc.).
📌 Installation
sudo apt update && sudo apt install pidgin -y
pidgin &Optional plugins are built-in — enable from Tools → Plugins after launch.
📌 Account Setup (First Connection)
- Accounts → Manage Accounts → Add
- Protocol: XMPP
- Username: anything (e.g.
testuser) — many servers allow open registration - Domain:
domain.htb(e.g.jab.htb) - Password: choose any (registration often unrestricted)
- Advanced tab (if connection fails):
- Port:
5222(or5223for direct TLS) - Connection security: try Allow plaintext auth over unencrypted streams on labs (no real TLS)
- Connect server:
domain.htbor target IP
- Port:
Username: testuser
Domain: jab.htb
Resource: (leave default)
Password: anything
Port: 5222
If registration fails, check the web UI on port 80/443 — some boxes expose a signup page.
📌 Essential Plugins
Tools → Plugins — enable:
| Plugin | Purpose |
|---|---|
| XMPP Console | View/send raw XML stanzas — capture user search results |
| XMPP Service Discovery | List services (MUC, search, etc.) on the server |
📌 User Enumeration
GUI method (easiest)
- Accounts → your account → Search for Users…
- Search field:
*(wildcard — returns all users) - Copy results from GUI or capture XML in XMPP Console
Export users for AD attacks
Save XMPP Console output to a file, then parse:
grep jab.htb xmpp.txt | awk -F\> '{print $2}' | awk -F@ '{print $1}' | sort -u > users.txtSee full pipeline breakdown: Pipelines & Chaining
Feed into Kerberos attacks
# AS-REP roast (accounts without preauth)
impacket-GetNPUsers jab.htb/ -dc-ip 10.10.10.10 -no-pass -usersfile users.txt -outputfile asrep.txt
hashcat -m 18200 asrep.txt /usr/share/wordlists/rockyou.txt
# Valid user check
kerbrute userenum --dc 10.10.10.10 -d jab.htb users.txt📌 Chat Room Enumeration (MUC)
After logging in with valid domain creds, new rooms may appear.
- Buddies → Join Chat… (or Room List)
- Conference server:
conference.domain.htb(e.g.conference.jab.htb) - Find Rooms → join each room
- Read history for cleartext passwords, pentest notes, internal hostnames
Low-priv account → few/no rooms
Valid AD creds → private rooms (e.g. pentest2003) with leaked hashes/passwords
Room names and conference subdomain vary — use XMPP Service Discovery if unsure.
📌 Raw XML User Search (XMPP Console)
If GUI search is limited, send search stanza via XMPP Console (adapt domain):
<iq type="set" id="search1" to="search.jab.htb" xmlns="jabber:client">
<query xmlns="jabber:iq:search">
<username>*</username>
</query>
</iq>Copy XML response → save as xmpp.txt → run Pipelines & Chaining extraction.
📌 Brute Force (Secondary)
Prefer user enum + AS-REP over spraying. If needed:
hydra -L users.txt -P /usr/share/wordlists/rockyou.txt 10.10.10.10 xmpp -s 5222 -t 4 -fSee Hydra — xmpp module.
📌 HTB Jab — Full Attack Chain
1. Nmap → 5222/tcp open (XMPP)
2. Pidgin → register testuser@jab.htb
3. Search for Users (*) → 2000+ domain users → users.txt
4. GetNPUsers → crack AS-REP hash → jmontgomery creds
5. Pidgin → login as jmontgomery → join pentest2003 room
6. Read chat → svc_openfire password + Kerberoast mention
7. impacket-dcomexec → shell as svc_openfire
8. Openfire admin on localhost:9090 → malicious plugin → SYSTEM
📌 Troubleshooting
| Problem | Fix |
|---|---|
| Connection refused | Confirm 5222 open; try target IP instead of hostname |
| Auth failed on register | Check web UI for signup; try different username |
| Plaintext auth disabled | Advanced → allow plaintext on unencrypted stream |
| No rooms visible | Need higher-priv creds — enum users first, roast/spray |
| Empty user search | Enable XMPP Console; try raw XML to search.domain.htb |
📌 Quick Copy/Paste
# Install
sudo apt install pidgin -y
# After Pidgin user search → parse users
grep domain.htb xmpp.txt | awk -F\> '{print $2}' | awk -F@ '{print $1}' | sort -u > users.txt
# AS-REP roast
impacket-GetNPUsers domain.htb/ -dc-ip DC_IP -no-pass -usersfile users.txt -outputfile asrep.txt
hashcat -m 18200 asrep.txt /usr/share/wordlists/rockyou.txt
# Hydra (if needed)
hydra -L users.txt -P passwords.txt TARGET xmpp -s 5222 -t 4 -f