Skip to content
RCE Write-up Intermediate

Brute Forcing pop3 And Cve 2017 7494 Is Known Pipename

A Samba server running a vulnerable version allowed an attacker to load an arbitrary shared library and obtain a shell. From that shell the attacker brute-forced the local POP3 service and read the user's emails.

David Eduardo Karpinski Follow

Published on systemweakness.com

All right, guys. Today I want to share with you how I was able to arbitrarily read e-mails with sensitive information from a Dovecot server by exploiting Samba isknownpipename() Arbitrary Module Load vulnerability.

David Eduardo Karpinski, on systemweakness.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the Samba service was an outdated version affected by the is_known_pipename() arbitrary module load flaw, and the mail service used a weak, guessable password.

Impact

An attacker could gain a shell on the server and read the user's emails containing sensitive information.

What the attacker needed

Network access to SMB port; writable SMB share; known server-side share path; weak POP3 password

The fix

The Samba service should be upgraded to a version not affected by the is_known_pipename() flaw, and the mail account should use a strong password.

How it was found

  1. Scan the target's ports to find open services.
  2. Enumerate SMB shares to identify the Samba version.
  3. Run the is_known_pipename exploit against the SMB port to get a shell.
  4. Transfer a wordlist and a brute-force script onto the target.
  5. Brute-force the POP3 service for the local user's password.
  6. Connect to POP3 and retrieve the emails.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Samba is software that lets computers share files and printers on a network. An old version of it could be tricked into loading a file the attacker supplied, which gave the attacker a command shell on the machine. Once inside, the attacker guessed the password of the mail service running on the same machine and read the victim's email.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by David Eduardo Karpinski

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.