143,993 - Pentesting IMAP

Internet Message Access Protocol

As its name implies, IMAP allows you to access your email messages wherever you are; much of the time, it is accessed via the Internet. Basically, email messages are stored on servers. Whenever you check your inbox, your email client contacts the server to connect you with your messages. When you read an email message using IMAP, you aren't actually downloading or storing it on your computer; instead, you are reading it off of the server. As a result, it's possible to check your email from several different devices without missing a thing.

By default, the IMAP protocol works on two ports:

  • Port 143 - this is the default IMAP non-encrypted port

  • Port 993 - this is the port you need to use if you want to connect using IMAP securely

PORT    STATE SERVICE REASON
143/tcp open  imap    syn-ack
nc -nv <IP> 143
openssl s_client -connect <IP>:993 -quiet

NTLM Auth - Information disclosure

If the server supports NTLM auth (Windows) you can obtain sensitive info (versions):

root@kali: telnet example.com 143 
* OK The Microsoft Exchange IMAP4 service is ready. 
>> a1 AUTHENTICATE NTLM 
+ 
>> TlRMTVNTUAABAAAAB4IIAAAAAAAAAAAAAAAAAAAAAAA= 
+ TlRMTVNTUAACAAAACgAKADgAAAAFgooCBqqVKFrKPCMAAAAAAAAAAEgASABCAAAABgOAJQAAAA9JAEkAUwAwADEAAgAKAEkASQBTADAAMQABAAoASQBJAFMAMAAxAAQACgBJAEkAUwAwADEAAwAKAEkASQBTADAAMQAHAAgAHwMI0VPy1QEAAAAA

Or automate this with nmap plugin imap-ntlm-info.nse

Syntax

From here

Shodan

  • port:143 CAPABILITY

  • port:993 CAPABILITY

最后更新于

这有帮助吗?