Skip to content
Info disclosure Write-up Beginner

Thick Client — Attacking databases the fun/easy way

A desktop application connected to its remote SQL Server database over an unencrypted channel, so the database credentials travelled in clear text. An attacker who could observe that traffic could recover the credentials and use them to log into the database server, which in this case led to a SYSTEM-level shell.

Richard Clifford Follow

Published on medium.com

I was recently looking at a desktop application of a large security firm which manages the security of various large buildings around the UK. The application was fairly straight-forward for a standard thick-client which retrieved and stored data in SQLServer from a remote host.

Richard Clifford, on medium.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

Impact

With the captured credentials the tester could dump the whole database, create new users and pivot through the network, and the shell ran as SYSTEM, though this depended on the database account's privileges and on being able to observe the traffic.

What the attacker needed

Ability to observe the client's network traffic; database account with high privileges

The fix

The client should be configured to encrypt its database connection (for example with a trusted server certificate) so credentials are never sent in clear text.

How it was found

  1. Set up interception tooling for the desktop client's traffic.
  2. Run the application and log the traffic it generates.
  3. Notice the database connection is unencrypted and the credentials are visible.
  4. Use the captured credentials with a Metasploit MSSQL module to obtain a shell on the database server.

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.

A desktop program (a 'thick client') talks to a database on another machine. Normally that conversation should be scrambled so nobody in the middle can read it, but here it was sent as plain readable text. Anyone able to watch the network could read the database username and password and then log in themselves.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Richard Clifford

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.