Body Count

Challenge:

One of our employees, Jimmie Castora, kept database backups on his computer. DEADFACE compromised his computer and leaked a portion of the database. Can you figure out how many customers are in the database? We want to get ahead of this and inform our customers of the breach.

Submit the flag as flag{#}. For example, flag{12345}.

Download MySQL database dump
SHA1: 5867eeb1466b31eb8d361061fddd99700fc5d739
Password: d34df4c3

Solution:

A quick review of the unarchived challenge file confirms it is a MySQL dump file:

$ head demonne.sql 
-- MySQL dump 10.13  Distrib 5.7.35, for Linux (x86_64)
--
-- Host: 172.17.0.3    Database: demonne

Next steps are to create a local database and import the dump file so we can run queries:

$ sudo mysql -e "CREATE DATABASE demonne"
$ sudo mysql demonne < demonne.sql 
$ sudo mysql -s demonne

The challenge is asking for the number of customers in the database so we reviewed the tables in the database to determine where that data might live:

mysql> SHOW TABLES;
Tables_in_demonne
credit_cards
cust_passwd
customers
employee_passwd
employees
loan_types
loans

The "customers" table seems like the obvious choice so the last step is to count the number of rows in that table:

mysql> SELECT COUNT(*) FROM customers;
COUNT(*)
10000

The accepted flag was: flag{10000}.

Published:

Updated:

Leave a comment