Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Downloading and using a database from an untrusted source?

If I was to obtain a database (in this case for postgresql) from an untrusted source, is there any risk in activating it and querying it?

like image 376
HoboBen Avatar asked Oct 14 '22 02:10

HoboBen


1 Answers

There are plenty of possible attack vectors there, if that's what you're asking. Here are a few that I can think of off the top of my head:

  1. Maybe the link to the database is actually a link to a hacked PDF file that will exploits some vulnerability in your Acrobat plugin (your PDF plugins are patched, right? this is a really popular attack vector lately).

  2. If it's zipped, maybe it's really a zip bomb.

  3. If it's a binary dump, maybe it's trying to exploit some bug in the restore process.

  4. Maybe it contains malicious stored procedures that will drop your databases or scramble your passwords.

  5. Maybe it's just a text dump that has a bunch of drop statements in it.

Practically speaking, It's not exactly low hanging fruit. Postgres is a niche product with a limited audience (developers who like postgres). I find it pretty unlikely that it a database dump would be used to deliver some kind of malware.

Whether it's "safe" depends on what "untrusted" means in this case. If you're really concerned, load it up in a virtual machine with networking turned off to limit the possible damage.

like image 191
Seth Avatar answered Oct 30 '22 22:10

Seth