TBO_lab2_Dominik_Sidorczuk #52
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Zad 1.
Logi podczas dodawania użytkownika:
Rozw. Zmiany w modelu dla customerów
Zad 2.
Rozw.
Trzeba usunąć pare commitów wszystkie które zawierają nawiązania do plików: awscredentials.json, deployment2.key, deployment.key
Zad 3.
Skan wykazał podatność w 3 pakietach: jinja2, werkzeug i healpy.
Najbardziej podatne jest Jinja2 w wersji 3.1.2 oznaczone jako CRITICAL, ponieważ istnieje w nim możliwość wykonania zdalnie kodu (RCE). Okazuje się, że istnieje mechanizm sandbox (ktoś może wprowadzić własne szablony jeśli aplikacja na to zezwala, które potem będzie renderować) jijna2 vulnerable to sandbox..., w którym to renderowane templaty zawierają takie
linijki jak {{ object | attr("name") }} w htmlu. Dokładniej to sam sandbox blokował takie działania na wywoływanie metod z '_'
jednakże poprzez dodany filtr attr dało się to obejść właśnie. W ten sposób ktoś może wpisać {{ ''.format | attr("__globals__") }}, czy też {{ ''.format | attr("__globals__") | attr("os") | attr("system")("rm -rf /") }} co już zezwala na wykonywanie kodu po stronie serwera/aplikacji.