Skip to content

Latest commit

 

History

History

SQL Direct

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

SQL Direct

Author

Mubarak Mikail / LT 'syreal' Jones

Description

Connect to this PostgreSQL server and find the flag!
psql -h saturn.picoctf.net -p 49168 -U postgres pico
Password is postgres

Hints

  1. What does a SQL database contain?

Approach

We start by connecting with psql -h saturn.picoctf.net -p 49168 -U postgres pico and inputting postgres as the password.

pico=# \dt
         List of relations
 Schema | Name  | Type  |  Owner   
--------+-------+-------+----------
 public | flags | table | postgres
(1 row)

pico=# TABLE flags;
 id | firstname | lastname  |                address                 
----+-----------+-----------+----------------------------------------
  1 | Luke      | Skywalker | picoCTF{L3arN_S0m3_5qL_t0d4Y_0414477f}
  2 | Leia      | Organa    | Alderaan
  3 | Han       | Solo      | Corellia
(3 rows)

Over here, \dt lists all the tables that exist. TABLE flags; lists all the elements that exist in the flags table.

Flag

picoCTF{L3arN_S0m3_5qL_t0d4Y_0414477f}