Wargame: Natas
Level: 1
Category: Web Security
Description
Same as level 0 but right-clicking is blocked by JavaScript. The password is still in the HTML source; only the UI shortcut is disabled.
Overview
- JavaScript can intercept
contextmenuevents but cannot prevent the browser’s built-in View Source (Ctrl+U) or a direct HTTP request. - Fetching the page programmatically bypasses all client-side restrictions.
Solution
response = requests.get(url, auth=("natas1", current_password))
soup = BeautifulSoup(response.text, "html.parser")
result = soup.find(string=lambda s: "password" in s.lower())
Password
h4ubbcXrWqsTo7GGnnUMLppXbOogfBZ7