Email SMTP

Read emails

telnet 10.x.x.x 110
nc -nv 10.x.x.x 110
USER mindy
PASS hello
STAT
RETR 2

+OK Message follows
Delivered-To: mindy@localhost
Tue, 22 Aug 2017 13:17:28 -0400 (EDT)
Date: Tue, 22 Aug 2017 13:17:28 -0400 (EDT)
From: mailadmin@localhost
Subject: Your Access

Dear Mindy,
Here is your password.. blah blah blah

Send email with telnet

  • SMTP: 25

  • Bonus: Inject a php exploit.. you will need an LFI to read/execute it though

sendmail with attachment

  • Instead of telnet, EHLO, blah blah...

  • Send a Reverse shell php

execute and connect

  • LFI Execution Example (for after you've sent the evil email)

Files

Thunderbird

  • If you have a user/pass, you can open thunderbird to browser emails

  • You might find a password that you could use for SSH too!! REF: solidstateHTB

James Server 2.3.2

  • Java Apache Mail Enterprise Server (JAMES)

  • Connect and Reset user-email password

  • Then use Thunderbird email to look for clues

James Server Exploit 2.3.2 (RCE)

  • 35513 will get you a full-shell

  • Requirements:

    • Default login: root/root

    • Must have a working ssh login user/pass (limited is ok)

    • Need to update the payload for reverse-connect

  • Will add a weird user account: ../../../etc/bash_completion.d

  • Sends email to our 'weird' user-directory

  • When anybody logs into ssh, we will get execution

  • Confused?

    • Yes, you need an ssh login already.. but if its limited it wont do much

    • This will get you a full-shell, instead of a limited

    • Next step is to look for PrivEsc !!

More

Last updated

Was this helpful?