Your friend has a personal website. Fortunately for you, he is a bit of a noob when it comes to hosting a website. Can you find out what he is hiding?


Let's view the source.


<!-- Storing stuff in the same directory as your web server doesn't seem like a good idea -->
<!-- Thankfully, we use a hidden one that is super PRIVATE, to protect our cookies.sqlite file -->
    	background-image: url("private/image.png");
  <body >
    <div style='background:white;margin: auto;border: 1px solid red;width: 600px; margin-top: 20%;' >
        <form style="font-size: 40px; ">
        Access Denied</form>

That's some pretty obvious stuff here. Let's jump to the private directory, and download the cookies.sqlite.

Now we have to try and extract the cookies from the file.

[email protected] ~/Pobrane> sqlite3 cookies.sqlite
SQLite version 3.18.0 2017-03-28 18:48:43
Enter ".help" for usage hints.

Great! It's working. Now we can view the tables existing in this database, and then extract the password.

sqlite> SELECT * FROM sqlite_master WHERE type='table';
table|moz_cookies|moz_cookies|2|CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, baseDomain TEXT, appId INTEGER DEFAULT 0, inBrowserElement INTEGER DEFAULT 0, name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, creationTime INTEGER, isSecure INTEGER, isHttpOnly INTEGER, CONSTRAINT moz_uniqueid UNIQUE (name, host, path, appId, inBrowserElement))
sqlite> SELECT * FROM moz_cookies;

One last step would be editing our cookies using EditThisCookie extension.


And lastly reload the page.


And we have another flag to collect.