Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 1.27 KB

sql-direct.md

File metadata and controls

56 lines (43 loc) · 1.27 KB

picoCTF 2022

Arvind Shima | March 16,2022

Overview

Tables Description
Category Web Exploitation
Challenge Name SQL Direct
Points 200

Description

Connect to this PostgreSQL server and find the flag!

Hint

  • What does a SQL database contain?

Approach

Connect to the PostgreSQL Server.

┌─[whoami@parrot]─[~/Workspace/picoctf/picoctf2022/web_exp/sqldirect]
└──╼ $psql -h saturn.picoctf.net -p 62124 -U postgres pico
Password for user postgres: 
psql (13.5 (Debian 13.5-0+deb11u1), server 14.2 (Debian 14.2-1.pgdg110+1))
WARNING: psql major version 13, server major version 14.
         Some psql features might not work.
Type "help" for help.

pico=#
pico=# \dt
         List of relations
 Schema | Name  | Type  |  Owner   
--------+-------+-------+----------
 public | flags | table | postgres
(1 row)
pico=#
pico=#
pico=# select * from flags;
 id | firstname | lastname  |                address                 
----+-----------+-----------+----------------------------------------
  1 | Luke      | Skywalker | picoCTF{L3arN_S0m3_5qL_t0d4Y_31fd14c0}
  2 | Leia      | Organa    | Alderaan
  3 | Han       | Solo      | Corellia
(3 rows)

Flag

picoCTF{L3arN_S0m3_5qL_t0d4Y_31fd14c0}