Files
validator/OmCTF-2025/sploits/bashist/README.RU.md

23 lines
842 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Эксплойт 1
**Флагтор 1: Приватные посты (их содержимое)**
**Уязвимость:** Баг в коде, позволяющий войти под любым пользователем с паролем `password`.
**Исправление:** Добавить знак `$` перед хешированием пароля в функциях `api-user-register` и `api-user-login`.
# Эксплойт 2
**Flagstore 2: Приватные посты (их содержимое)**
Уязвимость: Неэффективная функция db-escape и её отсутствие в функции db-list-user-posts для поля user_token.
Исправление: Изменить функцию db-escape на:
```bash
db-escape() {
local str="$1"
echo "${str//\'/\\\'}"
}
```