Web - Authy

Download

Challenge files

.
β”œβ”€β”€ black.db
β”œβ”€β”€ controller
β”‚Β Β  └── LoginController.go
β”œβ”€β”€ db
β”‚Β Β  └── dbConnection.go
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
β”œβ”€β”€ helper
β”‚Β Β  └── util.go
β”œβ”€β”€ model
β”‚Β Β  └── models.go
└── server.go

5 directories, 10 files

server.go

Looking at the file we can say it's nothing but just a general login/registeration index file.

  • The intresting file was under controller/LoginController.go

  • The main fact to get the flag was to have a password of length less than 6 (checkout following snippet).

  • BUT BUT BUT, while registering we see that the request isn't sent to register if our password length is less than 6 (check the following snippet).

Vulnerability - Rune

  • If you looked the src code closely,

Exploit

  • So what next?

    • Just create a password with unicode character of length more than 6

    • while checking with run the length of our unicode character would be 1 or whatever character code you used.

Solve.py

Flag

-------- and pwned (late writeup? yehp)

Last updated