Level 1 → 2

Level Goal

The password for the next level is stored in a file called - located in the home directory.

Write-Up

  1. Verify the file's presence in the home directory:

ls
ls

This confirms the existence of a file named -.

  1. Display the content of the file:

cat ./-
cat ./-

Note: Use ./ to prefix the filename because cat interprets - as a synonym for the standard input (stdin) when used alone.

  1. The revealed password is: 263JGJPfgU6LtdEvgfWU1XP5yac29mFx

  2. Access the next level using the obtained password:

ssh [email protected] -p 2220

Enter the password when prompted.

Lessons Learned

  • Special characters in filenames can affect how commands interpret them

  • The dash (-) is often used to represent stdin/stdout in Unix systems

  • Using ./ before a filename tells the system to treat it as a file path

  • Understanding how commands interpret arguments is crucial for handling unusual filenames

-- Othmane

Last updated

Was this helpful?